Ravi Mohan writes about software engineering practice, including test-driven development, design, and enterprise software.
HN links it for his summary of the TDD Sudoku case comparing Ron Jeffries' and Peter Norvig's solvers, used in arguments about upfront design.
I have mixed feelings about this.
On the one hand, the peer review system was designed specifically to keep out the low-quality material that blogs let through for free because of their more inherently democractic nature; I can't be the only one who thinks many people who blog (and even some who appear on HN) are not presenting useful enough or clear enough material to be worth reading by any audience. People's lives are finite and time spent reading published work that is useless detracts from time spent reading useful work that helps in one's own line of inquiry.
Smooth talking bullshitters like Ron Jeffries who promote objectively useless or even counterproductive methods abound, taking bandwidth away from more useful ideas. You need only remind yourself of this exchange:
http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html
http://pindancing.blogspot.com/2009/09/sudoku-in-coders-at-work.html
It will be sad the day a Ron Jeffries of the academic world wastes as much of other people's time reading his posts.
But has that day come already? On the other hand, it's not like the peer review system is immune to gaming and corruption either. We've got people chopping whatever work they've done into least-publishable-units and objectively good work being ignored because it is not like the other peer-reviewed work out there. And since most people working in a scientific field have not also gone through educating themselves against bullshit techniques (i.e.,…
“OOP” is one of those terms (like most terms) that have a narrow meaning and a broad meaning, and either proponents or detractors can use one of them in arguments:
• OOP, narrow sense (emphasis on “object”): data-with-associated-functions, encapsulation, etc.
• OOP, broad sense (emphasis on “oriented”): organizing your program around objects that model the nouns in the problem domain, “everything is an object”.
A (satirical) illustration of the latter is in the first few paragraphs of https://caseymuratori.com/blog_0015 (from 2014), which gives an example where, to write a payroll system, you first start by designing classes for “Employee”, “Manager”, etc.
A (non-satirical) illustration is in the infamous “TDD Sudoku” series of blog posts (follow the links from http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html or https://news.ycombinator.com/item?id=3033446) where (in contrast to Norvig's program which just solves the problem) the TDD/OOP proponent ends up with a “class Game”, “class Grid”, “class Cell”, “class CellGroup” (with derived classes “Row”, “Column”, and “Square”), but ends up nowhere. (From Seibel's post: “…got fixated on the problem of how to represent a Sudoku board. […] basically wandered around for the rest of his five blog postings fiddling with the representation, making it more “object oriented” and then fixing up the tests to work with the new representation and so on until eventually, it seems, he just got bored and gave up,…
Are you surprised by that? The 10x longer statement doesn't surprise me at all. If you ask someone, "Please implement a Java class that has the following methods and behaves like this" you might expect any competent programmer to finish within ~3x of each other.
But given some more nebulous task, where architectural decisions must be made and serious research and testing needs to be done, it's not surprising at all. For example, if you asked someone, "Please write me a library so that I can send and receive XMPP messages," I would expect a large number of otherwise competent programmers to make a significant number of false starts and poor decisions, and generally take much more time than the guy who has experience writing libraries and interpreting text protocols. For example, consider the case of Ron Jeffries and Peter Norvig writing a sudoku solver[1] (this example is a perennial favorite of mine in all sorts of discussions).
And I don't think anything is "very seriously wrong" with this situation. Different skillsets and competence levels result in drastically different results. I think this is true of any profession that is largely about creative problem-solving: some can do it efficiently, some cannot. Programming is just a unique case because there are so many people trying it and not being deterred due to poor performance because there is such a demand.
[1] http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html
Is this actually a new phenomena? I remember when I started programming c. 2000, the big-name programming gurus were folks like Kent Beck, Ward Cunningham, Uncle Bob, Ron Jeffries, Dave Thomas, Joel Spolsky, Jeff Atwood, Martin Fowler, et al. While some of them mostly knew their stuff, some were outright hacks (Peter Norvig's vs. Ron Jeffries' attempts to create a sudoku solver is one of my favorite examples [1]). Most of their names wouldn't be recognized by someone just getting into programming now.
As I've gotten older, I've learned that there's often an inverse correlation between how good a programmer is and how likely you are to have heard of them, because the folks who get good at programming are actually programming and not writing blog articles about programming. Most of the latter are really content marketing, trying to drum up business for consultancies, and so you should treat them as advertisement rather than advice.
[1] http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html
Bad programmers are going to make a mess of things no matter how many tests you have. More often than not I see tests as needlessly solidifying the architecture prematurely.
More often than not I see TDD yielding horrible, terrible software architectures and at that point you do need tests to maintain the resulting mess. TDD somehow assumes emergent architectures and I know from experience this is the worst way to architect something.
NPM for example is full of well-tested libraries with poor architecture and bad usability (could be why everything is reinvented every 6 months) but I wouldn't call that a success story.
I'm willing to bet the bug reduction from the extra time upfront doesn't come from doing TDD but actually thinking about the requirements and how they fit the larger picture.
I really like the following story to illustrate this point:
http://ravimohan.blogspot.ca/2007/04/learning-from-sudoku-solvers.html
This process would be satisfied with a linear search. To even just see that there is a log n algorithm in the case where the input is sorted, you need to think analytically about the problem and its solution.
Suppose the problem is presented with runtime constraints for some sufficiently large test cases, such that this difference in performance matters. Even in that case, what are the chances that a TDDer who is unaware of the binary search algorithm will stumble on the correct solution, while never looking beyond the next test to be satisfied? In the small cases, the difference is not discernible. I suggest that to be successful, one must think analytically about the problem, and code to the insights revealed by that analysis, in addition to the specifications themselves.
A lot of problems are like that - e.g.:
http://ravimohan.blogspot.com/2007/04/learning-from-sudoku-solvers.html