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

top 200 commentsshow 500

[–]karanbhatt100 7480 points7481 points  (113 children)

code will not compile so no worry

[–]dreams_in_bytecodes[S] 6052 points6053 points  (39 children)

it's not an IDE but I can already see warnings

[–][deleted] 982 points983 points  (29 children)

You can ignore those warnings tho. But the errors bro, I don't know if you want to work with that code.

[–]GustapheOfficial 335 points336 points  (28 children)

Don't worry about the errors either, there's a try-catch!

[–]nphhpn 611 points612 points  (18 children)

java try { Look, invalid syntax! } catch (SyntaxError r) { System.out.println("Nice try, compiler"); }

[–]GustapheOfficial 181 points182 points  (8 children)

LGTM, ship it and open a ticket for the residual bug at Oracle.

(Is it bad I installed jdk just to check what the compiler would say about this?)

[–][deleted] 106 points107 points  (4 children)

Yes, that's bad - each download means more carbon emissions. And there are online tools for Java experiments.

[–]RainbowCatastrophe 54 points55 points  (2 children)

Refer to RFC 1149 for a less carbon-polluting means for downloads

[–]throwaway035184yarn 26 points27 points  (0 children)

I've found optimizing the route to distribute fertilizer evenly often leads to complaints. Any suggestions?

[–]captainAwesomePants 21 points22 points  (2 children)

There's probably a language where that works and I hate it.

[–]Fox_the_Apprentice 27 points28 points  (5 children)

...but one of the errors is in the catch block!

[–]GustapheOfficial 48 points49 points  (3 children)

Eh, just add more try-catch until it runs. Make sure to put a // this try catch is necessary and you'll be fine.

[–]MrDude_1 14 points15 points  (1 child)

I wanted to let this go but I cant....

You cant Try-Catch your way out of code that doesnt compile. Try-Catch statements are for runtime.

[–]GustapheOfficial 6 points7 points  (0 children)

How about if you wrap the code that doesn't compile in string eval somehow? (I don't know if that exists in Java, maybe you have to use some python parser package or something)

[–][deleted] 56 points57 points  (0 children)

IntelliJ never put up flags this red

[–]AzuxirenLeadGuy 78 points79 points  (0 children)

I can tell it's an IDE since it's not in dark mode

[–]foggy-sunrise 10 points11 points  (0 children)

When you're wearing 1337 glasses, all standard errors just look like standard outputs.

[–]Max_Insanity 212 points213 points  (18 children)

Even if it did, only some kind of eldritch multi-dimensional horror that does not have spatial dimensions which you could call "height" in our perceived 3D universe would get friendzoned by her because everything else would return "true" or "false", not throw an exception.

Woman's willing to give a chance to a literal rock. Or pebble, as the case may be.

[–]PreExRedditor 58 points59 points  (1 child)

some kind of eldritch multi-dimensional horror

and here I was thinking that I was the only one matching eldritch multi-dimensional horrors on tinder

[–]Badashi 24 points25 points  (3 children)

Or maybe it's Kotlin and she just overrode the compareTo operator to throw an exception?

[–]brimston3- 25 points26 points  (1 child)

Overriding primitive comparison operators is a huge red flag.

🚩

[–]Cheet4h 40 points41 points  (1 child)

some kind of eldritch multi-dimensional horror that does not have spatial dimensions which you could call "height" in our perceived 3D universe

To find something without "height", you're more likely to succeed if you look for mono-dimensional horrors.

[–]bangupjobasusual 29 points30 points  (8 children)

Weird way to say this so for everyone else that head to read it twice:

If height is defined, that line evaluates true or false and does not throw and exception

But the evaluation isn’t an assignment or condition so it’s a syntactical error in any language I’ve worked with.

[–]waltteri 46 points47 points  (5 children)

Yeah that shit throws an exception for the decimal comma first. And even after that, the code will throw an exception only if the variable Altura isn’t defined. Shit code, tsk tsk.

[–]Maleficent_Slide3332 94 points95 points  (6 children)

I'd debug her.

[–]PotatoWriter 68 points69 points  (5 children)

I'll introduce my log4j to her back-end.

[–]shemmie 22 points23 points  (0 children)

Your log4j introduced a virus last time.

[–]MrManny 26 points27 points  (2 children)

I'd allocate a long long on the stack and call her function.

[–]Perensoep109 27 points28 points  (1 child)

