this post was submitted on 02 Oct 2023
38 points (100.0% liked)

Programmer Humor

24587 readers
919 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
 
top 50 comments
sorted by: hot top controversial new old
[–] aleq@lemmy.world 8 points 2 years ago (3 children)

Reasonable and sane behavior of cd. Just get into the habit of always using lower case names for files and directories, that's how our forefathers did it.

[–] drolex@sopuli.xyz 5 points 2 years ago (1 children)

Yes, but this is the default on many distros, so for once the end user is not to blame

[–] MooseBoys@lemmy.world 4 points 2 years ago (3 children)

Even worse, many components will ignore the XDG_DOWNLOAD_DIR var so even if you manually change it to $HOME/downloads (lower-case) it will often break things.

[–] zlatko@programming.dev 1 points 2 years ago (1 children)

Why not just cd $XDG_DOWNLOAD_DIR in the first place?

[–] joyjoy@lemm.ee 1 points 2 years ago* (last edited 2 years ago)

That's not an environment variable. It's defined in ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs.

Though you can use the xdg-user-dir DOWNLOAD command to get it automatically.

[–] schnurrito@discuss.tchncs.de 1 points 2 years ago (1 children)

Something something symlink Downloads to downloads

[–] MooseBoys@lemmy.world 1 points 2 years ago

Yeah but the main issue is that I don’t want there to be a Downloads directory in my home.

[–] Synthead@lemmy.world 1 points 2 years ago (1 children)

Keep filling those bugs and stop complaining on random forums, kids

[–] FiskFisk33@startrek.website 4 points 2 years ago

Porque no los dos?

[–] Honytawk@lemmy.zip 2 points 2 years ago (1 children)

Lower case directories?

Eww

ILikeMineInAWayICanReadThemProperly, instead of ilikemineinawayicanreadthemproperly

[–] aleq@lemmy.world 2 points 2 years ago (1 children)

If a directory has multiple words in it I usually do kebab case: i-like-mine-in-a-way-i-can-read-them-properly. Both easier to read and type than pascal case.

For more complex filenames I use a combination of kebab-case and snake_case, where the underscore separates portions of the file name and kebab-case the parts of those portions. E.g. movie-title_release-date-or-year_technical-specifications.mp4

[–] jasory@programming.dev 1 points 2 years ago

CamelCase directories and snake_case files.

[–] eek2121@lemmy.world 1 points 2 years ago

Do. none of you use case insensitive autocomplete? “do ” “Downloads”

[–] Sh1nyM3t4l4ss@lemmy.world 5 points 2 years ago (2 children)

Use a shell with decent auto-completion. I have not been irritated by this in years.

[–] nogooduser@lemmy.world 1 points 2 years ago (3 children)

Won’t autocomplete fail if you do “cd d” and then try the autocomplete?

Or is that what you mean by “decent” auto-completion?

[–] rasensprenger@feddit.de 3 points 2 years ago

bash's autocomplete fails (at least with default settings), but e.g. zsh can figure out what you mean

[–] bdonvr@thelemmy.club 2 points 2 years ago

No, it will probably go to "Documents", and if you hit tab again it should go to "Downloads". (Assuming you have the normal default folders)

[–] newIdentity@sh.itjust.works 1 points 2 years ago (1 children)

Not with a decent autocomplete. It will look for a folder starting with a small d and if it doesn't exist it looks at a folder with a large D.

[–] pgp@sh.itjust.works 1 points 2 years ago (1 children)

The choice of the letter d was brilliant, that's for sure. Now I'm imagining a folder with a large D.

[–] newIdentity@sh.itjust.works 1 points 2 years ago (1 children)

I don't get what you mean. It doesn't matter if you write a uppercase or lowercase d

[–] Skimmer@lemmy.zip 0 points 2 years ago (2 children)

What shell would you recommend? 🤔

[–] Sh1nyM3t4l4ss@lemmy.world 1 points 2 years ago

I use fish which is quite nice OOTB, although if you want a posix compliant shell, zsh with some plugins is also great.

[–] stevehobbes@lemm.ee 0 points 2 years ago (1 children)
[–] yum13241@lemm.ee -1 points 2 years ago (1 children)

Is fucking irrelevant. Just use your package manager.

[–] stevehobbes@lemm.ee 1 points 2 years ago (1 children)

Get some anger management help.

[–] yum13241@lemm.ee -1 points 2 years ago

Maybe stop trying to be a smartass.

[–] Asswaterpirate@lemmy.world 2 points 2 years ago (1 children)
[–] zlatko@programming.dev 1 points 2 years ago

did you mean smuts?

