Random thoughts on a Saturday

Upgrading

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.

How to solve the “aborting due to worker thread panic” error message while compiling Firefox on a virtual machine

Short answer: allocate more memory to your virtual machine.

The error is produced because the build process ran out of memory when compiling Servo’s style crate.

I tried with 4096Mb and it seems to be happily chugging along now. I guess your mileage may vary, yadda yadda… 💁🏻

This is nothing short of miraculous as it’s a Virtual Machine running Linux in a Macbook retina (with 8 Gb of RAM), which is a moderately underpowered-for-compiling-things laptop. But hey, lightweight, right?

Four parts of your body that get out of shape when you work with computers all day long

This year I got serious about my fitness. I got my posture and range of movements assessed, and you know what…?

THE RESULTS SHOCKED ME!  😱

Continue reading “Four parts of your body that get out of shape when you work with computers all day long”

Splitting PDFs into single pages using Automator

Every quarter at Mozilla managers get an automatically generated PDF report that we need to split into single pages.

The first time, I did that with Preview.app… dragging each page out. Slow, but reliable! It was only two pages, so it’s doable.

The second time, I automated it, using THE AUTOMATOR!

This app was introduced in 2005 in Mac OS X and I’ve never actually used it for good. Well, I’m glad I finally found some good use for it, as these reports are getting longer and I would rather spend my time on something more interesting than dragging thumbnails around 🙂

So, instructions if you don’t like watching videos:

  1. Open Automator
  2. Create a new workflow
  3. Select Library… Ask For Finder Items… double click to add it to the workflow
  4. Select PDFs… Split PDF
  5. And RUN IT, using the bottom on the top right!

It will ask you for the PDF you want to split, then it will split it in pages and place it on the Desktop.

You could get fancier, and you probably still need to rename the individual files, but I haven’t researched that bit yet.

Happy (and fast) splitting!

Millenials are ruining web development!!

I read this post from CSS Tricks that lists a number of “CSS utility libraries” with curiosity, which quickly turned into a mixture of confusion, panic and disgust, with each new example of CSS class names you would use with these libraries.

Let’s look at some of the class names; highlights are mine.

  • d:i-b f-w:700 p-x:3 p-y:.7 b-r:.4 f:2 c:white bg:blue t-t:u hover/bg:blue.9
  • mw9 center pa4 pt5-ns ph7-l
  • f3 fw1 georgia i
  • flex flex-wrap items-center mt4
  • tcg50 ft10 fw3 mb2 md-mb3
  • display-title color-white
  • pad-1-bottom text-blue border-bottom marg-3-bottom
  • bgr-green text-white grid-3 s-grid-12 pad-2-vert pad-1-sides
  • constrain-md md:constrain-lg mx-auto pt-24 pb-16 px-4
  • fontSize-xxxl
  • xs-col-12 sm-col-9 lg-col-10 sm-offset-3 lg-offset-2

These frameworks claim to use humanised classes that will make your development faster. But…

  1. Where is the separation of concerns? Did they not get the memo about not including font names, colours, and other visual attributes in the HTML? What if they decide to change the headers’ colour? Then you need to change all headers to go from class=”white” to class=”orange”, etc? Your development is going to be “fast” for a moment, but once you start having to maintain the code you’re going to regret this brilliant idea.
  2. There’s nothing human to using those classes. They are a step away from being a domain specific language… a programming language. Humans do not use programming languages to communicate between them (much to the chagrin of some “humans” who would like otherwise).

I can’t believe it’s 2017 and we still have to see this (let alone argue about it).

I guess they didn’t see the <p style=”color: red; font-family: Times New Roman;”><i><center>Old times</center></i></p> when we had to write crap like that not because we wanted, but because that was the only way. And oh how happy we were when we could take all that formatting out of the mark up and put it into a file and not have it scattered across all the files in the site, interspersed with the content. Ah, the audacity of youth…! Millenials are ruining web development! Groar! 👹

But if that wasn’t enough for you to disturb your calm on this fine Friday morning, here’s this excellent example of deeply offensive CSS, except we need to look at the class and the HTML tag to get the full kick in your ancient guts feeling 👟💥👵🏼:

<a href="#" download="" class="button button--secondary xs-mr1 xs-mb1">

If they want a button that looks and acts like a button… why… don’t… they… use… A <BUTTON>???!?! 😱

Please don’t do this. It’s not good for anyone–neither users, neither future developers that have to pick the maintenance after you were ‘clever’ and ‘humanised’ the code.

Or maybe it’s an ironic version of 90s vintage code, hipsterised. That must be it 💁🏻