Keep Chipping Away

I wrote this blog post to go along with a lightning talk given at an internal Microsoft performance conference on May 20, 2019. When attempting to tackle performance improvements in a legacy JS single page application, it can be difficult to know where to start. First and foremost, I want to encourage you to keep chipping away. Profile, profile, profile with Chrome Performance tab in the developer tools. Also add performance events liberally to help you identify bottlenecks in the bootup and runtime performance of your application code. At Microsoft, I’ve worked for 2 years on improving load times for...…

read more...

Time Travel in JS

I’ve always been intruiged by tools that can help make debugging easier and more efficient. I’ve often wondered why I can’t step backward during code execution in the browser, the step forward button seems to beg a corresponding step backward button to match. This is a challenging problem when executing code because the state of the execution environment changes with every line executed, it’s very difficult to anticipate the differences and restore the previous application state. At Microsoft, they’ve been experimenting with a new Javascript core for Node called ChakraCore. I’ve had a chance to play with it and it’s...…

read more...

Reducing the Feedback Loop

As developers, it’s easy to get swept up in the hype surrounding a new tool, and new language, a new way of thinking about a concept, or programming pattern. Sometimes we spend a lot of time reinventing the wheel over and over and over again. It would seem to me that some of the adjustments I’ve made in my career that have paid off in spades are the ones I’ve used systematically through adjusting my tooling.

read more...

React Native

If you’ve had a chance to play with React Native, needless to say you’ve probably had a lot of fun, and been impressed with the overall workflow. Javascript is my primarly language, so React Native already feels like home, but the React style itself, is I believe the biggest asset for React Native. Usually, managing state in an application is one of the developer’s biggest jobs. We go through all sorts of backflips, keeping state on objects in instances, using methods to manipulate that state, and generally hoping that the state doesn’t change in any unintended way while the application...…

read more...

Simple JS Stream Class

A stream is an endless sequence of elements: somewhat like an unlimited array. Streams are useful for large sequences which need to be processed, and need to avoid dependency on fixed size. A very basic stream implements two methods: head() and tail(): Head gets the first element of the current stream, while tail gets the rest of the current stream without the head. For instance, you might use a stream to run an operation over the current element, and another operation to create the next element: var id = function(n) {return n}; var square = function(n) {return n * n};...…

read more...