Steven Sinofsky gave a talk and said something to the effect of, we've been building roads, bridges and edifices for thousands of years. So, best practices and solved problems abound---and even then we still get it wrong sometimes. Whereas, software engineering is maybe 70 years old (generously)? So, there is much to learn and a lot of "baseline" knowledge that has yet to be established. I think it's a good way to th…
Furthermore, there are far fewer physical constraints in software, so the range of possible designs is dramatically wider. (Actually I dare say that sotware itself has no physical constraints at all: software artifacts and software executions do.)
Are software engineering “best practices” just developer preferences?
51–60 of 369 posts
Re: Are software engineering “best practices” just developer preferences?
#52Re: Are software engineering “best practices” just developer preferences?
#53To be honest, "correctly" is whatever actually works. But since we as an industry haven't been around for a long time and don't collectively know what actually works, it is simply the case that we defer to those who have comparatively more experience, so that we may get decent solutions now, as opposed to excellent ones later.
It took the ancient civilizations hundreds if not thousands of years to perfect architecture to a reasonable degree, where it's possible to be fairly certain about the viability of most typical designs, as well as the tradeoffs that nonstandard ones might require.
Personally, i think that we'll only be able to talk about what truly works and what doesn't once the industry cools down - when there are new JS frameworks once a month or once a year as opposed to every day (or for any technology, really). When there are very few breaking framework changes, because the frameworks would finally be stable. When the primitives around doing web development, interfacing with devices and everything else have been distilled to their most usable possible forms. When a developer doesn't need 10 languages or 20 frameworks to do their job, but can instead rely upon a few, after most others would have died off after a sort of singularity of languages.
That's when useful certifications would be possible. That's when estimates wouldn't be guesswork. That's when the education systems could actually prepare people fully for working in the industry. That's when the development of projects wouldn't be such Wild West, but instead would be a process with far higher quality, a true engineering discipline even at the expense of projects taking longer to actually develop, much like you don't construct buildings in an ad hoc fashion.
Now, whether that will happen in a 100 years, a 1000 years or never, is another question entirely.
Re: Are software engineering “best practices” just developer preferences?
#54Steven Sinofsky gave a talk and said something to the effect of, we've been building roads, bridges and edifices for thousands of years. So, best practices and solved problems abound---and even then we still get it wrong sometimes. Whereas, software engineering is maybe 70 years old (generously)? So, there is much to learn and a lot of "baseline" knowledge that has yet to be established. I think it's a good way to th…
Mechanical engineering has physics as a foundation.
Chemical engineering has chemistry as a foundation.
What is the scientific foundation of software engineering?
I suspect it is a mix of cognitive science, linguistics, and anthropology.
Re: Are software engineering “best practices” just developer preferences?
#55And if I can opine on your Spring Boot example, unit testing can sometimes be easier for mock purposes if you have a set of interfaces (vs concrete classes) to work with.
Re: Are software engineering “best practices” just developer preferences?
#56Re: Are software engineering “best practices” just developer preferences?
#57Having an interface for a single implementation is just redundant. A class already has an interface - it's public API. Other than that I agree, most "best practices" are subjective and boil down to personal preference.
1. They are (usually) concise specification/contract for the implementation to follow, and for the client to use.
2. They permit substitution.
These are, from my experience, the principle and most useful reasons to make use of "redundant" interface definitions. What's worse is when people want alternative implementations but only have a concrete instance, they subclass it and break all kinds of contracts making their square peg fit a round hole.
This is less useful when you have ducktyping and consequently every lookalike is considered substitutable for each other.
Re: Are software engineering “best practices” just developer preferences?
#58- extract an interface or not -> an interface can speed up compilation (under the right conditions)
- pass more or less arguments -> how many call sites exist? What’s the performance difference? Would it complicate testing?
- testing -> depends on what you’re building, when do you need it by, and how problematic a bug may be (and more)
The reason it looks like some random preference is because over time we naturally gravitate (or been told to do) what works, and we keep choosing it heuristically since a thorough analysis of the problem is too costly or impossible.
Civil engineering has a bunch of hard rules on have X slack here because people will die for such mistakes. But I suspect you use best practices for less high stake stuff (do we use this outlet configuration or this one?) (actual civil engineers are welcome to correct me)
Re: Are software engineering “best practices” just developer preferences?
#59I hope at least that we're in a phase of the profession where we're "discovering" the actual best practices. There have been a lot of best practices that have been hypothesized over time: OOP, functional programming, unit testing, generative testing, formal analysis, strict typing, weak typing, etc. And all these as-of-yet unfounded hypotheses are important! You've got to have a theory of how something works before y…
Gone are the days when we threw together a php, html, and JavaScript in one file... wait, or is it?
Re: Are software engineering “best practices” just developer preferences?
#60We 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 requires the application of engineering principles, and that concerns the safeguarding of life, health, property, economic interests, the public welfare, or the environment.
To be considered a work of engineering, then, that a piece of software (or a software-intensive system) must meet two conditions:
1. The development of the software has required “the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software.”
2. There is a reasonable expectation that failure or inappropriate functioning of the system would result in harm to life, health, property, economic interests, the public welfare, or the environment
[1] - https://engineerscanada.ca/news-and-events/news/when-softwar...