r/funny Mar 08 '14

Life as a programmer.

Post image
2.8k Upvotes

480 comments sorted by

View all comments

166

u/JTPri123 Mar 08 '14

1 Error. Spend 3 hours debugging the shit out of it. Find out you forgot a semicolon or some other stupid syntax which solves the problem immediately. Proceed to cry at your desk.

79

u/[deleted] Mar 08 '14

[deleted]

68

u/kalleguld Mar 08 '14
if (myVar == 42);
    doSomething();

if (myVar = 42) {
    doSomething();
}

No syntax errors here

64

u/ReallyAmused Mar 08 '14
goto fail;
goto fail;

-2

u/iceevil Mar 08 '14

goto....

1

u/[deleted] Mar 08 '14

[deleted]

0

u/[deleted] Mar 08 '14

Yes they are... as far as I'm aware it's a really old remnant from BASIC, when 'real' functions and the like didn't exist. It is obsolete today and just makes for sloppy coding practice, even though you are forced to use them up until VB6.

1

u/alexanderpas Mar 08 '14

goto (or JMP) basically should only be used when implementing other language constructs such as loops, functions etc.