717

geteilt von: https://lemmit.online/post/3018791

This is an automated archive made by the Lemmit Bot.

The original was posted on /r/ProgrammerHumor by /u/polytopelover on 2024-05-26 21:23:20+00:00.

(page 2) 50 comments
sorted by: hot top controversial new old
[-] lorty@lemmygrad.ml 8 points 6 months ago

I know the second one is better, but I also know I'm terribly inconsistent with this stuff.

[-] nexussapphire@lemm.ee 3 points 6 months ago

Been learning to program and I'm refusing to use an lsp for the time being. I'm bad about using abbreviated names when I have to type over and over again(no auto complete). I'm at least using descriptive names for functions I use less than four times.

[-] user1234@lemmynsfw.com 6 points 6 months ago

dialog_file_open_dialog I prefer big.LITTLE cpus

[-] RustyNova@lemmy.world 5 points 6 months ago

I don't know and that's the problem :(

I keep asking myself what to choose, only for changing it a day after cursing myself to choose a stupid name.

Big endiant is great for intellisense to quickly browse possibilities, since it groups it all in the same place. But that's also a detriment when you know what you want. You can start typing without the prefix but you'll have to go through the better suggestions of intellisense first.

Little endiant is the same thing, but in reverse. Great when needed, but bad for browsing.

Although I do have some fix I'm starting to use. But it's not applicable everywhere, and not in every language.

What I do is use module as prefix. Instead of dialogue_file_open, I create a file_open in the dialogue module, allowing either directly calling file_open, or dialogue::file_open. Using intellisense on the module allow for easy browsing too!

Although in OP's post I'd rather have file_open_dialogue as it convey the more significant meaning, being to open a file, first. Then "dialogue" is just the flavour on top

[-] sudo42@lemmy.world 1 points 6 months ago* (last edited 6 months ago)

Big endiant is great for intellisense to quickly browse possibilities, since it groups it all in the same place.

If only someone would train a program… we could call it a Large Language Model… to knowingly group the names together so we wouldn’t have to choose between human-readable format or dB format.

Guess that will never happen because instead we’re stuck using “AI’s” to inflate stock prices instead. /s

I remember seeing a proposed language that would allow each programmer to choose what name to use for each item. Don’t like ‘open_file’? Choose to see it as ‘file_open’ every time you review the file in the future.

While we battle with each other endlessly, we keep forgetting that the computer doesn’t care.

load more comments (1 replies)
[-] rockSlayer@lemmy.world 5 points 6 months ago

Create a file handler class to avoid the issue

[-] nikaaa@lemmy.world 3 points 6 months ago

FileDialogFactory

[-] magic_lobster_party@kbin.run 3 points 6 months ago
[-] deadbeef79000@lemmy.nz 2 points 6 months ago

Meh, a class is just a struct of function pointers.

[-] Zangoose@lemmy.one 3 points 5 months ago* (last edited 5 months ago)

I know I'm late to this but here's my (probably insane?) take. We use Subject-Verb-Object in English right? So, hear me out:

dialog_create_tab(...)
dialog_open_file(...)
dialog_close_file(...)
[-] sparkle@lemm.ee 3 points 6 months ago* (last edited 6 months ago)

in general, adjectives and verbs after nouns because it's more organized/easier to search/filter. as god intended.

[-] nomadjoanne@lemmy.world 3 points 6 months ago

Romance language word order noun_descriptor is the right way.

[-] joyjoy@lemm.ee 2 points 6 months ago

We just call those Smurf names.

[-] morgunkorn@discuss.tchncs.de 2 points 6 months ago

As a rule of thumb, I always put action verbs at the end of method names

load more comments
view more: ‹ prev next ›
this post was submitted on 27 May 2024
717 points (97.9% liked)

Programmer Humor

19623 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 1 year ago
MODERATORS