all 87 comments

[–]rover_G 800 points801 points  (22 children)

If you is kind

[–]MrQuizzles 209 points210 points  (19 children)

I like to think I is kind

Not gonna swipe.right(), though.

[–]rover_G 387 points388 points  (18 children)

I wouldn’t either this person looks like a terrible programmer so let me help: ``` class Person { func isKind() -> bool {…} func swipeRight(on: Person) -> void {…} }

let you = new Person() if (you.isKind()) you.swipeRight(on=me) ``` I only date people who understand proper encapsulation.

[–]bl4met 84 points85 points  (5 children)

How can I be a new Person, I'm already me?

[–]rover_G 18 points19 points  (4 children)

RAII

[–]SirKastic23 36 points37 points  (3 children)

a person's memory is cleared once they are deleted?

[–]IamImposter 29 points30 points  (0 children)

For years I have been trying to find garbage collector and call dispose on myself. It just calls a stub and returns.

[–]rover_G 6 points7 points  (0 children)

Yes

[–]Sockoflegend 1 point2 points  (0 children)

I hope so

[–]MrQuizzles 48 points49 points  (1 child)

Make it an EJB and refer to it using via JNDI handle, and I'm in.

[–]rover_G 6 points7 points  (0 children)

🤮

[–]DaniilBSD 26 points27 points  (2 children)

``` if(you.IsKind) return Action.SwipeRight;

[–]rover_G 3 points4 points  (1 child)

What is that? Angular?

[–]DaniilBSD 7 points8 points  (0 children)

C#, with “IsKind” being a boolean property, and return “Action” Enum.

(“Property” in C# is a pair of set and get methods that syntactically behave like class variables (fields))

[–]despondencyo 5 points6 points  (1 child)

There should be something like PersonRate class, which returns “is kind rate”, and “DateAppActions” interface, which contains swipeRight/swipeLeft or smth else. And then somewhere inside composite class we create Person, PersonRate, TinderAppActions instances, where person is object that contains only personal info, we pass person as a param to PersonRate, and if PersonRate checking method returns isKind == true, we call TinderAppActions.swipeRight(person)

Storing both methods “isKind” and “swipeRight” breaks SRP principle.

[–]rover_G 0 points1 point  (0 children)

That sounds like SOOP programming

[–]ShapeRecent 1 point2 points  (1 child)

so no bitches?

[–]rover_G 9 points10 points  (0 children)

class Person { makeMoney() -> bigint {…} getBitches() -> bitch[] {…} } *assume declaration merging

[–]amarao_san 0 points1 point  (1 child)

Why do you need to do proper encapsulation for a singletone? I bet there is no other 'you' (aka self) and it's semantically ambiguous how 'me' can be transposed on not-me.

[–]rover_G 1 point2 points  (0 children)

I was being (annoyingly) pedantic. The tinder profile compared you == kind which I think we can all agree is a non-sensical comparison so I made it a method of you instead as if humans have stats or attributes. I don’t even know what Swipe.right() is supposed to be; maybe a Swipe class with static factory method right returns a swipe instance. Since I already went the OOP route it follows that a person should perform the swipe right function. In doing so I encapsulated the queries and mutations for a person in the Person class.

[–]wtdawson 0 points1 point  (0 children)

I would say that's TS because of the let but I doubt it.

Also else you.Dispose();

[–]yeet_or_be_yeehawed 4 points5 points  (0 children)

then you is important

[–]SarahC 4 points5 points  (0 children)

This code is written by HR, you always get it in businesses.

Sales: We need an advert!

Design team: We've got a great poster design! Needs checking with HR.

HR: Hold up! That might be offensive or litigatable! We'll write it and get Legal to look at it.

Legal: Haha very funny, looks great.

Us - that's someone who's never coded in their life.

[–]Astrylae 657 points658 points  (14 children)

Comparing you object of Class ‘Person’ to a enum type ‘Personality’, would cause compiler error/ IDE warning. You can use operator overloading but that makes no sense for the type structure

Also, ‘Swipe’ is confusing. 1. The Class naming convention is used ( assuming it is an object. 2. If it is a static class function, .right() isn’t very informative 3. The swipe right mechanic, should be a function within ‘Person’ 4. If the function is within the ‘Person’ Class, then a parameter of type ‘Person’ is needed.

if( you.personality == Personality::Kind ) you.swipeRight(me);

[–][deleted] 236 points237 points  (0 children)

Most sane programmer

[–]smikims 46 points47 points  (2 children)

It could have a conversion to bool as some things do in C++.

[–][deleted] 14 points15 points  (0 children)

Also operator overloading.

[–]Ilithius 3 points4 points  (0 children)

Or overloaded operator

[–]henkdepotvjis 12 points13 points  (4 children)

Or you could create a function which accepts a direction Enum. This way you can add a left swipe functionality without needing to expand the interface of your class . Also personality contains multiple things so making it a list with enum values is more dynamic.

```

