←back to thread

Against Best Practices

(www.arp242.net)
279 points ingve | 3 comments | | HN request time: 0s | source
Show context
vbezhenar ◴[] No.42171296[source]
How other engineering industries deal with this phenomena? Why those approach do not work with programming? I feel silly sometimes because software development is huge industry and we don't have consensus on basics.

For example I think that strict formatting is a good thing. Since I tried to use Prettier I'm using it and similar tools everywhere and I like it. I can't do vertical alignment anymore, it eats empty lines sometimes, but that's a good compromise.

May be there should be a good compromise when it comes to "best practices"? Like "DRY" is not always best, but it's always good enough, so extract common stuff every time, even if you feel it's not worth it.

I often deal with this dilemma when writing Java with default Idea inspections. They highlight duplicated code and now I need to either disable this inspection in some way or extract the chunk of code that I don't really think should be extracted, but I just can do it and move on...

replies(12): >>42171363 #>>42171370 #>>42171393 #>>42171459 #>>42171531 #>>42171554 #>>42171817 #>>42171829 #>>42172784 #>>42173289 #>>42173799 #>>42174046 #
1. taeric ◴[] No.42171829[source]
What makes you so sure they do? Go to the hardware store and behold how many fasteners there are. Go down the rabbet hole of pipe fittings. Consider the optimal size of lumber, someday.

And then get ready for the horrors of electrical connections. Not necessarily in how many there are; the real horror is how many think there is a "one true answer" there.

You can find some solace in learning of focusing effects. But, focus isn't just getting harder for individuals. :(

replies(1): >>42174771 #
2. whstl ◴[] No.42174771[source]
That's a great point.

In the end, other engineering areas also have lots of "it depends" situations, where often there are multiple correct answers, depending on availability, legislation, safety, physical constraints, etc.

Perhaps in software engineering people are just too quick or immature to judge.

> rabbet hole

Nice pun ;)

replies(1): >>42179360 #
3. taeric ◴[] No.42179360[source]
I'd love to claim the pun was intended! :)