The Better Parts of Javascript @ Bigcommerce San Francisco

Bigcommerce SF had the pleasure to host Douglas Crockford for our first tech talk in our new SF office on 2/3. Douglas is a guiding voice in the Javascript world with his no-nonsense approach to development by utilizing “The Good Parts” of Javascript, made clear by his best selling book Javascript: The Good Parts.

The event was open to the public and we had 100 seats available for guests with pizza and a nice Scrimshaw brew on tap. The stage was set (we actually have a stage) and the talk started with the Crockford humor that is notable in his other works.

Douglas explained the groundwork that led to him writing the Good parts and the mistakes that he made that lead him to develop JSLint. After the release of The Good Parts, he compiled a list the arguments he received that went against the good parts.

  • Just a matter of opinion.
  • Every feature is an essential tool of the language.
  • I have a right to use every feature of a language.
  • I need the freedom to express myself.
  • I need to reduce my keystrokes
  • It is an insult to suggest that I would ever make a mistake with a dangerous feature.
  • There is a good reason those dangerous features were added.

Danger Driven Development (DDD)

We then heard about Danger Driven Development using the dangerous parts of JS such as ASI (Automatic Semicolon Insertion), Global Scope, == instead of ===, among others. You may find certain functionality of your code will not always behave in the way which you believe it should. That is what the good parts and the better parts are all about. When you can identify practices and patterns that cause you to practice DDD, it will make it easy to remove them from your workflow increasing your chances that you will not be affected by that pattern again.

Better Parts and ES6

Douglas spent a good amount of time laying the groundwork for talking about the new Better Parts of JS and ES6. It was great to see what he identifies as his list of “Better Parts” and gave a short description on why he identified it as a better part.

  • Proper Tail Calls
  • The Ellipsis
  • Proper modules built into the language
  • The let keyword that allows variables to have block level scope
  • Destructuring
  • WeakMap

He also discussed a few of the new Bad parts that are coming in ES6 as well.

  • class
  • Arrow function expression (referred to as the fat arrow) (name) => {id: name}

The Next Language
This part of the talk is where Douglas really focused his attention in what he wants to see in the next language after Javascript. He believes in a two tier approach to languages, having a systems language and an application level language. The application language having much more abstraction away from the bare metal of the machine.

The wrap up
Douglas also spoke extensively about the technical details of some of the new features, expounded on the bad parts of integers, and spoke about features that he would like to see in the next language such as a single number system, dec64 . We ended the talk with learning about JSON, the recent popularity boom and overtaking XML. He also gave advice to data format standard designers.

  • Don’t break JSON.
  • Make it significantly better.
  • Get a better name.

Douglas finished with the most insightful advice to all of us as well, Don’t Make Bugs and he also made time to autograph and chat with his fans!

Overall, it was a fantastic night at Bigcommerce SF! We made new friends and everyone greatly appreciated Douglas taking the time to come share his advice, stories, and insight with us for an evening.

Douglas Crockford w/ Bigcommerce SF Front-End Engineering Team