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 - "this is why i code"
-
Client: we need you to give us access to the code ASAP. We don't like this black box approach.
Me: You have always had access to the code. It is here on this bitbucket repo and your usernames have admin access.
Client: We want the code moved to our GitHub before EOD.
I check out how to move repos over and it's fairly easy.
Me: just give me access to create a repo on your GitHub account and you can have the code moved over.
Client: Sorry it's late in the day and we stepped out to get drinks. (It was 2:30 pm). Not sure why you think there is a rush on this, we'll handle it first thing next week.
Me: WTF14 -
Modern web development is fucked. Just absolutely, totally screwed up.
I want to create a simple to do list web app. Look for a tutorial: "OK guys, this is really easy, it just takes five minutes."
First step, install these:
- Git
- NPM
- NodeJS
- Express
- MongoDB
- Docker
- React
Second step, npm install about one million modules. Don't question what they do or why they're there.
Before you know it, six hours have passed and you've got a code base of 3GB and you haven't even _started_ on your app.
FUCK that shit! I can create this web app with Internet Explorer and Notepad.49 -
There should be a communist programming language.
- There are no classes.
- There is no inheritance.
- All code is executed simultaneously, since it's equal.
- All variables are global, since everything belongs to everyone
- There are no private functions
- Every function must have side effects, for the 'greater good'
- As soon as it is written, you no longer own the code
- Instead the code owns you
- And your machine
I slowly get why this thing didn't work out on society either.9 -
Me: *uses HashMap* for a problem to count some elements*
Lecturer: why are you using HashMap?
Me: it's the best way of solving the problem
Lecturer: I haven't explicitly taught you what a HashMap is so why are you using it?
Me: Because I learn outside of what university teaches me
Lecturer: there's another way to do this
Me: enlighten me
Lecturer: iterate through the array using a nested for loop and count as you go along
Me: why the hell would I want to do that? That literally decreases the efficiency of my program by alot
GG lecturer telling me it's a better idea of making my O(n) runtime into an O(n^2) instead of complimenting my code.
Seriously what the fuck is up with the fucking education system. Since when was it okay to teach students how to completely fuck your code up and promote ways of making your code so inefficient?33 -
Boss: I saw that you are using {some JavaScript library}, why?
Me: you asked for this functionality and the library is very good for that
Boss: here at our company we do not use code from other people, we write everything ourselves
Me: but this library is very well built, actively developed and supported
Boss: I don't care, please rewrite this component
Suffice to say, I quit that job asap. Whoever thinks it's a good idea write so much code for a small purpose in an application when there is something available open source to use, is stupid. In most cases it's better to use something which is out there than to waste time writing a hardly stable version of it.24 -
*On a programming support forum*
Guy: My compiler keeps throwing null pointer exception at line 128.
Me: Ok. Can you post your code real quick so I could figure out what is null at line 128?
Guy: No I'm not going to show my code to someone on the internet. What if you want to steal my code?
My mind: "Dude wtf why would I steal someone's code on a support forum?"
Me: *Use the next 15 minutes explaining that showing the code is necessary so that others can actually help him, and that no one on a support forum is going to steal his code.*
Guy: "You know what I'm more convinced that you want to copy my code. I might as well just try to fix this on my own."
What?14 -
So today this Mother F**ker get HR to back him up to accuse me of not communicating well in the team because I consistently asked him (the code owner) why he kept coding not following the coding guideline.
How is it not communicating? He literally ghosted me and blocked me every time I ask him questions. Which I somewhat don't understand what he is trying to do. HR lady told me that a senior software engineer should have the knowledge to understand everything and all the code.
But the code looks like this :41 -
I actually hate this job, seems like there's not a single project with decent code abstraction. Everything is a fucking spaghetti like:
```
// we only care about e-mail fields, which are odd
isValid(index) {
if(!(index%2)) {
return true;
}
...
}
```
Like MOTHERFUCKER, WHAT BUSINESS RULE DOES THIS SHITCODE REFLECTS?!?! WHY CAN'T YOU SHITHEADS WRITE PROPER BUSINESS ABSTRACTION RATHER THAN JUST COLLEGE-GRADUATE QUALITY SHITCODE.
FUCKING KILL ME ALREADY I SHOULD HAVE INSTEAD BECAME A PSYCHIC CAUSE I'M SURELY GOOD AT GUESSING WHAT THE FUCKING FUCK THIS FUCKING FUCKCODE INTENDS TO ACHIEVE.
AND YOU CALL YOURSELF TOP-NOTCH DEV CAUSE THIS IS JAVASCRIPT... YOU KNOW WHAT, SHITHEADS LIKE YOU, WHO DON'T KNOW SHIT OTHER THAN GLOBALLING EVERY FUCKING NPM LOCAL PACKAGE IS WHY GOOD ENGINEER LIKE US GET SHIT FROM PHPEPSI ZENDFRAMESHIT FUCKHEADS DEVS.
DO YOU THINK YOUR COMMENT WAS HELPFUL??? DO I LOOK LIKE A BUSINESS GRADUATE FUCKTARD WHO DOESN'T KNOW WHAT THE FUCK THE MODULE OPERATOR IS??? I WANT TO KNOW WHY YOU WROTE THAT SHITFUCK INSTEAD OF WHAT IT DOES; THE REASON I'M READING YOUR POORLY WRITTEN MODULE OPERATOR SOAP-OPERA IN THE FIRST PLACE IS CAUSE I KNOW WHAT IT'S DOING, IT'S BREAKING SHIT.
OH AND ONE MORE THING, FUCK YOU FUCK FUCK FUCKSHIT SHITFUCK FUCk11 -
Co-worker: Hey man, what's up with your code?
Me: What do you mean bro?
Co-worker: It's generic man...
Me: Isn't it supposed to be like that?
Co-worker: Yeah...
Me: ... so what's this about?
Co-worker: hmmm... Mine is kinda specific, do you mind changing it so that it can work well with mine??
Me: That's why I made it generic though
Co-worker: yeah I see that and I dnt want mine to be and we have a deadline tomorrow. I already pushed mine to develop so, happy fun-time while modifying your code to accommodate mine...
Me: *fuuxuuuuuuuuuuuux*5 -
Was working on some a project at a coffee shop with my girlfriend when I got frustrated and exclaimed "God damn why is this method breaking everything". My girlfriend looks up at me and starts in surprise "code can break?".6
-
So I was hired about 4 months or so in this companty, we will name it 'Derp & Co.'
The first task they want me to do was to 'clean' an android app that, for what they told me:
- Previous dev fired. said that tasks have been done but totally a lie.
- Took a fully week of 2 fellows coworkers to 'undo' the mess.
- And for the last but not least, zero documentation, like ZERO.
So, I clone the repo, install android studio, blah blah blah, get hands to the pile of code and jesus...
- The whole app was working with a gargantuan json, there was no use of POJOs at all. Objects are for normies.
- A masive copy/paste code, like 'I will need this here, crtl-c... ctrl-v, DONE!'
- Threads are free, isn't it? let's just put a thread whenever I desire to make an HTTP request and not reuse code at all.
So... with this on mind, my first task is to make proper objects:
- Coworker: 'Sorry dev, we don't have documentation for this, you must debug the code to se what the server will send to you'.
- Me: 'Real?'
Shit... ok. So I first try to figure out how the hell is made my gargantuan json. A month was entirely lost to unravel this data and implement Objects, improve their code, reuse code, etc. but at the very end:
- coworker: 'Good job dev, when the POJOs are done, we can focus on the next task, whe have to define a new DATA MODEL because the one we are using now is not good at all'.
*note: the app is on production and working with all the previous 'features' and today it still on use on some enviroments.
- Me: 'Wait... this is a joke, now you want to define new data models? This should have been done in first place!' <WTF face>
- Coworker: 'I don't think so dev, Mr. boss have this list with things to improve on the app an this is the order of do the tasks'.
Mr. boss is on vacations, two days after he came back:
- Mr boss: 'Coworker said that you have been working with POJOs, is that right?'
- Me: 'Yes'
- Mr boss: 'Why? Did not see the need of a new data model?'
- Me: 'I told that to him, but he insist on "the order" of the list.
- Mr. boss <facepalm>
This is one of the few tales i have from 'Derp & Co.'
PS: Sorry if i made a mistake on writing, english is not my first language and maybe I have done some mistakes.7 -
The place where I work part time, my role is to teach children how to code basic things in python, html and CSS.
There's a child who's been coming to this club for the past year, she's only 8 and is smarter than any other child I've seen in person.
Turns out both her parents are developers which is why she has an interest in coding too. It's so refreshing to see things like these, honestly. I hope my child in the future is like her lol.3 -
Look... I know I'm just a newbie. I started a year ago as a junior. Sure. No one wants to do code review, so I got chosen to do it. People don't like it when their code gets criticised. And you know what? I get it, I should probably be a bit nicer with my comments. I should not suggest I'll make a fork and split internal library into two streams if things continue this way. I should not ask questions that can be understood as me being passive-aggressive.
But holy fucking shit, you're a senior developer. Don't treat Java as a fucking scripting language. Don't have a method that has 600 lines of code, because you're repeating the code! You've already copy pasted this shit, and modified it slightly. Like, couldn't you have created some architecture around the code? How can a senior dev copy-paste code?
Oh and why the fuck did you create a new utility class for functionality I already provide? Look, I admit, yours is a lot better, ok? It has extra functionality. But why the fuck didn't you enhance my utility class? Why did you create a new one? Did you just not want to touch my code, or did you not see it right below your newly created class?
Am I the only one who fucking cares about maintainable code in this company? When I got hired, I was in tears by how frustrating a lot of the things were. No documentation anywhere, not even fucking comments. No processes in place. Want to do something? Source code is your documentation. Fuck you! I busted my ass of to force everyone to document every little bullshit, to re-factor their MRs that I reviewed, and I won't let even a senior fucking dev pollute the code base!
Fuuuuuck... Me...2 -
I would absolutely love it if people would write their own stupid code instead of blindly mixing everyone else's mental diarrhea together and pouring the resulting mess into their bloody stupid IDE. At least then I could insult them properly. As it is, they're outsourcing their fucking stupidity to the lowest fucking bidder and then bragging about how quickly they get everything done. And management eats it up! No wonder everything is a slow, tangled, unmaintanable mess.
I can't fix much of anything because almost none of it is in my control. It's all autogenerated bullshit glued together with laziness and poor taste. "But Root, why is fixing this taking so long?" Gee, I wonder why. Maybe if someone had built it somewhere in realm of correctly the first time, it wouldn't have all fallen apart when someone looked at it the wrong way!
Seriously, there's no way this pile of stale fertilizer could have passed QA.rant idiots import * fragile monstrosity leggy devs why code when you can steal no independent thought npm mentality10 -
This is a funny one:
I found this gem in SO.
Why is it funny? Well, PDVSA is the state-owned company for oil production of my country (Petróleos De Venezuela).
This little intern decided that it was a good idea to publish in SO an answer with actual code, showing database and tables names to everyone.
Priceless.8 -
A few weeks ago at infosec lab in college
Me: so I wrote the RSA code but it's in python I hope that's ok (prof usually gets butthurt if he feels students know something more than him)
Prof: yeah, that's fine. Is it working?
Me: yeah, *shows him the code and then runs it* here
Prof: why is it generating such big ciphertext?
Me: because I'm using big prime numbers...?
Prof: why are you using big prime numbers? I asked you to use 11, 13 or 17
Me: but that's when we're solving and calculating this manually, over here we can supply proper prime numbers...
Prof: no this is not good, it shouldn't create such big ciphertext
Me: *what in the shitting hell?* Ok....but the plaintext is also kinda big (plaintext:"this is a msg")
Prof: still, ciphertext shows more characters!
Me: *yeah no fucking shit, this isn't some mono/poly-alphabetic algorithm* ok...but I do not control the length of the ciphertext...? I only supply the prime numbers and this is what it gives me...? Also the code is working fine, i don't think there's any issue with the code but you can check it if there are any logic errors...
Prof: *stares at the screen like it just smacked his mom's ass* fine
Me: *FML*12 -
Why is the contributing manual of your open source project more thoughtfully cultivated than your code style guide and testing procedure?
Why the fuck do you care about the message in my PR, or even merge vs rebase of commits, when your spaghetti-tomatosource is so richly saturated with critically minced bugmeat?
Why are you standing there, shouting at me about your convoluted rules, in your little brown uniform? Why do I feel like the enemy when I contribute a useful fix, something which makes the code work better?
You know what, fuck all of you, you jilted acetous neckbeards, I will deploy my secret weapon, I will bypass the power you hold over your tiny fascist digital dominions.
If you play it like this, I will summon the nefarious vile side of Open Source. I will usurp your throne. I will stab out your crying eyes, rip out your conceited tongue, impale your lonely heart.
Tremble before me! I wield the almighty, legendary Fork!
The king is dead, long live the king!5 -
My friend loves Dreamweaver... And continuously says that he doesn't understand what people see in it that is so wrong... It does the job right?...... Fucking blind...
Uses a bootstrap plugin which generates HTML code for bootstrap.
I did not know this at the time.
Comes to me the night before submission.
He: Dude i need help quick! I've got the presentation tomorrow morning and bootstrap fucked up the links to my style sheets or something, my page is broken and won't work. I should have done what you did and gone for Foundation...
Me: Yeah, because the bootstrap framework definitely affects the style links...
He: help me out man, please! I can't do this anymore!
I had my submission the day after him to prepare still...
Me: Teamviewer. Now.
Log on to Teamviewer.
See what he's using to code...
Dreamweaver..... Niiiiice....
I go through the code. There are empty divs with &nbsc; in them everywhere.. some HTML elements haven't been closed, no comments, indentation seems to be completely random. All the usual shit storm of a novice web designer.
The only thing is, this guy I know knows how to indent, I've seen his previous work. Why is this so horrible then???
I ask what the hell happened, it looked like a nuclear explosion happened!
He: Yeah I'm using this great plugin for Dreamweaver which lets me click and it puts in Bootstrap elements! It's great!
........ You're blaming the bootstrap framework for affecting your links to your stylesheets, you're using an elements generator, you're not checking what the FUCK it puts into your code, not fixing the indenting, not checking the standard HTML rules are followed AND YOU WONDER WHY IT'S BROKEN???
Kill me now.4 -
Hey. This code look broken. What should I do?
It isn't broken. It's doing what it's supposed to.
Well, it's hard to follow, but it certainly doesn't look right. And it isn't doing what I expect. Also, why is it calling method(a_class1_or_class2) with a class3?
It isn't hard to follow, and it works just fine. Let me show you. ... huh. looks like it isn't right. and there's a comment here saying the calls aren't clear. but it works just fine. Just copy it over and do it the same way.
I already did that. and it isn't working.
What are you talking about? Of course it works fine. Did you check your code?
------
Really, dude? It doesn't work fine. but, guess what? It works fine* when I change it to call that method with a class2 like it asks for. (Surprise!) But I can't tell him that. Nope. Bossmang get offended. Still won't admit I was right about anything, either.
Ahh... the continual joy of working with (and for) trash.
* well, more fine; the rest of the feature is still wrong. but nope, i'm not allowed to fix it. because why would they want anything to work properly? Already-accepted wrong behavior is good enough. Can't clean up the code, either, because that "muddies the waters." Bitch, I couldn't see the bottom of this sewer if it was half an inch deep! Which is more important: the last contributor entry beside the code, or that code being readable and maintainable? or it, you know, working?
doot doot.
need to scoot.8 -
So im here with this lovely girl on my chest and all i can think of is why i got a Null Pointer exception and why in the fudge im lying here with this woman instead of fixing that.
Oh, maybe its because i spend 27 hours of the available 24 hours in a freakin day writing code whilst struggling to give her attention. She deserves this moment. She's my best Fragment...Friend, she's my best Friend.10 -
"...the way he has written the code, it feels nasty man. I would have done it this way..."
Fuck you and your feelings. If you think my code is bad, give justification for it. Explain the fucking reason. Stop saying it "feels" like a bad code.
Fucking tired of this mentality in most of the developers. Why is it that the moment you look at someone else's code, you feel like you would have written it better. Programming is problem solving. And you can solve a problem in couple of different way.
If the code is absolute shit, has followed no best practices then yeah, go ahead and call it a bad code. But just because you would have moved some lines here and there, that doesn't mean the other persons code is horrible.
Goddamit!13 -
Client: You are bad developers. Your code has bugs and the site isn't even pretty. And why is it so damn expensive??
Us: ...
Same client (a month later): I need this campaign landing page with the option to register and an admin for user management. It should be done till the day after tomorrow because the URL is already in print. Here's the catalogue (in .pdf) in which it will appear. Use it as a style guide.
FUCK YOU!2 -
I fucking hate being the "ask me anything" guy in the office, how am I supposed to code if people interrupt me every 5 minutes?
OH LOOK AT MY HEADPHONES! MAYBE I'M CONCENTRATED AND HAVE SHIT TO DO! I mean there are other 10 devs, why don't you go to them? or maybe try to GOOGLE IT, I HEARD STACK OVERFLOW IS GOOD YOU PIECE OF SHIT!
don't get me wrong, I like to help people but I hate when those bastards come asking questions that could be easily answered if they read the code for 5 fucking minutes.
when I have to look at code that is not mine I try to understand it by myself, even if it's not documented, and I try not to bother anyone unless is really necessary.
But then this sluggish leeches think I know the whole codebase and that can interrupt me whenever they can.7 -
Oh, we don't know why it broke. I know you just did A HUGE FUCKING DATABASE SEVER UPGRADE to the server we're connected to, but no one understands this code, so can't update it to work. Can you roll back 3 VERSIONS so our application that hasn't had a code change in 11 years is optimized?2
-
This is how most comments in code are. Why are you telling me it's a coffee cup, I can fucking see it's a coffee cup, who owns it and why is it right here? Are you putting coffee in it or something else?6
-
So I spent 4-5 weeks explaining how shit the current code base was, implemented gulp tasks to lint js, CSS etc, written shed loads of coding standards and best practices to follow. At this point everyone was onboard with the changes and thought brilliant were going to start getting some good code coming out of this team.
I go on holiday for a week, come back and fucker has ignored the documentation disabled the linters in the gulp tasks and the code is back to square one SHIT!!
Plus everyone still committing to master!!!!
Why do I bother!!6 -
Why does the idea of having to develop social skills somehow seem to scare the fuck out of a large portion of you?
Is being a likeable human being such a weird concept? What do you expect? To people just validate your entire existence based on how good you can sit in front of a set of monitors and push code out? Thousands of monkeys can do that shit. Thousands of systems will eventually do such things.
for whatever reason the "I am a fucking asshole that can code" trope seems to be a "real thing" amongst developers. A mfker can know waaaaaaay less than you, have the same credentials (degrees etc) and will get the job because you were too busy building an online persona governing how better you are than everyone else. How "quirky" and Sheldon Cooper like you are. You think that makes you likeable? "i don't need to be likeable" <---- yes the fuck you are, because this shit is something in which people can be trained upon.
A team, regardless of how much you agree with this, can choose a person solely based on how well he/she/whatever clicks with them. You might be the end all be all of development, but if they don't like you or feel you will not be someone worthwile to be around, will not chose you. They will go with the charismatic newbie that can learn the same shit you so dear hold on to, because they are likeable.
Sticking to a merit based "I am the best there is" asshole mentality is a thing of the fucking past, boomer mentality. For which newer generations are parting ways with, with still profitable results. workable results. Production ready results.
Yet you chose to stick to a "I might be a quirky annoying fuck, but I am the best" mentality?
This is why you were bullied. This is why you can't get any dick, this is why you can't get any pussy, this is why you sit your ass in your little dark room trying to convince yourself that being lonely is a choice, not a situation in which you put your ass in. This is why I also dislike developers online.
Most of you might be the nicest mfkers on the planet when dealing with on a face to face basis, but if you put this shit on a screen for the world to see you will be viewed upon as some dickhead.
Fuck this "code is my life" mentality, shit is but a paycheck, a craft is not a glimpse into what you are as a person, but a way in which you make a paycheck. Molding your personality, based on what you do for a living, really?
Damn man, shit is just so fucking sad. So cringeworthy even.42 -
Worst code review experience?
Hard to pick just one, but most were in a big meeting room with 4+ other developers not related to the project and with some playing Monday-Morning-Quarterback instead of offering productive feedback.
In one code review, the department mgr reviewed the code from a third party component library.
<brings up the code on the big screen>
Mgr: "I can't read any of this, its a mix of English and something else."
Me: "Its German."
Mgr: "Then why is 'Button' in English? This code is a mess."
Me: "I'm not exactly sure how I should respond, I mean, I didn't write any of this code."
Mgr: "Yes, but you are using it, so it's fair game for a code review."
Me: "Its not really open source, but we can make requests if you found something that needs to be addressed."
Mgr: "Oh yes, all this...whatever this is..<pointing again to the German>"
Me: "I don't think they will change their code to English just so you can read it."
Mgr: "We paid good money, you bet your ass they'll change it!"
Me: "I think the components were like $30 for the unlimited license. They'll tell us to go to hell first. Is there something about my code you want to talk about?"
Mgr: "<Ugggh>...I guess not, I couldn't get past all that German. Why didn't we go with an American company? Hell, why didn't we just write these components ourselves!?"
Me: "Because you gave a directive that if we found components that saved us time, to put in a request, and you approved the request. The company is American, they probably outsourced or hired German developers. I don't know and not sure why we care."
Mgr: "Security! What if they are sending keystrokes back to their servers!"
Me: "Did you see any http or any network access?"
Mgr: "How could I? The code is in German!"
Monday-Morning-Quarterback1: "If it were me, I would have written the components myself and moved on"
Me: "No, I don't think you could for less than $30"
Monday-Morning-Quarterback2: "Meh...we get paid anyway. Just add the time to the estimate."
Mgr: "Exactly! Why do we even have developers who can't read this mess."
Me: "Oh good Lord! Did anyone review or even look at my code for this review!?"
<silence>
Mgr: "Oh...ok...I guess we're done here. Thanks everyone."
<everyone starts to leave>
Me: "Whoa!...wait a sec..am I supposed to do something?"
Mgr: "Get that company to write their code in English so we can read it. You have their number, call em'...no...wait...give me their number. You keep working, I'll take care of this personally"
In they nicest way possible, the company did tell him to go to hell.17 -
Today the lead developer and I where loling and wtfing hard to the following code:
if ($looked_column == true)
{
$trunca = 1;
}
else
{
$trunca = 1;
}
Mind you, we had no clue why he named the variable $trunca, and even then it had been set at the top of the file as 1 to begin with....was never used up to this line and $looked_column had also a set to true.
This is why a lot of people give php a bad reputation. This right here is why people make fun of php......15 -
#include <rant>
So, in my class I have this one dude who also code, "Awesome" I thought when I first saw that he codes, he codes in c# and claims to know JavaScript.
So I hung out with him a bit on recess/break time, and I eventually found out that he is a d*ckhead
First of all, he claims that he can code ANYTHING, I mean triple A games, the machine that can find pi in 10 seconds. And I know that this isn't true, because he "can't bother" with showing me it.. whatever I think.
I also mentioned that he is a d*ck, why am i saying that? Because if you make an error he would just go, "there is supposed to be *insert random bullshit here* instead of *a typo that I made*, retard. You are honestly fucking stupid" Listen, I love when people point errors out, it really helps. But when you say it like that, it honestly makes me sad. One day, I was messing around with classes in python and he went "hey idiot! That's wrong! There is supposed to be a *random word* instead of *working code*". The funny thing is, HE DOESNT KNOW WHAT PYTHON IS. So I comment out the working code and puts in his c# bs there instead. And he just says, "it isn't working because there's a private class instead of a public class. Ehmm, excuse me? This is python, ok.
Oh and he told me I was a retard because I can't develop triple a games using pure JavaScript.
Any tips on dealing with the guy?23 -
I'm currently rewriting perfectly clean and functioning Scala code in Java (because "Enterprise", yay). The amount of unnecessary boilerplate I have to add is insane. I'm not even talking big complicated code but two liners or the lack of simple things like a range from 5 to 10.
Why do I have to write
List<Position> occupiedPositions = placedEntities.stream()
.flatMap((pe) -> pe.occupiedPositions().stream())
.collect(Collectors.toList());
instead of simply
val occupiedPositions = placedEntities.flatMap(_.occupiedPositions)
Why on earth does `occupiedPositions.distinct` suddenly become a monstrosity like `occupiedPositions.stream().distinct().collect(Collectors.toList())` where the majority of code is pure boilerplate? And this is supposed to be the new and better Java8 api which people use as evidence that Java is now suddenly "functional" (yeah no, just no).
Why do APIs that annotate parameters with @Nullable throw NullPointerExceptions when I pass a null? Why does the compiler not help prevent such stupidity? Why do we use static typing PLUS those annotations and it still crashes at runtime like every damn dynamic, interpreted language out there? That's not unfortunate, it's a complete waste of time.
Why is a simple idea like a range from x to 10 (in scala literally `x to 10`) not by default included in Java? There's Guava's version of Range which does not have a helper for integer ranges (even though they are the most used ones). Then there's apache.commons version which _has_ a helper for integers, but is strangely not iterable (wtf I don't even...).
Speaking of Iterable: How difficult could it be to convert an abstract Iterable<T> into a concrete List<T>? In scala it's surprisingly `someIterable.toList`. I found nothing like that so I took to stackoverflow where I found a thread in which people suggested everything from writing your own ListUtils helper class, using Guava (which is a huge dependency!) to using the new Java8 features inline (which is still about three lines long). I didn't know this was such a hard problem in computer science, TIL.
How anyone can be productive in this abomination of a language is beyond me now, even though I've used it for many years while learning to code (back then I didn't know there were much better ways to do things). The only good part is that I have to endure this nonsense for only about 3 days longer then I'm free again!12 -
Just started my new job.
Poorly defined requirements ✅
Expecting things to be done yesterday ✅
Poorly managed teams ✅
Terrible legacy code ✅
Half the development team is offshore ✅
Maybe I’m just selfish, but I need to work in an environment that has the following
A good technology stack.
A competent manager/team leader.
Competent colleagues.
Clearly defined documentation.
A proper onboarding process.
Why is this so difficult to find in organisations?12 -
They've literally left me with nothing to do. I'm doing nothing. I can't be happy doing nothing.
To illustrate the chaos: Everyone on the team was trying to figure out some defect. No one knows what is going on in the code. It's unlike anything I've ever seen.
I found an API call with a misspelled endpoint. It was wrong since the code was written two months before. There's no way it ever worked. Obviously no one tested the code because they would have immediately seen that the call returned a 404 every time.
I fixed it. That was my only PR in about a month. It was literally one character.
The next week that PR got reverted. Apparently the app works better if the API call fails. No one said what goes wrong if the request is made, just that it "causes problems."
That's how bad it is. No one knows why anything does or doesn't work. People write code that doesn't work, never test it, and the application works better in some unspecified way if that code never gets executed.
The last straw for me was when an architect told us that if we want to improve our skills we need to learn how to read and debug stuff like this.
1) Not to be immodest, but I'm good at figuring out bad code.
2) Just because I can doesn't mean I want to do it all day instead of actually developing software
3) He trivialized the really important skill, not making a mess like this in the first place. If his idea of skill is to sling crap without tests at the wall and then debug it, how is he an architect?
I tried really hard but I can't keep a good attitude. I don't want to become toxic, but why would I consider working that way? I try my best to be good at this. Writing decent code means a lot to me. It should mean a lot to them. Their code is costing them hundreds of thousands of dollars. Maybe millions.
I can't write good code and add value if all I do is debug bad code.
So I'm out. I'm going to another project. Have a nice life.4 -
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 -
Me:
Totally riffing to my new playlist....
the ideas are just flowing.....
Code flying...
changing in my brain....
I think I've got I might have it.....
...... RING RING ITS THE MOTHERFUCKING BOSS,
Boss:
Why is the whole website down?
Me: WTF, looks fine here, all logs are clear.
Boss: I just got an email saying the whole thing is fucked. Stop everything and fix it now.
Me: but we just agreed dev is taking priority over any support issues within sla and I've checked from everywhere there are no issues, just data issues probably from user error.
Boss: Just get it back and figure it out!!!!! Why are you being difficult?
Me: okay whatever, let's patch each of these shits.
COULDVE SENT THIS ANYWHERE BUT NOW MY IDEA IS GOOOONEEE!!!!!! NULL FUCKING DATA FIELD ON A SINGLE FUCKING EMAIL....FRAAAAACKKK THIS4 -
So Friday afternoon is always deployment time at my company. No sure why, but it always fucks us.
Anyways, last Friday, we had this lovely deployment that was missing a key piece. On Wednesday I had tested it, sent out an email(with screenshots) saying "yo, whoever wrote this, this feature is all fucked up." Management said they would handle it.
The response email. 1(out of 20) defects I sent in were not a defect but my error. No further response, so I assume the rest were being looked into.
In a call with bossman, my manager states that the feature is fixed, so I go to check it quickly before the deployment(on Friday).
THERE IS NO FUCKING CODE CHECK-IN. THE DEV BASTARD JUST SAID THAT MY USECASE WAS WRONG, SO MY ENTIRE EMAIL WAS INVALID.
I am currently working on Saturday, as the other guy refuses to see the problem! It is blatant, and I got 3 other people to reproduce to prove I am not crazy!
On top of that, the code makes me want to vomit! I write bad code. This is like a 3rd grader who doesn't know code copy-pasted from stack overflow! There is literally if(A) then B else if(!A) then B! And a for loop which does some shit, and the line after it closes has a second for loop that iterates over the same unaltered set! Why?! On top of that, the second for loop loops until "i" is equal to length-1, then does something! Why loop???
The smartest part of him ran down his Mama's leg when it saw the DNA dad was contributing!
Don't know who is the culprit, and if you happen to see this, I am pissed. I am working on Saturday because you can't check your code or you lied on your resume to get this job, as you are not qualified! Fuck you!15 -
When you live in a 3rd world country, get a relatively expensive 16mbps connection (that's still very unreliable), and try to clone WebKit… why the hell is it so large even with `--depth 1` and `--single-branch`? Why doesn't `git clone` support resuming/incremental cloning? Is this even 2018?
I want to code but life is actively fighting me right now. I hate this.
/rant26 -
Me : I found this code issue, I think we need to fix it
PO: does it affect the user?
Me: not really but we can make it better
PO: do you have a defect for it in *insert issue tracker here*
Me: no, I just noticed it
PO: is there an IM ticket for it?
Me: I don't think so
PO: is this issue already in production?
Me: possibly. Yes. That's why I was wondering if we should fix it.
PO: okay then we will fix it in the 3rd release from now if you still remember it by then.5 -
Prof: "Hey, you can take a look at the source code that we used last year in this research paper"
Me :(surprise because other papers usually don't share source code), "Okay"
A few weeks later:
Me: "Prof, if you use method A instead of method B, you can get better performance by 20%. Here's the link"
Prof:"The source link that you mentioned is for another instrument, not GPU"
Me:"Yeah, but I tested in on GPU and I found it is also applied in my device"
Prof:"That's interesting."
-----------------------------------------------------
This is why folks, sharing the source code that you used in scientific papers is important.8 -
Why don't devs read the fucking docs?
Time and time again I find my coworkers inventing new ways of doing stuff that could easily be done with existing features.
Today I saw this on a code review (functions are from lodash):
head(filter(...))
That's what fucking `find` does, you dense motherfucker!
This is just a tiny example. I've seen so much of this shit. Sometimes it's almost art how they find ways to solve problems without actually reading the docs.6 -
I've run into problems with the app I'm working on, the problems are related to issues regarding code.
No in fact it's related the last guy who wrote the app, the code has no comments and the variable names make no sense, the only comments in the code are blocks of code... With no reason as to why it was commented.
I have to add in some checks to determine if a person that has logged in is a full member or not (full member has access to the feature I've added) and the way the guy has made this app works makes no sense to me at all.
I've tried my best to avoid all contact with his code because it makes me want to yell out in frustration.
But for this one case I have to work with what's there.
I know I've mentioned this before but I've hit my limit yet again.
And for those who don't know this guy managed to scrape together skeleton code from two apps to make part of this app, rather than using parts of the other apps he left out code that was specifically made for the other apps, (majority of the commented out code).
One app was a taxi app and from the looks of it the feature he used was to get GPS location (which I don't understand before Google maps is a think after all... The taxi app USES Google maps), the other app is some sort of funeral webcasting app (I found code imports for it, without any actual code).
I don't actual understand how this guy could put this together without not thinking "maybe this is a bad idea"
Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live
I'm that psychopath right now..... Fuck that guy (don't know where he lives though)1 -
I've been lurking on devrant a while now, I figure it's time to add my first rant.
Little background and setting a frame of reference for the rant: I'm currently a software engineer in the bioinformatics field. I have a computer science background whereas a vast majority of those around me, especially other devs, are people with little to no formal computer background - mostly biology in some form or another. Now, this said, a lot of the other devs are excellent developers, but some are as bad as you could imagine.
I started at a new company in April. About a month after joining a dev who worked there left, and I inherited the pipeline he maintained. Primarily 3 perl scripts (yes, perl, welcome to bioinformatics, especially when it comes to legacy code like is seen in this pipeline) that mostly copied and generated some files and reports in different places. No biggie, until I really dove in.
This dev, which I barely feel he deserves to be called, is a biology major turned computer developer. He was hired at this company and learned to program on the job. That being said, I give him a bit of a pass as I'm sure he did not have had an adequate support structure to teach him any better, but still, some of this is BS.
One final note: not all of the code, especially a lot of the stupid logic, in this pipeline was developed by this other dev. A lot of it he adopted himself. However, he did nothing about it either, so I put fault on him.
Now, let's start.
1. perl - yay bioinformatics
2. Redundant code. Like, you literally copied 200+ lines of code into a function to change 3 lines in that code for a different condition, and added if(condition) {function();} else {existing code;}?? Seriously??
3. Whitesmiths indentation style.. why? Just, why? Fuck off with that. Where did you learn that and why do you insist on using it??
4. Mixing of whitesmiths and more common K&R indentation.
5. Fucked indentation. Code either not indented and even some code indented THE WRONG WAY
6. 10+ indentation levels. This, not "terrible" normally, but imagine this with the last 3 points. Cannot follow the code at freaking all.
7. Stupid logic. Like, for example, check if a string has a comma in it. If it does, split the string on the comma and push everything to an array. If not, just push the string to the array.... You, you know you can just split the string on the comma and push it, right?? If there is no comma it will be an array containing the original string.. Why the fuck did you think you needed to add a condition for that??
8. Functions that are called to set values in global variables, arrays, and hashes.. function has like 5 lines in it and is called in 2 locations. Just keep that code in place!
9. 50+ global variables/hashes/arrays in one of the scripts with no clear way to tell how/when values are set nor what they are used for.
10. Non-descriptive names for everything
11. Next to no comments in the code. What comments there are are barely useful.
12. No documentation
There's more, but this is all I can think to identify right now. All together these issues have made this pipeline the pinnacle of all the garbage that I've had to work on.
Attaching some screenshots of just a tiny fraction of the code to show some of the crap I'm talking about.6 -
I told a guy to implement an algorithm in cpp. He wrote this weird 600+ lines of code which contains only global variables and void functions then I told him to make it object oriented and he just put all those garbage in the class and gave me back and on top of that class name is Template and file name is template.cpp. I don't have words to describe his code. May be this picture can help you understand my state. Oh, if you think this matchOn_r1, r2,r3 are different then you are mistaken they are just different with one argument (one global argument). This is just part of the code. He has this shit all over the place. Why the fuck this kind of people exists?13
-
during code review...
peer: "you should pass this variable, and extract the logger from it"
me: "why? it is a 3 line logging function. why not pass the logger instance?"
peer: "because that is our best practice. It is the way we do things"
me: "why is it a best practice?"
peer: "because it is. We use it everywhere!"
me: "No we don't. And I still don't understand why is this a best practice. can you explain?"
peer: gives ups, did not look at the mr, and was not going to.
mr stays open. probably forever.11 -
So some programmers (specially C programmers, it seems) have this terrible habit of writing very short-named variables. Then in order to understand the code, you need to decipher the meaning of each variable. Example:
```
unsigned int i, n, h, mw, my, ty;
```
This is from one of the "Suckless" projects by the way. They pride themselves in having small number of code lines so this is probably why.24 -
Why do otherwise intelligent people think chatgpt code is a good idea if they don't know what the code does?
I am a bit in shock by this prospect. I asked about some lines of code that was using some templates I had not used before. The response was "I dunno, chatgpt." This person is really really smart. Yet deploying code that they don't understand completely. This seems dangerous and irresponsible. I ended up rewriting the function I had questions about. It was significantly shorter and didn't do a fuckton of copying strings around.
WTF is wrong with people? Are people afraid to think? Now I want to get out before this kind of shit becomes the norm.13 -
Why is starting a C++ project so overly complicated and annoying?!
So many different compilers. So many ways to organize the files. So many inconsistencies between Linux and Windows. So many outdated/lacking tutorials. So many small problems.
Why is there almost no good C++ IDEs? Why is Visual Studio so bizarre? Why are the CMake official tutorials literally wrong? Why can't we have a standard way to share binaries? Why can't we have a standard way to structure project folders? Why is the linker so annoying to use?
Don't get me wrong, I quite like the language and I love how fast it is (one of the main reasons I decided to use it for my project, which is a game almost comparable to Factorio)... But why is simply starting to write code such a hassle?
I've been programming in Java for years and oh god I miss it so much. JARs are amazing. Packages are amazing. The JDK is amazing. Everything is standardized, even variable names.
I'm so tempted to make this game in Java...
But I can't. I would have a garbage collector in the way of its performance...11 -
I really need to let this out somewhere...
Why the f...? Srsly.. Why would anyone do that? I'm joining another project. Apparently lead dev has adopted a coding style, where:
1. Every dev writes code however he likes, i.e. no clean-code requirement at all.
2. All services are crud-only. I mean all service classes. All must have those 4 methods; no more, no less.
3. Half of the business logic is inside controllers.
4. Not a single comment... Interfaces, models, etc. -- not a single one.
5. Xmls -- tabs, classes - spaces.
6. Xml schemas are downloaded with each build rather than stored downloaded once and stored locally.
7. I can keep going on and on.
Is it just me or are these some really weird decisions?3 -
Just read an article that really grinds my gears. Its about coding in other languages. Not programming languages, but literally other languages.
Btw I learned to code in Spanish and I'm not against coding in programming languages using variable names in other languages.
That's fine.
What pissed me off was that the author claimed that we should be able to code Fucking JavaScript in SWAHILI or other languages available. What kind of PC bullshit is that!
Coding is barely fucking readable and now we have to make standards for Multilanguage support. Just learn the less than 60 reserved words you lazy fuck and code with them! I leaned to code with shitty tutorials in Spanish and theres no 1000x resources out there and this author claims you can't code unless you know english.
Granted. It's easier but wtf not just learn it. When I coded in Java in Spanish, I didn't know wtf a Class was or ags meant. So what. I memorized that shit. How? By coding!
Why bring this PC shit to programming? The author thinks there are few programmers bc we don't support fucking SWAHILI in JavaScript. Fuck no!
Now if you want to support this initiative. Think of this,
...legacy code
...in 32+ languages.
Have fun debugging this thing.14 -
Hi fellow code indenters,
I am a tab indenter myself because each dev on the same project can decide how much the indentation is. Some prefer 4, some 2, some prefer both depending on language.
Now I already asked a few space indenters here why spaces. Because I never heard a good argument for using spaces instead of tabs. Each time I asked I didn't get an answer.
So this time once again: why would you use spaces over tabs for indentation?
I want to make a good decision and for that I need arguments for both.40 -
Performance Review: You’ve slowed down.
My head: I never get to code cause all we do is meetings. Like no shit I have slowed down. Why the fuck do we have 3 days just full of meetings that I don’t even contribute to ?! I’m not gonna do overtime for this shit
Me (actually): Ah, shucks! Guess we can work on that huh?32 -
Put random text in window.alert() where ever I got error in JavaScript code. Random text like 1) If you see this, you are fucked; 2) error 001; 3)why today; 4) the code is breaking here etc.
And never removed them. They are the running in production till now. I am just thankful to the gods that the code Nevers break and the user does not get browser alert and also the fact that I don't work there anymore.4 -
Scenario 1
Friend 1:"Hey, you're good at computers right?"
Me:"Erm yup."
Friend 1:"Can you hack Instagram? I've lost my password."
Me:"Oh My God."
Scenario 2
Me looking at a friend's unity C# code
Me:"You know there's an enter key right? Why is your code horizontal not vertical?"
(Means that after a semi-colon he continues his code)
Friend 2:"I like to read my code in horizontal, that feels natural to me"
Me:"What ever, as long as it works. But why do you have so many if function inside another if function?"
Friend 2:"Cuz I want the player to do this while moving"
Me:".........."3 -
My manager thinks I am Superman! and he is so confident that can do any shit he wants me to do.
Yesterday he asked me to merge an ancient code hotfix (literally ancient) with latest branch of changes.
1. Hotfix is really old, most of the things are hardcoded, very specific to a stone age client.
2. Code documentation does not exist.
3. Developers of that code are probably dead.
4. Many Libraries which code uses are deprecated.
5. It's a legacy code, so no one has fucking idea what a particular clumsy block of code do, or what will happen if you remove it.
'if it runs don't touch it' policy by management.
Despite all this shit I successfully merged the the hotfix, refactored outdated code so as to run the application.
Showed this to my manager in full swag!
He was surprised at first, and asked me to show the code changes.
'Code review' was done by comparing files 😅
Manager: Dude, you have changed these lines, why? Explain.😧
Me: those lines won't work with new build, with new libs.☺️
Manager: then why can't you do old build with new changes?🙄
Me: umm.. wait... what???🤔
Manager: the code was working previously, it must be working even today without these changes.😡
Me: it was not working hence I made changes and now it's working fine see! ☺️
Manager: you have removed this, this and this!!! 😡
Me: but I also added that, that and that!😔
Manager: "don't touch it' if it works!"😡
Me: ... Idk what to say!
(In the back of my mind: "Don't touch it even it doesn't works!")😌8 -
So, 5/10 minutes of discussion about a class i need in the code. This was with the backender.
Ofcourse the designer hears this, joins the discussion and causes another 10minutes of explaining that a photo is different then a video...
Meanwhile i took a piss and got coffee because i’m fucking tired of these discusseion. You’re a designer, why care about code other people write. Go draw something1 -
Look, I'm not even mad that your dataset is the spaghettiest of all spaghetti, but why do you have ten different jupyter notebook files lying around?
I mean, I'm not implying that a monkey has more brain in his armpit than you have in your entire body, but like, you call this a dataset while all over seen so far is half-processed garbage. You could've just dipped your pc in sewage and the results would still be cleaner than this.
Luckily, your paper is half decent so what the hell, let's see if I can fish anything useful out of this. But I swear to god if I come across another static path in this... And here we go! Another static path! Ladies and gentlemen, I propose we get this guy's phd back until he learns to fucking do a decent code.
(It's actually a massively complicated project, so it kinda makes sense to be this big of a mess. But still!)6 -
Before I get too fat, the "Hour of Code" concept it's great, trying to get kids interested in programming
That being said, why on earth do they use fucking drag and drop programming? I would argue Python is easier to learn and infinitely more useful, and this is coming from someone who can't stand Python.
So far the only thing that I can think that the Hour of Code achieves, with drag and drop programming, is people possibly getting into Scratch, and fuck Scratch.5 -
So recently I did a lot of research into the internals of Computers and CPUs.
And i'd like to share a result of mine.
First of all, take some time to look at the code down below. You see two assembler codes and two command lines.
The Assembler code is designed to test how the instructions "enter" and "leave" compare to manually doing what they are shortened to.
Enter and leave create a new Stackframe: this means, that they create a new temporary stack. The stack is where local variables are put to by the compiler. On the right side, you can see how I create my own stack by using
push rbp
mov rbp, rsp
sub rsp, 0
(I won't get into details behind why that works).
Okay. Why is this even relevant?
Well: there is the assumption that enter and leave are very slow. This is due to raw numbers:
In some paper I saw ( I couldn't find the link, i'm sorry), enter was said to use up 12 CPU cycles, while the manual stacking would require 3 (push + mov + sub => 1 + 1 + 1).
When I compile an empty function, I get pretty much what you'd expect just from the raw numbers of CPU cycles.
HOWEVER, then I add the dummy code in the middle:
mov eax, 123
add eax, 123543
mov ebx, 234
div ebx
and magically - both sides have the same result.
Why????
For one thing, there is CPU prefetching. This is the CPU loading in ram before its done executing the current instruction (this is how anti-debugger code works, btw. Might make another rant on that). Then there is the fact that the CPU usually starts work on the next instruction while the current instruction is processing IFF the register currently involved isnt involved in the next instruction (that would cause a lot of synchronisation problems). Now notice, that the CPU can't do any of that when manually entering and leaving. It can only start doing the mov eax, 1234 while performing the sub rsp, 0.
----------------
NOW: notice that the code on the right didn't take any precautions like making sure that the stack is big enough. If you sub too much stack at once, the stack will be exhausted, thats what we call a stack overflow. enter implements checks for that, and emits an interrupt if there is a SO (take this with a grain of salt, I couldn't find a resource backing this up). There are another type of checks I don't fully get (stack level checks) so I'd rather not make a fool of myself by writing about them.
Because of all those reasons I think that compilers should start using enter and leave again.
========
This post showed very well that bare numbers can often mislead.21 -
So there is this one person who keeps asking for help from everybody and expects them to do their code .... And surprisingly they do....
I was done with that shit when I was expected to code for the person .... So I did do it with a comment saying "I have no idea why I get paid" 😂😂😂
I'm waiting for the reviewer to notice this now 😂😂😂1 -
#inlcude<header>
^this typo is the reason why i broke a keyboard, almost smashed the school lab monitor and embarrassed the teacher who also wasn't able to run the code either.6 -
When every ubuntu based distro fails, from kubuntu to xubuntu, lubunto, mint etc.
You will always have Linux Lite. How the fuck this thing manages to keep 2 vs code editors opened as well as firefox and chrome at the sime time while at 3.55g mem(according to htop) without fucking up?
Good engineering, das how. Kudos to my ninjas at the Linux Lite team. This is why I recommend this distro to anyone wanting to go Linux. Good for the beginner and the working professional alike(I use it for work)4 -
Why is it so hard to just build machines that work without all this ideological bullshit? Code doesn't care if politics==true. The world is scary enough without you assholes making modern life a data minefield for even the most educated experts, and taking advantage of the ignorance of everyone else. Fuck you.
I just wanna <look at web pages> without having to consider, counteract, or silently assist some fucking regime. Why is EVERYTHING this way? Everything is a back door or a data mine or a political statement? This isn't a fucking art piece! It's not your espionage tool, fucking codes in invisible ink and tiny cameras and shit everywhere! It's a <web browser>, and if it does ANYTHING besides <browse the web> that I didn't explicitly tell it to do, you better better not be the one who made it. Because if you did, you are what's wrong with the world.6 -
You may remember a super long time ago I double-buffered the Windows cmd.exe using c++
tl;dr, here it is in c!
Anyways, I was still learning c++ back then. It wasn't my first project in c++ but it was close and I ran into a lot of issues. The thing worked... but only if you didn't touch it.
Here's the same project (With a lot less bells'n'whistles) written in c. I used a different approach this time, and other than my function naming convention (Which, I honestly don't even know if it's bad or not!), I think this is some pretty solid code!
In the image you see the header file (I used as a summary of the code) and then three x's in a terminal. To do this, the code:
-Creates a ConsoleScreenBuffer handle
-Creates two CHAR_INFO buffers for drawing & displaying
-Draws three x's to the draw buffer
-Copies the draw buffer to the display buffer
-Copies the display buffer to the ConsoleScreenBuffer handle
I'm thinking about cutting out the middle man and removing the display buffer (which holds what is currently displayed) but I think it may actually be useful, and I don't know.
Anyways, I have no friends that understand this stuff so that's why it's here. Cheers.3 -
I'm working at this company where I have to update their app both for Android and iOS and it was originally coded by what seems to be one guy, that has written some of the worse code I've seen (I've seen pretty bad code when I was at uni), there is so much uncommented code, commented code with no real reason on why it's commented, variables that are one or two letters, Lots and Lots of magical numbers for things like images! And for the first few weeks working on the iOS app I was also still learning objective-c and had to look at his code for reference, I cringed so much.
I take pride in my commented code, I take pride in writing description for methods and having my variables at the top of a class and explain exactly why it's a constant. I'm also only just a recent graduate.
This guy that worked out this app is a senior developer, now working on security software for a bank, how is he even allowed to code?3 -
10 PM (after a very busy working day), CTO calls me and tells me: "We decided to hand in the new version to [random client] one week earlier, so they can test it."
Me: "I don't think is a good idea, the app is still unstable, we started working in it yesterday, it *will* crash"
CTO: "Don't you worry, at least they know we are working on it"
20 minutes later
CTO: "WTF why did you make my app crash?! I can't send this to a client!"
Told you. That is why that code is on develop and not on master. -
So this guy is asking for help but his ego is too high. What happened was his code raised a ""Trying to get property 'result' of non-object"" error so I told him that the data type is not declared. He still not get it. Like in personal message he asked me wether I know php because he is the founder of some cloud service in php, and I know all about php.
I was like if you know php so well, why cant you realise that $result is not declared?4 -
Got an assignment for my OOP class, looked at it, laughed, "haha this is baby stuff I could code this by farting on the keyboard"
Wrote 400 lines of code without debugging
🙃.... Why do I do this to myself?3 -
WHY???
WHY THE FUCK ARE YOU SO FUCKING SURPRISED SHIT HITS THE FAN EVERY GOD DAMN TIME A CHANGE IS MADE IN YOUR LIMPING SYSTEM?
YOU GAVE NO FUCKING SPECIFICATIONS NOR ANY CARE TO DECIDE ABOUT WHAT THE FUCK YOU WANT IN IT.
EVERY TIME I SEE THE CODE I GET EYE CANCER, DEBUGGING THIS SHIT IS AS HARD AS FINDING THE FATHER IN A HOBO STREET ORGY
AND YOU FUCKING THINK ADDING FEATURES INTO THE SYSTEM UNDER THESE CIRCUMSTANCES IS SO GOD DAMN EASY.
I hope life's god damn dandy for you, get fucked with a pipe bomb.
Oh, hello DevRant, sorry for sitting on the fence for the past months.4 -
Reviewed some Unity game code yesterday
[HideInInspector] public NavMeshAgent agent;
Me:”why is this hidden if it’s public”
Dev: “so designers don’t fuck it up”
Me: “then why have it public”
Dev: “I need it to be set by another class”
Me: “then make it a private bar and create a get:set function”
Dev: “Why?”
Me: “Because hiding a public variables from designers is a bad model and by standards things now to be shown to the inspector should be private”
This shit is why I have no confidence in devs my age10 -
Why isn't this working? I've wrote this same type of code at least 1000 times. Why must there always a problem? Literally every time I try and get something done there is always some stupid error and it's PISSING ME OFF. WHAT THE HELL IS WRONG WITH MY BRAIN AN...oh...I misspelled "fucntion"8
-
A Bad and Sad Day
Hello Monday,
Client : on weekend site went down for 7 hours? Why ?
Me : Let me check the logs
Client : bla bla bla
boss : check ur code bla bla bla
Reason : Some PHP service stopped on server
Client2 : I have purchased this software and you have to made minor changes
Me : Payment Integrations are not working?
Client : Whataa nonsense is this.. you are supposed to do this
Me : We are supposed to do minor changes. They do not have proper payment integrations. If you want we have to write complete code
Client : bla bla.. I gave you working software
:( Why don't you just fuck off .. liars2 -
Tech lead doesn't focus on the fact that I solved the problem, only says stuff like:
- "yeah but this is why we are Agile"
- "did someone else review your code?"
- "you can't expect me to have to understand what the program does"
- "did you get permission from X to solve this problem?"
- "talk to someone else if you have any problem. only come to me with answers"
I guess I don't have to explain I don't like my tech lead.12 -
When will medium and its coding tutorials die out already? Why the hell are every fucking post of this plattform so cringy af, like tf why you start your tutorial with a fucking irrelevant meme you dumb asshole? Your code snippet is mostly garbage and you aint explain shit; I am not even sure if the code is yours. Go eat a dick and learn the subject properly before even start to teach people online.6
-
I don't get it why there are so many people out, that think testing stupid model classes with getters and setter is needed.
Dude. There is no logic in this class ... it's pure data that gets not modified there (well except if you call the setter)
I've wasted way too much time writting useless unit test because some ppl want to masturbate on 100% code coverage 🤦🏻♂️12 -
!rant
My colleague saw this code of mine and said it is annoying conditions are not on the same line, since it is a shared project I can't go "that's my style!"
What do you think should I convince him why we need to follow this approach (at least it can be easily read rather than reading a screen wide line)26 -
First Rant here.
So I was working on some integration test issues when I found this by accident made by a professional level SW engineer:
@Test
public void testMethod() throws ApiException {
Response res = null;
try {
res = serviceToTest.callMethod();
} catch(Exception e) {
assertNull(res);
}
}
Was wondering why tests were being green after some code changes I've made cuz tests could have not been green afterwards.
Together with a senior (I'm also professional only) I've tried to explain him for a good 1-2hrs why this code is useless and he still did it. Good thing there are no errors in the real implementation from him after fixing the tests as it's code freeze here and we are having go live in a few days 🙃
Also luckily he isn't working on our code anymore and has only been doing so for a few weeks.
Wasted a day with it and gonna check all of his code now before I run in the next surprise.1 -
Fucking retards littering my code review.
I had posted some important questions in my comment (essential in order for the code review to move forward) and this asshole posted some stupid out of context meta crap comments no way related to the subject of the review pushing my questions out to the point that a lot of scrolling is needed to see them. Now I need to get everyone’s attention back to the point that matters. Why does this happen to me ? This actually happens quite a lot with other forums as well. Trash mouths going off topic.6 -
WTF is this shit? Multiply by 0 * Math.pow(2,0) upto Math.pow(2, 10).
Like why the fuck would you write that and not write a comment as to why that logic and explain everything else. Fucking fuck.
Turns out this logic is supposed to mimic the back end logic of breaking the flag value into binary and then set other flags depending on each bit. But why would you do that? I was starting to doubt if 0*n = 0.
This piece of code is inefficient, trying to be smartass, doesn't explain shit and doesn't have the only comment that mattered.1 -
My best code review experience?
Company hired a new department manager and one of his duties was to get familiar with the code base, so he started rounds of code reviews.
We had our own coding standards (naming, indentation, etc..etc) and for the most part, all of our code would pass those standards 100%.
One review of my code was particularly brutal. I though it was perfect. In-line documentation, indentation, followed naming standards..everything. 'Tom' kept wanting to know the 'Why?'
Tom: 'This method where it validates the amount must be under 30. Why 30? Why is it hard-coded and not a parameter?'
<skip what it seemed like 50 more 'Why...?' questions>
Me: "I don't remember. I wrote that 2 years ago."
Tom: "I don't care if you wrote it yesterday. I have pages of code I want you to verify the values and answer 'Why?' to all of them. Look at this one..."
'Tom' was a bit of a hard-ass, but wow, did I learn A LOT. Coding standards are nice, but he explained understanding the 'What' is what we are paid for. Coders can do the "What" in their sleep. Good developers can read and understand code regardless of a coding standard and the mediocre developers use standards as a crutch (or worse, used as a weapon against others). Great developers understand the 'Why?'.
Now I ask 'Why?' a lot. Gotten my fair share of "I'm gonna punch you in the face" looks during a code review, but being able to answer the 'Why?' solidifies the team with the goals of the project.3 -
Got rebuked by the Java teacher today at the University for using proper long names for variables in the code. She though I was just wasting time being lazy in the lab. "If something can be achieved by a single character, why type that long variable again and again?". *Everyone in class laughs*
Then, there was an error in my code [turned out to be long long int in Java is weird], and I had no clue what was going wrong [I'm a week old in Java]. So, I had initially called her to help. She made me change all private methods and attributes to public. When asked "why?", got trolled again.
Now, I know it's okay, and not that I really care about what my classmates think of me, but getting this kind of treatment really sucks. And if this is how future software developers are crafted today, maintainability is surely going to be an issue tomorrow.
Maybe staying in this stupid country was my worst career choice. I should have tried harder and gone abroad.11 -
Security!
Offensive and defensive at both code and infrastructure levels.
So many times I see devs not give a flying pancake about security. Whether it be rolling integers for sql injection or permission guarding to prevent someone executing something they shouldn't.
Why is security in this industry always the last thing to be concerned about when it's the first thing that's going to kill your business.
😓7 -
Helping this lady with her Microsoft Access work. Wrote some complex Visual Basic script to make the database look pretty. This is what she is asking:
"Hey, where did you get all this code from? YouTube? Can you please send me the link?"
ffs I'm a dev, why the fuck do you think I need YouTube for this simple VBA script.3 -
Decided to spend my weekend on a little side project that I thought I could finish quickly.
Not only does my code not work, but what I wrote is so horrible that I'm honestly ashamed. Its like the despicable porn that you sometimes end up watching and the horror of realizing what the hell you just watched after you finish - I thought my code was good, but really, it was trash.
Before I started writing I though to myself, "I'll finish this project and then I'll upload it to my Github to expand my repository", but now I cringe at the thought of someone else reviewing this pile of shit I call my code.
It's 2 am here in Israel. I know I should go to sleep, but I'll just stare at the ceiling, feeling unproductive because everything I did today is literally worthless.
How the fuck do I justify this shit to myself? Calling this a "learning experience" feels like a fucking joke.
Honestly, I don't know why I chose Python to do OOP when Kotlin would have served me much better.
But, there's always tomorrow, isn't there?2 -
How do you deal with someone like this?
I've got this dev at my workplace that is terrible to work with, he's 2 main reasons why I say this:
1. He has no clue about team work, every piece of code he writes is written as if he is the only person that has to ever touch that
2. He's overtly protective and opinionated on things that make no sense, they're non standard "rules" that he sets and enforces by replacing others code with his own (often times you see quite large PRs and after inspection you realize he rewrote parts of code to follow his style). These "rules" also take up a really long time to follow and would make any actually experienced developer question this guy's knowledge, one example of this is where he repeats the same code over multiple components for "encapsulation reasons" and God forbid you create a global helper of some sort, he'll straight up remove it the next chance he gets. Another example is that all his components or utilities live inside 1 base directory, so you have roughly 300+ components in a /components directory, all with non standard names so you can't tell which is related to which.
I hate working with this person, it's annoying and it also sucks because he's sort of a more "senior" Dev so managers take his side most of the time.3 -
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 -
Just found this absolute 5 head, galaxy brain implementation in a piece of code which is called in a loop by a background scheduler which has performance issues.
There are 20+ properties, some which are recursively calling other properties with the same implementation style in this class.
Constant out of memory errors have been reported for this software, I wonder why...15 -
Fucking gnu gettext, fucking .po and .mo files and fuck the fucking poedit. Why in the fucking hell a damn i18n solution used by so many languages doesn't support correctly fucking utf 8 characters in strings inside the code, I mean, WHAT THE FUCK, this is my second day trying to make the fucking Python gettext module to translate the fucking word "está" because I've a fucking big code base programming in Spanish that need to be translated. This is the fucking 2016 and we still have problems with fucking special characters? I mean CMMON1
-
Several months ago, I wrote the most beautiful Java code of my life. It was shelved and never merged because it added minimal overhead to every call on the system (I'm talking super small relative to the functionality it provided). I've been asked to resurrect it, but master is too different, so I'll have to rewrite it all. 😭 Since that code, I've been doing research and prototypes - nothing production, and looking back on this old code nearly brings me to tears. I might actually get back to writing code that people will use.
I'm just really emotional about it, and I don't know why. -
What kind of cancerous shit is this? Who the fuck writes special template file for CLOSING divs? Why is this crappy shitty system so popular? It is a bunch of quirky and tangled code written randomly all over the folder.. Wtf seriously, is this "modern coding" or am I missing something?6
-
I have been trying to understand why my student's code isn't working just to find this piece of code. Checking out code early in the morning is definitely not my thing.3
-
For the last week or so I've been writing a userbot for Telegram. Completely from scratch, plus Telethon to not reinvent the wheel entirely. I'm coming from the codebase of an existing userbot.
That userbot is written by a good friend of mine, who makes 6 figures, and whom I respect greatly. However the code is a steaming pile of shit. Now that is not his fault, he largely inherited that code too, tried to fix it, failed, gave up.
I am reimplementing it entirely. I'm only looking at the modules, trying to understand them, and copying over the necessary bits and changing them where necessary. But I've come across some nasty shit.
Userbots often edit existing messages from real Telegram clients. They're kind of like a login to your account, but with a program rather than a regular client. You send a message from a real client, it sees it and does whatever it needs to, and edits your message to give you feedback. Which is great.
However, there's no need to do simple string edits by importing "re". So why do you? Because you're an idiot, that's why. The old bot is based on Paperplane, which in turn is based on Telethon. Why do I see function calls to Telethon in some places and Paperplane in others? Because you're an idiot, that's why. Why does the dig module fail to even give correct answers? Because you know nothing about the DNS, that's why. And you didn't learn about RRs before implementing it.
And don't you tell me that this code is shit, and this bot is slow only when I run it on a fucking Pentium. I run this shit on an i7 and CPU isn't even the issue - memory, disk and such are. If you had any clue whatsoever about efficiency, you would've known because it's blatantly obvious. There's a reason why my machines rarely go past 5% CPU utilization. It's the fastest component in the entire fucking system.
When users come and say.. hmm this application of yours, it consumes a lot of memory. It takes a long time to do X and Y and I don't quite understand why, it seems illogical. Then maybe you should go look at your code, like you would look at yourself in the mirror. And then you fucking go fix it so that I don't have to. You're an engineer just like I am. And I am not even a dev proper - I'm a sysadmin by trade. Why should I have to fix your shit for you?1 -
Why can't software development just be software development? I hate when laws and politics, etc., get in the way
Look at this, for example: https://arstechnica.com/information...
Apple added some code to make the Chinese government happy, which resulted in a bug, which is stupid!4 -
made a prototype and showed the demo to clients. They asked me where it was stored and how to access to the code. Told them where it was stored was was a trial and it has expired. Asked me why I didn't pay the subscription. Also asked me if I could send them the code, for them to "try using it" and "implement it in their office". Told them if they wanted to use the program, it needs to be done again (since this is a prototype). 3 days now, no sounds from the client.9
-
I am this die hard fan of House, MD. A medical Based Drama TV series.
I find soo many similarity between how doctor House diagnosis patients and how we coders debug code.
Why the flying-fuck is there not a similar show for engineers?
Where engineer is followed closes as he debugs a problem? And saves the day?
Why god why.
I just pray for this miracle to happen.
(To start with Dr.House abused vicodin, we coders abuse caffeine and sudo chmod 777 :P )9 -
This customer's dev is going to be the end of me. I had to explain to him why it doesn't make any sense to return a value after throwing an exception.
In a function that was supposed to insert a record amd return its id, in the error handling code:
catch(Exception ex) {
//logs the exception
throw ex;
return - 999; //this code will NEVER be reached, and why the f.... - 999?
}
The customer wants us to develop the project together, but he won't listen and always write whatever he wants. Some might be differences in taste. Like me preferring
if(condition) {
return a;
}
return b;
And him preferring :
Foo result = null;
if(condition) {
result = a;
} else {
result = b;
}
return result;
Ok, that I can accept. But things like the one I'm ranting about... I wont.
I'm starting to wonder what was he doing during his "9 years of coding experience"10 -
i hate group assignments. why is this guy doing a class in accessibility if he's not gonna pay attention and not gonna make the code accessible? and the audacity to tell us that "we can fix the accessibility stuff afterwards". the accessibility is literally the assignment!!! you're not doing shit!!!3
-
Start-up I'm working for as a front-end dev is pretty nice. I have good hardware, free coffee and my coworkers are all decent people. My boss is chill, and I have flexible work hours.
There is this one policy for writing code, however. And I simply cannot understand it, nor can I ignore it because of code reviews: no comments in production code.
I mean, what? Why? Comments are nice, and they make life easier for the future maintainers. At least let me put a small two-liner explaining why I did stuff this or that way. But no, I only get to explain it verbally (once) to the person reviewing my PR. Why, man?9 -
Why most of the Indian developers code so bad? I face it very often, with my colleagues, with the freelancers we hire, even with our clients.
I am an Indian, and I feel so much disgusted (& sad as well) when a client tell us that they have a dedicated team to rework on the code which they outsource from India. If you visit a freelancing website you will see that the Indian developers have the least price, and they bid on literally anything even without understanding what they need to do. And finally when they get a job, they complete it, but with a fully f*cked up code and the worst architecture possible.
I have a lot of friends working in IT, and I personally know that they do not have any passion about programming. They just work for money, nothing else. I don't understand, why? My 7 years of IT career is probably not long enough to find a suitable answer for this 'why'.15 -
Hours lost.
Visual Studio test adapter was failing out during the discover phase of the tests with a stack overflow exception, but that's all the information it gave me. The tests simply would not run.
Hunting through the code line by line, I eventually find this.
WHY IS THIS ALLOWED TO COMPILE4 -
I was pair programming today with one of the seniors in VS. He thought it was weird that I had docked solution explorer to the left side instead of the default right. This makes me wonder, why is solution explorer docked to the right side by default when in almost every other editor (even VS Code), the "document overview" is always on the left?5
-
{ “dow”: “10000001,10000002” }
Me: So what does this mean in the JSON response and why isn’t it a JSON collection?
Dynamics guys: that represents the days of the week. Because that is how it comes out of Microsoft Dynamics.
I’m thinking that they are either bad rest API programmers MS is bad at JSON. I can’t see the code so I don’t know which. No fixes because budget.13 -
So I'm tasked with rewriting the old software my employer uses to track basically anything in his company. They want to stick quite close to the old workflow as much as possible, I get that.
"Why exactly do you need access to the system? No you don't need to look at it just recreate the flow. I'll give you the sql structure is that OK? Oh and this won't take long, you can copy from the old code can't you? Wait why do you need access to the code? No. "
🙄7 -
I don't need you to reiterate what the problem is. I am aware. I was the one who told you what the problem is. Via email and Slack. Why do you keep restating it to me like you are the one who figured out? I know the table isn't syncing with the third party object. I'm trying to figure out WHY. No amount of "I'm pretty sure the sync process is broken" will trigger a solution. Stop coming into my office every 5 minutes with a new "revelation" that wasn't even your own. This isn't my code, and since the owner of said code is not here to fix it, I have to spend some time figuring out how this damn thing works. SO PLEASE, FOR THE LOVE OF GOD, LET ME WORK SO I CAN FIX THIS2
-
Today I was refactoring code with 10 levels of indentation. Java 8.
Lambdas.
Each one is a block which spans multiple lines, that makes the outer ones hundreds of lines long.
This should be forbidden: () -> { ... }
If you don't understand why, please never send me any code.
PS: intellij shows multiple errors on each line.
PPS: my colleague should be happy that I do not use swear words.6 -
MOCHA YOU FUCKING BITCH, THERE IS A DONE() CALLBACK BEING CALLED IN THIS TEST, WHAT IS YOUR PROBLEM??? I WILL RAPE YOUR FUCKING SOURCE CODE. But really mocha test, why u no work so we can both move on with our lives 😣😦😞7
-
Being the only dev in charge of the project, makes you the one to be blamed for.
The God saviour, shiny armoured back end developer that joined the "team" (only me) to help into this new project Just Said in a meeting:
- "I wont code anything for this new project, I can't get the point of It"
So every meeting was
- "why feature X is not ready?"
- "I'm waiting the endpoint for It"
- "well, then mock It"
Now I fucking give up.
One month mocking things and "presenting" features that don't even exist. -
What is it with people just blindly fucking copy pasting from a different project, seeing it work and then submitting it for review.
You copy 2 lines, one of which fixes the thing, WHY KEEP THE OTHER USELESS IRRELEVANT PIECE OF FUCKING SHIT IN THE FUCKING CODE WHY BOTHER WITH KEEPING IT IN IT'S MORE TECH DEBT BECAUSE NOBODY WILL KNOW WHY IT'S THERE
WHY DO I CONTINOUSLY HAVE TO POINT THIS OUT IT'S SO FICKONG TIRING TO CONSTANTLY HAVE TO BE THE ANNOYING REVIEWER WITH +20 COMMENTS ON SMALL PRS IM SO FUCKING TIRED OF BEING 'THAT GUY'
In my language it's called being 'slordig'. Whenever I submit sometning for review I always go over the diff to see is I missed anything that is no longer required and remove it WHY DONT THEY DO THAT TOO
And then their PR stays open for 2 weeks like they forgot about it and during standup they say 'its in review' like I havent already looked at your piece of shit code
FUCK2 -
I just wrote this code, let's see if the dude who is going to work with it after me will rant about checking state right after setting it as null.
I wonder if he will know why I did this ...30 -
The Windows SDK was failing to install because the version of vcredist was newer then it needed.
The setup simply failed without saying anything about that. I had to see the log and find out that vcredist failed to installed with error code 5100 and find that out from Google how to fix that.
Why is MS like this? Why not just say that your vcredist version is too new for this program? Just unistall it and it will be fixed?
I just wasted 2 hours behind this. If my work never needed it I would never even think about using this.1 -
I have already done like 3 internships of 6 months now. And all the companies sucked!
Now the current company I work at is at least not a marketing company filled with cocaïne sniffing callcenter junkies. But why do they always lie so much. They promised free food and drinks and code reviews. What I get is a computer with an i5 and a fucking Jira account.
This is fucking annoying me, im hungry, thirsty and somebody should really check the code im about to push because it cant be good!!!3 -
Reviewing some code the other day, seeing a lot classes like:
SimpleThis
CoreThat
BaseSomething
I get the idea..Microsoft is doing it...disguising complexity with clever adjectives.
I think in my next project I'm going to start naming things like
SpaghettiMonster
GodClass
Repository (cause, every framework needs one)
Then in a year and a half-dozen other devs adding their bits, someone asks "SpaghettiMonster...WTF?...why is this data access called..<dev looks at code> Oh good Lord ...oh well...at least the class name is accurate"2 -
Things I hate the most at the moment:
- PHP
- jQuery
- The person that coded this before me
- The fact that this person is swtiching from jQuery and native javascript over and over for no f*cking reason. Just why?
- My job
- My boss
- The big pile of sh*it that this code is (overall not just the screenshot), no separation of concern, logic code in the middle of the file, no proper slacing and indentation
- devRant no allowing me to put multiple images in one post, because the picture is just one of this whole mess, it's not even the worst part, you'd have nightmare if I showed it to you
- The mental breakdown I'm having14 -
I've found a job as a junior developer several months ago, but I really want to find another job...
I know, my knowledge and skills aren't superior yet, but I am tired of that feeling of being useless.. I constantly self-educate myself after work and university, but still, I often need to ask co-workers "where's this form?", "wtf is that", "how do I access this"... Plus, their projects are HUGE, but no matter how big the project is, there are 2 to 4 people working on each at a time. And 1 person may work on 2-3 projects. And we are usually late for deadlines :/
Also code quality is meh..
Me: Why do we implement it here?
Co-worker: oh, we don't actually use it, it's just to hide warnings and pass the test.
Holy shit, wtf, I've spent half day trying to figure out wtf is this and why is it not working :/2 -
So I got sick of this "nodejs" bullshit around here and proposed a competition to define our next backend tech.
The node defender is already finding excuses as to why they might write bad code because of lack of knowledge , my answer:
If you don't know the tech we ain't gonna use it. -
I am so much stunned i cannot form a sentence on what to say. Lost 3 days trying to fix a bug on why socket.io was connecting to backend TWICE per user. I cannot fucking comprehend this. Backend works fine because via postman it doesnt connect twice. Everything works fine. 72 fucking hours waste d of my life just to find out i had to change
<React.StrictMode>
<App />
</React.StrictMode>
Into
<App />
When i tell you my jaw fucking dropped it fucking did. And it does not drop often or that easily for me. What the FUCK is react strict mode???? FUCK react. I fucking hate this piece of garbage framework. I even like nextjs better. React💩💩💩💩💩💩💩💩💩💩motberfucker WHY is strict mode fucking my code what use does it have who gives a shit why does it have anything to do with websocket connection FUCK react 💩💩💩💩💩💩💩💩💩 how does this piece of camel turd have anything to do with duplicate connection 💩💩💩💩MFKKCER this garbage doesnt exist in my beautiful angular or nextjs PLS why this cancer has to be so headaching i knew I'll get FUCKED if i dont go over a detailed course learning react from scratch. Now im suffering. Learning this garbage the hard way FUCK off4 -
Dude what the fuck with C#'s code style?
Pascal case variable names and classes? Don't we do this so we can differentiate between variables and classes??
Newline between parentheses and brackets?
Retarded auto get/ set methods that serve no purpose than to make code difficult to read and debug?
And after all that shit, string, which is a class, has a lowercase s and is treated as if a primitive?
I really have no idea why this language is so widely praised. The only thing I like about it is that it's the only major bytecode language that has operator overloading and reference parameters.19 -
me: i dont wanna get out of bed to check the code, i feel so comfy and lazy
me: *after 10 mins* dammit, need to change this, need to change that, its still fucked up, why is this wrong *codes more* -
Just spent an hour trying to implement an API without any luck. As i delve deeper and deeper into the code i discover that the client's server doesnt support TLS 1.2 and this is why it wasnt working.
-
When you get a summer job at the university to improve internal tools and asking your guarantor why the crappyness of his code is evident even to a noob pythonista like me and getting the answer like "I'm writing this only until it does what I want" kinda frustrates and demotivates. I'm sure this is NOT how things should be done.1
-
this is my legacy code, it's stupid, Change my mind.
a large number of lecturer and friends are against my thought. personally, i think this kind of code is told to be an OOP yet this is against the OOP concept. why ? first you assign the field to be private, but you implement Getter and Setter method later on, this is the same if you assign the field to be public in the first place.
another minor thing; yes this is old me, i use Bahasa Indonesia as a variable name.31 -
Found this beautiful piece of code, that I wrote apparently a year ago .... oh my 😂 🤦♂ 😅
If I could travel back in time, I would would slap myself for doing this. Although I remember, why I did this, because of many min()/max() operations that I needed. I wanted to keep the code, so that I would know, which code piece belonged to which part, but man ... is that badly written! Nowadays with Clean Code style, I would certainly do it differently.7 -
Around a decade ago, I was fiddling with ajax in jQuery. This piece of code had me stumped for around 2 days, why? Because success is written with 1 final S in my native language...
$.ajax({
'succes' : function(data) { },
});6 -
I do wish that we could have a dev dating site. Why? Cause I cannot give my girlfriend enough time and then she gets moody and then this leads to breakup.
Now I have to freaking choose between her or code this is bad, bad.
If we devs get dev gf she knows how things work and things would work out16 -
So now I’m working with this code that is roughly documented because ”variable names are self-explanatory”.
Yeah, you just forgot that FORTRAN does not support utf-8 variable names...
Why utf-8? Because then if I see:
real :: 座標(3)
I would understand that you mean ”zahyō”, the usual 3D position array ”r(3)”, but no, I need to deal with:
real :: zah(3)
yeah...🙃🔫16 -
Code review:
i ? plus.push(i) : --i ? neg.push(i) : zeros.push(i) || printThis() || checkAge() || !!window.MediaSource...
F***ing such a brilliant programmer, spent 4 hours to write it in 1 line, and will take your the guy who replaces you 4 hours to decipher, why are you so adverse to writing #readablecode?!!!
\n is cheap, if(){} is too
This isn't math class where a 3 line proof gets you kudos, stop wasting my time with your genius.1 -
Testers in my team have been told like 1000 times to follow the style guides that we all follow. That's not that big a deal. The big deal is that they were put on this project without having any mathematics background when the project is all about geometric stuff. So after me as a developer having to put so many hours to explain to them why the tests are not covering the requirements or why the tests are red because they are initializing the data completely wrong, I ask them pretty please to do the checks for the coding style and I have already been 4 hours reviewing code because not only I have to go through the maths and really obscure testing code to ensure that the tests are correct, but every line I have to write at least 4 or 5 style corrections. And some are not even about the code being clean, but about using wrong namespaces or not sticking to the internal data types. For fuck shake, this is embedded software and has to obey to certain security standards...3
-
Had a bad day at work :( They gave me this code for some obscure streaming job and asked me to complete it. Only after 3 days did I realize that the LLD given to me was incorrect as the data model was updated. Another 2 more days, I was able to debug the code and run it successfully— I was able to parse the tables and generate the required frame but not able to stream it back to the output topic as per the LLD. That’s where I needed help but none of my emails/messages were replied to. The main guy who is pretty technical scheduled a code review session with me— I expected that I would run the code and he would spot it something I might’ve missed and why my streaming function isn’t working. Instead, what happened was that he grilled me on each and every line of the code (which had some obscure tables queried) and then got super mad at me saying “Why are we having this code review session if your code is not complete?”. I’m like bruh, you asked for it, and yes, the main parsing logic is done and I’m just having this issue in the last part. And he’s like “Why didn’t you tell me earlier?”. Wtf?! I left at least 5 emails and a dozen messages. He’s like this has to go live on Monday, and I’m like Ok, I’ll work in the weekend. And he’s like “Don’t tell me all these things! You’re not doing me a favor by working on weekends! How am I to ask my colleagues to connect with you separately on Saturday/Sunday? You should have done the on the weekdays itself. What were you doing this whole week?”. Bruh, I was running the code multiple times and debugging it using print statements. All while you were ignoring my attempts to reach out to you. SMH 🤦♂️ I can go on and on about this whole saga.4
-
236 lines of code in main doing like 400 things that should each be their own function DX
Fucking legacy projects
This is why I drink on the weekends4 -
Me: Can you write the exact code one more time but in C language this time, so we can see it?
Other: But why, what's the problem?
Me: I don't know, maybe is garbage collector which collected all your code because IT LOOKS LIKE TRASHHHHH :@:@:@:@2 -
I've heard a lot of nice things about python so today I decided to check it out and HOLY CRAP this is an amazing language! Really makes me wonder why I didn't look into this sooner!
Seriously though! I looked at the documentation and official tutorials for like 30 minutes before writing a selection sort algorithm using only six lines of code. I'm quite mind blown.8 -
The best/worst code comments you have ever seen?
Mine:
//Upload didn't work, have to react:
system.println('no result');
//$Message gives out a message in the compiler log.
{$Message Hint 'Feed the cat'}
//Not really needed
//Closed source - Why even comments?
//Looks like bullshit, but it has to be done this way.
//This one's really fucked up.
//If it crashes, click again.
asm JMP START end; //because no goto XP
catch {
//shit happens
}
//OMG!!! And this works???
asm
...
mov [0], 0 //uh, maybe there is a better way of throw an exception
...
mov [0], 0 //still a strange way to notify of an error
// this makes it exiting -- in other words: unstable !!!!!
//Paranoic - can't happen, but I trust no one.
else {
//please no -.-
sleep(0);
}
//wuppdi
for (int i = random(500); i < 1000 + random(500 + random(250)); i++)
{
// Do crap, so its harder to decompile
}
//This job would be great if it wasn't for the f**king customers.
//TODO: place this peace of code somewhere else...
// Beware of bugs in the code above; I have only proved it correct, not tried it.
{$IFDEF VER93}
//Good luck
{$DEFINE VER9x}
{$ENDIF}
//THIS SHIT IS LEAKING! SOMEONE FIX IT! :)
/* no comment */5 -
My eyes hurt everytime our backend guy gives me a new REST API to implement in our app and always the formatting of the json is something like this. Like why can't you just fucking format it properly so I won't have to look at my code and feel disappointed for writing such ugly code. All because your lazy ass didn't care to understand the fundamentals of how json objects and arrays work !!! It's been a month since I've joined this company and I'm tired of explaining why we should use the status code for failure checking and not this stupid pass/fail status flag. I don't even remember how many times I've brought it up but everytime I get reasons like "Dude, you know what our server is never going to go down or fail so it doesn't even matter". And at that point I feel like I shouldn't even argue with him anymore.3
-
It seems like I'm going on an assignment to a company working with Angular. Reading through the documentation I just want to ask all Java developers to get their greasy hands out of JavaScript. It feels like GWT all over again with Google reinventing core JS technologies just so that it looks like Java. Dependency injections? Observable wrappers? RxJS in general? WHAT IS THE POINT? Why can't I do this in a way adhering to web standards? Why can't I simply use fetch() or axios or whatever? Why can't you support reactivity without forcing me to write more boilerplate than I had on my central heating boiler? I just want to code and not be forced to discover what Google developers think web should be like.
Please, let me out of this hell.
Fortunately, it's not gonna be a long assignment.3 -
Being lazy taught me more about (code) automation that years of study ever did.
“Ugh! Updating translations is boring, why do I have to do this manually?”
“Damn I really hate having to remember endpoints”
“Oh, come on! Its the third time I initialise this the same way!”
I’d love to say this is a motivational speech or something but no, im just lazy lol2 -
So I'm writing this code, that does 2 important things, that cannot be seperated. I run the code, thing1 is correctly executed, thing2 not. No fucking idea, why this happens. Execute again, same result. Debugg the wohle thing, now everything works fine.
WHAT?
I check the code, there are no background tasks, no paralell processing, nothing that should go wrong.
Asking a Senior developer for help, he also has no fucking idea. He tells me to try to wait one second between the two things. Looking for a delay() or wait() function in my programming language but there is none. Ok, building my own delay, writing a "do 1000 times" loop, calculate some shit in it. Execute the code, it works perfectly.
Nobody has a fucking idea, why this is happening and why this solution is working, but now the code is productive and it works fine.9 -
I decided to learn Flutter, because the idea of a common code base between Android and iOS sounds nice. I'm late to the party, I know.
So I install everything and start typing in the tutorial. TAB... two spaces. I absolutely hate that so let's change it. In the settings, it sends me to a FAQ which more or less says this is the way it is, deal with it. But I want my tabs to be four spaces, every code editor since the dawn of time could do this... I'M PAYING FOR THIS SHIT!!!!!!!
Ok, let's check the JetBrains website, I'm starting to lose my patience, but let's do it. At this point I should also mention that I'm feeling pretty stupid. I mean, I'm checking on the internet about how to do something which obviously must be obvious, why am I not seeing it?
I find a page on the official website. JetBrains' replies are along the lines of "Why would you want that?", "The holly wars between tabs and spaces are over", "Most people like it this way", "The overlords said this is the coding style to be used" (Ok, the last one was me reading between the lines). At the end of the thread, they provide a "hackish solution" (their words, not mine). Which doesn't work. Because why should it?
Not even when PyCharm's debugger randomly shat itself and I had to use print statements I got so angry. That was relatively fine, bugs are a fact of life, and the overall package is good, so I kept paying.
But now you're telling me that I cannot use what should be a common feature of every code editor just because you and the overlords know better?
Well, fuck you and the horse you came in on JetBrains, you've just lost a customer.16 -
Ah, the internal struggle.
Half an hour of debugging to find out why my code wasn't being called multiple times inside setInterval().
Only to realised that I was using setTimeout() instead of setInterval().
This is what depression and tiredness does to people. -
As a junior dev from a sysadmin and security background, this is a list of software development concepts I never seemed to truly understand but hope to(rated from most intimidating to least):
1) Frontend web development and all the huge world of javascript frameworks and tools. - It's more overwhelming than the political geography of the Holy Roman Empire in the Middle Ages.
2) Machine Learning, Deep Learning and A.I- too much math that fucks with my brain.
3) low-level programming(kernel,drivers) - sounds extremely interesting but the code in assembly/C/C++ looks like Linear A Minoan hieroglyphics.
4) Rx(insert language here) - I never get why it is useful or why someone invented this. Seems interesting though.
5) Code Reflection - sounds like Thelemic magick.
6) Packaging, automation, build tools, devops, CI, Testing -seems too complicated. I just want to run an executable at the client or make a web app that does something. Why all this process?6 -
probably every time I see my tests failing.
Each time I am writing tests I'm convincing myself "it's an investment", "spend 2 hours now to save 2 days later", "unit-tests are good".
And each time I'm chasing away ideas like "perhaps they are right, perhaps writing unit tests is a waste of time..", "this code is simple, it should ever break - why test it??", "In the 2 hours I'll spend writing those UT I could build another feature"
Yes, it is terribly annoying to write tests, especially after writing the production code (code-first approach). Why test code that you know works, right?
But after a few weeks, months or years, when the time comes to change your feature: enhance it, refactor it, build an integration with/from it, etc, I feel like a child who found a forgotten favourite candy in his pocket when I see my tests failing.
It means I did a very good job writing them
It means it was not a waste of time
it means these tests will now save me hours or days of trial-and-error change→compile→deploy→test cycles.
So yeah, whenever I see my tests fail, I feel warm and fussy inside :)2 -
So today I started working on a code base someone else wrote and stubled across this and thought it was worth sharing.
Why somebody would be doing something like this is beyond my understanding.
Not commenting on the empty catch block keep in mind the whole snippet has nothing to do with rest of the code...
WHY!!!!!?!?!?!?!13 -
I love working doing tasks like moving boxes.
Move 10 boxes from point A to point B. Simple, you know what to do. and you know when you are finished.
I Hate tasks such as: Change this Icon to other icon. (C++) Because it takes me 3 fucking hours to find in code where the fuck this happens! And every time my first instinct when I don't know something is go to the internet and search for it. But in this case I CaN't!.
Wife: asking why I'm browsing the internet looking at memes.
Because I Don't Know where the fuck I need to be to finish my task! And I am stuck in this repeating loop of searching in code, looking at memes and being ashamed of myself that I did not this fucking simple task in like 10 minutes.
And after 3 hours of doing basically NOTHING. I don't dare to ask a colleague about everything.
Please send help....4 -
How many of you feel you learn something on the job?
As for myself, I learn much more from books than sitting day in, day out at work, doing more or less of the same things.
To me, this whole trial-and-error way of 'learning' is not really learning. I don't subscribe to this dogma. I don't 'learn' by messing up and fixing something. I need a full specification of why something works, when and how. I'm not satisfied by just being a code plumber.
This, next to the fact that most jobs in small startups don't provide a budget for you to expand your knowledge.5 -
The PS3 has 2 OS types: GameOS (the XMB menu and what you use to play games) and OtherOS (anything else you'd wanna load, usually Linux.) There's a problem with this: There's a build of GDB meant for OtherOS. That's great, but I need some background debugger for GameOS. Why, oh fucking WHY, has no one made a debugger like this? We have the ability to reserve compute units (SPUs) and/or areas of RAM for code to continue running when something else is loaded, why the FUCK isn't there a game debugger???10
-
god... why is the stupid "tAbS oR sPaCeS?" still around, it's like some stupid ass HR person got it long ago and it's never gone away. nobody has used tabs to write or format code since like the 1950s when there were mechanical fucking typewriters! and if you use them today in your editor, you're WRONG
I will die on this hill.13 -
I am reviewing a piece of code as I type this, and I just had to make a rant about it. In the code there's all these measures for syncing multiple threads, while the entire thing runs does not even use threading. But that's not the worst: when an InterruptedException is caught, is calls Platform.exit() WHICH CLOSES THE FUCKING PROGRAM. WHY WOULD YOU EVER DO THAT?1
-
I spent the whole day coding in python (usually I code in php or perl) and this language is a fucking joke. C'mon, why everything have to be done in such a weird way? And don't say it's python way because it's bullshit way. Want some examples?
", ". join(str(x) for x in array)
to join array of integers. wtf is that?
True|False
why in hell you need the first letter to be uppercase when your own fucking standard says to use lowercase letters in eg. var names and method names. why?
math.isnan(float(x))
to check if a variable (expected to be integer) is NaN. I won't fucking comment that...
Even prolog don't have such stupid things6 -
I am glad that I usually include comments, which make me smile years later...
What are your best findings when you look at your old code?
something like:
// having any and all at the same hierarchy is not valid (and stupid)
someMistakeDeep: 1 // deep fail
// TODO: find out, why the cache is behaving like this. And fix it ¯\_(ツ)_/¯
or my all time favorite comments
// this should not happen.
// wat?
or testing emails like
- tldsAreNotCheckedBTW@something.idontthinkthisdoesexist
- nonValidEmail.com
or urls...
- ProtocolMissing.com
- www.stillNoProtocol.com
And when I'm out of ideas, something like this
messageContent: 'Bla Bla Bla. Exception in FS on Host https://w.com/hpsa',
{ SmsVerb: 'randomVerb' }, // unknown Attribute5 -
THE TYPESCRIPT DEFINITIONS SAGA CONTINUES
> IHateForALiving: so, I don't really know which field we're supposed to use here, but that's your entity I'm working on, so...
> TeamLeader2: wait, what is this? Why does your code have autocomplete?
> IHateForALiving: Every time I worked on some parts of the code I've been writing some type definitions along the way, and it's adding autocomplete if you type hint your code... but I've been told not to write them anymore, so I stopped
> TeamLeader2: But why tho? It's so fucking handy
> IHateForALiving:3 -
My most productive is honestly when I'm on a caffeine high (my personal favorite is a 24oz NOS). I have pulled all-nighters. Accidentally.
But getting INTO the mood for programming is simple and kinda embarrassing. I get excited by seeing programming keywords in real life. For example, at a job I worked at, there was a whiteboard what had the word "include" on it forever. Not about programming at all. But every time I saw it I was reminded of c/c++ and it made me wanna do some code. I don't know why I'm like this. -
I need to vent or I'm going to fucking explode like a car filled with bombs in motherfucking Iraq...
A couple of months ago I inherited a project in development from our team leader who was the sole developer on it and he was the one who designed every single thing in it.
I was told the project is clean, follows design patterns, and over all the code is readable and easy.
Those were all fucking lies.
See throughout the period he was working on it, I saw some of the code as it was going through some pull requests. I remember asking the dev why he doesn't comment his code? His response was the most fucking condescending shit I've ever heard: "My code is self-documenting"...
Now that I have full control over the code base I realize that he over engineered the shit out of it. If you can think of a software design pattern, it is fucking there. I'm basically looking at what amounts to a personal space given to that dev to experiment with all kind of shit.
Shit is way too over engineered that I'm not only struggling to understand what the hell is going on or how the data flows from the database to the UI and in reverse, I'm now asked to finish the remaining part and release it in 8 weeks.
Everything is done in the most complicated way possible and with no benefits added at all.
Never in my career have I ever had to drag my sorry ass out of bed to work because I always woke up excited to go to work... well except for the last 2 weeks. This project is now taking a mental toll and is borderline driving me crazy.
Oh, did i tell you that since he was the only dev with no accountability whatsoever, we DO NOT EVEN KNOW WHAT IS LEFT TO BE IMPLEMENTED?
The Project Manager is clueless.. the tickets board is not a source of truth because tickets set to resolved or complete were actually not even close to complete. FUCK THIS SHIT.
For the last week I've been working on 1 single fucking task. JUST 1. The whole code base is a mine field. Everything is done in the most complicated way and it is impossible for me to do anything without either breaking shit ton of other features (Loosely coupled my ass) or getting into fights with all the fucking libraries he decided to use and abuse.
1 whole week and I can't even get the task done. Everyday I have to tell the project manager, face to face, that I'm still struggling with this or that. It's true, but i think the project manager now thinks i am incompetent or just lazy and making excuses.
Maybe I'm not smart enough to understand the what and why behind every decision he made with this code. But I'm sick to my stomach now thinking that I have to deal with this tomorrow again.
I don't know if I'll make the deadline. But I'm really worried that when this is released, I'll be the one maintaining that nightmare of a code base.
From now on, if i hear a fucking developer say their code is "self-documenting" I will shove my dick + a dragon dildo + an entire razor gaming keyboard up their ass while I shoot their fucking knees off.
oh... and there are just a couple of pages of documentation... AND THEY ARE NOT COMPLETE.2 -
Am I the only one that goes crazy when I have to use a low-code system? It makes no sense to me. The abstractions that help an average schmuck make a feedback loop of abstractions in my brain.
How do I loop over this collection. Is this a collection or a single thing? How does a variable work? Logic doesn't work the same? How do I know what is actually coming into this little port? When does the database get this? Can I see a debug log somewhere? Why can't I see the code behind this little popup window?
I ask someone that isn't a developer and they say, "You are overthinking it."
Fuck that. You pay me to overthink things and describe them in excruciating detail. You wouldn't hand an illustrator three wax crayons and ask them to make a photo-realistic picture.7 -
Just graduated, first real internship.
So basically I'm the only one who do what I'm supposed to do, nobody can help me because they are on project that are totally different. Even my superior who hired me don't know what my predecessor exactly did, he just gave me his gitlab and said "continue... Whatever this shit was".
So I'm alone and the code of my "predecessor" doesn't work obviously because the half of the files are missing, the code has no explanation and he's not joignable. I have to build an algorithm of deep learning from scratch and to do a presentation in one month to explain to everyone why I'm not useless.
Is it really like this everywhere?? Is it the reason why DevRant was created??
I read the quotes when I was in school like "oh no c'mon that really never happened". Foolish boy I was..
But there's nice coffee6 -
Fuck it, fucking fuck it.
Consulting company, been here for 2 years, had some decent projects (surprise, only those that me and my coworker started from scratch), but OMG the fuck ton amount of bizarre code I've seen is just mindblowing.
Everytime I start on a project, spend days improductive because the stack won't fucking work.
We use some frameworks, but the creators of the projects said fuck it, why would we follow the framework guidelines if I can create a supersmart way that nobody fucking understands way of doing things. I mean, It will look smarter and so nobody else can touch this shitty code.
I hate that the most praised developer is the guy that created most of this shit, and his nº 1 skill is moving Jira tickets to the correct state, tracking time (PM's love this, I hate it) and blocking my fucking merge requests because I left an extra blank line, dangling comma or whatever the fuck else, he's like a human linter.
Dude, the code is a piece of shit, my dangling comma is not going to be the problem! And if you really care that much, setup a linter or something.
Fuck this, I'm quitting this week.3 -
Guys. I started with JS, now primarily code in Python, and learning Java for robotics. Coding on and off for the past 4 years. I understand most things, I can tell what code does, but I think I’m a shit programmer. I also find myself running out of ideas for simple things. I’m sad because of this cause I get most programming jokes, and live in this community.
The reason why I’m saying this is because of someone in robotics (keep in mind that it’s my first year in robotics, first time coding in Java) said (jokingly) that he thought I “was a good programmer”. Probs overthinking this, but still tears me up, realizing he’s probably right.4 -
I'm gonna start by assuming I'm not the only one who has to deal with this (because that's the case in almost any "Am I the only one that x?"), so here it goes...
How do you deal with the urge to use a framework / library for everything?
I started to notice this behavior in myself a few months back, "there's definitely someone who has already made this, so why should I reinvent the wheel?", and my biggest fear is to become someone who just links chunks of code 'till it works. Did you had to deal with this at some point? What was your approach to this "problem"?3 -
Creating a Microsoft account was a mistake. They just spam your email constantly from different emails they own, and there's no unsubscribe button. Instead, email footer says “this email is a part of limited promotional email series” or some other BS like that. And you bet, there is no email preferences anywhere in settings.
This is why I use email aliases. Instead of bowing to those bastards, contacting their “support” and begging to stop, I just disable the alias I used to create their account. Boom, done. When I need a login code or some other shit, I'll re-enable that alias, get my code, and then shut it off again.
My inbox is _my_ inbox.3 -
Everywhere I go I see these "Become senior in 3 weeks" courses
That's good and all
But when the fuck will you teach your students to debug and search your errors on google/stackoverflow
This is so fucking ridiculous
Them guys can't even read git push/pull errors and wonder why they make changes to the code but nothing happens10 -
I hate React. I keep reading that people have problem of grasping it, but that's not the case for me. I get it, I understand it, but I hate with passion HOW it's done knowing how nice it's done elsewhere. What really triggers me is how ugly it looks, both from architecture and code level. To me it really say a lot when even code shown in documentation looks ugly, and while reading it you ask ourself constantly "why it's done this way?". When I read React being called an "elegant" solution something explodes in me. Did you saw Svelte? Vue? Damn, even Alpine.js?
I just cannot how overengineered this API is. Even doing simplest things there produces so much junk code written only because this is what library requires. Why? I feel like working with it is a punishment.
And scalability and maintainability? I've never seen large-scale projects more messed up than those wrote with React. And yes, you can blame teams working on them for lack of skills, but it is the library which encourages or not good practices also, and I've never seen such bad situation with other libraries/frameworks.8 -
A newly joined developer (who was supposed to be very senior) comes and asks me how to write a test cos for some reason the person didn't know how to mock.
In Java,
(same for any other implementation which has an interface)
Writes Arraylist list =.....
Instead of List list = Arraylist...
Deployed code (another engineer from another country helped to deploy since this new senior dev didn't have access yet.
But the new senior dev didn't update relevant files in production code which brought down the site for nearly an hour. Mistake aside, the first reaction from this new senior dev is 'WHY DIDN'T THE DEV THAT WAS HELPING DIDN'T DO THE FILE UPDATE?'
This was followed by some other complaints such as our branching stragies are wrong. When in fact the new senior dev made a mistake by just making assumptions on our git branching strategies and we already advised on correct process.
Out of all these, guess this is the best part. The senior dev never tested code locally! Just wrote code, unit test and send to QA and somehow the test passed through. I learnt this when I realised this dev... has not even set up the local environment yet.
I keep saying new but this Senior dev been around like 3 months! This person is in another team within our larger team but shares same code base. I am puzzled how do you not set up your environment for 3 months. Don't you ask for help if you are stuck? I am pretty sure the env is still not setup.
Am I over reacting or is this one disgusting developer who doesn't even qualify for an intern let alone a senior dev? It's so revolting I can't even bring myself to offer help.8 -
I inherited some code today. I am in the process of reworking it to drop into my framework so I can use it with our product. I am seeing this throughout the code...
try:
\do something\
except:
pass
Ahem... HANDLE YOUR DAMN EXCEPTIONS!!! DON'T JUST PASS THEM INTO THE BLACK HOLE OF NOTHINGNESS! FFS!!! Using pass like this means "Fuck it. I don't care if this fails and I want NOTHING to tell management when it does. I want to blindly look into their frustrated eyes and say ..duhh, I don't know why it failed... Fuck troubleshooting. You know what, this job isn't meant for me anyways." My outer voice is politely saying "There is a better way to do this. Please allow me to show you." Meanwhile my inner voice is flipping tables and clubbing baby seals. /rant -
Boss asks why I’m taking so long.
I answer with because everyone is asking about this every 10 minutes and my colleagues can’t help because theyre overloaded themselves. I can’t concentrate but I’m finished almost anyway.
Boss asks to take a look. He says this is not right.
Boss takes his spin on it all. Code is now doing what it wants.
Boss asks why im taking so long.1 -
Ugh I really wish I could just decide on something and role with it, haven't touched my book or website for a while so of course my websites code is all fucking horrible and spaghetti and I want to rewrite and revisit a lot of my book -,-
Why can't I just be happy with something like this! -
So I have this PO who is able to understand technicalities. He is also able to use postman and has access to our code - don't ask why. He is trying stuff out with our apis, looking through code to understand parts of the software, etc.
So there are two sides of having a PO who is able to understand us devs on a certain level:
On the one hand you can explain why story x is taking longer than expected. You can even discuss in a proper way, which is nice. On the other hand is he a bit over the top: when we plan stories he already analysed everything, put code into the story and is telling us how to solve an issue or implement a story.
The sad part is that none of my colleagues seem to be bothered by the fact that he is doing my work.
And recently i even heard a sentence like: "I do not understand why this story should have 3Sp. Would be way lower when I do it". Well.. then do it yourself freaking idiot.
That goes so far that he tells other teams how to fix their code when there is an issue, because he has access to the code and can (unfortunately) read it..
Very unpleasant. :/ So: do you guys have/had the same issues? Am I overreacting?3 -
I slightly changed the color of a label on a WinForms app...and broke everything.
Why the fuck would anyone code logic that is dependent on the exact color of a control.
This code is a train wreck.6 -
!rant
I've always been wondering why do tech companies need everyone to have a strong grasp of algos and data structures?
I've been coding most of my life but didn't get a CS degree so ended up in IT but I kind of want to get into a tech company as my thinking is the quality of code much higher (I spend a lot of time cleaning up other people's code and prod issues over the years...), I've been learning Algo/DS but when I see those technical questions on CareerCup, I go WTF.... it's this the kind of problems you guys do every day?6 -
I don't know why I'm doing this but when I go to websites that aren't mine and found that there's a bug in their site or system, I kinda happily report these bugs and issues to their email with screenshots, findings and steps to reproduce the bug.
Just recently, I just went to a site and found a peculiar timeout error, eventhough it was less than a second to respond back. Only to find that there was an undefined JavaScript variable in their code.
Is there a bug bounty for fixing code?6 -
Well, I am not sure whether this is supposed to be about worst experience as a reviewER or a reviewEE so I'ma do both. First as a reviewer.
So, on my first project in this company, I introduced automated build scripting (read: suggested, was "volunteered" to do it, then had to bust my ads to get it done). Prior to this, our process was run the thing in Visual Studio a bunch of times (don't ask) and package the resulting files. Well, new requirements made this not sustainable.
So after many many meetings in which I assured my co-workers that the script wouldn't cock up and go sideways and format our server (HOW???) and showed them how to work it AND added all the features they requested. I finally send the script out for code review. Oh the joy. Questions like: "why did you implement this?" Came from the guy who told me to implement it. "Can you change the formatting?" I checked and no. "Why isn't this to the code standard?" Because the code standard doesn't include scripting languages.
And here is the piece that takes the whole piss soaked shitsicle pie "I don't understand why we're doing this in the first place. We have a build process already, why do we need a new one?" FUCKING REALLY?!?!? YOU WERE IN THE GODS DAMNED MEETING WHERE WE DECIDED TO DO THIS!!! SET OUT THE REQUIREMENTS!!! LITERALLY EVERYTHING TO DO WITH THIS SCRIPT YOU WERE THERE AND YOU'RE ASKING WHY WE'RE DOING IT NOW!?!?! Fucking hell. I forced it through anyway because I had the higher ups all signed off on it, but seriously. Just because we're doing something new that slightly inconveniences you, doesn't mean it doesn't need to be done. Stop being afraid of change.
Side note: these people actually would regularly hold up process and product improvement because change is scary.2 -
This just happened. I have to tell someone how stupid I felt a few minutes ago.
I am working on a script that is supposed to rename some files in sub folders of the current folder.
I used ChatGPT to help me out with the last part of finding all sub folders. Copied the code into VS code. Changed the path from “/path/to/folder/“ to just “/“, ran the code. It took a bit too long time to finish. Then VS Code asked for permissions to my reminders… “Why?” I asked before I realized that I confused “.” With “/“ for current folder…3 -
WOW Xcode is such a trash fucking application, I am so pissed at how much I have to fight this damn piece of shit program to get my work done
The time it takes to index my code is disgustingly long, I sit and sit and wait for it to FINALLY recognize I've added a new variable to the header file before it can begin to suggest autocompletions, but wait??? Why is it telling me there's errors about another variable? On a line of code that doesn't even fucking mention that variable??? BETTER WAIT IT OUT FOR IT TO INDEX SOME MORE, NO XCODE MY CODE ISN'T ERRONEOUS, YOU ARE YOU CRAP SHOOT!!
AND WHY WON'T YOU LET ME SPLIT VIEW YOU WITH ANOTHER APP??2 -
By Thor (not the god, the dragon), Belial and Thor (the god, this time)...
Just got the sources for the software that runs on the SDR for my project. I think I just found the mother of all legacy code:
The whole behaviour is described in a single, 4000 lines C file. Most of the code is in a giant switch with cases selected from an enumeration with names that don't match their function. All varnames are overly long, yet hopelessly unhelpful. And why three fuck would you use pointer[0].data instead of (*pointer).data or pointer->data like a sane person would !? pointer isn't even an array, so why would you use []?1 -
I always had this mentality that I shouldn’t rely on a certain library or framework for my entire project because what if one day they stop supporting it. (Yeah I’m talking to u vuetify) That’s why I came up with this code structure that for everything that I wanna do I have a ‘driver’ library all coded by myself that interacts with that third party framework or library so if they stop supporting it I could just change a couple of lines of code in my driver file and my codebase should be working again. But I feel like this ‘driver’ approach is not the most efficient way of going in terms of memory usage. Do you guys think I should keep it simple and directly use those libraries or this is actually not a bad approach.7
-
When I started this job 4 months ago, I was given a grace period of a week to "get into the groove of the code". I asked the lead dev where on pulse (intranet) the documentation was, he laughed and then resumed what he was doing. I shrugged it off and continued scrolling through the code.
A week later, working on a story, I'm stuck at why a particular function exists. I say "it would be nice if there was documentation, where is that anyway?". Lead dev replies, "one thing you should know about this company, there is no documentation unless it's API related".
Last month's retro, 80% of our (mine and lead dev) problems were related to a lack of kt, I laughed.3 -
This is how my coworker does code reviews... imagine comment on a line of code:
"Oh why does this not do this and that.
Edit: Oh I've read few lines below, now I understand. But this may break when this and that.
Edit: Nevermind I realized, that never happens, forget about it."
Let me just emphasise, that this is single comment, so it's basically editted multiple times, before submition.
Like wtf, just delete the comment then?!2 -
Stop commenting out code blocks!
Either fix your shit or delete it.
I am open to argue what fixing may mean, as it is perfectly fine to make your broken code not reachable, e.g. via feature flags or skipping certain tests. Yet never ever should you comment those blocks!
So you say you want to keep it for historic reasons? You know, that is why we use version control! If you ever need certain functionality back, you can restore that state.
Each decent IDE also offers a local history where you can even restore code blocks that weren't even pushed or committed. So use that!
Commenting out test cases is a really bad habit, as you have no reminder that you shall restore it.
And no, a TODO and a FIXME won't count as a reminder as you have to actively look for them. And we all know how well that goes, don't we? (One time, I found a typo of a `TDO`. So even with a regular lookup for TODO, stuff will slip.)
Each test suite offers you ways to skip tests if there are valid reasons why they should not fail the build temporary and they offer colorful feedback. Yes, that means that your tests won't be green, but guess what: That's a feature! They shouldn't be.
That yellow is a fine reminder, aka warning!, that you should really fix your shit.
Commented code screams: "I DON'T KNOW WHAT I WAS DOING!" and it confuses the hell out of other developers ("Was this commented because of debugging purposes and should be active again or can I safely delete this!?") and adds verbose crap to the code base.
If you find yourself to be in a place that you comment code a lot, I also argue that your workflow is broken.
When you are using a decent debugger, there shouldn't that much of a need to comment in and out a lot of code in order to reason about your code-base.3 -
Worst experience of my teachers?
I had handed in an exercise, which the teacher ostensibly thought was so elegant that he wanted to show it in class. I felt complimented and recognized. But then he proceeded to show the code on the screen, and I objected: "this is not my code, don't give me credit for this piece of shit". It had written-by-said-teacher all over it, because his coding style includes mysterious omnipresent acronyms that you could never guess the meaning of. My peers didn't believe me and thought I had written said not-so-elegant code, and the fuss about it degraded my reputation.
To this day I'm wondering as to why he humiliated me like that. He probably had best intent, but I don't get it -
I REMOVED every single thing that EVEN REMOTELY looked like it's handling redirections, I REMOVED ALL PLUGINS, and I STILL GET FUCKING REDIRECTIONS and THERE IS NO WAY TO DEBUG IT BECAUSE I GET REDIRECTED AND I DON'T GET A RESPONSE FROM THE CODE I WRITE and OF FUCKING COURSE it does not in any form LOG THIS SHIT ANYWHERE because fuck me that's why.
Truly, wordpress was created to punish us for our hubris.4 -
Why comment on the same thing during code review??
I submitted a PR and had to make a design choice that propagated throughout the module i was working on.
During code review, my coworker commented on every...single...line that this change effected asking "why are we doing x here?" instead of just creating ONE SINGLE THREAD with this question for discussion. There were at least 10 review comments on github from their one review that said "why X?"
Is this normal? Ive only had a few programming jobs and this is the first time this has happened to me.
personally, when someone makes a choice like that, i just make a comment and save the rest of the review until that is addressed.5 -
I love what I do, I'm passionate about what I do and at times I'd rather be home coding than at work in a meeting. While coding is amazing, I can see how someone could become overwhelmed. I can see why people are scared of programming. Not everyone needs to learn how to code so I don't see why so many people are pushing this "everyone should code" agenda2
-
Reminded again why every professional developer should at least read and understand basic algorithms...
Colleague: I don't understand why this agregation query is so slow, the counting is on the DB.
This function used to work fine... Now it sometimes hangs.
Me thinking: why does everyone assume db has unlimited resources and computing power so everything should be quick (no time or space complexity)...
Maybe if everyone understood this stuff our code base wouldn't be so shitty from the start...8 -
So I was just wondering why is do Snapchat take worse photos on android but we have better cameras so I download and check the source code naturally I check the source code and lo and behold I see this apparently snap for android doesn't use the camera it just screenshots it wtf?1
-
So i've just learned C# and started learning how to use it in unity. And one of my friends asked me if I could help him with an error he couldn't understand, and I said sure (Why didn't he search up what the error meant?). I look at the syntax. This is ruby code, come on man I said i know about C# I don't know anything about ruby man.6
-
Why is it so hard to explain to people that
The speed of time = 60 minutes / hour
I mean, I didn't come up with this shit!!! Come on
Also, in other annoyances of today:
VS code updated and ended with a crash, even tho it now says it's actually updated... Should I trust this bitch or not?!?! -
i'm making my python prof wanna strangle me again, it's 100% the same as the example output, for those wondering why i do this to him it's because he said he "favors speed over readability" so i'm doing as he asks
code:
print("\nThe cost of the item is "+str((float(input("Enter the retail value: "))/(1+float(input("enter the markup percentage (e.g. 0.9): ")))))+"\n\nEnd of Report")17 -
When you're not confidant enough in your own code ... but you should be:
Me: "Why the hell is this duplicating data?!?!?!"
-time passes-
-figures it out-
Me: Wait that returns an error wouldn't that be ...
Yeah there was an error on the god damn screen in the status box I created telling me what was going wrong but I just ignored it... I was knee deep in code and my own UI was telling me what was wrong ;)2 -
This is just a sweet little harmless block of code, why should I unit test it?
3 months later...
Bug in production : This is why. -
Legacy code that has a really long and convoluted way of integrating Dropbox authorisation to save files etc.
This happened in a meeting discussing where I’m at with the upgrade.
Me: This upgrade is going to take a while because of how outdated the app is. Also for assets uploaded by the user why don’t we just use active storage for this now as we have rails 6 now. Plus it will reduce a lot of code.
Other Dev: why would we do that? It’s a big change and will need testing.
Me: A lot of stuff is broken after the upgrade anyway and if we have a more built in simple way to do it why wouldn’t we? Also simplifying the code base is always good. The PR is already 1000+ files and we’re going to have to retest the app anyways.
Other Dev: *crickets*
I’m trying to make the app more smooth and streamlined and overall a better codebase as currently it’s shocking there and security holes galore, its like they don’t trust me with changing anything big haha honestly I think I’m the only one who wants to actually improve the application.2 -
If someone ask about why i put/create this kind of code. The only answer is "The Aliens told me to do so"
-
Fixed something that was giving our team a lot of trouble. Teammate asks, "How did you fix that?!?". I said, "I'm a code whisperer." Which really just means I whispered to the code, "Please work. Why won't you work. I just need you to work." The code replied, "Okay, but just this once. And only because you've been in the fetal position crying about me for two hours."
So apparently my computer is autonomous and talks now. What about you guys?1 -
Not sure what is going to be worse. Fixing the bug in this code. Or removing all of the code I added in the name of finding the bug in this code. I have found myself asking myself why I chose coding when I come have picked something less stressful. Like flaming bull fighting.
-
Code review moment that I hate
Me: This is a bad practice. You shouldn't do this
Developer: But it works
*Showed articles and examples why it's bad*
Developer: I see. But it works. Why should I change it?2 -
Today in Windows Clang misadventures from one past wtf
I have 0 fucking clue what is happening, so I am starting to think that this is a windows 11 only bug.
If I (say for example) compile all of my headers into a .dll and then link them to my executable program, an executable will be generated.
If I use the dll to be linked into my executable, but DON'T use any of the code inside, then no executable is generated.
I need to at least use something from within the headers that I create into the main program for it to build and actually throw out an executable.
I could argue that doing this would be the proper way to setup a project in some scenarios, managing your headers and what not.
The only bad part is that it essentially removes the ability for newcomers to just install clang and hello the fucking world into existence.
Mind you, using the Mingw installation is possible still. I-just-don't-fuckig-understand-why-the-fucking-official-build WORKS
THIS is why people are trying to jump into other languages. My dude's shit is solved, but this fucking infuriates me. ANd go on, try googling "clang not building executable" and see how this shit is nowhere to be fucking found sdfksakjdfa3 -
I`m new to coding. So i`m also new at ranting.
I know i have something to rant about. But my nerd culture is just not yet at the level.
I have been taught by a mate to used linux and started vanilla javascript. We use intellj as IDE.
So i have to speak to this client whose previous IT provider was gonna code his thing with ASP and visual studio!!!
Right?! WTF?!!! But that`s all i got!!!!
Im pretty sure its a wtf?! But i don`t have the rock solid reasons why.
Please ranters help me become better at rantong and tell me i`m not wrong and why ;)9 -
I am working in a cool company where during our coding principles conversation , I was giving a walkthrough of my code. I accepted some valid criticism. Shit hit the fan, when my I tried to explain it to them why I have written modules and the necessity of them in this application. So instead of writing several functions , I have created a common module for handling these tasks . After a lengthy argument , I am told that I should write understandable and lengthy code instead of complex and small one. This is what I think so too, that code should be readable by human but at some point , one also has to look decide if this practice is suitable for every carse or not. Man this is fucking killin me. Then I am also told that to rewrite the code and write it in such a way that's naive and easy to understand
-
PHP are you freaking kidding me right now? Why are you forcing me to write ugly and meaningless code like this?
Today I just learned that boolval("false") will return true.
I'd deffo expect this from casting operators, but not from a function which even has val inside of its name.
What purpose is to have functions like these in language if they just serve as plain wrapper for casting operators8 -
inspired by another rant. quick questions!
1. without checking, how do you scan a QR code on your phone? does it have a built-in setting? does it require an app? do you have it?
2. when was the last time you scanned a QR code?
my guess for most people is 1. idk. maybe it's there. maybe not. 2. haven't.
so why are they fucking everywhere? on every advertisment, receipt, payment terminal, etc.
I have nothing against QR. it's a great thing, and would be super useful if I didn't have to go out of my way to get a third party app just to scan it. but it makes me curious: is it this inconvenient for everyone? why are they all over the place? I've literally never seen someone scan one, and many people I know don't even know what it is!16 -
I still wonder which one is better to fully learn/understand. I know to code something in both, I know about the different way of how they handle memory and I know about some of their use-cases, but then again... this stupid question still pops out:
C or C++ and why?2 -
why am I feeling so guilty about this? should I be feeling guilty about this?
PS : this is not a support request. I genuinely feel bad about writing that piece of code and sense something is wrong somewhere, but I cannot figure out what. I stared at the screen for quite a while before giving up.
maybe it might reveal itself to me when I continue staring at it tomorrow.12 -
Noooooo... all I wanted is to quickly reboot to Ubuntu! Why Windows, why?!?!?! So much time wasted staring at this screen, so many lines of unwritten code...6
-
Web code editors are shit for interviews!!
I was given a timed interview test to code on a hackerearth’s code editor. First of all I have never used hackerearth’s code editor because they suck. The problem was very simple and I cleared the round anyways when an actual human saw my code. But my point is why are programmers creating shit editors for other programmers in a timed environment. I couldn’t figure out for the life of me how the fuck I should take an input and output that in this shit editor. The code logic was ready but the test cases failed.
So Should I be learning about hackerearth’s shit code editor in an interview with a timer or should I be judged on the code logic in the specified time?
I seriously find these web code editors most of them annoying. Cause they aint good enough. You need time figuring out the tools first and then code the logic.
Usually in your job you’re gonna use the editor of your choice. Not a fucking shit fucked half arsed hackerearth code editor. My rant is for those of you if you’re taking interviews on such platforms, be there. Don’t rely on those platforms. This automated crap is still crap.4 -
Me: Ok i could do this in a litt--- wtf, this code is a god damn abomination ... I could just sort of do the thing and leave this or ...
Also Me: Fuck down the rabbit hole I go to make this a better place than when I found it....
-sigh-
Later Me: God damn why I do dis....2 -
How "commented" is your org's codebase?
I joined this company a few months ago, and I've yet to see a single comment explaining how/why some code (doesn't) work.
It's a great company for the most part, this just seems to be the standard practice here and I'm wondering how many more like it are out there.9 -
So my friend had an idea for a game and asked me if I could help him develop it. Now, he understands how the code works and can even write quite a bit himself. On several occasions (including today) this happened:
*writes code*
*tests code*
Me: Hmm... this isn't working like it's supposed to
Friend: It looks pretty good, maybe check to see if everything is in the right order
*checks code*
*tries alternative solution*
*checks again*
Me and friend: Well this is even worse than before
*presses ctrl+z a lot to go back to the original*
*opens new project*
*writes new code for same purpose*
*checks code*
Both of us: IT WORKS!!!
*checks again just to be sure*
Both of us: IT STILL WORKS!!!
*compares new code to original code*
Me: It's the exact same code with different variable names!!! Why did this not work before?
Friend: No idea
*puts new code into main program*
*it still doesn't work*
Reasons Java makes me cry sometimes4 -
I don't get why the company where I work is pushing a new cloud platform to create website with.
So yesterday I dove in a website(that an intern made) to make a search and filter on some items.
I thought sure, just finished a website with a lot of search thingies and filters.
But this intern wrote 500 lines of code to just get items from an API endpoint. Dude really why??? Ok, your cool an all and you definitely have skills, but this is just ridiculous.
Burned an day on the piece of shit, while this is in an stupid cloud platform. Without even es6 to write JavaScript. I could have write the whole thing in react In just one day!!
Just work locally on your machine and put you code in a git repo. And deploy when finished. That how I like to work, but no this company wants to keep pushing this cloud platform.
For fucks sake, just let me code! And don't let me use vs or that stupid cloud platform.4 -
Having a method that is only called at one place is ok, if you want to tidy your code (except that that hope is long lost in this project). But if that method usually returns an array, except if it's an empty array, then it returns null, but at the only call location you handle that null case specifically to act just like it would if you just had returned that empty array in the first place, then I ask myself: Why separate that?2
-
I just reviewed a pull request with a test case like (pseudo code):
# Test MyService
const mock = createMock(myService.myMethod)
.whenCalledWith("foo")
.returns("bar");
assert(mock.myMethod("foo") === "bar"));
Why though? Why are we testing the mock? What is happening here? This test has no reason of being there instead of a fuzzy feeling that we now have unit test to lure us into a false sense of security.
I asked why we don't do an integration test. Response was: "They are slow."
Well, duh, but at least they would actually test something.
What do you gain by asserting that the mock is working the way you set it up?3 -
I'll never use code hacked by another dev for work.
I got code that only solves one single fucking use case but there are way more to consider ...
The way the problem is solved ... not dev friendly to use, clean code is non existend and did I mention that it doesn't solve many other important use cases?
All has to be refactored and rethinked and everybody complains about why it takes so much time and the code should not be a technical masterpiece.
I'm sick of these bullshit devs, not taking their role as professionals serious.
Devs should not only learn how to code but also to work as a professional. Soft skills shouldn't be optional and the way how IT is seen has to be reshaped.
There are reasons why in these days the developed software has a lot of bugs and is not flexible. Everything has to be done now, changes come so often that they conflict with previous ideas and nobody knows the complete customer specification so the conflict shows in dev phase up.
Most devs work like they are in a hackerspace. Stop doing this.
You can do this in your freetime but stop doing this when you work in a professional environment.2 -
==============
Getting Feedback Rant!
=============
When "this is simpler" feedback results in a function of 500 lines of code.
When I get "don't do X" in the feedback. Thank you very much. What do you want me to do instead?
Unclear feedback.
When the feedback giver changes his mind after I applied the changes!
When applying the feedback introduces a bug.
Simply opinionated feedback that is not enforced by any tool or backed up by any facts.
Please find something better to do in life.
Unactionable feedback.
"Consider X"
I will not consider thank you very much.
"Verify this works"
Duh..
When the feedback giver knows something that you don't.
I know this is a legit case.. still annoying.
"I disagree with the feature"
Go argue with the PM, not relevant to me, thanks!
=====================
GIVING FEEDBACK RANT
=====================
I rewrote the system. Please review it.
No need to review, just approve.
I will change this as part of the next ticket.
I would like to keep it the way it is.
lazy ass..
You can't test this.
It's impossible to test this.
No need to test this.
There's no point to test this.
I'll test this on production.
Not sure why this is working..
Please document this..
Because documentation is like a thing, you know.
Oh, this code is not related to this PR, I just don't want to open a new branch for such a small change. ignore it.
Ignore this.
This will be meaningful in my next change. -
I submit all my code changes to the integration stream. Co worker integrates my code removes all my changes that breaks his hacky crap. Then complains his stuff doesn't work. I ask him why he he did not conform to the requirments says cause this is what worked before. I look at code see he assigns a value in the message to zero. I ask ever so politely why he is changing the incomming messages. He says this is what works. I Then send an email to him telling him this in an error. He reply saying this it what works. At stand up he complains and says no messages are getting through it doesn't work. The team tells him to revert to the original code. (My code) and update his code after two days of emails to bosses and complaining he reports it works with my code after he is done. He is the senior senior chief grand Pooba and makes more money than me.
-
Lately I take work literally seriously, not due to motivation but due to fear, more on that later, but this is what I think about lately while I'm working
> that line of code should fix it
> oh shit I should've checked logs
> let me check logs
> let me put 10 breakpoints in code and javascript in chrome
> why is this bug not reproducing?
> why I have to work on someone else's spaghetti code?
> this loop iterates over all customers' data I'll just step over it, Oh fuck I resumed
etc etc
I'm feared because where I live, isn't a good place for software developers as there aren't companies which hire, those who hire need ninja developers who complete 1 JIRA Sprint/Phase in 1 day, Here I feel safe as there are people to correct me plus coffee machine -
So we have this new vp guy, and a team in US and another in india
The vp asked me to finish one task by tonight 11pm, and if I need help with the India team's code, call a guy there to help debug
After some debugging with that dev, he replies with:
The code won't work because we haven't implemented it yet
.........
Yo, what the hell is wrong with people
How am I supposed to finish a task that isn't even implemented, and why pushing so much to have it done, wtf I'm so confused with this
Every week a new headache like this, but this was laughable, in two weeks I start a new job 😂6 -
So I am a Ruby guy since I don't now when. Probably forever. Lately I have to code Groovy. People are telling me all the time that Groovy is like Ruby. Let me tell you: No! Groovy is not like Ruby. Groovy is shitty Java with a slightly more usable syntax. Nothing more. It is so so tedious to code and reminds me why I stopped coding Java like 8 years ago. The fact that some features resemble Ruby syntax makes it even harder for me because I cannot code and facepalm at the same time. And I automatically type Ruby code all the time because it looks so similar in some places. I don't have that problem with other languages. Just Groovy. And the fact that Java people like it tells me how bad Java really is. It's just dirty. Guys, I feel so dirty now. And showering this morning didn't help. Had to get that off my chest. Thanks for "listening"9
-
Ok so I'm a student so I don't have a boss but man this one kid who is the lead of my programming team. I swear he works with a 10ft pole up his a**. Maybe that's why he is so tall 🤔. Anyways he is a nerd and by far my LEAST favorite person ever. I wish nothing but BSODs in his future. He is a devrant user but I'm not gonna name him to hurt his feelings. *cough* ewpratten *cough* but im.pretty sure he copy pastas 🍝 his code from stack schools and pastes it in our mainframe robot.
#BSODToPratten3 -
I have always wondered this: The compiler knows that I need to have semicolon at the end of the line. It complains to me about is missing. Why can't it add that semicolon there by itself?? I mean, clearly it's the smarter one of us two. It knows all those language standards and is able to check them. I know jack shit. Still instead of helping me, it has to be a bitch and just nag.
Also, what's this business with "true" or "false"? How the hell should I know? Most of the time I am like "maybe". I want code like this:
if (myVar =~ true)
function1()
else sometimes
function2()
or maybe
function3()
or instead usually
function4()
if (error = true)
fix it9 -
Build failed: "CL.exe has exited with exit code 5"
Thank you Visual Studio for the detailed error report about why the build fails! I can finally fix it!
(This is not fixable by running VS as administrator, also the output file is not running nor locked by some process)2 -
While addressing a Senior Dev's (SD) query from another team.
SD: why is this field mandatory? Can't it be just optional? Any other work around?
Me: Is your code changes already pushed in Devo? In that case, we provide a value which will work since you are not concerned about it.
SD: Yes. It's pushed till production. And, I want to test changes in Prod.
Me: (shared some codes) and explained that this feature for testing is only available in Devo.
SD: I know that. (Shared me a ticket) I want this field to be optional. That's it.
Me: (read the entire ticket. Didn't find anything related their) Told him, I will discuss with team. And meanwhile, for Devo, you can use this value.
Next morning, I accidentally came over some other ticket raised by him only which had the correct doubts regarding request to support this field in production
Now, I don't know why did he share a wrong ticket with me.
And, how will it even help him if that field was even optional.
THAT JUST WONT WORK IN PRODUCTION.
I will discuss with my team and see what can happen. -
Having to hold hands.. dudes been here nearly a year, and I still have to walk him through things. Keep in mind this guy apparently has prior experience. It goes like this:
Him: this process is failing and I don't know why.
Me: did you check the logs?
H: no.
M: ok well what about the code? Have you traced through to find where the error is happening?
H: no not yet.
Couple hours later..
M: Did you get that error sorted out?
H: no.
M: never mind, I'll take care of it. -
Okay why in the world is Console.Readline() in C# such a bitch? So I was working on this small simple chat application using C# and I had a super-freaked-out-ugly-code-vending team mate who volunteered to build the server side code. After trudging through his elaborate and highly complicated plan of working for the server, I decided to make the client accordingly and for close to an hour I had no clue why the program was sending an empty password field. A few debug messages later I realised that a line of code was getting skipped. The compiler was happily ignoring the Console.ReadLine that asked for the password from the user. I swear I felt like one of those parents in the shopping mall with their really disobedient kids.
Btw, I still haven't figured out how to fix the bloody thing.
PS: First rant post woohooo!4 -
I dont understand how am i not fired. I literally dont know how to do shit in this legacy 30 year old junkyard code. I am literally alone working on this project on a giant codebase and have no one for help. The project is burning on fire and scrum master is talking shit for breaking deadlines and i cant do anything about it. Why dont they just fucking fire me that would be such a huge relief bro40
-
Here is why developers should be involved in project planning.
I had a meeting with a Product Manager and a backend dev about rolling out a new rewards program. My employer has a primary website and a lightweight app that’s can be used in an iframe. It has a hard deadline because the contract for current rewards vendor is expiring.
Me: So is this new rewards program also being rolled out in the LW app?
PM: Users earn rewards on the LW app?
Me: Yes.
We’re in a video call and I can’t see the PM’s face, but I know he’s thinking “fuck.”
Me: So are we going to bring in another front end dev to code the FE for the LW app since we have a hard deadline?
PM: [clearly sounding panicked] Another dev?!
Me: Well, I’m effectively coding the frontend twice. Sure both use React, but they use it in different ways. LW app uses React Redux. I can’t just code one and copy and paste it into the other.
To be fair, this PM wasn’t the point person for the LW app. But this is why devs need to brought in on planning.3 -
During my commute to home from office, I got an idea about an app that I really needed and it could be built easily. And I couldn't wait to get home and start building it ... I was super excited...( You know the feeling when you are so clear about what you are going to do that you start to think in code )
Now it has been half an hour since I am stuck on this error , looking at my screen , pulling my hair while sitting on a chair in the posture of a f*cking question mark! Thinking about why I did I even choose to do this for a living , I could have sold vegetables and be happier.
This is just beginning of my career , is this how I am going to spend rest of my life?14 -
Spent two hours looking all over my code with so many debuggers I was about to crap and BOOM found you can't use "dec" for a table or string name in PHP. Just typing December would have saved me hours. Not sure why but put ticks around it and everything was fine. I put this one on htmltypos.com so others can figure it out. May be `dec` is shorthand for dechex....?3
-
Oh god why!?
Somehow I decided that it would be nice to have a proper spell&grammar checker in VS Code for me and my friends to write our reports in Latex with.
Decided I wanted multiple language support, so I turned to language tool.
GOD is this thing slow as a very unmotivated snail!
3s to process 9 phrases!? And then add one second to pack the results in a JSON string!? An option that I'm still very grateful exists, but why the fuck would you disallow line-by-line processing, which you expressly recommend for IDEs, and which cuts processing time by 30%, when JSON output is asked!?
Well, serves me right for thinking for even a second that a Java program could have decent performance...
This whole thing is starting to look like it's not gonna be nearly as fun ss I anticipated it to be.2 -
Delete data because it's corrupt. Angry call from support that their data is gone but they've managed to recovered it. Try to explain why it was removed only to get told they need that data. Fine whatever but if I see any more bug reports about that unit I'm not solving them because it's the data not the code. This is why I wish they'd test on their own databases, which they have, but somehow don't use.
-
Hello friends 😊
I just need to get this of my chest
But at my school we currently have this project where we need to create a webapp eventually which is nice. BUT first we NEED to spend a whole semester documenting stuff! I mean some things are necessary I know that! But a whole semester ffs I'm studying to be programmer so I WANT TO CODE STUFF
Why is my school like this 😩16 -
I think someone already posted something similar but... a problem I had recently when developing a program in php was that my partner was tapping the spacebar twice in indents while I just used tab... You can imagine the result after the merge (plus no github, all by hand)... Had to review all the code top to bottom and fix the code because the teacher said that "bad indent on the code equals bad evaluation on this project, so learn how to indent!" why do people use spaces instead of tabs? is there any language that requires spaces for indents? if not, please stop!! Its painful just to watch and move across the code...6
-
Project Lead in the morning: This one story needs to be finished till 2pm for the QA department.
Me: No problem, everything is finished and there is only one test case open. It should be finished in no time.
Also me: Spends 7 hours of intensive lagacy code debugging to find out why this shit isn't working sometimes. Try to fix it, broke some other things. Retested all cases and found 3 other minor bugs. End of the day, story is still not finished.
Now: Project Lead is mad, QA guy is mad, I am mad.
Conclusion: I hate debugging legacy code and I never again trust the last open test case!!2 -
What do you guys think of code review? It was supposed to find potential mistakes in your code base, and share your knowledge with your co-workers, right?
In fact I have very bad experiences with code review, not just with 1 company, but quite a few. Code review process always comes to something like this:
Reviewer: Hey, I don't like your solution A because of disadvantages A1. You should implement solution B, because of advantage B1 blah blah...
Me: Yes, it's true that solution B provides advantage B1, but at the same time introduces much more complexity to the code base than necessary, and has disadvantage B2. I am aware that solution A has disadvantage A1 but it is justifiable and easier to overcome than B2 imo. In fact, solution A also provides advantage A2 that you might not know...
Reviewer: No, you HAVE TO implement B because of advantage B1 blah blah *repeating why B1 is awesome again*
I feel like it's just people trying to shove their preferences down my throat. Either code review is useless, or the companies I work for do something very very wrong in code review. Anyway, it's really discouraging me fron participating in team discussions.5 -
I have a question, but first some background. When I got my first job, it wasn't clear cut what I would do, but I ended up doing frontend. I really liked doing frontend, so I continued doing so and I still do to this day. I even work alongside designers in a design studio, so I feel very much like a frontend developer.
Obviously, the term "frontend" these days implies someone, in some ways, writing a web, mobile or desktop app using javascript. For me, frontend is also about stuff like accessibility, design, code delivery, and understanding the end-users and the designers that may have prototyped something for you.
I have not been active in any other dev communities than this place, but it seems to me like a frontend developer is pretty much the lowest common denominator ( I guess in terms of skills). If I am right, I do not know why, which is why I'm hoping someone could explain.9 -
TLDR: Why the fuck is a senior developer creating multiple instances of a core piece of logic all over the fucking application?!?!?!?
Context: I am also a senior dev, and have worked with this guy for years. He has even completed me on my clean code practices and architecture, so I really cant understand why he would copy and paste a public class into 3 other models on the project instead of just referencing the original. I’m just posting this hear as my version of screaming into a pillow in frustration, and to avoid badmouthing him to co-workers.6 -
Why do I always have to refactor bad written code ? Is this some kind of karma ?
Undocumented, written by a senior but looks like it was a junior, no unit tests, variables with meaningless names, duplicated code and every possible thing you can find in that kind of code.3 -
Why the fuck...!
Wrote code to import a spreadsheet... A "class code" field is in there to define the the product category... But when no products matching I find that the number is the result of a concatenation, one half of which is not in this file...
Just... Why... ?!?!?! -
I just came with a problem trying to get the value of an HTML input of type date and trying to throw it into a Javascript Date object... After about an hour of searching (Google, Stackoverflow) I realized HTML5 date inputs use UTC timezone (defined by W3C) and Javascript uses your local timezone and this difference is messing with my code giving me a JS obvject 1 day before the HTML date...
Why they do this kind of thing?1 -
"First ask the context of something and never why it's like it is"
I used to criticize bad code and get ratled by it... My mentor said this to me and added "sometimes it was made by an asshole and sometimes it has a reason"...
So, trying to find out if there's a reason for some of the shit I find and understanding their context helps me be better on dealing with my teams -
This is proper version control, right?
((btw: vs code is wonderful idk why i never tried it out before now)) -
A shitty platform that, although open source, there is no clearly documented way of setting a development environment for it. This pile of crap states clearly that it does NOT support RTL languages. One of the core business requirements is Arabic support. What to do? Look for other platforms? WRONG!
Base the fucking business on it and ask ME to see why the SQL database is not encoding the Arabic characters correctly and to look into the logs that back-end puked. My expertise is mobile development anyways damnit. Sure the backend code is Java code (Java jokers and haters, not the appropriate place) and I know it but there is no fucking way to test that motherfucker or to build it! No fucking testing server can be made! Only instructions to get a Docker image pulled and set up.
FML.
"This company is a fucking م."
I cannot believe I am so frustrated that I am ending this rant with a fun puzzle.
Hints to help you decipher the quoted sentence:
Hint 1: That Arabic letter is the perfect letter.
Hint 2: You don't need to be an Arab to understand what it means.6 -
Writing code at work be like:
Hmm okay so if I call this facade looking for an order with a code, and the order can't be found, it will return null. Thank God this bit of code is documented...
Ten minutes later
Why is this not throwing an exception when I pass invalid parameters in...?
Two minutes later
Oh, so this never returns null. If the order isn't found, it returns an empty DTO. Fucking docs.
Seriously, the only thing worse than no documentation is documentation that lies. And that's all I get for my first project at the company, which I am having to do alone. Either no docs, or misleading docs. -
Setting up eslint is driving me nuts.
This shit never works for me.
Every two months:
I read why eslint is important to have in development workflow. I get convinced of it's benefit. I decide to give it few hours to do this correctly this time.
3-4 hours passby, still nothing. I run into problems that only I face. My vscode setup is a complete mess now. My code formatter wants one way if writing code which eslint doesn't like for some reason.
Fuck this shit.
Am I the only one?3 -
Why am I not a queen of blunders. I did one line wrong in the code, my senior has to spent a lot of time on it. I spent like 2 days on it. Turned out to be one of my blunders.
I am so tired. I am done. I will. complete my 4 years in industry soon and this ks what I do.
This is not the first time due to small issues things are delayed.2 -
3 weeks back took a bug..
**long rant**
Looked into it and found that it is exist in older version(say V1) as well.
Sent mail to client stating i can fix this in current version (say V2). Since V1 is already released and our current code stream is V2 and so if we fix in V2 , the code will not reach V1 code base.
**explained to client**
Client : I mean if you fix why it won't work in older release.
Me: Explains how code streams will work.
Client : Okay.. but it will support the functionality in V1 , right ?
Me: (*internally* are fucking kidding me? It won't work dumb ass.) No. It won't work in older versions. I am fixing it in V2.
client: okay.. Let's proceed.
Me: Done code changes. Send code to review. (we have to send review to upper level manager).
Manager1 : I didn't liked this part. can you change this ?
Me : sure. Done.
Manager1 : Now i liked it. Sent review to Manager2.
Me: why the fuck ? Are you not sure about my changes are good?
Manager 2: I liked it, but need some log changes.
Me: Fuckkkk...... Let me change this.. Done. Now can I promote those changes?
Manager2: No we need to send review to client manager as well.
Me: Goddammit.. Okay.. sent review.
*After a fucking week..*
Client Manager : Looks good. Push the code.
Me: Finally..
(This process took 18 days which would have been completed in 3 days if there is only one peer review)
Now the other guy from client whose tracking the bugs reported why it took so long to fix it.
I think my client manager is over paid and can't even know how his company code stream works. Fuck you . why client has these lazy ass old fucking "I don't look into my email" type people. God I hate these "I am in rich country" people.2 -
Do you want to know why all the popular open source projects have less-than-optimal, sometimes really dirty code?
It's because their developers ditched all the unnecessary stuff to just get the damn thing done. When I choose an open source dependency, I don't need unfinished stuff. I need a stuff that works and has all the features I need from the very start. If it works, I don't care about code quality in my deps.
This is the reason why dirty, rushed stuff with a great idea behind it gains popularity. PHP, Git, jQuery, the list is quite large.
While you've been busy polishing your files hierarchy, these guys already shipped their product, gained adoption, and their userbase doesn't need your product anymore.
This is applicable only for true open source, not "it's developed by a full-time team of principal developers and the CTO is fucking Kent Beck, it costs $1m per month but yea we have it on github".3 -
I hate when programming books have shit code examples.
Just came across these, in a single example app in a Go book:
- inconsistent casing of names
- ignoring go doc conventions about how comments should look like
- failing to provide comments beyond captain obvious level ones
- some essential functionality delegated to a "utils" file, and they should not be there (the whole file should not exist in such a small project. If you already dump your code into a "utils" here, what will you do in a large project?)
- arbitrary project structure. Why are some things dumped in package main, while others are separated out?
- why is db connection string hardcoded, yet the IP and port for the app to listen on is configurable from a json file?
- why does the data access code contain random functions that format dates for templates? If anything, these should really be in "utils".
- failing to use gofmt
These are just at a first glance. Seriously man, wft!
I wanted to check what topics could be useful from the book, but I guess this one is a stinker. It's just a shame that beginners will work through stuff like this and think this is the way it should be done.3 -
Why is assigning something to a variable then returning it a code smell?
Simple example:
double makeNumber(String[] numbers)
{
StringBuilder sb = new StringBuilder();
for (String n : numbers)
sb.append(Double.parse(number);
double result = Double.parse(sb.toString());
return result;
}
Why is this bad?
double result = Double.parse(sb.toString());
imagine is a more complicated assignment or calls another function that does some other weird stuff?
If i'm going to debug an issue, i m going to have to unwrap it anyway. So what's the cost of leaving it there?23 -
Trying out Gnome again, because KDE is "just ok", and Hyprland and DWM are fine, but I wanted to try something different. (Actually DWM is amazing, and Hyprland is sorta weird?)
You know, it's not that bad. Doesn't even seem to be as memory crazy as everyone seems to say either...idk what I did, but it appears to be using around a GB, maybe a little less. Definitely not the experience I remember from the Gnome 2 days. Anyway, I was curious, so I was looking at the source on Github....and why the fuck is there javascript in this DE code? WHY. I do not understand.
Maybe I'm fucking nuts, but I actually kind of like the workflow, once I've applied a couple of "tweaks". But seriously, I am fucking gobsmacked at the JS thing. Why.9 -
Please look at this code, I wanna know why the $ and {} was added to the alert method to pop up the key and value of user.
what is their functionality there?
let user = {
name: "John",
age: 30
};
// loop over keys-and-values
for (let [key, value] of Object.entries(user)) {
alert(`${key}:${value}`); // name:John, then age:30
}4 -
tools people REALLY wanna use are written like garbage
and also very active, in terms of tickets and pull requests
but the code is overly complex for no reason and a mess, turns out
I looked at the codebase and I have no clue what's going on
then found the API it's calling and I'm sitting here going "Jesus fuck I could've just wrote my own"
it's actually really strange, I see this pattern often of tools tons of people rely on and want to use but they're coded horribly, tons of bugs, and the code is entirely incomprehensible. though all the low effort pull requests is a new one I guess, generally there's no activity or the maintainer is just gone (maybe it's AI?)
anyway then I looked at the API it's wrapping and I'm confused why this library has such shit usability, and furthermore why the hell the code was like that cuz I read that first for about an hour and just kept going in circles. bruh what
guess I'll find out tomorrow if I'm signing up for unanticipated complexity or these people really did mess this up2 -
So I decided to finish college and get a degree in cs. 1,5 years left woohoo proud...
But they changed the curriculum and now I have to build software in oracle Apex.... Why does this exist? Where can I code? what is this. This is so slow, building software in a GUI. Does anyone here heard of this or even use this...
I just wanted to open my text editor and write some python. :(1 -
Wait. Why does this work? It doesn't copy any of the frontend code into the deploy location.
I'm not sure how this works, but it does. Crap, there goes my morning tracking down this wretched spaghetti deploy code.
At least I understand how it works in production. Shit, why is it different between production and our integ servers ,that isn't good. Maybe I can just refactor it.
That was all on Monday. It's now Wednesday and I'm still fucking refactoring something that wasn't actually broken. It just didn't make sense.
Maybe I should just revert my last three days of work on this branch and move on. No! It's too late, I've invested way too much time into this project...
... and I'm almost done, just a few more commits right? -
My colleague, while debugging a bug:
If (var == 3)
{
printf("colleague name var=%d",var);
//existing piece of code
}
I asked why are you printing the variable value here.
He: "just in case"
He is 3 months more experienced and got promoted last December. Mine is delayed. I met my PM.
PM: You aren't this, You aren't that...
What I heard:
*You aren't licking my boots*1 -
So, I have a weird issue. I'm trying to finish my homework and the only thing that's stopping me is that for some reason VS is skipping a line of user input code. Can anyone help me understand why?
cout << "Make: ";
cin.getline((*c).make, 32);
//when debugging the the console skips this line of code. Trying to figure out the issue.
cout << "\n\nModel: ";
cin.getline((*c).model, 32);3 -
That feeling when you inherit a script to automate something that takes 10 seconds. Why would they even write this? It's not like the task is hard....
...
And why would they write it this way? I'm sure if I just move this part and ....
That feeling when you spend several hours improving and redesigning a perfectly functional script to automate a 10 second task for zero gain aside from cleaner code. "But the code for this quick-and-dirty script I'm never going to look at again looks so much better now!"
... If only it did a bunch of complicated parsing, regex matching, and error checking just so I can answer one less prompt.... Unless that parsing fails. Then it should still ask me for that prompt... And also validate that the answers I give are valid and correct....
That feeling when you spend a whole nother day starting from scratch to implement error checking and complex parsing logic knowing full well the original task takes 10 seconds to do manually and is needed at most twice a day (for a grand total of 20s a day)
WHY AM I LIKE THIS?!?!?!4 -
I'm starting to feel like coding is too much boilerplate all the time.
I've been thinking about why, and I think (and I'm trying to sound humble here) it's because I'm usually honoring the SRP. But this entails this enormous drawback of enormous amount of code!
Don't get me wrong, I'm usually glad with the design I end up with .... but only after what seems to be hours of typing
Anyone recognize this problem? Suggestions, comments?1 -
I still wonder why there's this "a man writes more optimised code than compiler" stuff. Why?
Compiler is automated work, in the worst case it should be able to create multiple e.g. asms and compare the time, right? You can dump all instructions into compiler, it should be able to choose the right one even if it would compile whole days, right? You can't be possibly serious with such a statement.
No "time" arguments, please.2 -
jinja templates make me look towards html in a whole new light. are we 'inserting' data to an already rendered page? am i really mixing server code with ui ? It doesn't feel so. there are if else and loops being executed for html code, like wtf?
I don't know but everything feels so good. like i was literally hating every piece of website i was writing in php. everytime i wrote <div>....</div> followed by <?php ... ?> followed by another html tag /php tag in a fuckin php file, i wanted to kill someone from w3c.
WHY THE FUCK ARE WE ALLOWING THE MIXUP ?WHY IS PHP FILE HOLDING HTM TAGS? WHY?WHY?WHY?
But this... this is beauty. their is separation of concerns. jinja has some big powers, we can loop, repeat, make clauses, inherit other html classes, load html content into blocks, set variables,
but main concepts like file handling, response/request handling,calculations,etc are all being done in separate python files. I know that these jinja templates also might be running python in background, but atleast a developer cannot fuck up that code.
we can be sure that if correct jinja codes are written in html, then it would load correctly. And wherever devs doesn't fuck up, the output is better to understand and more maintainable/scaleable3 -
So here I am debugging a factory in an algorithm I didn't write in a library I didn't write all so I can jam an exception throw into the code to handle input validation.
I am being forced to use exception handling. To handle input validation.
What is my life? It wasn't supposed to be this way. I was supposed to work with smart people who do smart things. Why? -
So I was writing some C code, pretty simple code. I had to pass a matrix to a function. The matrix had been globally defined as arr[100][100]. But the actual size of the matrix was stored in 2 vars m, n. Now when defining the function if I do like this:
void fun(int a[][n])
The code doesn't work as expected but when defined as:
void fun(int a[][100])
Works perfectly.
I have no idea why this is happening, any insight will be very helpful.5 -
been working on a to do app that uses local storage for the past one week. first mistake was using vanilla everything to build, i forgave myself, now I keep adding features upon features and breaking more code and fixing.
I learnt a lot like immutability of imported js(why? for christ's sake)
vanilla js made the code 3x longer so I had to componentize the javascript. the first day I did this was pure torture, spent a whole day tracing errors and undefined code and what not. js is easier to manage now. still cant stop trying to add new features. I feel like the problem is that I didn't make a clear goal and plan it out. I just keep crunching out new code when I see something fancy elsewhere. I'll be disappointed if I didn't complete this.
I still haven't done anything presentable on the ui. cant pull out now1 -
I made the Star Wars Crawl using vanilla web tech and show it on my website once the Konami Code is entered.
IT TOOK ME 2 HOURS, WHY WOULD I DO THIS? I always end up doing random mini-projects that amuse me but bring litteraly no added value to my work. 😂😭 -
"if compiler can infer this, there is no need to add "x ->" , simply use it" ..AAAGHH FUCK YOUUUUU KOTLIN!! what else should i fucking not write? why do't you take a number of my employee and ask his requirements, maybe add a ShoppingKartApp.kt in your compiler next time? it will be completely inferred when i write "Fuck you" in the gradle.
And fucking companies are promoting this! I wonder how those devs are living there
Person A knows only that lambda is
{name:Type,name:Type->code}, and thus writes a clean code.
Person B comes says "This shit suck", writes "{ acc, i -> acc + " " + i }" ,goes away
Person A : "wtf is this shit? why it works?"
Please for the love of god, follow some rules! My first language was python, i love its zen:
- Beautiful is better than ugly.
- Simple is better than complex.
- Readability counts.
- Special cases aren't special enough to break the rules.
- There should be one-- and preferably only one --obvious way to do it.
- If the implementation is hard to explain, it's a bad idea.
-...
I just wish it follows at least one thing from python's zen : "There should be one-- and preferably only one --obvious way to do it."3 -
I don't know if I'm terrible, or if this will sound familiar to anyone. I rushed so much of this project. That's not a good excuse for what's happening, but, speaking about it with a newly converted coder who is a good friend of mine, let him be called F:"
F: I'm so bored I'm going through my script and making a few subs for some repetitive code. I saved 90 lines today.
Me: Bored you say... debating what sort of code of mine to send you for you to ... review.
Because, the reality is, if I dont finish certain features by May, shit will hit the fan lol So I am considering asking for a boilerplate NDA and a few extra bucks from client.nickname, to bring on testers and/or UI guys and/or database guys.
But you seemed to be doing alot lately, so I was thinking, I would deal with fiverr and freelancer.com first
F: I dunno what use id be by May but I'll always look at stuff
Me: A ton. You could literally review any code in any language youre learning. Your review code be: address/models.py class Address 1. TODO for validating formatted address 2. Why is formatted address declared twice?
To which my response would be Fuck thats right and Zomg really
And if I knew about this... last week.. I'd be hours ahead of schedule and not have just forgotten why I needed to fix address
F: Lol" -
It’s hard keeping your girlfriend satisfied when you’re being pressured to code with less to no bugs. I mean, doesn’t she understand that computers are stunningly stupid, and you have to explain to them every last tiny step that you want them to do, and your explanation can't have any mistakes in it. And why this is the fundamental cause of buggy and insecure software😣4
-
Why does GDB always set the bloody break point one line above or below where I want it to be. This is driving me nuts. It's like its author deliberately planted a nasty practical joke in the code.3
-
Sometime back, I tasked a junior to work on designing a quiz application for a college competition. Lo and behold, he had used a POST request for every call to an API and this made the code very buggy and untestable. Here's the conversation that I had:
Me: Dude why is everything a POST request?
Junior: POST is a lot secure right? Nobody would be able to read anything from the request.
FML3 -
Am I the only one who has trouble with some developers I work with making things too overly complicated? It's fine if it's every once in a while, but when almost every code review takes me hours because their code is messy or perplexing, I want to pull my hair out! Why write 50+ lines for something that could be like 10 lines?
When have you worked with a difficult developer that makes things convoluted for no reason? Share your story so I don't feel so alone in this!2 -
Every programming tutorial:
Smh Smh(string smh)
{
String smh;
Smh smh;
Smh(string smh){this.smh = smh;}
Smh smH = new Smh(smh);
SmH = Smh.smh(smh);
return Smh(smh: smh);
}
This code doesn’t make any sense but the point is… WHY???
Meanwhile, they might say “I could name this something else but I’ll just give it the same fucking name” -
So, right now I'm having to study the code of an old pretty complex Delphi calculation tool so I can migrate it to Matlab. There is no actual documentation.
The person who knows the tool best and only one left to have even seen the code is not supposed to know what I'm doing.
I'm supposed to talk him into giving me a quick (1h) walkthrough of the code without actually telling him why, or figure it out all by myself.
He feels too strongly about Delphi.
I kinda don't feel this ...2 -
is laravel app really enjoyable to write ?
i started as a laravel dev. the known story , all code in controllers etc. As i started to improve, fortunately i changed company, and worked with a symfony project. A symfony that looked like java. hundreds of classes, tests, yaml injections , objects for requests, for everything.
I thought that i missed the old laravel days, and i took an extra job on laravel again. I was soooo wrong.
It was not only that the code of the previous dev was inferior to what i am now used, it is that i have to be with an open documentation all the time. Even if the project is in the same version that i have used to earlier (an old one).
You have to check all the time the model settings, the migration, the magic tricks of model mass insert, the castings, the validation rules, why the tests are not finding some routes, why this, why that, how it is written this.
Excuse me, but i think the fun and easiness is far from what they say and what i thought it was. I start to change my mind and believe that inserting the request to a simple php object is more controllable than the gandalf tricks that laravel is doing, and you cannot know if it is worth your time to test it . And more importantly, you do not have to look at the cookbook, all the time@@@5 -
So I’m taking a class on compilers (currently a college student) and as I get further into a coding project we have to do I can feel and see my code degrading into a giant mass of spaghetti. Although I know that I should refactor it because it is messy (currently trying to find a balance between refactoring and actually getting the assignment done) the scary thing is some students in my class think this is perfectly normal code and is what good code looks like. Scary thought that so many people graduating from university have no concept of object orientation, reusability, etc... but what’s even scarier is most professors could not give two shits about any of these notions. I guess this is the biggest reason why a computer science degree does not prepare you for a job in industry.
-
When you start doing cp / noob at it:
Thoughts in my mind
- spending hrs to solve the problem
- should I see the solution. No no how can I build the logic then?
- think try
- told my friend,
He: oh tell me the problem
(After seeing the problem stmt)
5-10 mins scribbling with code
He: There you go it's that simple
Me: really! This is easy. But why I was not able to solve then :|8 -
So I can't believe I'm asking this again. But where the fuck is the source code for BOOTX64.efi for linux ?
And why when i run strings BOOTX64.efi does the word microsoft show up ?32 -
I didn't get into GSoC while writing code which was to be a major aspect of the next release of SymPy. I tell you this org. is maintained by 1 maintainer and 4-5 other members. While most don't understand the code written but will teach you to write some decorator class. I don't want to name that sucker,but he made some changes and then other reviewed and told to change back to what I had originally done. I wanted to cut his throat while I had to made him understand the code. After some 10 days,when I asked that it is ready to be merged,he says "I don't understand this part of code". Fucking bastard if you didn't understand,then why the fuck were you reviewing mine? The people who just did beginner changes but were from October got selected. This org. doesn't check your ability to resolve issues and understand code,but basically wants more number of commits,whether the commit may be mere change in documentation or so, doesn't matter. Again,these people want to help and reviewed my pr,but there should a valid argument. They meaninglessly just wanted to add their name to reviewers for making their proposal strong without helping or say by just showing off. I wrote unit tests, doctests, wrote a full-fledged function, resolved many PRs,and was working alone on one pr which was for the main release of SymPy,but I didn't get selected. Why? Because I started contributing in March. When will these guys understand what matters is how much you contribute not when you start to contribute. The substance and difficulty level of PRs should be considered not just no. of PRs. Hope this org. becomes more beginner friendly and open to more clear discussions rather than showing off.
☮️
Thanks. -
Dear frontend dev,
if you can't check whether a variable is defined or not, why do i have to change the back end to accept urlparam='undefined' as valid and replace it with your default value in my backend? Why are you afraid of 40X's? You should be interested in the bugs of your code.
It feels awful to have a middleware in place catching all errors and replacing them with empty 200 responses 😭. All of this because you don't fucking ensure your variables exist before use.3 -
Another reason why google sucks! Earth Engine Python Api deprecated.
This has been my day:
"ee.mapclient: python3 do not support cStringIO"
On the sample code instructions it says to use ee.mapclient. As I google for answers I find this problem is labeled as #won'tfix without any workaround.
Fml. There goes research. -
I need to go buy a rubber duck so it looks less like I'm talking to myself. Trying to pull out and refactor some shit functionality in a WordPress theme because the client NEEDS it. Frankly all it is doing is creating a custom post type, but they're used to the way they've been doing it and I'm stuck with dealing with it. I generally like this part of my job (my face in the code) but trying to read this huge mess of code with no standards is driving me insane.
"What in the hell are you doing here?" "Why do we have variables for $thedata, $the_data, and $theData?"
"Why are your brackets on the wrong line sometimes?"
"Why is each line in this function enclosed in it's own PHP tags rather than around the function?"
At least if I had a duck I could say I'm talking to him.3 -
!rant
Was too much into jquery, and so when I started my job I made everyone think jquery is the boss and stuff (my team is full of data engineers and business analysts.. No one understands code)
But now, based on my previous rant, I feel I should switch the entire project from a node/express structure with jquery to one with angular2
Does it make sense? Please advice... I am nervous of losing my job coz of this
(even now I hate typescript but I see why angular2 is better than jquery.. So I'll learn it all)13 -
The holidays are the worst period: since I am the only dev, my boss get into the code, and I receive multiple messages - calls the explain "why this is so bad" and even "when you come back from vacation we need to talk about a lot of problems".
So, everything worked when I was there because of magic, it seems... -
i always get sucked into this "cute code" hell whenever i am working with a b2c codebase, and especially with kotlin code.
here's a scenario:
task : build a debounce logic for an input view where each user input is currently triggerring an api call.
my steps
1. read what debouncing is.
2. see if any code is available on the internet
=> found a code piece on the internet with some level of abstraction ( basically a simple final class that implements the input event callback and encapsulates the debounce logic)
3) copy it, run it , it wokrs
------
for any sane coder, these steps are hardly 10-30 mins and they can move on with life. but its your truly that made this task into a 6hour research only to come up at similar solution. my curiosity led me to stupid places
1) why this class is final? what if someone else wanna use it but with a different behaviour? lets try open(non final class) .
2) why even use a class? it extends an interface, lets try to wrap the logic in interface itself (kotlin supports interfaces that don't require implementation)
3) umm , the interface works but it looks ugly, with all its global overridden variables. what about we make it extension?
4) yeah the extension approach is also not very good, lets go back to open class.
5) but extend is super nice to look! lets keep the extension and open class too
6) can we optimise the implementation? why it uses an additional handler? what if we provided everything in constructor? how about builder pattern?
FUCK MY BRAIN! there are so much fucking options that i forgot that i spent 4 hours on this small thing
the simplest approach would have been tk just shove all the listeners and everything in activity and forget about it :/
senior devs on this platform, how do you stop yourself from adding every concept that you know into the smallest possible task?6 -
When I run this Python code on Dcoder, they shows that they are using Python 3.6.8, and not 3.7.1 as they claim. This is why I cannot use dataclasses.
(And yes, I am having an idea about a template engine)1 -
When I started with javascript long time ago I thought JS is weird enough, but Swift is even more.
Why does it allow me to compile the code below? In the last line `taker.take(view)`, the `view` is an optional passed into a function that expects non-optional `some View`. How is this even possible!? I tried to change the view with some the other protocols, then it complaints, why the `View` protocol is different from the others?
```
import SwiftUI
struct ViewStruct: View {
var body: some View {
Text("")
}
}
class Taker {
func take (_ view: some View) {
print(view)
}
}
class Container {
var view:ViewStruct?
func createView() {
view = ViewStruct()
}
func test() throws {
let taker = Taker()
guard let viewIsView = view else {
throw fatalError()
}
taker.take(view)
}
}
```7 -
Hello, chat, i have this annoying and frustrating problem that is making people angry around me, and i dont want to get into details, but basically its about whether a child class should contain the driver class for its parent class in java. Could somebody please tell me which way is the better way to write decent code and why.7
-
Working on a portfolio project - I ran some tests, everything is all good - 100% passing. Computer freezes - pop_os has been giving me shit lately, so I have to restart. Fine.
I get back into code, i re-run pytest - nothing works. Python apparently can't find my modules anymore. I try a few things, nothing. Why? Who the fuck knows - "oh you need this conftest file", "oh you need to remove __init__ from this directory or that one", "oh it's a pytest version iss---" no, no, no - listen here you little shit, it was working two seconds ago. Tell me why and how software I wrote with the most basic ass package structure - literally TWO directories suddenly has no fucking clue how to import the modules. hmm? Even from within the app directory, app.server now no longer recognizes imports from app.main or app.database.
ALL of this worked. It works in new directories without dedicated venvs - it works in new directories with my global python install - it works with any one of my conda envs - it works on other computers - WHY doesn't it work in THIS directory all of a sudden?? Ugh.
What's terrible is that relative imports will probably solve it within the app dir, but the tests dir won't accept them. Moreover, vs code autocompletion can find all the modules, but python itself cannot. Fucking infuriating shit like this is.1 -
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'm not good at DS. I don't know how to code on my own without an IDE. This is the reason why I'm failing interviews for a mid level position. At my current job I'm being underpaid. Inflation is getting higher and my credit cards are at max.
Don't know where to start. and how to get out of this situation.4 -
function customActions() {
changeActions(this);
}
Why? Why is this in the code I'm told to refactor?
What am I supposed to do with this?1 -
new Confession(new Rant()).admit("My kludge bit me in the ass. But If I make a series of classes that encapsulate (hide) the awful hacks, one day I can replace the hacks with nice code. This is why I say I love refactoring. But right now, procrastination looks ugly.").asRant()1
-
When do we consider to "hack" some code in?
I am ashamed that I have to ask this. but the codebase is such a mess that simply adding another function to pass some information to 5 different classes that should not know about this. just to make it work. feels awful to me
wait why do I have feelings I get paid to maintain this shit.2 -
So i have been coding in python and its my main language. Give me 2 reason why i should learn js(node).this question aroused coz i have to work with MS Bot framework and they just support c# & node js (python is still in prev) and their code has asynchronous programming in both *cries in corner also suggest me good resources to lesrn what async prog2
-
So as I rewrite the same code I’m
Reminded of why I’m rewriting the same code.
Screw you Colorado !
This rant is better indicative4 -
I’ve realized that coding is really a stupid waste of time. Why you wouldn’t use a visual coding system or ai code assistant or any of the other code methods that are not coding is just dumb. Here’s to the end of coding and similar systems that makes this brain dead skill a thing of the past. I hope my comments didn’t anger any coders especially since I think coding is really stupid.6
-
As an art guy trying to learn how to code , I’m blown away on how antiquated the entire process is. Not knowing anything about code I can expertly say that there should be a better way to program. It hasn’t changed much since I used BASIC. Is this the best you can do? Typing line after line of rubbish lingo that only code bros know. Why not invent a smart version of scratch? What a waste.
-
That moment when you spend an hour walking through new code because what was working suddenly stopped and the changes made couldn't possibly have botched it...
You realize that a midnight process deletes and recreates the source of this code's data.
This is why I shouldn't take work home.