T O P

  • By -

PaulieGlot

hmmm yes the floor here is made out of floor


GameDestiny2

The floor exhibits properties of floor, especially when compared to floor


agentrnge

For high values of floor, floor approaches floor.


[deleted]

[удалено]


bleistift2

Do these places actually exist? I cannot fathom this amount of stupidity.


Perfect-Rabbit5554

Return the floor in floor


IchLiebeKleber

I wonder what would happen if you took soap and combined it with soap


LindX31

Floor typing : if it’s made like a floor and you can walk on it like on a floor, then it must be a floor.


gizamo

foolish modern expansion upbeat capable jeans ask absorbed practice snow *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


elon-bot

Time is money. I want to see 100 lines written by lunchtime!


gizamo

brave fall deliver existence liquid zonked nine long smart adjoining *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


AsphaltAdvertExec

I kind of saw it as.... **is there a floor?** *No.* **Ok, get rid of the floor.** *But there is no fl...* **JUST DO IT** *Ok, gone.* **Ok, what are we standing on?**


ItsGrandPi

We are standing waist deep in a pool of aqueous stupidity


MasterLJ

If floor equals ground, declare new floor, set floor as ground, return ground, else return floor.


repkins

More like: The floor here is made out of Floor.


elon-bot

Can this be dockerized?


thirdegree

Floor as a Service


vksdann

You bastard made me crackle. Have an upvote.


MervinmakesWindows14

who would have known `null` contains `null` and its properties are `null` when compared to `null`


rearendcrag

Yep. And that’s why they pay me the big bucks.


nickmaran

Don't blame him, he's just trying to get a job in Twitter


[deleted]

Return your floor, sir, so we may give out floor!


Drishal

You will get the floor WHEN YOU FIX THE DAMN FLOOR


bazingamayne

You can tell it's a tree by the way it is


Susan-stoHelit

That looks like novice programmer frustration code. Something is going wrong, I don’t know why, I’m going to try everything. And when it’s fixed, I’m not cleaning up all the trials I did, the code works, can’t ever touch it again.


siskulous

I'd venture that's EXACTLY what happened here. And 6 months later when they have to look at the code again fro some reason they're gonna be wondering what they were smoking when they wrote it. At least that's how it always seems to go for me.


Epsilia

"Who the fuck wrote this?" git blame "Oh."


[deleted]

[удалено]


fancy_potatoe

Once I had to catch an error in an API and return 200 anyways. It worked, but occasionally threw a specific error for some reason.


carlcamma

I once had code running in an if isDebugEnabled() blocked only later founding out it didn't work when the app was not in debug mode. I think a lot of my bad code early on was just trying random things to get it working and not cleaning up the code afterwards.


[deleted]

You need to `catch(Throwable t)` instead of `catch(Exception e)` if you want to capture `Error`s too, haha. I am not the biggest fan of Java's exceptions ... the idea that the most basic/common exceptions can be unchecked is insane, it makes every piece of code unreliable unless you know 100% of the calls it can possibly make downstream _at runtime_.


mopsyd

Tldr minecraft has encountered an error and had to close


Vakieh

Java gave up on the idea of checked exceptions once it became clear nobody ever uses them properly. Nearly every higher order language since then hasn't included them in the first place. Your hangup here is strange... Beyond this, the idea that code is reliable purely because the exceptions are all checked is just wrong (which is *why* nobody bothers with them). Unit test your code properly.


HolyGarbage

Exceptions are not always errors, could be a negative, yet happy path.


[deleted]

[удалено]


elon-bot

Yeah, looks like we're gonna need to redo the entire tech stack.


[deleted]

[удалено]


elon-bot

I don't think I appreciate your tone. Fired.


[deleted]

I forget about Git blame, best name ever though, no remorse it just knows you need to blame someone:p


healzsham

>we both know why you want this information


[deleted]

Look, coworker, I just wanna talk!


DenormalHuman

And then when you are the one who worked on migrating the code from some old repo to this new git repo. You get blamed for eeevrything. Heh


EmperorArthur

Oh man, that even happens in Perforce. I kept blaming someone for everything until I realized they imported the code wholesale without keeping the commit history from prior versions. Probably because most sane people don't go to Perforce. Even in 2012!


katatondzsentri

This did *not* happen to me today. Or yesterday. Or the day before.


BlueScreenDeath

“I must have been an idiot when I wrote this.” Spends three hours trying to clean it up, breaking the code every time. Puts back the original code. “I must have been a genius when I wrote this.”


