Give TDD a chance


A lot of ink has already been spilt on the subject of TDD and how, why, when, where and for what reasons the methodology ought and ought not be applied. Nonetheless, I'd like to compose my thoughts on the subject, because, it is my humble opinion that TDD leads to a fundamentally better, happier place for software engineers. Note that I qualify that statement with "for software engineers"- managers, shareholders and spouses often have different priorities from those who are paid to press the buttons. But I myself am a coder. I like programming and I like to practice my craft well, effectively, but also kindly. Somewhat selfishly, I want to spend my working hours gracefully working the problem and that is not an unreasonable thing to want, given that we all spend decades at a time, laboring to enchant these infernal magic boxes to flip the right bits.

The Vainglorious Eternals Go Golfing


In a better world, such photos might still exist. The people in them would not have become nearly as rich or unaccountable or powerful as they are in this one, but there’s no reason to think that they would not have found each other in some refrigerated clubhouse or hotel dining room or breakout session or cigar bar. In that world, these men would not be any better than they are in this one, because they are what they are by nature—mutants of appetite and ego, and outliers from the rest of humanity in terms of both the depth and the breadth of their need. But in that other world, in which they are merely rich and terrible, they would threaten only the good times of the other people sharing those spaces with them.

In this one, though, these vainglorious eternals somehow shamble on atop the culture even in their curdling dotage. From that commanding position they do what they do—pursue their endless blowsy feuds, scheme and carp, watch television and go on television and, where the opportunity presents itself, blithely commit various high crimes and misdemeanors. Far above the struggle and insecurity of everyday life, these brittle titans squabble and gossip and go through acrimonious and highly public divorces; for all the ways in which the toxic runoff of inequality can currently be felt in the culture, the fact that the cheesy churn of rich and petty men drifting into and pissily out of each other’s good graces now so distorts our politics is among the most enervating. It is one thing to see so much of our popular culture narrowing and flattening to suit various billionaires’ crude and idle whims, but it’s something else to realize that the political life of the richest and most powerful country on earth is in large part determined by the spats and obsessions of a super-class of aged and lazy lords, all of whom consider themselves peers of each other and virtually no one else.

On the subject of the testing of machines


“The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed.” ― Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values

Unit Testing without dependencies


Unit testing forms the base of your tests strategy. It's the most granular type of tests- the testing of individual classes and functions. And in the context of the javascript world, where everything is a function, this means that you are validating that, for some function, given some known data, the functions returns something that passses an assertion. Most JS devs will reach for a tool like jest, jasmine, mocha or chai when writing tests, but that's not necessary. It really isn't. Node provides just about everything you need to roll your own unit testing framework with just a little bit of effort.

Duskers experiment


Here is a demo for a Duskers clone I made over the weekend. It uses a combination of code I borrowed copied from all over the place. I had at first implemented this with React but found inferno.js gave considerable performance benefits. Rot.js provides the procedurally generated levels, while the 2d field-of-view is a modified version of a fork of a typescript version of a implementation based on this article

A list of all my entries