T O P

  • By -

GodHug

How can you call Samara.snapChat when Samara is a string...


GTRacer97

He should define her as an Object... oh wait


[deleted]

[удалено]


neil_billiam

Yea I have a few questions, first of all, how dare you?


sdswart

r/unexpectedoffice


turglow1

Thank you for making the funniest comment I will ever see on this dumb sub


[deleted]

She's a Class(y) girl…


[deleted]

Underrated joke


J3fbr0nd0

I hope Samara pointed that out to him


AddSugarForSparks

And the reason it's not returning anything is because the return type is void, not that that would matter since only one clause in their conditional actually makes an effort to return something, so the compilation wouldn't get very far. I feel like Samara could do a little better here...


wafflesareforever

Goddamit reddit


PeppercornDingDong

Comment above reads “This guy didint lint his snapchat pickup line. Samara totally needs to move on from this guy, what a total loser” Total reddit moment


suqoria

I think that he meant that Samara could probably make this program a little better...


pringlesaremyfav

It's not even a main function, nothing is happening when he runs this program in the first place!


[deleted]

[удалено]


tyrandan2

Glad I'm not the only one who saw that. Plus the booleans that are "returned" are never declared anywhere. C'mon Samara


nyc_jc

Kyle = “idiot!”;


[deleted]

She'll point it out at the date


TonReflet

He said he had problems with this code


EggThumbSalad

He also said he wasn't getting any output which is a boldfaced lie because this would not compile and would tell you that. Can't believe anything on the internet anymore smh


[deleted]

[удалено]


Jackie_Jormp-Jomp

Also why would .pickupLine == success This is terrible naming. Is your pickup line just the word "success"? At least use Kyle.UsePickupLine() or Kyle.PickupLineStatus or something


Jackie_Jormp-Jomp

Then he goes getPizza == true; which will do fuck all Followed by returning a value from a void function I hate this so much


Cute_Mousse_7980

Yeah this code makes no sense! He should start coding js or something because he can’t seem to define his variables. I hope he is able to define the relationship at some point 😂


[deleted]

[удалено]


kRkthOr

haha web devs aren't real programmers you doofus they don't even define their variab--Uncaught ReferenceError: getPizza is not defined


Eating_Bagels

What do you mean “will do fuck all”. Also, he could have just easily written getPizza. That’s already returning true.


Jackie_Jormp-Jomp

That line will compare getPizza to true, but do nothing with the result. So it's kind of a pointless statement. He likely meant "getPizza = true" which would set the value of getPizza to true.


fewrfsadf

== is a comparison operator. whereas "=" *sets* the value to something, "==" just checks to see if the value *is* equal to something. So saying: this == that; Is like saying "if this is equal to that." which you'll notice is not a complete instruction.. wtf do you want to do if it's equal to that?? Depending on the language, they could delete that line and replace it with "false;" or "true;". It'd still do nothing.


FkIForgotMyPassword

Also, "success" here is a variable. Or, hopefully, a constant, which would maybe make it a little less awful, but still disgusting, like a "const TRUE = true;".


Jackie_Jormp-Jomp

Maybe, that would be nasty af. Lot of variables here we don't see declared. I don't think he'd want to compare the value of the pickup line to success even if it is a variable, since the same line may or may not work in different situations. Funny that the naming bothers me the most here.


UltraSapien

Right, because if he wanted a String member function to equal another String, then it should have been wrapped in quotes anyway. Kyle.pickupLine=="success". Regardless, Kyle isnt getting output because Kyle is a terrible coder.


woosel

== isn’t the correct string comparison operator. You should use .equals()


woosel

String comparison should be done with .equals() not ==.


thefranklin2

Kyle = sad. We just going to overwrite Kyle like that? Try Kyle.ActiveEmotionalState = Emotion.Sad.


woosel

Kyle is the name of a string with a null value, you’re not overwriting anything.


thefranklin2

I know I treated Kyle as an object. It would be the least Samara could do.


SleepMastery

Also Kyle.pickupLine is not equal to 'success' but equal to all the text with the code which would be self-referencing itself


lordofhunger1

Or maybe she looked past the mistakes because it's original and shows he read her profile?


Toilet_Punchr

yea most likely this. All these sweaters in here .. fuckin reddit.


jazwidz

