this post was submitted on 30 Aug 2026
532 points (99.3% liked)

Programmer Humor

33028 readers
1495 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] procrastitron@lemmy.world 15 points 5 hours ago

B.S.

Dijkstra would have loved the lookup table solution.

He HATED complexity.

[–] NigelFrobisher@aussie.zone 1 points 2 hours ago

Harold Shipman meme.

[–] tetranomos@awful.systems 5 points 5 hours ago (1 children)

software engineers met the table¹ in web design and never looked back. does a table "mean" tfoot and all (arranged at top)? thead, that sorts(, by server link without javascript)? a "table" in the web means all sorts of sorty things and offset things, and paginated things, by navigable server links. and the two tables nested for layout, oy vey! so many ways with all that engineering the web fell to the broken manual✨️🤷🏾‍♂️✨️

¹ (for layout) https://www.w3.org/TR/web-sustainability-guidelines/#progressive-enhancement

[–] isVeryLoud@lemmy.ca 2 points 3 hours ago

(⁠╯⁠°⁠□⁠°⁠)⁠╯⁠︵⁠ ⁠┻⁠━⁠┻

[–] serenissi@lemmy.world 25 points 9 hours ago

disappointing. no such algorithm.

yeah I looked it up

[–] Stache_@lemmy.ml 60 points 11 hours ago* (last edited 11 hours ago)

Red thinks you’re making up words Red thinks you’re making up words

[–] Yaky@slrpnk.net 14 points 9 hours ago

I expected the bottom to say something like "instead of cloud-native scalable microservices using AI models that cost an average US household salary per day to run", but maybe I've been in corporate for too long.

[–] ThatGuy46475@lemmy.world 146 points 13 hours ago (2 children)

A group of researchers was studying how different people solve problems. They gathered a physicist, a mathematician, and an engineer and gave them each a problem: find the volume of a red sphere. The mathematician solves it first. Asked how, he explains that he used a simple formula. The physicist solves it next. Asked how, he explains that he submerged the sphere in water and measured the rise in water level. Hours later, they find the engineer buried in paperwork. Asked about his progress, he says “I can only find a table of values for the volume of blue spheres.”

They later added an Anthropologist, who understood that more questions needed to be asked. His first question was "do you want fries with that?"

[–] NaibofTabr@infosec.pub 97 points 12 hours ago* (last edited 12 hours ago) (2 children)

On further inspection, it was found that the mathematician had assumed an ideal sphere of constant radius, while the real object was in fact oblate. The mathematician had neglected to take any measurements, leading to an incorrect value. The physicist's answer was correct, but only at sea level at nominal temperature.

The engineer is currently using calipers to measure the diameter of the object at many different angles in order to build a CAD model. He said we could expect results next year.

[–] BartyDeCanter@piefed.social 3 points 4 hours ago

Anywhere with gravity sufficient to overcome the surface tension of the water from forming around the object or clinging to the container.

[–] tyler@programming.dev 43 points 11 hours ago (3 children)

The physicist’s answer would be correct anywhere, no matter the temperature or density of the fluid.

[–] montechristo@feddit.org 18 points 11 hours ago

Supposing that the measurements with and without the sphere are taken under identical circumstances. But you deserve the upvote either way.

[–] untorquer@quokk.au 9 points 11 hours ago* (last edited 11 hours ago) (2 children)

Assuming the time between submersion and observation is greater than zero, increasing temperatures above boiling would give increasing error.

Conversely the physicist may get other error at/near freezing.

And yet another option is the fluid being above the Ball's melting and/or boiling point, assuming changes in density with phase change.

[–] cloudshouter@lemmy.zip 6 points 10 hours ago

They just said the ball was red, they didn’t say why…

[–] Aqivex@fedinsfw.app 8 points 11 hours ago (1 children)

All of which the physicist can trivially account for, control and variable test around, should the requested question be updated to require it.

The requested question did not include "In all possible scenarios", thus determining the volume of the sphere via physics calculation at the most average of conditions, is the most correct valid solution, absent further requirement parameters.

load more comments (1 replies)
[–] OwOarchist@pawb.social 8 points 11 hours ago* (last edited 11 hours ago)

Interestingly, the physicist's answer would always be correct, but not always consistent.

If the sphere is compressible, then air pressure will slightly affect its volume. And unless the thermal expansion rate of the sphere is zero, the amount of fluid displaced will also vary with temperature.

However, even if the physicist gets different answers in different environments, it's always still a correct answer, because they correctly measured the volume of the sphere at that time.

[–] thenextguy@sh.itjust.works 70 points 12 hours ago (1 children)

I would say Computer Scientist in place of software engineer.

[–] baggachipz@sh.itjust.works 31 points 12 hours ago (2 children)

Yeah, software engineers are the sanitation engineers of programming. Source: am one

[–] Zarobi@aussie.zone 4 points 5 hours ago

All these job titles don't really have a formal definition. Software engineer = programmer = software developer. Computer scientist sure does sound fancy though. There's no committee that will say "actually you're doing too much math to be a developer sorry." We all do the code-y thing. Businesses seem to pick one at random based on seniority. I just call myself whatever my most recent job title was.

Your industry will affect your specialisation and skills much more than anything else.

- Software Engineer (Maths)

[–] surewhynotlem@lemmy.world 14 points 10 hours ago (1 children)

Scientists research. Engineers do. We are the more practical of the two.

[–] Omgpwnies@lemmy.world 8 points 9 hours ago (1 children)

Also, any CompSci grad I've worked with couldn't write code for shit unless they learned how outside of their schooling, and yet so many go the CompSci -> programmer route instead of doing like SW Eng or something like that.

[–] gankouskhan@bookwyr.me 1 points 2 hours ago