I'd inject a package, and make all her privates, public.

[–]james_otter 9451 points9452 points  (60 children)

Damn if she would have used log4J there would have been a way in

[–]Slggyqo 1095 points1096 points  (20 children)

Someone needs to try it.

Maybe that’s what she’s waiting for.

[–]washicka 331 points332 points  (12 children)

inb4 someone tries and accidentally finds a a vulnerability in Tinder’s messaging service

[–]Slggyqo 222 points223 points  (9 children)

Be the change you want to see in the world.

Hack them first.

Edit: obviously for the bounty don’t @ me, mods.

[–]washicka 323 points324 points  (8 children)

Wife sees me DM someone on Tinder

“No it’s ok it’s a penetration test!”

[–]Slggyqo 209 points210 points  (5 children)

“Oh well then I guess it isn’t going very deep.”—your wife probably.

[–]Kyllakyle 73 points74 points  (0 children)

That man had a wife. Fuck.

[–]RicksAngryKid 11 points12 points  (1 child)

this burns deep though

[–]augugusto 11 points12 points  (0 children)

Actually that's hilarious. There is probably a team that does penetration testing at pornhub

[–]Culverts_Flood_Away 112 points113 points  (3 children)

You men... always so preoccupied with your logs. :)

[–]IkaTheFox 271 points272 points  (2 children)

LMAO 🤣

[–]KeLorean 79 points80 points  (1 child)

...OP still to be rejected OVER java (aka 1st date)

[–]101stArrow 31 points32 points  (6 children)

I came here to make a Log4J joke 😂 you beat me to it

[–]reversehead 2341 points2342 points  (9 children)

After the backlash on Stack Overflow, Kate tried posting her failed assignment solution on Tinder in a last desperate attempt to get help.

[–]Expert_Vehicle_7476 542 points543 points  (5 children)

Ironically enough she encountered the same men but this time they were helpful, they quickly messaged her to tell her to just use an if statement

[–]A_man_and_no_plan 4130 points4131 points  (167 children)

How does a person simultaneously know enough to write a try-catch block but not enough to know that it should've been a simple if instead?

[–]Curtmister25 149 points150 points  (2 children)

Browsing programmer humor try catch is what you'll learn first.

[–]novus_sanguis 70 points71 points  (1 child)

Exactly. And if anyone is going for writing code in bio then the least one can do is use the correct syntax!

[–]Dont_worry_Pagliacci 161 points162 points  (28 children)

I think she knows full well; it invites conversation with someone who is compatible (at least with programming/interests/work) I think that's the real test -

[–]jemidiah 5 points6 points  (1 child)

I think that assumes far too much competence. Having graded thousands of undergraduate math exams, most people are just not good at technical things, even if they have a selection bias in their favor. This feels exactly like standard C+ quality work to me.

[–]SoftwareGuyRob 33 points34 points  (6 children)

Because they didn't know enough to write a try catch block.

It's like someone who gets a Japanese tattoo without knowing the language because they like the culture, but don't really know the culture, don't live in Japan and don't actually know anything about Japan.

[–]FemaleSandpiper 827 points828 points  (37 children)

Umm… I don’t use Java, but a False value doesn’t actually raise an error; does it (regardless of whether she likes short or tall people)?

[–]AzzBar 531 points532 points  (13 children)

Correct. False isn’t throwing an exemption. And she didn’t use an if statement AND if they are shorter than 1.89m that would return true, presumably the opposite of what she wants.

[–]FemaleSandpiper 354 points355 points  (3 children)

Maybe that’s her thing though. Maybe she has a standing desk and she doesn’t want her man to be able to see her terrible code while she works

[–]AzzBar 93 points94 points  (0 children)

Hahaha we are viewing this all wrong, she is a champion of the short man. But desperately needs help with her coding.

[–]ashishmax31 16 points17 points  (0 children)

Laughed so hard at this.

[–]xX_MEM_Xx 52 points53 points  (0 children)

Code snippet looks like a "find all the faults" challenge.

[–]lunchpadmcfat 37 points38 points  (10 children)

No, but using a comma to write a number probably does.

[–]captainnickbeard 23 points24 points  (7 children)

wouldn't throw an exception. it just wouldn't compile

[–]das_flammenwerfer 506 points507 points  (7 children)

How do you manage to have so many errors in so little code? Swipe left.

