4 ms·
Good, I hate ‘funny’ code. Just get to the point, I’m not here for someone’s notionally hilarious inside joke from 18 years ago.
by aaronbrethorst 1y ago
Good, I hate ‘funny’ code. Just get to the point, I’m not here for someone’s notionally hilarious inside joke from 18 years ago.
- girvo 1y agoAh I see you're one of those who would enable `UserManager.DISALLOW_FUN`! I personally quite enjoy a bit of whimsy in code. What we do (mostly) isn't that serious (modulo those, including me once upon a time, who work on literal life and death software)
- jrockway 1y agoI agree with you. The dinosaur game in Chrome is the classic example; turned off because schools threatened to not buy Chromebooks if kids could play a game in the browser. At least it seems to be a setting now, so your individual locality can decide if fun is allowed.
- joshstrange 1y agoThat’s quite different from what we’re talking about though. That’s adding games or fun into your product whereas in this specific sub-thread we’re talking about naming code concepts (functions, classes, variables, enums, etc) funny things.
- notpushkin 1y agoWhen you’re building an API, it is your product.
- potatolicious 1y agoNot to mention even just this article exposed a just-for-fun API that ended up having a negative effect and had to be removed: `isUserAGoat` ended up allowing any caller to determine if a specific app is installed on the system, which is a privacy violation and allows fingerprinting against the user's consent. I get the desire to make the job more fun than just implementing a spec, but many of the things we work on are very important and very complex, with oodles of real-world consequences. That unfortunately means everything we do has to be well-considered and not off-the-cuff.
- pineappletooth 1y agoWell it was not an issue back then since any app was able to query certain arbitrary specific apps (and yes some apps used to query a big list). They disabled the "fun" function in android 11 with the arrive of the QUERY_ALL_PACKAGES permission.
- nlnn 1y agoI don't mind either personally, but I've had a few occasions where such things have caused issues with engineers that didn't have English as a 1st language. A fair bit of time was wasted on trying to understand some joke/pun code and variable names, and on another occasion, spending the best part of a day working on something because they took some sarcasm in code/comments literally.
- nick__m 1y agoEnglish is not my native language yet I love pun and joke in doc. If those hypothetical developers are wasting time on this, maybe they should just get better at English because there are important nuances that will fly over theirs head.
- izacus 1y agoI think that's a big line between people who work as software engineers becuase they enjoy the work and want to build something and folks who go there to punch the ticket and run back home as soon as possible. The second group doesn't want to deal with "all the fun crap" and "distractions" that stand in the way of them marking a bug fixed (or, god forbid, actually getting extra bugs/work assigned because some "fun" code might break or cause confusion). As teams and companies grow, the second group usually outgrows the first and the first group moves on to reform into smaller teams working on something else again.
- sdeframond 1y agoThings that seem fun when they are written are often not much so a few years later, without the initial context, when trying to actually "build something". Fun is good when it is fresh. Fossilized fun is not that fun. It is more like that uncle who heavily tries to be fun at family parties.
- owebmaster 1y agoGoogle is not fun and people that try to be funny from Google are cringe
- salawat 1y agoThe young one speaks with enlightenment beyond their years. If only we could all be so blessed.
- thorin 1y agoHarking back to the days when people at Apple, Microsoft, Google and Bell Labs had fun. It really happened, allegedly!
- acheron 1y agoRight? I like jokes in programming. I do not like jokes coming from the evil dystopian megacorp that ruined the Internet.
- 1y ago
- ramon156 1y agoLive a little. When you've passed away, was all the seriousness paid off? That said, funny code should still work
- magospietato 1y agoThere's a middle ground for sure. I've left a few witty comments and loglines in my time. But I've also had to debug a Delphi unit which returned error codes inspired by the magical supercomputer Hex from the Discworld novels. "Divide by cucumber error" is not a decent enough representation of a module's internal state, no matter how funny you think you are.
- tikhonj 1y agoBut a wholly non-funny "Invariant Violated" message would be no better. The problem isn't that the message is funny, but that it does not contain the information you need to understand what's going on. The whimsy is just a distraction.
- eptcyka 1y agoDo you find that distracting things help you debug shoddy code?
- arccy 1y agoif "divide by cucumber" is a unique string in the code base, then yes?
- wiseowise 1y agoRight. And how many of those can your brain fit?
- maccard 1y agoDoesn’t matter. The important thing is that I can look them up or resolve them easily. Without looking it up can you tell me the difference between HTTP 451 and 510? If not they’re no more useful than I’m a teapot. But I can identify both of those uniquely and figure out where they’re coming from.
- joshstrange 1y agoI couldn’t agree more. I work in a codebase that has a handful of these “fun”-named functions/concepts and I hate it. It wasn’t funny the first time I came across it (just very confusing) and it’s not fun having to explain to new hires why a few things are named the way they are. It needlessly complicates reading/following the code. Even if you explain the naming back at where you define the function/variable it add an extra click-through/hover to read that and an extra translation you have to do in your head when you read the “fun” variable name in the future. One example is we have a flag called “dinnerbell”. What does that do? It tells the server receiving that flag to “come and get it”, “it” being the full data object instead of just getting a delta. It could have been called a whole slew of other things that would make more sense.
- dkersten 1y agoMe too. Professional code isn’t the right place to insert your personality or sense of humour.
- outime 1y agoIt's even worse when you stumble upon a repo with already poor documentation, only to find it filled with silly jokes e.g. "You thought this would be easy, right? Well, that's what X thought too, but..." yeah, leave the storytelling aside please.
- account42 1y agoYou can always ask for a refund.
- bmitc 1y agoI am in this camp as well. Even worse are cute error messages. If software actually worked, then I'd be fine with more whimsy. But it doesn't, so I'm not.
- doright 1y agoI remember when the Steam "login from a new computer" auth flow shoved a big "Hi there!" in user's faces the moment it blocked access to their entire online functionality until they left to get a code from their email and came back. Sometime later they removed it and now it's just "please look for the confirmation code sent to <address>". I think in the push to make computing "friendlier" by dressing up error messages, past a certain point they began to come off as condescending. I wish modern UX could focus on working for me instead of trying to be my friend all the time.
- account42 1y agoThe cute error messages are annoying because they hide what actually happened, not because they are trying to be funny. They are also usually not the result of a single developer's whimsy like a proper easter egg is so they end up being as "funny" as a shitty sitcom with a forced laugh track.