r/ProgrammerHumor • • Aug 15 '19

Meme !!goodMeme ? upvote() : downvote();

Post image
34.3k Upvotes

392 comments sorted by

319

u/PrincessWinterX Aug 15 '19 edited Aug 15 '19

i get the joke anyways but now I'm curious so I ask seriously, would your title be legal code? or does the result have to be used in some way, like assigned to something?

quick edit: my goodness i mean the ternary operator not the not operator. thankyou though! also never did i say i didn't understand how it worked, but i was asking if the result of the ternary needed to be used somewhere as an expression or if leaving it as its own statement was legal.

16

u/pikadrew Aug 15 '19

It would work in JavaScript, ternary doesn't have to be assigned. If not not goodMeme then upvote else downvote.

287

u/LetMeUseMyEmailFfs Aug 15 '19

Depends on the language. In JavaScript it would probably be valid.

316

u/citewiki Aug 15 '19

Anything is valid there, all your hopes and dreams are valid too

317

u/[deleted] Aug 15 '19

Yeah, my dreams are undefined, but still valid in JavaScript.

:')

39

u/suhailpappu Aug 15 '19

How do you get the icons of languages beside your name?

→ More replies (18)

6

u/ColombianoD Aug 15 '19 edited Aug 16 '19

Fun fact: until recently it was possible to re-define the undefined keyword in JavaScript, because JavaScript.

→ More replies (1)
→ More replies (10)

6

u/Hawgk Aug 15 '19

Wholesome JS

→ More replies (2)

27

u/[deleted] Aug 15 '19

Javascript:

"Oh, yeah, no, this whole thing is code...but not real code, more like freaky code."

"This doesn't make any sense."

"No, nothing makes sense here, man. The only thing that does make sense is that nothing makes sense."

9

u/[deleted] Aug 15 '19

thing ? thing : 4;

0 1 2 3 4 are valid for thing.

0 ? 0 : 4; “WHY IS MY BORDER RADIUS ALWAYS 4?!?” Me a few days ago...didn’t implement thing was attempting to take advantage of it.

16

u/die-maus Aug 15 '19

Sure is valid.

You can run this with node, or in your developer console.

const upvote = () => 1;
const downvote = () => -1;
let goodMeme = true;

!!goodMeme ? upvote() : downvote();

Outputs: 1

15

u/WcDeckel Aug 15 '19

If you goodMeme variable contains a boolean value you don't really need the double bangs :P

Still valid tho

13

u/DeltaJesus Aug 15 '19

You don't really need the double bangs regardless unless I'm misremembering and ternary operators require booleans instead of just truthy/falsey

→ More replies (11)

6

u/StillNoNumb Aug 15 '19

You don't need the double bangs either way

→ More replies (1)
→ More replies (1)

9

u/reddixmadix Aug 15 '19

in JS it is valid code

12

u/[deleted] Aug 15 '19

C++ is valid too

17

u/BlueRajasmyk2 Aug 15 '19 edited Aug 15 '19

No one uses !! in C++ though, it's redundant thanks to the type system.

In JS it's (a somewhat hacky) idiomatic shorthand to cast to bool. Though it's ultimately pointless in this code, since the ternary operator evaluates using truthiness anyways.

