Subj : Re: Are programmers like this in the real world? To : comp.programming From : Pat Kreiner Date : Sat Jul 30 2005 07:02 pm I can't believe that you'd expect people who were just beginning to learn how to program to do it as well as someone who'd been doing it for 10 years. I mean, someone who's played a sport or a musical instrument for 10 years would be a heck of a lot better at it than a beginner. > In class the instructor proclaims he >will enlighten us by showing >us how to reverse the order of a singly- >linked list. "So how would we >go about doing this?" he asks, that >knowing gleam in his eye. I >chuckle to myself, at his and my shared >secret: a couple book-keeping >variables for _next and _prev and this'll >be just a routine run through >the list. Nope. "Of course, we will just >push the whole entire list >onto a stack and then push it back!" >That strange smell is my faith in >humanity being engulfed in the flames of >hellfire. The stack solution is elegant plus easier to read and debug. If you had a library of stack functions already written and no concerns about space, it sounds like a good choice. Pat Kreiner .