57
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 08 Nov 2023
57 points (93.8% liked)
Asklemmy
43752 readers
1898 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
My office at work has a number of mildly curious things decorating it. Nothing alarmingly strange, but silly all the same.
Our office is one of the few separated rooms in our building (most of it is a large open room), and it has a typical false ceiling covered in square foam tiles. Evidently, the previous tenant cut holes into several of these tiles to serve as drop points for cables that they had run through the ceiling. Prior to us moving in, they must've taken out all such equipment and, to restore the look of the main space, swapped out all damaged tiles with pristine ones from the ceiling in what would become our office. That means we have all of the ones full of holes. We also happen to be immediately below where the aircon is blown into the building (in short, the duct abruptly ends and vents directly into the cavity above the false ceiling, and no, I do not know why they did this), making our room exceptionally cold, to the point where we sometimes run space heaters in the summer. At one point, we jokingly hypothesized that the cold air was leaking through those holes in the ceiling tiles and making our room too cold, so as a joke solution, we crudely plugged the holes by stuffing them with random trash we happened to have lying around. That being, loose plastic bags from the gas station and grocery store, and some bulk toilet paper packaging wrap. Due to some of the bags being a burnt orange color, we came to refer to these eyesores as our "Halloween decorations". For over a year, we had several people enter the office, ask about the bags in the ceiling, and become bewildered at our assertion that they were Halloween decorations, particularly because it was June.
Our office has a tall, narrow window looking out into the main room next to the doorway. We usually have this decorated with those cheap gel letters designed to stick to windows and spell out generic phrases that you can pick up at dollar stores. We amuse ourselves trying to come up with clever anagrams with the available letters. Currently, we have a set that is intended to spell out, "hello spring", but is arranged to read, "no girls -- help".
On the wall in a cheap picture frame from Walmart is a printout of some of the dumbest code we've found in our repository (we're software developers), to forever enshrine it in infamy. Sometimes when deep in thought about a complex problem, we ritualistically gaze upon it in hopes of receiving a blessing of inspiration.
My coworker, with whom I share my office, has a very small mirror frame photograph standing on his desk, perhaps about 8cm tall by 5 cm wide. It portrays an image of Kim Jong Il and Kim Il Sung (this one, specifically). He refuses to elaborate why. Hiding behind the tiny print is another nearly identical tiny print of the same image, except he has photoshopped it to give both of them fatter bellies and put a large, cartoonish dent in each of their heads. At random intervals, he swaps the two prints when no one is watching to gaslight people who visit his desk.
Ooh, what's the code?
It's a simple function definition that's equivalent to:
Not the most original punchline; I'm sure you've seen it before. We were just baffled to actually see it in the wild.
Judging from the way this function was used, there no evidence to suggest it ever contained extra logic that was refactored out over time. I'm wholly convinced someone wrote this as-is and thought it was okay. I also knew that there's no way this was extracted for DRY purposes, as it was only called in one place, and the rest of the codebase was extremely allergic to DRY.
It was also formatted like complete garbage. Indentation level was not consistent line by line. And, presumably due to some carelessness handling line endings, the entire code file developed double-spacing. Somehow it was checked into version control in that state.
All these little nits, from the code's utter uselessness to its appalling formatting, compelled us to preserve it. It was like the entire rest of the shitty codebase in microcosm.
That's... incredible. If people who write code like that can get programming jobs, maybe I shouldn't be quite so worried about my own skills.
It's not usually where the big bucks are, but there is a nonzero amount of money in bad code.