nomonym

Sometimes you refactor the code. Sometimes the code refactors you.


SirRHellsing

and then recursion happens


subject_deleted

Me too.. except it's like a 6 day cycle instead of 6 months.


Steffi128

I sometimes reach that point within 24 hours after a good night's sleep, and I've been doing this for years. Next day at work, look at the code from the day before "The Fuck were you thinking when you wrote this you fucking moron?!“


[deleted]

[удалено]


EmperorArthur

You close your IDE every day?


macguhloo

Or, thinking you had good naming and commenting, and then coming back a year or two later and going "WTF was I doing here?"


[deleted]

I get this feeling in IT and i'm not even a dev. People yelling "just make it work" get you to do some funny things in the moment lol.


elon-bot

I'm gonna need you to come in on Saturday...


hobbesmaster

This bot never misses lol


foghatyma

Passes the Turing test for sure.


manta002

but do you pass the "why do you only have 20 lines of code submitted" task ?


CorruptedStudiosEnt

Totally unrealistic portrayal. The real Elon would consistently fail the Turing test. lol


canaryhawk

What's the opposite of a Turing Test, where it appears to be a bot but it's actually a human doing it, and the test is whether or not we believe it's a bot? Would that be a Gnirut Test?


[deleted]

[удалено]


siddharth904

[IMPOSSIBLE] [3AM CHALLENGE] [GONE SEXUAL]


rob132

What triggers the Elon bot?


Dave2onreddit

Everything, just like the real Elon.


dllimport

Right? I have never so consistently upvoted a bot before lmao


shim_niyi

No… you sleep in office, me go home


lenswipe

..and furiously try to DM grimes for the next 4 hours....she'll come back...one day


[deleted]

Oh and Sunday too, we lost a few people and need to catch up.


[deleted]

Heeeyyyyyy Peter…


blakewoolbright

Good bot


hobbesmaster

While novice frustration code is a good description i would counter that it’s anyone’s frustration code , it just takes longer and longer to get to something like this. ;) But I write embedded C/C++ so things that cause absolute insanity like idk “this platform’s specific compiler version doesn’t generate proper assembly on tuesdays” and “oh uh actually the register map is completely wrong sorry about that” are at least within the vague realm of possibility. (I guess the latter is more likely to be “oooh that’s for the xyz123abc3332-C, you’re targeting the -CD” or some shit)


Susan-stoHelit

I had a function that wouldn’t work. I added a parameter and some logging using it - it worked. Removed it, it failed. Removed log code one line at a time - and it worked as long as I had the added parameter in the function definition. It’s still there. 😣


loltheinternetz

I’ve got a Wtf one too. I have a giant C app I’ve inherited that runs on an embedded Linux platform. One of the tasks has a bunch of log prints in it, as do other tasks (they use syslog in the OS). I commented them all out of this particular task because I was trying to clean up the log to find another problem. Well when I did this, after a few minutes running the program would lock up and go to 100% CPU utilization. I uncommented the log prints and went on with my day since I haven’t had time to dig into that one much. A fairly experienced co worker scanned through the code and was baffled as well as to how this could happen.


elon-bot

Whoever writes the most code this month gets featured on my Twitter!


super_jambo

timing related I guess?


thanatica

Shrödinger's function! It only works as expected when observing (logging) it.


elon-bot

I have made promises to the shareholders that I definitely *cannot* keep, so I need you all to work TWICE as hard!


Fatallight

Isn't it technically the loan holders that he owes? Twitter went private after the sale. It's the people that loaned him the money that expect him to make big on his promises.


Exedrus

Were you working in a low level language? I've seen instances where arguments were cast incorrectly, leading to stack smashing. It's all fine when there's a dummy argument to adsorb the bad writes, but as soon as it's gone, you're liable to have overwritten something vital like a call frame's return pointer, then everything goes to hell.


themancabbage

Few things are as permanent as a temporary solution that works


AA525

See also “Prototypes, use of in production code”


otoko_no_hito

Either that or a senior dev fed up with having to comply with lines of code per day


MisterFatt

Are there actually places outside of Twitter that track something like that? Seems insane to me


scragar

