Top
Best
New

Posted by milanm081 5 days ago

Laws of Software Engineering(lawsofsoftwareengineering.com)
1158 points | 523 commentspage 10
traderj0e 4 days ago|
Any time someone quotes a law named after some random person, it looks like a stuffy "I know something you don't." Amdahl is probably the only name here that deserves it, and it's a real law. I'd be fine if Eric Brewer put his name on CAP too, also a real law.

YAGNI and "you will ship the org chart" are the two most commonly useful things to remember, but they aren't laws.

yesitcan 4 days ago||
None of these things matter anymore. All you need is vibe.
serious_angel 4 days ago||
Sorry, sometimes, I do wish Hacker News would have a down-vote button...
datadrivenangel 4 days ago||
Come back after 500 karma.
Divergence42 4 days ago||
Looks a lot different in a 1 person agent based company.
IshKebab 5 days ago||
Calling these "laws" is a really really bad idea.
brendaninnis 3 days ago||
The Dunning-Kruger Effect card is so bad here. The effect is not that your perceived ability is higher the less skilled you are, but that the gap between your actual ability and perceived ability is larger the less skilled you are (and becomes negative when highly skilled). This is so commonly misstated this way that I think most people have this misunderstanding.

Also they used the graph for the Gartner Hype Cycle as the icon, not the Dunning-Kruger graph.

cogman10 5 days ago||
Uhh, I knew I wasn't going to like this one when I read it.

> Premature Optimization (Knuth's Optimization Principle)

> Another example is prematurely choosing a complex data structure for theoretical efficiency (say, a custom tree for log(N) lookups) when the simpler approach (like a linear search) would have been acceptable for the data sizes involved.

This example is the exact example I'd choose where people wrongly and almost obstinately apply the "premature optimization" principles.

I'm not saying that you should write a custom hash table whenever you need to search. However, I am saying that there's a 99% chance your language has an inbuilt and standard datastructure in it's standard library for doing hash table lookups.

The code to use that datastructure vs using an array is nearly identical and not the least bit hard to read or understand.

And the reason you should just do the optimization is because when I've had to fix performance problems, it's almost always been because people put in nested linear searches turning what could have been O(n) into O(n^3).

But further, when Knuth was talking about actual premature optimization, he was not talking about algorithmic complexity. In fact, that would have been exactly the sort of thing he wrapped into "good design".

When knuth wrote about not doing premature optimizations, he was living in an era where compilers were incredibly dumb. A premature optimization would be, for example, hand unrolling a loop to avoid a branch instruction. Or hand inlining functions to avoid method call overhead. That does make code more nasty and harder to deal with. That is to say, the specific optimizations knuth was talking about are the optimizations compilers today do by default.

I really hate that people have taken this to mean "Never consider algorithmic complexity". It's a big reason so much software is so slow and kludgy.

krust 4 days ago||
> Another example is prematurely choosing a complex data structure for theoretical efficiency (say, a custom tree for log(N) lookups) when the simpler approach (like a linear search) would have been acceptable for the data sizes involved.

To be fair, a linear search through an array is, most of the time, faster than a hash table for sufficiently small data sizes.

cogman10 4 days ago||
I'd say that this is premature optimization.

It doesn't take long for hash or tree lookups to start outperforming linear search and, for small datasets, it's not frequently the case that the search itself is a performance bottleneck.

bigfishrunning 5 days ago||
Yeah, for every Knuth there are 10000 copies of schlemiel the painter
alsetmusic 4 days ago||
Their statement of Dunning-Kruger is overly simplified such as to misdefine it:

> The less you know about something, the more confident you tend to be.

From the first line on the wiki article:

> systematic tendency of people with low ability in a specific area to give overly positive assessments of this ability.

Or, said another way, the more you know about something the more complexities you're aware of and the better assessment you can make about topics involving such. At least, that's how I understand it in a nutshell without explaining the experiments run and the observations that led to the findings.

Divergence42 4 days ago||
fascinating and agree with many of the laws. In a 1 person agent only company this hits a bit different.
sunkeeh 4 days ago||
Good luck following the Dilbert Principle xD

Just because some things were observed frequently during a certain period, doesn't mean it's a "Law" or even a "Principle"; it's merely a trend.

bofia 4 days ago||
It would be nice to see what overlaps
satansdeer 4 days ago|
It's proverbs, not laws
More comments...