this post was submitted on 21 Jan 2024
525 points (97.8% liked)

Programmer Humor

32576 readers
399 users here now

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

Rules:

founded 5 years ago
MODERATORS
 

Hey bro, can I have some antibiotic resistance?

Sure bro, but remember that the heavy metal tolerance gene is a dependency.

Shit, I'm on python 2 but hmrA requires python 3.

all 33 comments
sorted by: hot top controversial new old
[–] Enkers@sh.itjust.works 62 points 10 months ago* (last edited 10 months ago) (3 children)

The tree of life is a git repository. I'm personally partial to the giraffe release.

[–] kubica@kbin.social 46 points 10 months ago (1 children)

class Giraffe extends Neck {...} or something like that

[–] randomaccount43543@lemmy.world 21 points 10 months ago* (last edited 10 months ago) (3 children)

That’s not how extends works 😂 you silly goose

[–] Enkers@sh.itjust.works 24 points 10 months ago* (last edited 10 months ago) (1 children)

What, you thought a giraffe was some sort of animal, and not a type of neck? Didn't you know that snakes, geese, and giraffes all evolved from the common neck: C. neckens?

[–] schnurrito@discuss.tchncs.de 10 points 10 months ago

That doesn't sound right, but I don't know enough about biology to dispute it

[–] AlolanYoda@mander.xyz 12 points 10 months ago* (last edited 10 months ago)

class Goose extends Silly

[–] kubica@kbin.social 12 points 10 months ago

It's free style, another alternative if you prefer class Giraffe extends Animal { this.neck = 10*super.neck; }

[–] Turun@feddit.de 29 points 10 months ago (1 children)

The one with the 5m long nerve? Because it needs to loop around an artery near the heart, as that was the shortest way back when that nerve first developed. And now the source and destination are still close, but the heart moved. But no one has gotten around to make that legacy code more efficient.

One of my favorites as well.

[–] Enkers@sh.itjust.works 19 points 10 months ago* (last edited 10 months ago)

It's a feature, not a bug.....

OK, look, we tried refactoring, but everything broke. Just don't touch it and it'll be fine.

[–] cm0002@lemmy.world 14 points 10 months ago (1 children)

Where is the Human branch maintainer? Why aren't they reviewing and approving the numerous PRs and merges??? So many open issues...

[–] CanadaPlus 1 points 10 months ago* (last edited 10 months ago)

They left a cryptic note about free will and not mixing textiles a few millennia back and haven't been on the mammals-dev Slack since.

It's alright, we're pretty sure adoption is going to peak soon anyway.

[–] MonkderZweite@feddit.ch 30 points 10 months ago* (last edited 10 months ago) (2 children)

https://xkcd.com/1605/

Seems like there's even some feedback going on between DNA and histones, the protein core the DNA is whirled around.

[–] emergencyfood@sh.itjust.works 7 points 10 months ago (1 children)

Oh yes, DNA is more like a reference library than a blueprint. Proteins and other molecules decide what they want, then activate the appropriate genes. Also most of the DNA is stuff that isn't in everyday use - genes that are to be used only under certain circumstances, genes that were once functional but are now deprecated, random DNA that got in by mistake, and stuff that serves no discernable purpose but breaks everything if removed.

[–] MonkderZweite@feddit.ch 5 points 10 months ago* (last edited 10 months ago) (2 children)

Lol, Junk DNA is rarely used functions and deprecated code. :-}

Btw, useless fragments of virus's "imports" are there too, right? And some accidents and jumping sequences too. DNA is wild.

[–] InputZero@lemmy.ml 6 points 10 months ago

Not a biologist but have to understand some biology and my understanding is that the current consensus is that most of that junk DNA isn't actually junk and serves some purpose. We just have a very poor understanding of what that is or how it works.

[–] emergencyfood@sh.itjust.works 6 points 10 months ago

Rarely used stuff isn't junk DNA. It is still part of the genome, just expressed only under certain conditions (like stress).

