0292: "Goto"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
Hench
Porn, hence, Man
Posts: 498
Joined: Wed Mar 28, 2007 4:16 pm UTC
Location: Right between my eyes
Contact:

0292: "Goto"

Postby Hench » Fri Jul 20, 2007 4:04 am UTC

Image

http://xkcd.com/c292.html

Title text: Neal Stephenson thinks it's cute to name his labels 'dengo'.

I'm not really sure what the joke in the alt text is...otherwise, very nice use of raptors. I didn't see that coming at all; very nice, as always, Randall!

This one hits home a little because I just finished up making a rather slick Java app for my workplace. Though, Java lacks goto statements...so not really similar with that, more the flow-control.
Last edited by Hench on Wed Aug 01, 2007 12:36 pm UTC, edited 3 times in total.
Spoiler:
Your perceptions will not change reality, but simply color it.

damata_chip
Posts: 2
Joined: Thu Jul 19, 2007 7:41 am UTC
Location: Brisbane, Australia
Contact:

Postby damata_chip » Fri Jul 20, 2007 4:06 am UTC

Haha i love it. This is exactly what was drilled into our heads in the first programming unit i took at uni ^^

User avatar
mrcheesypants
Posts: 408
Joined: Tue Apr 24, 2007 10:59 pm UTC
Contact:

Postby mrcheesypants » Fri Jul 20, 2007 4:08 am UTC

Simply hilarious

fourier404
Posts: 8
Joined: Sat May 19, 2007 6:07 am UTC

Postby fourier404 » Fri Jul 20, 2007 4:11 am UTC

Ha, I'm still in high school, but my dad drilled this into my head anyway. I've only ever felt the urge to use it once though, perhaps it takes decades rather than years to encounter the dark side in full force.

User avatar
Dr. Venture
Posts: 24
Joined: Wed Jul 18, 2007 2:17 am UTC
Location: U.S.

Postby Dr. Venture » Fri Jul 20, 2007 4:11 am UTC

Raptors! Always around every corner, just waiting for you to drop your guard.

Learning that real Velociraptors were small and covered in feathers saddened me.
Resident super-scientist.

gompers
Posts: 4
Joined: Sun Dec 03, 2006 7:45 pm UTC

Postby gompers » Fri Jul 20, 2007 4:12 am UTC

That's an appropriate punishment for using a GOTO.

Multiple raptors would be necessary for GOTO DENGO.

User avatar
Darcey
Posts: 188
Joined: Sun May 13, 2007 9:47 pm UTC
Location: Rochester, NY
Contact:

Postby Darcey » Fri Jul 20, 2007 4:13 am UTC

Today I was programming something and discovered that there was an occasional error due to ints in Java going negative when they get too big. Instead of changing it, however, I said "what the hell, it's not that big of a deal", and went back to reading the fora here.

I am starting to feel that this was a mistake. *glances over shoulder*

User avatar
wing
the /b/slayer
Posts: 1876
Joined: Tue May 29, 2007 5:56 am UTC

Postby wing » Fri Jul 20, 2007 4:13 am UTC

fourier404 wrote:Ha, I'm still in high school, but my dad drilled this into my head anyway. I've only ever felt the urge to use it once though, perhaps it takes decades rather than years to encounter the dark side in full force.
The first time you're looking at 5 million lines of code that your team just spent 2 years on and the customer requests some asinine feature that requires a complete restructure (or a goto), you will be SORELY tempted.

And then eaten by a Raptor if you make the wrong choice.
I AM A SEXY, SHOELESS GOD OF WAR!
Akula wrote:Our team has turned into this hate-fueled juggernaut of profit. It's goddamn wonderful.

ADB
Posts: 2
Joined: Fri Feb 09, 2007 5:09 am UTC

Postby ADB » Fri Jul 20, 2007 4:14 am UTC

That is the most obscure and contrived Cryptonomicon reference I have ever heard in my life. >_>

User avatar
MrBawn
Posts: 56
Joined: Thu Sep 28, 2006 7:52 pm UTC

Postby MrBawn » Fri Jul 20, 2007 4:14 am UTC

Raptor Considered Harmful.

User avatar
mikesty
Posts: 36
Joined: Sun Oct 29, 2006 6:02 am UTC
Location: 127.0.0.1
Contact:

Postby mikesty » Fri Jul 20, 2007 4:18 am UTC

Raptors: A Formidable Substitute For "Terry Tate - Office Linebacker"
Have A Nice Day :)

