this post was submitted on 07 May 2024
623 points (97.6% liked)

Programmer Humor

19551 readers
1330 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] henfredemars@infosec.pub 123 points 6 months ago (4 children)

I worked with a developer who insisted on using the shortest names possible. God I hated debugging his code.

I’m talking variable names like AAxynj. Everything looking like matrix math.

[–] redcalcium@lemmy.institute 65 points 6 months ago* (last edited 6 months ago) (3 children)

Ah, must've been a fortran developer. I swear they have this ability to make the shortest yet the least memorable variable names. E.g. was the variable called APFLWS or APFLWD? Impossible to remember without going back and forth to recheck the definition. Autocomplete won't help you because both variables exist.

[–] henfredemars@infosec.pub 46 points 6 months ago (3 children)

He did write some Fortran in his past! What made you think it was Fortran influence?

[–] geogle@lemmy.world 69 points 6 months ago

72 characters per line/card.

[–] Templa@beehaw.org 7 points 6 months ago* (last edited 6 months ago)

I'd say because fortran is often used for calculations such as numerical analysis where you have x, y and z for example.

I have written fortran code in the past and it was mainly for that.

[–] redcalcium@lemmy.institute 5 points 6 months ago

Your first few programming languages usually influence you the most for the rest of your career.

[–] mkwt@lemmy.world 21 points 6 months ago

And you can write more than six characters, but only the first six are recognized. So APFLWSAC and APFLWSAF are really the same variable.

And without namespaces, company policy reserves the first two characters for module prefix and Hungarian notation.

[–] HaywardT@lemmy.sdf.org 1 points 6 months ago

And the rest of you are COBOL programmers.

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

I vomit whenever I have to read one letter alias SQL. And then.... I dealias it.

[–] nogooduser@lemmy.world 8 points 6 months ago (1 children)

I don’t understand why people think that it’s acceptable.

As developers, we’ve had it drummed into us from day one that variable names are important and shouldn’t be one or two letters.

Yet developers deliberately alias an easy to read table name such as “customer” into “c” because that’s the first letter of the table. I’m sure that it’s more work to do that with auto completion meaning that you don’t even need to type out “customer”.

[–] xmunk@sh.itjust.works 5 points 6 months ago

Especially when you also have company and county tables. It forces people to look up what the c is aliased to before beginning to comprehend what you're doing.

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

At a previous job I had to work with an old database where all the tables and columns had 6-character names

[–] wfh@lemm.ee 1 points 6 months ago

Same. Old DB2 base from the 80's that was migrated to Oracle in the 90's then to Postgres in the 2010's.

And the people there know all the column names by heart 😅

[–] dan@upvote.au 2 points 6 months ago* (last edited 6 months ago)

shortest names possible

This film from 1975 is still relevant today: https://www.youtube.com/watch?v=7hdJQkn8rtA