this post was submitted on 22 Sep 2025
964 points (98.9% liked)

Programmer Humor

26551 readers
1741 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
[–] Korne127@lemmy.world 1 points 4 hours ago

Can't relate. I use shell all the time, and I always use spaces in file paths, especially to make sure scripts I make still work then

[–] quantenzitrone@lemmings.world 2 points 14 hours ago

i y'all just started using fish shell, you'd have proper shell completions and argument splitting that doesn't care about spaces in file names

[–] bob_lemon@feddit.org 10 points 1 day ago* (last edited 1 day ago)

My work has me working with Matlab Simulink paths, which may (and sometimes actually do) contain newlines.

[–] lengau@midwest.social 15 points 1 day ago

I very intentionally have all my code in Personal Projects 🥰 and Work Projects 🏦 directories so I can find bugs in the handling of file paths.

[–] kieron115@startrek.website 3 points 1 day ago

at least you/arent/using\ linux

[–] callyral@pawb.social 19 points 2 days ago (1 children)

not sure why the default behavior is this:

file\ name\ with\ a\ bunch\ of\ spaces

instead of this:

"file name with a bunch of spaces"

but you can just press " before pressing tab to auto-complete, and it will use the 2nd form

Because quoting requires token expansion (e.g. ~ to /home/you). Escaping gives you a much shorter path in that case.

That said I'm with you, full quoted paths read better to me.

[–] SpaceScotsman@startrek.website 57 points 2 days ago (1 children)

I\ don\'t\ know\ what\ you\ mean,\ I\'ve\ never\ encountered\ any\ annoyances.

[–] Routhinator@startrek.website 8 points 2 days ago* (last edited 2 days ago) (1 children)

'I don\'t know what you mean, I\'ve never encountered any annoyances.'

[–] gamma@programming.dev 6 points 2 days ago (2 children)

Single quotes don't allow any escaping in shell, you need

'I don'\''t know what you mean, I'\''ve never encountered any annoyances'

Or, in Zsh with setopt rcquotes:

'I don''t know what you mean, I''ve never encountered any annoyances'
[–] quantenzitrone@lemmings.world 1 points 14 hours ago

it works in fish

[–] Routhinator@startrek.website 6 points 2 days ago (1 children)

Oh right, good catch. That's me shell scripting while in a meeting. 🫠

[–] stefenauris@pawb.social 3 points 1 day ago

Good use of a meeting to be fair

[–] lemming741@lemmy.world 190 points 3 days ago (3 children)

Microsoft intentionally made programs install to C:\Program Files on Windows 95+ to force programmers to deal with spaces in filenames.

Someone make one of those "statements made by the utterly deranged" memes about it, please and thank you.

[–] lime@feddit.nu 75 points 3 days ago (10 children)

what is even more funny about this is that the name of that directory used to be locale-dependent, so in sweden it was just called "Program", completely nullifying that idea.

[–] jjagaimo@sh.itjust.works 58 points 3 days ago (2 children)

C:\Program Files

C:\Program Files (x86)

C:\ProgramData

[–] some_kind_of_guy@lemmy.world 50 points 3 days ago

C:\PROGRA~1

[–] BanMe@lemmy.world 42 points 3 days ago

The fucking parenthetical x86 absolutely kills me. I don't normally wish dick cancer on people,

load more comments (9 replies)
[–] sexy_peach@feddit.org 32 points 3 days ago

No this is just clever

load more comments (1 replies)
[–] zerofk@lemmy.zip 4 points 1 day ago* (last edited 1 day ago) (1 children)

Computers should just know when I want a space to be part of a file name, and when I want them to be argument separators. No more escaping or quoting.

load more comments (1 replies)
[–] sefra1@lemmy.zip 1 points 1 day ago

The number of keystrokes needed to type an underscore is the same that you need to type backslash space, so I don't see how underscores are in improvement

[–] IcedRaktajino@startrek.website 111 points 3 days ago (16 children)

I've recently learned that in Linux, you can use emois in filenames. I died a ~~little~~ lot inside when I learned that.

[–] FrostyPolicy@suppo.fi 78 points 3 days ago* (last edited 3 days ago) (5 children)

On Linux file systems you can use any character except NULL, and / is a reserved character.

E.g. on ext-4 "All characters and character sequences permitted, except for NULL ('\0'), '/', and the special file names "." and ".." which are reserved for indicating (respectively) current and parent directories."

[–] xthexder@l.sw0.com 55 points 3 days ago (8 children)

I once accidentally created a file with a newline character in it... it was pretty tricky to fix from command line.

