What could they have been thinking?
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
Well, what were they thinking? Something like this, maybe: "Yeah, this program is so hot, it will hit them the face... right after it surprisingly started, which will not happen in the next 3 centuries. My, that _will_ be a surprise..." "Oh my dear! The Hardware is not yet warmed up, I need a pause before the final initialization. Let's just copy-paste some example over!" "Heehehe, hohohooho, muhahahaha!" "Braaaaaains!"
That seems to be a PEBKAC problem, Sir. Why don't you go and fetch a coffee while I handle the operation?
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
An engineer who was about to leave that company wrote that line for he knew that the other "engineers" there would not be able to find it out.
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
"Dude, We should give *Enough* time for people to evacuate the building before the application launches!" "Just read about a funny thing called FOR loop.. Let me see how long I can make it run" "Here's a hilarious tweak on the program... don't worry, I'll be deleting it before deploying" "Dude, what's the longest number you can think of????"
- Just that something can be done, doesn't mean it should be done. Respect developers and their efforts! Jk
-
Recently my group was asked to troubleshoot an embedded program written by our overseas sister company, which was "never coming up" and their engineers(?) couldn't figure out why. A few seconds of perusing revealed the following in the middle of the program's initialization code:
for (long i = 0; i < 99999L; i++) dlytsk(cur_task, DLY_SECS, 9999);
The dlytsk function causes the calling task to sleep for the specified number of seconds. So the effect of this snippet was to sleep for around 32 years before allowing initialization to complete. One has to wonder what the original intent was (both of the programmer and the manager who hired him!).
job security?
-
An engineer who was about to leave that company wrote that line for he knew that the other "engineers" there would not be able to find it out.
The way I see the engineer who wrote it was a genius and all other engineers in the company are morons who can't find such an obvious fault. The engineer might have gone on to bigger better things for sure. Damn with the company that hired the other engineers, fire them and re-hire this guy.