this post was submitted on 21 Jan 2026
374 points (99.2% liked)

Programmer Humor

28738 readers
2439 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] joyjoy@lemmy.zip 40 points 4 days ago (9 children)

Why are you using Node.removeChild for? Are you trying to support a 13 year old browser? Switch to Element.remove

[–] bestelbus22@lemmy.world 71 points 4 days ago (6 children)

Lack of knowledge I guess. Which is why I like posting code on the internet. Thanks for the tip!

[–] callyral@pawb.social 8 points 4 days ago (4 children)

perhaps i too will post code on the internet

here is a shell script i wrote for automating filenames for markdown files (blog posts):

code

#!/bin/sh
set -e

datecmd="date +%Y-%m-%d"

if [ -z "$1" ]; then
  printf "Post title: " >&2
  read -r title
else
  title="$1"
fi

file="$($datecmd)_$title.md"

if [ -f "$file" ]; then
  printf "Error: post '$file' already exists.\n" >&2
  exit 1
fi

${EDITOR:-nano} "$file"

im not sure why i made it since i could just look at what date it is and write it down manually in the file name, but i felt like doing that as a quick hack

[–] timsjel@piefed.world 2 points 3 days ago

Here is my most recent script, not gonna lie, pretty proud of this bad boy. /s

shjava per/med/xwpp01 A001 conv.txt

echo 'yo'

shjava per/med/xwpp01 A002 conv.txt

echo 'yo'

shjava per/med/xwpp01 A003 conv.txt

echo 'yo'

shjava per/med/xwpp01 A004 conv.txt

echo 'yo'

shjava per/med/xwpp01 A005 conv.txt

echo 'yo'

shjava per/med/xwpp01 A006 conv.txt

echo 'yo'

shjava per/med/xwpp01 A007 conv.txt

echo 'yo'

shjava per/med/xwpp01 A008 conv.txt

echo 'yo'

load more comments (3 replies)
load more comments (4 replies)
load more comments (6 replies)