logoalt Hacker News

whattheheckhecktoday at 12:54 PM4 repliesview on HN

Why 3? What is this baseball?

Take the 5 Rings approach.

The purpose of the blade is to cut down your opponent.

The purpose of software is to provide value to the customer.

It's the only thing that matters.

You can also philosophize why people with blades needed to cut down their opponents along with why we have to provide value to the customer but thats beyond the scope of this comment


Replies

marcosdumaytoday at 4:25 PM

Why baseball? You don't use the number 3 in any other context?

If you write a lot of code, the odds of something repeating in another place just by coincidence are quite large. But the odds of the specific code that repeated once repeating again are almost none.

That's a basic rule from probability that appears in all kinds of contexts.

Anyway, both DRY and WET assume the developers are some kind ignorant automaton that can't ever know the goal of their code. You should know if things are repeating by coincidence or not.

jimbokuntoday at 6:59 PM

Rule of 3 will greatly benefit the customer over time as it lessens the probability of bugs and makes adding new features faster.

ta20240528today at 1:21 PM

"The purpose of software is to provide value to the customer."

Partially correct. The purpose of your software to its owners is also to provide future value to customers competitively.

What we have learnt is that software needs to be engineered: designed and structured.

show 1 reply
TheGRStoday at 5:35 PM

One is one. Two is a coincidence. And three is a trend. That's my personal head canon.

show 1 reply