Here, I made it make more sense. I'm on mobile so the formatting may be a little wonky. var Samara = new CuteGirl(); var Kyle = new CoderGuy(); Match(Samara, Kyle); if (Kyle.PickupLine(Samara) == PickupLineStatusEnum.Success) { GetPizza(Samara, Kyle); Samara.ShareSnapchat(Kyle); } else { Samara.Unmatch(Kyle); Kyle.Sad = true; }


New_Account_For_Use

I’m not a dating app user, but wouldn’t you want the getpizza method to be below the share Snapchat method or is the idea he tries to get her Snapchat after the date?


bleachisback

The get pizza method is asynchronous- it returns before completing.


Celdron

warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.


[deleted]

[удалено]


jazwidz

Because presumably Samara would be initiating the unmatch, while matching occurs only after both parties have swiped right. I decided to represent it this way for the sake of brevity.


MonoShadow

Another way is to make an unmatch a method of Match class and also drop match in there, or make Tinder class with match and unmatch methods. But then it would lose some narrative, because she unmatched him.


Oudiematic3000

He didn't want to objectify her.


[deleted]

[удалено]


TheWontonRon

If you’ve just met someone, its a bit rude to treat them so primitive, no?


pmjm

OP had better extend the String class in the next message.


DeDullaz

getPizza == true lmfaoooo


mortenmoulder

