Except for the fact the code was almost as old as I am (born in 1976) it turned out that the security check that the code was supposed to perform didn't actually execute.
Yepp, that's right, the code had been running for 30+ years doing nothing.
A friend of mine ended up doing the actual work so I don't know how the story ended but it's a good reminder to never assume _anything_ when you look for bugs.
bool operator<(.., ..)
{
return operator<(.., ..);
}
He ran the code and it worked. I was confused.Another student saw the teacher pass him and copied his implementation. His code didn't work. It gave the stack overflow error that I was expecting.
It turned out that the reason the guy had his code work in the first place was because it was never included in the program. He had put the code in his C++ file, but forgot to include it in his header. When the program compiled, it never knew his code existed.
For(i=1 to 10) {then print i; } Today my friend is working as a techie ....senior mgr at his new company!
C just happens to be the right choice for most of my projects today (I half seriously proposed FORTH for one before my cow-orkers threatened me with a dunking).
Let's make a distinction between Management as an HR function (writing reviews, dealing with org issues, fighting for equipment and office supplies) and Senior Geek Nirvana (design work, heavy lifting in code and debugging / shipping a product). I tried Management for a while, and it stunk.
Right now I'm in a great position as a senior technical guy (I hesitate to say "Architect" because most of the people I know with that title are self-appointed blowhards) who gets to decide how to do stuff. I lean on managers ("we need some chairs, and an oscilloscope") and project management (for setting up meetings, tracking bugs, etc.), and I get to write a ton of docs and code. It's terrific fun.
I'm living proof that you can be writing in C and not be a sour, dried-up dinosaur in the back corner of a lab somewhere.
Tolerance of, nay, encouragement of dissent (not insubstantiated rants) is the hallmark of a healthy community.
Btw, if you choose to downvote this, please explain why and what I am missing. Thank you.
Some people think that if you have social skills you can't be a 'real' hacker, but often sales skills and good presentation are a force multiplier for a contractor with good technical skills.