Solutions Repositories are to Yahoo! as Code Search is to Google
Remember the Yahoo directory? There was a time when curated directories were thought to be the best way to find things on the internet. Today, we know this is an impossible task and a model that failed for a couple of reasons. Curated indexes are exclusionary, and they're time consuming both to maintain and find information.
Figure 1 – The old Yahoo directory—not very useful
If you want to have a useful index, you must exclude the things that aren’t useful. But how do you differentiate between what’s useful (high quality) and what’s not useful (low quality)? Probably very subjectively, and I'd imagine this varies wildly from one person to the next. What if what you're looking for isn't in the directory? You're out of luck. Say you find a couple of close matches, but on further inspection, they’re not really what you were after. It would be like searching through an old card catalog at the library, which led you to a book, but now you have to look through the book to determine if it even contains the information you were looking for in the first place!
With the amount and speed at which content is generated on the web, it’s very easy to see how trying to classify and maintain a list of the useful information could fall short. It’s simply and almost immediately out of date.
What does this have to do with code? Code that we write is typically useful and reusable (hopefully both!). How do we make this available for reuse? How do you keep up with classifying and deciding what to set aside? Until recently, the only good way to do this was to set it aside in a central spot. This is the model of early days (like Yahoo!).
A Better Way
The better way is to store EVERYTHING in a source control system that also has strong search capabilities…a solutions repository. There is no excuse for a development team or developer to not use such a system to capture code and track changes. Capturing your code should be part of your workflow. If it has search capabilities as well, then you never have to worry about stopping, picking, cleaning up, and sticking your code somewhere; it's always a search away. Much like content on the web, you never know what will be important to someone, and it’s probably being produced at a volume that makes classifying it cost prohibitive.
At ArcherPoint, we have retroactively moved all our code to a source control system that now has awesome search. For example, if I need to find a MICR check in our code repository, I do a search for the following:
file: REP50*.txt "MICR"
Now, I get almost every MICR check we’ve ever done here at ArcherPoint across many different versions of NAV in a list where I can see the code and whittle down which one might jump-start my task. I’ve also used it to find examples of many other tasks other developers have done going back 5+ years. At the time the code was saved, we weren’t using a source control system with a fantastic search and had no idea it would now be so accessible. This is exactly what sparked this blog post. Stop trying to decide what’s important. Save it all and search when you need it!
Below are some of the more popular code repos and instructions on using their code search features.
If you have any Dynamics NAV or Business Central questions for any version, contact ArcherPoint.
If you are interested in NAV/Business Central development, check out our collection of NAV or Business Central Development Blogs.