1210
A Guessing Game (lemmy.zip)
top 50 comments
sorted by: hot top controversial new old
[-] lemmytellyousomething@lemmy.dbzer0.com 120 points 4 months ago* (last edited 4 months ago)

Why are they even named like this?

When I read code, I want to be able to read it.....

Is this from a time when space was expensive and you wanted to reduce the space of the source files on the devs PC???

For me (with a native language != english), this made it a lot harder to get into programming in the first place.

[-] lukstru@lemmy.world 90 points 4 months ago

I recently held a science slam about this topic! It's a mix of the first computer scientists being mathematicians, who love their abbreviations, and limited screen size, memory and file size. It's a trend in computing that has been well justified in the past, but has been making it harder for people to work together. And the need to use abbreviations has completely gone with the age of auto completion and language servers.

[-] Ephera@lemmy.ml 61 points 4 months ago

mathematicians, who love their abbreviations

Man, I hate that so much. I swear this was half the reason I struggled with maths and physics, that these guys need to write this:

Rather than this:

At some point, they even collectively decided that not having to write a multiplication dot is more important than being able to use more than a single letter for your variables. Just what the fuck?

[-] MisterFrog@lemmy.world 38 points 4 months ago

Thing is, you usually define all your variables. At least we do in engineering (of physical variety, rather than software).

Mostly because we can't expect everyone reading the calculation to know, and that not everyone uses the same symbols.

Not explaining each variable is bad practice, other than for very simple things. (I do expect everyone and their dog reading a process eng calc to know PV=nRT, at a minimum).

Just like (in my opinion) not defining industry specific abbreviations is also bad practice.

Mathematicians don't do this? Shame on them.

[-] Ephera@lemmy.ml 10 points 4 months ago

I mean, it was rather physics that was worse in this regard.

Mathematicians do define their variable quite rigorously. Everything is so abstract, at some point you do just need to write down "this thing is a number". Problem with maths folks is rather that they get more creative with their other symbols. So, "this thing is a number" is actually written as "∃x, x ∈ ℝ".

But yeah, in the school/university physics I experienced, it was assumed that you knew that U is voltage, ρ (rho) is density, ω (omega) is angular velocity etc..
At one point, I had to memorize six pages of formulas and it felt like every letter (Latin, Greek, uppercase, lowercase, some Fraktur for good measure) was a shorthand for something.

load more comments (3 replies)
[-] MonkderVierte@lemmy.ml 4 points 4 months ago

Still bad, i'm not a computer with a lookup table in memory.

I do expect everyone and their dog reading a process eng calc to know PV=nRT, at a minimum

What is "eng"?

[-] MisterFrog@lemmy.world 5 points 4 months ago* (last edited 4 months ago)

Lol fair point regarding Eng: "Engineering".

But Nah, I think assumed knowledge of PV=nRT is fair in context, since if you don't know what it is, you'll only be reading the conclusion, not getting into the weeds of a calculation document.

I'm not going even going to be explaining if I have a column that's says volumetric flow rate, with V=m/ρ. If I give mass flow rate and density (with units, of course), and use these extremely common symbols, and someone doesn't understand, then they have no real business getting to this level of detail anyway.

I do agree that in most cases not defining your variables is bad practice, but there is some nuance, depending on the intended audience and how common a formula is, and the format of whatever it is you're writing.

load more comments (4 replies)
load more comments (2 replies)
[-] blind3rdeye@lemm.ee 16 points 4 months ago

Using full names like that might be fine for explaining a physical rule, or stating the final result of some calculation - but it certainly would be cumbersome and difficult for actually carrying out the calculations. In many cases we already fill pages with algebra showing how things can be related and rearranged to arrive at new results. That kind of work would be intractable with full word names for the variables, partially because you'd be constantly spilling off the end of the page trying to write the steps; but also because having all that stuff would actually obfuscate what you are trying to do - which is algebra. And during that process, the meanings and values of the pronumerals is not as important has how they interact with each other. So the names are just a distraction.

