top | item 36516463

(no title)

lixtra | 2 years ago

> It makes writing the happy path slower, but is writing the happy path _programming?_

The happy path is just fine for many cases.

Your home isn’t built to withstand a determined attacker with a tank. But we live in a happy world and a lot of stuff exists because people can cut corners.

Good managers/programmers know where they can be sloppy and where they have to be super careful.

The beauty of technical debt is that it only has to be repaid in case of success.

discuss

order

beoberha|2 years ago

This is an interesting example. There are plenty of rules that must be followed when building a home. Equating type checking to a home being able to withstand a tank is a poor example IMO due to the potential of the scenario actually occurring. You’re going to have type checking errors. You’re never going to have someone coming at your home with a tank. A much better example is a significant amount of rain or wind. You might have that storm once every few years but you’ll be glad you built it to withstand it when it comes.

I’m being generous tbh. In my experience, though I work on pretty critical software, the unhappy path is a fairly critical path and must have some intentional barriers built before being shipped to customers.

IshKebab|2 years ago

The dynamic type checking analogy of house building is eyeballing support dimensions and then rebuilding walls when they fall down. Fine for a shed, but if it's a building I'm living in I would like a structural engineer to do some calculations to check it's ok before I use it.

Maybe that's the difference between programming and software engineering! Engineers care if their stuff breaks.

pjmlp|2 years ago

Software Engineers that took a proper engineering degree care as well.

pjmlp|2 years ago

"If a builder builds a house for someone, and does not construct it properly, and the house which he built falls in and kills its owner, then that builder shall be put to death."

-- Hammurabi's Code, Babylon 1755–1750 BC

Modern construction law isn't as brutal, still liabilities will be questioned if corners were cut, and brought to court.

In many cases, programming is still at the level of driving chariots with steam engines.

gpderetta|2 years ago

Aside from your very relevant point, most programs indeed need to withstand a determined attacker.

alpaca128|2 years ago

Debugging a happy path can quickly become a very unhappy exercise if there are no typechecks. Sure types can slow down things now and then, but if it catches just a few bugs it may already be worth it.