[–] malware@lemmy.zip 82 points 3 days ago (3 children)
[–] tdawg@lemmy.world 65 points 3 days ago

Arrest this person

[–] voodooattack@lemmy.world 32 points 3 days ago (1 children)
[–] malware@lemmy.zip 24 points 3 days ago (2 children)

it was on accident, habibi, I swear 😁. I messed up some cmake code for preprocessing .txt ascii sprites into constants and accidentally created this abomination

load more comments (2 replies)
load more comments (1 replies)
load more comments (7 replies)
load more comments (4 replies)
[–] nialv7@lemmy.world 18 points 3 days ago (1 children)

unix filenames are just string of bytes, the operating system does not interpret it in anyway. this is a much saner approach compared to Windows where language settings can change file system behavior.

load more comments (1 replies)
[–] Gyroplast@pawb.social 22 points 3 days ago (3 children)

In filenames? AMATEURS! Use obscure Unicode in your passphrases for maximum security. Ctrl-Shift-U, enter arbitrary code point, bam! 🦊 Works even better with a Compose key and a nice, chonky .XCompose file to throw some gr∑∑k letters around, for instance, like some confused script kiddie. :)

On topic: There are multiple variants of spaces in Unicode. You're welcome, and now go and create something utterly deranged with that information.

load more comments (3 replies)
load more comments (12 replies)
[–] pineapplelover@lemmy.dbzer0.com 6 points 2 days ago (1 children)
[–] rumba@lemmy.zip 7 points 2 days ago

agreed, "still worth it"

I do, however, tend to keep spaces out of my folder names so i can just use quotes at the end.

/Images/Halloween/Projections/"Creepy Crawlies.mp4"

[–] bleistift2@sopuli.xyz 32 points 3 days ago (2 children)

Are you typing the whole filename by hand? Tab expansion exists, you know?

load more comments (2 replies)
[–] cupcakezealot@piefed.blahaj.zone 20 points 3 days ago (1 children)

the struggle between spaces in filenames look cute and oh fuck what's the code to reference a space in a filename in terminal?

[–] kamen@lemmy.world 10 points 2 days ago (4 children)

Just put the whole thing in quotes. You might have to escape extra sets of quotes, usually with a backslash.

load more comments (4 replies)
[–] notarobot@lemmy.zip 8 points 2 days ago* (last edited 2 days ago) (1 children)

Don't try svelte kit. This is pseudocode but it's valid. The only symbol show here that is not real is the / that I've placed at the end of folder to show that they are folders. There are other special cases

routes/
+page.ts
(admin)/
  +page.ts
  [user=uuid]/
    [[community]]/
      +page.ts
    posts/
      [...postIds@]/
        +page.ts
[–] dogs0n@sh.itjust.works 3 points 2 days ago* (last edited 2 days ago) (1 children)

sveltekit is beautiful (thanks for spreading the word)

[–] notarobot@lemmy.zip 3 points 2 days ago (1 children)

Im trying it out yet. It seems fun, the tutorial is amazing. I don't think I'd want to do large enterprise projects with it

[–] dogs0n@sh.itjust.works 2 points 2 days ago (1 children)

Have you noticed issues that you think would arrise at scale, etc for an enterprise project?

I'm using it for a small/medium sized project and it's great and has not got in the way once. Wondering how you feel, since I don't have experience with much enterprise code.

[–] notarobot@lemmy.zip 3 points 1 day ago

Oh. No. You win. Mine is a gut feeling that modeling all routes with folders would become a paid. To navigate and manage, while you have actual experience

[–] jbk@discuss.tchncs.de 8 points 2 days ago (5 children)

smells like skill issue tbh

tools which cant handle being installed/run on directories with spaces are so annoying

[–] vivalapivo@lemmy.today 8 points 2 days ago

tools which cant handle being installed/run on directories with spaces are unacceptably common

load more comments (4 replies)
[–] livingcoder@programming.dev 23 points 3 days ago (6 children)

Now I use lowercase and underscores everywhere.

load more comments (6 replies)
[–] AmazingAwesomator@lemmy.world 17 points 3 days ago* (last edited 3 days ago) (5 children)

i think i am old. i grew up using DOS, and really hated spaces in filenames and folders because they appreared truncated at the first space with a tilde and index of that file/folder representation.

ex: C:\folder name is bad\ == C:\folder~1

i hated that so much that when i got to windows 3.1 i refrained from using spaces (some command line was still necessary in w3.1)

i have jept that habit through the years, so when i moved from windoes to linux, my natural instincts of snake_case_folder_names made it so i didnt have to change : D

load more comments (5 replies)
load more comments
view more: next ›