this post was submitted on 01 Sep 2023
1182 points (100.0% liked)

Programmer Humor

854 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
[–] ICastFist@programming.dev 148 points 1 year ago (3 children)

"Girl, I named no variables after you, because you're my only Constant"

smooth πŸ‘

[–] TerryTPlatypus 16 points 1 year ago* (last edited 1 year ago) (1 children)

"Girl, you are my Two's Complement, you're always my plus one on any occaision"

Cuz if you invert the bits of of a binary number and add one you get its negative number, so your girlfried is an equal part of you

[–] agent_flounder@lemmy.one 11 points 1 year ago

Damn son save some for the rest of us.

[–] Supertramper@feddit.de 16 points 1 year ago

You’ll need an exception handler for all those dropping panties.

[–] naevaTheRat@lemmy.dbzer0.com 77 points 1 year ago (1 children)

I was thinking about you when I cleaned up this codebase and removed a lot of redundant functions.

[–] float@feddit.de 29 points 1 year ago (2 children)

That sounds more like breaking up.

[–] QuazarOmega@lemy.lol 13 points 1 year ago

The employee that left the mess was already long gone unfortunately

load more comments (1 replies)
[–] Jtskywalker@lemm.ee 56 points 1 year ago (1 children)

I made a website for my wife with a list of a ton of reasons why I love her and each time she taps the screen it shows a new one.

So... that is a thing you can do for the cost of a domain name and some cheap hosting.

[–] wviana@lemmy.eco.br 14 points 1 year ago (1 children)

How many reasons did you code into it?

[–] Jtskywalker@lemm.ee 30 points 1 year ago (6 children)

I don't know, I'd have to check the database. I add to it every once in a while so it keeps growing. I think I started with around 20 or so

[–] sic_1@feddit.de 11 points 1 year ago

Aw man that's so cute! Great idea, hope she appreciates it.

load more comments (5 replies)
[–] efrique@lemm.ee 54 points 1 year ago (1 children)

git branch testing.stephanie.slept.with.my.friend.brad

[–] SpaceCowboy@lemmy.ca 22 points 1 year ago (1 children)
load more comments (1 replies)
[–] halvar@lemm.ee 54 points 1 year ago (2 children)

Name a linux distro after her and yourself. Always works.

[–] supert@lemmy.sdfeu.org 15 points 1 year ago

I also thought of Debian.

load more comments (1 replies)
[–] stephfinitely@artemis.camp 52 points 1 year ago (2 children)

This person misunderstands a beautiful function code can be very sexy or maybe I'm a odd girl.

[–] nickwitha_k@lemmy.sdf.org 8 points 1 year ago* (last edited 1 year ago) (6 children)
var LogicGate = map[string]string{
    "OR": "OR",
    "AND":  "AND",
    "NOT": "NOT",
    "NOR": "NOR",
    "NAND": "NOR",
    "XOR": "XOR",
}

func isLogicGate(inString string) (bool) {
    _, ok := LogicGate[strings.ToUpper(inString)]
    if ok {
        return true
    } else {
        return false
    }
}