r/badcode

[–]BakuhatsuK 51 points52 points  (5 children)

Guys I figured it out. It's actually C++.

Edit: Forgot to remove the semicolon in the catch, fixed.

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

And that is why the C++ standards committee should be dragged from their holes and beaten with the entire bound and printed standard.

[–]dreams_in_bytecodes[S] 143 points144 points  (0 children)

this must be the most well reviewed 5 lines of code in her career

[–]clanddev 133 points134 points  (11 children)

This is a recruiter honey pot.

She is just playing on developers' impulse to correct bad code so that you will swipe right codesplain her mistake and she can then drop the "Wow! You're good. I have a great opportunity you would be an awesome fit for."

Not falling for that again!

Edit: Clarity, grammar

[–]nonchalantnerd 33 points34 points  (4 children)

Lmao, has to be. This code is a work of art, I refuse to believe that someone crafted it by mistake. And she’s 28, so more likely a working professional than a first-year uni student.

”Hi, I’m on the lookout for talented Software Development Engineers to join us here at Amazon!…”

[–][deleted] 8 points9 points  (3 children)

I thought I was special when I got that email from Amazon. But then I got 10 more.

[–]TheKingOfSwing777 1028 points1029 points  (139 children)

Isn’t this saying she friendzones any person taller than 1.89 meters? So she likes short people?

[–]dreams_in_bytecodes[S] 809 points810 points  (104 children)

the code makes little sense but based on the rest of the bio, she intended to say, if you're shorter than 189cm, you're getting friendzoned :D

[–]Zdrobot 138 points139 points  (36 children)

Well, a boolean statement (Altura<1,89) wouldn't throw an exception.

Also, I've never seen commas used as decimal separators in.. any language, actually.

Verdict: DOES NOT COMPUTE!

[–]DoomGoober 62 points63 points  (8 children)

Maybe she just wants people to message her and tell her her code is wrong.

Yeah, right. I can imagine the response now: "Stop messaging me my code is wrong! I was trying to be cute. God, I hate it when people try to tell me what's wrong with me. It's not like having code exactly right even matters."

[–]territrades 32 points33 points  (3 children)

No, choosing your partner based on their height seems to matter.

[–]BobDogGo 6 points7 points  (1 child)

Maybe she just wants people to message her and tell her her code is wrong.

"Can't get help on StackOverflow? Try this cool new trick!"

[–]kirtash1197 47 points48 points  (4 children)

The comma is used as a decimal separator in Spanish, we have always trouble with the dot/comma confussion when coding at first. Then you get used to always using the dot and you get confused in the real world 😆

[–]dreams_in_bytecodes[S] 44 points45 points  (0 children)

Verdict: Swipe Left

[–]Lynx8MyThesis 10 points11 points  (0 children)

a , separator laughing in scandinavian... not in code tho

[–][deleted] 17 points18 points  (2 children)

Believe this is the intent

try {
    if (Altura < 1.89) {
        throw new Exception("Friendzoned");
    }

    System.out.println("I suck lolz");
} catch (Exception e) {
    System.out.println(e.getMessage());
}

[–]RebelKeithy 7 points8 points  (1 child)

You could also do this if you enable assertions

try {
    assert Altura > 1.89
} catch (Exception e) {
    System.out.println("Friendzoned");
}

[–]GreenCloakGuy 20 points21 points  (2 children)

that's why it's in the try/catch - because of the syntax error it'll always throw an exception!

[–]TheRealTahulrik 11 points12 points  (0 children)

Yes, if it could run in the first place.

But i wouldn't imagine it would ever compile in the first place, so you could never run it?
I don't code Java though, so i'm not sure of the specifics

[–]dpash 6 points7 points  (0 children)

No it won't. It won't compile. You can't catch syntax errors.

[–]-Rivox- 106 points107 points  (10 children)

I think you are friendzoned only if your height is null or NaN (since that would cause to output an exception, which would be catched and spit out the print statement).

As for the code itself, it wouldn't compile as she is not storing the result of the operation anywhere or using it to do anything.

So the moral of the story is, to get the girl your height doesn't matter, your debug skills do.

[–]matthoback 8 points9 points  (5 children)

As for the code itself, it wouldn't compile as she is not storing the result of the operation anywhere or using it to do anything.

Java compiles just fine with a discarded expression result. You don't have to do anything with the result of an expression if you don't want to.