[–] MonkderZweite@feddit.ch 1 points 2 years ago (1 children)

You've come from Windows and have brought dangerous expectations.

[–] naught@sh.itjust.works 1 points 2 years ago (1 children)

MacOS has a case insensitive file system. It causes me untold grief

[–] sysadmin420@lemmy.world 1 points 2 years ago* (last edited 2 years ago) (1 children)

Is a 40 year old it guy who love linux, wat

Macos is case insensitive?!

[–] sudo@lemmy.today 0 points 2 years ago (1 children)

OSX offers both case sensitive and case insensitive filesystems

[–] naught@sh.itjust.works 0 points 2 years ago (1 children)

Defaults to insensitive and if you want to change it you have to reformat 🥲

[–] example@reddthat.com 2 points 2 years ago

I've been using case insensitive fs on macOS for years and the only software having issues with this is onedrive.

can't say i'm surprised.

[–] darcy@sh.itjust.works 1 points 2 years ago

i renamed my home folders to dl, docs, pics, etc. and use auto-cd (whatever its called) to just type dl instead of cd dl

[–] pchem@feddit.de 1 points 2 years ago* (last edited 2 years ago)
[–] starman@programming.dev 1 points 2 years ago* (last edited 2 years ago)

So you type cd D tab and it brings you to Documents

[–] ayushnix@lemmy.sdf.org 1 points 2 years ago (1 children)

using capital letters in file/directory names on Linux :|

[–] jonne@infosec.pub 1 points 2 years ago* (last edited 2 years ago)

It's a default on some distros, unfortunately, and changing it without updating the necessary env vars will break a bunch of stuff.

[–] newIdentity@sh.itjust.works 1 points 2 years ago* (last edited 2 years ago) (1 children)

Use Zsh or Fish and tab completion.

[–] janAkali@lemmy.one 1 points 2 years ago (1 children)

Or better yet, use z or zoxide:
"z down" will fuzzy match the "~/Download" folder.

[–] words_number@programming.dev 1 points 2 years ago

This is the way!

[–] CodexArcanum@lemmy.world 0 points 2 years ago* (last edited 2 years ago) (1 children)

I love how many people brought up the Turkish "I" as if everyone here is on the Unicode steering committee or just got jobs for Turkish facebook.

I, an English speaker, have personally solved the problem by not having a Turkish I in the name of my Downloads directory, or any other directory that I need to cd into on my computer. I'm going to imagine the Turks solve it by painstakingly typing the correct I, or limiting their use of uppercase I's in general.

In fact, researching the actual issue for more than 1 second seemingly shows that Unicode basically created this problem themselves because the two I's are just seperate letters in Turkic languages. https://en.m.wikipedia.org/wiki/Dotted_and_dotless_I_in_computing

If you nerds think this is bad try doing Powershell for any amount of time. It is entirely case-insensitive.

[–] yum13241@lemm.ee 0 points 2 years ago (1 children)

Why the FUCK did they make characters that look the same have different codepointers in UNICODE? They should've done what they did in CJK and make duplicates have the same codepointer.

Unicode needs a redo.

[–] Tranus@programming.dev 0 points 2 years ago (1 children)

Well letters don't really have a single canonical shape. There are many acceptable ways of rendering each. While two letters might usually look the same, it is very possible that some shape could be acceptable for one but not the other. So, it makes sense to distinguish between them in binary representation. That allows the interpreting software to determine if it cares about the difference or not.

Also, the Unicode code tables do mention which characters look (nearly) identical, so it's definitely possible to make a program interpret something like a Greek question mark the same as a semicolon. I guess it's just that no one has bothered, since it's such a rare edge case.

[–] yum13241@lemm.ee 0 points 2 years ago (1 children)

Why are the Latin "a" and the Cryilic "a" THE FUCKING SAME?

[–] mrpants@midwest.social 1 points 2 years ago

In cases where something looks stupid but your knowledge on it is almost zero it's entirely possible that it's not.

The people that maintain Unicode have put a lot of thought and effort into this. Might be helpful to research why rather than assuming you have a better way despite little knowledge of the subject.

[–] HatFunction@lemmy.world 0 points 2 years ago* (last edited 2 years ago) (1 children)

This is completely unrelated to the meme at hand, but the title just reminded me that for a while, Merriam-Webster mistakenly included the word "Dord" to mean density - because an editor misread the entry for "D or d" as an abbreviation of density.

Wikipedia

[–] FlyingSquid@lemmy.world 1 points 2 years ago

I am regularly disappointed that the word games I play on my phone don't accept 'dord.' They should, damn it! One of them accepts Jedi, ffs!