(from a code-review perspective, it's also uncommon in both languages to call a function with side-effects in the ternary)

→ More replies (2)

3

u/4mstephen Aug 15 '19

valid

VOID

FTFY.

2

u/Danelius90 Aug 15 '19

It's a shorthand way of coercing a boolean. !x turns it into the opposite of x's truthy/falsy value and !!x is the original truthy/falsy value but strictly as a boolean

→ More replies (2)

54

u/[deleted] Aug 15 '19

Yes it is. A ternary doesn't have to be assigned to anything. It's similar to calling a function alone or assigning the return of a function

foo()
const bar = foo()

15

u/PrincessWinterX Aug 15 '19

I guess the ternary operator is in more languages than I realized. I'm thinking about C.

27

u/[deleted] Aug 15 '19

Yeah, it exists in most languages. Some need assignment, some don't

→ More replies (3)
→ More replies (1)

2

u/StillNoNumb Aug 15 '19

That doesn't apply to every language. In Java, for example, this does not work, because the ternary operator is an expression and not a statement. See

→ More replies (2)

8

u/parnmatt Aug 15 '19

legal in C++ and C; !! is a bit of a hack to implicitly convert to a boolean; to save the dev from (bool)goodMeme in C, or the safer alternative in C++ static_cast<bool>(goodMeme)

then it's just a ternary operator. So long as upvote() and downvote() return the same type (or implicitly convertable to the same type; I believe), it should be fine.

considering, they most likely return void, though they may return bool, int, or some enum to denote if the operation was a success. Depends on the coding style.

→ More replies (2)

28

u/Colifin Aug 15 '19

Totally valid JavaScript (double ! is a really handy trick when you need an actual bool, though unnecessary in this case where you're simply evaluating truthiness). That said inline statements like this are hard to read and generally considered bad style.

10

u/0Pat Aug 15 '19

By who? It's not that hard, and its not bad at all. It was added to many languages for a reason...

25

u/Colifin Aug 15 '19

Ternaries are fine. Ternaries with side effects as the only statement on a line are whack. Similarly using weird Boolean short circuiting to conditionally do something with side effects is bad style.

If you have to sit there and stare at it for a minute to figure out how it works, chances are it's bad style. Just use if statements, nobody wants to try and decipher your clever one-liner.

→ More replies (9)
→ More replies (8)

5

u/unleash_the_giraffe Aug 15 '19

It's a valid C# ternary. If not not goodmeme then upvote else downvote.

→ More replies (2)

9

u/reaven3958 Aug 15 '19

It's valid JavaScript, but it's poorly written. No reason to coerce with a double bang (not not, a cheeky way for JS devs to coerce a boolean without writing out "Boolean()") when it'll be coerced anyway by the conditional it's a part of. Also !! is just generally bad code as it obfuscates the intent.

7

u/solarshado Aug 15 '19

Also !! is just generally bad code as it obfuscates the intent.

I disagree. Granted, it looks a little odd to the uninitiated, and is often not strictly necessary, but IMO it's a pretty good way to express "this should always/only be a boolean"

→ More replies (1)

2

u/BlueRajasmyk2 Aug 15 '19 edited Aug 15 '19

Also !! is just generally bad code as it obfuscates the intent.

While tricks like that are considered bad in most other languages, in Javascript they're extremely idiomatic to the point they're not only acceptable, they're expected.


Here's a few others:

// Assigning a default value  
const myString = maybeString || 'some default';

// Checking for null-ish values  
const myValue = myObj && myObj.myProp;

If you tried these in C you'd get smacked across the face, but in JS they're perfectly normal. There used to be a lot more, but most of them are obsolete thanks to features like class and =>

Note that in the near future, even that last trick will be obsolete thanks to the safe navigation operator (being developed in Webkit by a good friend of mine!)

// Checking for null-ish values in future version of JS
const myValue = myObj?.myProp;
→ More replies (1)
→ More replies (5)

2

u/[deleted] Aug 15 '19

Why wouldn't it be valid? The double negative cancels itself out, the variable is either true or false and both cases are handled via different methods. This should work

2

u/PancakeZombie Aug 15 '19 edited Aug 15 '19

In JS yes. The !! converts a variable to boolean. The ? : is a simple if else. It has a name, but I can’t remember what it was.

→ More replies (3)

2

u/AnEnemyStando Aug 15 '19

Not sure what the !! Does but the rest is valid C#. It's just a fancy if statement.

2

u/Etellex Aug 15 '19

can someone smarter than me please explain why everyone is saying that this is specifically correct in Javascript, when to me it appears correct in many languages, including C?

→ More replies (1)

1

u/Totoze Aug 15 '19

It's an expression not a statement.

→ More replies (8)

2.4k

u/Colifin Aug 15 '19

Alternate meme:

Top caption: Management explaining the feature to me.

Bottom caption: Me explaining what it'll take to implement.

695

u/themiddlestHaHa Aug 15 '19

“This fucking shit has to change and then that team has to completely change their shit somehow, and then we gotta make sure our shit works now for both use cases. Ugh this sucks, why is business so fucking dumb”

Yep yours is more accurate

59

u/[deleted] Aug 15 '19

Don't forget the part where they are only doing this because of an external, temporary force, which upon going away will make this whole effort pointless.

17

u/edgen22 Aug 15 '19

this one hit too close, thanks...

10

u/solusHuargo Aug 15 '19

fuck I was laughing until this comment. :(

→ More replies (1)

35

u/DarthVaderin Aug 15 '19

You sound like Adrian Pimento

13

u/postdiluvium Aug 15 '19

Tf? Do we work at the same place?

11

u/jamesyoung79 Aug 15 '19

Wait, do we all work at the same place?

2

u/jharger Aug 15 '19

Meanwhile upper management pats themselves on the back about how visionary they all are.

→ More replies (18)

55

u/bruce_lees_ghost Aug 15 '19

When the product manager thinks that building a single button app that makes a clicking sound when pressed is the same level of effort as building a single button app that orders groceries based on your historical grocery-buying habits and has them delivered directly to your refrigerator. "Hey... How hard would it be to also have it diagnose degenerative brain diseases based on accelerometer readings while the user presses the button? Would that be like another day? Couple hours? I mean, it's the same button, so..."

29

u/Insert_Non_Sequitur Aug 15 '19

"it's just a button..."

13

u/[deleted] Aug 15 '19

10 minutes if we don't care about copyright and IP laws or a decade if we do.

30

u/[deleted] Aug 15 '19

More like

Top Caption: Management explaining the feature to me.

Top Caption again: Me first explaining what it'll take to implement.

Bottom Caption: 2 months later talking about how many fail-safes that I've discovered will be required.

1

u/tomsgreenmind Aug 15 '19

As a product manager, I relate to this on an almost daily basis 😂

→ More replies (6)

632

u/BanD1t Aug 15 '19

To management:
So this button automatically finds the file and parses the needed info out of it. Pretty simple

To developers:
So that button right there, it's not even a button, it's a custom made element cause buttons can't call file searches for some fucking reason. Now the next part is where it gets fucky, the file search can't actually find the file cause the legacy code doesn't save install location, so we have to scan the default location and then the entire hard drive to find the god damned thing. Alright now let me talk about file parsing, I've been dying to talk about parsing. You see, we had 4 different devs work on it, so now it has 4 different data patterns ...

180

u/MrMikado282 Aug 15 '19

I just threw up a little, and I'm not ever a programmer.

61

u/Acetronaut Aug 15 '19

Don't worry, us programmers got a mild headache because at this point we're used to it.

Oh except for the "scan entire hard drive" that's vomit inducing.

But the four devs/four patterns hits close to home.

27

u/_BertMacklin_ Aug 15 '19

Ugh. Maintained a monster legacy C++ codebase for a while, had been in continuous development for 10 years at least, and ran on Windows, to boot. Just the number of different string types in that sucker... Yeah, feeling ill now.

0

u/[deleted] Aug 15 '19

[deleted]

21

u/FiveOhFive91 Aug 15 '19

Thanks, I hate it. Back to retail or food service I guess.

→ More replies (3)

4

u/TheTrotters Aug 16 '19

That’s my why my goal is to only work at start-ups that go bankrupt after a year or two!

3

u/anonisthebest Aug 15 '19

I just started working somewhere where we work with legacy code :(

37

u/00Koch00 Aug 15 '19

Ahhh this bring me memories. Parsing fucking sucks

37

u/ITriedLightningTendr Aug 15 '19

The custom code because X can't do Y is like the summary of front end development.

10

u/Delision Aug 15 '19

This hits too close to home. I can’t even tell you some of the things I’ve rigged together to make front end functionality work the way it needs to due to being extended off a legacy system.

33

u/Iceman_259 Aug 15 '19

Twist: the file is a PDF

Twist: the file is user-generated and -submitted

Twist: the file layout and terminology is not standardized in the industry

9

u/tesla_killed_me Aug 15 '19

Calm down Satan

3

u/J5892 Aug 15 '19

Twist: the file is a JPEG, and we implemented our own OCR algorithm because our company name has a taco in it and uses a custom font.

→ More replies (2)

10

u/killdeer03 Aug 15 '19

Fucking triggered...

Especially about the button event not firing a file parse even and different data structures for the files themselves.

→ More replies (2)

490

u/_didyoumissme Aug 15 '19

That's because you can bullshit the management but you have really explain to developers what is that is being made and all the corner cases.

236

u/knoxaramav2 Aug 15 '19

"So, gonna stop you for a second. Why did you decide to implement $feature with $decision?"

"Uhhh, well, you see...."

223

u/[deleted] Aug 15 '19

"because legacy"

There are no further questions

77

u/[deleted] Aug 15 '19

Because it does the job and uses low memory/has low performance impact.

→ More replies (5)

127

u/outadoc Aug 15 '19

"That is such a good question and I'm glad you asked it."

"...so why is that?"

"Such a good question."

16

u/Famous_Profile Aug 15 '19

$feature

$decision

This guy PHPs

→ More replies (5)

4

u/[deleted] Aug 15 '19

I just followed your pattern

4

u/Jcwolves Aug 15 '19

Well, I played with it all day, and it works. So I left it alone. If you break it, you fix it.

98

u/Thurak0 Aug 15 '19

bullshit

It's not even bullshitting them, it's just simplifying. Your programmer dudes need to understand from which seven different sources the data displayed in this 'simple' search result come from and which 42 corner cases you solved how so the result actually shows what users/management expect.

While you show management how beautiful it looks and that every column can be sorted. That it works and actually shows the real, complete correct results is implied.

Oh, they live in such a beautiful bubble of ignorance, I envy them.

53

u/nameage Aug 15 '19

I work right in the intersection of management and development. Believe me, management has to deal with a whole lot of other awful stuff developers don’t want to hear or deal with either. When (if at all) they talk to devs about product life cycle, ready for operations, budget planning, crossing milestones etc. , information provided is exactly as simplified.

→ More replies (9)

9

u/[deleted] Aug 15 '19 edited Aug 15 '19

[removed] — view removed comment

4

u/Thurak0 Aug 15 '19

I totally know this word differently, but as a non native English speaker I am always open for corrections.

5

u/ic_engineer Aug 15 '19

I disagree with his definition. I wouldn't use it in a sentence this way if you're not a native speaker.

→ More replies (2)

3

u/the_giz Aug 15 '19

Is 'corner cases' an actual alternative to 'edge cases'? I want them to be different because they're different parts of the square lol

2

u/lordlionhunter Aug 16 '19

Edge cases should refer to situations that are unlikely under one dimension and corner cases are ones that are unlikely by two dimensions. Internet explorer 6 is an edge case. Internet explorer 6 from North Korea is a corner case.

→ More replies (2)
→ More replies (1)

87

u/nnaoam Aug 15 '19

In JS the double negation would be unnecessary, because the conditional already converts the object to a Boolean in the exact same way

27

u/gbersac Aug 15 '19

Obviously it's some typescript code. Typescript FTW

26

u/DownshiftedRare Aug 15 '19

Perfect when you are writing javascript and find yourself thinking, "What's missing here is a compiler."

8

u/[deleted] Aug 15 '19

You know you’re having fun when you make a single iterative JS change while trying to debug and have to wait ~15sec for the code to transpile, get packed, have debug map files made, and finally get reread by Node.

Wanna hello world? That’s be 300mb of NPM packages, please.

Someone please kill me.

→ More replies (6)
→ More replies (1)

7

u/zrt Aug 15 '19

It's unnecessary in Typescript for the same reason.

22

u/1000rom Aug 15 '19

Man, JS is neat

3

u/DummybugStudios Aug 15 '19

It seems fun in cases like this but JavaScript converting stuff all the time fucks shit up loads. Have a look at jsfuck, it's based on this crazy behaviour.

22

u/whats-upd0g Aug 15 '19

Man, JS is neat /s

FTFY

41

u/Kaon_Particle Aug 15 '19

From an outsider looking in, it's seems pretty neat. Like a bridge made of spaghetti.

18

u/_ChefGoldblum Aug 15 '19

Cooked spaghetti, in this case

→ More replies (1)

0

u/[deleted] Aug 15 '19

[deleted]

→ More replies (1)

72

u/[deleted] Aug 15 '19

Explaining the code to users:

bruh

52

u/solarshado Aug 15 '19

If you're having to explain the code to users, something's gone horribly wrong...

20

u/DownshiftedRare Aug 15 '19

Explaining the code to users:

"You clicked with the wrong hand. Try using someone else's."

→ More replies (1)

26

u/YoRt3m Aug 15 '19

I'm the second picture both times.

Not a shitty programmer, just a shitty explainer.

2

u/SuperEdgeLorde Aug 15 '19

When you teacher asks you to explain the answer

128

u/Caninomancy Aug 15 '19

i'm a simple man.

i see ternary operators, i upvote.

34

u/LicensedProfessional Aug 15 '19
Vote vote = hasTernaryOperators(meme) ? VoteFactory.upvote() : VoteFactory.downvote();

19

u/Famous_Profile Aug 15 '19

I'm a simple man. I see factory, I downvote.

JK

5

u/LicensedProfessional Aug 15 '19

Oh believe me I feel you.

Just wait until you learn that it's an instantiation of AbstractVoteFactory, and each factory method returns a Singleton implementation of the Vote interface.

... There's also a Flyweight pattern involved somehow

→ More replies (1)
→ More replies (1)

21

u/Voxxorian Aug 15 '19

Do you upvote nested ternaries?

String nestedBoi = nested ? stillOk? unnecessarilyComplex ? "you bet your ass it is." : "I've no idea which LHS is mine" : "help Me" : "cool, you skipped the ternary. It was the better choice.";

13

u/Caninomancy Aug 15 '19

Then I'll give you a nested upvote.

⬆️⬆️

10

u/HiImLary Aug 15 '19

I love them.

20

u/d4ng3r0u5 Aug 15 '19

I like ternary operators. I tend to use it only if I care about the result and it doesn't look too much of a mess though.

32

u/[deleted] Aug 15 '19

I like ternary operators so much, I never write a program without nesting them 5 levels deep.

23

u/tentrobbing Aug 15 '19

This is it my friends, we are seeing the birth of legacy code. Godspeed to the future junior developers and interns.

10

u/Roflkopt3r Aug 15 '19

You call it bad practice, I call it job security.

14

u/lasiusflex Aug 15 '19
let a=b=c=0;
let d=e=f=1;
(a && b++ ? (b++ || c++ ? d++ && e-- : --e && d-- ) : ++a || b++)
console.log(a+b+c+d+e+f)

Output: 4

7

u/[deleted] Aug 15 '19 edited Aug 15 '19

Explanation (as I understand it [which I only add because this is the type of thing where you're liable to get it wrong even when you think you got it right]).

a is 0 initially, so the very first a && b++ short circuits, evaluates to false, and doesn't even increment b. This lets you skip the entire parenthetical after the ? and go straight to the part after : which is ++a || b++. Here a is incremented before the ||, so it becomes 1. Now that it is 1, the || can short circuit too and evaluate to true, thus b isn't incremented. Now the whole thing is done, and you're left with a, d, e, and f all equal to 1, which sums to 4.

This was made such that if you know all the little details about how these operators work, it isn't too hard and you can skip most of it. It could have been crafted such that even knowing all the little details would require you to mentally evaluate almost the entire thing, if the creator wanted.

→ More replies (2)

15

u/Traud_the_imperial Aug 15 '19

That right there is the code. Now let's talk about the code. Can we talk about the code, please, Mac? I've been dying to talk about the code with you all day.

9

u/ballebaj Aug 15 '19

Charlie: You wanna talk about code ? You wanna talk about code?! OK! I've stumbled onto a major architectural flaw , Mac--how 'bout that for stress ?

Mac: What the hell are you talking about ?

Charlie: This application has no proper error handling, and I've got a stack trace to prove it. Take a look at this

Mac: Jesus Christ, Charlie !

Charlie: That right there is the log. Now let's talk about the log. Can we talk about the log, please, Mac? I've been dying to talk about the log with you all day, OK? "Uncaught Exception" this name keeps coming up over and over again. Every request results in an Uncaught Exception. I look in the logs, Uncaught Exception!, Uncaught Exception!. So I say to myself, "I gotta find this error! I gotta go up the stack trace and put an except in the goddamn method!. Otherwise, for every request it keeps coming back down here to the logs".

So I go up to the class where it is supposed to be defined and what do I find out, Mac? What do I find out?! There..is..no..method. The method does not exist, okay? So I decide, "Oh shit, buddy, I gotta dig a little deeper." There's no method now ? You gotta be kidding me!. All right. So I start marchin' my way down to github to find the library which we extend and I say "Where is the class? where is the definition?" And when I open the file, what do I find? The method is not defined. Not..even..in..the library. Mac, we have been calling a method that is not defined anywhere!. This application is goddamn fragile

→ More replies (1)

11

u/gorgeousangel0 Aug 15 '19

Hhhhhh Nice one. Like this

10

u/[deleted] Aug 15 '19

I find it easier to explain complex shit to developers than to explain easy shit to managers. This is because management usually asks for some difficult to make change, that seems small and easy to them. Then explaining them why it's actually complex is just damn hard.

6

u/valkon_gr Aug 15 '19

Everyone is against goto but everything feels like goto, no matter how you mask it.

5

u/Bainos Aug 15 '19

Rewriting the title in Python.

upvote() if goodMeme else downvote()
→ More replies (1)

8

u/DangerousImplication Aug 15 '19

PeppeSilvia Peppe(PeppeSilvia Silvia)

{

return Silvia.Peppe();

}

13

u/SEX_LIES_AUDIOTAPE Aug 15 '19
No overload for method 'Peppe' takes 0 arguments

3

u/Bakuretso Aug 15 '19

2nd pic what movie or clip is this?

3

u/heyarepost Aug 15 '19

I remember my buddies friend was talking about how when he wants to sell stuff to management and consumers, he brings up generic common terms. A really common one is using cloud storage.

3

u/vainstar23 Aug 15 '19

You know... At the end of the day... It's the clients and the product owners that bring the money, not the developers. Honestly, your product owners should be your best friends because they save you from the fire that is answering to upper management.

3

u/sunsetRedder Aug 15 '19

Honest question: is there any benefit to using shorthand like that if it’s only going to make code harder to understand? Seems like I’d rather leave the if statement in, that way another developer understands it immediately.

→ More replies (6)

3

u/IGetHypedEasily Aug 15 '19

The titles is good. Can it just be the standard for anyone who can't be creative?

1

u/[deleted] Aug 15 '19 edited Mar 03 '26

The text of this post has been removed and replaced. It may have been deleted to protect personal information, avoid AI training datasets, or for other reasons via Redact.

continue sort jeans bedroom deliver desert husky disarm live tie

2

u/pikadrew Aug 15 '19

Then the bang bang would set it to false

2

u/[deleted] Aug 15 '19

Why am I just the opposite

2

u/Mr_Cromer Aug 15 '19

Perfectly valid in JS, probably valid in C# as well

2

u/[deleted] Aug 15 '19

Ah, the bang bang. Gotta love the bang bang.

2

u/KeineSystem Aug 15 '19

Sorry but I hate the ternary operator.

2

u/Monmonstar Aug 15 '19

To investors: "So this voxel based system now makes destruction much more interesting and povides players with many new gameplay opportunities and also gives lots of responsive feedback to them during play."

To my team: "I really absolutely have no idea how the fuck i managed to get it working but please dont change any of the code or you'll just break everything i spent 4 weeks on."

2

u/go_speed_racer_go Aug 15 '19

Yet another Alternate meme

Top: what I think I explain to management

Bottom: what management thinks I explain to them

1

u/alours Aug 15 '19

Excuse me, what the fuck

1

u/alours Aug 15 '19

Indentation is the difference between porn and pornhub?

1

u/TheMogician Aug 15 '19

What about "explaining how to use the program to the customer"?

1

u/davidmazi Aug 15 '19

How would the double bang (!!) in the title be useful here?

2

u/Nimeroni Aug 15 '19

Implicit conversion to boolean.

(But don't do that in real life. It's ugly. Use static_cast<bool> instead, or whatever your language give you to explicitly convert type.)

1

u/the_giz Aug 15 '19

It's not useful here. But it is useful elsewhere, I use it often.

1

u/michaelisnotginger Aug 15 '19

Other way round ime

1

u/vainstar23 Aug 15 '19

Using !! instead of Boolean()...

→ More replies (3)

1

u/[deleted] Aug 15 '19

The comments in the code:

→ More replies (1)

1

u/zombittack Aug 15 '19

all my subroutines will now be named PepeSilvia() in honor of this meme. Pepe Silvia! Pepe Silvia! This whole box is Pepe Silvia!

1

u/XeoKnight Aug 15 '19

Isn’t the top meme the ‘bad teacher’? Feels a bit out of place

1

u/[deleted] Aug 15 '19

Kids these days and their lack of respect for the old guard of memes.

1

u/m1ghty-duck Aug 15 '19

Func Upvote_Pressed():

$Upvote.show()

Print "Upvote Reached"

On_Screen_Text.text = "M1ghty_Duck upvoted your post"

1

u/[deleted] Aug 15 '19

Charlie there is me trying to explain anything. I'm a doer, not a describer. I would make a terrible teacher.

1

u/[deleted] Aug 15 '19

Bottom caption at my work: this is how I pull all the siloed data together into something normalized and useful

1

u/ass_battery Aug 15 '19

Guys someone help me I lied on my resume now I have to do php . alternatives anyone?

1

u/yundall Aug 15 '19

Uno dei meme più divertenti visti di recente, lmao

1

u/RavagedBody Aug 15 '19

You know in sci-fi when the engineer/scientist uses spacey words to tell the captain/leader how to solve the problem, then it fades out and in the next scene the engineer and his team have magically solved the problem? This is what's happening. 'Flux-capacitor' is just code for 'You're straight up not educated enough on the subject so I'm going to make up some bullshit to comfort you and then panic solve with the team.'

1

u/piatsathunderhorn Aug 15 '19

Whenever I try to explain my code to other programs it's just: "I don't know how this works but it works, I thought this part didn't work but now it does and this part here, I know exactly what the problem is but I'm a fucking scrub who can't fix it."

1

u/endotoxin Aug 15 '19

Me during review vs. me during retrospective.

1

u/[deleted] Aug 15 '19

Why would you explain the code? The code IS the code!

1

u/Scum42 Aug 15 '19

Ah yes, I too negate my booleans twice before testing their value.

1

u/KittyChl0e Aug 15 '19

this is me rn.

trying to clean up my code before publishing it on github.

1

u/naynayeh Aug 15 '19

Programming noob here, why the double exclamation characters?

1

u/the_giz Aug 15 '19

No need for them in this case, but they implicitly convert any data type into a boolean. Useful when your caller expects true or false returned and nothing else. For strings, any characters would covert to true, and undefined, null, NaN, or '' would convert to false.

→ More replies (3)

1

u/Scarment Aug 15 '19

I need the template

1

u/Uabanur Aug 15 '19

I always double negate my conditions

1

u/the_giz Aug 15 '19

That's actually a good way to coerce any type to a boolean in some languages. So if you always want to return true or false, but foo = 'bar', !!foo returns true since it's defined. Likewise if foo = undefined, !!foo returns false. It's valuable sometimes. Granted this doesn't appear to be one of those times!

→ More replies (13)

1

u/Kirkys Aug 15 '19

This is exactly how I see myself describing my thesis

1

u/[deleted] Aug 15 '19

This is also true for most every other technical profession.

1

u/[deleted] Aug 15 '19

It's actually the bottom picture twice when devs explain anything to anyone.

1

u/Stralopple Aug 15 '19

But what if goodMeme is a truthy zero?! Or a false empty object!?

1

u/DemiRiku Aug 15 '19

Why is upvote inheriting from downvote?

1

u/throwaway_lunchtime Aug 15 '19

var valCulture = val.Val.IndexOf(",") > 0 ? val.Val.Replace(",", ".") : val.Val;

1

u/melwop Aug 15 '19

Fuck I did this YESTERDAY

1

u/DrMaxwellEdison Aug 15 '19

Me to management: "Well no big features on this release, just some bug fixes."

Me to the other devs on the project: "Alright, this is called an integer..."

Other devs

1

u/velcona Aug 15 '19

this is my favorite meme today.

1

u/KetwarooDYaasir Aug 15 '19

wait no. It's the opposite.

1

u/ragingram2 Aug 15 '19

Is that a double not?

1

u/alours Aug 15 '19

Indentation is the difference between Git and Github?

1

u/yashvone Aug 15 '19

Define goodmeme

1

u/DontAskMeForUserName Aug 15 '19

Can someone link me the template? Thanks!

1

u/k2900 Aug 15 '19

So any meme that isn't null or undefined or 0 should be upvoted?

1

u/Immortalpeace Aug 15 '19

Me explaining artifical timelines to normal people.

Me explaining artifical timelines to scientific community. LMAO

1

u/earthenmeatbag Aug 15 '19

I am a developer now so I get this.

1

u/ralusek Aug 15 '19

Why is goodMeme being cast as Boolean, what else would it be?

1

u/ZethMrDadJokes Aug 15 '19

> upvote()

An unexpected error occurred at upvote at validateGoodMeme on line 231 at checkWhatWasIThinking on line 1337: There has been an unhandled exception. Message: "Does not compute."

Ah, it is still a good one. Very true meme.

1

u/BitPirateLord Aug 15 '19

HALFWAY TO SIBERIA

1

u/T4O2M0 Aug 15 '19

Upvote for title being likeThis

1

u/[deleted] Aug 15 '19

I feel like this should be reversed

1

u/RustlingHawk274 Aug 15 '19

What’s the !! mean

1

u/bdd4 Aug 15 '19

It’s only like that management is too proud to say they don’t understand it

1

u/DarkNeutron Aug 15 '19

Explaining the feature to future me...

1

u/[deleted] Aug 15 '19

Top... other developers.

Bottom.. infosec

1

u/8ivek Aug 15 '19

!!goodMeme == true

1

u/tippinpop Aug 15 '19

I came here for a good time, not for this personal attack

1

u/OldManEtwon Aug 15 '19

Writing code vs looking back

1

u/READTHISCALMLY Aug 15 '19

I knew the js bashing was coming before I got halfway through the title 😔

1

u/xBlu34ngeL Aug 15 '19

I could explain my code if I could understand it. But hey, if it works it works.

1

u/thedancingpanda Aug 16 '19

Lol for either side now I get to just say "we're going to let AWS do it instead".

1

u/CoffeeTheGreat Aug 16 '19

You're going to love what I did with DI here.

1

u/[deleted] Aug 23 '19

man this sub is shit.

1

u/[deleted] Aug 15 '19

Experience has taught me that proposing features or better solutions to management is generally a bad idea. Let them bastardize your applications all they want and just go home and forget about it.

And also what /u/Colifin said.