Was it `from XYZ import ABC` or was it `import ABC from XYZ`?

I was writing (read: hacking together) some Python code yesterday and when today I came back to the ES6-flavoured JavaScript I’m writing as of late, I immediately got my import declarations wrong!

Instead of

// ES6
import ABC from 'xyz';

… I accidentally typed

// ES-Python?
from 'xyz' import ABC;

… which is more like the Python syntax.

I normally advocate for copying what everyone knows, i.e. ES6 designers should have copied Python, as it makes it easier for developers to pick up new languages or features.

But if you think about that, the Python syntax is pretty awkward and counter to the way English reads, unless you’re exercising some fancy stylistic choices. And code is not the right place for fancy styles, specially if you want others to be able to pick where you left.

So I’m glad ES6 designers did not copy Python in this case. Not so glad that my brain seems to prefer the awkward choice!

Tell me more about this intriguing future

Firefox 1.0 was released on the 9th of November of 2004, and I still remember the buzz. We were all excitedly downloading it because our browser had finally reached v1.0.

Using Firefox at that time, with all the developer extensions, gave you such an advantage over other web developers. Adding in the tabs, and the way it was predictable (CSS standards wise), and that it wouldn’t get infected with stuff as often as Internet Explorer, made it into such a joyous experience.

Now, if you had told me back then that I’d be contributing code to Firefox, I’d be laughing in your face. But then I’d stop and ask: Wait… what? Tell me more about this intriguing future!

Fast forward thirteen years. I am working at Mozilla, and tomorrow we release Firefox Quantum to the general public. It’s, as the name says, a “quantum leap” between this and previous Firefox versions.

I’m personally excited that I’ve contributed code to this release. I worked on removing dependencies on the (now defunct) Add-on SDK from the code base of Developer Tools. This means that the SDK code could be finally removed from Firefox, as the new WebExtensions format that Firefox uses now does not make use of that SDK. Results? Safer and leaner Firefox (the old SDK exposed way too many internals). Oh, and that warm and fuzzy feeling after deleting code…

So I didn’t contribute to a big initiative such as a new rendering engine or whatnot, but it’s often the little non-glamourous things that need to be done. I’m proud of this work (which was also done on time). My team were great!

Another aspect I’m very thrilled about is how this work has set us up for more successes already, as we’ve developed new tools and systems to find out ‘bad stuff’ in our code, and now we’re using these outside of the Firefox “core” team to identify more things we’ll want to improve in the upcoming months. There’s a momentum here!

Who knows what else will the future bring? Maybe in 10 years time I’ll be telling you I shipped code for the new rendering engine in Firefox indeed! One has to be open to the possibilities…

Update: my colleague Lin has explained how Firefox Quantum is a browser for the future, using modern technology.

No Twitter month

As an experiment, I stopped using Twitter in October (I quietly posted daily updates on a page)

If it were considered an addiction, it took me a month to cure myself from it (although I had already taken steps to use it less).

After the experiment was over, I didn’t rush to Twitter. I just went on with my life and didn’t even give it a thought. I haven’t been to Twitter yet, and we’re 10 days into November.

I thought I would post more to my blog instead, but I actually have been so busy I barely posted anything, so I can’t tell if the levels of activity (views, comments) have been affected by not posting links to my blog in twitter, because I have barely blogged.

I might continue the no-twitter experiment for longer while also posting more here, and observe what happens.

I keep wondering if it would be “good” for my reach to re-enable the plugin that posts to twitter from my blog automatically, but it still makes me extremely queasy to share a platform with the kind of detestable, repulsive content that Twitter allows to exist because it makes them money (even if it goes against their own rules).

Random thoughts on a Saturday


It’s been a week of upgrading computers and operating systems. At some point I had two laptops and a tablet all updating themselves. Then, the aftermath: the development environment didn’t work, so I had to upgrade it in order to be able to do work. That said, the upgrade has been quite smooth. So not complaining here.

And really complaining: is it me or does every street in central London have some kind of construction work? At the moment of writing there’s a gas work happening pretty much right under my window, with continuous tarmac slicing (thanks god they’re done with the drilling), but when they stop I can hear a similar sound further away. What a nightmare!

Then you walk around and it’s hoardings and scaffoldings all around. I specially despise these: they make you alter your path as pedestrian, as often they take over the pavement, and even more often they turn the pavement into a tunnel. Fine, they install lights and they assume “it’s safe”. Well, it looks like exactly the kind of place I don’t want to walk through, day or night.

Monet and England’s changing weather

Speaking of day or night, there’s an article in the Tate etc magazine which juxtaposes Monet’s London paintings with the letters he was writing to his wife at the time of his stay. I found it quite amusing to read about his despair about the constantly changing London weather and how it was forcing him to get more canvases so he could capture all the facets and various manifestations of rain, fog, sun (or lack thereof):

“… it’s very difficult, for no one day is anything like another: yesterday there was sun, with an exquisite mist and a splendid sunset; today, rain and fog, to the point that I am writing to you by [electric] light at four in the afternoon, whereas yesterday I was able to work in daylight until almost 6 o’clock.”

“I have something like 65 canvases covered with colour and I still need more, this country is something quite out of the ordinary”.

When we take a picture with our modern cameras we don’t stop to think about it, but there’s this extraordinary wide amount of variations. I noticed this when I started live sketching, which forces you to actually stop and look. So I totally sympathise with Monet’s struggle. It also made me wonder: what would Monet do nowadays? Would he use canvas and oils or would he go for something that allowed him to capture colours faster?

Dramatic clouds

Something else I noticed when I moved to England was the continuously varying skies. Those dark clouds quickly forming in the distance, before emptying themselves without any notice. The big clouds floating high and the progression down to fine yellowy mist… “No wonder Lord Byron went full on romantic”, I thought. And what about Turner’s paintings? Fully explained, just as you can understand Dalí more when you visit his homeland.

Who would have thought…

Yesterday I baked a bread for the first time in ages, and it was pretty decent, considering I was specially focused on finishing all the various types of flours we have on the cupboard. There are so many combinations of wholemeal, plain, raising, non-raising…

I didn’t follow the recipe properly and did a couple of mistakes, but the bread was nicely cooked and went really well with avocado and eggs this morning.

Here I am, embracing millenialism…! 😎

More millenialism: looking for flours in the cupboard, I found what looked from above like a honey jar, except it contained quinoa, which pleased me to no end. Who had left that there? Why was it on the ‘baking’ area? I asked my partner and apparently it had been… me!

I propose that it’s the food equivalent of finding a forgotten note in a pocket.

Conclusion: I might have a quinoa salad today.