4 ms·
There's YAGNI and then there's Suitable for Purpose. If you display a thing like a tree, then people are going to expect to do tree-like things to it, like coll
by moron4hire 3y ago
There's YAGNI and then there's Suitable for Purpose. If you display a thing like a tree, then people are going to expect to do tree-like things to it, like collapse views and reorder items. You might as well just git gud at tree operations and save yourself the hassle once and for all of chasing down edge cases every time a new feature request comes in for things that should have been natural extensions but you omitted "cuz YAGNI".
- civilized 3y agoJust because something has a tree structure, it needs to be able to support all tree operations? Why is that such a compelling argument to you? What if it just doesn't?
- setr 3y agoIt’s more like: if something has a tree structure, and the project scope is not 100% finalized, then more likely then not tree operations are going to eventually be requested. The cost savings from the hack is so low versus a standard tree representation that it’s unlikely to be worth the risk this occurs
- civilized 3y agoThe cost savings is low but the risk is high? How do you figure? It sounds like both options are easy (one is just even easier) so there's not much risk if we have to switch.
- moron4hire 3y agoThe thing is, once you learn how to do tree operations, they aren't that hard to do. I'm not talking about learning how to balance a binary tree in the most efficient way possible. I'm talking about the basic ops of breadth- and depth-first traversals of arbitrary trees. I feel like we live in an era of software development that took a stupid meme about "inverting a binary tree" as a job interview question and--not knowing anything about trees--turned it into received wisdom that "trees are hard". But they just aren't. And yet so many people live in fear of them and go to great lengths to avoid having to learn how to use them.