It's not like the CS program is devoid of programming, norb would I say the SWE students are that much better off without outside education. CS is about half theory half practical for core education at least. The difference is you learn why and how which is more beneficial long term. After the first 6 months on the job the difference between the two on programming ability should be about the same with some more optimal solutions found by the CS student if any difference. It's a pretty short term problem.

[–] BCsven@lemmy.ca 70 points 14 hours ago (6 children)

Ha. I had a convo with a programmer in the 90s. He was explaining a complex problem and the steps to solve in the code, to adjust things based on user choices and parameters.

And I said why wouldn't you presolve all of them and then provide a lookup to go get the solution from a list. And he just looked stunned and walked away.

[–] Thorry@feddit.org 30 points 12 hours ago (2 children)

Reminds me of the first time I saw Sin and Cos lookup tables being used in early 3D gaming. The computers could calculate those just fine, especially with a math co-processor. But for 3D gaming it would be too slow to get a good framerate. So lookup tables were used to greatly improve the speed.

Back on those days all sort of neat tricks like that would be used. Often done as little demo programs that were very impressive. Before the internet it was hard to look up something like that and the latest and greatest tricks weren't written in books yet. So often little code snippets and demo programs would be shared amongst programmers using the sneakernet, so we could all learn and get better.

[–] muusemuuse@sh.itjust.works 1 points 4 hours ago

Humans can invent lies. Machines can repeat lies faster.

[–] xthexder@l.sw0.com 9 points 9 hours ago (1 children)

Trigonometry functions are still just a hardware lookup table in most scenarios I believe. One example I've noticed is that you'll get slightly different sin/cos results on AMD vs Nvidia GPUs due to either different lookup table values, or different interpolation functions being applied on top (I'm not sure it's possible to know for sure exactly which without internal knowledge)

[–] gens@programming.dev 4 points 6 hours ago

For cpu sine is in code. X87 has a FSIN, but nobody uses it. Afaik it's just worse. Idk about gpus or if there's a standard like there is for floats in general (ieee754).

[–] OwOarchist@pawb.social 10 points 11 hours ago* (last edited 11 hours ago) (1 children)

It's possible that the dynamic generation might be more maintainable than a lookup list, though.

With a lookup list, you may need to recalculate the whole thing every time you make a small change. And a significant change, like giving the user a new choice/parameter to adjust, may not only require recalculating the lookup table, but also exponentially increasing the size of the lookup table.

Whereas with a dynamically generated result, small adjustments to the values likely wouldn't require any modification of the actual code at all, and adding a new choice/parameter would be fairly straightforward -- it just needs to be plugged into the formula, maybe add an extra step or two in the algorithm.

[–] BCsven@lemmy.ca 8 points 11 hours ago

It was finite, and early 90s. Calculation time is something you wanted to avoid. To put it to an analogy: you could calculate if a 3d X can be manipulated through a hole, or you can just prr evaluate and say Yes or no based on size, rather than running permutations on 6 axis of movement

[–] Sludge@sh.itjust.works 13 points 12 hours ago

Ah my prior manager suggested something similar... Dynamic views that would adjust based on user set parameters... We set up canned views and called it a day.

He was let go, but always pushed for the art of the possible (even if it would take a few extra sprints to wrap)

load more comments (3 replies)
[–] Jankatarch@lemmy.world 8 points 9 hours ago

I am torn between this and "AAA videogames should be optimized more."

[–] henfredemars@infosec.pub 32 points 14 hours ago (2 children)

It really depends on what you're building. In an embedded shop, lookup tables are first class solutions to most problems. Computer scientists though, 100%!

[–] mushroommunk@lemmy.today 37 points 13 hours ago (2 children)

Depends on the available memory and size of the tables. I've worked on cases where time to compute didn't matter as much as shaving off three more bytes did. Large lookup tables would have absolutely killed us compared to running some math.

load more comments (2 replies)
[–] rtxn@lemmy.world 15 points 13 hours ago* (last edited 13 hours ago)

IIRC, Elite used lookup tables for trigonometric functions on certain target platforms (maybe the NES) because memory wasn't as much of a constraint as computing performance. It's a barrel of game compressed into a pint of code.

[–] Warl0k3@lemmy.world 25 points 13 hours ago* (last edited 13 hours ago) (2 children)

When I was a kid and my mother was teaching me to read SQL, she really drove home that Elegance is in the eye of the beholder. While a C++ dev finds beauty in reducing a signal processing step to O(n) by recursing through five lines of bitwise ingenuity, a SQL dev finds radiance in completing the task without using any loops at all.

[–] Dimantina@lemmy.world 16 points 13 hours ago

Alright to anyone who would question this statement. I am a mom, and have had extremely similar conversations with my kid regarding programming and perspectives.

Seriously it's important for problem solving to not get caught up in perfect solutions or solutions you think are the right path be cause of your own bias'.

Sometimes to solve a problem you are stuck on, or is proving too challenging the best course of action is to figure out why you are trying to solve it that way, and what other solutions there might be.

[–] hemko@lemmy.dbzer0.com 9 points 11 hours ago (2 children)

When I was a kid and my mother was teaching me to read SQL

Why would a mother do this, I'm horrified

My mom taught me ORM. I'd rather have had the SQL mom.

[–] Warl0k3@lemmy.world 13 points 11 hours ago* (last edited 11 hours ago)

In the case of my mother, she's pretty autistic and a very well known data scientist. This was her way of teaching me how she relates to the world - I'm quite grateful to her for it; it has given me a love of programming and allowed me get a great deal closer with her.

[–] Zachariah@lemmy.world 18 points 14 hours ago
[–] SatyrSack@quokk.au 12 points 13 hours ago (1 children)
load more comments (1 replies)
[–] goatinspace@feddit.org 17 points 14 hours ago
load more comments
view more: next ›