Viral sequences do get embedded in host DNA. Some stay mostly inactive, others keep jumping around (and shuffling our genes in usually harmful but occassionally useful combinations) and yet others actually become useful to the host.

[–] gapbetweenus@feddit.de 18 points 10 months ago* (last edited 10 months ago) (1 children)

Also sometimes they will change your sex in the process.

[–] emergencyfood@sh.itjust.works 15 points 10 months ago (1 children)

Males are bloat. Reproducing asexually and exchanging genes horizontally is clearly more efficient.

[–] MonkderZweite@feddit.ch 17 points 10 months ago* (last edited 10 months ago) (1 children)

Only in simpler species, higher animals have too much depencies.

Other things are simpler. Did you know that there was a group of goats stranded on an island, developed cold-bloodedness to save ressources?

[–] CanadaPlus 1 points 10 months ago

Oooh, that's a new one to me! Biology is a never ending source of these oddball examples.

[–] DontRedditMyLemmy@lemmy.world 13 points 10 months ago (5 children)

Now I want to know what "tech debt" means. Could someone please Google for me?

[–] lolcatnip@reddthat.com 23 points 10 months ago* (last edited 10 months ago)

It's mostly a software development term. Bugs are the most obvious kind of tech debt. They have to be fixed or a product will slowly become unusable over time, so when you release something with bugs you're incurring "debt" they must be "paid" later by fixing them. A lot of tech debt also involves corner cutting and bad design decisions that are hard to explain briefly.

[–] Ephera@lemmy.ml 17 points 10 months ago

Implementing a software feature takes a certain amount of time, and time translates pretty directly to money. Sometimes, you may need to meet a deadline or run out of budget, so you end up implementing the feature at a lower quality or without completing the usual checks or constructing it in such a way that nothing else can be built on top.

This allows you to meet the time/money constraints, but it will come back to haunt you, either making the implementation of future features more costly, or requiring the mess you left behind to be cleaned up, before trying to build on top.
As such, it feels a lot like you're taking up 'technical debt', which you'll have to pay for later.

[–] AlexWIWA@lemmy.ml 11 points 10 months ago

Months and years of "eh, good enough" finally catching up with you

[–] BlackPenguins@lemmy.world 9 points 10 months ago* (last edited 10 months ago) (1 children)

It's the cleaning up of code by making it easier to read or rewriting something in a less convoluted way. Originally you just wanted it to be done quick so you coded it in a sloppy way. Now you have "debt" that needs to be fixed. You don't really gain anything by cleaning it, so it wastes your time instead of implementing something new.

[–] kakes@sh.itjust.works 6 points 10 months ago (1 children)

Well, technically the actual cleaning up part is "refactoring."

[–] BlackPenguins@lemmy.world 5 points 10 months ago

I wanted to use words a layman would know.

[–] JATtho@sopuli.xyz 1 points 10 months ago

Technical debt means how much work it takes to update legacy solution to a modern solution. E.g. each time a new C++ standard is used, all code written with the old standard should be checked. The work time needed to do this is paying up the technical dept.

Now, if you are lazy, and didn't clean up the code, used the easy and sloppy solution, next time you have twice the work to be done. So the dept gets worse, if you do nothing.

[–] Pohl@lemmy.world 12 points 10 months ago (2 children)

Studying evolutionary biology in my undergrad had a big impact on how I look at systems. Judge them by their effect, and not their parsimony. If the mess inside starts to negatively impact efficacy, it will almost always get replaced and almost never get fixed.

Getting obsessed with “how the sausage is made” is a pointless endeavor. If it’s good, eat it, if not make something that tastes better.

[–] emergencyfood@sh.itjust.works 2 points 10 months ago

Funny thing is, I'm a biologist who learned this lesson when I studied programming. As a famous biologist said, god is a hacker and not an engineer.

[–] CanadaPlus 1 points 10 months ago

I think this guy might be an exec, not a programmer.

[–] JATtho@sopuli.xyz 3 points 10 months ago

I touched a piece code that was +10 years old, according to git. Should I be scared? Will my change it survive??