3 ms·
There are plenty of absolutes. People just don't talk about them much because there's not much to say: * binary is the best way to encode information and numbe
by IshKebab 2y ago
There are plenty of absolutes. People just don't talk about them much because there's not much to say:
* binary is the best way to encode information and numbers
* twos complement is the best general purpose way to encode negative integers
* static typing and stronger typing lead to fewer bugs
* length prefixes are better than using sentinel values and escaping
> In almost any other discipline there would be a "correct" way to do it
Tell me you know nothing about anything except computers without...
You think there's a "correct" way to build a bridge?
- GMoromisato 2y agoI was a little sloppy. But the difference between software engineering and building bridges is that absolutes in software engineering are automated away. If there is an always correct way to do something, then the hardware/software always does it that way and we don't expose a choice to the software engineer. When a choice is exposed to the software engineer it is because there is a trade-off. In contrast, when making concrete, there are valid and invalid ratios of water/cement/etc. You have to memorize (or lookup) the correct ratios. Building a bridge is filled with things you have to look up or just compute from basic parameters. Of course there are engineering trade-offs in building a bridge. But there are also many "just follow the algorithm" procedures. In software engineering, it's all trade-offs! Almost by definition, if there is a choice, it's a trade-off that requires human judgement, otherwise, the choice would be made for you by the computer.
- poincaredisk 2y agoWell even your examples... * two's complement is the best general purpose way (tradeoffs!) * static typing leads to fewer bugs (but makes development slower - tradeoffs) * length prefixes are better than sentinels - but the largest system language uses sentinels for strings (because prefixes are not actually always better, be and sentinels were deemed better by its creators)
- IshKebab 2y ago> general purpose way (tradeoffs!) Not really I was more hedging against HN pedantry... > but makes development slower - tradeoffs No it doesn't. It makes development faster! > because prefixes are not actually always better, be and sentinels were deemed better by its creators Because they got it wrong.