One reason I like working at startups is
you get to wear many hats.
Of course,
by "wear many hats" I really mean
"suffer occasional periods of extreme stress when things fail
and there are no grownups you can go to for help".
I like to think of it as Extreme Learning.
Read more
One of my stock interview questions goes:
"When picking between dependencies to use in production,
what factors contribute to your decision?"
I'm surprised by how often
I receive an answer along the lines of
"Github stars" and not much else.
I happen to think Github stars is a terrible metric
for selecting production code,
so this post sets out my idea
of a healthier framework to evaluate dependencies.
Read more
As engineers we spend a lot of our time debugging problems,
yet it's rarely taught as a skill in its own right.
Some bugs are difficult enough
that they can seem borderline impossible to solve,
especially for devs toward the junior end of the spectrum.
There's no worse feeling than being stuck
on a hard problem,
not knowing how to proceed.
Of course,
the right thing to do if you're stuck like that
is ask for help;
from your team,
from other engineers in your org or social circle,
from random strangers on the internet.
As a random stranger on the internet then,
this post is my attempt to help get you unstuck
if you find yourself in that situation.
Read more
Automating your release process
saves time,
eliminates tedious busywork
and reduces the likelihood of mistakes
when cutting a new release.
There are plenty of off-the-shelf solutions available,
but this post will show
how easy it is to build your own release script
and why the end result can be better
than using a generic, third-party option.
Throughout the post
I'll use the case study
of some recent work we did
to automate the release process
for FxA,
to provide concrete examples
of what I'm talking about.
Read more
Along with all the fun, creative stuff
it enables you to do,
programming sometimes requires you to carry out
boring and repetitive editing operations.
If those operations are uniformly applicable,
it's straightforward to automate them
using regular expressions
and a tool like sed,
or :%s/foo/bar/g in vim-speak.
But sometimes a regex can't express
the pattern you want to match against
and on those occasions,
vim macros can come to the rescue.
Read more
JavaScript's Array and Promise types
compose nicely
with functional programming idioms
to control concurrency
without recourse to 3rd-party libraries.
This post contrasts two such patterns
that enable you to process data
either concurrently or serially,
with back-off and retry logic
in the event of errors occurring.
Read more
Let's say you have a huge amount of JSON data
and you want to parse values from it in Node.js.
Perhaps it's stored in a file on disk
or, more trickily,
it's on a remote machine
and you don't want to download the entire thing
just to get some data from it.
And even if it is on the local file system,
the thing is so huge that reading it in to memory
and calling JSON.parse
will crash the process
with an out-of-memory exception.
Today I implemented a new method
for my async JSON-parsing lib, BFJ,
which has exactly this type of scenario in mind.
Read more