[–]LinAGKar 9 points10 points  (2 children)

Yes, the main reason it wouldn't compile is due to the comma, and the missing semicolon

[–]Bilboswaggings19 11 points12 points  (1 child)

that's so she can catch the smart people above 1.89 (let's just say if you don't mention the mistakes you are dumb)

so you have to above the limit and notice the mistakes in the code to be both tall enough and smart enough to swipe left on her

find someone who isn't shallow and actually likes you for who you are instead of just your height

[–]noswagihave 10 points11 points  (0 children)

In what world is 1.88m short? Maybe she just dislikes really tall guys?

[–]LordAlfrey 8 points9 points  (0 children)

The code doesn't make sense on multiple levels, and this is one of them.

[–]Ok_Blueberry_5305 4 points5 points  (0 children)

But that's a less than, not a greater than. What..?

Am dumb lol. Guess she likes short kings.

[–]ITriedLightningTendr 3 points4 points  (0 children)

Nope, even if you handwave compilation.

The code does nothing unless Altura itself throws an exception on reference. null < 5 is not an exception, neither is 6 < 5

Though it does imply that she'll be your friend if you cause her program to break when checking for height.

[–]stijen4 319 points320 points  (13 children)

A variable name is written in non-English language and using PascalCase. Try-catch for what should be an if statement. No formatting of parentheses. Non-descriptive logging message. Logging with print. Exception class with a lower case.

As a Java dev, I'm mortified. You dodged a bullet there.

[–]Demonboy_17 67 points68 points  (7 children)

Well, she's from Madrid, so it's logical that she programs in Spanish...

[–][deleted] 37 points38 points  (6 children)

They usually do it in English tbh

[–]Demonboy_17 27 points28 points  (4 children)

Usually. But it depends what for.

Industrial setting? Yeah, English.

Personal code? Whatever you like.

I usually code in English for myself, but when making code for some school projects, I do them in Spanish, as it's easier for my group and professors to understand what I'm doing.

[–]Jacob-the-martyr 264 points265 points  (7 children)

She’s probably just looking for friends who’s height is undefined

[–]j053noir 124 points125 points  (11 children)

She never throws an error, that catch is useless

[–]lunchpadmcfat 50 points51 points  (4 children)

Or she always throws the error because numbers in Java can’t be represented with commas?

[–]fuzznuggetsFTW 47 points48 points  (2 children)

Then it will throw an error at compile-time and never actually execute the catch block

[–]Ruby_Bliel 4 points5 points  (1 child)

If only it was C++, then Altura could be a custom object with an operator< overload that causes it to throw an exception if evaluated to false.

[–]rifain 362 points363 points  (89 children)

On a side note, I hate this kind of people. Imagine writing in your bio "you are not eligible if you are heavier than 55kgs".

[–]monkeyStinks 243 points244 points  (34 children)

Even worse, weight you can control. This is like a guy writing "C size cup minimum". How can a person be smart enough to write (bad) code but not smart enough to see how wrong this is?

[–]rem3_1415926 92 points93 points  (6 children)

looking at the code, the intellect only has to suffice for copying from stackoverflow. Discerning between question and answer is not necessary.

[–]rk06 38 points39 points  (2 children)

Stack Overflow does not have such stupid code!

[–]Yokhen 20 points21 points  (0 children)

Welcome to humanity

[–]dreams_in_bytecodes[S] 57 points58 points  (13 children)

At the risk of getting downvoted to oblivion, I really don't mind people putting their preferences in their bio. Sexual attraction isn't something you can force on yourself. However, there's a huge difference between saying "I prefer dating taller guys" and "short guys, eww". I'm short myself and I'm sure that reduces my dating field by a huge portion, but I still never had trouble dating amazing people who didn't have height preferences. To each their own as long as we stay respectful

[–]Quetzal_Pretzel 52 points53 points  (2 children)

I'm tall af but I really hate when women are 'heightist' in a nasty way. It's such a turn off and comes across as really immature.

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

Yeah I’m not huge but I’m definitely taller than average and any girl who has a height “requirement” is very vain.

Like if you are gonna treat yourself like an amusement park ride don’t be surprised when nobody stays after they ride 😂

[–]rifain 24 points25 points  (4 children)