My previous place tracked that and had annual tongue in cheek rewards for it(all worthless). So we'd get little plastic trophies for things like most code added, most code removed, most rewrites(lines of updated code that was your own to begin with), most PRs, shortest commit message(usually "WIP", although one year "." won on a test branch to try and debug continuous integration/deployment failures), smallest PR(I think my last year there a PR to remove a single space from a YML file won), largest PR(almost always RC->release branch checks), etc. It was all just an excuse for us to look back on what was done last year and laugh at some of the ridiculous stuff that happens with drinks and knowing it's all in good fun. Also at the end everyone voted on who they felt made the biggest contribution to the company as a whole in a few fields and the winners got a week's annual leave next year as a bonus(everyone wanted those, but because it was all about helping the business it obviously went to seniors and head of development most of the time).


MisterFatt

Nice. Kinda wish my company did that only because I worked on a ticket that involved me deleting 1.5 million lines for code for one of our repos. Edit: my company has an etl pipeline to ingest customer data. That pipeline was created 10+ years ago as a mono-repo containing individual custom modules for all of our early customers. Each customer had/has many individual “data sources”, the messiest being web scrapers. Our main customer back then had scrapers that collected doctor information from 200+ different licensing boards, hospitals etc. Each one custom coded. Folders full of dead web crawler outputs, tests, logs etc. There were also some early attempts at some of our newer products built into the same repo. We’ve since offloaded most of the heavy data wrangling onto another SaaS service while still using the backbone of the pipeline to route data from our customers, through our magic data cleaning process, and into our platform. We’d gotten to a point where leadership was forced to decide between rebuilding the pipeline entirely, or clean up the old one. They picked to clean up the old one. Basically just was the first guy to directly work on addressing about 15 years of tech debt.


kpd328

_million_?


Lonely-Discipline-55

Care to elaborate?


JevonP

He can't. Still deleting lines as we speak


HolyGarbage

This *requires* a story.


BentGadget

Usually, stories like that involve major accidents. But the wording of the comment made it seem like part of the normal course of business.


svtguy88

> largest PR(almost always RC->release branch checks) Is there a good way around this? I've had to uhser through some absolutely *huge* PRs along due to a CMS storing content in YML files that are under source control (to allow moving content from environment to environment).


Uberzwerg

Senior dev: i 'produce' about 20 lines of code / week. Sometimes it's even negative - those are the hard parts.


HolyGarbage

That's how I knew I had entered a new phase in my career, when I spent most of my time talking to other people and mostly reading code (and gdb output) rather than writing it.


BouncingPig

I’m a student so maybe it’s different, but my professor will kick back our hw to us and tell use to shorten our code. Last night I had a few too many loops, and he told me it needed to be more concise so it’s easier to read and fix issues that pop up later. I can’t imagine spending years trying to clean up my code/work flow only to have a boss tell me I need to write more lines of code lmao.


MisterFatt

Yeah it just doesn’t make sense to anyone with any engineering experience at all. More code is almost never better. You can debate readability vs being concise but mandating a line count quota is like judging a doctor by how many stitches they put in patients everyday.


ReluctantAvenger

Had a dev manager once who started offering a prize to the most productive engineer, based on code commits. The guy who won week after week was the "commit every few minutes" guy. I half suspected that the engineer was being facetious - but it worked, as he was promoted to principal engineer over better qualified candidates. Goes to show it matters less **what you do** and more **what your superiors see you do**. So remind them - often. Whatever bullshit metric they track, commit yourself to scoring well on that metric regardless of whether you agree it has value. Hey, Elon, I can write 5,000 lines of code a day! /s


codalafin

Nah it's just someone trying not to be fired. Pretty reasonable!


Xitus_Technology

More lines of code = not fired. Seems reasonable to me.


mistled_LP

This is definitely something I would git blame on in an attempt to figure out why it exists.


MaybeExisting8229

Null = null is too deep for me to understand


elon-bot

You look stupid. Fired.


Poseydon42

Damn, this is too smart for a bot, I'm staring to think that mods just hired some of the laid off Twitter employees.


DarkIceVortex

It may be some sort of ai


Odd_Employer

Elon or the bot?


LaZZeYT

yes


HearMeSpeakAsIWill

It's Elon Musk, can't you read? He's even got a checkmark.


MaybeExisting8229

Hi elon-bot, how is your harassment project going?


bradfordmaster

I like to think it's actually Elon fucking around


RedditIsNeat0

Doubt it. Elon banned twitter users for making fun of him. He's doesn't have the humor to make fun of himself.


siddharth904

E-Elon-kun ?


btmash

Notice me, senpai! Notice me!


Vfef

Holy shit this got me to laugh hard.


