Comment Goto and longjmp() (Score 1) 677
My use of goto sounds like everybody else's: if(something_bad_has_happened) goto code_to_fix_it;
In highly modular code with lots of procedures the "goto" may end up as a longjmp(). So be it.
...laura
My use of goto sounds like everybody else's: if(something_bad_has_happened) goto code_to_fix_it;
In highly modular code with lots of procedures the "goto" may end up as a longjmp(). So be it.
...laura
Yes, they did.
In another job interview I was asked to write a program to generate prime numbers. I clarified a couple of requirements ("is memory usage an issue?"), and implemented the Sieve of Eratosthenes. It works, you know why it works, any idiot can read the code and understand it, and if testing shows you need something better (in some sense), you know where to start.
...laura
Regardless of the final implementation, there are problems where the simplest, clearest solution is a recursive one. You type it in to the computer as fast as you can type, it compiles and runs correctly the first time, and then, if you need to change it, you have a place to start.
On a job interview some years ago I was asked to write C code to reverse a string. I wrote it recursively: interchange the first and last elements, then reverse what's inside.
They liked my creativity. I got the job.
...laura
There's a joke that's been circulating in liberal circles for the past few years that posits that Obama should come out publicly in favour of some kind of basic but necessary human activity, such as breathing or eating, the punchline being that Republicans will then immediately come against it and suffer the obvious consequences.
So, over the weekend, Obama came out strongly in favour of getting your kids vaccinated.
Star Trek: The Next Generation was generally well-done, with interesting charcerters and only a few clunker episodes.
I found Deep Space 9 an interesting concept let down by unimaginative writing.
I found Voyager unwatchable. Janeway came across as an affirmative action bureaucrat. A Captain is a monarch, not a bureaucrat. Patrick Stewart had played Shakespearean kings, and played Picard the same way. It worked. What Janeway needed was a good desk.
Sliders was a really interesting premise that ran out of steam. The same story every week. Yawn.
The X Files also started out well and also ran out of steam, descending in to torture porn.
Didn't watch any of the others, so no comment.
...laura
interlard - vt., to intersperse; diversify -- Webster's New World Dictionary Of The American Language