Live data from Hacker News

Famous Laws of Software Development (2017)

timsommer.be

151–160 of 202 posts

Re: Famous Laws of Software Development (2017)

#151
I have always liked Postel's law (and Jon -- what a great human being he was) but I no longer like it as I used to.

The reason it's a really great idea is that it says you should engineer in favor of resilience, which is an important form of robustness. And at the same time, "strict in what you send" means "don't cause trouble for others.

However there are cases where "fail early" is more likely to be the right thing. Here are a few:

1 - Backward compatibility can bite you in the leg. For example, USB Type C (which I love!) can support very high transfer rates but when it can't it will silently fall back. So you could have a 40 Gbps drive connected to a 40 Gbps port on a computer via a cable that only supports USB 2 speeds. It will "work" but maybe not as intended. Is this good, or should it have failed to work (or alerted the user to make a choice) so that the user can go find a better cable?

2 - DWIM is inherently unstable. For users that might not be bad (they can see the result and retry) or terrible ("crap, I didn't mean to destroy the whole filesystem").

I see these problems all the time in our own code base where someone generates some invalidly-formatted traffic which is interpreted one way by their code and a different way by someone else's. Our system is written in at least four languages. We'd be better off being more strict, but some of the languages (Python, Javascript) are liberal in both what they accept and generate.

This aphorism/law was written for the network back when we wrote all the protocol handlers by hand. Now we have so many structured tools and layered protocols this is much less necessary.

Re: Famous Laws of Software Development (2017)

#152

Earlier quoted context omitted.

This is precisely a symptom of unclear ownership responsibilities.

No, it can be an issue of it being unclear in which component the bug actually is.

Which is a clear sign that your components are not sufficiently separate.

Re: Famous Laws of Software Development (2017)

#153

Earlier quoted context omitted.

No, it can be an issue of it being unclear in which component the bug actually is.

Which is a clear sign that your components are not sufficiently separate.

Um, no. The real world is not that simple. It would be nice if it were.

Or perhaps your statement is correct, but in the real world components are never sufficiently separate. So, while your statement may be correct by definition, it is not useful.

Re: Famous Laws of Software Development (2017)

#155
post #61
post #46

Earlier quoted context omitted.

Brooks' ?

This is exactly what I am trying to establish to improve my bumpy English. My best guess is that the correct form is "Brooks's" because (1) "Brooks" is a singular noun ending with an "s" and (2) it is not a classic neither religious name. If you claim it should be "Brooks'" I am ok with this as long as you give me a sensible explanation.

Native English speaker, from England, and we were explicitly taught to use Brooks' rather than Brooks's.

However that didn't stop the Beatles from using "In an Octopus's Garden" as a song title. (Note that the song is about a single Octopus). I would suggest that it depends on whether you intend to explicitly repeat the 's' when speaking.

Plurals of words ending with an 's' are an occasional minefield. You sometimes hear people smugly insist that the plural of Octopus should be Octopi, only to have someone even more smugly point out that Octopus is from Greek, not Latin, and so it should be Octopodes. Meanwhile the rest of us just continue to use Octopuses....

Re: Famous Laws of Software Development (2017)

#156

Regarding Conway's Law: We have found that by changing our software/system architecture we have also inadvertently changed our organisation structure. - Inverse Conway Law or just Roy's Law ;-) Before we had four cross functional teams, working on a single application, everyone felt responsible for it, worked overtime to fix bugs etc, we had good communication between the teams. But after we switched to microservices…

it's almost like Bezos intentionally issued the microservices mandate at Amazon to discourage Amazon's engineers from unionizing.

Re: Famous Laws of Software Development (2017)

#157
post #9

Zawinski's law of software envelopment: Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.

Another of jwz's laws is:

Any social media company will expand until it behaves like a bank; receiving deposits and making loans to customers (not necessarily users).

Re: Famous Laws of Software Development (2017)

#158

Earlier quoted context omitted.

Which is a clear sign that your components are not sufficiently separate.

Um, no. The real world is not that simple. It would be nice if it were. Or perhaps your statement is correct, but in the real world components are never sufficiently separate. So, while your statement may be correct by definition, it is not useful.

I think you really nailed it with this one.

I can imagine there being a normal distribution of 'separateness' of software and the rare top tail-end of the distribution gets it perfectly right, most are in the middle somewhere between 'service oriented architecture' and 'ball of mud' and some are just at plain ball of mud.

Re: Famous Laws of Software Development (2017)

#159
post #100

Oh please, not the Knuth's "principle" again. Optimization is a skill, it's not evil. A skilled engineer can build sufficiently good systems without wasting much extra time on optimizations.

The problem with the Knuth quote is that apparently people have turned the word "premature" into a synonym for "up-front." No, that's not what it means. Knuth is not saying that you should code (shit-out) the whole system naively and then try to find out where the bottlenecks are, as this dumb post suggests. Anybody that knows about the Knuth programming contest story would know he would be the last to endorse this. Premature literally means spending time on optimizing individual things before their need becomes apparent. It doesn't mean you should delay optimizing a system design from day 1.

Re: Famous Laws of Software Development (2017)

#160
post #105

Earlier quoted context omitted.

His full quote is a little less prone to abuse > Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we…

Yeah, I get frustrated that few people actually post the full quote, because, with the context, it means something completely different to young ears. The full quote makes me think: "You should identify the critical paths of your system early." The shortened quote makes me think: "Deal with performance later." Pretty big difference in meaning.

Personally, I think it's more about balancing trade offs. You need to have some semblance of target performance needs. Bad architecture can be hard to overcome later.

Most decisions are small, but can lead to compounding effects. Personally, I think one should also avoid premature pessimissation as well. No one in their right mind would use bubble sort over quick sort, for instance (not saying quick sort is the best algorithm, but it's better than bubble sort). One pet peeve I have in C++ is when I see people initializing a std::string with a literal empty string instead of using the default constructor. The default constructor is usually a memset or initializing 3 pointers. Initializing with an empty literal involves a call to strlen, malloc and strcpy. I've yet to see a compiler optimize this. May not seem like a big deal, but considering one of the most frequently used data types is a string, it adds up a lot. Most of the applications I've worked on show std::string methods and constructors as hotspots when profiled (back office financial systems).

I agree one should avoid premature micro-optimization, but that you can also avoid premature pessimissation.

Post reply on HN