See the entire conversation

[Thread to respond to some common questions I get about my super boring coding style. This isn't the "right way"… just ~a way~ that works well for me and maybe you too.] The thesis: be as fast as possible by using as little as possible to do as much as possible.
12 replies and sub-replies as of May 14 2018

Concretely: most of the code is functions. One per module (ideally) so no need to guess what this file does. Functions accept named params via a plain object and an optional callback. If no callback is supplied return a promise. **You can now navigate most of my code.**
All functions should either continue via callback or return. Easier to reason about flow. In the function guts I try to validate params and throw if it doesn't like what it sees: that is a programmer error and crashing early is a service to future me (and others).
Ideally functions are sub 200 LOC …and that's about it. I *mostly* avoid all forms of state and especially `this` and `class`. Still coming to terms with production use for async/await; mostly it's just nice for readmes (the consequences to error handling are too severe imo.)
Sooo yep, super boring…but faster to deliver! Boring code is faster to author and far easier to maintain than exciting code. Exciting code takes longer to write, longer to build, harder to debug and maintain.
This is not to say I have a boring job! there is nothing more exciting than delivery! The first things you should deliver btw: lint, tests, CI/CD and a readme that describes why this thing exists, how to setup the tests and how to deploy it.
This approach of opting out is super common secret of older programmers. We tend to say no. Not to features (ok ya we do that too) but moreso to ceremonies without substance. We gain speed through an economy of motion and doing more with less.
We choose to do things on easy mode leaving as much of the tools, frameworks, syntax, compilers/transpilers behind until they too are suitably boring or absolutely necessary to achieving the software goals. * * * That's it: my praise of boring code. Thx for listening!
This is almost exactly what I’ve been doing for years.
there are MANY of us…I suspect we're a mostly grumpy quiet majority that doesn't want to waste time arguing about the transformation of productivity that syntax X and/or framework Y provides when we could get that endorphin hit from shipping.
Couldn’t have said it any better myself.
Awesome stuff, dude!
🙏😅 thx, tbh I was super concerned this wasn't going to go well… lol