zenten
Posts: 3799
Joined: Fri Jun 22, 2007 7:42 am UTC
Location: Ottawa, Canada

Postby zenten » Fri Jul 20, 2007 4:20 am UTC

What happens if you use a COMEFROM?

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: "Goto" Discussion

Postby skeptical scientist » Fri Jul 20, 2007 4:21 am UTC

Hench wrote:Alt: Neal Stephenson thinks it's cute to name his labels 'dengo'.

I'm not really sure what the joke in the alt text is...otherwise, very nice use of raptors. I didn't see that coming at all; very nice, as always, Randall!

I didn't get it either, even though I've read Cryptonomicon. According to Wikipedia, "Goto Dengo is a fictional character from Neal Stephenson's Cryptonomicon" which explains the joke. He's a fairly minor character though, if I remember correctly.

By the way, Cryptonomicon is one of my favorite novels, and Stephenson is a brilliant author, so anyone who hasn't read it should go and check it out from the library immediately (if not sooner). The following is one of my favorite passages from the book (and contains no plot spoilers):
Lawrence wondered what use America would find for him.

He went back to Iowa State, considered changing his major to mathematics, but didn't. It was the consensus of all whom he consulted that mathematics, like pipe-organ restoration, was a fine thing, but that one needed some way to put bread on the table. He remained in engineering and did more and more poorly at it until the middle of his senior year, when the university suggested that he enter a useful line of work, such as roofing. He walked straight out of college into the waiting arms of the Navy.

They gave him an intelligence test. The first question on the math part had to do with boats on a river: Port Smith is 100 miles upstream of Port Jones. The river flows at 5 miles per hour. The boat goes through water at 10 miles per hour. How long does it take to go from Port Smith to Port Jones? How long to come back?

Lawrence immediately saw that it was a trick question. You would have to be some kind of idiot to make the facile assumption that the current would add or subtract 5 miles per hour to or from the speed of the boat. Clearly, 5 miles per hour was nothing more than the average speed. The current would be faster in the middle of the river and slower at the banks. More complicated variations could be expected at bends in the river. Basically it was a question of hydrodynamics, which could be tackled using certain well-known systems of differential equations. Lawrence dove into the problem, rapidly (or so he thought) covering both sides of ten sheets of paper with calculations. Along the way, he realized that one of his assumptions, in combination with the simplified Navier-Stokes equations, had led him into an exploration of a particularly interesting family of partial differential equations. Before he knew it, he had proved a new theorem. If that didn't prove his intelligence, what would?

Then the time bell rang and the papers were collected. Lawrence managed to hang onto his scratch paper. He took it back to his dorm, typed it up, and mailed it to one of the more approachable math professors at Princeton, who promptly arranged for it to be published in a Parisian mathematics journal.

Lawrence received two free, freshly printed copies of the journal a few months later, in San Diego, California, during mail call on board a large ship called the U.S.S. Nevada. The ship had a band, and the Navy had given Lawrence the job of playing the glockenspiel in it, because their testing procedures had proven that he was not intelligent enough to do anything else.
Last edited by skeptical scientist on Fri Jul 20, 2007 4:22 am UTC, edited 1 time in total.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
SimonSwift
Posts: 48
Joined: Wed May 23, 2007 5:06 am UTC
Location: Minneapolis, Minnesota
Contact:

Postby SimonSwift » Fri Jul 20, 2007 4:22 am UTC

:lol:

Oh shit, I should be nervous after this comic...I have some pretty awful coding habits...But hey, I'd beat the hell out of a velociraptor, mono-a-mono if it meant saving myself from restructuring my entire code.

<_<

~Siswi
P.S. I hate you.
P.P.S. Apologies for the verbosity.
--------------------
This delightful post brought to you by Simon Swift.
Simon Swift: The new not-Simon Swift.

med31415
Posts: 4
Joined: Sat Jun 02, 2007 12:27 am UTC

Postby med31415 » Fri Jul 20, 2007 4:23 am UTC

Ohh the raptors are back!

or they really never left?! ¬¬

Herman
Posts: 559
Joined: Wed May 02, 2007 2:46 am UTC

Postby Herman » Fri Jul 20, 2007 4:26 am UTC

So apparently stick figures can indeed:

1. Turn you on. (See: Alone)
2. Make you jump back in your seat.

Good to know.

User avatar
Tempoz
Posts: 7
Joined: Fri May 11, 2007 4:15 am UTC

Postby Tempoz » Fri Jul 20, 2007 4:27 am UTC

