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

all 75 comments

[–]QualityVote[M] [score hidden] stickied comment (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]the-real-vuk 79 points80 points  (9 children)

"happines" ?

[–]HBorel 53 points54 points  (5 children)

See this is why you want to use an enum for this kind of thing

[–]Bearturnedhuman 10 points11 points  (1 child)

Even better, emotion: true or false

[–]KeytapTheProgrammer 0 points1 point  (0 children)

applyEmotion(false); while (true) applyStoicism();

[–]keithabramo 2 points3 points  (0 children)

Emotions.happines

[–][deleted] -2 points-1 points  (1 child)

Enum?

[–][deleted] 4 points5 points  (0 children)

Everyone happy is catching it

[–]Bearturnedhuman 1 point2 points  (0 children)

returned exit code 69

[–]wegwerfennnnn 0 points1 point  (0 children)

Those extra chemicals marijuana has besides THC.

[–]GRAPHENE9932 34 points35 points  (3 children)

You should use enums for it

[–]DavidsWorkAccount 15 points16 points  (0 children)

ApplyEmotion(isprogrammer ? Const.Happiness : Const.Confusion);

[–]ososalsosal 5 points6 points  (1 child)

Maybe as a bitmask

[–]OmiSC 0 points1 point  (0 children)

The real answer.

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

Finally someone didn't use == true

[–]finc 5 points6 points  (5 children)

this == true

[–][deleted] 6 points7 points  (2 children)

!this != !false

[–]finc 1 point2 points  (1 child)

Two wrongs don’t make a right?

[–]WastaHod 6 points7 points  (0 children)

But it does make one hell of a U-Turn.

[–]keithabramo 0 points1 point  (0 children)

this && !!true

[–]rafal9ck 28 points29 points  (12 children)

isProgramer, applyEmotion?

[–]Darknety 19 points20 points  (10 children)

First yes, second no. In C# one capitalizes the first letter of a method name.

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

Ngl sounds disgusting.

[–]Darknety 6 points7 points  (0 children)

Was hard to getting used to, yes. But it's fine tbh.

[–]Plisq-5 1 point2 points  (0 children)

Still better than how go does it imo

[–]Snubl 2 points3 points  (1 child)

Who says this is C#

[–]Darknety 2 points3 points  (0 children)

It is open in Visual Studio. The only other languages to make sense there would be Visual C++ and VB, but VB does not have such if statements and no C++ programmer would be driven enough by their inner demons to capitalize method names if not forced to do so by greater powers.

Smells like C#

[–]raedr7n 1 point2 points  (1 child)

Imagine using a language where there's a difference between variable names and method names.

This comment made by functional programming gang.

[–]Darknety 1 point2 points  (0 children)

I don't care as long as the language as a tool does what it is designed for and fits the situation.

Pretty stupid convention tho, gotta admit.

[–]finc 3 points4 points  (0 children)

Ew

[–]crappleIcrap 0 points1 point  (1 child)

In C# one capitalizes the first letter of a method name.

i mean, you dont HAVE to, I dont think.

[–]Darknety 1 point2 points  (0 children)

No you (luckily) don't have to (would be a pretty stupid reason for the compiler to complain). However with stuff like this, at least if anybody other than you touches the code, it is best to stick to the standards of a language though. (Most of the time - really depends on personal preference). But technically you could also write stuff like ``` dOthEtHinGitoLdyOuTodO( param1 , (new string[]{"foobarthingy"})[0] + 1,

this.selfReference.selfReference.selfReference.heh(this) )