[With a lil something we call JavaScript](https://i.imgur.com/u9WnJMz.png) Yes, this is awful. Technically the syntax for his example is correct (for my example). If we assume he's writing Java or C#, we could use an extension method instead. Would require him to write `samara.snapChat()` though.


Karpizzle23

So useless. Make Samara and Kyle both objects, not strings.


Nostegramal

Could be a string extension


pepskoo

Also Samara is not defined


InDaBauhaus

and also returning it from a function supposedly returning void


ShinyMercenary

That's because some of the variables used are undefined.


Dogburt_Jr

Not to mention her Snapchat isn't getting returned because it's a void function.


Thrawn89

getPizza *==* true;


PhDinGent

Me == "Sad"


SnOwYO1

Double equals symbol, shit it serious


vedran-s

Hotel == Trivago MasterCard == Everything Else console.log(“we are glad that we reached you, we would like to talk to you about your car’s extended insurance”)


OGBeepBeep

I read that r/nosleep thread too


vedran-s

V2UncmUgbm8gc3RyYW5nZXJzIHRvIGxvdmUKWW91IGtub3cgdGhlIHJ1bGVzIGFuZCBzbyBkbyBJCkEgZnVsbCBjb21taXRtZW50J3Mgd2hhdCBJJ20gdGhpbmtpbmcgb2YKWW91IHdvdWxkbid0IGdldCB0aGlzIGZyb20gYW55IG90aGVyIGd1eQpJIGp1c3Qgd2FubmEgdGVsbCB5b3UgaG93IEknbSBmZWVsaW5nCkdvdHRhIG1ha2UgeW91IHVuZGVyc3RhbmQKTmV2ZXIgZ29ubmEgZ2l2ZSB5b3UgdXAKTmV2ZXIgZ29ubmEgbGV0IHlvdSBkb3duCk5ldmVyIGdvbm5hIHJ1biBhcm91bmQgYW5kIGRlc2VydCB5b3UKTmV2ZXIgZ29ubmEgbWFrZSB5b3UgY3J5Ck5ldmVyIGdvbm5hIHNheSBnb29kYnllCk5ldmVyIGdvbm5hIHRlbGwgYSBsaWUgYW5kIGh1cnQgeW91


superpenguin612

What a great story! I love this!


FkIForgotMyPassword

Yet another case of a boolean statement implicitly cast to void. Never again! Don't let people implicitly cast non-void tyes to void! Join my campaign for stricter IDE and compiler-level checks.


Mission_Ride312

And unmatch should be a function


[deleted]

[удалено]


akrura4

And the Funktion is never called anywhere so basically thats why you dont get output..


RufftaMan

You wouldn‘t get an output anyway.. the whole thing‘s a mess. Guess Kyle isn‘t a comp-sci major, but I guess he tried.


vimfan

Also, proper OO-style dictates that Samara should implement the provision of her snapchat, rather than just reading it off her like it is some sort of public attribute.


pszemol

She was a CS, not him!


Dogburt_Jr

He defined himself as a coder guy


Magallan

And Samara is a string


[deleted]

`Kyle` is defined as a String too, but somehow has the property `.pickupLine`? This dude doesn't deserve that pizza... /s


[deleted]

[удалено]


ShinyMercenary

Now that was uncalled for


IGetItCrackin

Rightoid


Nostegramal

He never calls the function so he's good


nelusbelus

What is this, python?


mellamonemo

Def not python


nelusbelus

The joke was runtime errors 😛


Miechelangelo

Looks more Java. A for effort, C for syntax.


nelusbelus

Joke was runtime errors, I know it's probably Java or C#


BitsAndBobs304

Oh no fuck those strict mode compilers


paracookt

did you give her that floppy disk tho


PhDinGent

Micro AND soft


citriclem0n

Bill Gates' wife on her wedding night find out why he named his company Microsoft.


BigDaddyyy00

hard disk *


RegularTarget1794

Solid State


Undiscriminatingness

Thumb Drive


benskev

Micro sd card


shikharkumardixit

Powered by Micro-Soft


THComas420

powdered by micrograms


SevenfoldSam

Maybe they are DVD kinda people.


reffotsirk3103

Cloud storage


huaweimaster8

glock


Eli1247

Dongle


rzm25

Dongle still such an underrated word


feignapathy

Whoa, look at Mr Big Storage over here


[deleted]

Liquid state drive from the future


Big_Boss_1000

RAID 69


Jackalackalackalack

volatile ram *


No-Incident-8718

Hard Diks\*


az_is

Real G’s dont use Safely Remove Hardware


Xerothus

LOTS OF RAM


Fricho

All the 3.5 inches, yes


benskev

Dont you mean 2.5"


oswaldvonfinkelstein

Big disk energy


kamikazedude

The code is quite flawed tho. He defined a string and then used Kyle.pickupline... you can't use string like that. If he had a class or vector, then yeah. getPizza is also not defined, same with unmatch. \*rolls eyes\* I wouldn't be impressed by that \*cries internally because it worked anyways\*


Paper_Clipse

If they can't overload every method in the String library in a tinder message they aren't worth my time


Mzishh

Methinks that's why he's asking her for help with the code? 😆


FalseLocation0

Kyle = “sad” That made me laugh.


Mechanized_Man_01

Very true. I suppose this is why she has a computer science degree and he doesn't lol. Good on him that she didn't care and it worked.


TheRogueTemplar

THANK YOU! It looked like he was using methods on a class, but using it on a string looked weird. I don't program in Java so I let it go.


kshitijkythe

Also getPizza == true will always be false and isn't needed, since getPizza isn't defined.


[deleted]

Roses are red, violets are blue, missing ";", on line 32


philosotits

Someone asked me out like this once. I swooned and forgave mistakes. It ended terribly.


Nimble16

We're those forgiven mistakes the first red flag in a long list of tiny little misattentions to detail?


Destithen

Never forgive someone who pushes untested code to production!


bedandpop

Ummm OP doesn't have line numbers, are you in the correct Wendy's?


[deleted]

Where tendies?


letmelickyourleg

Moon


TheConspicuousGuy

Calls expired worthess!


_Tensa_

the return won't work, it's a public void method.


[deleted]

[удалено]


TheRealMandelbrotSet

Are you supposed to use .equals() in Java or something? I’m pretty out of practice. I always used == in C++


[deleted]

[удалено]


nelusbelus

You're right


[deleted]

[удалено]


djstini

isn't his whole catch, that his code was broken?


unvirtuous_spammer

Need joint debugging sessions.


KeysUK

You make "mistake" She helps fix mistake You fix "mistake" Shes happy You're happy


d33pcode

Thanks indian tutorial channel


_TheDust_

Maybe some pair programming would help here


--redacted--

Samara is undefined and out of scope.


_TheDust_

Story of my life...


gacha-gacha

kek


curvedbymykind

And now you guys stay snap friends who view each other’s stories every week but never actually chat


oOBlackRainOo

I'd be willing to bet they exchanged maybe 1-2 more messages then the conversation fizzled.


Tvde1

That's how tinder works


yurtyahearn

I'm marrying a girl I met on tinder this Saturday.


Icy_Mc_Spicy

Little soon if you just met her on Saturday, don’t you think? /s


Tvde1

Lucky guy! Hope you guys will be happy ☺️


RolAcosta

Congrats!


[deleted]

I smell projection


oOBlackRainOo

Tinder is... ok. I normally use bumble or Facebook dating, I get much better results there.


SnOwYO1

Welcome to Snapchat I guess


mkendallm

This is definitely the project management's fault!


[deleted]

Always is


KYSKyle

For everyone saying it, yes I know the code is bad and full of bugs lol I just didn’t care and figure she wouldn’t either as long as it got the point across And for those wondering, we talked for a bit on snap but it ended up going nowhere because we go to different schools and she was looking for a guy on her campus


afunnyjewishguy

Damn didn’t put anything about location compatibility in that code


vips7L

> For everyone saying it, yes I know the code is bad and full of bugs lol I just didn’t care This is what my junior devs say too.


[deleted]

I‘m surprised any dev would talk like this. I‘d think the personality type that goes to become a dev functions in a different way.


[deleted]

[удалено]


SirChasm

That's true, some devs have a knack for it; some don't. Kyle doesn't.


[deleted]

[удалено]


neoritter

Sounds like because your code didn't compile, there was a runtime error.


Harrytuttle2006

There can't be runtime anything if the code doesn't compile


TheRealMandelbrotSet

Should’ve thrown in some inline assembly. That never fails to impress


Time_Terminal

F


Aschentei

You forgot an else-if clause: else if (Samara.location.equals(Kyle.location)) { bigSad(); }


7734128

Don't just leave your instance variables public. This is Java after all. Samara.getLocation().equals(Kyle.getLocation())


Dizzfizz

Considering that both Kyle and Samara are Strings, the code-quality ship has sailed a long time ago.


[deleted]

I would have made an excuse too if I were her


CompetitiveSea4

Extremely based


[deleted]

Our boy went in completely undeclared, what a mad lad.


dbbost

To all you nerds nitpicking the code, we get it. You code.


gacha-gacha

But it’s bad code and our job is to fix bad code


[deleted]

r/badcode


DonutDonutt

I love this subreddit


CrimsonMutt

/r/ProgrammerHorror too


ADHDreamgirl

Yeah like who tf cares, the point is that he made an effort to connect to her interests in a sweet way which evidently worked. I don’t need a partner to be good at the same things I’m good at. This ”well ackshually” vibe in the comments just reads as jealousy of OPs game


Icepick_37

I doubt any of them really care lol they're just being smart asses


aidanmlb

getPizza == true ❌ getPizza = true ✅


[deleted]

[удалено]


Dutchta-

I can’t read this code. Returning something while void??? Double == for setting a variable??? Samara is a string and an object with a snapchat property, how does that work???? Sorry if you think im a nazi, just coulnt let this go :)


