this post was submitted on 28 Jan 2025
1667 points (99.6% liked)

Programmer Humor

20188 readers
1469 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
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 94 points 2 days ago
[–] [email protected] 75 points 2 days ago (8 children)

…and whoever decided a file system should be case insensitive by default, I hate you.

[–] [email protected] 25 points 2 days ago (5 children)

What's the use case for case sensitive file names

[–] [email protected] 4 points 2 days ago

Because I want to?

[–] [email protected] 66 points 2 days ago* (last edited 2 days ago) (3 children)

Well an uppercase ASCII char is a different char than its lowercase counterpart. I would argue that not differentiating between them is an arbitrary rule that doesn't make any sense, and in many cases, is more computationally difficult as it involves more comparisons and string manipulations (converting everything to lower case).

And the result is that you ultimately get files with visually distinct names, that aren't actually treated as distinct, and so there is a disconnect from how we process information and how the computer is doing it.

'A' != 'a', they are just as unequal as 'a' and 'b'

Edit: I would say the use case is exactly the same as programming case sensitivity, characters have meaning and capitalizing them has intent. Casing strategies are immensely prevalent in programming and carry a lot of weight for identifying programmers' intent (properties vs backing fields as an example) similar intent can be shown with file names.

[–] [email protected] 6 points 2 days ago (8 children)

Case insensitive handling protects end-users from doing "bad" things and confusion.

load more comments (8 replies)
[–] [email protected] 4 points 2 days ago* (last edited 2 days ago)

is exactly the same as programming case sensitivity

Me working on a case insensitive DB collation 🤡🚀🐱‍🏍

[–] [email protected] -1 points 2 days ago* (last edited 1 day ago) (2 children)

If I have four files, a.txt, A.txt, b.txt, and B.txt, in what order do they appear when I sort alphabetically?

edit: I don't understand why this was downvoted?

[–] [email protected] 4 points 2 days ago (2 children)
[–] [email protected] 3 points 2 days ago (2 children)

Why would you order lowercase before uppercase?

load more comments (2 replies)
[–] [email protected] 10 points 2 days ago* (last edited 2 days ago) (8 children)

A computer will spit out A, B, a, b

See also: ASCII chart

load more comments (8 replies)
load more comments (1 replies)
[–] [email protected] 18 points 2 days ago (1 children)

Think the other way around: What's the use case for case insensitive file names? Does it justify the effort and complexity for the filesystem and the programs to know the difference between lower and upper space chars?

[–] [email protected] 16 points 2 days ago* (last edited 2 days ago) (3 children)

What’s the use case for case insensitive file names?

Human comprehension.

Readme, readme, README, and ReadMe are not meaningfully different to the average user.

And for dorks like us - oh my god, tab completion, you know I mean Documents, just take the fucking d!

load more comments (3 replies)
[–] [email protected] 4 points 2 days ago
load more comments (1 replies)
load more comments (7 replies)
[–] [email protected] 60 points 2 days ago

Every fucking folder in the file share has one of these

[–] [email protected] 59 points 2 days ago (1 children)

I saw somebody with Nintendo .DS_store as a username

[–] [email protected] 8 points 2 days ago* (last edited 2 days ago) (1 children)
load more comments (1 replies)
[–] [email protected] 48 points 2 days ago

Found one of these in the firmware zip file of my soundbar today.

[–] [email protected] 24 points 2 days ago (4 children)

I am not exactly a programmer. What is the .DS_Store file for?

[–] [email protected] 35 points 2 days ago

Kind of a mac's version of desktop.ini. Remembers layouts and other metadata about a folder.

[–] [email protected] 36 points 2 days ago (1 children)
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 3 points 2 days ago (1 children)

fd -HI '^\.DS_Store$' $HOME -tf -X rm -v

[–] [email protected] 0 points 2 days ago (1 children)

find . -name “.DS_Store” -type d -exec rm -rf {} + -print

[–] [email protected] 3 points 2 days ago

That doesn't work, DS_Store are files not directories ( you need to use -type f).
An equivalent find command would be:
find "$HOME" -type f -name '.DS_Store' -delete -print
find takes a while; fd is way, way faster, but find is preinstalled, so there is that.

load more comments
view more: ‹ prev next ›