this post was submitted on 17 Dec 2025
429 points (96.7% liked)

Programmer Humor

27920 readers
1657 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 2 years ago
MODERATORS
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] SmokeyDope@piefed.social 7 points 1 day ago* (last edited 1 day ago) (5 children)

I'm only a hobbyist no skin in the game but as an engineer first programmer second I feel like how you design the architecture of your logic and how you choose to prioritize computational optimization or feature implementation have a much bigger impact than language. Obviously theres a time and place like using luajit instead of lua if you really need that speed boost, but in big complex programs I'm willing to bet lazy programmers skip optimization steps and copy paste thousands of lines to ship quickly regardless how performance optimized the underlying language is.

I make a module that does a specific thing for version 1, after initial bug patches and maybe a feature addition theres usually an epithany that the logic can be generalized into an api type registry structure that allows the code to be reused and configured as needed on per item basis. Along the way you do stuff like ask what the not expensive calls are, add accumulator timers to reduce unneeded CPU usage , ensure early returns are up top when it makes sense, choosing to render a cleverly crafted sprite instead of a full 3d entity.

A conditional if then logic loop Is a logic loop no matter what Turing complete language its written in. What really matters is how you use the loop not which syntax its written in.

"We have decided that we will use deck screws to build our deck, it's the right pattern and architecture for the job. Now get started with this hammer, the tool you use doesn't matter as long as it's functional as a tool. If it's not working well that's an optimization problem because you're bad at your job."

[–] expr@piefed.social 6 points 1 day ago

No one actually copy/pastes thousands of lines of code. We use libraries.

Languages do matter a lot. Yes, they are all technically equivalent, but the craft of software engineering is much, much more about social/cultural/community considerations than it is computational ones. What the community around a programming language values matters, because it informs a great deal about what's idiomatic in a language, what libraries are available, what kind of bugs are possible (or not), how easy code is to read, comprehend, and maintain, and much more.

What makes a language good is not what programs you can write in it, but how it constrains what you can do such that you naturally writing good code. For example, null pointer exceptions (or segfaults in C, etc.) are a classic problem that plagues many mainstream languages like Java, C#, Python, etc. In Haskell (and a handful of other languages, including Rust), null pointer exceptions are not possible, because nulls do not exist in these languages. Taking away this language "feature" actually increases the power of the language, because you can guarantee that a certain class of common bugs are not possible in your program. So languages that restrict known bad programming practices lead to programmers writing better programs and, more generally, a community around the language that resonates with these philosophies.

load more comments (3 replies)
[–] Jankatarch@lemmy.world 6 points 10 hours ago* (last edited 5 hours ago) (1 children)

Ngl changing paradigms can have the problems do a 180.

I hate leetcode but it's surprisingly fun to code certain questions in prolog when final outcome with error checking is like 15 lines.

[–] HeyThisIsntTheYMCA@lemmy.world 4 points 7 hours ago (1 children)

i cowode exclusively in pythowo

[–] finitebanjo@lemmy.world 4 points 6 hours ago (2 children)

It's amazing how much the NSA's github page is comprised of Python.

load more comments (2 replies)
[–] ultimate_worrier@lemmy.dbzer0.com 4 points 1 day ago (2 children)
[–] Pencilnoob@lemmy.world 5 points 1 day ago (1 children)

wow a Unison comment on the wild! What kind of stuff have you done with it?

Nothing…. yet. It’s the future, though.

load more comments (1 replies)
load more comments
view more: ‹ prev next ›