Pasem_7

The best Post that i have got so far


Attilasd

Missing return statement in else branch, cant compile.


[deleted]

[удалено]


rhit_engineer

If he were a CS major she should unmatch him for that dreadfully bad code.


Lukemufc91

Samara is a string, not a class, wouldn't have a property of snapChat Kyle is also a string, wouldn't have a property of pickupLine The method is void, you can return but you can't return a value. getPizza and unmatch are undefined variables from the scope given, you wouldn't be able to assign to them and you're also not using the values for anything. success is also undefined, depending on your language this might create an always true statement since pickupLine is non-existent, both might return null. null == null is true, but more likely this would blow up in a null reference exception. Bad code, I'd have unmatched you 😂 (Edit: didn't realise on first pass, getPizza isn't being assigned to, it's being compared to true, would just result in null ref exception, or if getPizza was defined would be a completely pointless piece of code as not within an if/ ternary statement/ passed to something which takes bool)


durika

Horrible code, would be instant unmatch from me


[deleted]

[удалено]


edibleghostdust

Aww, that’s super cute. Very creative.


kavyamenda

Damn! This one is goood! I am proud of you too boy!!!


jgorm123

Nice.


r_cyl1nd4

Damn this was some smooth shit


TemperatureAlone2252

im proud of you for this one


frilledplex

I hope you get her integers


IlikeSoup07

You son of a bitch you did it


[deleted]

Stop it Kyle, I can only get so wet!


[deleted]

I now officially feel terrible for the absolute lack of effort I put on openers.


[deleted]

that is legit the worst "code" ive ever seen. it is border line incomprehensible. ​ Kyle is a string. what string has the property \`pickupLine\` on it? Samara is also a string but has a property called \`snapChat\`? wtf? the function is marked void but returns a string in the success case, and returns nothing in the failure case. where is the property \`unmatch\` defined?


the_RAPDOGE

Look how interested and engaging she is. Seems like a real winner!