3 ms·
I disagree. The entire practice of development is making simple parts and linking them together in a simple manner to create more complex parts that are still s
by StavrosK 11y ago
I disagree. The entire practice of development is making simple parts and linking them together in a simple manner to create more complex parts that are still simple to understand at their level.
Your computer is extremely complicated, but it can be broken down to parts that are simple to understand in each level. That's pretty much the entire benefit of a good engineer. They know how to make self-contained things whose purpose and interface with the rest of the system is easily understandable.
- emcq 11y agoThis is not strictly true, and happens when complexity is needed for some of the simple lower level parts or due to the libraries and tools available changing over time. For example, lets say the 10x engineer wrote fast inverse square root [0]. Most people would look at the code and not understand what's going on. It requires a lot of domain knowledge but provided nice speeedups at the time. Is it more complicated than necessary for some problems? Absolutely. However when used frequently as originally intended that speedup allows for more compute to be spent on higher level components useful to the rest of the team. It would also be a pain to maintain for those unfamiliar with some of the details but can be well encapsulated into a simple function call in a math library. Thw other case this illustrates is that code evolves and a solution available now to make a system simpler may not have been available in the past. Today the same code for fast inverse square root is outdated in favor of hardware calls, so if observing the code now it is certainly over complicated for the solutions available at hand. [0] https://en.m.wikipedia.org/wiki/Fast_inverse_square_root https://en.m.wikipedia.org/wiki/Fast_inverse_square_root
- StavrosK 11y agoThis is about optimizations, which are the exception to the rule. Optimizations are just a necessary evil, they aren't what we should base our coding standards around. As you also pointed out about hardware support, we tend to stick these in as lower a level as possible, so we can back to our simple and elegant abstractions as quickly as possible.
- esailija 11y agoI find whenever some code is "simple", it's just not really doing anything at all and whatever it's actually doing, it's doing it badly. E.g. it's not handling anything other than some basic cases and performs horribly.