For setting up an equation, and for stating the final result, the meanings of the variables are very important; but during the process of manipulating the equations to get the result you want the meanings of the letters are often ignored. You only need to know that it is something that can be multiplied, or inverted, or subtracted, or whatever. Eg. suppose I want to rearrange to get the velocity. I don't care that I'm dividing both sides by the air density times the drag coefficient and the area... I'm just dividing ρCA, which is an algebraic blob whose interpretation can be saved for some other time.

load more comments (1 replies)
[-] trolololol@lemmy.world 12 points 4 months ago

Try to write the above with pen and ink and then tell me if you can read it back yourself.

Single letters is not a good system but it was the less bad one.

load more comments (2 replies)
[-] mexicancartel@lemmy.dbzer0.com 8 points 4 months ago
[-] Ephera@lemmy.ml 11 points 4 months ago
[-] mexicancartel@lemmy.dbzer0.com 16 points 4 months ago

Bruh how large should our notebook pages be? Also how should we speak about the equation? What if the terms should be represented in a matrix? What if mathematical functions e^x, sin, ln etc. are present? Would you write sine of e^(velocity of the particle B) ? Notations are necessary for readability

[-] Ephera@lemmy.ml 6 points 4 months ago

I don't know what to tell you. They obliterate readability for me.
I also genuinely believe these shorthands hinder access to research for the 99.9% of humanity who are not experts in the given field. Obviously, you do need to understand the context to use a formula correctly, but that also becomes harder when everything is written with hieroglyphs.
In university, I had to assess this paper. It took me 3 weeks to decipher that alien language, and it doesn't even say anything particularly riveting.

To address your points:

  • I'm hoping that at least published math can be typed out with full names.
  • I'm not opposed to local aliases. E.g. if the point is that some values in the matrix are negative and others not, then absolutely write "with air_resistance as 'a', the catapultation matrix is { a, -a, -a, ... }".
  • I don't actually want to introduce spaces into variable names, that's just an example I randomly found online. I was rather thinking e.g. sine(euler^velocity_b).
    Bonus point: You can reasonably type it on a computer, because you don't need Greek letters and subscripts anymore.
load more comments (1 replies)
load more comments (3 replies)
[-] Sodium_nitride@lemmygrad.ml 8 points 4 months ago

I would have quit math if I had to do algebra with names instead of letters.

load more comments (4 replies)
load more comments (2 replies)
load more comments (2 replies)
[-] trolololol@lemmy.world 41 points 4 months ago* (last edited 4 months ago)

It's from a time keyboards were so hard that you needed to do push ups on your finger tips if you wanted to endure a 9 to 5 programming job.

[-] JackbyDev@programming.dev 15 points 4 months ago

The reason people love IBM Model Ms nowadays is because the springs have been worn in now and can easily be pressed without additional training.

load more comments (1 replies)
[-] orangeboats@lemmy.world 39 points 4 months ago

I recall reading somewhere the earlier compilers had a hard limit on the length of function names, due to memory constraints.

[-] Gutek8134@lemmy.world 32 points 4 months ago

I've heard it's because old screens were like 60 character wide

[-] jadelord@discuss.tchncs.de 26 points 4 months ago

Also punched cards had around 80 columns, which put a hard limit on the number of characters per line.

[-] sandalbucket@lemmy.world 19 points 4 months ago

Did you know that in the first version of php, each function name would be hashed to lookup the code to run it? And the hashing algorithm was: the first letter. So all the functions started with a different letter.

[-] rainerloeten@lemmy.world 9 points 4 months ago
[-] FooBarrington@lemmy.world 19 points 4 months ago

It's not. PHP used to use the function length as hash buckets, so by having evenly distributed lengths the execution time was faster. No idea where GP came up with that.

load more comments (1 replies)
load more comments (1 replies)
load more comments (10 replies)
[-] umbraroze@lemmy.world 102 points 4 months ago

I can't remember it, but I read one Microsoft blog post (in Vista era?) about how one team at Microsoft would develop some amazing new Windows component. They'd proudly name it AmazingNewService.dll. And then the operating system team would come in and say "that's all fine and good, but you have to conform to the naming convention." 8+3 filenames. First two letters probably "MS", because of reasons. ...and 15 years later, people still regularly go "What the fuck is MSAMNSVC.DLL?"

