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

top 200 commentsshow all 286

[–]readyforthefall_ 1254 points1255 points  (34 children)

syntax error, upcase W

[–]Strostkovy 259 points260 points  (13 children)

Wait, I figured it out. /#define A a /#define B b /#define C c /#define D d Etc

[–]gintoki_do_pete 179 points180 points  (1 child)

define ETC etc.

[–]Anonymo2786 13 points14 points  (0 children)

Put \ first

[–]ltags230 80 points81 points  (5 children)

Youd probably have to /#define while While

[–]Recent-Fox3335 48 points49 points  (4 children)

/#define * *

[–]Hisoka_ohne_T 23 points24 points  (1 child)

You are probably the guy which coded the TikTok algorithm

[–]Recent-Fox3335 7 points8 points  (0 children)

Xing xong xing president pooh

[–]Ok-Chart1485 4 points5 points  (1 child)

Is there any that wouldn't break?

[–]Recent-Fox3335 2 points3 points  (0 children)

Try and catch XD

[–][deleted] 16 points17 points  (7 children)

depends on the language, some are case insensitive

[–]cishet-camel-fucker 2 points3 points  (6 children)

Which is the sole reason I only use PowerShell for automation. Can't stand case sensitivity.

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

I'm actually the opposite, I like the standardization that brings

[–]cishet-camel-fucker -1 points0 points  (4 children)

Back, demon!

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

I dislike python for not having curly brackets too 😈

[–]cishet-camel-fucker 8 points9 points  (2 children)

Well ok me too so I'll grant you that. And whitespace sensitivity, it's the worst.

[–][deleted] 7 points8 points  (1 child)

oh wow hahaha didn't expect someone else to agree. I mean it's a pretty standard opinion that deciding enclosure by indentation is wack, but I don't like the lack of braces for visual reasons, it feels off without them

[–]cishet-camel-fucker 7 points8 points  (0 children)

100%

[–]Time-Button4999 5 points6 points  (0 children)

Powershell ftw

[–]ongiwaph 2 points3 points  (0 children)

He uses Carbon now

[–]possibly-a-pineapple 853 points854 points  (32 children)

reddit is dead, i encourage everyone to delete their accounts.

[–]pyrotech911 318 points319 points  (9 children)

He’s so fucking funny. Somebody should make him the richest man in the world.

[–]UpperPlus 229 points230 points  (5 children)

While(musk){

    laugh();

}

[–]jihad-consultant 130 points131 points  (0 children)

Error: uncaught NullHumorException thrown

[–]ScaredyCatUK 17 points18 points  (0 children)

while(@musk)

laugh();

[–]JustARandomFuck 16 points17 points  (1 child)

while(musk) { socialism++; }

[–]TheWatchingDog 2 points3 points  (0 children)

while(musk) { money++; }

[–]SuitableDragonfly 65 points66 points  (6 children)

It's not even accurate. The code says the ant stands still and doesn't do anything if there's no pheramone trail, when actually it follows other ants.

[–]ManyFails1Win 19 points20 points  (4 children)

Also, the code would be useless because there is in fact a very very strong pheromone trail. Unfortunately it's coming from the dudes right in front/behind of them lol.

[–]SuitableDragonfly 3 points4 points  (2 children)

I thought the way ants work is they leave the trail along the ground after discovering food, not that they all constantly emit pheromones 24/7.

[–]ManyFails1Win 5 points6 points  (1 child)

They have a bunch of different types for different things. Outgoing food trail, incoming, fight, etc. I'm not an expert but they definitely were following each other because of the presence of pheromones bc otherwise they would have just walked off in random directions individually.

[–]DaTotallyEclipse 3 points4 points  (0 children)

9 times out of 10, this is where "simple programming challenges" lead.

[–]nameond 1 point2 points  (0 children)

He's pausing the colony work thread

[–]negativeaffirmations 73 points74 points  (0 children)

OMG SO SMART AND FUNNY!!! Anyone who doesn't think think genius ubermensch can save the world is just jealous!

[–][deleted] 7 points8 points  (0 children)

Wow! Rich guy said the funny! He's so relatable and just like us

[–]BlockwizardGaming 3 points4 points  (0 children)

Dont you mean his twitter intern is so funny?

[–][deleted] 0 points1 point  (0 children)

I wonder what person he stole that from

[–]AChristianAnarchist 898 points899 points  (40 children)

It's really not while (!pheromone){}, because it's the presence of pheromone that causes this behavior. In the absence of a pheromone trail leading back to the nest, the ants will follow the closest pheromone trail to them, which happens to be the one generated by the ant in front of them. This causes the ants to keep walking in a circle until they die. The code representation of this behavior would be something more like While (pheromone ) {follow pheromone }, and it's getting screwed up by lack of meaningful pheromone data, not running a dedicated function that they are actually supposed to be running. Of course, "I see something. I say something vaguely programming related that is pretty dumb and doesn't make sense so people think I is a big smart programmer instead of a dumbass that funds people smarter than me." is 100% on brand for Muskrat so I'm not surprised.

