Sidebar

Programming Horror

programming_horror
Programming Horror JackbyDev 2 months ago 100%
Everything has admin access, a storytime post

I have no idea how to title this post. Oh well. A few years back I worked somewhere that had a large breach. Many practices changed in the wake of it. Developers actually had admin access prior to the change which was very nice. In an effort to restrict access but also let folks do their jobs they deployed some tool that would start all programs that "needed" admin access as an admin. This included cmd for the devs. So every time I opened cmd I had to be careful not to break something since there was no way to launch it *without* admin access after that change.

29
2
programming_horror
Programming Horror GregorTacTac 2 months ago 89%
Average CSS

cross-posted from: https://lemm.ee/post/36467447 > I am not allowed to credit the site that has this disaster. Its owner said "Nobody should see that"

51
2
programming_horror
Programming Horror drsensor 8 months ago 58%
`float` as table *id* https://twitter.com/lynxluna/status/1748636246455595478

![](https://programming.dev/pictrs/image/e76a4390-695e-4039-a21c-911b5a6d4509.png)

2
1
programming_horror
Programming Horror frozen 8 months ago 87%
Who needs a commit message, anyway? github.com

I was looking through various RCON tools and found this. Someone does *not* like commit messages. ![](https://lemmy.frozeninferno.xyz/pictrs/image/577f9a76-f491-4439-87f1-770e3936203c.png)

44
26
programming_horror
Programming Horror stale_cheetos 8 months ago 72%
Almost had to mark this one NSFW

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

8
5
programming_horror
Programming Horror blotz 8 months ago 96%
PSD is not my favourite file format. https://github.com/gco/xee/blob/master/XeePhotoshopLoader.m#L108

``` // 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. ```

72
4
programming_horror
Programming Horror Aatube 9 months ago 90%
Wikipedia's "official" newspaper's formatting

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

59
24
programming_horror
Programming Horror _brian 1 year ago 96%
my react frontend crashed with Segmentation faults

what do i do in this position ?

79
10
programming_horror
Programming Horror CannotSleep420 1 year ago 100%
UI from hell

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.

13
0
programming_horror
Programming Horror stratts 1 year ago 92%
SCSS nesting

* 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

11
2