I was only looking for some decent JavaScript static analysis tools when I stumbled across an absolutely superb article dealing with Code Smells and Refactoring Patterns.
I was only looking for some decent JavaScript static analysis tools when I stumbled across an absolutely superb article dealing with Code Smells and Refactoring Patterns.
The first thing that struck me about it was the language used. So many articles on subjects like this use what seems like deliberately obtuse language (looking at you Mr. Martin with your SOLID Principles). Others try so hard to break down the barrier to entry that you quickly get bored with their painstaking explanations of the patently obvious.
This article is neither of those things. It written with precision, it's some of the most concise and clear technical writing I've ever seen. A delight to read.
The article takes each individual code smell and gives it a clear concise name (the design pattern people would just love this) and describes the situations where it could occur during normal development.
It then goes on to not only offer suggestions for refactoring but also, in many cases, some reasons why it might not actually be a smell at all and why it shouldn't be considered for refactoring.
Each refactoring is then given a (excuse my repetition but this is part of my delight in reading this article) clear a concise name and is accompanied by not only what the payoffs might be but also what costs the refactoring could incur.
The whole thing is also accompanied by (no offence intended) rather childish cartoons which do a really good job of illustrating the points raised. And aren't just there for decoration.
Have a read for yourself: https://sourcemaking.com/refactoring/smells and see what you think.
So much software engineering content online tends to focus too strongly on understanding the syntax and idioms of just one programming language.
Don't get me wrong, a world without Matt Pocock, Arjan Egges and Jacob Sorber would be a darker place.
But material like this this is applicable across multiple languages and, to some degree or another, multiple paradigms is truly golden and will stand any programmer in good stead for years to come.