This link was posted by thunderbong 2 hours ago on HN. It received 125 points and 43 comments.
pull down to refresh
21 sats \ 2 replies \ @didiplaywell 3 Sep 2024
Isn't greppability another word for "readability"? Striving for readability makes the code inherently greppable in my experience. Comprehensive and concise descriptions next to functions also incidentally provide very useful search keywords.
reply
20 sats \ 1 reply \ @mbrochh1 3 Sep 2024
Not quite. A codebase that is very anal about DRY (like the first example about shipping_address in the article) can still be perfectly readable, and yet it is not greppable.
reply
0 sats \ 0 replies \ @didiplaywell 3 Sep 2024
I see, it's a concise example. If the variable is to be used repeatedly, not writing its complete name at each occurrence is a dependency time-bomb. I guess in my case I didn't considered that because I never do that, so "readability" is enough, but you are right, greppability is also needed for an overall robust result.
reply
0 sats \ 0 replies \ @oldkingdom 3 Sep 2024 freebie
The article is surprisingly useful as I am a Grep fanboy. Refactoring your code that way will really make it easier to GREP. I like your take on this.