3 ms·
All the problems stated require more context: - extract an interface or not -> an interface can speed up compilation (under the right conditions) - pass more
by strulovich 5y ago
All the problems stated require more context:
- extract an interface or not -> an interface can speed up compilation (under the right conditions)
- pass more or less arguments -> how many call sites exist? What’s the performance difference? Would it complicate testing?
- testing -> depends on what you’re building, when do you need it by, and how problematic a bug may be (and more)
The reason it looks like some random preference is because over time we naturally gravitate (or been told to do) what works, and we keep choosing it heuristically since a thorough analysis of the problem is too costly or impossible.
Civil engineering has a bunch of hard rules on have X slack here because people will die for such mistakes. But I suspect you use best practices for less high stake stuff (do we use this outlet configuration or this one?) (actual civil engineers are welcome to correct me)
- 3pt14159 5y agoDid structural engineering for a bit before coming back to software. More or less right about hard rules. They're not truly hard, and it's different in different countries. Some countries have performance based rules, others have descriptive rules (must have 35mm of concrete cover over reinforcement bars) but even in those situations you can usually get some sort of person to overrule the rule, it's just costly in both time and money, but sometimes its worth it. Take ultra high performance concrete for example. It's almost a different material compared to the normal stuff. But for run of the mill construction everyone kinda likes sticking to the rules because it's like outsourcing handling all the edge-cases. Kinda like using Postgres over writing your own persistence layer. As for hard rules in software, that would be tough. It's much more multidimensional and maneuverable than civil engineering is and we have less history dealing with it. Also, there are way more security concerns than civil engineering, which is mostly about safety concerns, where there are no arms races against you. We could still do it abstractly though. Favouring maxims and penalties over nitty gritty rules.