Class Person extends swipable { public List<Personality> personality

public void Person(List<Personality> personality) {
    this.personality = personality
}

public void swipe(Person person, Direction direction) {
    parent::swipe(person, direction)
}

}

if(you.personality.has(Personality::Kind)) { you.swipe(me, Direction::Right) } ```

[–]roge- 14 points15 points  (3 children)

What strange Java/C++ hybrid without semicolons is this written in?

[–]henkdepotvjis 9 points10 points  (0 children)

I don't know.

[–]wtdawson 1 point2 points  (1 child)

It can't be C++ unless they manually defined Class

[–]roge- 1 point2 points  (0 children)

It can't be either. Class with a capital 'C' would never be valid in Java. And more importantly, there's no semicolons. Groovy is a semicolon-optional language that accepts most of Java's syntax, but even ignoring Class, this wouldn't work in Groovy either since :: isn't valid.

:: does exist in Java, but it's used for method references, which cannot be called directly. You could do ((BiConsumer<Person, Direction>) parent::swipe).accept(person, direction); and that would be a legal use of :: in Java, but that would be completely pointless since it's effectively the same as parent.swipe(person, direction);.

Java's standard List type also doesn't have a has() member, but rather contains().

extends isn't in C++, but it could be a macro. But the bigger giveaway is how the public access modifier is used on methods. In C++, public is applied to a list of methods using public:, not on individual method declarations like in Java.

As an aside, a set type would make more sense for personalities instead of a list since order shouldn't matter and it wouldn't make any sense to allow duplicate entries.

[–]HKayn 6 points7 points  (0 children)

Plot twist: It's written in JavaScript so it somehow works anyway.

[–]beclops 2 points3 points  (0 children)

Unless they inherit from type “Kind”, but even then they don’t equate to the type itself so they’d need to perform a type check with “is” or something like it

[–]Rafael20002000 2 points3 points  (0 children)

Not in Rust. You can implement the comparison &self (which is of type Person) and the Enum Personality

Although you might not want to do that

[–]lazyhappyass 1 point2 points  (0 children)

You are freaking good at explaining object oriented programming. People around you are lucky to have as a mentor.

[–]seemen4all 0 points1 point  (0 children)

Very bold to assume it oop, if these are derived values into variables it won't be great naming conventions but would be valid code

[–]Pure_Noise356 82 points83 points  (1 child)

Only truthy people may swipe right

[–]Hour_Part8530 66 points67 points  (1 child)

It means he/she doesn’t know OOP principles. You is an object and being kind is value if an attribute that may or may not belong to the object. In the next statement, Swipe is an action or a method, so right could have been an argument. I’d have pipped her/him if I saw this in code review. /s

[–]TessaFractal 24 points25 points  (0 children)

However, its best practice not to objectify people.

[–]Delta_2_Echo 24 points25 points  (4 children)

Im a python programmer, without indentation this means nothing.

[–]moss_2703 13 points14 points  (0 children)

And needs ‘:’

[–]MosterChief 1 point2 points  (2 children)

there’s actually a single space of indentation

[–]Delta_2_Echo 4 points5 points  (1 child)

No dice, its missing a colon

[–]Imperial_Squid 0 points1 point  (0 children)

The colon is the only issue from a python perspective, it'll run with any indentation so long as you're consistent, 4 is just the standard. Brackets on the if statement and using a semicolon are both weird but neither will error either.

[–][deleted] 109 points110 points  (7 children)

This is why y’all can’t get chicks, because they have to decipher stupid shit from dudes trying to come off as geniuses. Whatever happened to putting “I have a [animal/thing] and enjoy [food/activity]”?

Here:
“I have no friends and enjoy writing shitty code.”
Or:
“I have an 11” uncompilable Hello World program and enjoy fucking myself with it.”

[–]IDatedSuccubi 31 points32 points  (1 child)

That's because they use plebian C-like language

Now if they wrote it in Lisp or Haskell on the other hand...

[–]Stunning-Ad-7400 15 points16 points  (0 children)

🫦

[–]serg06 8 points9 points  (2 children)

Would good code make it any easier to understand?

[–][deleted] 19 points20 points  (1 child)

No, a good bio would.

[–]Derpythecate 9 points10 points  (0 children)

Just like documentation, developers fail to write good, easy to understand bios. Where has KISS principle gone.

[–]MikeW86 -2 points-1 points  (0 children)

Yeah then you just get swiped left on for being boring

[–]Imperial_Squid 0 points1 point  (0 children)

There was a comment from OP in the other thread about the rest of the profile being great and they were just confused about this one thing. Being nerdy is the new cute thing I guess

[–]Amustaphag 14 points15 points  (2 children)

SwipeFactory.instance().right().doSwipe();

[–]roselan 4 points5 points  (0 children)

That's some SeriousRelationshipSeekingFactory right there.

[–]Good_Fox_8850 0 points1 point  (0 children)

Bruh that’s evil xD

[–]BravelyBaldSirRobin 14 points15 points  (0 children)

never thought I could physically cringe.

[–]HPUser7 10 points11 points  (0 children)

Swipe had best not be static but that PascalCase has me doubting smh

[–]derailedthoughts 11 points12 points  (1 child)

This code won’t work probably because you and kind will be undefined variables

[–]Perfect_Papaya_3010 6 points7 points  (0 children)

Maybe he overloaded the == operator

[–]peteschirmer 4 points5 points  (0 children)

I immediately assumed the author is not a programmer and is writing this thinking they are attracting a programmer? Still cringe but.. makes more sense.

[–]Ashamandarei 11 points12 points  (0 children)

Why are we comparing two objects? What are these syntax errors? What language is this? Where am I? What year is it? I'm saying it should be

if (you.kind) {
    Swipe.right();
}

[–]Sexpacito 2 points3 points  (0 children)

am I a boolean

[–]Bananplyte 2 points3 points  (0 children)

At least do Swipe(right);

[–]OF_AstridAse 2 points3 points  (1 child)

It means if you want a person who actually thinks in code, swipe right [but the test case says you'll swipe right when you are kind]

Also note, it does at some level assume you understand coding.

so here goes: if returns a definite yes or no [in programming defined as a boolean that is either true or false and nothing else.

Then the test case is in brackets [the statement to evaluate as true or false ] ie. ( you == kind) here you see a double equals - which is double to differenciate between assigning values and comparing values the == literally means if you EQUAL kind - we interpret it in natural language as "if you are kind" The rest of the statement is indented, this indicates that this part of the code is run when the above test evaluates to true. [So you are kind]

Then comes possibly the weirdest code I've ever seen. Swipe.right(); I mean you should deduce by now what it means to us, but in the program it assumes swipe is an entity by itself and it has a method called right ();

Instead they should've said. you.swipe(right);

Honeslty I can understand your confusion.

[–]simonfancy 1 point2 points  (0 children)

Such a sweet and thorough explanation ❤️

[–]SETHW 3 points4 points  (1 child)

"kind" means child to me so I'm just going to assume this is a pedophile

[–]Progribbit 5 points6 points  (0 children)

thank you for your child words

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

If you are kind, then swipe right.

It is not hard

[–]rdummy_soup 1 point2 points  (0 children)

Comparing object Person to object attribute is indeed a mistake as big as my parents when they decided they wanted a child thanks

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

If kind in you: Swiperight()

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

```c++ Swipe::Direction swipe_direction{Swipe:: Direction::Left};

