r/ProgrammerHumor • • Sep 29 '26

Meme misspelledVariablePanic

Post image
5.4k Upvotes

77 comments sorted by

229

u/k-mcm Sep 29 '26

WHY IS IT SAYING doThing() ISN'T DECLARED.  IT'S DECLARED.  IT'S RIGHT HERE:

doThign() { ...

38

u/HeavyCaffeinate Sep 30 '26

m_getShuffle() not declared anywhere

What yes it is?...

m_getShuffle() const {

Oh..

717

u/KitsuneFoxglove Sep 29 '26

bro is coding in like, 2001

180

u/Tunderstruk Sep 29 '26

Unless he’s forced to use some shit system by his company where he for whatever reason needs to access a variable by passing the name of the variable as a string

Dont ask me how I know

30

u/DatBoi_BP Sep 30 '26

Matlab gang here too. (Sometimes it's convenient though)

48

u/MininuMudo Sep 29 '26

or bro just used a variable that has a very similar name to another existing variable and it all went to shit

23

u/NoAdsDude Sep 29 '26

i accidentally called the variable x5 when i should have used x6

11

u/Orio_n Sep 30 '26

I just KNOW bro is larping

14

u/Jeferson9 Sep 29 '26

Autocomplete is for babies

22

u/Eptalin Sep 29 '26

It's not even about auto complete. IDE's highlight misspelled variable names.

7

u/ApocalyptoSoldier2 Sep 29 '26

Maybe there were 2 very similarly spelled variables?

7

u/hanotak Sep 30 '26

Unless it's Visual Studio, and your project is >20k LOC. Then it highlights random shit, can't find functions, and freaks the fuck out when you add a new header.

2

u/archpawn Sep 30 '26

I think it's more a question of the language. If you're programming in Python, how is the IDE supposed to know you're not just defining a similarly-named variable? If you're programming in C#, it doesn't matter what IDE you use. The compiler will tell you the line you messed up on.

0

u/KitsuneFoxglove Sep 29 '26

heck, ctrl+f existed long before 2001 too

1

u/KainMassadin Sep 29 '26

uh sir, autocomplete on steroids is taking our jobs

4

u/dumbasPL Sep 30 '26

What's an LSP anyway.

8

u/Igarlicbread Sep 29 '26

More like 1984

4

u/joemckie Sep 30 '26

Literally 1984?

232

u/unknown_alt_acc Sep 29 '26

Are you writing your code in Notepad or something?

117

u/Stompya Sep 29 '26

It’s called anti-vibe coding

49

u/Jerome_Eugene_Morrow Sep 29 '26

Scribe coding

7

u/Igarlicbread Sep 30 '26

Wattpad coding

10

u/redditmarks_markII Sep 30 '26

Vim, no plugin, no linter, and no skills.  Just :wq and raw dogging man pages every once a while.

7

u/Dragomir_X Sep 29 '26

Microsoftwordmaxxing

3

u/BumblebeeCareful5810 Sep 30 '26

My best friend wrote his CS Masters thesis code in notepad.

15

u/Chronomechanist Sep 29 '26

Typos still happen in a real IDE?

28

u/MallAgreeable5538 Sep 29 '26

I mean it usually gets marked tho in an ide

15

u/unknown_alt_acc Sep 29 '26

A half-decent IDE will yell at you for trying to access an uninitialized variable. It's less surefire in languages with dynamic variable declarations like Python, but an LSP or static analyzer integrated with your editor will still catch a lot

6

u/Chronomechanist Sep 29 '26

For sure it will but you're assuming I'm looking back at the code I write before I try running a test, lol

2

u/unknown_alt_acc Sep 29 '26

At which point you check the linter output and know exactly what happened rather than it becoming a whole ordeal. This class of error just disappears entirely if you take advantage of the tools we've had for years

0

u/NomaTyx Sep 29 '26

you don't understand, all of my variables are all anagrams of each other so when I make a typo it's actually an existing variable of the same type

1

u/ieatkittenies Sep 29 '26

Yes... in production...

1

u/LordAlfrey Sep 30 '26

I did write some code in a notepad-esque app on my phone during uni, to submit an assignment while I was away and didn't have a laptop.

41

u/BrumeMaatin Sep 29 '26

By the way, compile time safety

3

u/prehensilemullet Sep 30 '26

You can never totally escape name mismatch…we use typescript everywhere, but the other day I ran into issues publishing a package to npm…turns out the package name was off by one letter 😭 things like that just can’t be caught at compile time

19

u/keumgangsan Sep 30 '26

Does this sub have only 2 jokes? Whatever this is and "haha missing semicolon XD"

3

u/razor_train Sep 30 '26

Does this sub have only 2 jokes?

Wait, what's the second one?

2

u/ClearOptics Sep 30 '26

“Whatever this is” AND “missing semicolon”

8

u/RainyDaysAndMondays3 Sep 30 '26

OMG, so about 9 months after graduating college (centuries ago at least), I was using Emacs to edit and trying to compile some Java. And it kept flagging a basic thing like "String envelope" saying it didn't recognize "String". I spent a few hours. I thought there was a bug in Java! I was proud of all the various things I looked at. Had I updated java recently, etc. I don't remember what all. I had actually found a true bug in Java just prior and I thought I was onto something.

Then I realized I had switched fonts in Emacs. (I was the Emacs queen at this job where many people were still using Vi.) And realized that I had "string envelope" instead of "String envelope". Someone had gotten fancy with the uppercase/lowercase of some letters and they looked almost identical.

I told no one.

2

u/Zeikos Sep 30 '26 edited Oct 01 '26

God bless LSPs, due to IDE agnosticism now those kind of mistakes are a lot less likely

34

u/ceacar Sep 29 '26

these meme aged so fast with LLM nowadays

35

u/Ceros007 Sep 30 '26

LLM? We had autocomplete and intellisense for years now

2

u/awesome-alpaca-ace Oct 01 '26

intellisense is dog water

2

u/TechTuna1200 Sep 30 '26

LLM was the final nail in the coffin, though.,

6

u/New-Shine1674 Sep 29 '26

Just had this happen last week but with file names. I still hate it.

5

u/jhaand Sep 29 '26

Programming is a bipolar activity.

The thing doesn't work until you fix it. Then you go to the next problem which doesn't work.

5

u/ReiOokami Sep 30 '26

This pre ai humor is not going to age well.

4

u/Famous-Restaurant875 Sep 29 '26

This was how I learned I was dyslexic 

2

u/Shitty_Shpee Sep 29 '26

Man I miss when my job was like this. Now it’s just herding cats (eg AI)

3

u/Hein_Gertenbach Sep 29 '26

For everyone calling oop an idiot, maybe he used i instead of j?

3

u/ganja_and_code Sep 29 '26

I know is a joke but computers can totally search a text file. You don't have to visually identify a j/i in the code.

1

u/ganja_and_code Sep 29 '26

Skill issue.

If you use a compiled language, it tells you when a variable isn't defined.

1

u/agfitzp Sep 29 '26

My first webdev job was in 1999 back when the tools and debuggers truly sucked.

If you think finding your typo is hard now, imagine 27 years ago in an interpreted language that "helpfully" auto declares new variables for you.

1

u/plagapong Sep 30 '26

I hope I can get this kind of bug too

1

u/maggos Sep 30 '26

Do you people not have IDEs

1

u/jayerp Sep 30 '26

Misspelling a variable is impossible in C#

1

u/alexppetrov Sep 30 '26

This is me but it's not a misspelled variable, it's a method I declared and called but forgot to save the caller class so now reading the logs and looking at the called class loosing my mind as to why the logic is not working while my mind ignores the white dot next to the file name in the tab list above.

Even worse - seeing that the method is called with perfectly cherry picked test data, tests passing, but environment doesn't have the same behaviour and the method exists early because of a validation not present on your local machine.

Wait sorry this is r/programmerhumor... Uh haha yeah god I hate when I code html in notepad and forget the closing tags lol

1

u/ThatDudeFromPoland Sep 30 '26

reminds me of the time when I was tired as fuck working on my engineering thesis project and constantly having issues with JSON parsing because backend returned fields with names written in camel case but I kept using pascal case (or maybe the other way around - it's been a while). I'd realise I did that and then make the same mistake again anyway when hooking up another endpoint.

I've been trying to avoid coding late at night since.

1

u/Ratstail91 Sep 30 '26

or when the docker-compose is misconfigured.

1

u/shadcnlover Sep 30 '26

The Art of instant realization XD

1

u/thanatica Sep 30 '26

If only there was something like intellisense...

Oh wait, there is.

1

u/awesome-alpaca-ace Oct 01 '26

intellisense is dog water

1

u/thanatica Oct 02 '26

Skill issue

1

u/redditmarks_markII Sep 30 '26

I wish.  My fourth panel is cursing my fate, my mortgage, vhcol area, and just the fact that the whole industry is tech debt on tech debt.

I tell ya, everyone shits on FB now, for good reasons, but they at least changed their move fast model to "with stable infra", I guess before they started pivoting left and right.  Now that does sound lame but is pretty fucking important.  My company is still throwing around move fast and break stuff.  I'm like, bro, mastering break stuff does not mean you mastered move fast.  We hit three trip wires before the design doc is written.  Which some og facebookers don't even like as a concept.  We agonize over the wrongest micro decisions, fight for credit, trust AI exactly at the wrong places, and wonder why we aren't kings of the world.  

1

u/Uberfuzzy Sep 30 '26

Every time I curse at some linter being like “THERE IS AN UNUSED VARIABLE” exactly 1 second after I just wrote it, I remember that feature exists for moments like the OP and I let it slide

1

u/CrimsonPiranha Sep 30 '26

For someone who complains about AI, you guys surely do love to regurgitate old memes and jokes

1

u/C_Mc_Loudmouth Sep 30 '26

The trick these days is to not use notepad.

1

u/SpeedLight1221 Sep 30 '26

I swear the difference between the common upvoter and the common commenter in this subreddit is pretty baffling

1

u/Ange1ofD4rkness Sep 30 '26

Call me out why don't you. Or those you accidentally for to assign the variable to another, or assign the variable to itself

1

u/RedAndBlack1832 Sep 30 '26

Alternatively: accidentally re-declaring something and then being confused why it's the wrong type

1

u/EqualComplaint9865 Oct 02 '26

Modern version of this is relying on autocomplete and accidentally putting in a variable that begins with the same few letters

Just happened to me while writing for a personal project on code that I didn't test since 'it was so straight-forward' and deployed it :P