3 ms·
> But since the file is not located near the change, you need to search through the entire code base to see where the changed function is called in order to upd
by jmartrican 8y ago
> But since the file is not located near the change, you need to search through the entire code base to see where the changed function is called in order to update the calls.
Regardless if the method changed is in the same file or another directory my IDE will find it for me right away.
This is an age old discussion but I think it has been made somewhat moot by the speed and power of our IDE's. Essentially there have been two approaches...
1 ) Put things that are the same together. Tools go in the tool-shed, food in the kitchen.
2) Put things that you need to use at the same time together. Some tools can go in the kitchen because you need a few tools there. Maybe a small fridge in the tool-shed is not a bad idea.
A new third approach opens up as our IDE's got more powerful. Put the files anywhere. This is akin to having a robot in your house that regardless of where you are, it will make a tool or food appear for you on request. This is similar to how I no longer spend time organizing old emails because I just rely on the email system's powerful searching features to find what I need.
For example, my IDE (Netbeans) has CNTRL-O, which lets me go to any class file directly without going to any directories. It also has usage search and implementation search. If you digging around directories, then you doing it wrong. I am still not sold on putting your files in random places, but I just feel where you put them matters less for most purposes.
- jlebrech 8y agoanother option is to store code in a database so that you can access it however you want.
- Silhouette 8y agoIn data retrieval systems, there are typically two ways you find things: searching and browsing. What you're describing are the facilities that modern IDEs and editors provide to support searching. Those are great, and like you, I use those search facilities to jump directly to a specific point of interest a lot of the time when I'm developing. However, searching is useful only if you already know what you want to search for. If you're trying to explore the overall structure of a large program, having the files (and the contents within those files) organised systematically still makes browsing easier.