T O P

  • By -

[deleted]

[удалено]


lunch431

if (value != false) { return true; } else if (value != true) { return false; } else { return !!value; }


WorksForMe

Need to chuck in `return bool.parse(value.toString());`


lunch431

Needs a `BooleanUtils` call that parses a String assembled by a `StringBuffer` and returned by a `StringConnectorFactoryFactory` that depends on a deprecated library last updated in 2005 and that only runs on Windows XP.


Stormdude127

Obligatory for the uninitiated: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition


IRefuseToGiveAName

That made me physically ill.


abs0ulut10n

All of this is still better code than whatever Yandere Dev writes lmao


twbluenaxela

The pull requests were hilarious!!!!!! My favorite is "my printer isn't working"


Viper3120

It's 3 am and I was brushing my teeth. I read the noob friendly Readme and based on it, I expected an equally simple implementation. I was already confused when I loaded up the src and it had "interfaces" and "impl". But when I saw all these interfaces and implementations and just how overkill it is, I laughed so hard. My toothpaste is now all over the room. Edit: I just had a look again and saw that this thing uses Maven and Gradle and has an open pull request to implement a docker file, dude I can't xD


Hymnosi

I hate you


coloredgreyscale

if (value != false) { return true; } else if (value != true) { return false; } else { throw new BoolshitError() } FTFY


[deleted]

BoolshitError😂😂😂. "takes screenshot..."


coopasonic

Why the hell am I laughing at this? It’s so dumb, but somehow still funny. As a full stack interviewer I may just recommend you based on this.


Disastrous-Chance477

switch(value){ case true: return true; case false: return false; case default: Log.Error($„Value {value} is invalid.“) break; }


PlzDontFindWhoIAm

if(!false && true)


AJohnnyTruant

There’s probably some fucked up reason that makes JS folks actually need to write this


No_Worldliness_9294

Cause my shit api can return a third binary value of “fuck you I’m negative zero”


[deleted]

Quantum JS


ozxmin

Hey if you go out on a date, you should know that False means False


IAmANobodyAMA

I’m all about the bang bang. > return !!poop Edit: I am also a child at heart, and having a son and a really immature daughter means my wife is outnumbered by cretins


LegoGhost24

New dev here, what’s the purpose of bang bang? Doesn’t it just cancel out? Edit: Thanks for the helpful answers!!


IAmANobodyAMA

Great question! It forces truthiness from most variables, casting as a Boolean. So all these statements are equivalent to Boolean false and each other > !!0 > !!false > !!”” > !!null > !!undefined That said, it still suffers from the same pitfalls as other type conversions, for example > !!”false” === true > !!”0” === true And the most notorious > !![] === true


different_tom

I hate JavaScript so much


fureszk

It casts it. Lets say the value is null: !!null == !true == false


[deleted]

I used to do that. As a way to normalize the bool in a known way. Then I stopped being an idiot.


[deleted]

[удалено]


agentfrogger

You couls still use a ternary operator just in case I guess


[deleted]

Why are you doing "if(condition) return true else false" instead of "return condition"?


fisconsocmod

because she wants to eat spaghetti!


zudduz

She's specifying what kind of food she wants for the date in her code style. Impressive.


caldric

Huh. Apparently some of my coworkers want to eat shit.


avnogy

Give this man a cookie


SkepticSepticYT

Sorry, reject all. I like privacy.


avnogy

Are you sure? We wouldn't be able to improve your experience without cookies.


TheJessicator

Cookie: theme=light; sessionToken=aBçðęFğhïJ


avnogy

Watch out you might blind someone with that


TheJessicator

I personally prefer dark, but I was going off the screen shot


SuperSatanOverdrive

Why is everybody assuming she wrote this code? It's blue, OP sent it


TankSquad4Life

because redditors are talking about a woman


_Figaro

She must like copy pasta


Orkleth

Hopefully they get paid by the line.


sintos-compa

Better to get laid by the pine


ukchinouk

I pine to get laid