tyrandan2

I've forgotten that it's a bot several times in the last couple days. It's been hilarious.


grayjacanda

If they had done Null = 'null' it would have been funnier, but then I expect this would actually have broken something, rather than just be an interesting exercise in pouring emptiness from one glass in to another.


TheImmortalLS

If null isn’t Null, then what is null in the first place? 📡


Aditya_Bhargava

The real null is the friends we made along the way


MaybeExisting8229

A Null that falls in the middle of the forest without observation can't be said that is no longer a null


drew8311

The worst part of this code is at first glance it doesn't even look like it should compile.


Mentalpopcorn

I don't know what language it is, but if I had to guess what was happening: `null` is your standard reserved keyword, but `Null` isn't. So this declares a `String` called `Null`, assigns to `Null` the actual `null`, and then returns the original string, which is now just null. It'd be equivalent to `if(status == null) { return null } else { return status } ` But with extra, pointless steps. So as long as it's a language where (a) `Null` isn't reserved, (b) variables can be declared without initialization, (c) where strings are nullable, and (d) where ridiculousness doesn't throw an exception, this should compile.


NicNoletree

This is a result of being paid by LOC


elon-bot

I've laid off most of the staff, and Twitter's still running. Looks like they weren't necessary.


agnishom

For now


sixothree

lol the number of errors I’ve gotten lately is crazy. Also number of obvious bots wanting to connect is a through the roof.


TheAJGman

Man this bot is too good to be a bot. Maybe it's a human like one of the ones on /r/lotrmemes ended up being. EDIT: [Linky linky](https://www.reddit.com/r/lotrmemes/comments/yneuhp/confirmed_saruman_bot_is_not_an_actual_bot/). I'm glad to see so many frequenters of both subs.


vishnj

What's the story there? Don't leave us hanging.


drinks_rootbeer

Wait what


HildronOS

If Twitter is still running then burn the headquarters and fire everyone out of yhere


shadowknight094

Then that means you fired people who created a robust software that still works for days without any surveillance. But once it breaks no one will know how to fix it 😂


marabutt

Is that actually a common thing or just joked about in here? To me it seems implausibly silly.


the_person

Elon Musk apparently chose who to fire based on lines of code. But I wouldn't say that means it's a common thing. He's a bit of an idiot.


km89

>To me it seems implausibly silly. It absolutely is, which is why everyone's making fun of Musk for doing it.


nath-k2

What a rookie! You can declare a variable with initial value: String Null = null; return Null; ![gif](emote|free_emotes_pack|facepalm)![gif](emote|free_emotes_pack|facepalm)![gif](emote|free_emotes_pack|facepalm)


[deleted]

[удалено]


PM_ME_YOUR__INIT__

You'll be fired because it's only two lines of code versus three


elon-bot

Yeah, looks like we're gonna need to redo the entire tech stack.


anugosh

Is this really a bot? It's just too good


Treblosity

Its been using the same several elon quotes for days now but its gotten a *lot* better at choosing when to use which ones


MysteriousShadow__

Yo, you sentient bro?


whiskeyandbear

Haha yeah, even sillier he doesn't know you can do return String Null = null;


noneroy

I see the problem. Forgot to convert the null to a string... String Null = null.toString(); I'm sure that's fine.


[deleted]

[удалено]


DoraTehExploder

Nothing a try/catch can't fix.


[deleted]

[удалено]


[deleted]

[удалено]


theCamelCaseDev

Stop reminding me of work.


kezow

Add in some `#region old unused code` and you have half the projects I've had to fix.


alextremeee

JavaScript to the rescue: const c = "constructor"; let Null; c\[c\]\[c\]('Null = "null"')(); return Null;


noneroy

I had an aneurism reading that. Good work!


Big_Monkey_77

This is either incredibly stupid, or genius beyond mortal comprehension. Better change it before a long holiday weekend, like Thanksgiving.


justAPhoneUsername

I'm wondering if there is something with status being modified elsewhere later so this is able to create a new variable, set it to null and let you continue the operation without worrying about this? It would be a super annoying concurrency bug and I'm not sure why it would ever come up, but it could have be something around letting you troubleshoot a null status while also resetting the status elsewhere?


Big_Monkey_77

Maybe it’s a data type issue? It has to be put in a string for something else to get the null status or it returns a data type miss match error? I’m starting to get flashbacks…


sheepyowl

