Live data from Hacker News

Against Best Practices

arp242.net

31–40 of 218 posts

Re: Against Best Practices

#32
post #6

Follow best practices unless you can give a reason not to. "Best practice" is a shorthand for a lot of accumulated knowledge that you don't want to go over again every time. Also following BP makes the code more consistent and thus easier to understand. But when an argument arises, go back to the underpinnings of the best practice and work from there.

The iThe

Re: Against Best Practices

#33

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 line…

A nit; DRY is probably not what you think it is. DRY is basically the same as SRP, framed differently. In SRP, it's totally valid to have the code twice if it has different meaning from a user pov.

Re: Against Best Practices

#34
post #8
post #6

Follow best practices unless you can give a reason not to. "Best practice" is a shorthand for a lot of accumulated knowledge that you don't want to go over again every time. Also following BP makes the code more consistent and thus easier to understand. But when an argument arises, go back to the underpinnings of the best practice and work from there.

Basically if you know exactly why the best practice/rule is in place, and know for sure it does not apply, just skip it. But not before. https://en.wiktionary.org/wiki/Chesterton%27s_fence

I would reverse this: if you can explain to me exactly why your so called "best practice" applies here and now, good. Otherwise it's a nice input to have in the discussion, but nothing more.

Re: Against Best Practices

#35

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 line…

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. :(

Re: Against Best Practices

#36
"Postel's law" is an ironic name, I don't think the people who coined that term meant that it was an infallible rule of the universe, just what seemed a good rule of thumb for implementing protocols.

I still like Postel's law, but don't imagine for a second it's a 'law' with the kind of authority the article implies, and didn't enjoy the article's slime about people who like it!

Re: Against Best Practices

#38
post #6

Follow best practices unless you can give a reason not to. "Best practice" is a shorthand for a lot of accumulated knowledge that you don't want to go over again every time. Also following BP makes the code more consistent and thus easier to understand. But when an argument arises, go back to the underpinnings of the best practice and work from there.

What if the "best practice" was invented by a VC funded company (like, just for example, Vercel) desperate to maintain their growth trajectory by any means necessary, including huge marketing pushes to convince everybody the "best practice" is the "best way to do things"?

It's downright dangerous to assume a "best practice" in software development somehow automatically means it's some super distilled wisdom juice. A whole lot of it, in my experience, is just hype and rapid, unquestioning cargo culting slamming in right behind the hype.

Use your fucking brain. If the "best practice" is objectively a good solution to your problem then use it. If not, think of something better.

Re: Against Best Practices

#39
Best practices are a way to avoid building everything up from first principles every time. They are more, “here are rules that are generally applicable so you don’t have to waste time thinking,” vs “here are laws of god which are always applicable.”

It is an error to throw out every best practice and reconsider everything just as it is to blindly follow the best practices.

IMO it’s best to apply the best practices by default and question them as they are used. Essentially trust but verify. Assuming they are right most of the time you get the benefit of speed. Assuming some of them are wrong, it still leaves room to course correct.

Re: Against Best Practices

#40
post #39

Best practices are a way to avoid building everything up from first principles every time. They are more, “here are rules that are generally applicable so you don’t have to waste time thinking,” vs “here are laws of god which are always applicable.” It is an error to throw out every best practice and reconsider everything just as it is to blindly follow the best practices. IMO it’s best to apply the best practices by…

Maybe "good practice" is a better term.
Post reply on HN