4 ms·
It’s worth spending some time learning the grep or similar CLI tools that can quickly find the files containing the relevant keywords you are looking for. Even
by stinos 6y ago
It’s worth spending some time learning the grep or similar CLI tools that can quickly find the files containing the relevant keywords you are looking for.
Even though it is great advice, there is some sadness in the fact that it should even be advice. Apart from knowing how to enter code, the other most basic thing should be knowing how to lookup code?
Nitpick: it shouldn't be a CLI tool, a proper text editor or even IDE allows you to perform the same thing as well. Many text editors also have a pretty good indexing which will show matches on hovering the mouse. Never good enough to blindly trust, but usually faster and does a good job as 'quick win' for the first attempt.
- petepete 6y agoOr better still, you should be able to integrate a decent search tool into your editor. I'd take ag or rg over the built-in ones I've seen and being able to use them alone or in vim (or in a script) is a huge benefit.
- fphilipe 6y agoThis is a skill I've noticed that many developers don't have, or don't have sufficiently. This lack manifests itself e.g. when I review a PR that removes feature XYZ. I do `rg xyz` and `fd xyz` to see if there's anything that was forgotten to be removed related to that feature. Very often there is.
- stinos 6y agoThis is a skill I've noticed that many developers don't have, or don't have sufficiently Yes, and I have trouble understanding how that is possible. Ok if you've never programmed and are just a beginner, but otherwise? Or does it depend on the kind of code? I assume this gets taught in programming / CS course, no? Or maybe not, and that is the problem?
- Aeolun 6y agoIt’s much easier to leave in some extra code because the compiler won’t complain.
- xh-dude 6y agohttps://missing.csail.mit.edu/ https://missing.csail.mit.edu/ is on point here. I think there’s an argument that instructors’ time is better spent on other things, but, yeah, students should be exposed to this stuff somehow or other.
- peterkos 6y agoI love keeping Sublime Text installed even for iOS work for just this reason -- no (smart) autocomplete and debugger make it hard to use day-to-day, but the raw speed at which it can navigate code is just awesome.