Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "unreadable code"
-
Incompetent doesn't even start to describe this one:
1. Uses Google drive instead of an online repository for code sharing
2. Uses multiple files instead of version control
3. Preferred variable names like a, a1, b, temp
4. Didn't like "wasting" space. The result was unreadable unindented code
5. Would rather use deprecated HTML tags rather than proper CSS styling
He was more like the personification of bad coding practices8 -
That feeling: When you see a piece of code and you're like "I can do that in half the number of lines..."
And so you spend the next 45 minutes redoing something that was working perfectly.
Except now it's a convoluted and unreadable demon child that appears to writhe on the screen before your very eyes and cause madness and hatred in all who view it. But.. it works in 3 lines now instead of 7... and you don't need 4 of those local variables that you did before... and even though it's completely impractical because no sane mortal (including yourself - barely) can actually read it, it's still yours and you're proud of it.7 -
Screaming at a coworker?
The INTJ in me has prevented that pretty well in almost every critical devSituation.
BUT one time in the past, I was really close to a level 9001 scream:
This fucker, despite having been told about code formatting guidelines and DRY/KISS multiple times, had the balls to commit such utterly crappy and unreadable code that I almost bursted.
He quickly realized his mistake after I reset the repo to before his push, disabled his Gitlab account and wrote him a simple email containing the text:
"IF YOU EVER COMMIT SUCH SHIT AGAIN, THERE WILL BE UNFORESEEN CONSEQUENCES. GFYS."
After a peaceful coffee and a croissant I decided to re-enable his account. He did good after that.2 -
Hey Root, remember that super high-priority ticket that we ignored for five months before demanding you rewrite it a specific way in one day?
Yeah, the new approach we made you use broke the expected usecases, and now the page is completely useless to the support team and they're freaking out. Drop everything you're doing and go fix it! Code-complete for this release is tonight! -- This right after "impacting our business flow" while being collapsed on the fucking floor.
Jesus FUCKING christ, what the fuck is wrong with these people?
If I dropped the ball on a high-priority ticket for two weeks, I'd get fired, let alone for five fucking months.
If I was a manager and demanded a one-day rewrite I can only imagine the amount of chewing out I'd receive, especially on something high-priority.
And let's not forget product ownership: imagine if I screwed up feature planning for someone so badly I made them break a support tool in production. I'd never hear the end of it.
Fucking double standards.
And while I'm at it. Some of the code I've seen in this codebase is awful. Uncommented spaghetti, or an unreadable mess with single-letter variables, super-tightly coupled modules so updates are nearly impossible, typos in freaking constants added across sixty+ files, obviously-incorrect comments, ... . I'll have to start posting snippets to show them off. But could I get away with any of it? ha. Hell no. My code must be absolutely perfect. I hear about any and every flaw, doesn't matter how minor, and nothing can go out until everything is just so.
Hell, I even hear about flaws in other peoples' code during my code reviews. Why? Because I should have fixed it, that's why. But if I do, I get yelled at for "muddying the waters."
Just. JESUS FUCKING CHRIST.
It's like playing a shell game where no matter which shell I pick (or point to their goddamn sleeve where they're clearly hiding it), I get insulted for being so consistently useless, and god damn, how can I never find the fucking pea or follow the damned rules? I'm so terrible and this is why "nobody trusts me." Fuck you.
I'll tell you why I can't find your damned pea: IT'S RATTLING INSIDE YOUR FUCKING HEADS, you ASSHOLE FUCKING IMBECILES.
That's right: one pea among the lot of them.
goddamn I am fucking pissed off.rant drop everything and rewrite your rewrite oopsie someone else made a mistakey double standards shell game root can do no right root swears oh my8 -
Somewhere in a lonely break room
There's a guy starting to realize that eternal hell has been unleashed unto him.
It's two a.m.
It's two a.m.
The boss has gone
I'm sitting here waitin'
This desktop's slow
I am getting tired of fixin' all my coworkers' problems
Yeah there's a bug on the loose
Errors in the code
This is unreadable
Rubber ducky can't help
I cannot debug, my whole life spins into a frenzy
Help I'm slippin' into the programming zone
Git push to the prod
Set up a repo
My hard drive just crashed
All my code is gone
Where am I to go
Now that I've broke my distro
Soon you will come to know
When you need Stack Overflow
Soon you will come to know
When you need Stack Overflow
I'm falling down a spiral
Solution unkown
Disgusting legacy, ugly code
Can't get no connection
Can't get through to commit
Well the night weights heavy
On my confused mind
Where's the error on this line
When the CEO comes
He knows damn well
To keep his distance
And he says
Help I'm slippin' into the programming zone
Git push to the prod
Set up a repo
My hard drive just crashed
All my code is gone
Where am I to go
Now that I've broke my distro
Soon you will come to know
When you need Stack Overflow
Soon you will come to know
When you need Stack Overflow
When you need Stack Overflow
When you need Stack Overflow, a ha
When you need Stack Overflow
When you need Stack Overflow, a ha
When you need Stack Overflow
When you need Stack Overflow, a ha
When you need Stack Overflow
When you need Stack Overflow, a ha
When you need Stack Overflow4 -
Fuck regex and everyone who has ever endorsed the use of and/or is affiliated with regex.
It's unreadable, impractical, overly complex and complicated and it adds unnecessary clutter to your code, and your thought process.
It's 00:50 am and I just spent 3 hours debugging a regex only to realise forgot a single "?" in a 75+ character long string and I want to go to bed.13 -
Please Google, allow us to disable that retarded Google translate thing you've got going on the play store.
Seriously, 90% of the apps' short description are absolutely unreadable because they insist on translating it to my device's language even if no translating is available.
I know it's probably useful to some people (the ones who don't understand English but somehow understand the human language equivalent of spaghetti-code, which I suspect is not many), but this needs to be disable-able, it makes the experience of discovering apps extremely awkward.9 -
For me, the worst co-worker is one who works by the principle of quantity over quality or a person who thinks quick and ugly fixes are a valid way to solve problems. Also: If there are unittest, don't fucking dare to change or remove them, just so your code runs without errors.
But in general, I just can't work with people who don't really think about what they are coding, people who just code straight ahead without making the simplest plan about how to solve something. Most of these people realize too late, that their approach was rather shitty, unreadable and unmaintainable.
I often see memes about "I forgot what I coded last [insert timespan here]". Though it is kind of normal, if it takes you too long to find out what you wrote, you should consider overthinking your coding approaches.
Just my 50 cents.
Damn I miss coding... 4 weeks of learning & exams is too long...6 -
okay, i'm still a newbie to (unmanaged) C++, but looking at a colleague's code, what the hell is all this cryptic shit 😵 all this unreadable templating stuff + typedefs, 8 different copy operators in one class, i'm getting headaches just looking at it3
-
Making python 2x faster by replacing enums with literal values.
Pros, it's faster, cons, it's unreadable.
God I miss compiled languages. At least optimizing them requires intelligent problem solving.
It's a text parser state machine transition so it's a code hot spot, so this kind of optimization is worthwhile. But it's kinda annoying.
Next is get rid of any semblance of readability and replace the match with an array index...31 -
• Plan out everything by taking notes on the rough functionality of the project and how it could be done in a preferably simple way
• Writing code, but documentating it while doing so
• Also trying to write clean code so it can be more easily built upon
• Also keeping everything simple. If I'm using nasty, unreadable one-liners because of efficiency advantages, I'm putting a comment there for what could alternatively be used + explaining it
• Abandon it because side projects never get done1 -
Is it just the novice in me that finds the Haskell community's misguided obsession over character count really annoying? Learn You a Haskell For Greater Good states
> Shorter code means less bugs
A lot of people and resources seem to share this opinion, but it's obviously false. Simpler code means less bugs, but look at this function which just means "apply this applicative to each element of a list"
> sequence :: (Applicative f) => [f a] -> f [a]
> sequence = foldr (liftA2 (:)) (pure [])
This isn't "less buggy", it's fucking madness. The same in JS, the king of unreadable languages, would be:
function sequence(seq, val, apply = (f, x) => f(x)) {
seq.map(f => apply(f, val))
}
Seriously, how can you design a strictly typed language that gets beaten by JS in readability?16 -
Code comments #1: A way to document bad code that wasn't reduced to it's essentials and thus unreadable. Bad.
Code comments #2: A way to explain for non-programmers how the code works. Wrong place.
Code comments #3: Company policy. No one really knows why, but others do that, so we better do it to. The management sucks.
Code comments #4: Because some hip methodology/guru describes how to document code. After a few years, when the methodology has been (unofficially) forgotten, everyone still comments the code the same way. The old management sucked.
Code comments 5#: For insecure programmers who want to convince them self they understand the code they've written. Maybe apply at McDo?
Code comments #6: Some programmers are apparently paid by lines of code. Possibly understandable.
// Comments, anyone?8 -
Apparently `a || b` is unreadable to set a default value for a string in JS, but assigning temporary variables and use if statements all over is better somehow.
My code reviewer said use `a ? a : b` except it failed eslint, so he went back on that. (eslint suggested `a || b`, ffs.)10 -
(As a freelancer I was asked to do a couple of tasks on legacy code)
Let’s check this code, how bad can it be?
- all of the following: unreadable mess, no auto linting
- tests: some are there cause there’s not enough automation, others are poorly named
- frontend: somehow a genius made a react component for every variable in the store which only passes the variable to the child (wtf)
- backend: death by best practices
- ci/cd: “we have it but it’s broken”
Let’s fucking goooo 😎
Diagnosis: my therapist is getting rich
Chances to not cry tonight: close to zero
At least they pay well 🤷♂️5 -
Spaghetti Code, Spaghetti Code.
Flush it right down the commode,
Spins a call graph, unreadable size,
Anyone who sees it cries.
Look out, here comes the Spaghetti Code!2 -
I got a project to "refactor" some shitty site. It was written in nativ php. The guy who wrote this is a moron.
The site is so unsecure that my dog could broke into it while barking at cats.
It's sooo unreadable and illogical.
Every time i look at the code i get sadder and sadder. And now i understand why so many people hate php..
**Jump in time**
After i planned the new logic. My boss told me i can't do any of this. Because they only need a new user lever..
Now i just stare at this pile of horse sh*t and rant about it.4 -
So one of my clients got their wordpress site hacked and basically just redirects to scam links and well.. I looked at in the server file manager and their are like three directories with this wordpress site (not clones but the same?) one in the root, a version in a folder called old and another in temp.. with 3 separate wp databases.. DNS entries had malware redirects, the wp-content folder was writable to the public and contained a temp folder with tons of encoded malware and ip links to malicious sites.. there was encoded malware in index.php, has like 20+ plugins, oh and the theme uses a dynamic web builder so the code is basically unreadable in source and scattered.. and the redirects seem to happen randomly or at least on a new session or something. Oh.. and did I mention there are no backups? 😃2
-
Was exploring google foobar upon how it works and found out this strange
div:rhtext
wonder how they insert this code in html randomly.
xpath and ids are all obfuscated,unreadable6 -
Im forced to work with c++ on windows for a course.
0) c++ is fucking unusable without a central repo for managing dependencies. Maybe im just too used to maven but you shouldnt be downloading dll files in 2018.
1) visual studio can go suck a fat one. I got a fairly fast pc and it takes fucking forever to load anything. For comparison, eclipse with all my plugins (and i have a lot) loads in ~10 seconds, vs2017 does in 35.
2) why the fuck is there no cross platform compilation for c++? Its supposed to run on everything right? Whats so hard about porting a fucking linux compiler so i dont realixe i have .exe files when i want to work with my laptop on the bus?
3) c++17 (? Or whatevers the newest) syntax is like a deep barf on a hot summer day after eating a whole watermelon. Its fucking unreadable and autopointers simply dont work. And its not even my lack of skill this time, its the code that the other members used and it worked for half of them.6 -
Fun meeting ahead, coworker that writes unreadable code (and insists that it is the best code ever) is going to complain that nobody wants to work with him.4
-
How do you debate the "it's more complex in my opinion" statement?
So, some months ago I was looking at some code which has stuff as 300 lines of code function(s) and I could feel the bad smell irl...
I analyze it a bit and there is a lot of stuff which is misplaced, repeated or unsafe.
I first re-arrange it and remove redundancy, then break it down in about five functions (plus a caller), all is now readable and assignIcon k(made-up name) only assigns an icon, it doesn't also send a rocket in space.
But then I put the code in review and the previous author of the code says that it's now unreadable, because s/he has to look as multiple functions. I counter by showing how s/he does not need to read 300 lines of code to find a bug, but approximately 60, and I point at how misleading having an `assignIcon` function which also sends rockets in space is.
The counter? "But it looks confusing to have smaller functions, revert it."
How would you debate that? I am shy and hate myself a lot, so I have issues debating good points, but I am really really sure a lot of bugs I encountered were due to stuff like this so I would like to be able to explain my point in a more efficient way, for future teams.12 -
One of my favorite things to do in Secondary School was to go around telling people I had written a program that uses the 'Doomsday Algorithm' which sounded really cool and always scared those who didn't understand it.
Truth is, the 'Doomsday Algorithm' is just an Algorithm that used to determine the Day of the Week of a given date.
I wrote this when I was 13/14 years old and I'm still super proud of it today.... well I mean I probably would be if I could read my own code.1 -
//First rant
So I've been working trying to get a file exporter for a binary file format mostly reverse engineered - 2001 Super Monkey Ball 2 (GameCube) if anyone's interested.
Everything works fine, goals show up in the right places, wormholes work as intended, etc. That is everything, except every single level you create will be invisible, or crash (Depending on which version of Dolphin emu you use).
This happens whenever trying to specify object names for 3D objects. I checked, all the many offsets seem correct, Object names are correct. Tried both null terminated strings and fixed 80 character strings - nothing.
Some other guy also made an exporter that works, however the code is an absolute mess - basically unreadable. It also lacks some newer parts of the file spec, which is the main reason as to why I'm rewriting it.
And as I'm working with an almost entirely unheard of file format, there are few people to go to for help. The 2 I know who are also familiar with the LZ file format have no idea either...
Sigh.1 -
Had some fun with textgenrnn (Tensorflow text generating thingy on Github). So I created a tiny dataset with some example c# code and let it train for a while.
Sorry people, but I ruined our jobs. We don't need to write code anymore.
Update: image was unreadable due to compression. Let me find an alternative.7 -
Ordered some fucking computer glasses (which filter out the blue light). Been having red eyes and excessive fatigue these last months, plus sneaky headaches.
We're in 2018, and fucking delivery companies still think that people are at home waiting for their parcel. They came yesterday, fucking saw I wasn't there, they left a fucking delivery notice when my parcel does not require a signature!! I mean, what's the use of a P.O box if it's only there to host spiders in summer?
Plus on that stupid delivery note they've put a QR code - "please use the given code or scan this QR code to change your delivery options" - which is unreadable, AND they didn't give me the fucking code.
Be flexible for fuck's sake, and evolve with your time. I hate Slowtzerland for that - conservative, late, immuable. Especially in "social" services. 99% of the population is away from home from 6 to 18, time to fucking print that in your brain and get on with it.
Now I might wait until Saturday so I can get them glasses...5 -
Made a comparison of a rather large codebase that I did for a client before in flask to perl dancer2 and ror. Obviously the rails codebase is larger. The flask version remains as minimal as it once did, even considering blueprints and the dancer version is small but really expandable and powerfull. It has some great things, it was inspired by sinatra so it has that magical approach to doing things but the code is solid and easy to understand imho. They really make it towards perl code is not the unreadable codebase as it once was and the syntax just clicks. Even for its api capabilities it works amazing with the front end (Vue.js) and I can honestly say that I really enjoy it.
-
Ive got this colleague who knows so much about cloud services, networking etcetera, but 90% of the code he writes I have to rewrite in a way.
So many typos that classnames become unreadable and not understandable.
Small pieces of code that breaks so many other pieces of code.
And code which isnnt needed because it doesnt do shite. "o = (o==null?null: o)" (this is the exact thing he wrote (spacing included))
Sometimes it takes me 6 hours to find the source of an issue because he changed something. Everything I change I confront him about because they are things that can be avoided by rereading the code written.
Fucking doesnt wanna learn....4 -
My lovely team and I inherited a legacy app written in Angular 14.
We love it when we get fucked by Pajeets like this.
We love tons of `any`-s in the codebase.
We love unreadable code with 5 levels of nested ternary operators.
We love the lack of a README on how to actually build/start the app.
We love the outdated dependencies.
And we absolutely love it when you use a paid package that costs $1755.4 -
Python ecosystem drives me nuts!
Not the language tho, i kinda like it, and some features are damn straight awesome.
But ecosystem... man!
The way ppl write code in it, the lack of documentation (or in quality of it)...
I recently wanted to check how library does one thing (debug purposes), and not only i had to track some method up 3 classes, the other method i hunted only by signature and still i have no idea how it ends up being accessible where it should...
"Explicit is better than implicit" my ass...
Also dev managed to make the code very unreadable. In Python. Language with such strong opinions about code formatting. HOW ?!!
And the worst part is, it wasn't that big of a library and didn't really need the full freaking Enterprise OOP treatment with layers over layers of generally named classes and fucked up architecture.
FUCK THAT LIB, FUCK THAT DEV, FUCK IT ALL !!!
PS.
Project seems to be abandoned for a year or two, so there is hardly an option to fix things with the author sadly :(3 -
Monday morning: "Hey uuuh the client receives 3 mails instead of one and only one of them is good, there's a problem, go fix it"
Yesterday, me: - "Hey I've been looking everywhere, made hundreds of tests, there's a problem with the files attached to the mail, they're unreadable"
-" I told you it's in the code, you didn't look deep enough"
This evening: "Umm it seems that there's indeed a permission issue. So I'm gonna rollback everything you've done since Monday"
One year. One year and I live this hell. -
Most of my private code is created in the evening hours and after one to two beers, so I got that covered pretty well - though if you want to see what happens if you code literally shitfaced, just go play Mafia 3. That deterred me from trying.
The one thing I did at a party was fix a computer after (I think) 4 beers. Apparently I got it together because the sounds worked after that, but don't ask me how. Besides, it had OSX, I usually avoid that thing like the plague. I guess getting drunk means I can handle even that shit.
1-2 Beers is the max I still can code (or properly think) with. Any more and I can't get a single line out.
Worst thing I tried was coding high. I was on a short trip to Amsterdam and a friend of mine brought on some White Widow...
Yeah, I could focus alright... The code worked and the program was done in two hours (It was an exploit for... well, lets not get into details here).
When I reread the code while not high anymore, it might as well have been binary (it was Python). I could, for the life of me, not figure out what the hell I had been writing there or how/why it worked - but it did its job.
Never again. I mean, WW is my favourite and I hear a lot of artists use it to enhance their "flow" when creating art...
I guess it makes sense to code on that, but I generally try to avoid flow when coding - it makes you produce unreadable and unmaintainable code.1 -
"A programmer was arrested for writing unreadable code. He refused to comment."
H/T: (@Mr_Drinksonme)1 -
think the downside to rust is safe is holy shit I haven't even seen passable code
everybody shits on JavaScript developers but I think their code quality is obviously better (cuz otherwise if you make it unreadable or a mess there's no debugging that)
the problem with rust is it's safe so you can write the dumbest shit and if the compiler says it works then it works so you just keep it there
over and over I just see this
90% of this codebase is literally useless moves and abstractions that you could've cut out
to be fair I'm only now learning how to reduce clutter in rust (but I do have literal brain damage)
but I'm not sure I've ran into a codebase not suffering from this
also on the other hand it inspires me to care as little as these guys. the bar is so low you can just ignore the bar. one of us, one of us, one of us. if it compiles it is production ready, ayyo2 -
Reading code takes time!
Everytime I read:
"var" or "auto" Add: 10s
- Just use the type
Everytime I read:
if(Expression1 && Expression() ? GetNumber() : 0 > 0) Add: 30s
- Just write two if statements or create two bools the line above.
Everytime I read:
delegate = () => {} Add another 5 minutes of reading time.
- Just write a separate function for it. It helps with searching and understand what it does
Please code like the person that needs to check your code or change it just knows basic coding skills and logics.
I do know all these concepts I just never use them because it makes the code unreadable. hard to follow, mistakes that can happen everywhere. difficult to search.
And it frustrates that I need to read 10 extra lines to understand code flow or hover my mouse in an IDE to figure out what type object it is.
It's properly just me... I just like clean readable code. that is logical and failsafe and strict and deterministic with its behavior9 -
Being victim of an arbitrary worplace's culture on dev experience and documentation makes me a very frustrated dev.
Often I do want to document, and by that, I don't mean laying an inline comment that is exactly the function's name, I mean going full technical writer on steroids. I can and WILL get very verbose, yes, explaining every single way you can use a service - no matter how self explanatory the code might look.
I know developers (and me included) can, and sometimes will, write the best variable and function names at the time, wondering if they reached the peak of clean, DRY code that would make Robert Martin have a seizure and piss himself, only to find weeks later after working on something else that their work is unreadable. Of course.
I know the doc's public, it's me, and I've done this.
But then again explain for the people in the back how the FUUUUCK are we meant to suggest improvements, when we are not the ones who are prioritising features and shit WITH the business?
Just email me when the fucking team recycles, and no new team member knows how to even setup the IDEs because this huge piece of monumental shit called CompanyTM is also run by VPN. Fuck, no one wants to access that garbage, you have no docs.
I once tried setting up a culture for documentation. I did an herculean amount of work studying what solutions were internally homologated, how steep the learning curve would be from what we had at the moment (NOTHING, WE HAD FUCKING NOTHING, jesus christ, I even interviewed SEVENTEEN other squads to PROVE they FUCKING NEED
DOCS
TO WORK
You know what happened to that effort?
It had a few "clap" reactions on a Teams meeting and it never reached the kanban.
It didn't even made it to backlog.
I honestly hope that, someday, an alien fenomenon affects the whole company, making their memories completely reset, only to have the first one - after the whole public ordeal on why our brains became milkshake -, to say: "oh, boy, I wish we had documented this".
Then I will bring them to the back and shoot them. -
We have 4k Monitors and SSDs with more than 120 GB, why there are still new projects that use a formatting style that doesn't have a clear relation of the opening { and corresponding closing }. i.e. put them either on the same line or column?
Please don't write code where the imaginary line between the { and } goes diagonally over other parts of the code. It makes it unreadable and my brain hurts from looking at it. Its better to have readable code and "waste" some lines and bytes for code that is easier to read.10 -
Me: "ok let's have a look at this code I have to review ..."
try
{
* Some random unreadable overcomplicated shit code *
}
catch (Exception e)
{
// Useful for debug
}
😓
In which God forsaken crazy alternative universe, a "catch all" block that swallows the exception and does nothing else is even slightly close to the concept of "useful for debug"3 -
I hate arrow functions in ES6! Whenever I see them, I get acute code dyslexia and can't read shit. What the fuck is wrong with writing function, why change it for some unreadable series of symbols?10
-
What's your opinion on functional shortcuts and 'hacks' in many languages, like map/reduce/filter, ternary operator, lambdas,inner/anonymous classes?
Imo they can make development faster and more efficent but they make the code very unreadable, especially if someone else has to read it, Therefore I try to use them only when it's appropriate. My dev friends use them too much and it makes reading their code a hellish experience, especially in Javascript with Rx.3 -
How to deal with "Code Nazis" ?
Don't know how you call this guys that see each and every PR as a possibility to annoy everyone else
Team of 4 Devs, all with lots of experience
But there is a special one, that spams each PR with an incredible amount of comments
Most of them are non-sense like "formatting of comments" or "inlining things makes everything unreadable" or "call this variable this and that" although a reasonable name was their
Rest of team including myself is pretty pissed of by him
How to get over that?5 -
Ok. I'm working on a small website, and MOTHER OF OF WEB DESIGN.
I try to set up WAMP, but it takes me 2 F-ING DAYS.
SO THEN THE FREAKIN HTML SCRIPT REFUSES TO WORK. AND THEN, ONCE I FINALLY GET MY HOPES UP, WAMP DECIDED TO JUST NOT WORK TODAY, SO I SPEND 3 HOURS FIXING THAT CRAP, AND THEN AFTER THAT PIECE OF HELL, I CAN'T FIND ANY EXAMPLE CODE OUTSIDE OF ADVANCED WEB DESIGN, SO I SIFT THROUGH THAT, JUST TO FIND HOW TO MAKE IT UNDERSTAND WHAT THE HELL A DATABASE IS. THAN I REALIZE THAT I HAVE TO INSTALL MIRE PROGRAMS. THAN, I REALIZE THIS GUY IM LISTENING TO IS USING A MAC OS X ALTERNATIVE. SO IM DESPERATELY TRYING TO GET THIS TO WORK. AND THEN, *POOF* ALL MY WORK IS UNREADABLE SPAGHETTI.
ALL FOR A DAMNED TEST.
TL;DR, Php is not good if your working offline.9 -
I'm too embarrassed to show my team leaders code to other developers..
unreadable, no tests, parameters hardcoded..
But managers want to "help him grow"..
When do you decide you can't fix a lemon?4 -
Oh the joy of multi-site working and design reviews in bigger corporations...
I try to propose if we could do it on-line with BitBucket commenting etc. Just put your comments there, we discuss it there, each in our own time, and get things closed.
But no. It's nicer to arrange 2-3h conf calls. So that we can really discuss items (and the reviewers don't have to do anything before the call). Nothing can be done beforehand. And the reviewers get to comment not only on design matters, but on system level things too. Like "I wonder if this would be better in place X". Well sure, maybe, but that's system level decision and would require architects etc. And all that work was done 2 years ago, we're supposed to now just check the source code (which you guys wanted me to change).
Ok, so I will arrange a conf call. Our time zones are not the same, so one guy is coming to the office when another is almost leaving. One wants to have Wednesdays meeting free. One has lunch at 11, another at 13. For fucks sake. Some guys have filled their calendar with meetings, most of them which they will not attend anyway, but Outlook shows them as "reserved".
So I spend my day trying to find a free spot that everyone could join. Half of the guys won't read the code and won't give any comments, but still need to be there. And then there are those comments saying "I'd like this variable name to be different" and "it would be cleaner if this was done like I do". Same people produce unreadable mess themselves, but somehow always manage to dodge all reviews of their own stuff. -
Imagine filling 50 files full of garbage unreadable code to build what is essentially a cron job microservice...
Oh we have a console program
then a module to pull in all the services
then a manager to manage the actual jobs
then if they fail it all cascades back up
My god, this isn't NASA.
The amount of overengineering I have seen in the past few hours is insane.
Keep It Simple, Stupid!!!2 -
Sydochen has posted a rant where he is nt really sure why people hate Java, and I decided to publicly post my explanation of this phenomenon, please, from my point of view.
So there is this quite large domain, on which one or two academical studies are built, such as business informatics and applied system engineering which I find extremely interesting and fun, that is called, ironically, SAD. And then there are videos on youtube, by programmers who just can't settle the fuck down. Those videos I am talking about are rants about OOP in general, which, as we all know, is a huge part of studies in the aforementioned domain. What these people are even talking about?
Absolutely obvious, there is no sense in making a software in a linear pattern. Since Bikelsoft has conveniently patched consumers up with GUI based software, the core concept of which is EDP (event driven programming or alternatively, at least OS events queue-ing), the completely functional, linear approach in such environment does not make much sense in terms of the maintainability of the software. Uhm, raise your hand if you ever tried to linearly build a complex GUI system in a single function call on GTK, which does allow you to disregard any responsibility separation pattern of SAD, such as long loved MVC...
Additionally, OOP is mandatory in business because it does allow us to mount abstraction levels and encapsulate actual dataflow behind them, which, of course, lowers the costs of the development.
What happy programmers are talking about usually is the complexity of the task of doing the OOP right in the sense of an overflow of straight composition classes (that do nothing but forward data from lower to upper abstraction levels and vice versa) and the situation of responsibility chain break (this is when a class from lower level directly!! notifies a class of a higher level about something ignoring the fact that there is a chain of other classes between them). And that's it. These guys also do vouch for functional programming, and it's a completely different argument, and there is no reason not to do it in algorithmical, implementational part of the project, of course, but yeah...
So where does Java kick in you think?
Well, guess what language popularized programming in general and OOP in particular. Java is doing a lot of things in a modern way. Of course, if it's 1995 outside *lenny face*. Yeah, fuck AOT, fuck memory management responsibility, all to the maximum towards solving the real applicative tasks.
Have you ever tried to learn to apply Text Watchers in Android with Java? Then you know about inline overloading and inline abstract class implementation. This is not right. This reduces readability and reusability.
Have you ever used Volley on Android? Newbies to Android programming surely should have. Quite verbose boilerplate in google docs, huh?
Have you seen intents? The Android API is, little said, messy with all the support libs and Context class ancestors. Remember how many times the language has helped you to properly orient in all of this hierarchy, when overloading method declaration requires you to use 2 lines instead of 1. Too verbose, too hesitant, distracting - that's what the lang and the api is. Fucking toString() is hilarious. Reference comparison is unintuitive. Obviously poor practices are not banned. Ancient tools. Import hell. Slow evolution.
C# has ripped Java off like an utter cunt, yet it's a piece of cake to maintain a solid patternization and structure, and keep your code clean and readable. Yet, Cs6 already was okay featuring optionally nullable fields and safe optional dereferencing, while we get finally get lambda expressions in J8, in 20-fucking-14.
Java did good back then, but when we joke about dumb indian developers, they are coding it in Java. So yeah.
To sum up, it's easy to make code unreadable with Java, and Java is a tool with which developers usually disregard the patterns of SAD. -
Nothing like trying to understand a single 1500-line source file that implements the API usage in the frontend. Without a single comment.
No, wait. There are comments! But it's only commented-out code. Or explicit shit (like "gets the version" before a getAssetVersion function).
Functions with unused parameters? ✅
Weird var names (like "tmpX")? ✅
`console.log(var)` everywhere? ✅
Long-ass lines with 150+ chars? ✅
Duplicate code? ✅✅
Not a single interface was used so everything is var: any? ✅
Random unreadable RegEx? ✅
If-chains of 6+ more levels? ✅
Many `else if` towers instead of a switch? ✅
And did I mention it was written by a fucker who can't speak proper English so shit like visiable, cataloge and isExist is everywhere? Yeah.
Fun day at the office reading spaghetti code 🙃 -
First rant ever:
So I occasionally have to work for managers who say things like: "Don't reformat that code, the diff will look confusing in our repo browser". Said with such conviction that they initially made me feel retarded when I was more junior.
As time went on I realized that if we tried to "preserve" code so that the only changes visible were those that resulted in functional changes to our app, our code would eventually degrade into a steaming pile of unreadable piss.
I thankfully am working for a more technical manager at the moment so I don't have this issue and can make small refactors to make the codebase less gagworthy as I go.
I don't know though, maybe I'm wrong. Thoughts?2 -
!rant
When I discovered the usage of (statement) ? : after two years in programming school, I feel like an explorer landing on a new continent.
It looks so much more like the cool hacker code from television. I can use it as a parameter for function calls.. and everywhere else.
But it makes my code unreadable.
But it's new and fancy.
But unreadable..
What should I do?3 -
For donkey, one can argue that WordPress is great, but for the developer, it really sucks. Customize it, feels like your soul tormented in eternal hell with its spaghetti code and unreadable variables.
-
After trying to print colored text to the console using a portable Python 3 interpreter on Windows I came up with a "solution". I tried pretty much everything possible (I could think of): curses couldn't be loaded, ansi didn't work and installing libraries wasn't really an option, because it's not my device. Fuck portable interpreters and have fun with the "solution".
Def color_print(text, color):
text = text.replace("\n", "\\\" \\\"")
os.system ("powershell \"$host.ui.RawUi.ForegroundColor = \\\"" + color + "\\\"; echo \\\"" + test + "\\\"; $host.ui.RawUi.ForegroundColor = \\\"Gray\\\"")
It's slow, unreadable, only works for on Windows and requires powershell and is probably the worst piece of code I ever wrote, but it works 👍.2 -
This guy was giving an introductory course on Big Data one year, was boring as f, came in class with unreadable 80 slides presentations, asked us to re-code one of the assignment he gave us for the term exam. I went to two of his classes and still rocked the assignments, flunked the exam tho.
-
Hello folks.
This is my first rant ever here, although it may not be a 'standard' one. Am I the only poor soul who finds Java Enterprise annotations (the fucking @DoSomething) the zenit of antiesthetic and unreadable code?
I fear I may be alone in this battle.2 -
[CONCEITED RANT]
I'm frustrated than I'm better tha 99% programmers I ever worked with.
Yes, it might sound so conceited.
I Work mainly with C#/.NET Ecosystem as fullstack dev (so also sql, backend, frontend etc), but I'm also forced to use that abhorrent horror that is js and angular.
I write readable code, I write easy code that works and rarely, RARELY causes any problem, The only fancy stuff I do is using new language features that come up with new C# versions, that in latest version were mostly syntactic sugar to make code shorter/more readable/easier.
People I have ever worked with (lot of) mostly try to overdo, overengineer, overcomplicate code, subdivide into methods when not needed fragmenting code and putting tons of variables.
People only needed me to explain my code when the codebase was huge (200K+ lines mostly written by me) of big so they don't have to spend hours to understand what's going on, or, if the customer requested a new technology to explain such new technology so they don't have to study it (which is perfectly understandable). (for example it happened that I was forced to use Devexpress package because they wanted to port a huge application from .NET 4.5 to .NET 8 and rewriting the whole devexpress logic had a HUGE impact on costs so I explained thoroughly and supported during developement because they didn't knew devexpress).
I don't write genius code or clevel tricks and patterns. My code works, doesn't create memory leaks or slowness and mostly works when doing unit tests at first run. Of course I also put bugs and everything, but that's part of the process.
THe point is that other people makes unreadable code, and when they pass code around you hear rising chaos, people cursing "WTF this even means, why he put that here, what the heck this is even supposed to do", you got the drill. And this happens when I read everyone code too.
But it doesn't happens the opposite. My code is often readable because I do code triple backflips only on personal projects because I don't have to explain anyone and I can learn new things and new coding styles.
Instead, people want to impress at work, and this results in unintelligible, chaotic code, full of bugs and that people can't read. They want to mix in the coolest technologies because they feel their virtual penis growing to showoff that they are latest bleeding edge technology experts and all.
They want to experiment on business code at the expense of all the other poor devils who will have to manage it.
Heck, I even worked with a few Microsoft MVPs.
Those are deadly. They're superfast code throughput people that combine lot of stuff.
THen they leave at you the problems once they leave.
This MVP guy on a big project for paperworks digital acquisiton for a big company did this huge project I got called to work in, which consited in a backend and a frontend web portal, and pushed at all costs to put in the middle another CDN web project and another Identity Server project to both do Caching with the cdn "to make it faster" and identity server for SSO (Single sign on).
We had to deal with gruesome work to deal with browser poor caching management and when he left, the SSO server started to loop after authentication at random intervals and I had to solve that stuff he put in with days of debugging that nasty stuff he did.
People definitely can't code, except me.
They have this "first of the class syndrome" which goes to the extent that their skill allows them to and try to do code backflips when they can't even do code pushups, to put them in a physical exercise parallelism.
And most people is like this. They will deny and won't admit, they believe they're good at it, but in reality they aren't.
There is some genius out there that does revoluitionary code and maybe needs to do horrible code to do amazing stuff, and that's ok. And there is also few people like me, with which you can work and produce great stuff.
I found one colleague like this and we had a $800.000 (yes, 800k) project in .NET Technology, which consisted in the renewal of 56 webservices and 3 web portals and 2 Winforms applications for our country main railway transport system. We worked in 2 on it, with a PM from the railway company.
It was estimated 14 months of work and we took 11 and all was working wonders. We had ton of fun doing it because also their PM was a cool guy and we did an awesome project and codebase was a jewel. The difficult thing you couldn't grasp if you read the code is if you don't know how railway systems work and that's the only difficult thing.
Sight, there people is macking me sick of this job11 -
Should I be bothered if I have added 200 lines of badly written code to my Android project (which had readable, organized code before) to make it almost unreadable? BTW the app's memory usage is still low like before.3
-
stateless design is another part of programming or web development i haven't quite been able to grasp fully, I understand what it is and its capabilities but I cant seem to.... say "hey to implement stateless design on project xyz that is an actual project will real life usage, this is how to go about it" it's easy to build any web app like a story or like a building, from the ground up and roof, but what about a webapp that has really unpredictable data and is very fluid that the ui just moves around and adapts to whatever data is thrown at it, as long as the data makes sense and is applicable to be situation on ground, you can't just build such a ui from the ground up from a template, you'll end up with a lot of if elses until the code is bloated and probably unreadable,
there has to be common sense in what I'm trying to say, maybe I'm not using the right words10 -
Python's wonderful `reduce` for the win. Using it makes you feel like a FP pro, but also makes code really unreadable sometimes. (Sigh)
-
Looking back at the VBA code I wrote for work about 10 months ago makes me realize how much reading the Clean Code book by Robert C. Martin did for me, because holy shit my old code is unreadable...2
-
you either get unreadable rust code or 7 layers of misdirection so that the compiler can work around keeping track of lifetimes
I mean maybe I'm too opinionated about readability. technically the computer can read it so people should just get good I guess -
Diesel is an incredibly beautiful ORM, but the size of the DSL means that despite Rust's state-of-the-art IDE integration I'm back to editing code, waiting for it to compile (as soon as I stop typing) and changing random shit if there are red squiggles.
The error messages are totally unreadable, all in-code references point me to meaninglessly generic abstractions, and a good portion of the impls are generated by macros so I can't even look at an actual final definition.
The confidence that if it compiles it'll run is stil there, but nothing else.11 -
Am i the only person who hates reactjs so much?
Jsx , so much nesting, unreadable code. U need to create lots of components and reinvent the wheel everytime u need to add a litle tiny feature. No global logic (controller)
Raaaaah what a mess...4 -
I'm working in a project that seems to be like a Multiplayer Tetris of Little Poo:
- figure out what the heck you have to code, because there is no debugging, the deploy to your devenv takes ages, the documentation does not exist or is unreadable, plus you are new and you are in a different timezone
- once you have your code, slowly pass the reviews of your remote team that will complain for every little extra line you've added for readability, slowly converting your code into a poo-like form, until it is completely shaped as shit
- repeat steps 1-2 until you pass the linter
- the carefully place your shit-shaped-code in the right place of the pile of shit
- wait for someone else to complain (like 'please rebase' 'new lint rule please fix' - oh, did I mention that? lint rules do not match between local, review and deploy?
- repeat from step 1 until you quit your job (which will happen in a few weeks) -
In comes the new developer messing the repository with unreadable two space indentation in our backend codebase. I can understand it being useful to keep code within the horizontal editor "viewport" for stuff like JSX, but otherwise it's really fucking ugly and feels like the code is not indented at all
We're not using any tools for automatically standardizing code style yet, what do you recommend? If it's at all relevant, our codebase is in TypeScript.5 -
Since my internship, I've been working for a startup, but my contract's job description is so ambiguous that it doesn't mention what programming language I'll be responsible for (I'm not sure whether other normal large company do), so there's nothing wrong with assuming the company wants me to wash toilets someday. Also, I don't enjoy not having seniors in my field advise me on the best/professional way to do things, so I've been self-taught online and am free to do my work my way (which is probably me coding some very bad/unreadable code that I'm not even aware of).
Until then, my primary job had been to develop Flutter app. Recently, the company has been doing some development, and I was forced to do Swift programming, which I had never done before, and I needed to migrate the coding of an iOS app that my senior had programmed into a MacOS app, but my senior's programming is extremely difficult to read, with no comments, and I was disgusted!
By the way, isn't it true that Swift programmers are usually better paid? So wouldn't I be taken advantage of by the company because I didn't even get a raise for switching to Swift programming?
First time I am posting my rant here, thanks for watching!4 -
rant.author != this
Christ people. This is just sh*t.
The conflict I get is due to stupid new gcc header file crap. But what
makes me upset is that the crap is for completely bogus reasons.
This is the old code in net/ipv6/ip6_output.c:
mtu -= hlen + sizeof(struct frag_hdr);
and this is the new "improved" code that uses fancy stuff that wants
magical built-in compiler support and has silly wrapper functions for
when it doesn't exist:
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it.
The code could *easily* have been done with just a single and
understandable conditional, and the compiler would actually have
generated better code, and the code would look better and more
understandable. Why is this not
if (mtu < hlen + sizeof(struct frag_hdr) + 8)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);
which is the same number of lines, doesn't use crazy helper functions
that nobody knows what they do, and is much more obvious what it
actually does.
I guarantee that the second more obvious version is easier to read and
understand. Does anybody really want to dispute this?
Really. Give me *one* reason why it was written in that idiotic way
with two different conditionals, and a shiny new nonstandard function
that wants particular compiler support to generate even half-way sane
code, and even then generates worse code? A shiny function that we
have never ever needed anywhere else, and that is just
compiler-masturbation.
And yes, you still could have overflow issues if the whole "hlen +
xyz" expression overflows, but quite frankly, the "overflow_usub()"
code had that too. So if you worry about that, then you damn well
didn't do the right thing to begin with.
So I really see no reason for this kind of complete idiotic crap.
Tell me why. Because I'm not pulling this kind of completely insane
stuff that generates conflicts at rc7 time, and that seems to have
absolutely no reason for being anm idiotic unreadable mess.
The code seems *designed* to use that new "overflow_usub()" code. It
seems to be an excuse to use that function.
And it's a f*cking bad excuse for that braindamage.
I'm sorry, but we don't add idiotic new interfaces like this for
idiotic new code like that.
Yes, yes, if this had stayed inside the network layer I would never
have noticed. But since I *did* notice, I really don't want to pull
this. In fact, I want to make it clear to *everybody* that code like
this is completely unacceptable. Anybody who thinks that code like
this is "safe" and "secure" because it uses fancy overflow detection
functions is so far out to lunch that it's not even funny. All this
kind of crap does is to make the code a unreadable mess with code that
no sane person will ever really understand what it actually does.
Get rid of it. And I don't *ever* want to see that shit again. -
I know there is this huge argument about whether to use tabs or 4 spaces and while I'm on neither side, just sitting there using tabs, in this new project I'm FORCED to use a 1 space indentation and no line breaks in Android layout XML files format.
I sat there for about 10 minutes trying to wrap my head around d this absurd specification they agreed upon with the client. The code looks SHIT and every time I copy some beautifully formatted reference code into this project it turns into a piece of unreadable garbage.
But since I'm just a part-timer and the senior developer working on this project for some years now is much more experienced than me, I'm hesitant to criticise it more than I already did.
Maybe I'll start arguing with industry standards and the improvement for new developer to read our code...