Impressions from 2017 - Day Two

Here are the bits and pieces I learned from the talks I attended at the second day of JSConf 2017 in Berlin:

Applying NASA coding standards to JavaScript

“Would you fly in a plane with an HTML and JavaScript instrument panel?” was the question Denis Radin asked at the beginning of the talk. While he is hopeful that improving the overall quality of JavaScript code may lead some day to the browser being the “universal GUI”, I remain skeptical for aviation, space exploration and other mission-critical systems that need real-time performance characteristics and high fault tolerance. We’ll see.

The 2nd part of the talk was more interesting, where he applied the code rules to JavaScript development. I had expected the rules to be very restrictive, but as he “translated” each rule - because some were clearly written with C code in mind - it was mostly stuff I already knew from the “Clean Code” screencasts and books by Robert C. Martin.

A blog version of the talk can be seen at The original coding standard, with more than 10 points, can be found at

The Past, Present, and Future of JavaScript Date and Time APIs

The talk introduced some delightful WTFs from the date handling of JavaScript: Rollover of dates (Date(2017,1,31) is the 3rd of March), 0-based month handling, dates always in the local time zones, etc. Historically, the JavaScript Date class was modeled after the Date class of Java 1.0, which was deprecated shortly after Netscape standardized ECMAScript. Matt Johnson then presented four JavaScript libraries that make date handling, date math and time zones a bit less painful: moment, Sugar, date-fns and js-joda, the latter is a port from Joda Time Java library He announced that there are early stages of a proposal for date/time handling in future versions of ECMAScript.

Source maps through the looking glass

I knew beforehand that source maps could be used to display original ES2016 or SCSS source when looking at the compiled source in the browser dev tools. What I learned was

  • How the compiled code can link to source maps:
    • with a //# sourceMappingURL= comment in the compiled source
    • with a SourceMap: HTTP header.
  • How the mapping between rows and columns in source and transpiled file is encoded. We got a short introduction to the Base64 VLQ format.
  • That other tools like the error log collection software Sentry can also use source maps.

The ethics of the Internet of Things

This was a timely reminder that even when the security of your IoT devices is not abused, the data they collect may still have unintended consequences because it can be used against their owners. Institutions of all three branches (police, politics, judical system) trust technology more than people, even when the sensors are not infallible. My take on this: “Everything you track can and will be used against you.” German “Datensparsamkeit” is a good thing.

While the trolley problem is a synthetic dilemma that is wrongly applied to self-driving cars and AI, the question of who’s liable for the actions of self-correcting/learning (semi-)autonomous systems is not answered yet. Is the owner of the system liable? The provider? The programmer? No-one, because no one could reasonable foresee the system behavior? Great inspiration for a dystopic novel/short story where companies can skirt any liability whatsoever by making everything “smart” and unpredictable.

Emily Gorcenski also gave practical advice to developers:

  • Set expectations with your boss
  • Talk frankly with your coworkers what they would and wouldn’t do.
  • Prepare to say no
  • Know your values and lines you’d never cross. Know them before you come into a situation where you might be required to cross them.

My gender is emoji pizza unicorn: shipping expanded gender options

This talk was more an account of the experiences of Tilde Ann Thurium at Pinterest than a general “how to present gender in forms”. None the less, the description of the journey and the design examples were helpful. It’s the little things:

  • When people were presented with the option to leave the “Male/Female” fields blank, signups increased.
  • Displaying symbols of nonbinary sexual preference is illegal in Russia.
  • Hover vs. click interactions can make a difference in engagement ratings, hover elements might unintentionally or unexpectedly obscure other elements.
  • Sometimes a good way out is to use gender-neutral language.

I was happy that the feedback she got for the changes was overall positive. I liked the sentence “You don’t do gender neutral forms because it’ll improve your core metrics, but because it’s the right thing to do.”

Calendar / Kalender / تقويم (aka, the fun of locali[zs]ation)

This was fun tour about what can go wrong with localization and date formats. Most memorable:

  • Brazil has five different time zones and only parts of the country observe daylight savings time
  • If you’re trying to parse split dates with the regular expression \W you’ll fail in Slovakia, which separates the date numbers with dots and spaces. Also, don’t confuse Slovakia with Slovenia.
  • If your cart element is small enough, currencies that display high numbers (like Indonesian rupia or Vietnamese dong) might get cut off and display the wrong number.
  • When troubleshooting, remember to gather as much data as you can, every bit of information can be helpful.

Short notes from other talks

  • Check out the [Google lighthouse extension](Google lighthouse extension) to get a report on possible performance improvements of your site.
  • Lots of stuff you have to know when using ServiceWorkers. The talk was really entertaining, try to find a video of it.
  • The quarterly State of the Internet Report can give valuable insights into what devices people really use and what connectivity they really have. Remember that more than 50% of worldwide web traffic is now viewed on mobile.