3 ms·
Yes, exactly, now you need special tools (you mentioned IDEs) when previously you could have used grep.
by 4ad 4y ago
Yes, exactly, now you need special tools (you mentioned IDEs) when previously you could have used grep.
- maxbond 4y agoYou could also use CScope or grep for the constant's variable name. I don't consider an IDE to be particularly specialized, but you do you, I hate it when people tell me I'm using the wrong IDE, so I'm not going to tell you to use an IDE. To be clear, I grep for things all the time, even though I use an IDE.
- 4ad 4y agoIt's not about searching for specific values either. Sometimes you find some unknown value that's not reflected in the out of date or simply wrong datasheet. What does it do? Well, it's quite likely it does something related to other values that use the same mask, so you can try to figure out the mask by searching for lexical subsets of the value, which because of the magic of base 16 is an extremely effective strategy in finding related things. Much harder now with underscores. And it's also about being able to search Google for a found constant, which indexes other people's code. There have been plenty of occasions where I found newer version of proprietary driver code that the hardware manufacturer claimed it either lost or doesn't exist and won't provide to us by simple searching for constants on Google... But more often is to just find drivers from other operating systems that already support that device, or mailing lists or forums where other people try to reverse engineer the device.
- maxbond 4y agoFor sure. I think there are some semantic/type-aware grep implementations. I'm sorry this language feature creates frustration for you and interrupts your workflow.