Greppability is an underrated code metric
Keeping your codebase searchable will make your maintenance life easier in the long run.
Hasnain says:
Can confirm greppability is underrated, in logs too.
“When I’m working on maintaining an unfamiliar codebase, I will spend a lot of time grepping the code base for strings. Even in projects exclusively written by myself, I have to search a lot: function names, error messages, class names, that kind of thing. If I can’t find what I’m looking for, it’ll be frustrating in the best case, or in the worst case lead to dangerous situations where I’ll assume a thing is not needed anymore, since I can’t find any references to it in the code base. From these situations, I’ve derived some rules you can apply to keep your code base greppable”
Posted on 2024-09-04T07:13:11+0000