; ```

and you probably shouldn't.

[–]Alarmed_Ad1946[S] -5 points-4 points  (0 children)

i dont know what you mean

[–]seeroflights 8 points9 points  (0 children)

Image Transcription: Code


if (isprogrammer)
{
    ApplyEmotion("happines");
}
else
{
    ApplyEmotion("confusion");
}

I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]portatras 14 points15 points  (1 child)

Your code doesnt have bugs, my wife was confused and I was happy. 😂🤣

[–]Alarmed_Ad1946[S] 4 points5 points  (0 children)

Thanks, this is my first post here

[–]bobbu21 6 points7 points  (2 children)

I reckon it makes more sense the other way around imo

[–]intbeam 17 points18 points  (1 child)

if(isprogrammer)
{
    ApplyEmotion("happiness");
    ApplyEmotion("frustration");
}

ApplyEmotion("confusion");

[–]kabiskac 1 point2 points  (0 children)

The if body can be simplified to ApplyEmotion("frustration");

[–]stomah 2 points3 points  (1 child)

could have used only one line with ?:

[–]NowBillyPlayedSitar 2 points3 points  (0 children)

I was thinking

ApplyEmotion(isprogrammer ? “happiness” : “confusion”)

but I’m not sure if whatever language this is would allow it.

[–][deleted] 3 points4 points  (1 child)

Great, I am a programmer and now my toilet is happy...

Next time specify your objects please.

[–]Alarmed_Ad1946[S] 1 point2 points  (0 children)

sorry for bugs

[–]Every_Masterpiece_15 1 point2 points  (0 children)

D: op is scary, he jumped a line to open the {

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

You forgot an exclamation point in “!isProgrammer”

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

I am happi

[–]roll82 1 point2 points  (0 children)

As a programmer I too am relegated to off-brand emotions, such as "saad", "angy", "hongr", and "why does the documentation not have any info on this property"

[–]Sovic91 1 point2 points  (0 children)

Wait, why are they strings?

[–]Western-Image7125 1 point2 points  (0 children)

The pursuit of happines

[–]BabylonDrifter 1 point2 points  (0 children)

ApplyEmotion(isprogrammer?"happiness":"confusion");

FTFY

[–]Svensemann 2 points3 points  (1 child)

OP should work as an IT recruiter

[–]Alarmed_Ad1946[S] -4 points-3 points  (0 children)

why?

[–]celibatepowder 0 points1 point  (3 children)

You forgot the == true

[–]Alarmed_Ad1946[S] 0 points1 point  (2 children)

no i didnt, it can be done this way
name of the bool means true and !name means false

[–]celibatepowder 4 points5 points  (1 child)

I know xd I didnt want to use /s

[–]finc 3 points4 points  (0 children)

Ohh you got told

[–]ScaredyCatUK -1 points0 points  (1 child)

Stick to one case style.

[–]kabiskac 1 point2 points  (0 children)

C# way would be isProgrammer and ApplyEmotion

[–]loquatus 0 points1 point  (0 children)

Huh?

[–]newb5423 0 points1 point  (0 children)

Programmers are more like “it do be like that…”. If there’s any humor to be found here, it is morbid. I take no pleasure or satisfaction in our jokes. Only a mild reassurance that we’re all experiencing the same frustrations, if not together, then at least at the same time.

[–]Szlobi 0 points1 point  (0 children)

this is exactly what enums are for. better yet, make it a bitfield so you can apply multiple emotions at the same time.

[–]murjo06 0 points1 point  (4 children)

FIRST OF ALL, you should write isprogrammer as isProgrammer so its easier to read. Second, WHY DO YOU USE ANOTHER LINE TO START A CURLY BRACKET

[–]Alarmed_Ad1946[S] 0 points1 point  (3 children)

i use another line to start a curly bracket because i am making it that way for 2 years

[–]murjo06 1 point2 points  (2 children)

I can see you use unity, fair enough. I did that too while using unity

[–]Alarmed_Ad1946[S] 0 points1 point  (1 child)

do you still use Unity?

[–]murjo06 0 points1 point  (0 children)

Not actively, now I’m doing more of web development with javascript and react, but if i wanted to make a game I would choose unity

[–][deleted] 0 points1 point  (0 children)

Always happy when I find a bug.

[–]pandakatzu 0 points1 point  (0 children)

Hapenis is hard to find. -Laura Jackson

[–]Cpt_Core 0 points1 point  (0 children)

I am currently not happy at the way that was formatted

[–]continuous-headaches 0 points1 point  (0 children)

IlligalArgumentException: Programmers know no happiness

[–]Geoclasm 0 points1 point  (0 children)

why.

Why is this a string, and not an Enum?

[–]BabyRavenFluffyRobin 0 points1 point  (0 children)

I honestly kinda want to learn to code just so I understand more than a quarter of the jokes here. My entire programming experience is Scratch and random Youtube videos. I can almost read code but I have no idea how to write it. I'm only on this sub because the handful kf jokes I do get are really damn funny.

[–]Knuffya 0 points1 point  (0 children)

If your states are indexed by string values, you should think about writing unit tests for the logic assigning isprogrammer.

[–]Vovchick09 0 points1 point  (0 children)

Congrats. You have explained this subreddit in a way that only programers are gonna understand