this post was submitted on 10 May 2026
2 points (100.0% liked)

Programmer Humor

31505 readers
2293 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 17 comments
sorted by: hot top controversial new old
[–] RustyNova@lemmy.world 1 points 1 week ago (1 children)

I think you got the wrong caption. It's the world if SQLite supported multiple concurent writes.

Stupid transaction deadlocks...

[–] irelephant@lemmy.dbzer0.com 0 points 1 week ago (1 children)

In my case, I want to use sqlite locally, for development, but I don't want to add a load of jank to handle booleans for sqlite.

[–] qevlarr@lemmy.world 1 points 1 week ago

This is sqlite's intended use case. To replace configure files and local data

[–] TootSweet@lemmy.world 0 points 1 week ago (2 children)
create table boolean (
  id integer primary key,
  name text not null unique
)
insert into boolean (name) values ('true');
insert into boolean (name) values ('false');
create table document (
  id integer primary key,
  name text not null unique,
  body text not null,
  is_archived not null integer,
  foreign key (is_archived) references boolean (id)
    on delete cascade
    on update no action
);

Solved.

Bonus: DBAs hate this one weird trick that can free up incredible amounts of disk space by deleting just two rows.

[–] Baizey@feddit.dk 2 points 1 week ago (1 children)

Would this make 0 = true and 1 = false?

[–] TootSweet@lemmy.world 2 points 1 week ago

You're right, that's way too simple. Definitely need to rotate the booleans daily. For... security. Yeah, security.

[–] folekaule@lemmy.world 2 points 1 week ago

That on delete cascade is evil. I love it.

[–] Hadriscus@jlai.lu 0 points 1 week ago (1 children)

What do you use instead of booleans ? floats ?

[–] MultipleAnimals@sopuli.xyz 1 points 1 week ago (2 children)

strings "true" and "false" ofc like any sane developer

[–] Hadriscus@jlai.lu 1 points 1 week ago (1 children)
[–] kubica@fedia.io 1 points 1 week ago (1 children)

it allows for mood changes, some parts of the code can check charAt(0) == 't'others can do val != 'false' just let it flow.

[–] Hadriscus@jlai.lu 1 points 1 week ago (1 children)

lord mary joseph make it stop

[–] sznowicki@lemmy.world 2 points 1 week ago

And for double fun if the output doesn’t matter you can make if endsWith(“e”).

[–] Valmond@lemmy.dbzer0.com 1 points 1 week ago (2 children)

I got a better one: O for true and N for false.

Seen in production for quite important stuff (payment requests).

O is from Oui, N from Non, of course!

😐🫤

[–] psud@aussie.zone 2 points 5 days ago

The system I work on uses "Y" and "N".

[–] felbane@lemmy.world 1 points 1 week ago (1 children)

This is awful and aweful at the same time.

[–] Valmond@lemmy.dbzer0.com 1 points 1 week ago* (last edited 5 days ago)

Non affective, non effective.