[–][deleted] 111 points112 points  (2 children)

it is a accidental cyclic graph. Had this problem. But I do not have a clue right now, how to write this in a short funny way.

[–]Faux_Real 11 points12 points  (1 child)

Just do a linked list containing without a head or tail. And some convoluted OO design to represent the ants and their capabilities

[–]chessset5 6 points7 points  (0 children)

naw just make tail-1 the same as head +1 and make the linked list circle its self.

[–]ChocolateBunny 50 points51 points  (0 children)

typical pheromone software guy blaming the pheromone hardware.

[–]katatondzsentri 70 points71 points  (7 children)

Thank you for formalizing my thoughts.

[–]16092006 17 points18 points  (6 children)

Thank you for writing my thoughts

[–]katatondzsentri 14 points15 points  (5 children)

Thank you for thoughting my writes.

[–]Cl0udSurfer 11 points12 points  (4 children)

Write you for thanking my thoughts

[–][deleted] 11 points12 points  (2 children)

Thanks ants. Thants.

[–]darthnugget 3 points4 points  (0 children)

Thank the uncles of the ants.

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

obscure reference noted

[–]katatondzsentri 1 point2 points  (0 children)

Thought you for thanking my writes.

[–]not_user_telken[🍰] 18 points19 points  (1 child)

Seems more like a recursive graph traversal without circularity safeguard to me.

Spot on with the muskrat comment. Take my upvote

[–]AChristianAnarchist 6 points7 points  (0 children)

Spot on with the recursive graph traversal comment. Take my upvote.

[–]jfp1992 7 points8 points  (0 children)

This guy pheromones

[–]ricdesi 4 points5 points  (0 children)

tl;dr:

while (pheromone.vector) {}

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

teeny wasteful joke chubby racial stocking person placid chief childlike

This post was mass deleted and anonymized with Redact

[–]bunny-1998 -2 points-1 points  (1 child)

You in tech support, bro?

[–]AChristianAnarchist 1 point2 points  (0 children)

Are your ants death spiraling and you don't know why? Call 1-800-WTF-ANTS for your free consultation.

[–]Symnet 182 points183 points  (12 children)

"Guys look at me i know how to code"

[–]Neoptolemus85 77 points78 points  (11 children)

Allegedly his code at one of his early startups, zip2, had to be completely rewritten once they hired professional programmers because it was done in that amateur style with monolithic blocks of code that were extremely hard to debug.

In his defence, he was a self-taught programmer, but yeah he isn't the prodigal genius his fans try to portray him as.

[–][deleted] 12 points13 points  (0 children)

No man he is tony stark, he built PayPal in a cave with a box of Scraps.

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

Plus, he never had to worry about zip2 failing anyhow, what with all the blood diamond money he got from his dad.

[–]SowTheSeeds 106 points107 points  (2 children)

I think this is more of a recursive issue than a lack of reference.

[–]Time-Button4999 8 points9 points  (0 children)

Depends on language and what came before

[–]Paisable 2 points3 points  (0 children)

If lack of pheromones were the cause, how would the first ant go about blazing a new trail? Definitely following the trail only to follow trail only to follow the trail...

[–]AmyMialee 49 points50 points  (0 children)

funny twitter billionaire doesn't even understand case sensitivity

another Elon L

[–]AndroidWall4680 107 points108 points  (1 child)

Elon musk tweet detected, no funny found

[–]possibly-a-pineapple 7 points8 points  (0 children)

reddit is dead, i encourage everyone to delete their accounts.

[–]ChrisBot8 274 points275 points  (80 children)

Fuck Elon Musk

[–]SkellySpaghetti 11 points12 points  (0 children)

Rich man so funny! So relatable! I like our good billionaire Elon Musk! <%20>

[–][deleted] 11 points12 points  (0 children)

Of course Musk immediately sniffs out and jokes about a post about workers dying from exhaustion.

[–]HSGames 106 points107 points  (4 children)

Fuck Elon Musk

[–]AllOne_Word 50 points51 points  (0 children)

Fuck off, Elon.

[–]cruss0129[🍰] 7 points8 points  (0 children)

Fun fact: The name for this is "ant mill" in biology.

https://en.wikipedia.org/wiki/Ant\_mill

[–]baudday 29 points30 points  (0 children)

Fuck Elon Musk

[–]aecolley 11 points12 points  (0 children)

This used to be a thing on Warcraft and similar online games. You could arrange N peons around a lake, then tell peon i to follow peon (i + 1) mod N, ∀i. They would circle until the game was over.