Yeah, java ints really tick me off. This became a big problem in my comp sci class at one point.
Fighting back raptors using apple minis is extremely effective. They're so very adorable and lightweight that they make wonderful decoys for your limbs. But all it takes is one bite and the raptor has AC current coursing through it. Good thing we had a room full of 'em.
Fortunately, python handles big numbers just fine.
Image
If you are visually impaired or cannot otherwise read this confirmation code, then you probably can't see this message either so it's questionable why we put it here.

User avatar
saxything43
Posts: 179
Joined: Mon Mar 19, 2007 4:03 pm UTC
Location: The band room, probably.
Contact:

Postby saxything43 » Fri Jul 20, 2007 4:28 am UTC

*sigh* I think I'm going to have to get my hacker girlfriend to teach me coding from ground zero. Otherwise, I'll never catch up with you guys. I mean, this comic made ZERO sense to me because I don't know anything about codes....:( I have a lot of work ahead of me.
This post brought you to by the number 42.

User avatar
Bakemaster
pretty nice future dick
Posts: 8933
Joined: Fri Jul 06, 2007 2:33 pm UTC
Location: One of those hot places

Postby Bakemaster » Fri Jul 20, 2007 4:31 am UTC

SimonSwift wrote:But hey, I'd beat the hell out of a velociraptor, mono-a-mono

Mano-a-mano, actually; "hand to hand" in Spanish.

The More You Know
______~~~~^^^*
Image
c0 = 2.13085531 × 1014 smoots per fortnight
"Apparently you can't summon an alternate timeline clone of your inner demon, guys! Remember that." —Noc

GMWeezel
Posts: 53
Joined: Sun Jun 10, 2007 3:00 am UTC

Postby GMWeezel » Fri Jul 20, 2007 4:33 am UTC

SimonSwift wrote::lol:

Oh shit, I should be nervous after this comic...I have some pretty awful coding habits...But hey, I'd beat the hell out of a velociraptor, mono-a-mono if it meant saving myself from restructuring my entire code.

<_<

~Siswi


Monkey to monkey? I think you mean mano-a-mano.

Comic was laught out loud hilarious and made me think of when i finally realized how evil GOTO is.
Wanted to know if signatures were dynamic or static.

User avatar
space_raptor
Posts: 1497
Joined: Fri Nov 17, 2006 5:02 pm UTC
Location: Calgary
Contact:

Postby space_raptor » Fri Jul 20, 2007 4:35 am UTC

GOTO DENGO! Hah! Ugh.

This is a pretty good comic, but it's kind of an inside joke. You have to know about programming, and the raptor thing, and have read Cryptonomicon.

I laughed, but I feel kinda bad for laughing, since its a coding joke.
The drinking will continue until morale improves.

Chris
Posts: 4
Joined: Wed Jul 18, 2007 5:05 am UTC
Location: Everywhere New Jersey
Contact:

Postby Chris » Fri Jul 20, 2007 4:37 am UTC

Darcey wrote:Today I was programming something and discovered that there was an occasional error due to ints in Java going negative when they get too big. Instead of changing it, however, I said "what the hell, it's not that big of a deal", and went back to reading the fora here.

I am starting to feel that this was a mistake. *glances over shoulder*


doesn't java have unsigned ints? might add a bit more headroom. I donno been a while.

Loved the comic. I remember my first programming class in highscool which was in BASIC, we used quite a few goto's. Then I get to college and I'm pretty sure the professor almost brained me with my own keyboard. That and returning mid function ( "Always use an intermediate value and return that!" ).

User avatar
Invisible_Insane
Out of Sight, Out of Mind
Posts: 237
Joined: Fri Dec 29, 2006 4:53 pm UTC
Location: Ithaca. Occasionally Brooklyn.
Contact:

Postby Invisible_Insane » Fri Jul 20, 2007 4:38 am UTC

I only ever learned to program in BASIC. I used so many 'GOTO' statement; I'm surprised a gang of raptors hasn't...

{turns around}
Belial?! Save me with your formidable, yet non-raptor ways!
God is to Microsoft as Human Nature is to Windows Vista.

blake_
Posts: 2
Joined: Tue Jul 10, 2007 9:50 pm UTC

Postby blake_ » Fri Jul 20, 2007 4:47 am UTC

Chris wrote:doesn't java have unsigned ints? might add a bit more headroom. I donno been a while.


nope. not as a primitive. but it does have longs if you need a bit more room. otherwise you've got to go to the BigInteger class

