this post was submitted on 14 Nov 2023
745 points (94.7% liked)

Programmer Humor

32410 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] callyral@pawb.social 119 points 2 years ago* (last edited 2 years ago) (8 children)

tomatoes are fruits that are often used as vegetables and are botanically classified as berries*

*according to wikipedia and my interpretation of it

[–] TheGiantKorean@lemmy.world 54 points 2 years ago (2 children)

Intelligence is knowing that tomatoes are a fruit. Wisdom is knowing that they don't go into a fruit salad.

[–] almost1337@lemm.ee 34 points 2 years ago (1 children)

Charisma is selling salsa as a tomato based fruit salad

load more comments (1 replies)
[–] mpa92643@lemmy.world 12 points 2 years ago (1 children)

What if you soak them in high fructose corn syrup first?

[–] nightofmichelinstars@sopuli.xyz 27 points 2 years ago (1 children)
load more comments (1 replies)
[–] Pietson@kbin.social 12 points 2 years ago (3 children)

Tomatoes are only fruits in a biological sense, vegetable is a culinary term so it makes no sense to mix them up.

[–] mpa92643@lemmy.world 12 points 2 years ago (1 children)

I prefer just calling everything I eat the flesh of whatever it came from. Tomato? Flesh. Lettuce? Flesh. People? Flesh.

[–] PoastRotato@lemmy.world 6 points 2 years ago (1 children)

My favorites are flesh fries

load more comments (1 replies)
[–] CosmicTurtle@lemmy.world 9 points 2 years ago (3 children)

My understanding is that the term vegetable is actually a political term, meaning it is categorized as a vegetable for tax reasons.

Vegetables are taxed lower than fruits.

load more comments (3 replies)
load more comments (1 replies)
[–] themusicman@lemmy.world 7 points 2 years ago (2 children)

According to some YouTube short (maybe it was vsauce?): botanically, fruits are vegetables so tomatoes are vegetables in both classification systems

[–] Dirk@lemmy.ml 7 points 2 years ago

In reality it really does not matter and the classification is somewhat arbitrary. Just think about adding it to a fruit salad. Would you do it? Then it's a fruit.

load more comments (1 replies)
[–] frezik@midwest.social 6 points 2 years ago (2 children)

I once saw a little blurb at a sandwich shop stating that tomatoes are fruit, but if you pair them on a sandwich with jalapenos, you're getting both fruits and vegetables. I demand better scientific accuracy in restaurant marketing signs.

load more comments (2 replies)
load more comments (4 replies)
[–] Pxtl@lemmy.ca 91 points 2 years ago (8 children)

The fact that this meme makes sense to anyone demonstrates how dynamic typed programming languages cause brain damage.

load more comments (8 replies)
[–] JakenVeina@lemm.ee 89 points 2 years ago (2 children)

I like TypeScript less for its ability to categorize my grocery list and more for its ability to stop anyone from putting cyanide on it.

[–] DrM@feddit.de 43 points 2 years ago (2 children)

I hate Typescript for promising me that nobody can put cyanide on the list, but in reality it disallows ME from putting cyanide on the list, but everyone else from the outside is still allowed to do so by using the API which is plain JavaScript again

[–] CanadaPlus@lemmy.sdf.org 33 points 2 years ago (1 children)

Honestly, programming is great for teaching you that you are the stupid one. This is still a feature.

[–] DrM@feddit.de 13 points 2 years ago* (last edited 2 years ago) (4 children)

The main problem with JavaScript and TypeScript is that there is such a little entrybarrier to it, that way too many people use it without understanding it. The amount of times that we had major issues in production because someone doesn't understand TypeScript is not countable anymore and our project went live only 4 months ago.

For example, when you use nest.js and want to use a boolean value as a query parameter.

As an example:

@Get('valueOfMyBoolean')
@ApiQuery(
  {
    name: 'myBoolean',
    type: boolean,
  }
)
myBooleanFunction(
  @Query('myBoolean') myBoolean: boolean
){
  if(myBoolean){
    return 'myBoolean is true';
  }
  return 'myBoolean is false';
}

You see this code. You don't see anything wrong with it. The architect looks at it in code review and doesn't see anything wrong with it. But then you do a GET https://something.com/valueOfMyBoolean?myBoolean=false and you get "myBoolean is true" and if you do typeOf(myBoolean) you will see that, despite you declaring it twice, myBoolean is not a boolean but a string. But when running the unit-tests, myBoolean is a boolean.

[–] shasta@lemm.ee 6 points 2 years ago