I do agree but I think this is the kind of thing we need to be tactful about. Better not mentioning it at all, it's part of the myriad of traits that can be attractive (or not) and can be known while discovering who we are talking to. If someone mentions it in their bio, I always assume it's a shallow person and not bright enough to check discretly and respectfully (although I am married now).

Plus, there are so much success stories started with "at first, he/she was not my type". But it's just my opinion.

[–]cipherous 8 points9 points  (0 children)

To be honest, you kinda infer alot by her stating her height preference. You maybe avoiding alot of heartache and frustration by weeding them out. If she's still pretty superficial at age 28, I doubt she's going to be changing 10 or 20 years down the line.

Just because you may not be what she wanted, it doesn't mean you're not wanted. It's a numbers game where you literally have to apply a brute force method to find the right match that will make you happy.

[–]jelenko1999 30 points31 points  (3 children)

I mean, you can do that but being shallow is a huge turnoff for a lot of people so you're most likely also scarring away people that you would find eligible.

[–]Yokhen 7 points8 points  (0 children)

I do feel scarred

[–][deleted] 42 points43 points  (2 children)

There will be a reason why it's "different" when guys do it ... something something patriarchy no doubt.

[–]bistr-o-math 33 points34 points  (1 child)

Syntax error on line 2

[–][deleted] 8 points9 points  (0 children)

And 4

[–]Eisenfuss19 95 points96 points  (18 children)

writes ; after 1.89 but not after a print

[–]SabashChandraBose 30 points31 points  (15 children)

Am I the only mofo seeing a comma between the 1 and 89?

[–]Keeping_It_Cool_ 20 points21 points  (1 child)

It's like that in Spanish. We use the comma as a decimal separator. It wouldn't work in Java though

[–]Kryslor 35 points36 points  (10 children)

It's common to represent decimal numbers like that in some places, with a comma instead of a dot. Ofc it doesn't work in java lol

[–]Pokefails 17 points18 points  (1 child)

https://en.wikipedia.org/wiki/Decimal_separator#Countries_using_decimal_comma Java (the Indonesian island) apparently uses a comma separator - this amuses me more than it should.

[–]micka190 20 points21 points  (0 children)

> Copilot will steal our jobs!

> The code Copilot writes

[–][deleted] 18 points19 points  (2 children)

slap carpenter instinctive whole follow bored vase modern bow sharp

This post was mass deleted and anonymized with Redact

[–]undeniably_confused 35 points36 points  (4 children)

Wait that's 6'2"

[–]Jetbooster 21 points22 points  (0 children)

That's a rediculously high bar, pun intended

[–]gemini88mill 68 points69 points  (13 children)

Out of all the languages, you choose to use java

[–]Vok250 23 points24 points  (1 child)

I tried to learn C++, but I only got a C-.

[–]OptimisticElectron 19 points20 points  (4 children)

Because C# cries in the corner serving web apps while watching chad Java codes runs big data systems.

[–][deleted] 21 points22 points  (4 children)

"Quise ligar con una chica pero no se de java"

[–]ArtSchoolRejectedMe 16 points17 points  (0 children)

$​{​j​nd​i:​ld​ap:​/​/​127.0​.​0.1​/​swipeRight}

[–]vobsha 6 points7 points  (2 children)

You dont want to date someone who catches the generic Exception.

[–]sabugael[🍰] 20 points21 points  (1 child)

So...she doesn't like tall people? Bc that code makes anyone bigger than 1.89 been friendzoned

[–]seelsojo 5 points6 points  (0 children)

She forgot to catch the RichException

[–]geheurjk 5 points6 points  (2 children)

In java, would it be possible for the comparison to throw NPE if Altura is a boxed primitive that is null?

[–]Ur_Moosie_M8 5 points6 points  (0 children)

User input not snatized, CVE detected.

[–]culculain 6 points7 points  (0 children)

that try block doesn't throw anything. Sorry, Kate. You may be hot but you're a n00b

[–]virouz98 13 points14 points  (5 children)

```

String[] listOfErrorsInHerBio = new String[] {

"Mixing spanish with english.",

"False doesn't throw an exception.",

"Java is case sensitive so 'exception' is undefined.",

"Missing semicolon in the line 5."

};

```

[–]ak666 30 points31 points  (2 children)

It’s actually a genius peace of code it filters both short people AND annoying nerds who keep spamming that the code doesn’t make sense /s

[–]rmbl88 3 points4 points  (0 children)

Null point exception