Intro for Francois Marier

36 views
Skip to first unread message

Francois Marier

unread,
Jun 14, 2012, 8:42:07 PM6/14/12
to node...@googlegroups.com
To follow Andy's lead, here's a little bit about myself. I'm a free and
open source developer involved in various projects, but mostly
Libravatar, Debian and BrowserID/Persona.

My NPM page is not very impressive as I only maintain a library to make
use of the Libravatar avatar hosting service from within Node.js
applications:

http://search.npmjs.org/#/_author/Francois%20Marier

However, I now do Node full time at Mozilla in Auckland, working on a
federated and open system that we hope will solve the identity system
mess we currently have on the web: http://mozilla.org/persona

So far I like Node, but I'd love to discuss best practices, patterns and
things like that because it's pretty easy for a callback-based program
to become pretty hairy and hard to read. For example, a little session
discussing vows tests with some of my colleagues helped me refactor my
tests into something much easier on the eyes:


https://github.com/fmarier/securenotes/commit/aed91ab5c0345eecd687877a5b0b958057ba2a99

https://github.com/fmarier/securenotes/commit/56350dba9ea59603d4d3304ac1ee4ffe5d068059

https://github.com/fmarier/securenotes/commit/8116d57d71d17736a3df46ec9ea6c48e9a91133c

https://github.com/fmarier/securenotes/commit/649643c1c31deb49c76734d3c9b1aaaae733aef7

Finally, if you're an emacs user, I'll leave you with something that has
changed my life :)


http://feeding.cloud.geek.nz/2012/05/proper-indentation-of-javascript-files.html

Cheers,
Francois
--
Francois Marier identi.ca/fmarier
http://fmarier.org twitter.com/fmarier

Andrew Chilton

unread,
Jun 14, 2012, 9:11:47 PM6/14/12
to node...@googlegroups.com
Hi Francois,

Thanks for your intro. :)

On 15 June 2012 12:42, Francois Marier <fran...@mozilla.com> wrote:
> So far I like Node, but I'd love to discuss best practices, patterns and
> things like that because it's pretty easy for a callback-based program
> to become pretty hairy and hard to read. [snip]

On that note, thought I'd just share with you a program I wrote a week
or so back. I started it as an example of how to synchronised files in
an S3 Bucket (download only) with your local directory, but in fact it
turned into a great example of a program which uses a number of queues
to shuffle "pieces of work" around where each piece of work is
created for each object in your S3 Bucket.

* https://github.com/appsattic/node-awssum-scripts/blob/master/bin/amazon-s3-sync-down.js

Just to describe how it works in a sentence, it sets up a number of
queues (using async) and each queue is processed by a function which
either completes the work required for that item, or pushes it to a
different queue for the next bit of work require. Take a look at the
code and it'll become clear. I just think it's a nice example of how
you can keep your callbacks and levels of indentation low. :) Oh, and
it can run all of these things concurrently by passing a number in as
an argument to the script (e.g. three concurrent uploads :
amazon-s3-sync-down.js -c 3).

The opposite 'upload' program can also be seen here, but this isn't as
nice since it was written first and needs a slight refactor:

* https://github.com/appsattic/node-awssum-scripts/blob/master/bin/amazon-s3-sync-up.js

So yeah, the upshot out of all of that for me is to use a flow-control
library when you can. Note: not everyone's cup of tea. :)

Cheers,
Andy

--
contact: Andrew Chilton
website: http://www.chilts.org/blog/

Rod Vagg

unread,
Nov 26, 2012, 6:29:15 PM11/26/12
to node...@googlegroups.com, fran...@mozilla.com
Having heard Francois speak at JSConf.au a couple of weeks ago I can highly recommend him as a speaker at any meet-up you organise. Very entertaining and informative and surprisingly prepared to answer any of the many questions fired at him after his talk. They're doing some fascinating Node work with Persona.
Thanks again Francois.
Reply all
Reply to author
Forward
0 new messages