4 ms·
Or, alternately, lay your code out like you'd lay out your workshop. In our houses we tend to use the same things in the same ways each day. There's just the o
by samatman 8y ago
Or, alternately, lay your code out like you'd lay out your workshop.
In our houses we tend to use the same things in the same ways each day. There's just the one razor, keep it next to the shaving cream.
In a workshop, we need to cooperate with other people, and even for ourselves, it's important to be able to find a tool when we need it. All the X-acto blades go in the same drawer, next to the drill bits.
Which one is more like your codebase? If it's a blog, might be the house. I think more code is workshop-like, but YMMV.
- Sacho 8y agoWhat if the workshop grows into a factory? Then you have people walking into the gigantic tool closet, overwhelmed by all the tools they'll never use when they just want to find their wrench. I don't think metaphors really help here and it's mostly a matter of consistency and tooling. Instead of having to guess who uses a function or where it originates from, my editor gives me "go to definition" and "find all references". I also have "go to symbol", which allows me to search for classes or functions instead of having to browse the folder structure manually. I think it's best to optimize for the advanced tools we have to inspect a codebase instead of manual browsing and aesthetics.
- samatman 8y agoThe article was basically "what if struct of arrays instead of array of structs?"