The day the .dev gTLD died

Few things are as "fun" as an untouched development environment rendered non-working after coming back from a week-long holiday. A brief but intense session of searching for the broken cog in the machine ensued, finally unveiling the issue; we use a .dev TLD in our local environments.

It turned out that on Sep 16th @lgarron added .dev to the static HSTS list1 in the Chromium project, forcibly telling the Chrome Canary2 browser to only request anything on a .dev website using https and only https.

While I'm a big fan of HSTS, the usefulness of the exercise eludes me, seeing how .dev isn't available for public consumption, but wholly reserved by Google for private use. (It could of course also be a sign that it's on its way into public use. Also, it really shouldn't have ever been assigned, but whatever.)

It could of course be just me (or us, really) who's clueless, as its use was "considered harmful" already in 2015.

1 chromium/src/net/http/transport_security_state_static.json

2 AFAIK the list is used by many browser vendors and thus other browsers are bound to follow suit at some point

London Calling

Siinä minä olin, bussipysäkillä. Minä, matkalaukku ja baareista kotiutuva Kallio. Kotiin olin minäkin matkalla, se vain sattui olemaan vajaan parintuhannen kilometrin matkan päässä, Pohjois-Lontoossa.

Kaikki alkoi noin puoli vuotta aiemmin. Tarkkaa päivää on hankala määritellä, mutta jossain välissä aloin hyväksyä rekrykonsulttien kontaktipyynnöt LinkedInissä. Taustalla oli vuosia takaraivossa kytenyt ajatus ulkomaille lähtemisestä. Asetin itselleni tavoitteen vuodelle 2016: työhaastattelu Suomen rajojen ulkopuolelle.

Loppuosa tarinasta kiteytyy englanninkieliseen sanontaan: Be careful what you wish for, lest it come true. Alkuvuodesta sain yhteydenoton joka normista poiketen ei vaikuttanut silkalta automaatiolta. Vastasin siihen ja noin kuukautta myöhemmin, usean sähköpostin ja yhden Skype-haastattelun jälkeen, matkustan vaimoni kanssa ensimmäistä kertaa Englantiin. Matkan tarkoituksena on paitsi viettää päivä mahdollisten tulevien työkavereitteni seurassa, myös tutustua Lontooseen, kenties tulevaan kotikaupunkiimme.

Viikkoa myöhemmin hyväksyn työtarjouksen.

Tänään on kulunut päivälleen vuosi siitä kun matkalaukkuineni nousin Helsingin Sörnäisissä bussin kyytiin. Vaikka elämä on sen jälkeen raiteilleen asettumisen myötä arkistunut, matka tuntuu edelleen yhtä jännittävältä ja kiinnostavalta kuin siinä bussipysäkillä.

Native CSS Variables Are Golden

If you read Philip Walton's blogpost Why I'm Excited About Native CSS Variables, you, just like me, would also be, or at least you should be, excited about native CSS Variables.

Until now I have been using postcss-custom-properties, but never before realised how much gold we're still missing out on when we can't utilise media queries, inheritance and the cascade in combination with CSS variables.

Native CSS variables today are available only in Firefox. They are under development for Chrome and Chrome Canary has them as an experimental feature1. IE Edge is considering them2. Safari seems to have some interest and is showing recent related work but the feature is absent from the WebKit Feature Status page. Opera is keeping quiet.

The specification is currently at the Candidate Recommendation stage. Make your voice heard and wake up all the browser vendors.

1 Enable Experimental Web Platform features in Chrome by going to chrome://flags/#enable-experimental-web-platform-features and clicking the Enable link

2 Vote for CSS Variables at UserVoice

3 Cleanroom implement Custom Properties

Complement Git Stash With Commit And Soft Reset

One of my favourite Git tools is the stash. However, it doesn't always quite fit the bill. E.g. you notice you need to amend a commit in your history, but stashing everything would lead to solving umpteen unrelated conflicts during a rebase update. Instead I like to store everything irrelevant for the amend as a stash-commit, then stash what I need to bring along.

The Three Step Workflow

  1. git commit -am "stash", i.e. commit everything (you want to stash) into a stash-commit
  2. do your work, usually involves rebasing and/or working in other branches
  3. git reset HEAD^, i.e. reverse the stash-commit from stage 1

Stash Can Do That

The same effect (or very similar) can be achieved with stash save --patch, but I find a stash-commit is often quicker and simpler. Personally, I also like that my stash-commit remains in the branch, whereas stashes are global.

Stashes are also much too easy to forget, and even if you have the option to name them when using stash save, I rarely do, which leads to not remembering what's been stashed if it's more than minutes ago.