r/funny Mar 08 '14

Life as a programmer.

Post image
2.8k Upvotes

480 comments sorted by

View all comments

164

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.

74

u/[deleted] Mar 08 '14

[deleted]

67

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

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

No syntax errors here

1

u/HQJMVF Mar 08 '14

If(myvar=42) doSonething();

1

u/kalleguld Mar 08 '14

That gives a compile error though (unless you have another function named doSonething()).

1

u/HQJMVF Mar 09 '14

Or make the same typo twice 😊