Recent Posts


Node Interactive 2019 Quick Review


Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

Last week I had the good fortune to visit Montreal and attend the Node+JS Interactive conference, 2019 edition. It’s nice being able to attend a conference anonymously without the expectations that would materialize whenever I attended Magento’s Image conference.

These are just some quick high level thoughts on the talks I attended — if time allows I’ll come back and post video links when/if they appear.

Getting Started with gRPC and JavaScript

This was one of two talks made by Colin Ihrig — Colin does a great job of breaking down a complex technology and giving you the right chunks of information that will let you get started. Before this talk I was aware of the native module based grpc module for node, but was not aware of the pure javascript version implemented in @grpc/grpc-js or the intended-for-browsers grpc/grpc-web.

During this talk Colin made a few candid comments about the difficulty of getting the native grpc module compiled and working everywhere — my system one thinking brain thought this might be some anti-C/C++ bias, but as I’d learn later in the conference that’s certainly not the case.

Also — it’s interesting to compare the native module situation in javascript vs. PHP, given the similar-but-different ways native code is important to both these platforms.

How Node.js Bootstraps Itself: 2019 Edition

Keeping on the native code theme, this talk, given by Joyee Cheung, was exactly the sort of high level introduction to “what the heck even is nodejs” that I’ve been looking for. Compared to large frameworks in the dynamic language spaces (Symfony, Django, Ruby in Rails, etc.), C and C++ projects can often seem like sprawling messes where the boundaries between subsystems aren’t always clear. Joyee’s talk was a map of all those sub systems, and how they interact with one another.

Workshop: Build your First VS Code Extension

My first workshop, and a bit of a mixed bag. First — both workshops I attended just weren’t long enough. Presenters did what they could to jam in as much content as possible. I have no idea what goes into scheduling a conference, but I hope the organizers can give these workshops the space they need to breath.

As for the workshop itself — I was introduced to the yeoman project for the first time. Yoman’s a code generator that generates the default boilerplate for a number of other javascript projects, including Visual Studio Code’s plugin format. This workshop also introduced some basic concepts in the VS Code plugin API, but then took a turn into using abstract syntax tree to modify a user’s code in place. Given the limited time, and the fact I’m already familiar with abstract syntax trees, I would have preferred more time be spent on on the VS Code APIs. Regardless of my desires, presenters Nicolas Carlo and Florent Vilmart did a fine job presenting the material.

Introduction to libuv: What’s a Unicorn Velociraptor?

My day two started with another talk from Colin Ihrig — this time an introduction to libuv. This talk was the first time I really understood what libuv was about and for. Usually when peoplw write or talk about libuv and node they say something something event loop async — but Colin’s talk made me realize that a better introduction to libuv might be “it provides you cross-OS APIs that do systems programmer-y things, including asynchronous input/output.

This was also the talk where I realized my initial impression of Colin’s comments about the grpc native module were flat-out wrong — it’s pretty clear that a libuv core maintainer’s not going to have an anti-C/C++ bias (or if they do, it’s a pretty well informed one). There’s probably a lesson to learn about first impressions in there.

Like his GRPC talk, Colin laid out the fundamental concepts at work in libuv that would allow folks interesting in getting involved understand what the project is all about. He also shared an interesting story about libuv’s testing systems, and how the project was able to “cheat” themselves into much better code coverage by adopting the node project’s test suite into their own continuous integration system.

Broken Promises

James Snell’s Broken Promises talk contained a lot of useful information about ways promise code can go wrong in the real world, and how that can have disastrous implications for your program’s performance.The talk was, for me, hurt a bit by the character James was playing on stage — a lot of “why are people even doing this crazy stuff but they are”.

The longer I’ve been doing this the less and less resonance the idea “your/their shitty code” has for me. Yes, there’s a lot of code out there where the programmers clearly don’t have a full (or any) understanding of the API they’re using — but if you’ve worked more than a week in this business you’ve probably done similar things when faced with a deadline.

On top of that — one theme I picked up on during my time at Node Interactive was the gap between what node/javascript topics are mentioned by the tweeting classes and the actual practice of being a javascript developer. Promises and async are not well understood by a wide swath of folks doing javascript development today, and as convenient as it is to shift blame for that to the end-user-programmers, I think the blame ultimately lies on the design of the APIs themselves and how the community at large underplays the non-obviousness of async programming in general.

GraphQL Simplified

I wrapped up the conference with a workshop centered around the newish graphql-hooks package, which was also a stealth “here’s how React hooks work and why you should use them instead of redux” talk. As I’d only ever heard of hooks and redux via random tweets and my understanding of React is “oh it’s a javascript class that returns HTML that’s not really HTML but React turns it into HTML really fast” this was a pretty fast paced crash course for me.

The redux/hooks transition (or whether it is a transition) is another undercurrent that ran through the conference this year. From what I’ve gathered both these projects are systems for managing your component’s state — i.e. if you’re wondering where you stick your ajax/service/https calls to fetch state and then assign that state to your React component, these projects are for you.

In addition to the usual “new hotness” vector of anything in the javascript world, apparently the hooks project also won’t work with javascript class based react components — they’ll only work with constructor function based components. This class vs. function debate was the third big undercurrent I picked up on at the conference.

The workshop was useful to me, but (like the other workshops) suffered from a lack of time. Presenters David Clements and Matteo Collina made the best of it though and I’m looking forward to them taking their two man show onto the vaudeville circuit.

Copyright © Alan Storm 1975 – 2021 All Rights Reserved

Originally Posted: 16th December 2019