func stringAsGateLogic(inString string) (bool, error) {
    inSplit := strings.Split(inString, " ")
    var phrase1 strings.Builder
    var phrase2 stringa.Builder
    var gateString string
    for word := range inSplit {
        if isLogicGate(word) {
            if len(gateString) < 1{
                gateString = word
            } else {
                phrase2.WriteString(word)
            }
        } else {
            if len(gateString) < 1{
                phrase1.WriteString(word)
            } else {
                phrase2.WriteString(word)
            }
        }
    }
    boolPhrase1 := bool(phrase1.String())
    boolPhrase2 := bool(phrase2.String())
    switch strings.ToUpper(gateString) {
        case "OR":
            return (boolPhrase1 || boolPhrase2), nil
        case "AND":
            return (boolPhrase1 && boolPhrase2), nil
        case "NOT":
            return (!boolPhrase2), nil
        case "NOR":
            return (!(boolPhrase1 || boolPhrase2)), nil
        case "NAND":
            return (!(boolPhrase1 && boolPhrase2)
        case "XOR":
            orRes := (boolPhrase1 || boolPhrase2)
            nandRes := (!(boolPhrase1 && boolPhrase2))
            return (orRes && nandRes), nil
        default:
            return false, fmt.Errorf("Why you do dis?: %v", inString)
    }
}

func main(){
    answer, err := stringAsGateLogic ("This person misunderstands a beautiful function code can be very sexy or maybe I'm a odd girl.")
    if err != nil {
        fmt.Println(err)
    }
    fmt.Println(answer)
}
[–] deegeese@sopuli.xyz 9 points 1 year ago (1 children)

Sorry, Hungarian notation is not beautiful.

load more comments (1 replies)
load more comments (5 replies)
load more comments (1 replies)
[–] cyberic@discuss.tchncs.de 46 points 1 year ago* (last edited 1 year ago) (4 children)

Image Transcription: Twitter Post

bass boosted ACAB @lil_morgy

hooking up with artists is hot cuz theyll be like "i thought of you when i wrote this song". what are tech guys gonna do? name a git branch after you? the fuck

[* I am a human volunteer and you could be too ❀️*]

[–] TheGreenGolem@lemm.ee 14 points 1 year ago

Good human!

load more comments (3 replies)
[–] moog@lemm.ee 40 points 1 year ago* (last edited 1 year ago)

Sure, but at least they won't be afraid of commitment.

[–] zeekaran@sopuli.xyz 36 points 1 year ago (2 children)

I wrote an automation specifically for my partner to unlock the front door when they arrive home.

Also we got a sexy time button.

Home Assistant is a path to what many would consider... Unnatural.

load more comments (2 replies)
[–] Semi-Hemi-Demigod@kbin.social 35 points 1 year ago (2 children)

MySQL, MariaDB, and MaxScale are all named after Ulf "Monty" Widenius' kids

[–] zomtecos@feddit.de 18 points 1 year ago (4 children)

His first kid was called β€žMyβ€œ?

[–] stefenauris@pawb.social 11 points 1 year ago (1 children)
load more comments (1 replies)
load more comments (3 replies)
load more comments (1 replies)
[–] neuracnu@lemmy.blahaj.zone 34 points 1 year ago (1 children)

β€œThe two hardest problems in programming are cache invalidation, naming things and off-by-one errors.”

load more comments (1 replies)
[–] Gnubyte@lemdit.com 32 points 1 year ago (3 children)

No. They'll just name an entire lineup of the worlds biggest computers after your daughter.

[–] Getawombatupya@aussie.zone 26 points 1 year ago

Little baby Thinkpad really deserves it.

[–] Comment105@lemm.ee 11 points 1 year ago (2 children)
load more comments (2 replies)
load more comments (1 replies)
[–] Nsh@lemmy.ca 31 points 1 year ago (3 children)

The creator of MySQL, MaxDB and MariaDB named them after his children My, Max and Maria, so why not

[–] dan@upvote.au 16 points 1 year ago* (last edited 1 year ago) (1 children)

after his children My

I thought you were kidding, but his daughter is actually named "My".

[–] lord_ryvan@ttrpg.network 11 points 1 year ago

It helps that it's a name in another language (Finnish), where β€œmy” isn't a word, at all.

Then what's about MongoDB?

load more comments (1 replies)
[–] db2@sopuli.xyz 28 points 1 year ago (4 children)
[–] synae@lemmy.sdf.org 13 points 1 year ago (1 children)
load more comments (1 replies)
[–] MrJukes@lemmy.one 9 points 1 year ago (1 children)

You should get a different nickname for your partner.

load more comments (1 replies)
load more comments (2 replies)
[–] noodle@feddit.uk 24 points 1 year ago* (last edited 1 year ago) (2 children)

When I was learning programming I wrote a small program that I called for_you.exe. It printed an animated ASCII penis ejaculating on some boobs. I emailed it to my girlfriend and thankfully she thought it was hilarious. We're still together.

[–] bigkahuna1986@lemmy.ml 26 points 1 year ago (1 children)

You can tell your age by the fact that you were emailing an exe file.

load more comments (1 replies)
load more comments (1 replies)
[–] IntentionallyAnon@lemm.ee 23 points 1 year ago

Naming variables after loved ones. Stephanie += 1 Stephanie/bob = Jeff

If Jeff == Stephanie: Jerome(Stevens)

[–] Eiim@lemmy.blahaj.zone 22 points 1 year ago (2 children)
load more comments (2 replies)
[–] crunchpaste@lemmy.dbzer0.com 19 points 1 year ago (3 children)

Well, I made my girlfriend a GUI app that converts subtitles from Windows-1251 to utf-8 encoding so that she doesn't have to remember how to do it. And I didn't even name it after her...

load more comments (3 replies)
[–] ABotelho@lemmy.ca 16 points 1 year ago (4 children)

A lot of projects are named after spouses and family lol

load more comments (4 replies)
[–] MargotRobbie@lemm.ee 11 points 1 year ago

So, anyone here want to name a git branch after me? 😊

[–] Four_lights77@lemm.ee 10 points 1 year ago

The classic Wizard vs Bard debate.

I use friends and family as sample data for unit/integration tests.

At a previous job, I tested an automated email system by scheduling fake events for various US presidents. I've long left that position, but I never cleaned up the test data. Every month I still get a reminder for Nixon's upcoming reservation at the Watergate Hotel.

[–] cheery_coffee@lemmy.ca 10 points 1 year ago (2 children)

Well I am now, that's romantic as fuck

"Honey, I named this branch after you. It changes whitespace in the readme of a major open source project, but it'll look great on my resume!"

load more comments (2 replies)
load more comments
view more: next β€Ί