this post was submitted on 05 Sep 2023
9 points (100.0% liked)

Programmer Humor

19512 readers
371 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
 

"It's just easier to type" and other lies you believe

top 13 comments
sorted by: hot top controversial new old
[โ€“] db2@sopuli.xyz 6 points 1 year ago

aarch64(32bit)

๐Ÿคฃ

[โ€“] bleistift2@feddit.de 4 points 1 year ago (1 children)
[โ€“] SubArcticTundra@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

_astrnfgets0()

[โ€“] words_number@programming.dev 2 points 1 year ago (3 children)

Seriously though, why? Is there historic reasons for that? Did they have to pay extra for more letters back in the day?

[โ€“] mustardman@discuss.tchncs.de 3 points 1 year ago* (last edited 1 year ago) (1 children)

I worked with a complier that would assume only compare the first 8 characters and would treat it the same afterwards.

Compiler copyright was around 1990.

Edit: This was for function names in C

[โ€“] SubArcticTundra@lemmy.ml 2 points 1 year ago

Damn that must have been such a headache

[โ€“] NateSwift@beehaw.org 1 points 1 year ago (1 children)

Iโ€™ve heard arguments that back in ye old days each row only had 80 characters and variable names were shortened so you didnโ€™t have to scroll the page back and forth

[โ€“] Knusper@feddit.de 1 points 1 year ago (1 children)

I've already felt like I should choose shorter names in a (shitty) project where the customer asked us to use an auto-formatter and a max line-width of 120 characters.

Because ultimately, I choose expressive variable names for readability. But an auto-formatter gladly fucks up your readability, breaking your line at some random ass point, unless your line does not need to be broken up.

And so you start negotiating whether you really need certain information in a variable name for the price of badly broken lines.

[โ€“] bleistift2@feddit.de 0 points 1 year ago (1 children)

120 characters is quite much, though.

[โ€“] Knusper@feddit.de 1 points 1 year ago

Yeah, I meant it as an example, where I was still granted relatively luxurious conditions, but even those already caused me to compromise on variable names.

I'd say, 95% of my lines of code do fit into 120 characters easily. It's those 5% that pained me.

[โ€“] nothacking@discuss.tchncs.de 0 points 1 year ago* (last edited 1 year ago) (1 children)

They did, with core you could be paying for many dollars per bit of memory. They also often used teletypes, where you would pay in ink and time for every character.

[โ€“] SubArcticTundra@lemmy.ml 0 points 1 year ago (1 children)

Unix didn't run on core though, did it? I thought core was before its time

A early models of PDP-11, the computer Unix was developed on, did use core.