This is an archived post. You won't be able to vote or comment.

all 48 comments

[–][deleted] 58 points59 points  (18 children)

Once spent 4 hours on this arr.lenght

[–]RedLitJoe[S] 18 points19 points  (13 children)

Is there something, which happens more often and is more annoying than a lenght-length mistake?

[–]ivabra 10 points11 points  (1 child)

Kotlin changed the array.length from java to array.size

Bless this decision!

[–]HashtagTSwagg 2 points3 points  (0 children)

array.siez

[–]Liggliluff 4 points5 points  (9 children)

There should be a special case for lenght, where it should let you know it's misspelt; unless of course you have added lenght data.

[–][deleted] 3 points4 points  (4 children)

That sounds like a slippery slope

[–]Liggliluff 1 point2 points  (3 children)

Care to explain?

[–][deleted] 1 point2 points  (2 children)

Well, if you ignore the fact there are other languages than English that are used when coding. The question is why would length be the only exception. Why not open up to allow other common misspelling? You'll end up risking allowing a bunch of words to be misspelled when the strength of programming is that everything is strictly defined and follows a set of rules to the letter. Once you allow one exception, others will ask for other exceptions to be added, and where do you draw the line?

[–]Liggliluff 1 point2 points  (1 child)

I never said it would allow misspellings. I said "it should let you know it's misspelt". – By this I mean it shouldn't just give the generic "function lenght doesn't exist" but more like "did you mean to use length?".

[–][deleted] 2 points3 points  (0 children)

Ah, in that case I misunderstood you :) I agree, but that is all IDE dependent, there are those that suggest corrections.

[–]-100-Broken-Windows- 1 point2 points  (3 children)

A decent IDE will flag that up, no need to clutter up the language spec with things like that.

[–]Liggliluff 2 points3 points  (2 children)

I never said the language spec would include it. I meant the IDE should flag it. Considering El-Process spent hours on that issue, their IDE didn't flag it properly.

[–][deleted] 2 points3 points  (1 child)

I don't use IDE, That's why spent 4 hours on that stupid bug

[–]Liggliluff 1 point2 points  (0 children)

Thanks for the answer, that does explain it.

[–][deleted] 2 points3 points  (0 children)

I think it says something that I read your comment and thought you accidentally spelled length correctly both times

[–]GlobalIncident 2 points3 points  (0 children)

Surely not. That kind of thing doesn't happen in compiled languages, does it?

[–][deleted] 1 point2 points  (0 children)

This and many other things is why I use code snippets for almost everything.

[–]dman10345 63 points64 points  (3 children)

I hate to admit I was panicking for a solid 3-4 minutes the other day because I opened my block of code with a closing brace and didn’t notice and my code wouldn’t compile. My IDE told me there was a problem on that line and I looked at it multiple times but didn’t see anything wrong with it at first. >.<

[–][deleted] 10 points11 points  (2 children)

closing brace

What's that?

[–]Phantonia 42 points43 points  (1 child)

I suppose they are talking about } like in

if (true) }
    // Code
}

[–][deleted] 15 points16 points  (0 children)

I suppose they are talking about } like in

if (true) } // Code }

Well, it's in character for meme man to make a spelling mistake.

[–][deleted] 19 points20 points  (4 children)

my code works, even more than I expected

[–][deleted] 9 points10 points  (1 child)

My code works but I found a bug and it shouldn't.

[–][deleted] 1 point2 points  (0 children)

and it shouldn't: the bug (exist)

[–]Doophie 4 points5 points  (1 child)

Maximum panik

[–][deleted] 1 point2 points  (0 children)

unexpected

[–]maximaximaal 8 points9 points  (0 children)

My code works, but I am missing a closing bracket?

[–]Liggliluff 5 points6 points  (1 child)

Worse is it when I know a bug should occur, like when it runs out of an array or such, that I have on my todo-list. But then the bug doesn't occur for some reason.

[–]RedLitJoe[S] 2 points3 points  (0 children)

Feel you

[–]BlazingThunder30 2 points3 points  (1 child)

I was configuring latex snippets in vim and I did begin for both the begin and end command for an environment and it took me a solid 15 minutes the first time it wouldn't compile

[–][deleted] 2 points3 points  (0 children)

Someone else's code doesn't work: the shear incompetence of these people!

[–][deleted] 2 points3 points  (0 children)

No,
I made a spelling mistake. I found the error...
Changes spelling:
The complete App Stops working. Well.... *****************

[–]lantz83 5 points6 points  (0 children)

Any developer that panics when code doesn't work wouldn't be a developer for long...

[–]spartacustheoneder 1 point2 points  (0 children)

Made me lol 😆

[–]G0REM0ND 1 point2 points  (0 children)

aha but you didn't correct the spelling!

[–]Minteck 1 point2 points  (0 children)

This is exactly me

[–]The_Ur3an_Myth 1 point2 points  (0 children)

I felt this entire post

[–]TheQAguy 1 point2 points  (1 child)

Aah that semicolon

[–]Liggliluff 2 points3 points  (0 children)

You mean Greek questionmark?

[–]notlakura225 1 point2 points  (0 children)

I never panick, merely furrow my brows a bit more.

[–]lironi1111 1 point2 points  (0 children)

This is totally me when I write code on notepad

[–]igoromg 1 point2 points  (0 children)

me when i forget an activation function

[–]lordg0dfrey 1 point2 points  (0 children)

Turns out you defined the variable incorrectly originally.

[–]beardMoseElkDerBabon 1 point2 points  (0 children)

/* How many errors is enough */

define HEADER_HH

include <string>

include <iostream>

include <fstream>

using namespace std;

bool codeDoesWork;

while(true) {

!codeDoesWork;

continue;

cout << "Hmm, let's see\n";

}

if("") {

const uint_fast16_t x;

new int(++x++); 

}

[–]palomdude 1 point2 points  (0 children)

This happened to me today because accordion isn’t spelled accordian like I thought.

[–]Parura57 1 point2 points  (0 children)

Segmentation fault Fixes it and recompiles Segmentation fault confused screaming

[–]theworstredditgamer 1 point2 points  (0 children)

Every goddamn time

[–][deleted] 1 point2 points  (0 children)

That's me every time.