Live data from Hacker News

Are software engineering “best practices” just developer preferences?

floverfelt.org

91–100 of 369 posts

Re: Are software engineering “best practices” just developer preferences?

#91

"The parallel he drew was to another friend who’s a Civil Engineer. His friend had to be state certified and build everything to certain codes that stand up to specific stressors and inspections. I gave him the usual answer about how Software Engineers deal with low stakes and high iterability compared to Civil Engineers, but, honestly, he has a point." I've argued for awhile now that Software Engineering with a big…

In a way there are standards for software but those standards are not expressed in software terms.

Firstly, most software is harmless. If it goes wrong people may be annoyed, but no one is harmed. But if I write software to control an aircraft, then it would have to abide by aviation standards. If I write financial software then I would have financial regulations to follow. Same for medical devices. So, there are standards for software but they are indirect and expressed in terms of the wider domain in which it runs.

Re: Are software engineering “best practices” just developer preferences?

#92
post #60

> How can Software Engineers call themselves engineers when there’s no rules, governing bodies, or anything to stipulate what true Software Engineering is? We call ourselves software developers in Canada. According to Canadian engineering[1]: The "practice of engineering" means any act of planning, designing, composing, evaluating, advising, reporting, directing or supervising, or managing any of the foregoing, that…

It'll be interesting to see if they can ever manage to enforce it. I haven't heard of any cases yet since Microsoft challenged them and won.

Microsoft lost their appeal in Quebec

https://www.oiq.qc.ca/en/media/pressReleases/Pages/default.a...

Re: Are software engineering “best practices” just developer preferences?

#93
post #89

After reading this article, the theory that comes to mind is that "best practices" not just developer preferences - rather, "best practices" is cargo culting by mediocre programmers, trying to copy techniques that a really skilled programmer once employed to do amazing things. This is the part of the article that made me think this: >As I type this, I’m in a discussion about whether it’s better to pass a few unnecess…

I think we'd be better off as a whole if we could agree on exactly what it was we were trying to get out of software best practices rather than arguing about what they are. To me, the biggest problem with all software I've ever worked on - since I started programming in 1992 - is how difficult it is to reproduce a scenario that a user reports. Making this as simple as possible seems to me to be an incredibly important as well as relatively straightforward goal, but I have yet to find anybody who agrees further than in principle.

Re: Are software engineering “best practices” just developer preferences?

#94
post #13

Earlier quoted context omitted.

Pretty much. IT as a field is a toddler. But it makes so many people happy we don't care it's still at the anal stage. Maybe in a century techs and standards will stabilize.

>Pretty much. IT as a field is a toddler. It's exactly as old as nuclear engineering. If it's a toddler, it's because of the mentality of the people involved, not because there was no time to figure things out.

nuclear engineering is a direct combination of applied physics, civil engineering and mechanical engineering, all having a long history.

SE started out from mathematics, but the hardest problems are not related to it. We're only pretty good at nailing the things directly from mathematics like algorithmic complexity or distributed system guarantees.

Re: Are software engineering “best practices” just developer preferences?

#96
Well the choices should be based on data, does method 1 or method 2 result in code which functions longer without needing to be fixed, or updated.

There _IS_ data about some of this, but the results frequently go against the opinions of various people, so they are discounted. And then there is the problem that the industry as a whole has a tendency to run away from old/stale/well understood/etc technologies in support of untested new products. Which is how you get the cool language churn. You can just look at the last 20 years of server side web development, php, ruby, python, javascript, were all the "best choice" at one point or another, only to be pushed to the sidelines when they were discovered to be sub-optimal in some way.

So, its like the C/java/etc brace problem. There were a fair number of actual studies showing that matched brace styles seem to result in fewer bugs back in the 1990's, yet overwhelmingly the opensource community rejects that in nearly every single project regardless of language. Why? Presumably its just personal preference going back to the old days of 80x25 tty's where whitespace was at a premium, same as the 80 column limits many projects employ.

Re: Are software engineering “best practices” just developer preferences?

#97
post #68
post #34

Earlier quoted context omitted.

Civil (and other engineering) got better because there was motivation to improve that came from multiple directions: literal lives at stake, the pride of good craftsmanship, iterative or even grand steps forward in knowledge, etc. Software engineering as a discipline is dominated by appeals to authority ("Clean Code", "Google does it this way", "Djikstra said so", etc.) without any (or at least not much) attempt to a…

What about we apply this to software engineering? > If a builder constructs a house for a man but does not make it conform to specifications so that a wall then buckles, that builder shall make that wall sound using his own silver. - Code of Hammurabi, 1755–1750 BC

Define "specifications" and "conform" in terms that I might hear from a non technical client.

Re: Are software engineering “best practices” just developer preferences?

#98
post #77

I agree with the author, but saying "best practice" in a group discussion is frequently used to make someone's position sound more official. "Industry standard" gets used the same way. Some people think that saying these things is like pressing an "I get what I want" button. I have to fight the urge to ask for citations whenever I see someone pull out one of these chestnuts. Rather than be contentious, I just think a…

This is a pet peeve of mine, but it’s so ingrained into dev culture that it seems impossible to stop. We could have a little bit of intellectual integrity and at least say “good” instead of “best” but we won’t.

We also use it to argue for opinion over empirical data points. E.g., tabs vs spaces. The “best practice” is some arbitrary number of spaces because “alignment”; this ignores entirely a substantial argument for tabs in the form of accessibility—you can make a tab whatever width you want, so if you’re visually impaired you don’t have to modify the code to read it and re-format it to the “best practice”. TLDR; tab indentation followed by space alignment would actually satisfy everyone’s needs, but it’s totally off the table because “best practice” is spaces.

Re: Are software engineering “best practices” just developer preferences?

#99
post #46

Right, but have you ever worked in a place where no practices at all are being followed? Where there are hacks after hacks, giant classes with giant methods, no interfaces, static methods, bad names everywhere, you need to find a bug? good look, you want to write a test to avoid regression? Ok that would take you 5 times more time. I agree, following a “best practice” without understanding the “bad practice” that it’…

Yup, I 100% agree. The point of the post wasn't to bemoan practices, more just that it's frustrating to be told repeatedly that a certain thing is a "best practice" when really it's just what the developer who wrote it preferred.

Software Engineers should just say "this is how we like to do things" and not pretend that there's a holy grail of correctness when really it's just what they like.

Re: Are software engineering “best practices” just developer preferences?

#100
post #89

After reading this article, the theory that comes to mind is that "best practices" not just developer preferences - rather, "best practices" is cargo culting by mediocre programmers, trying to copy techniques that a really skilled programmer once employed to do amazing things. This is the part of the article that made me think this: >As I type this, I’m in a discussion about whether it’s better to pass a few unnecess…

> rather, "best practices" is cargo culting by mediocre programmer, trying to copy techniques that a really skilled programmer once employed to do amazing things.

and then when this does not work, they call themselves artists.

i actually heard this quite a lot in all these years in the field - "coding is an art". it is for some, for most is just copy/paste from SO :)

Post reply on HN