8 ms·
The Cult of Best Practice
- iandev 6y agoI can't say that I agree with everything in the article, but "The Way Out" is certainly something I can get behind. There is great value in understanding where "best practices" come from and what problems they solve. I think it's easy to see there is an issue with mindless pattern following.
- spaetzleesser 6y ago" There is great value in understanding where "best practices" come from and what problems they solve. " I think this is really important. A lot of today's "innovators" and "disruptors" are just too lazy to study and understand the current state and create a mess that way. I think software development would be in a much better state if we didn't constantly forget and relearn old lessons.
- boberoni 6y ago> The first step is understanding where they come from and what problem they solve. > The next step is to make our own mistakes and learn from them. ...The trial and error learning involved gives us knowledge much deeper than what we would gain by following the rules. As a learner, I find best practices to be a very useful starting point, which the article mentions. As a mentor, on the other hand, I've struggled with how to provide "best practices" that are short and sweet, but still convey some of the hidden trade-offs. I write docs for a few public libraries and some users just want to get up and running quickly. They don't have time or want to go through trial/error and explore the nuances. Maybe there should be a greater burden for the givers of advice to acknowledge the trade-offs in their "best practices. Then again, answering a question with "it depends" can be a big turn off to some people, to the point where they stop listening/reading and look elsewhere for help.
- domk 6y agoI think there's a difference between "getting up and running quickly" and "presenting something as a silver bullet", which is the problem with some best practices. You can (and should!) make getting started simple and easy, but there should be next steps that gradually explore the nuances and the background.
- Geminidog 6y agoBest practices are basically a sign of an area that lacks formal rigor or scientific analysis. You don't see any "best practices" for making algorithms faster or more memory efficient. We have complexity theory that tells us the metrics definitively. This just means for algorithm complexity formal rigor has been established. For areas where we use the word "design" or "best practices" or "code organization" it's mostly people just randomly guessing things because there's no quantitative metric to tell people whether or not a guess is actually better or worse. What's the Big O of FP vs. OOP? Who knows? Nobody is clear about what is being measured here. What makes a "bad design" bad and what makes a "good design" good? Once we figure it out you will see that the word "design" will largely exit the field and be replaced with something along the lines of "calculation." It is better to "calculate" the best way to organize code rather then to "design" it because the word "design" is a synonym for "random best guess". The lack of formal rigor or some statistical metric means we can go into circular arguments about these topics forever.
- unanswered 6y agoThis puts into words why I get momentarily annoyed whenever I see a programming help type question like "what are best practices to call a function pointer" or some such. The question implicitly suggests that there's no definite answer when in fact it's simply a question of fact, a knowledge question not a wisdom question. I feel that the person asking the question is somehow trying to shield themself from the "shame" of not knowing the answer by framing it as a request for discussion.
- boberoni 6y ago> formal rigor or scientific analysis This may be a bit philosophical, but couldn't "formal methods" and the "scientific method" also be considered a best practice? (and thus susceptible to becoming a cult?) Throughout the history of science, there has been many methods for doing science that have since been revolutionized or abandoned (e.g. cosmology, non-Euclidean geometry, eugenics, quantum mechanics). Thomas Kuhn is a notable writer on such paradigm shifts in the history of science. [1] [1]: https://en.wikipedia.org/wiki/Paradigm_shift https://en.wikipedia.org/wiki/Paradigm_shift
- didibus 6y agoA "Best Practice" is "best" given a context. This means by definition "Best Practices" will tend towards "Average Practices" as the number of contexts they are used in grows to infinity. This is what people have to realize, when you put in place "Best Practices" you're doing something that is "average". To do something "better" than that, you need to specialize your practice for your given context. Unless you happen to have the exact same context from which the "best practice" originates from, chances are it is not optimized to your context. And even if you have the same context, time has probably gone by and more "practices" might have developed since that are even better to that context. Like the article says, you can only optimize to your context if you understand the pros/cons of each practice, so you can customize to your needs. I have definitely seen situations where developers push for "best practices" when the current practices are already specialized to the context, but because they are not the "best practices" from some internet blog, or famous book, the developers think the practices must not be the "best", in reality they are pushing for worse practices as they are pushing to de-optimize the practices from one context to some other context, bringing the team back to the "average". They lack the understanding and rationale to asses what is "better" or "worse" for their context, and that's why this happens, as they cannot reason about comparing their current practices against the "best practice" ones, thus simply believing in the social trends and norms over whatever the team had worked to specialize into. Now many times, a team will have below average practices in place, and that's when putting in place some "best practices" will help, as it drives the team processes up towards the "average" or better (given how similar or not the team's context is to the best practice).
- XargonEnder 6y agoI feel like, in practice, best practice just means "skills that help me interview well", because those skills are best for improving my quality of life.
- agentultra 6y agoI can't say I agree with much in this article. There are organizations like the IEEE which are publishing state of the art documents like the Software Engineering Body of Knowledge[0] that collect "best practices" together. The weakest arguments against best practices, to me, is a pedantic argument. There isn't a "best" practice there is only a state of the art. Structured programming in its infancy, for example, was not widely adopted and not considered in the state of the art until programming languages adopted its ideas and went into widespread use. During that time it was still the state of the art to write code with goto. Perhaps I'm alone in this but I don't think most people confuse, "It is best practice to avoid character requirements in validating passwords," with "this is the objectively best way to validate passwords." They mean, "this is the best way we know how," and are referring to guidelines like the NIST SP 800-63 publication on digitial identity management. [0] https://en.wikipedia.org/wiki/Software_Engineering_Body_of_Knowledge https://en.wikipedia.org/wiki/Software_Engineering_Body_of_K...
- Retric 6y agoAn old idea was programs could lean to read only code or write only code. The concept was making programs easier to work with took extra effort. Best practices in that context aren’t objectively better so it’s really not about state of the art. Rather their about understanding what you give up by doing something else. Goto’s can actually be really useful, their simply not worth it today. It’s a subtle yet important distinction.
- AnimalMuppet 6y agoBut that's always been the definition of "best practices". It sounds like your issue is not with the article, but with the term itself.
- sushisource 6y ago> Perhaps I'm alone in this but I don't think most people confuse, "It is best practice to avoid character requirements in validating passwords," with "this is the objectively best way to validate passwords." Unfortunately you have been quite lucky. The phenomenon of blindly following whatever some blog post said is all too real.
- vmchale 6y ago> Or take functional programming as another example. Arguably, about 80% of it is incredibly useful and makes for much better code. Taken to its ultimate conclusion in purely functional languages, things like doing I/O get a lot more difficult compared to strict languages. The author seems to be quite confused about functional programming.
- rhn_mk1 6y agoCould you explain?
- mattgreenrocks 6y agoThere's nothing wrong with pure functional programming that requires you to constrain effectful computations to certain source code areas. That other languages allow something as innocuous as `getName()` to also call `launchMissiles()` under the hood is wrong. Pure FP langs slapping you on the wrist for trying that is part of their value proposition. It's akin to saying, "why does C worry so much about memory allocation? It should know when I'm done with resources!"
- vmchale 6y agoWell, for one, "pure" and "strict" need not be opposed. You can have a strict language with an IO monad, and some people actually prefer that.
- nfrankel 6y agoYes, yes and yes! I've always wondered why most developers (myself included) prefer to follow popular opinions instead of thinking by themselves. This post just frames what I've experienced in two decades of working in IT.
- nine_k 6y agoBecause it saves time and effort? If you don't have enough expertise, you imitate those who do. As you gain knowledge, you can evaluate others' ideas, and then roll your own.
- throw14082020 6y ago> We need to encourage open-mindedness and independent thinking. "The Cult of Best practice" is just a symptom of mental laziness. You should understand why you're doing something while you do it. This doesn't come with experience (i.e. years in the industry), it comes with practice.
- cgrealy 6y agoAs a general rule: you (and your company) are not special. If you look at an industry way of doing something and decide it’s wrong, you should have solid reasoning to back it up. I’ve seen so many companies decide that they have some unique requirement to do X that every other company out there doing X doesn’t have. It leads to reinventing the wheel, but generally in a worse way. All that said, the most dangerous words in engineering are “because we’ve always done it that way”.
- 1_2__4 6y agoCounter-argument: A positively staggering amount of decisionmaking at a company consists of "look at what other, successful companies are doing and mimic them". It's cargo cult management by the very definition: they see the other people doing the correct incantations and bounty fall upon them. Clearly, we just need to utter those same incantations and we'll have the success they did. And I'd further counter that: yeah, actually, you and your company ARE special. Every company is. There is no One True Way of running a business, or any individual aspect of that business. Everyone's triangulating around resources, people, industry, corporate vision, etc. If anything I'd say the argument that "you are not special" is the fallacy, as it leads directly to the kind of cargo-culting that you see so many failed companies do. Finally, when we see successful companies, how often is it because they just mimicked what everyone else was doing? Not very frequently, as it turns out. Well-behaved companies seldom make history.
- ska 6y ago> Not very frequently, as it turns out. I don' think this is quite right - it's probably important to do something differently, but likely equally important not to do too much differently.
- 908B64B197 6y ago> Counter-argument: A positively staggering amount of decisionmaking at a company consists of "look at what other, successful companies are doing and mimic them". It's cargo cult management by the very definition: they see the other people doing the correct incantations and bounty fall upon them. Clearly, we just need to utter those same incantations and we'll have the success they did. They never do. I recall talking to someone who was very very happy to brag that his company was doing "everything just like Google" and following the exact same practices he read the company did on various engineering blogs. I asked him what was the compensation like and how he managed to get kids from Stanford to work at his company instead of their startups and he just gave me a blank stare. Said something about how they were not in Silicon Valley and paid median salaries and that he had "no trouble finding Google caliber talent in the local market." and that "it's not really the local market's customs to give stocks to coders". I think someone ended up buying the whole thing. Not the company but the office furniture they left after going broke.
- cccc4all 6y agoThe main question to these type of assertions, what's the alternative? There are natural patterns in business problems, so there are natural patterns in solutions, which can be encapsulated in best practices. Companies don't have the time or resources or development skills to come up with elegant, boutique solutions to every problems. Even FAANG companies with billions of dollars to throw at problems hit a natural wall. So, they resort to proven best practices to solve most problems. It's wise for smaller companies to analyze proven best practices and incorporate them as needed.
- npsimons 6y ago> The main question to these type of assertions, what's the alternative? > There are natural patterns You just named the alternative. We don't see people say "Singletons or GTFO!", we have a toolbox that we apply to problems as needed. "Best" practice implies there is one and only one "correct" way to do things. "Good practice" would be a better term.
- narag 6y agoThis article is well written, thoroughly analizes a real problem and hits the nail on the head pointing to the crux of the problem: that so-called best practices are really a social phenomenon. Just wanted to say thank you for writing this.
- bitwize 6y ago"Best practice" is what you are least likely to get fired for doing, which may not be the actual best thing to do. It's kinda like "enterprise". Originally the word implied a desirable goal and risks taken to achieve it, but "enterprise" software is aimed at businesses which are notoriously risk-averse and don't have much in the way of goals to achieve beyond their own continued existence and profitability. Business speak has eroded the meaning straight off English words.
- kthejoker2 6y agoThree quick points: * One man's Lindy effect is another man's survivorship bias. * Along the same lines, the only ground truth is the Pareto distribution; choose your 20% wisely. * There is virtue in starting with "best practices" if only to start somewhere. It's certainly the path of least resistance to the "green light" of doing whatever you want.