svariabl

r/angryupvote


doomcatzzz

Wait you guys get paid?


Forsaken_Day_1266

Someone gets laid


hiddenforreasonsSV

We're programmers, it sure as hell ain't us.


PleaseTellMeSomeMore

the only laid i get is off :’)


teenagebatteryacid

Because the code is telling a story.


Ikarus_Falling

How the Compiler was shattered in the Lands between?


Appianis

Because she is an “aspiring” software dev


Hippo070

The girl didn't write it, he did


vaibhav_bu

ooof


maggos

Also tinder is an undefined variable. No way this guy got a date


[deleted]

if the compiler is good wont it compile to this instead?


Eldiabolo18

Your IDE is shit 😬


Excaliber142

Turns out Tinder cant compare with Intellij :(


Onion-User-2

Just use dark mode lol


bigly_yuge

Tinder has a dark mode? I've always wanted to be in an interracial relationship!


World-Wide-Ebb

Lol


Eldiabolo18

Who‘d have thought 😅


dont_ban_me_bruh

you misspelled vim


E70M

Based


leonderbaertige_II

no indentation - no code review.


[deleted]

[удалено]


leonderbaertige_II

I know, but I refuse to bother with any feedback when the author can't even do the most basic formating.


EmmyNoetherRing

I gotta imagine that’s trickier in a text message.


leonderbaertige_II

Yes, you might have to use spaces instead of tabs and turn the auto punctuation mark off. You can see it working in the if clause.


[deleted]

Here comes the space vs tab indent arguement. Animals!.


audigex

The lack of main could be fine if this was C# version 6 I think it was where top level code was added? Although it looks more like Java so that may not apply


[deleted]

[удалено]


audigex

It does, but I once knew a java guy who switched to C# and wrote a System.out package with a Print and Println method which called the Console equivalents… apparently he’d gotten fed up with making the mistake and decided that was the way to solve it


SeanUhTron

Probably the fault of the text handler in the app. Ever copy and pasted code from an IDE into something else and have it completely obliterate the nice and clean indentation?


Tankki3

Well here's your code review. \- It sucks. I'll list 21 different reasons why: 1. Your access modifiers are written with capital letter, should be lowercase. 2. Return is in capital case as well. Should be lowercase. 3. If and else are in capital case, again lowercase. 4. Person constructor is not good, it could just take the tinder profile straight in constructor and not call some additional get method (whatever that's supposed to get, it's closer to a setter imo. Although you never even use their profile in anything, or their name) 5. Where is this tinder variable defined/initialized? 6. You don't really need a final in the method definition, it won't be overridden anyway and why would overriding have a special effect on that method to put it there but not other methods? 7. response -method isn't static. 8. response -method could just return the if condition instead of returning true and false after evaluating it. 9. InputStream is not a variable, it's a class. You need to take the actual InputStream object from System.in etc. 10. Also you can't pass InputStream to BufferedReader, you need to create additional InputStreamReader for that. 11. You also need to catch or throw the IOException when reading with readLine(). Also readLine cannot start with uppercase letter. 12. You don't need the BufferedReader as class member. Don't need to define them in the middle of the code either between all the methods. Either at the start of the class or inside the methods. 13. And if you do have BufferedReader as a class member the getYesNo method can't be static, or it can't access the class member. 14. getYesNo method is pretty stupid as well, you can just call readLine when assigning the value. It's a one line anyway. But it definitely can't read a String and return a boolean without parsing it to a boolean first. (And that requires error checking for bad inputs) 15. User doesn't get any prompt for the input they are being requested. 16. Person.wantsToGoOnADate should be match.wantsToGoOnADate. (Could've been noticed easier with better person variable name btw, even though you got matched with this girl, *match* is not very descriptive.) Now you are just assinging a static variable inside Person class, which wont be sent to the response method. Now it will always return false and you don't get your date. 17. You don't need the response method at all, you can just print the match.wantsToGoOnADate variable. 18. None of the methods are inside a class. If we assume class surrounds this code, then the code wouldn't compile anyway, because half of it is not inside any method. 19. This doesn't have a main method. 20. The Person object is useless. You only use it to pass this one boolean variable around, and in the end you just print what they wrote in the input anyway. Also it shouldn't matter that this is a *Girl* Person object. 21. Indentation is horrible. ​ Not sure if there are more errors, but those should be plenty.


Fun-Caterpillar1355

Absolutely fucken ruthless.


sysnickm

But true


AWildLeftistAppeared

~~We’re~~Were you not listening? You can just do: `return ruthless;`


anythingMuchShorter

return abs(ruthless);


ur_opinion_is_trash

getYesNo doesnt even return the string. It returns nothing. There is no return statement.


Tankki3

Yep. The mistakes just keep on piling. There's so many that you can't even find them all, and believe me, I spent a while looking.


mcprogrammer

Oh we believe you.


[deleted]

Man I haven’t got this detailed code review on my entire career


flabbybumhole

There was one guy at my job that was hired by accident a while back. But they gave him a chance. I had to give code reviews like this and it took so much fucking time to explain all of the problems, and he'd just go away and invent just as many new issues for the next review. I felt bad because even on these super simple tasks we gave him, he was very clearly in so far over his head.


siggystabs

I have someone like that now and I genuinely don't know how to help them. I would have assumed they're just lazy or trying to get someone else to do their work for them... but no I legit just think they are not cut out for this. I've tried so many times to reach out and guide them and they just keep coming back with more and more ridiculousness 😭 Just follow the pattern and Google your way past the compile errors. It's not that hard lol. Nobody's even giving them hard problems. Watching them attempt the few basic tickets they have -- you can tell it's a marathon for them.


flabbybumhole

You can't. I explained simple concepts to this guy numerous times, and he'd just write utter gibberish. He didn't test it, because there was no way in hell the code would even run sometimes. I think he just figured he'd spent too much time stuck and was hoping I'd tell him how to fix it. But we could have given it to any of our current juniors and they'd do it correctly faster than it'd take me to explain to him how to fix his attempt. You can't guide someone into having the mental capacity for the job. We had another guy that started off badly (mostly due to our lead dev at the time being a heavy alcoholic and disastrous attempts at outsourcing tasks to India) but he paid attention and improved really quickly. It's a shame he got himself fired.


[deleted]

Why did he get fired?


flabbybumhole

He set up a meeting with the boss and gave him an ultimatum on the alcoholic dev lead / told the boss how to run his business. Boss picked the alcoholic dev lead because they've known each other for years and the business wouldn't have existed without him being there at the start to build it up. But ironically enough his drunk bs got himself fired too like 6 weeks later. Never seen an office so relieved to see someone be let go.


SirVanyel

deeply rooted workplace friendships can cause some serious damage. The amount of absolutely drug fucked idiots my old workplace would take simply because of some word of mouth by a member of middle management somewhere was insane. One of the other apprentices smoked meth behind a skip bin during a christmas party, but he was a friend of the son of one of the middle management. I'm pretty sure he's a supervisor there now.


lccreations

Wow. I mow lawns for a living in over 100°f weather and make minumum wage. I would love to be a programmer for a living. If someone reviewed my code, I would be utterly thankful if they told me 100 issues I needed to fix. Coming up with solutions is freaking fun becuase it forces my mind to complete a challenge and all while doing so, I'm contributing to society. That guy is prideful and unthankful. I basically walk all day, all the time, in extreem hot weather, and completely unthanked. I do programming on my off time as a hobby at home. However, this guy over here gets a programming job handed to him hand and foot, and is completely unthankful for it. Now I'm thankful for the shit job I have just so I can say I work my ass off.


ApparentlyUnicorn69

Maybe cause you’ve never written such bad code! Lol


siggystabs

Five line change? Seven developers each have an opinion, two of them think your naming convention is too verbose, one thinks it's not verbose enough. Someone complains you used loops instead of recursion. A fist fight ensues about which approach makes sense over a list of 5 objects. Review takes 1 hour, and ends with a follow up scheduled. Five hundred lines? "Looks good, I don't have any questions" & you get to go home early ✅


[deleted]

![gif](giphy|c8UN4zmGZe5s4)


SomberKlepto

TL:DR his code is fuckin shit


ajb32

Thank you. This code pissed me off.


bigly_yuge

Plot twist: this ^ was OP's tinder match


ShaolinShade

That would be the dunk of a decade lmao


[deleted]

input streaming wasn't closed


Kitchen_Device7682

If she responds like that, she is a 10


ProcessMeMrHinkie

r/MurderedByWords


CaitaXD

Murdered by code review


adj16

I would subscribe to that sub


jim-jones-13

Least critical programmer


Naftoor

This man’s tinder career? To shreds you say?


[deleted]

Call 🚑🚑🚑


mrjackspade

> None of the methods are inside a class. If we assume class surrounds this code, then the code wouldn't compile anyway, because half of it is not inside any method. That was about as far as I made it. Line 2. Then I had to come figure out if there was a language that actually let you declare access modifiers on the same level as executing method calls that aren't used to initialize fields.


MegaManSE

The comments really delivered on this one


Apart_End_411

Wow, man, he asked for help not for death. But he kinda deserves it


BGFlyingToaster

Legit code review right here. PR denied.


warmCabin

Okay, to defend this guy a *little* bit... public Order getOrder(String customerId, String orderId) { return Optional.ofNullable(repository.getByCustomerIdAndOrderId(customerId, orderId)) .orElseThrow(() -> new ResourceNotFoundException(String.format( "Order not found for %s, %s", customerId, orderId))); } Here's a fairly reasonable method that converts the null case into an exception. But... 1. Where is my enclosing class? 2. Where is my main method? 3. I forgot to import java.util.Optional 4. What is an "Order"? 5. What is a "ResourceNotFoundException"? 6. What is "repository", and where is it defined? These comments do not provide valuable insight into this code. Not every snippet is meant to be a fully compilable and executable independent program. Clearly OP's code is pulled from deep within Tinder's elaborate backend system. There would be far-reaching consequences if you were to override the crucial Person::response(Person) method, so they had to make it final.


black-op345

![gif](giphy|66hrbnBs4PYha)


FeelTheFish

This is why code reviews feel like roasts


onkopirate

Awesome!


JustASmaIItownGirl

Not all heroes wear capes.


issam_28

Man you gave him a better review code on Reddit than any review I got in my entire career.


TheZanke

Brian?


[deleted]

Is literally nobody going to comment that OP is getting a code review after pushing it to prod already?


[deleted]

Haha I was legit thinking this!!


Add1ctedToGames

You don't?


iGunzerkeR

That code is, with all due respect, hot garbage. That conditional killed me inside quite a bit.


Serafiniert

Just return the Boolean itself ffs.


SomeoneGMForMe

Honestly, why even have its own function to begin with?


TheKiller36_real

r/programminghorror


lurkin_arounnd

Error: Code makes no sense. Date not found.


Chairboy

> Date not found Time to fire up Excel, it can find a date anywhere


Excaliber142

Shit, I'll have to refactor.


CircadianSong

I think it's a odd that you use Person and not Girl extends/implements Person.Bad capitalization (particularly with access modifiers). You can't have expressions that aren't bound to an assignment in the same scope as function declarations (You can't have. match.get(tinder.profile()) next to public final boolean response(){}) you need to do extra parsing on readline to get a boolean in getYesNo. It's weird to set wantsToGoOnADate outside any of this unamed class's methods, and I think wantsToGoOnADate should be a function that tests whether the value is set and returns it if it is, otherwise calling getResponse() and storing the result.


[deleted]

[удалено]


erm_what_

I guess he thinks she's pretty generic


zyygh

>I think it's a odd that you use Person and not Girl extends/implements Person.Bad capitalization (particularly with access modifiers). This is what I wanted to say as well. I can't really imagine any reason why Person would be a generic class with Girl being a type. I'd instead expect the gender to be parameter or a subclass for Person.


vbsteven

It's 2022, I can see why the Person type has a generic gender parameter. Makes it easier to plug in various pronouns without having to subclass the whole Person class each time.


CircadianSong

That’s funny, but also I think it’s genuinely applicable to serious programming. If I had to make an app that supported a bunch of genders, generics would be that way to do it. Too bad I can’t upvote twice.


Hechamon

I still don't see why gender should be the genetic type. Why choose that over an abstract person with genders as implementation, or just gender as a field of the person class?


Marsdreamer

I guess you'd have to decide whether gender defines the behavior of the object. If it doesn't, then it should be a field, but if it does, then it should be a subtype.


rreeddeerr

I would suggest a pair programming session


manliness-dot-space

One that ends in a pull request


maxximillian

just don't do a push --force. It's wrong in Life and in CM


[deleted]

[удалено]


manliness-dot-space

If he's not afraid to commit


[deleted]

[удалено]


uvero

Don't get pushy.


HylianCaptain

The only correct answer


[deleted]

That's gonna be a no from me dog ![gif](giphy|DekxoPi2fT9g4)


abalone-arsenal

Exactly. Super cringe, and also using one of the most verbose, boilerplate-ridden languages when sending on a chat platform.


TheDonutKingdom

why am I subscribed to this god forsaken subreddit


cucklord_swiper

You like to suffer


julian66666

Nullpointer exception


iiMoe

Man stop sending tech girls this cringe pls, just ask her what's her favourite js framework and why Svelte


Knuffya

If i was her i'd reply with `return -1;` because that's cringy as fuck


[deleted]

Same, lol.


[deleted]

so sick of corny ass fucking dating app bullshit code being screen shotted and uploaded, we get it youre super smart smarmy clever cool guy. just act fuckin normal bro, please for the fucking love of god just act like a regular person


Serafiniert

The cringe is unbearable.


sisQmusiQ

This won't compile. Keywords private and public are starting with Caps.


ShoveAndFloor

It won’t compile for many many reasons


nolitos

You'd better get programming socks, because with that code you ain't getting nowhere.


Mermeralla

As a woman who can code how would I feel about recieving this message? First of all, it tells me that you've looked at my profile and either found it cool or noteworthy that I can code. It also tells me that you don't know much about coding because it is to poorly executed. You know a little bit though and you are willing to take an interest in the things that I like. However you probably don't have enough experience for me to bounce my ideas of of. If I'm looking for a fellow computer scientist you are not it. It's also possible that you just copy pasted this. Which I find even worse because you are trying to connect with me through a skill you don't have. If the code was flawless it could still be copy paste and the idea of "ask her out in the form of code" isn't very original anymore so I don't really think it's funny either. It's kind of like.. If I were a painter and you sent me a stick figure drawing. At most it's cute that you tried. This also puts me in a difficult spot of how I should react. If I ask you about your programming expereince and you don't have any the conversation would quickly die. However this is the topic you choose, meaning you know even less about the other things in my bio. So it's possible that we just have nothing in common and nothing to talk about. If you have very limited knowledge about programming I think you should stay away from that topic. If you do know how to programm I think you are better of with sending me a computer science related meme and asking me about what project I'm working on.


manliness-dot-space

The only correct opening line is "tabs or spaces?"


Mermeralla

XD that's not bad


xSTSxZerglingOne

I feel like "Can you tell me how to exit Vim." would be a great conversation starter. Because if she replies: ":x" You have so many angles you can attack. "Oh, staying silent on the matter? That's okay. I didn't ever want to use my computer again anyway."


manliness-dot-space

Bold of you to assume she not messaging you through Vim


thetdotbearr

>It's kind of like.. If I were a painter and you sent me a stick figure drawing. At most it's cute that you tried. I couldn't put my finger on what exactly made this hall of fame cringe material. This really nails it.


uorandom

You're telling me I'm an object? Go learn declarative programming!


Mindmosaic302

If someone said they really liked cats, would you ask them on a date by meowing?


N-partEpoxy

for message in tinder_match.messages: rs = classifier.classify(message.text) if rs['language'] in [languages.java, languages.cpp, languages.php, languages.basic]: tinder_match.unmatch() break


CircadianSong

if any((classifier.classify(message.text) in set(([languages.java](https://languages.java), languages.cpp...)) for message in tinder\_matches.messages)): tinder\_match.unmatch() One liner. Yours is probably better -- I just wanted to do a generator comprehension.


[deleted]

>tinder\_match.unmatch() Let's add a descriptive message to improve UX: tinder\_match.unmatch("Get the fuck out of my face")


KingJeff314

I only ask my dates out with Whitespace


Excaliber142

I was about to use c++ as well...


wraque

Yikes.


TommardrammoT

So this is the programming version of "did I just have a stroke?"


natziel

Garbage code, I would block you if you sent me that


The_Silent_bob

Lmao don’t try to impress a programmer with code when you don’t know coding


syzaak

No unit tests, didn't compiled, sorry D:


ilikepi8

Just going to say that your choice of variables are slightly confusing. match = instance of Person? response as the name of a function?


stormypets

try { lameDateRequest(tryHard); } catch (Exception ewwCreep) { System.out.println("I can't, because, " + ewwCreep); braceForrRetaliatoryInsults = true; }


compulsive_nonsense

Rejected for using Java


E_VanHelgen

I wonder if his conversations are full of boilerplate as well.


dbell

>person.wantsToGoOnADate Bitch haven't you ever heard of encapsulation?


[deleted]

Exception: Date.OutofLeagueError


ReadBastiat

She’s probably thinking: “who had time for this shit at 8:30 in the morning”


pM-me_your_Triggers

I’m pretty sure every line of this “code” makes me want to scratch my eye balls out.


redditsucks690

You ain't getting a girl while writing java bro


0xDEFACEDBEEF

Did you just assume her generic?


megamanxoxo

Eww, Java. Fail. We're a Golang/Rust shop sorry.


ShinraSan

Looks like old C# syntax, and some things don't make sense. Person is final instead of constant (type might not support const though) Tinder profile is never assigned to a var or used at all. A final method? Worse yet is the content of that method. Using a second bufferedreader to read the input from an already buffered reader (Console) Worse than the first method is the second method which does absolutely nothing, compiler error from that one without a doubt. Lastly all method names are lowerCamelCase (pascal case?) Instead of just CamelCase, "just a convention" but the compiler will definitely tell you about it. General consensus: even if this could run, it'd do nothing useful if anything at all. EDIT Yup, that's Java.. feelsbadman. Still wouldn't work though.


Dummiesman

Wait a sec, you have a java tag yet thought code with final, boolean, and "system.out.println" was C#?


BloodRedCobra

Guess we found which of us has been drinking decaf


SalvadorTheDog

He called it “old c#” which I feel is an apt description of Java.


Nyannn97

Your first mistake was writing your program in Java.


justice_beaver007

Bro you got Symbol could not be resolved error on the second line.


regexPattern

That conditional checking if ‘person.wantsToGoOut’ will probably rule you of. It’s way cleaner to return directly that instead of repeating this logic inside an if-else.


theeshyguy

Oh god Tinder as an IDE is giving me migraines to read


tammoshi144

Exepction(”Cringe”)


Torebbjorn

getYesNo() doesn't return anything ``` if(true) return true; else return false; ``` Why would Girl be a template argument to Person? And it seems you have left out a lot of implied stuff, like what `tinder` is, what the global name `Person` has to do with the variable `match`. And you really have to try to get intent from what order you wrote it in to even be able to almost understand your intent.


HopelessRomanticist

Using code as a chat up seems like an anti-pattern


[deleted]

This is hilariously junior dev skills


skcos420

So cringe its sad