load more comments (5 replies)
[-] Gobbel2000@programming.dev 88 points 4 months ago

man -k to the rescue: mbsrtowcs, strxfrm and wcstold are C functions.

[-] pelya@lemmy.world 22 points 4 months ago

wcsoll is a mispronunciation of wcscoll

[-] uis@lemm.ee 18 points 4 months ago

Oh no. You tell them forbidden knowledge of reading manual.

[-] within_epsilon@beehaw.org 5 points 4 months ago

The function wcstol appears to be missing. Cross platform C is difficult.

load more comments (1 replies)
[-] davidagain@lemmy.world 60 points 4 months ago

Rhowch, cwtch, mwyn have to be Welsh. Classicly Welsh sounding words, and mbrsrtowcs, strxfrm can't possibly be Welsh. Source: my welsh uncle taught me to pronounce Welsh place names.

Wcstold, wcsoll wmffre could be either but sound really weird as Welsh to me.

[-] Maven@lemmy.zip 57 points 4 months ago

Wmffre is actually the Welsh spelling of the name "Humphrey"

[-] BakerBagel@midwest.social 23 points 4 months ago

I love the Welsh, but holy shit that's not what those letters are supposed to be for. They and the Irish just made a bunch of shit up when they started to standardize spelling. It makes me understand how Russians feel when Westerners use Cyrillic letters improperly.

[-] grozzle@lemm.ee 26 points 4 months ago

the letters are "supposed to be" for Latin, a language with only five different vowel sounds.

everyone since has just been making a bunch of shit up.

load more comments (3 replies)
[-] Noel_Skum@sh.itjust.works 8 points 4 months ago

Having read your comment I’d like your views on “Wrwgwai” - the South American country of Uruguay.

[-] Serpent@feddit.uk 8 points 4 months ago

It's easy. W is a vowel in Welsh. It sounds similar to ö in German and it can be modified as ŵ to elongate the sound such as in the word dŵr which means water.

Wrwgwai or Wcrain (for example) are the natural way to spell those countries using the Welsh alphabet. Its a highly phonetic language believe it or not.

[-] davepleasebehave@lemmy.world 7 points 4 months ago* (last edited 4 months ago)

In English it is literally called 'double u'

load more comments (3 replies)
load more comments (1 replies)
load more comments (1 replies)
load more comments (1 replies)
[-] MajorHavoc@programming.dev 55 points 4 months ago

I thought I would be better at this game than I am.

[-] dogsoahC@lemm.ee 54 points 4 months ago

Easy. The ones with vowels are C library functions.

[-] BeigeAgenda@lemmy.ca 28 points 4 months ago

Are there any of them that are both?

[-] ArbitraryValue@sh.itjust.works 19 points 4 months ago

I prefer names like these to names that are common words. Even the name of the language is annoying because the letter C isn't exactly uncommon in other contexts. I can't blame the people who named the language because they did it long before search engines were a thing, but what excuse do people now have?

[-] BlueBockser@programming.dev 24 points 4 months ago

So you're saying we should create a programming language called "Welsh" with C-like function names?

[-] ArbitraryValue@sh.itjust.works 10 points 4 months ago

No because that would imply that Welsh is not just as valid a language as English and I don't want to be wedi'i gywiro'n gwrtais.

[-] Comment105@lemm.ee 10 points 4 months ago

Rhowch, mwyn, and wnffre are Welsh. The rest is nonsense.

load more comments (4 replies)
[-] hddsx@lemmy.ca 6 points 4 months ago
[-] lugal@lemmy.ml 4 points 4 months ago
[-] hddsx@lemmy.ca 7 points 4 months ago

Ugh apparently my asterisks turned into italics.

All the words with wcs should be functions. Not sure about the rest of them

[-] lugal@lemmy.ml 7 points 4 months ago

I still vote for Welsh

[-] odium@programming.dev 5 points 4 months ago

Does \ to escape work? *testing*

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 26 Aug 2024
1210 points (99.1% liked)

Programmer Humor

19817 readers
1 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