by l0b0 · 5y ago · 0 comments
- Learn the rules - Master the rules - Break the rules
You can't go in straight away into life, or anything, and break the rules. Because you know fuck all about why those rules are in place, and what purpose they serve. The only people who really should be breaking rules are those that have mastered them and understand everything about them.
The most obvious place to illustrate this is art generally. You can't as an 18 year old paint a canvas red and say its art, people will laugh at you. But once you've built a reputation of being a master, like Mark rothko, you paint a canvas basically red which doesn’t need much skill. But you might be able to get away with breaking all the rules.
And we should also keep in mind that Bruce Lee himself likely died rather young as the result of some unconventional choices - https://en.wikipedia.org/wiki/Bruce_Lee#Death (a combination of substances used, over-exertion and the surgical removal of his sweat glands)
In software, I think the so-called best practices really don't deserve the status of traditions. Take the git flow. Some random person writes a blog post and now we have for some reason suddenly a 'best practice'.
Also, you do not really need to think that much about 'everything'. The KISS principle tells us to first try the simplest thing that could possibly work. Maybe KISS should be a best practice, I suppose.... What is rather interesting (and questionable), though, about the so-called best practices is that they generally lead to less simplicity and more stuff that all needs to be maintained. The cynic in me suspects a large overlap between 'best practice' and 'someone is trying to sell something'.
That's not giving other developers much credit for critical thinking. Famous articles such as Git Flow or The Joel Test are usually written by experienced developers (or a representative of a team of such), often with more understanding of the subject than the vast majority of other developers. They present a reasonable case for why the practice is better than what came before, and don't pretend that they are presenting some sort of universal, timeless solution. What happens next is the same thing that happens to every innovation: a messy, slow, mostly random walk from the original idea to something better, which may be closer to the original practice than the recommendation. But it's often worth trying.
> Also, you do not really need to think that much about 'everything'.
How do you work out which things to dig into though? You can't possibly dig into everything, and if you don't have much experience you have no reason to think that any particular rabbit hole is going to lead to somewhere better. And that leads straight back to best practices: they are probably going to work for a reasonable fraction of the problems being solved, because most of us (let's face it) are solving extremely similar problems over and over again.
> What is rather interesting (and questionable), though, about the so-called best practices is that they generally lead to less simplicity and more stuff that all needs to be maintained.
That's not been my experience in general, but I try pretty hard to make sure I understand why they are considered best practice and when it's OK to ignore or go against them. For example, a lot of shell scripting "best practices" are terrible remnants of the dawn of time when ASCII ruled the world and nobody had even heard of Bobby Tables: assuming every filename matches ^[A-Za-z0-9_-]{1,8}\.[A-Za-z]{3}$ or something similarly naive, that limited error handling is worse than no error handling at all, or that portability is more important than maintainability.
> The cynic in me suspects a large overlap between 'best practice' and 'someone is trying to sell something'.
Buy my book[1]! ;) Or slightly more seriously, read these[2][3][4][5], spend too much time figuring out how to loop over any files safely, find a blog post explaining how someone else came to the same conclusion, realize how bonkers the solution is, weep a bit, and long for something better than POSIX.
[1] https://www.newline.co/books/fullstack-bash/welcome
[2] https://pinboard.in/u:l0b0/t:bash/t:read
[3] https://unix.stackexchange.com/search?q=user%3A3645+%5Bbash%...
[4] https://stackoverflow.com/search?q=user%3A96588+%5Bbash%5D+i...
[5] https://victor-engmark.gitlab.io/advanced-shell-scripting-wi...
Au contraire, I think it's you who is not giving tech evangelists and marketers enough credit in their skills at persuading people to adopt bad ideas.
If you compare different programming communities, they have very different best practices.
Things one community swears are necessary to making good software, another community views as irrelevant or harmful.
Programming is littered with examples of people getting overly attached to some dubious principle and then running as far with it as they possibly can. Some of those examples have become dominant frameworks!
One thing I've noticed is that people who try to live according to a particular philosophy or philosophical understanding tend to be less effective than people who either ignore it entirely or only apply it to limited situations. This observation seems to hold even amongst public intellectuals, which one would assume would skew heavily towards philosophers.
I wonder if this is the reason why.