1
10
code golfing hurrah (kbin.melroy.org)
2
16
C++23 has fixed space! (kbin.melroy.org)
submitted 3 months ago* (last edited 3 months ago) by Aatube@kbin.melroy.org to c/programming_horror@programming.dev
3
1
float as table id (twitter.com)
submitted 5 months ago* (last edited 5 months ago) by drsensor@programming.dev to c/programming_horror@programming.dev

4
41

I was looking through various RCON tools and found this. Someone does not like commit messages.

5
6
submitted 5 months ago* (last edited 5 months ago) by stale_cheetos@sh.itjust.works to c/programming_horror@programming.dev

For those unfamiliar with JS: subValue (the first argument in the forEach callback) is the value contained at arr[index].

6
71
submitted 5 months ago* (last edited 5 months ago) by blotz@lemmy.world to c/programming_horror@programming.dev
// At this point, I'd like to take a moment to speak to you about the Adobe PSD 
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
7
61

Jesus Christ, just add an if statement for even or odd!

8
65
9
193
submitted 6 months ago* (last edited 6 months ago) by andioop@programming.dev to c/programming_horror@programming.dev
10
91
11
6
12
8

what do i do in this position ?

13
4
submitted 10 months ago* (last edited 10 months ago) by akash_rawal@lemmy.world to c/programming_horror@programming.dev
14
3
15
2
16
7
17
2
18
4
Very useful filtering (programming.dev)
19
6

no words

20
4
21
10
22
1
UI from hell (lemmygrad.ml)

This is more UX horror than programming horror, but this seems like the right community for this. I had to help make this shit.

There was a list of bank transactions that you could scroll through, and you could expand a transaction and change some of its details. If you change its category, a list of checkboxes will show up for applying the category change to other transactions that are similar. This list also was scrollable. There was a scrollable list inside a scrollable list. Neither of these scrollable lists had a scrollbar.

The button on the expanded transaction for saving the changes triggered not one, not two, but three API calls. Everything’s peachy if all the calls succeed or they all fail, but what do you show the user if it some fail and some succeed? Who the fuck knows.

23
9
24
2
25
3
SCSS nesting (programming.dev)
  • This file is over 20k lines long, and 400kB

  • It is nested over 10 levels deep in many places

  • There is no naming consistency. The original file used BEM, but now it switches randomly between whatever the devs felt like at the time. There are random contractions all over the place (eg, a parent container might have the class payment-items, but the children are p-item)

  • There is no style consistency. It switches randomly between kebab case, camel case, snake case, a mix of kebab and snake case (!!) or no case at all (just one long word with no separators). A parent element might use one case, but then the child element will use a different case for the exact same term

view more: next ›

Programming Horror

1634 readers
1 users here now

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there's also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @Ategon@programming.dev

Rules

Credits

founded 1 year ago
MODERATORS