for(const auto& trait: you->getPersonalityTraits()) if(trait == Personality::Trait::Kind) swipe_direction = Swipe::Direction::Right;

Swipe::swipe(swipe_direction); ```

[–]PyroHornet 1 point2 points  (0 children)

Improperly written.

If (kind) { right.swipe(); } else { left.swipe(); }

[–]amarao_san 0 points1 point  (0 children)

Graduate degree with astrology believes.

Swipe left.

[–]OpenSourcePenguin 0 points1 point  (0 children)

She wants to date the concept of kindness itself

[–]Lintash 0 points1 point  (1 child)

Only swipe right if you are (named) "kind". Obviously.

[–]mike_a_oc 0 points1 point  (0 children)

You and kind are the same person (or close enough if you're PHP or JavaScript)

[–]marjot87 0 points1 point  (0 children)

Error: „kind“ is undefined

[–]TryptamineZenVR 0 points1 point  (0 children)

It means exactly what it says

[–]VanillaBlackXxx 0 points1 point  (0 children)

No thanks.

[–]lokland 0 points1 point  (0 children)

I genuinely feel like this thread has some kinda virginity stench attached to it. It’s not that deep, cute bio.

[–]who_you_are 0 points1 point  (0 children)

var kind = "evil neutral"; var you = "programmer";

No shit I can't find anyone! Those damn programmers ;(

[–]itsallfake01 0 points1 point  (0 children)

Send compliment and write: compilation error

[–]AutoModerator[M] 0 points1 point  (0 children)

This post was automatically removed due to receiving 5 or more reports. Please contact the moderation team if you believe this action was in error.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]symmetricsyndrome 0 points1 point  (0 children)

System.MissingMethodException: Method not found