User avatar
Mighty Jalapeno
Inne Juste 7 Dayes I Wille Make You A Hero!
Posts: 11265
Joined: Mon May 07, 2007 9:16 pm UTC
Location: Prince George In A Can
Contact:

Postby Mighty Jalapeno » Fri Jul 20, 2007 4:53 am UTC

I always preferred GOTO HELL.

placeholder
Posts: 20
Joined: Tue Jun 12, 2007 12:31 am UTC

Postby placeholder » Fri Jul 20, 2007 5:21 am UTC

Actually, Goto Dengo had a fairly major role in the Cryptonomicon. Major Spoilers follow hereafter, in white. Select the text to make it easily legible.

He was on a ship in the Japanese navy as it was sunk, got stranded, lived in the jungle for a while, rejoined the Japanese army, eventually got slated to build the vault where the gold was kept, eventually interacted with Shaftoe and became a friend to MacArthur, founded the Dengo construction business that later shows up building the Crypt, then goes on to unite with Randall Waterhouse and his business partner when they decrypt the Arethusa Intercepts and find the location of the vault where the gold was kept.



I seriously think he was one of the most important characters, and showed up as a point-of-view character rather frequently (one of the four total, if I recall correctly, 2x Waterhouses, 1x Shaftoe, 1x Dengo).

User avatar
marco
Posts: 34
Joined: Fri Jul 06, 2007 5:59 am UTC
Location: -----

Postby marco » Fri Jul 20, 2007 5:22 am UTC

a warning from the compiler would be fair before unleashing the raptor :)...but then again gotos are 'legal'..
"I wonder if she lets anyone into that island of light"

User avatar
frezik
Posts: 1336
Joined: Wed Jan 10, 2007 7:52 pm UTC
Location: Schrödinger's Box

Postby frezik » Fri Jul 20, 2007 5:29 am UTC

placeholder wrote:I seriously think he was one of the most important characters, and showed up as a point-of-view character rather frequently (one of the four total, if I recall correctly, 2x Waterhouses, 1x Shaftoe, 1x Dengo).


Yeah, Stephenson wrote enough on just Dengo to fill a normal book. But this is Stephenson we're talking about. The last time he wrote a normal-sized book, Reagon was president.

Yamamoto gets to be a POV character briefly, too.