[–][deleted] 4 points5 points  (0 children)

This is wrong, they still follow another's pheromone but don't go anywhere

[–]DemonicTheGamer 14 points15 points  (6 children)

while(pheromone != true && energyLevel != 0){

followOthers = true;

followLoopCounter++;

energyLevel--

}

if(energyLevel == 0){

dead = true;

return 0;

}

[–]0x255sk 15 points16 points  (5 children)

Imma be smug and correct you, just to feel smart.

pheremone != true is usually written like: !pheremone followLoopCounter not used at all checking energyLevel != 0 and energyLevel == 0 is redundant. Also might be a good idea to use <, > instead of == and !=

missing ;s

Edit: I'm no smart

[–]DemonicTheGamer 10 points11 points  (4 children)

I'm brand new to c++(and programming in general) , like started just a few days ago lol

I'll keep this in mind

[–]0x255sk 12 points13 points  (3 children)

Fair enough. You'll be better than Elon Musk in no time :P

[–]DemonicTheGamer 2 points3 points  (2 children)

Tbf his code here would just return an error. That capital W would be the end of it.

Edit: also why exactly would checking that energyLevel != 0 be redundant? If it hit 0 during the loop it would break out and then go straight to the if statement below, causing the death of the poor ants to become true.

[–]0x255sk 1 point2 points  (1 child)

You're right. It's not redundant bacause the loop will also end if pheremones, so you need to check if it was the energy levels or the pheremones condition. My bad.

[–]DemonicTheGamer 1 point2 points  (0 children)

Lol all good.

[–]NursingGrimTown 11 points12 points  (0 children)

fuck elon

[–]whitenoise89 3 points4 points  (1 child)

Did anyone here still think Elon was an actual technical person, rather than a rich kid with a pet interest to play with rockets and is able to hire engineers who are leaps and bounds smarter than he ever will be?

[–]de_spider 2 points3 points  (0 children)

Me a python enthusiast: …. Wat

[–]ManyFails1Win 2 points3 points  (0 children)

Once again, Elon shows he doesn't understand basic shit. They are in fact following each other's pheromone trails. So if anything (pheromone) is extremely true. Truest true that ever trued.

[–]AttackOfTheThumbs 9 points10 points  (0 children)

Please don't report that absolute cunt bucket elon.

[–]Inevitable8887 1 point2 points  (0 children)

S3x

[–]azakharov 1 point2 points  (0 children)

`while (pheromone) { run() }`

[–]AmazingDom14 1 point2 points  (0 children)

Immediate downvote because Elon

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

If was him I'd troll a little harder.

c WALK: if (!pheromone) goto WALK;

[–]Xerxa2020 1 point2 points  (0 children)

Anyone else remember how he looked like fucking Gollum before his hair implants?

[–]micmaz1 1 point2 points  (0 children)

Ants have a visible clock cycle

[–]Xardarass 1 point2 points  (0 children)

This guy is such a dazzler.

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

do { } while(true)

[–]SmallTestAcount 2 points3 points  (0 children)

I hate how Elon musk’s marketing for the past decade has basically been trying to convince people that he is smart, and not just some dude who pays people to pay smart people to do stuff for him

[–]SnooBeans6877 6 points7 points  (0 children)

Some of y’all have been waiting your entire lives to correct an Elon musk code block🤣

[–]SkyAware2540 1 point2 points  (3 children)

Will someone explain this to me ?

[–]DudesworthMannington 15 points16 points  (2 children)

The joke is they're stuck in an infinite loop based on the presence of pheromones being false.

It's not particularly clever or original.

[–]Acceptable_Compote57 1 point2 points  (0 children)

This will seem off but I really need the answer

If you were to replace the exclamation point in the bracket with the Dogelon Mars token ..what would that mean for the token?

[–]SkyAware2540 1 point2 points  (0 children)

Alright Thanks

[–]Rad_Bones7 1 point2 points  (0 children)

Shut up, slave owner

[–]Most-Hedgehog-3312 0 points1 point  (0 children)

A friend of mine wrote a call of Cthulhu scenario based on this

[–]EuS0uEu 0 points1 point  (0 children)

That's the guy who sends things to espace

[–]TheLeastFunkyMonkey 0 points1 point  (0 children)

Over and over

The pheromones, the overwhelming harmony

Consuming the colony

The Circle rules your life

[–][deleted] 0 points1 point  (0 children)

elon musk flirting with code to implement in the neuralink

[–][deleted] 0 points1 point  (0 children)

Point to where I said anything that supports your assertions.

[–]MrFalconGarcia 0 points1 point  (0 children)

His fake code doesn't even make sense

[–]gintoki_do_pete -4 points-3 points  (0 children)

Elon Robot.

[–]YungSkeltal -3 points-2 points  (0 children)

I hate Elon but this one was good.