2 ms·
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships." ― Linus Torvalds Discussion: https://news.ycombi
by peterkelly 7y ago
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships."
― Linus Torvalds
Discussion: https://news.ycombinator.com/item?id=4560334 https://news.ycombinator.com/item?id=4560334
- Supermancho 7y agoThis is misused a bit, since the derivative collary is: After you optimize the data structures and have established relationships, worry about the code.
- tylerjwilk00 7y agoYes. We want to spend as little time as possible on code so we can quickly find the data structure that best solves the problem we have yet to understand. // I know nothing. Not sure what types would work best... public function method($data) // I know more public function method($data array) // More public function method($data array|false) // Even more public function method($data array|false) : int // Ah. Okay. I understand the problem domain and have proper data structures to solve it public function method($data array|false) : int|float Notice the type system never got in our way. We organically grew into the type system as our understanding of the data evolved.