This is more a condemnation of nest.js than ts. It seems great in theory. I like the architecture and the ability to share models and interfaces between front and backend, but it's objectively makes everything more complicated. It adds layers of abstraction that should not be necessary and it's such a niche/unpopular framework for backend systems that you generally have to jump through hoops to do anything moderately complex. Not only do new devs have to learn typescript to use it, they have to learn the nest architecture to know how to do things "the right way" and you still end up in situations like this which looks perfectly valid but isn't. Typescript was never meant to be used for backend, and trying to make it do so and then complaining about it is like jogging while carrying a gun, shooting yourself in the foot, and blaming the gun.

load more comments (3 replies)
load more comments (1 replies)
[–] AngryCommieKender@lemmy.world 7 points 2 years ago (2 children)

Two questions immediately come to mind. 1) Would you buy the cyanide if it was on the list. 2) Where does one casually buy cyanide? I can't imagine a case where I'd need some, but it would be handy to know if I ever did.

load more comments (2 replies)
[–] aluminium@lemmy.world 84 points 2 years ago (2 children)

I'd say its more like the gas tank telling you that you aren't allowed to pour in brake fluid as that could lead to runtime errors.

[–] hansl@lemmy.world 35 points 2 years ago
tank.pour(brakeFluid as Any); // do not remove this for some reason will break prod
load more comments (1 replies)
[–] uis@lemmy.world 37 points 2 years ago

Biologists: but tomato is a berry, which is subset of fruits

[–] scorpionix@feddit.de 28 points 2 years ago (22 children)

Am I missing the joke? Tomatoes are fruits.

[–] Pons_Aelius@kbin.social 37 points 2 years ago (1 children)

Intelligence is knowing Tomatoes are fruits.

Wisdom is knowing not to put them in a fruit salad.

[–] dan1101@lemm.ee 7 points 2 years ago (1 children)

Pragmatism is putting tomatoes with the vegetables because of taste, which is one of the most important parts of food.

load more comments (1 replies)
[–] FishFace@lemmy.world 6 points 2 years ago (1 children)

The joke is that almost everyone calls them vegetables because the botanic categorisation of parts of plants is niche jargon that is not useful in everyday life, whereas the culinary categorisation is useful, and so your shopping list correcting you is worse than unnecessary.

[–] mpa92643@lemmy.world 11 points 2 years ago (2 children)

But that's not what TypeScript does. The joke in the meme doesn't really even make sense.

A better analogy would be you have a basket that's explicitly labeled "Fruit" and TypeScript complains if you try to put laundry detergent in it because you said it's supposed to be a basket of fruit.

This meme was clearly made by someone who doesn't use or understand TypeScript.

[–] Windex007@lemmy.world 8 points 2 years ago

This meme was clearly made by someone who doesn't use or understand TypeScript.

It was made by someone who doesn't understand types, period.

Curious if it's the same wizard who was explaining that Linus doesn't understand programming because he has opinions on arm vs Intel architecture. EVERYONE programs in JavaScript anyways and my JavaScript always works on arm. Has Linus lost the plot?

load more comments (1 replies)
load more comments (20 replies)
[–] ShroOmeric@lemmy.world 23 points 2 years ago (1 children)

I swear to god, sometimes I really don't know what Typescript really wants from me. It's like some old god: you know it needs a sacrifice but the god is not telling you exactly what he wants. So you can only try and pray.

[–] MashedTech@lemmy.world 16 points 2 years ago (1 children)

Idk, I find it pretty easy to understand

[–] herrvogel@lemmy.world 12 points 2 years ago (1 children)

The "return type <5 paragraphs of various word salads> is not compatible with " error messages are anything but easy to understand in my opinion.

[–] gornius@lemmy.world 9 points 2 years ago* (last edited 2 years ago)

Yeah I don't get why it spits out whole types instead of only differences between them. Like "function expects non-null 'some.param.in.object' of type 'string' in argument 'someArgument', which is missing in passed argument".

[–] schaeferpp@discuss.tchncs.de 20 points 2 years ago

I'm a bit disappointed that nobody mentioned Rust yet.

[–] bestusername@aussie.zone 17 points 2 years ago (4 children)

Yeah... What?

Tomatoes are fruits.

load more comments (4 replies)
[–] lorty@lemmy.ml 16 points 2 years ago

Guess it's not only Typescript that likes to argue with the developer while missing the entire point...

[–] cupcakezealot@lemmy.blahaj.zone 9 points 2 years ago (1 children)

somewhere brodie lee just threw some papers

load more comments (1 replies)
[–] aeharding@lemmy.world 9 points 2 years ago

Report -> I'm in this picture and I don't like it

[–] yoast@notdigg.com 7 points 2 years ago

I've seen versions of this meme before but I just noticed what he's wearing. Is that a Mortal Kombat shirt?

load more comments
view more: next ›