This is the first record of my existence I can find on the internet:
It’s a poorly worded question by a 16 year old Amir:
Is there an equivelant of the dos C function call “FindFirst” in linux?
I’ve looked all over & the closest I can find is something called
The only answer I received was:
This is the wrong list for this kind of question.
This is list is for *development* of gcc.
It seems funny now but when I was 16 and trying to learn to write C in linux (I had only written it in dos up until then) this was two problems:
I didn’t understand what the difference between GCC and the C runtime was, so this reply was just confusing to me.
Not being able to locate the correct function set me back by days.
I remember this vividly. I had written this goofy dos program that allowed you to rewrite bits of a file given a binary string. So I could do things like:
./amirs_thing -o 8032 -i file.in -s 110110110111011
It would then overwrite the bits at offset 8032 with the binary string you specified in file.in.
I don’t remember why I wrote it but I remember being proud of it. I also remember wanting to share it with other people. I was getting into linux at the time so my dream was to port it to linux and then have it published by GNU. To me at age 16 this was sort of like being given a purple heart, or a congressional medal of honor.
Reading the recent news of github’s new and improved code search (https://github.com/blog/1381-a-whole-new-code-search) made me remember this incident. FWIW I just spent 15 minutes playing with it. The github implementation is so much better than the code.google implementation or some of these weird “code indexers” I have seen popping up on google.
Now if I were to encounter the same confusion point I’d simply fire up github and search for it. Within just a few minutes of looking I’d have stumbled upon this repository, which contains an api compatible version of the dos findfirst: https://github.com/dimroc/sunborn_igf/. I’d probably realize that there is a linux function called readdir, and then realize that I could have found that in the man pages.
It’s funny to think back to those days and just how frustrated I was about this stupid findfirst call.
Given the availability of helpful tools like this that reduce the frustrating parts of coding and allow coders to spend more time in the “awesome implementation zen” phase I can’t help but wonder how much more efficient a good coder is today than 10 years ago.
Kids these days. They have it so easy with their stackoverflow and their github code search and their automatic can openers. Get off my lawn.
Anyhow, what do you guys think - is the wide availability of a free and highly intuitive code search as big of a deal as I think it is?