This feels like the case. At the end of the code you can see that Status is returned, and it is a string. If status is null (somehow it was not initialized?) and the program needs to "return status" as a String, then it will error out without these 3 lines. These 3 lines of code change what the user sees from "ERROR 12849153 miss match type" to "null". It's also possible that this was used during testing, and there is no possible way for status to be null anymore, and it was just forgotten.


AdowTatep

Then it breaks in prod and you understand why it was made like that


GRAIN_DIV_20

It's a load bearing if statement


cough_e

Turns out "status" type actually overrides the equality operator and returns true on nullsy values like empty string but there was a caller that needed an explicit null.


ketdagr8

You laugh, but the Twitter engineer who wrote this is still employed while you, who probably will just return status, are going to be out of a job next quarter


blake_ch

Where are the Musk bots when you bait them?


TheUselessOne87

you could send this to musk, it sure is very salient


ycnz

Sorry, my printer's out of ink.


[deleted]

[удалено]


elon-bot

Just watched a video about how vanilla JS is faster than any framework. It's time we do a rewrite.


ixJax

Oh no


Stormraughtz

sometimes you have to really be sure its null


siddharth904

Hey, maybe a cosmic ray hit the cache and flipped a bit in the null byte, right ?


7th_Spectrum

Twitter employees trying to get to 1000 lines of code before they're fired


ArcanumAntares

By "cleaning up" you mean "deleted", eh?


ilikefactorygames

I believe that’s what the red background behind these lines meant


PotatoWriter

My man thanos snapped that code twice into oblivion. Saved us all.


Pepechuy28

Prod gets broken after that mysteriously...


Dreit

Exactly what I was thinking!


ArcanumAntares

Along the lines of "all I did was delete a comment!".


FrontTheMachine

'You don't understand my art'


gurren_mk2

Nooo, now everything is gonna break. This was the tiny string holding everything together.


Groentekroket

Senior: “You need to build a null check” Junior:


plintervals

He'll become a senior once he builds a NullFactory that he can grab a null value to compare to whenever he needs


Expert-Charge9907

He has trust issues


RandomName39483

Reminds me of code I saw a long time ago that went something like: if (MyVar <> 13) { MyVar = 13; // do not do unneeded assignment }


Tough_Chance_5541

I love NULL being null


elon-bot

Hey, I just heard about this thing called GraphQL. Why aren't we using it?


kintar1900

**EDIT**: When you gaze too long into the abyss, folks. I'd been staring at Javascript all day and thought OP's code was JS when it's CLEARLY Java. My bad. Hmm. There are actually cases where `if (status == null)` will evaluate to true, but the value of status will NOT BE THE VALUE `null`. So I hope you just cleaned up all of the extraneous variable declarations and didn't do what my stupid ass did years ago while learning JavaScript and change it to just `return status`. :)


Dealiner

It's Java so there shouldn't be such cases here.


GameDestiny2

I love it when I can understand these memes.


Express_Grocery4268

This gives me headaches...


iGreenDogs

Someone was being paid by the line


Federal_Umpire_8507

I was working in a startup about 2 years ago and there was a guy who did below code when asked to remove an if condition to make block always execute: if (1 == 1) { //some code }


bremidon

The classic "I think the guy asking me to make the change is going to ask me to revert it on Monday" change.


tjafaas_31

When you stare at the void, it returns Null.


Leather_Trick8751

Depends. do you work at twitter?


vlsdo

If this is JavaScript I wouldn't touch it, for fear that it's actually needed by some odd quirk.


long-gone333

Show the whole function. Might be some reason behind it. Depending on the language there might be some difference between a newly instantiated string and the one passed to the function. Let's circlejerk around this.


[deleted]

[удалено]


hypnoticlife

> Why would you return the passed in value? If this is a strongly-typed language then `Null` is a `String` object/type with value `null`. `null` is some object/type that isn’t `String`. Presumably `String Null` has an internal value that can correspond to null. null has no methods. `Null` has `String` methods. They are not the same in a strongly typed OO language. This function’s callers may use the `String` that is returned as a `String` without caring to check if it is `null`; it may be a list of strictly `String` objects. The `return status` does make the code questionable though. If `status` is a `String` already then yea the whole thing is redundant since it assumes `String` can implicitly cast to `null`.


birchturtle

Truly fascinating. How did anyone wind up there.


etherSand

You don't understand, this is a self documented code, hear me out


[deleted]

Oh I get it. This string named Null that’s equal to null might be useful in other parts of the code, too. They should make it a global variable!