While looking around at Stephenson books, I caught something on Amazon that disturbs me greatly. "Zodiac" has nothing to do with astrology (it's named after the inflatable boat), but the publisher sticks that right on the cover. What was wrong with the old fish-with-a-gas-mask cover?

User avatar
Mighty Jalapeno
Inne Juste 7 Dayes I Wille Make You A Hero!
Posts: 11265
Joined: Mon May 07, 2007 9:16 pm UTC
Location: Prince George In A Can
Contact:

Postby Mighty Jalapeno » Fri Jul 20, 2007 5:32 am UTC

frezik wrote:Yeah, Stephenson wrote enough on just Dengo to fill a normal book. But this is Stephenson we're talking about. The last time he wrote a normal-sized book, Reagon was president.


Who was this "Reagon"? He sounds a fearsome warrior...

Hix
Posts: 364
Joined: Sun Oct 15, 2006 5:46 pm UTC

Postby Hix » Fri Jul 20, 2007 5:37 am UTC

MrBawn wrote:Raptor Considered Harmful.
"Raptor Considered Harmful" Considered Harmfully Misleading Understatement.

User avatar
Taedirk
Posts: 9
Joined: Wed Jun 06, 2007 10:16 pm UTC

Postby Taedirk » Fri Jul 20, 2007 5:42 am UTC

I would so put this on a shirt and wear it to my CompSci classes. One of my professors says at the beginning of every semester that he will fail anyone attempting to write GOTO statements in his assignments. I would wear it for the simple fact that I'd be guaranteed a good grade (and because I fear raptor attacks while coding).

User avatar
e946
Posts: 621
Joined: Wed Jul 11, 2007 6:32 am UTC

Postby e946 » Fri Jul 20, 2007 6:23 am UTC

I used 3 or 4 gotos in my most recent program. Am I going to die?

User avatar
Taejo
Posts: 60
Joined: Wed Oct 11, 2006 8:00 am UTC

Postby Taejo » Fri Jul 20, 2007 6:35 am UTC

I haven't used GOTO in a long while (I had no choice but Java at school, and was paid actual money to learn Python -- and not part of a job -- so I got used to living without it) but I'm surprised this doesn't hurt more people, since BASIC is (I assume) the most popular language amoung pre- and young teens. I used BASIC until I was 15. Aren't the young 'uns raptor delicacies? Post edited for reasons of conspiracy.
Indiscreet Mathematics, a comic about maths

User avatar
Peripatetic
Posts: 135
Joined: Fri Sep 08, 2006 8:47 am UTC

Postby Peripatetic » Fri Jul 20, 2007 6:55 am UTC

Funny enough, the Linux kernel actually makes frequent use of goto.

http://kerneltrap.org/node/553/2131

Linus himself defends the practice here. Maybe that's why he's so irritable; he's constantly fending off raptors.

jamesh
Posts: 13
Joined: Fri Jul 20, 2007 6:39 am UTC

Postby jamesh » Fri Jul 20, 2007 7:11 am UTC

Bakemaster wrote:
SimonSwift wrote:But hey, I'd beat the hell out of a velociraptor, mono-a-mono

Mano-a-mano, actually; "hand to hand" in Spanish.


Why do you assume he isn't talking about monkey-to-monkey combat?

User avatar
Bakemaster
pretty nice future dick
Posts: 8933
Joined: Fri Jul 06, 2007 2:33 pm UTC
Location: One of those hot places

Postby Bakemaster » Fri Jul 20, 2007 7:17 am UTC

Because a velociraptor is not a monkey.
Image
c0 = 2.13085531 × 1014 smoots per fortnight
"Apparently you can't summon an alternate timeline clone of your inner demon, guys! Remember that." —Noc

User avatar
Forthur
Posts: 163
Joined: Sat Jun 02, 2007 8:19 pm UTC
Location: Behind a computer, as always.
Contact:

Postby Forthur » Fri Jul 20, 2007 7:30 am UTC

Ever since I switched from GWBASIC to Turbo Pascal (and from there to C and Delphi), I haven't used goto's. I understand that in most cases preventing goto's causes more (nested) indentation, but as I'm using indentation steps of only 2 spaces (as opposed to more common 4 or even 8 spaces), I'm not often running out of horizontal space.

Besides, I'm writing heuristic AI algorithms. Those are complex enough not to need spaghetti code too. Although... maybe I could create some job security by changing this here... adding a global variable there... Oooh, a chance for a goto... and a bit of...
HOW DID THAT GET IN HERE!? THEY"RE EXTINCT! GET IT OFF! GET IT OFF! GET I...

* connection lost *
Life's biggest adventures are the dreams you try to make real.

jamesh
Posts: 13
Joined: Fri Jul 20, 2007 6:39 am UTC

Postby jamesh » Fri Jul 20, 2007 7:39 am UTC

Peripatetic wrote:Funny enough, the Linux kernel actually makes frequent use of goto.

http://kerneltrap.org/node/553/2131

Linus himself defends the practice here. Maybe that's why he's so irritable; he's constantly fending off raptors.


If you are programming in C, proper use of gotos can lead to code that is both more reliable and more readable. In situations where you'd use a try/finally structure in other languages, gotos can provide similar control flow in C.

User avatar
SpitValve
Not a mod.
Posts: 5130
Joined: Tue Sep 26, 2006 9:51 am UTC
Location: Lower pork village

Postby SpitValve » Fri Jul 20, 2007 7:40 am UTC

Chris wrote:doesn't java have unsigned ints? might add a bit more headroom. I donno been a while.


There is a "BigInt" class that lives in there somewhere.

Fortran has the same thing with large ints wrapping around to negative. I think it has a GOTO but I've never seen it used...

chishm
Posts: 59
Joined: Sat Jun 02, 2007 7:10 am UTC
Location: Canberra, Australia

Postby chishm » Fri Jul 20, 2007 7:42 am UTC

Gotos do have their uses. To me, it is more asthetically pleasing to use a goto to jump out of a nested inner loop to the outside of the outter loop, as opposed to having tests for a condition in both the inner and outter loop. Ada is nice in this regard, allowing you to break out of loops based on the loop's name.

They are also useful for error handlers (when exceptions aren't available, as in C). If you have a long function, and an error can occur at multiple points in the function, it is much nicer to have one block of clean up code that can be jumped to, rather than huge nestings of if statements or repeating the clean up code at multiple points in the function.

That being said, you could try refactoring the function into a caller and callee, where the callee returns an error code anywhere that an error occurs and the caller handles the clean up.


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: exoren22 and 98 guests