The Pragmatic Pragmatic Programmer
rchaves.app
rchaves.app
Similar exaggerations and mischaracterizations pollute the review. I could go on but it is too infuriating. Delete this.
People don't want wild forest of ideas they want neat cultivated gardens with very high walls.
It's a meme. On imageboards, Discord etc it is commonplace to post a funny image, usually of a cute character, with a gun, and the "delete this" caption. Doing an image search should show it. So instead of this feel, I think the intent is to show the comment should not be taken too seriously (so the exact opposite of your reaction).
There was recently a heated debate about the right to use the word "normal" in mathematical context. Aggressiveness is a relative concept...
There’s a Jonathan Coulton song from the TV show “The Good Fight” about how memes can evolve online:
At first it’s just a meme,
Then it’s a joke about the meme.
The joke is that it’s fake,
It’s not as fake as it may seem.
Confusion when they use one,
And it seems like what they mean.
And then, ta-da, a cartoon Nazi frog![0]: https://keepmeme.com/files/en_posts/20200827/cdde1a7320d0827...
Also, it's not "my opinion". It is a incontrovertible fact that he misrepresents the content of the book.
I should know because I was like that before I read the pragmatic programmer.
"broken windows". The book uses the turn of phrase, but does not (unless maybe in the original edition? I have the 20th anniversary one) actually quote the debunked theory beyond this phrase. Take it as the turn of phrase that it is, no need to read more into it than is present. If you don't like it, consider something more like "if you see trash on the ground, pick it up, don't step over it." Though that's a heck of a lot wordier. But about the selective quotes, let's take the whole phrase from the book:
> Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. [emphasis mine] -- page 7
The emphasized part is what the reviewer didn't include. By only reading the first two sentences, sure it reads as a bit dogmatic. But reading the whole thing, it's clear that there is more to it. What does "board it up" mean? Well, they expand on it in the following sentences:
> Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation. [emphasis in original]
That seems pragmatic to me, "I can't handle it properly now, but I'll do something that reduces the problem or draws attention so it can be properly handled later." In the JIRA-driven world, put in a new ticket.
They don't prescribe one answer or one set of answers to the problem, except to address it. Which is pragmatic because leaving garbage in a system is a really good way (over a few years, anyone who has worked on long-running systems will have experienced this) to end up with a load of garbage.
At least this fix is quick, annoying though.
Citation 5 is an article from the Atlantic from March 1982 https://www.theatlantic.com/magazine/archive/1982/03/broken-...
Nobody thought to fix that for the 2019 edition?
Basically, you have a, reasonably, safe and disciplined process. You have controls in place for a good reason, but you relax them. Possibly for a good reason, possibly not, and nothing bad happens (at least not yet). This relaxation gradually becomes normalized (think about a safety critical system turning off alarms and leaving them off, "because they're always false alarms"). The odds of a problem occurring is increased by this relaxation of controls and potentially shifts from being "possible" to "inevitable" (in sysadmin stuffs, consider manual data entry at a critical juncture, a fat-fingered value can cause catastrophic problems when it could have been automated and pulled from a regularly reviewed data source).
It says there is a correlation between the number of broken windows and crime, that's not causation. Or were you making an attempt to illustrate the common misconception
That being said, there have been some great critiques of these books and it's kept me wondering if maybe I'm misremembering these books for what they were. Here's a critique on Clean Code: https://qntm.org/clean
Has it really been that long? Are these books really this outdated now? I saw a similar thread on Reddit recently and the alternative they recommended was this book... https://sandimetz.com/99bottles I've read only a couple of chapters, and I'm struggling to see why this book is so much better. Anyone have any opinions on this?
The danger with Clean Code is that a lot of the advice would work a lot of the time so it's very easy to think it's exactly on point right up until it guides you face first into a brick wall.
The claims of dogma are, in my opinion, grossly exaggerated and a consequence of people failing to read (or failing to comprehend) the authors' own caveats in chapter 1. If they didn't include those statements in chapter one, maybe I'd agree with you. I still wouldn't discard the text out of hand, because, you know we have brains and can think critically and read a text to evaluate it ourselves.
(I say "authors" because Bob Martin was the primary author, several chapters are written by other people.)
But, the author of this article seems to forget that this book is now over 20 years old and not everything written by Hunt and Thomas still holds true. But thinking about and trying to define how best to produce good software is an ongoing dialectic and one size doesn't fit everyone, some ideas reach their sell-by date. Pick the best bits and get on with the job.
Would I recommend TPP to novice developers? I've not read the 20th anniversary edition yet which apparently addresses how software development has changed since the original publication so my verdict is out on that question.
The article author doesn't make it clear which edition of TPP he's criticising, but if it's the original edition then I think he's unfairly beating a dead horse.
Putting so much emphasis on variable naming, to take one common theme from Code Complete, Pragmatic Programmer, Clean Code, et al, makes a lot more sense coming out as a reaction against some of the worst excesses of Hungarian notation.
They just aren't the kind of revelation that they were 20 years ago, in part because they've been so successful at molding multiple generations of programmers now.
How short is too short? How large is too large?
On a shallow for-loop, i and j as variable names is perfectly acceptable and probably desirable - it conveys their meaning in a very concise and familiar manner.
On the other hand, if you're writing a function that's a little outside of your codebase's core areas it might make sense to name things a bit more verbosely and perhaps (the horror) add comments explaining in more detail what those data containers are supposed to hold.
Underlying this is the idea of a Patterns Language for programming: the idea that specific problems can be categorised into general problem shapes, that a satisfactory solution that fits the shape can be named, and that communication is aided by discussion involving those names. The idea of the patterns language is still very much relevant today. Whenever a developer says “this can be a redux saga” or “we’ll use serverless for that”, they are naming a general solution that they believe fits the shape of their specific problem.
I don't know about that. I just finished cleaning up a codebase where my predecessor named literally any response from any API call "tempJson", regardless of how many hundreds of subsequent lines ended up using it. Some of these "tempJson" variables would get passed to other functions with the parameter also being named "tempJson" or "json". It was nightmarish. I wish this programmer had read and applied the principles in The Pragmatic Programmer, but he hadn't.
I suspect it's not that the context has changed such that the book is unnecessary, it's that most of us have forgotten that many of these principles aren't obvious to newcomers.
The exception being startups that are still in the phase of attracting dreamers that are going to change the world.
The whole review just drones on and on about why the book should not be opinionated about coding practices not realising that the books of this genre are useless without strong opinions.
No true pragmatic programmers would waste time minimizing technical debt, they will always take the simplest path.
I don't even use the term 'fixing broken windows' for programming, I use the term 'repaying tech debt' . That's pretty universally seen as a good thing, if not without difficult tradeoffs in real world business software eng.
There's a fair bit else that's off in this article and it's quite an uncharitable reading of a classic book. There are no sacred cows but PP doesn't warrant a hatchet job.
> Pragmatic Programmer: we will never switch databases.
In other words, the blog author is saying "I don't have much software experience." I used to think I'd never switch databases too, until I built a very large system and had to switch databases.
The abstraction portion also gives a tester the ability to see if what comes in, is what needs to come out, without reliance on additional hardware and other sunk costs. A simple example is a currency/bill validator. These are expensive pieces of hardware, and not needed to verify other portions of the system, but a module for that device can be emulated.
Next, it appears he hasn't read the book Pragmatic Programmer, or the book went over his head. "Don't live with broken windows", "Make it easy to reuse", and "Decoupled code is easier to change" are three hallmarks of the book. All three are in contradiction to his article.
If you haven't read the Pragmatic Programmer, I highly encourage you to read it. It is a required read in my company.
It's a good summary of the article. All of the time is spent trying to frame the book in a way (non pragmatic) and the author of the article in another (pragmatic). Articles like that usually have little to no value. At most, 5% of the book has been covered in the article, and that seems to be enough to reject everything.
We leave the window broken because fixing it takes effort away from fixing the overflowing sewage or the dangerous roof.
If you have time to fix the windows, then someone has hired enough coders to fix the sewers and has time left over. That's a nice position to be in.
Work to be in that position.
It may be that you should build your buildings from open, pre-fabricated material :-)
Never mess effectful stuff with pure stuffs, it will hurt you soon.
Yet, even though I found the old version very influential and a great read at the time, the updated version feels a bit quaint for me. Especially because it uses old metaphors. The author mentions the "Broken Windows" Theory. https://en.wikipedia.org/wiki/Broken_windows_theory Especially as it moved towards Stop-and-Frisk in NY, I would not use it in a technical book today: https://www.npr.org/2016/11/01/500104506/broken-windows-poli...
Another one is the "Boiled Frog" from Topic 4:
"We've never tried this—honest. But “they” say that if you take a frog and drop it into boiling water, it will jump straight back out again. However, if you place the frog in a pan of cold water, then gradually heat it, the frog won't notice the slow increase in temperature and will stay put until cooked."
The same as with the broken window, it's just not true: https://en.wikipedia.org/wiki/Boiling_frog
It makes it hard for me (personally) to use the lessons of the book (cognitive dissonance ... "wait but a frog would jump out" ... ). Given the work that went into the anniversary book, I am wonder if the authors could not have found better fitting metaphors.
Edit: clarity + typos.