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 - "code base"
-
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 -
When I finished my studies, I was looking for a job and had an interview at a smallish company.
Boss: can you do C?
Me: yes, I have already done some stuff in C.
Boss: I mean, are you really good in C?
Me, growing suspicious: well yes I already have been using it - but anyway, there's also the project documentation for looking up, right?
Boss: uhm, the code IS the documentation.
I envisioned myself being drowned in undocumented spaghetti code and wasn't really keen on that job anymore, but my following question pretty much ended the interview:
Me: oh, I see. Do you have any roadmap for getting your development to a more professional base?
His looks, priceless! He was just shocked when he realised that he had failed my interview, and that I was a fresher made it even harder to digest for him.30 -
Today I saw this in our code base:
private static final int THREE = 3;
To do this:
rating += THREE;
I laughed, and cried a little.8 -
It finally happened. Upper management is demanding a historical (7+ years) of lines-of-code analysis of our entire code base. They want to justify our positions by validating that the lines-of-code has increased in accordance with the economy. I am not kidding. For every year, they expect some percent increase in our lines of code.17
-
Honestly, I’ve been complaining a lot about the company I joined a few months ago and especially about the code base and I just have to say ...
With good fucking reason, look at this shit, every single *.js file of our Angular app is manually added inside the master page
Not even minimized what the actual fuckkkkkkkkkkk15 -
At my old company one of my colleagues introduced async / await into our csharp code. He created interfaces and showed us a great structuring of his code. Sadly a few weeks later he left the company, because of personal reasons and a bug appeared in his written service. Our senior developer took the issue and complained for like 1 week. That you can't find anything, that interfaces are useless, that async / await is slow and sucks and that we should stop trying to bring new structures into the code base and do things the old way. In the end he deleted all the great things that my colleague introduced and wrote bad and smelly code.9
-
We were four.
I setup a git repo, invited everyone and started coding. After a week I noticed I still was the only contributor.
Turned out they had their own code base in Dropbox. :/6 -
"Can you work on this ticket? It's kind of urgent."
-- "OK"
"And could you please not refactor? Just get this done."
-- "Why? What's the issue?"
"The logic is complex. We should not break it."
-- "Erm, that's what the tests are for. So yes, if the need arises, I'll refactor. The tests are my guidelines if the logic breaks or not."
There's a reason we create tests. So let's not hinder code base improvements by some random fear that stuff might break.
If breaks due to refactoring, we'll fix it by adding a valid test case during and then fixing the bug.
If my refactoring does not break the tests, I'll assume the code base is stable.
If your code is untested, then we have a complete different problem.3 -
Sometimes I wish I was allowed to just strangle my colleagues...
Example from the 'code base':
try:
do_something()
except Exception as e:
log(e)
do_something()
When I asked why they would redo the same call right after it failed I was told that 'It works the second time because it takes time to raise the Exception '.
Bitch, you've got a race condition in your sensitive banking software. You know it's there. Do you really want to trust the time needed to raise your exception will always be enough to synch that dumpster fire you call code?
Show some fucking respect for your craft and fix that shit. But of course they won't, because it will work flawlessly until it suddenly stops working. Taking down who knows what in this damn, undocumenred monolith with it....
Sometimes I'm honestly afraid to trust banks with my money.7 -
---- Startup RantLife ----
A senior developer joined the team, let's name him Bob, and this guy is really good no doubts about that.
He made suggestions, some improvements, but Bob is always waving his hands and says out loud that some part of the code base is really really bad.
I kept quiet until one day I had to pair with Bob to check a feature. Guess what happened, as usual, Bob clenched his fist and start pointing that this code is super ugly.
So let's check the history of changes and boom, Bob was the main writer.
That moment, I was completely silent, trying not to smile as Bob came up with an excuse, he never admits that he is wrong, now he needs a scapegoat and he starts blaming the process, the planning...
I believe that being humble and saying sorry is a quality that it requires time to develop.
So don't be like Bob, please :)12 -
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 -
Just joined a new job. Got into a team of 10+ devs working on one code base. Its spread across many cities and few devs sit together.
They've been versioning their code by mailing each other .zip files of the entire 400MB code base at the end of each day.
Me: Can we have git or svn please?
Manager: SVN? Don't worry about that now, we'll get SVN when the project is finished.
Managed to get an SVN repo running after 2 weeks. FML.17 -
me: your code base is vulnerable, you are not using prepared statements
him: not an issue, nobody knows
me: ...
me: ¯\_(ツ)_/¯13 -
A programmer once explained Nietzsche like this:
A long time ago, god created the world, but forgot to leave a developer documentation, thus the whole world was like legacy code...
And humans are like the end user of this world, and some among them spent time studying it, using the Moral API, hoping to get a result of "http 200 ok" from our world for the peace of mind. But the true operation of this world is still yet unknown...
As time passes, humans begin to find that in Moral API, good and evil are two base classes, and all the other moral properties (like ethic, justice and stuff) are just other classes based on those two classes through multiple inheritance.
One day, when programmer Nietzsche was observing the world's runtime behavior, he came up with a question:
"Did god really use good and evil as base classes? Could it be that they are actually derived classes?"
Most of the world is currently in the favor of mankind, and god must've wrote individual user cases for it's end users, he thought.
This made Nietzsche thinking: if end users are considered into two cases: the strong and the weak, how would the world be designed base on its user story?
Let's think about the strong, they can bully the weak as they please, and there's nothing the weak can do to stop them. In this case whether the Moral API exists or not doesn't fulfill the need of the strong.
But when it comes to the weak, Nietzsche thinks that because the weak cannot fight the strong, they need to belittle bullying and praise the strong for being nice. When the weak does this, it covers their powerless state to some extent, making them look somehow equal to the strong by being capable of commenting.
God might have coded the Moral API to fit the weak's requirement, also adding some public methods for the weak to comment on the strong. If the strong takes care of the weak, they call him nice and good, if the strong bullies people, they call him bad and evil.
That's when Nietzsche realized, that good and evil are both derived classes from the weak, and the base class should be the strong and the weak.
Then he started a series of studies about the Moral API, and got some thesis that persuaded lots of other end users...7 -
!rant
Boss: ehi I was checking out our latest product (made in vuejs) it's blazing fast and responsive.
Me : shiny eyes "... Can I refactor our biggest project from angular 1.5 to vuejs?"
Boss: "mmh what can you save from the old code base? "
Me: "mmh.. A lot.. Mmh like.. The CSS!"
Boss : "no"
I hoped!5 -
Intern Me: "this is what im working on"
Fellow Intern: "Hey cool, can you send me it? "
Me: "What? The code?"
Intern: "Yeah, just send it all"
Me: "You want me to send you the entirety of the 300 million line code base for a proprietary trading system?"
Intern: "Yeah"1 -
As a Java developer, reasons to kill other programmers:
- static mutable variables
- WRITING to static mutable variables
- API call with Framework X didn't work. Add Framework Y along with X and try that. Wrap X in try/catch statement. Catch block fires framework Y.
- six, seven, ten levels of nested code. Zero thought put in organization
- 6K LOC Java files
- spring (singleton? Maybe) object assigning values in static mutable (see pt.1)
- a couple of unit tests in code base that no longer work. Zero unit tests in new code
- unit testing disabled in CI pipeline
- empty catch blocks
- pass mutable data between threads. Modify in various places concurrently.3 -
Created a function called upDawg and started sprinkling it all over the code base. Waiting to see who catches it in our next code review.
All it does is console logs 'Not much man, you?' -
I get through tough devDays like this:
1. Brew coffee more black than a serial killer's soul in the midst of the Gotthard Base Tunnel without electricity in the midnight during a solar eclipse.
2. Flush the blackness down the throat.
3. Load the Playlist: Mostly Death/Doom Metal
4. Put on over-ear headphones (the ones your coworkers can see from a distance telling them to fuck of with their questions).
5. Code through without pauses (except for releasing piss)
6. If you're paid by the hour: $$$profit$$$8 -
Just got picked up for a project. 20,000+ code base, no comments, no docs, variable names like x, xx, xxx, no function name conventions, and a mishmash of Czech, French and English class names.
I thought this job was too good to be true. #fml4 -
MAJOR RANT:
Bug in question: Shortened URLs (that we generate dynamically because fuck you) would have a pipe character added in them, obviously breaking the URL.
I SPENT 3.5 DAYS DEBUGGING A MASSIVE, FRANKENSTEIN-LIKE CODE BASE TO FIND THIS:3 -
Drove 1.5 hrs for a interview at a company which was developing mgmt software for fire departments. They were very pleased with me, as i am with a volunteer FD and a perfect fit in their opinion. I declined after i found out they code base is mostly VB6 and they considered source control unnecessary.
Thanks, but no thanks.2 -
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 -
If you ever come across a Java codebase with capitalized method names, RUN. I should've taken this advice years ago.
-
Early morning I walk in to a build failure email.
"Oh shit! It failed and I'm on the Cc list."
.
"Please don't be me. Please don't be me. Didn't I build it already?" *compulsively launches local build*
*Ctrl-C's current build and feels angry for doubting self*
*Repeats, while trying to replay the incidents of last night in the head.*
"Fuck this. I'm certain I built the module."
.. scrolls email ..
"This is not even my change!"
.. scroll ..
"This is not even my code base!"
*feels foolish, but MAJORLY relieved* -
Any coding challenge that doesn’t start with modifying an existing code base ignores what 95% of software engineering is.2
-
On my first day at work realising that I would be working on a code base with 1.5 million+ lines of code and the only documentation is half a paragraph some guy wrote the day before he left 😑3
-
The guy where I can only shake my head when I see his code, and he is really proud of if implementations, while he
- doesn't care about warnings
- breaks builds and doesn't care
- doesn't care about code styles and indents in a very column based way
- adds tons of comments to his code, mostly hard to understand, and sometimes that much you can hardly find the code
- implements a tokenizer where you have to inherit from its interface (Why would I wanna implement whole functions for a tokenizer and not just use it in place where needed? How do I use two of those in one class?)
- implement a "generic" state machine base class with fixed lengths array of 3 events and 3 strings (Why would I need events and strings hardcoded in a "generic" state machine? Why a maximum of 3?)
- once delivered a software without the needed runtime components, so the whole system (embedded device) wasn't working properly and only by chance missed the point of disabling update mechanisms
- make your ears bleed about his big inventions whenever he sees you, no matter how often he already told you about that blazing new feature5 -
I feel like the whole CoC debate is just:
"Stop using harmful language!"
"F*** you! How else can I tell you that your commit sucks donkey-b***?!"
"You are banned!"
"I'm taking all of my work with me, you c****!"
"No you are not"
"Yes I F***ing am"
Maybe we can reach a compromise, where we can insult bad coders, just not on the basis of their race/gender/sex? Or, fork a version of the code base for "inclusive-sjw-types" and another for "loud-mouth-a**-holes"?
Like it's really a debate on work ethics. Positive change negative reinforcement...12 -
Once a day, take some time to read your colleagues' commits.
You will see how they work, you will learn how they solve problems, you will understand their flow and you will know more and more parts of the code base.1 -
For a project day we had to write a game of our choice in Java.
"You should make this game using the JSwing library and make each component a JComponent"
Later I learned you can simply use a Bitmap as a canvas.
NEVER. EVER. BASE. YOUR. GAME. ON. SWING.
It inefficient to the top of my taskmanager. I had to wrap everything with something like a virtual playground where I had to manage everything myself to not roast my cpu.
I had alot more fun debugging hundred lines of C code with print statements than writing that shit2 -
You know what grinds my gears. Spaghetti code, bloated code base with 5000 line files, and poor file organization.
Seriously really pissing me off right now. Its like walking into a library and there's no shelves and the books are just thrown into massive piles.
I've spent so much time trying to figure shit out just to implement basic things. Its messing with my productivity and making me hate my job.5 -
>me on first day as temporary scrum master
>gets invited to 'optional' scrum master meeting
>meeting is with all SMs globally
>at 6PM local time
>POs also joining because why
>first topic is discussing a defect
>a PO has stroke of genoius
>"Our code base would be much easier to maintain if it didn't have bugs!"
>this gonna be a long meeting4 -
I have previously seen this in a production code base. The same code base included nested if statements (20+ conditions)...
If (condition == false) {
return false;
} else if (condition == true) {
return true;
}11 -
The Vivaldi team: open source is cool. It gave us Chromium to fork from, that's more than 90% of "our" code base!
Question to the Vivaldi team: then why don't you open source your Vivaldi code?
The Vivaldi team: uhm, when it comes to our browser, open source isn't cool because we fear someone might fork it. We need to protect ourselves from that possibility.21 -
This is going to be a rant, but personally, I'm pleased with the outcome of my life now.
I was part of a community for a few years and decided to help them out with my knowledge of programming Lua nearly 2 years ago since they lacked developers for the project itself.
Since it was sort of a custom language that they modified how Lua worked on it, it took me a bit to adapt, but within a few weeks, I was pretty fluent in this so-called custom language they had. Began working on some major updates, additions, removals, and just optimizing this code base. It was a pretty old code base and needed a good chunk of love.
A few months later, I've implemented loads of features, optimized the base whenever I could, and then things start taking a turn for the worse. We get new 'developers' who haven't ever coded the language, and worse they couldn't afford to provide them development servers thus they ended up breaking my servers. I helped them and they learned, they were decent, but now the Seniors and CEO's of the project began to take a toll on me.
I was told that this community had a reputation of driving out developers, ruining their reputations, and that is what started happening. I started getting questioned if I was loyal to helping them, that I've become lazy, even though they were explained I've had mental health issues for a few years and have been hospitalized multiple times.
These sort of attacks kept happening for months, and then they finally pushed my buttons, where I was talking to another Senior of how we should redo the base since it's just so massive and a few tiny updates to the base take a few days to implement across the entire code. What instead happened was that I went to sleep, and this Senior told the CEO I was going to steal the code base and go sell it...
I woke up to messages of how the CEO is all pissed off, and that this what the Senior said. At this point, I started responding with, fuck it. I was so sick and fucking tired of their bullshit. I was the only fucking competent developer, and I did more work in the few months I was there then some people did in 2 or 3 years.
A few hours later I decided to go chat with the CEO and explained what was truly brought up, and he just brushed it off like I was lying. At that point, I lost it. I told him why the code base was horrible since he hired stupid ass developers. He didn't know how to code. People wanted certain items, and he wouldn't be able to add them for fucking months and players sit there making fun of it. Some people state the only differences they see within the code is the code I've done. Basically, he was an incompetent fuck that said he knew what he was doing, and had all these big plans for the future yet couldn't listen to the only competent developer and fucking claimed bullshit.
Now a few months have gone by, I'm looking at their community and it's basically dead with no proper updates except for copy and paste updates claiming to be custom coded. While I'm working on my real life businesses (Which are currently being a headache, but within the year should resolve its issues), starting University for my Computer Science degree here soon, and even considering building my own game here.
Basically, karma is a bitch and that's why when you get loyal people in your life, keep them. (Writing this at 3 am after a few drinks, hopefully, it made sense, I think it does.)
Anyways, goodnight everyone.5 -
Found this in a code base I just started to work with. I'm glad it wasn't referenced anywhere. This is going to be fun...4
-
Me: Hey man, this code looks horrible, let's move this to a function.
Co worker: don't worry, we will make it better later
Me (thinking): yeah for sure...6 -
Minecrafters, come here :)
So, as I wrote before, I'm working on a custom minigame network called Silverfern, I've planned the grand opening for the 1st of February, which is my birthday. Now, the minigame base and 1 fast minigame is ready, the only real thing we have to finish is the punish system (ban/mutes) and a quick anticheat. I need to finish them before the grand opening, I hope I'll be fast and code good enough.
I've started working on it 1.5 years ago, I hope we can see on the server on February the 1st!11 -
I had just started as an SDE intern, and was fiddling around with the code base.
Me: Hey, can you send me the link to our version control system?
Mentor: Umm, what!?
Me: You know, where we keep our code backup...
Mentor: Hmm, is there a need for that?
Me: Yeah, I mean, my past experience tells me to always backup code, just in case something goes wrong.
Mentor: Ohh, that's easy. I'll teach you how I do it.
So, he comes to my workplace, and does this:
1. Go to your workspace folder.
2. Right click it.
3. Zip it.
4. Open outlook.
5. Compose email.
6. Attach the zip file.
7. Mail to yourself.
8. That's how it's done!
I was like what the hell!?!?! Is this really happening?? And then he started basking in his glory, as if he had taught me some secret hack! Seeing this, I couldn't even get myself to introduce him to git. That was the worst part.8 -
SeniorDev: "If we were only allowed to use C# 6 features, we could reduce our code base by 30%"
- other devs nodding their heads in agreement -
Me: "So, are you going to change our entire code base to be C# 6 compliant?"
SeniorDev: "Uh, oh hell no."
Me: "So those C# 6 features are going to reduce our code base by 0%?"
SeniorDev turns around without saying a word.
Getting a bit awkwardly quiet now. Better watch my back.4 -
I really, really, fucking god damn it REALLY need to move a legacy project from the grave yard server and get it in git, and then build a dev environment for it, so I can stop making incredibly volatile changes direct to PROD (backend, frontend and DB all at once and then test it while it’s live and being used, but fuck me if I can be bothered digging through a 10GB code base and attempting to make it work in a multi-environment setup when it’s going to be a long trip down the error logs until it works again 😱🔫2
-
Having pets is a good way to prepare yourself for working in a brown-field environment.
When your cat or dog shits on the floor, you get the same feeling as when you need to dive into a legacy code base.
You know you can't just leave it there, and yet you still want to find anything else to do except for touch the pile of shit in the middle of the room.
Meanwhile you know your users are going to end up trampling over it and mashing it into your carpet.4 -
It's gotta be the Linux kernel.
It's so good at managing base resources on all platforms that it allows hundreds of thousands of hipsta-ass devs to write shitty code and still get decent speed. -
I'm going to talk to my supervisor about redoing their code base.
It will take time, it will suck a bit but I think the long term investment in doing this right will be worth it.
Wish me luck in convincing him 😂🤞7 -
Devs : Lets pick library X, it is well know piece of open source technology, actively maintained by community for over 10 years.
Architect : NAH, it is an overkill to use it in our project , lets build our own solution.
*2 Months later*
The code base is hundreds of thousands lines of code, we basically started to look at library X on GitHub to copy features or get inspiration from that code. In that time we delivered 0 business value, it is horrible to use it and we constantly adding something or bugfixing because no one thought about something in first place.1 -
A month ago. The code for a feature was removed because my boss thought it would not be required. When that was done, a lot of regression testing was done and a lot of code was changed all over the code base. And those changes were merged to main branch along with a bunch of other changes.
But now, he wants me to put that feature back just as the release date is approaching. It's just a humongous waste of time. Now I need to find where all the tentacles of that bloody feature reach and manually put back the code. And the bloody testing needs to be done all over again.
When will I get to stop dealing with these kind of people.7 -
When you don't want to explain what you've done with application's code base so you play the "algorithm" card.
Boss: tell me about the new release.
Me: updated the search algorithms boss.
Boss: cool. Release!
Me: 😎 -
Oh look, a new fancy MacBook Pro 2018.
How come noone is talking about the extreme heat throtteling problem they have with the 2018 laptops?
They can't even hold their base clockspeed when doing compiling code. And they become extremely hot (worse then the last gen, which was already insane).
I know devs/creators/editors want the most powerful computer out there, but supporting something like this is just laughable.
Regards, disapointed customer who tested and returned the laptop after 2 days.16 -
Today was not a good day for me at all ,being considered a junior developer is not a good thing.
Yes I know due to my lack of the understanding of your 3 years old code base I could not meet up with the deadlines.
So as a punishment one of our senior devs asked me to bring my chair to his desk and told me to commit and push my progress every ten minutes .
He'll then review reading each code line by line ., Reverting too.
The worst part was that for the ten minutes I'll need to wait another 5 , because he was watching some Fifa19 gameplays on YouTube.
This went on for 3 hours .
It worked because I feel like a title noob today .8 -
this code is messy .. it has to be refactored..
abstact those classes to commom interfaces .. create a base class for all those common classes .. make this a parameter, make that a setting.. generalize this, pass a behaviour to that.. separate responsobilities..
hmm .. need to handle that special case .. let's just add a temp method for now to get it compiling .. //todo this later .. maybe add a couple virtual bools to handle the base class behaviour
238 compilation errors! .. let's do a static var for now on this.. and just add this for backward compatibility .. maybe hardcode that dll name, I know it'll NEVER change..
aah finally, all compiles..
oh..
this code is messy .. it has to be refactored.. -
Found this gem of a comment in a code base written 4 years back.
/*
Invoke <Service Base URL>/asset/v2/details/<SN> to get asset details
Feeling very bad to include this call, but we really need to use this !!!
This call is gonna take ~20s to respond. I've even increased the overall timeout of this module, just for this call !!!
So, if you are looking to debug any performance issue, I wish you jump directly here,
remove this call and just use master data management (MDM)
P.S: It is not that simple, as MDM and this asset DB (both asset masters) has differences in how the asset is defined :(
*/
Still trying to understand how to remove this costly time-consuming call and replace with an efficient one !!
And, of-course, the original author left 2 years back :(3 -
My company’s code base is so messy that the dev branch and master branch is so buggy. But they put the blame on me as usual.
I use git blame, I wasn’t the author .7 -
Reading all these posts about 1.5 - 2 million line code bases, is that it!?! Your tiny 1.5 is nothing against my unmanageable 22.5!6
-
I love to code, it scratches my creative itch
And i love to work, it drowns my productivity anxiety
But I dread every morning when i wake up to work on my current employer's project
It's that kind of combo of code base spaghetti and all over the place project management that sinks my galleys
Woe is me...5 -
Merry Christmas Everyone. Despite of the things that happened this year. We'll still go to our code base and look how awful we code it haha. Happy Holidays everyone!3
-
Recently for a project I needed to read/write ID3 tags from MP3 files. And after a long search, I found this bloated, monolithic but quite stable library, "getID3".
So, I was looking through the code-base and I found this. This guy literally storing the key value based data embedded as comments within the class file. Then wrote a method to parse the data and even used caching to ensure maximum speed! And such usage is repeated all over the code-base.
So, this is what people used do before arrays were invented :314 -
Nightmare IRL:
Your colleague is in PTO for 2 weeks.
You are in charge of maintaining his project along with yours, CI, code, tests and everything.
Your colleague's code base is a real master piece of shit when you look at it closer. By shit, I mean hardcoded values everywhere, random sleeps now and then, 20 if branches that could be replaced by maps, variables named a b c d everywhere, try catch to silence errors that should not be silenced, etc.
Your colleague left the CI and code broken as shit. Takes forever to run on my goddamn computer.
PMs are spamming you: "What is going on? It's red everywhere. Help! Plz fix this! We are going to release tomorrow!"
FML6 -
We did a small automated review on our code base at work. We discovered that multiple single functions written by my colleagues have a cyclomatic complexity of over 420.
I can't think of words to describe how shit that is.11 -
Some people refactor because feature updates need to be optimized throughout the code base.
I refactor because I am terrible at planning.3 -
it is really frustrating not to be able to actually maintain and improve the code you're working with. i'd be happy to completely dig in and live in the code and get it all - not so much fucked up - , or, totally spitballing here, do some research on how we could improve the functionality and performance in general (which is not "nice to have", but rather ongoing customer pain points), but I'm not allowed to, because management hates having maintainable code or even an adequate number of devs. it rather has me doing hippity hoppity between different projects to make sure nothing gets my full attention. -.-
the only thing i can do is to clean it up a bit during bug fixes, but even heavy polishing won't fix this giant pile of garbage that is called our code base.2 -
Okay so I have been a consumer of devRant for a while now but never posted anything. This is my first.
So yesterday I modified an existing method(some very minor changes!!). Today after coming to the office I see that I have comments from Sonarqube stating
"Reduce cognitive complexity from ** to 15.
I get that it is a good measure to maintain readability but this refactoring is not part of my change at all and any mishap can break the whole code base!!!.
My code even won't build because of this company restriction that there should not be any issues from Sonarqube.
I really want to bash my head against the wall right now.11 -
Question time:
Has anyone used PHP unit with Selenium before?
I have a.. well words can’t explain it nice enough but, beyond a joke, not even funny, spaghetti code base I’ve come to inherit recently, which god help me, doesn’t follow any design patterns at all, it’s just a stamp this here, staple this down over here and throw paint at the wall and hope it sticks.
It’s a mixture of procedural and functional with the rare class kind of mess.
So attempting to refactor by any means is not a real possibility without some kind of behavioural testing in place first otherwise I know I’m going to end up breaking something somewhere and not even know it.
Also if anyone has had the privilege of such code bases, tips to dealing with the mess are appreciated.
Oh and no, I can’t rm -rf or start again.😭3 -
POV: You fixed a hairy bug at a FAANG as a:
L3: "You're a technical wizard!"
L4: "Good job."
L5: "Why did you allow this into your team's code base?"
L6: "Why didn't you delegate that?"1 -
I assigned a new task to an intern who has been with us for a month. He was supposed to prepare the testing environment and test the Geolocation API. When it works, then he can start integrating it with our platform and everything.
After a week, he emails me to say that he thinks the Geolocation API doesn't work. I was weirded out by that because a lot of people use it. We scheduled a meeting and asked him for a demo of his code to see what the error message is.
Him: *no Visual Studio, no code, nothing at all* So here it goes.
Me: ????
Him: *Goes to the API documentation, copies the base URL, pastes it to the browser and hits Enter* See? It says 404 not found.
Me: *literally facepalmed*
Now, he is working on sales management. We totally took him off every software developing projects.8 -
I like coding in a way that anyonr who comes into my code base can understand whats going on. That way more people can maintain the code base.
However, I HATE having people in my code base. Since they leave shit undocumented, and have 10 variables called "data" "items" "o" "p" and another 20 methods called "processData" "convertItem".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 -
!rant
Is anyone familiar with source trail?
https://www.sourcetrail.com/
Wanted to get some info before I drop it into a legacy code base 🤭1 -
Fuck you google android IME team and fuck their open source policy..
So recently i had a chance to work with AOSP LatinIME code, basically our Android keyboard was forked from very old code base of LatinIME and my job was to change its base version to latest Version available on AOSP repository. Downloaded latest Android 8 codebase. Did 2 weeks of deep investigation of what improvements we will get from upgraded code base.
And I came to know that those Google fucking cunt sucking dick heads deprecated that project and broke the whole thing to a pice of shit. Half of the code is broken with fucked up todo stuff and motherfucking missing method implementation with not implemented warnings. What those motherfucker did is that they abandoned the open-source project after they released Google GBoard, and fucked the stable code by adding quard gram support and dictionary download with multi account features which was never completed by those motherfuckers..
Those misguiding donkey shit fuckers kept a depreciated project in AOSP build tree which has not received a single fucking commit from shitty ass Google IME team, is said to be reference model of Android IME implementation..
What kind of fucking shit is going with open-source code in name of making competition high with thirt party Android keyboard developers ..
Fucking shit fucking ime team .. fuck you .. wasted my fucking time reading your shitty code base .. Fucking shit1 -
I hate hearing "this should be a quick one" from the client. Especially when your code base is a fucking legacy with no documentations, no testing, and a multisite that shares the same classes where functions has some crazy if conditions just to satisfy each site's requirements.2
-
SonarQube reduces our code quality through arbitrary nonsense rules, and it's inability to understand perfectly decent Kotlin code. Unfortunately we have a CTO who is completely enamoured with it. I hope someone from Sonar is reading this: You made my pleasurable Dev job a misery, and it may very well be the thing that makes me quit. Fuck your arrogant product. I honestly wouldn't mind it so much if your UX offered a way to discuss each warning and provide affected code snippets so you could argue your case and collaborate on the rule set. But no, you know my code base best right? Fuck you and and your ivory tower.8
-
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
-
Abstract anything dealing with external services where if they go out of business, change their internal policies, or you get a wild hair up your ass you won't have to change your entire code base later.3
-
So here I am sitting on my dusty laptop gaming laptop (because supposedly it would offer me better performance in compiling code and working with CUDA according to the people above me) at a research institute where I just started working at. I am told that there are some issues with the code and that it fails to build on Windows with MSVC that ships with Visual Studio 2017 and later.
I poor some hot tea from my insulated bottle I brought from home and start reading.
I look in this header file and what do I see - a custom uint24_t struct. Interesting...
I keep sifting through the code base. I find some functions that check and change Endianess. Ok, but the software is developed, built on and runs only on Win7 and later desktop systems. Never mind...
Further I find a custom "allocator" that is used throughout the whole code base. It has three inline static class member functions: allocate, copy and deallocate plus some private constructors. And these just wrap around the standard new and free calls. Some flavours of this class actually only deallocate (with a comment above them: "This allocator does not allocate. HANDLE WITH CARE!!!", which is btw the only "code documentation" I have managed to find).
But wait! What is this? A custom thread and mutex. Oh, and string, and vector.
Further down the rabbit hole I find a custom math library with a matrix class that does not support multiplication between a matrix and a vector. Perhaps not a use case I guess...
I continue and come across some UI-related calls. Interesting, I wonder what they are using as a framework. Oh, my...We have an extensive GUI custom framework written from scratch (drawing buttons and all).
All of this is to load an OBJ file and render it on the screen on a standard Windows PC in some way.
Very nice... ;_;1 -
Just started a new job and am looking through the code base. I think I'll have plenty of material for this site at least. 🙃
-
How I feel when im asked to add functionality to a project that was built like 10+ years ago and needs refactored in its entirety but the code base is so terrible that youre honestly better off just starting it from scratch but you are thrown into 5 other million things and there is no time to do it so you just shit out the bare minimum code that will not break the rest of the application.4
-
Finally finished my new app Deep Sleep Fan for iOS. Took 3x as long as I thought it would to develop even though it used a shared code base. Check it out at https://itunes.apple.com/app/...
Now I can go to bed.3 -
Oh my god my brain is hard wired to write c++ in snake case. Spent 4 years doing it. This code base uses camel case.9
-
After CR. Seen a function called "initConfig", with another version of it commented out.
I said in the CR - delete the commented function out.
In response, the developer said that it is needed. The commented version is for local run, while the other is for production.
After a lovely argument about cancer in our Code-base, the project manager concluded that we don't have time to do it better, and basically forced me to basically accept.
I hate being sane sometimes. -
Weekly Group Rant suggestion: What anti-pattern exists that still keeps being propagated or infecting other areas of your code base (like a virus)?
Code samples/screen-shots required.13 -
It's Sunday. A day for prayer. Today I am praying that others dont mess up the code base when I get to work on Monday. Amen.2
-
We're a data science company. We do medical research. We have patented results.
My manager describes half of our code base as on par with a random number generator. At least 1 part of our pipeline overfits random data with 99.9% accuracy.
My manager is a wise man.3 -
Our code base is shit.
To improve, we went through different coaching style: Freudian Psychoanalysis, behavioural psychology, gestalt
- Freudian Psychoanalysis: After several years refactoring and discussing our technical debt we can say that we really understand our code in deep. But it's still shit
- Behavioural psychology: after some months of work, we built a lot of testing. Now the code is still shit, but we don't get dirty anymore
- Gestalt: after few weeks sessions, the code is still shit. But we don't care anymore, we accept it and we are happy
(note. it's an adapted psychology joke)1 -
I am just sick of the things that's been going on.
Joined a mid level startup as full Stack developer working on angular and node js . Code base is too shit and application is full of bugs(100+ tickets are being raised for bugs)
Since the product owner(PO) wants to demo the application he is pushing for bug fixes.
UI code:
1. Application is not handled for responsiveness all these years, it is now being trying to address. Code base is very huge to address though .
2. The common reusable components of UI has business logic inside. Any small change in business logic we are forced to handle in common components which might break up on another components.
3. Styling in 40+ components are made global. Small css change in component A is breaking up in component B due to this
4. No time to refactor.
5. Application not at all tested properly all these years. PO wants a stable build.
6. More importantly most of developers have already left the company and we are left with 2 developers including me.
I am not in a position to switch due to other commitments adds up a lot to frustration11 -
Anyone else feel that the main code base they work on is so old and clusterfucked it could do with a rewrite?5
-
Freaking love it when devs from other teams work on you code base and implement components you already have ... Don't talk to each other, just submit your awsome code and leave a mess behind. But OK ... Just a simple click on Pull Request -> Denied!1
-
Came across a method in the code base that returns a boolean.
It uses a ternary operator which returns true if the result is true and false.. you guessed it... if the result is false.
WHY NOT JUST RETURN THE FUCKING RESULT!!!
What. The. F#%#....2 -
Had to make a change in an ugly codebase. For this I had to change a config value which was duplicated three times in the code base. So I wanted to refactor the code so that the config was in one place.
I worked on this for two days and it was starting to look good. On the third day when I started to work on this I realized that I couldn't start the server anymore. Looking through version control I figure out that my co-worker had stayed till 3am last night to work on the change I was supposed to make.
I had to spend all morning undoing his commits. Once I was done refactoring the actual change took me ten minutes.
Why the fuck would you stay until the middle of the night to work on someone else's task?!
Could have just asked how it was coming along if I wasn't working fast enough for him.2 -
!rant this is just a shoutout, how fucking happy I am. Clean code valued over fast but hacky push of features!
Backstory. I work for a startup. Long story short a guy with an idea needed a developer. I've worked for about a year without pay but now since we're live I get paid. Recently a new field of bussiness came up. I told tge guy with the idea (a.k.a. my boss) that we either could just "hack" the current code to just make it "fit" well kind of... Or refactor our main code base, as requirements where changing at least monthly and we just built on top of the monolith.
Don't get me wrong. It still isn't perfect. However I was able to refactor the main business logic for the last few days, as he understood, it's an investment into the future.
Good guy!
P.S. On another note: happiness or happyness? :O1 -
First day went great. Got my laptop all set up. I still have no idea what I’m doing. Imposter syndrome really set in as of yesterday. Looking at the code base and seeing all of the code made me feel stupid. I understand I won’t know the whole code base.
It’s also my first developer job. I just feel stupid. I’m super eager to learn. But I feel like I’m going to ask a lot of stupid questions as well.
Idk how to feel. I guess a fraud would be the right answer? How can I get more comfortable at my new and first developer job?9 -
Could probably write one myself, but fuck me I wish there was a ready plugin for vsCode or a tool that can fetch external resources into selected folders (e.g css, js, .. in the public folder) and replace it inside the code, it has been way too many times that I synced my code base and went out with my laptop, just to realize I forgot half of it has external resources like bootstrap and my mobile connection is terrible enough to call it quits.3
-
My last company had a code base originating in the 90's and they still write most parts of the GUI with a library that is a thin layer on top of Win32 API, with a self-rolled "ORM" for DB access (with LOTS of enums) and all that with >2million lines of C++ code. The code includes at least two implementations of std vector and std:list. One of which is even *named* std::vector. Feels good remembering that I have left that behind2
-
I spend so much time debugging because the previous developer has empty catch blocks everywhere in the code base.
-
to the guys saying "oop is dumb" / "i don't need oop" / "i've never worked with oop"...
i have some questions:
- which language are you working with
- which problems are you solving
- how big is your code base
- how do you maintain readability of your code?
don't get me wrong, i don't believe that oop is always the answer. i'm just curious which fields these statements are coming from. if they all come from a low level (assembler, C, ..) or functional languages or "scripty" languages (python, JS), or if there are also people working with languages like C++ where oop is pretty much established. and if the latter, i'm curious how people design their code and what problems they solve... tell me your story :D30 -
I don’t just want to learn how to scrap together applications.
I want to become an engineer; one that can wear that badge properly.
I spent a day or two reading my peers code base in .NET Core to start learning its wizarding ways. I found myself emulating some of the patterns.
Then I found a tutorial series on putting together a correctly decoupled RESTful API...the same chap wrote an SDK for Azure CosmoDB.
THIS is what I am talking about.
I can’t believe these guys at work have twenty years C# experience between them and they are churning out this shit for more than 1.5x my salary.
I want to become this but I swear half the coding world does NOT care.4 -
One does not really appreciate pre-built binaries until he has to build a massive code-base [and it takes hours on top-notch hardware, plus a lot of error tweaking].
Thank you to all the open-source supporters that take their time to pre-compile binaries and/or automate builds.
As contributors, they deserve our appreciation as much as developers do.14 -
Swift let's you use most Unicode characters as variable names. But that doesn't mean you should do it.
I just found this in the code base:
let π = M_PI
FML -
I did my first ever open source contrinbutions yesterday! It was quite refreshing working in a different code base and fixing bugs! :D1
-
The feeling when, as a junior dev, you realize the code base is a mess and learning from the senior devs is more accurately learning the preferences of the senior devs. There is no "right" way to do things.
Also, how did anyone get anything at scale with JS before typescript!?2 -
Started to write a blues song about this depressing legacy code base, but then it turned into an emo song, and now it's very heavy metal.1
-
function isBool(input) {
return (mixed_var === true || mixed_var === false);
}
at least this crap wasn't used anywhere in the code base
#gemoftheday #wtf -
I am going to create a define in my code:
#define BIT_CH CHAR_BIT
Then do search replace of CHAR_BIT to "update" the code. Probably need to wait for a refactor. No idea if CHAR_BIT is even used in our code base. I just want to be a BIT_CH.
I was sitting here thinking what a valid use for an object called BitCh or BitChar. Still trying to come up with some valid reason to create such an object.
And people say programming as an art is dead.8 -
Story about my old boss:
I was doing a lot of work in an area that had a data property and a method to build an object. I noticed a reset method that iterated all that objects properties, found the matching data from the data object, passed that data through some logic to format it and then assigned that value to the object property.
As part of my PR I removed that method, since data wasn't changing, and simply called the create method again with data.
The result of tidying the code base and putting it up for review before a merge? I get told I have no respect for my boss's code, that I am undermining him, that I need to be more considerate and respectful of other people's work and that I am no longer allowed to change any code he has written in the code base (half the code base) without talking to him about it first, before it goes up for review. Also if he is working on an area I cannot change anything - not even 1 character (he is working on the core of the app).
Every day there I was so confused :D5 -
CTO/CEO (previous place) - we're not production engineers, so we're going to fork your code base and move way faster than all of you and then you can maintain it. Doesn't that sound inspiring?
25% of the company: ha... Here's our 2 week notice.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 -
Last year in my job, I was temporarily assigned to another team to help out in their project as they were short-staffed. It was a massive project and of course there was a lot of code review to be done. But since I was only temporarily assigned, I still have to do code reviews for my base team, this other team I was assigned to, and for some reason, code review for another team that I barely know what their project is about.
There were times where all I was doing was code reviews that took anywhere between a few minutes to upto 3 days. The amount of mistakes and bugs I kept finding was phenomenal. But I think the one thing that got to me was finding the same bugs/mistakes that I kept pointing out to people to stop doing or to fix e.g DB queries inside a loop just to retrieve data.
To this end I still have to deal with the same issue, but thankfully now it's only to one team.1 -
i am a weak developer, i dont know that much of what im doing, unexpected things come up, i dont like time estimates (estimating time is harder than complexity estimates), some school of thoughts dont like estimates https://youtube.com/watch/...
my manager posed a thought exercise to me, imagine im a contractor (im not, clearly not skilled enough to be) , contractors can estimate how much time precisely a task will take to do their work, get jobs, etc
is it possible to learn this power? how does one git so gud, walk in learn how existing code base works, change, edit , build on top of it, ideally doing quality work8 -
"Manual testing is often quick and easy and satisfying – you can directly test your application, one can see the results immediately on your screen, and one can interact with the application “for real”, instead of in the sometimes-awkward scripted/mocked mode of unit tests. It’s a very natural instinct.
However, it’s also largely-wasted effort! A manual test only verifies the current state of the code base. As soon as you make a change, you’ve started to invalidate the results. If, however, you take the effort to encode the test in code as an automated test, it continues to be valid indefinitely into the future."
https://blog.nelhage.com/2016/12/... -
I had high ideals when I started working here. The entire code base was practically devoid of comments. Its been 5 years and it is still practically devoid of comments. I have become like them...8
-
Coding chalenge.
So... Spent almost two hours to put this little device to work with the keypad.
The device is a arduino micro, special one that can work as mouse /keyboard or any kind of input on most devices (pc, Android phone,...)
The objective is to make a macro keypad to:
- Fast insert text
- Play sounds in games over voice chat.
Think of it like this, you start a new html file, press one key and all the base code is inserted.
So... Why so long? Tought was the hardware, tought the keypad could be set differently that most, code mistakes...
My error was all here, masked from the debugger by a if:
char keys[ROWS][COLS] = {
{'1','2','3','4'},
{'5','6','7','8'},
{'9','10','11','12'},
{'13','14','15','16'}
};
Easy to figure right? Only saw it after reading all the code twice.9 -
We just found out that refactoring our code -base is no longer optimal for the health of the company because our deadlines are too tight. We'll get back to refactoring in a year.1
-
Functional test are failing.
Expected: 7109
Got: 9000
Grep code-base for 7109. No findings. 0_o
Dig through test setup written by a drunk.
Find:
assert(actualPrice === 1800 * conversionRate)
Goddamnit. You shall not calculate your expected values in a test setup.1 -
I am surrounded by incompetent fucking idiots, from the team lead that does a half arsed job at coding and then wonders why nothing further down the chain works to whole component teams that seem to be lagging so far behind they don't even know what the current code base looks like.
And who's in the middle of it all running around fixing all the problems these fucktards create, why yes it's me.
I would leave to let it implode and see what they'd do but I already know, they'd leave it till I got back so I could fix it all for them.
Feel like going around with a rolled up news paper and whacking each of them on the back of the head while screaming "no, bad code monkey, bad, fix your own bugs"
I hate being the go to fix it guy sometimes.1 -
Chased a bug for nearly a week. Huge code base, over 2mn lines consisting of a mess of C++, Python and Lua glued together.. Wrote a very complex distributed computational framework. End up with a elusive compiler bug in GCC.. FML
-
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 -
One stubborn (but not very good) dev working on one part of new project (Windows desktop application with C# underneath) decided he didn’t like the interfaces we were agreeing for the algorithmic code.
Instead of discussing with the team (we were still very much in design phase), he made his own interfaces with the same name but in a different namespace, and in his assembly rather than in the base library. He was senior to the rest of the dev team, so when we raised our concerns he pulled rank and just carried on.
I resigned not long after that. -
I've got staff, I've got staff
And they bill time and a half;
Now I only write the gist you see
And they can code the rest
Open source, Fraying nerves
Smoothing out regression curves;
Try this framework, it's ambitious
It was made of spit and wishes.
Coffee rings, at first glance
But of course miss, he's freelance;
And this code base is a truly scary mess
I can't expand the menu
Even chance its home brew, unit test;
Unit test, unit test!1 -
Have you ever committed to an impossible deadline simply because your client would have been completely FUCKED if you didn't?
this would have been remotely doable if the existing code base that was handed over was just mildly reasonable. But how could this shit ever have worked the first time?!
Gilfoyle would just have said no. Why can't I be more like Gilfoyle >.<2 -
I don't want to ever hear that you're proficient in JavaScript if you put a callback function call inside of an async function right after using the await command.
All you manage to do in the end was make a simple function that gets data to populate a dropdown menu into something that is absolutely more awful to look at than the worst callback hell possible.
Refactoring this code base has really questioned my sanity and how much I'm willing to spend on alcohol.4 -
So, I joined a hardware company as a software developer few months back. I'm working on a c++ code base with thousands of files and no idea what the code is supposed to do.
I got one overview of what the product is supposed to do, which contains mostly electrical engineering jargon that I have no clue about.
Now my manager wants me fix a bug in this code. I have no clue what the expected behaviour is and no documentation whatsoever, and literally no one in the entire country who understands the code.4 -
How hard can it be to make a calculator app. Apparently Microsoft cannot get it right. You might say hey, but it works already. No it does not. See in math 1-(-1)=2 because the double minus sign cancel each other and turn into a plus. Well the w10 calculator app, just does 1-1=0 and show that this is the result. Yes this is the result of one minus one. This is not the result of one minus minus one. This is basic math .... Stop focusing on the interface and code the base right Microsoft.15
-
So I joined a pretty big organization, and am working here for like the last 4 months. Barely wrote any code, mostly I have been documenting stuff, and testing stuff of other devs.
So I had a doubt regarding a functionality, like what I asked a senior dev was, Where exactly is this logic implemented in the codebase so that I can refer it. He was like, you are supposed to know it since you have worked on a testing ticket of it. And if I ask the manager such questions, he would be pissed off. My point of view is that yes, I might have seen that logic, and it might have been explained it to me once, but at that point of time, I did not knew about which functionality it was being used for. am I in the wrong here? Am I not paying enough attention to the code base given It's my 4th month here?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 -
Is it common to be handed a code base, be told "that's yours now", and not be told what needs to be done with it? Like not given a spec, not given a list of change/problem reports, just "have this, it's yours, go do stuff, don't break anything"? I am trying to determine if this is a blessing or a curse.3
-
Just a small discussion topic, if you could look through the source code ad have full access to 1 project/application/game/moon base forever, what would you choose and why?
For me, I would love to go through the source code for the game Hyper Light Drifter, would love to see some of the inner workings and just learn new methods of doing things.10 -
Its a very simple algorithm for me:
Start with a deep base edm track.
Get a green tea.
Start work. The mood is now set.
(If frustrated): go out for a smoke and continue again.
(If frustrated again): see ur managers face and start lashing out code at ur ide.
(Optional if at home): random faps do help.1 -
Current mood: Preparing a communication plan for how to explain why we have decided to throw out the entire 3-years-worth-of-work code base for the frontend project we have inherited and rewrite it from zero because it's just. THAT. BAD.3
-
So I got an offer to do part time on a project that was mismanaged for two years.
After hearing the comments about how ugly the code base was.
I took it. So now I'll have something to rant here. 🤣7 -
How f*cked does a code base have to be until you jump ship? I got a new job recently and been working there for about 4 months. It's a big company and there's ways to move around internally.. but holy cow the code is bad. It almost seems beyond the point of no return... Almost like a totaled car.13
-
One advice I've given to most junior developers which they've practically benefited from is...
"Avoid duplicate comments between interfaces and their base class at all times".
As a smartly-lazy dev, you shouldn't enjoy writing same thing multiple times... be it code or comment, don't write it twice!2 -
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 -
Not sure if many people heard about nltk in python but I'm currently using a lot now for research.
So one day I was doing multiprocessing while using lemmatizer in nltk, for those who don't know, lemmatizer is a thing that change the word to its base form. So it is like, ran to run, bitches to bitch.
Anyway, the nltk package, to ensure it does not take too much memory, here's what it does: it loads a data file, and once it is loaded and accessed for the first time, it breaks the data file into CSV file. And since I was doing multiprocessing, the data file is accessed for multiple time while it can only be loaded once, hence error happened.
Instead of changing my code, which I think is good already, I went to the package directory of nltk and directly changed the source code from there and now the code works perfectly.
I'm very proud of my self at the moment, this is a very good lesson that I've learned: always look for alternatives. And suck it, nltk.1 -
Always fun to come back to an older project to update stuff only to find your IDE and SDK updates have broke your old code base and you now need to debug and update a lot more then you initially wanted to. 😣1
-
C# is getting so fucking obfuscated with these null check inceptions. Found the following in my company's code base. Why did it take me and 3 other devs an hour to figure out how to write this if statement into a flowchart?
if(!string.IsNullOrEmpty(a?.Id ?? b[0]?.Id))...😫😫😫
FYI: We figured it and also found some bugs with logic, but can you? I'll post our flowchart if ranters are interested.
So to add to the madness:
if(!string.IsNullOrEmpty(a?.Id ?? (b?.Any() ? b[0].Id : null)))...🤯🤯🤯23 -
New question to ask potential employers: What makes this work so difficult? is it innovative or in a challenging domain? Or is it because of a poorly documented, poorly maintained code base between multiple groups that can't agree on terminology?
Though if you ask, you should probably be more polite than I am hearing this in my head.2 -
When I started doing frontend development, I was quite shocked with how people managed to cowboy code their way into building fully functional products with a decent paying client base.
I am talking about fully function SaaS with payment gateway and all, but no version control beyond full backup copies, and spaghetti code everywhere you can literally bring the website down trying to change the homepage design.
... and the startups that managed to do better, some of them forgot the .git on production exposing their entire source code *facepalm* -
New hire and haven't did anything other then look at the code base. How long did it take until you actually start contributing code at your first job?9
-
Hate grows inside my soul when you are talking about a new feature and it's implications in the code base. Then you suggest a first approach, everyone agrees but one, someone whos rotten soul is craving for bloodshed, someone who says something like "Hell now, that's too much work" and then after hours of arguing he/she/it proposes the exact same approach... saying it's a better way.
-
I get it. Functional code is still kind of considered the "new hotness" in languages like Java, but THAT DOESN'T MEAN YOU NEED TO CRAM IT IN EVERYWHERE FOR THE SAKE OF IT. If in doubt, *please* go for the simpler, classic option...
Just inherited a code base that's full of things like this:
Optional.of(getResult()).filter(s -> s.equals(true)).ifPresent(s -> callService());
Optional.of(getResult()).filter(s -> s.equals(false)).ifPresent(s -> logError());4 -
A whole bunch of new features were added mid-sprint without ever consulting any of the development team. They dogpiled on devs from other projects who had no prior experience with the code base, so naturally I lose traction because I'm tied up answering questions and explaining things.
This sprint I'm not getting any feature work done as I'm stuck fixing bugs and awful half-ass implementations (by well meaning devs that were thrown at unrealistic expectations).
Concerned at the burn down rate, next week they're planning on dogpiling on more guys to play catch up.
I'm so sad -
Switching workplace after new year.
Already told boss I'm quitting last week. And it is like as soon as It was official I lost all patience with the company bullshit and lost the little interest I had left for my daily work. The codebase seemes bad before but now it feel 100x worse.
Work ethic keeps me from doing nothing but man I just want to get out.
Will be so nice to work with a new project and code base.1 -
You know the PHP legacy code base is complete garbage when it requires a script memory limit of 1.5GB.9
-
Person : Today you worked for 18 hours. What did you accomplish?
Me : I did no progress in the code base.
Person : How is that possible? You were on the IDE all the time.
Me : When you have a huge package pulled in, that takes 3 hours to build, for every single change you do,
And the build path is screwed :D2 -
Did an interview and got some feedback and my coding challenge (I didn't make the cut) . Was surprised at a particular comment on why it was I didn't make the cut and it was about the code not compiling atall. So I went to check the repo and found some code which I oath to have removed lodged into the code base which prevented the reviewer from being able to compile it. How tf it wasn't flagged out when I was compiling before pushing to the repo is beyond me. Now I feel hella stupid and disappointed in myself 🤦🏾♀️ (to be fair it wasn't the only reason I didn't make the cut. The code could have being better)1
-
Writing unit tests on a weekend and catching up on work that needs to be done because I m too busy on weekdays to have time to think about this...
The sad thing is test coverage is shit in the entire code base as boss just decided to start enforcing requirements now... And I have this huge migrating from legacy system project that needs to be merged. And we'll the legacy system is even shittier
So I have to write unit tests for shit code that was never written with testing in mind...
On the other hand I reworked some testing utilities to make it easier... For everyone... I want a huge bonus.... That I probably won't get...2 -
Rant/Love.
I am sitting in this Big data class next to a girl.(I don't really talk to her so much but things are about to change ) A guy is asking her to share her code base for some insights/ideas on homework and she advices
Don't look at the code base else you'll get same ideas I got and would never come with an original solution. Then she further goes on advising on solving map reduce problems and giving me some tips to be careful about.
I turned amazed. It was like deja vu. I said the same thing to my friend some time last week.
My eyes glittered and suddenly I am like
Where were you all these days ???
Nothing is more attracting then a girl talking about code.
Am I the only one ??6 -
I hope I'm not spending several days worth of work rewriting a code base for it not to have any performance benefits at all.7
-
i had an epiphany today, in a discussion with the software architect of our new project.
i'm having the epic job to design & implement a prototype for a C++ library in a new software project and collected some inspiration in our "old" software, where i'm maintaining the module that fulfills the same functionality (i thought). i've been maintaining this module for around a year now. i analyzed the different features and stuff to consider and created a partial model of the new library.
when i showed it to the architect today, he was like "oh my god, no no no, you don't need all this functionality, this shall not be part of the new library!"
this was the moment when i realized how deeply fucked up the code base of the old module is.
imagine it like this:
you want to automate the process of making yourself a good ol' cup of coffee.
the reasonable thing would be to have
- a smart water boiler where you set parameters water temperature and amount of water to be fetched from the water supply
- a smart coffee bean grinder where you can set type of beans, amount of beans and grinding fineness
- a component where water and ground coffee are joined to brew the coffee, where parameters like duration, pressure etc. are set
- a milk tank where amount of milk, desired temperature and duration / speed of foaming can be set
- a sugar dispenser where amount of applied sugar can be set
- optionally, additional modules with spices, syrup, ice cubes, whatever for your very personal coffee experience
on requesting a coffee, you would then configure and orchestrate all components to your wishes to make you a fine cup of coffee. you can also add routines like "makeCappucchino()", "makeEspresso()", or whatever.
our software is not like this.
it is like this:
- a smart water boiler consisting of submodules that know how to cook water for e.g. "cappucchino with sugar" or for "espresso without sugar, but with milk and ice cubes"
- 5 smart bean grinders that know how to grind beans for e.g. cappucchino, espresso, latte macchiato and for 73ml of water preheated to 82°C
- a very smart sugar dispenser that knows how to add sugar to 95, 98 and 100°C coffee and to coffee made of BOTH coffee arabica AND coffee robusta beans.
etc. etc., i think you're getting the gist.
when i realized this, it was like, right in front of my eyes, this terrible pattern emerged like a foul, corrupted caleidoscope of chaos, through the whole code base of this module.
i've already known how rotten from the core this code base is, but today i've actually identified a really bad pattern that i hadn't realized before. the whole architecture is so bloated that it is hard to have an overview of the whole thing. and it would require a LOT of refactoring to repair this pattern.
but i guess it would also be infinitely satisfying because i could probably reduce the code base for 30% or something...
but unfortunately, this is never going to happen, because screw refactoring.
it's a great feeling to start this new library from scratch, tho...6 -
I've been creating my Typescript/C# projects using SOLID principles. Whenever someone randomly joins me in my projects at work, i feel they need a lot of help. Specially since they know programming, but are not familiar with SOLID.
Like ohhh ok you created a base class for that, or ohhh that method already exists in the base class sorry i've implemented it again, or ohhhh ok you already implemented this method in that class.
The more classes i create the more complicated it becomes, sometimes for me too!
I feel I have to write a documentation for the code I write just to keep up with the different, but code changes/augments so writing a doc is really time consuming.
However if i didnt create base classes or interfaces it would be less complicated to browse through method definitions.
I am happy with the code like that though, but in some specific times it's a pain in the ass.
Comments?2 -
So I've a little freelance project, is basically a blog. I've decided to use microservices with angular in the front end and python in the backend.
I've been about 2 weeks copy pasting code in my api because all the modules are pretty simple CRUDs that do the same thing, there is not heavy business logic or anything, just database handling.
I was really tired of copy pasting modules and his test, only changing function names and parameters, today I've this "epifany" about the inheritance and thinked about using it in my service, creating a base class and making all the other classes children of him.
Before the change my project has 220 tests (100% coverage) now I have only 40 tests (the same 100% coverage)
So, the lesson is: don't start throwing code like an idiot and start your project with some good planning1 -
Cybersecurity firm Sophos announced that it has open-sourced the Sandboxie Windows sandbox-based isolation utility. According to the reports of Bleeping Computer: Sandboxie was developed by Ronen Tzur and released on June 26, 2004, as a simple utility to help run Internet Explorer within a secure and isolated sandbox environment. Later, Tzur upgraded Sandboxie to also support sandboxing any other Windows applications that required a secure virtual sandbox.
Sophos Director of Product Marketing Seth Geftic said "We are thrilled to give the code to the community. The Sandboxie tool has been built on many years highly-skilled developer work and is an example of how to integrate with Windows at a very low level. The Sandboxie user base represents some of the most passionate, forward-thinking, and knowledgeable members of the security community, and we hope this announcement will spawn a fresh wave of ideas and use cases."
You can download Sandboxie and its source code here.
https://www.sandboxie.com/1 -
I love business ya know, always soo damned smart.
Our current products code base is soo old it will literally up and stop working come December, from April we cannot launch new clients on it.
The new app should be production ready, at least the MVP with our most essential features.
A week from tomorrow a new senior dev starts so that he can build new features into the current app. -
Out of the frying pan, into the fire:
So in my first job, I thought it's just us operating so crazy: meddling with arcane C/C++ code from the 80's, shooting our code to production without testing, fixing hundred of customers data base entries by hand, letting an intern alter some core component (to have more logging) and directly push it to prod...
Silly me.
I mean I suspected, that maybe it's not only this tiny little company acting wild, that also the bigger companies with all their ISO certified processes, agile blabla, professional tooling whatsoever - will also have their skeleton in the closet,.. like some obscure assembler part buried in the heart of your code base nobody dares to touch...
How Pieter Hintjens asked about the state of the industry and all the fads so bluntly put it:
"It's all bullshit."
But we are humans, so we better jump on the bandwagon if we want to keep our jobs... and somehow try to keep that trashy house of cards from crashing down. -
Hot take:
Want to bloat the shit out of your product and want to lose the core USP?
Want to stop solving the problem you set out to address?
HIRE A PRODUCT MANAGER.
PMs are expert at shit show. We fuck up everything.
God I hate my profession.
When I start my company, the mandatory rule for every PM will be that if you want to add or enhance a feature, they will have to remove a feature. Whoever fails to do so will be punished by having to clean up the code base and work in sales for a quarter.7 -
Trial and error.
Taking an existing code base and playing with it to see what does what. Eventually learning enough to create basic programs. Eventually I wanted to make more complicated things so started reading documentation. -
MaterialUI? Is it shit?
A brand new code base. Old codebase (old employees) used MaterialUI, locking in a lot of the styling and layout in their grids.
I'm trying to identify the pros/cons that can come from experience using the framework.
Some questions to spark discussion:
Anyone used this in production for a period of time?
Did it hold up? Did the designers hate it?
How was mixing this with SASS etc.
Cheers8 -
Finally got my first dev job. I am looking at the code base for my company. And it’s like I know how to code in this language. But I don’t know half of the advanced shit they’re doing. I understand they have more experience than me. But I’m just not sure how to catch up to them. Or be even on the same level as them? I guess just more out of office learning?
I can read what they’re putting in the code and understand how it works. But like how they came up with it I have no clue. I guess I’ll learn over time and have to put in some extra man hours.5 -
I'm currently working on updating our SAP Hybris code base (unreleased) to the latest hybris version ... god, there are so many bugs I could scream. SAP, how can you release such a saftware*, or wait the actual question is, SAP aren't you ashamed for that peace of shit you sell for 1M per licences!?!?!
Allegedly SAP has >100 people sitting there working on hybris. Every new version I wonder the same, when do the finally fix the bugs, improve performance, update the 10year old ant version, migrate to maven, remove the bloat ...
what they actually do is just add bugs and more bloat "§$%&/()=)(?/&%(&
* german "saft" means juice. A "saftladen" is a shitty company, "saftware" ... you get it right ;-)2 -
Something I hate about working in the team is that the code reviewer will stall the time and leave a lot of pull requests unreviewed. As more code changes more commits and more pull requests.
The code base is conflicting with each other, what the fuck? I hate this.5 -
Senior developer :: So, how's the work for maintaining the code base going.
Me(Intern) :: It's pretty easy because I have treasure
Senior developer :: what treasure ??
Me(intern) :: Stack Overflow.
Senior developer be like -
!rant
Just saw someone suggest that msft use Mozilla's code-base for Edge rather than Google's. Can't upvote that shit enough on my own. Go upvote it if you agree? https://aka.ms/AA47goi2 -
Debugging a task, that's sending emails to too many customers.
Supervisor: "Never mind, just test in production, there is a dry run flag for the tasks."
Just in case I test locally...
Flags tried:
--dryrun="TRUE" => Error, failed to send mail.
--dryrun=TRUE => Error, failed to send mail.
--dryrun="true" => Not trying to send mail.
If it's THIS PICKY a little more documentation would be nice.
And by a little more I mean: more than the task base class in a giant php monstrosity without phpdocs expecting its code to be self-documenting. -
My boss writes code like this:
def someFunction (someArg: String) = ...
Who does that?! A space? Da fuck?! And it's all over the code base. Whenever another dev touches any of his stuff, we correct it:
def someFunction(someArg: String) = ...
The way god intended it!8 -
I spent half a month shifting my code base from express to you in view of better performance and what not.
I made a bad decision. I've wasted so much time.3 -
Have you ever seen a tree data structure implementation in any code base?
I wonder why recruiters are so desperately asking how to invert binary trees in my coding interviews🥴4 -
for the life of me I cannot figure out in my mind how to structure this project I want to start, and jumping right into coding does not improve this mental block.
At work this Golang code base has a clean architecture, so easy to maintain and extend, and I'm unable to replicate it on my own project(s). It sucks to be an ignorant.2 -
I just found a 4-level nested switch case in our code base.
and the best part .. they are all empty!! -
Manager: We need to make the new system multi-threaded.
Previous Dev: Yes, so let's use Tasks everywhere! And by everywhere, I mean EVERYWHERE!!!
This is what I've found by delving into the code base which I have inherited! -
Fixing out of scope/unrelated code quality issues when working on bugs/features.
Especially with older projects where pretty much the entire code base is a quality issue.1 -
Just realized I don't have a code style. In python at least I stick to what flake8 tells me, but with C++ I change my style every project I work with to adapt to their existing code base, and then I keep that style untill the next project.
Current project is an ns-3 module, and their code style is quite horrible but I'm already making it a part of me.1 -
That one mistake you make in the initial stage and you have to live with it. build your code base around it. Since it will be too expensive to remove it. 😕😕😕😕😬😬😬3
-
My best and worst dev experience this year was getting a new job.
The bad parts: I’m inheriting a code base that was maintained by an outside agency, so there’s very little documentation. There’s a lot of systems maintenance and upgrades that have to be done because it was never done. I’m working at a larger organization, so tracking down who I need for info can be tricky. I’m the only person maintaining my code base.
Now the good parts: Better pay and benefits. My co workers, dev and non-dev, are always helpful. Since the dev team is small, we are very discerning when we pick up work for the websites. I have more independence to self-learn. I’m not at a blame culture. My role is permanently remote.
So far I think the good outweighs the bad.2 -
Sometimes my hatred for code is so.. overwhelming that I think I need a sabbatical or should even stop altogether.
Let's face it. All code sucks. Just on different levels.
Want to go all bare metal? Love low level bit fiddling. Well, have fun searching for concurrency, memory corruption bugs. Still feel confident? Get ulcers from large C/C++ code base already in production, where something in the shared memory, function pointer magic is not totally right?
So you strive for more clean abstractions, fancy the high level stuff? Well, can you make sense of gcc's template error messages, are you ready for the monad, leaving behind the mundane everyday programmers, who still wonders about the scope of x and xs?
Wherever you go. Isn't it a stinking shit pile of entropy, arbitrary human made conventions? You're just getting more familiar with them, so you don't question them, they become your second skin, you become proficient - congrats you're a member of the 1337.7 -
Need to refactor the code base, and when looked at it, we don't have single UnitTest.... F*** them all1
-
I once had to implement a program to process CSV files. One line would be one order, so I wrote a class with a static factory method (Java) instead of an ordinary constructor, because I needed to throw exceptions if something with the line was wrong (which now and then was the case: invalid product IDs, missing fields and the like). After I committed my changes (CVS was still common in those days), a coworker (let's call him Max) asked me what the hell I was doing there. He expected me to replace the code (perfectly working, by the way) with either an ordinary constructor or by implementing "the factory pattern properly". His rationale: "We don't have those kinds of things in our code base!" So I let him argue a bit, not finding any well substantiated reason for me to "fix" the code. So Max wanted to team up with another developer in our office (let's call him Rick), explained the "issue" to him. I just sat there and enjoyed, knowing that Rick would not really care. But as soon as Rick understood what I did, he walked over to the book shelf, picked "Effective Java" from it, opened the book at chapter 1 and said to Max: "Look, Josh Bloch suggests doing it exactly that way for the problem at hand!" Max kept on arguing for a while, because his "rationale" (see above) was not affected by the fact that the code was actually good. It just didn't appear in our code base before.
-
I started a new job, got through on-boarding and took my first ticket. Made my modification to the code base and the tests fail .. each time I run them .. on different tests .. randomly.
What the hell have I gotten myself into?3 -
Make the development environment, the code base and the documentation cleaner for the new hires.
My predecessors copied whole repos without clean-up and doc and let me figure out what was working or not. They just 'made' it work. The CI process, if you can call it that, is unstable and overengineered as hell.
I don't want new hires to feel the same dread I did trying to repair other people's stack of mistakes.2 -
Today, I'm making a revolutionary change to our code base. I'm finally deprecating a script that lived in this goddamn repo for way too long. There's about 10 copies of the same script in 10 different directories. The script copies all the code into a "dev" folder and then runs "sed s/prod/dev/g" on all the files, and then overwites a bunch of it with some files suffixed with ".dev". Finally, after fighting the so-called architects, the devs and everyone else that seems to have gotten used to the pain this cursed dumpster fire script has caused us, my merge request is now open and ready to go to get rid of this insanity. Now we won't have to deal with as many "surprises" that happen every goddamn time we deploy to production, overwriting all our hard work by accident, and relieve some of my OCD of having the same script in 10 different places in the repository.4
-
Approaching the end of my first week as a junior web dev.
Spent the week writing automatic web suite tasks for an entire e-commerce platform.
Arguable the best way I could have been introduced to the code base 10/10 would recommend. -
I am losing my mind trying to create a new feature to a 2013 code base.
This project uses Zend Framework 1.12 and jQuery 1.4, so I added Vue and things went better but I have some tests to do.2 -
Everytime I applied long leave, my client and PM will plan for important feature, but they say start the sprint and for other new people i have to give KT, and they will take care. I know how that will screw up the system. So at the time it's nightmare late night at office, in office time KT, no weekends, stand-up for 1hr(every time QA will ask, what we get after this sprint). Stupid clients changing the requirements after stand-up.
Everytime code base screwed and need to refactoring. So as much as possible core functionality I'll complete and only bug fixing for newbie. I hate those days. -
Those devs that put TODO comments everywhere in code. When has anyone actually ever seen a TODO and DID it? Put the task in jira/trello/whatever and leave the future source of confusion out of the code base!3
-
I was scanning over a dreadful code base I had to work on and found SQL injection vulnerabilities. THE SITE WAS LAUNCHED IN 2017!!!! 😢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 don’t know how to feel about these c++20 concepts. even though i haven’t seriously written c++ for years, it’s a little sad to see the language i know and love getting so convoluted and lost in modernisation. it’s gotten to the point where i look at a modern c++ code base and all i see is rust. especially the universal trailing return types everywhere, those get to me.19
-
I can’t take this shit anymore. I’m constantly cleaning up the diarrhoea behind other incompetent nutjobs, while these very same people treat me like I have no clue about programming because I won’t introduce their unmanaged dependencies which they call snippets into the clients code base. Whoever transitioned from “int - int” to freelance / self employed please give me some tips4
-
I'm currently switching off some of applications as the company I work for is being sold.
Our latest flagship product has only been in development for the past year and was showing some real promise, but all things must come to an end.
Live fast, die young leave a good looking code base.
You will forever be remembered by the git repo in the cloud. -
It's funny how alcohol actually makes you remember all the crazy shit you had to deal with.
As when I was a junior c# programmer at an ERP shop.
I was new, naive and full of energy.
I used to dive deep into the code base, and one of the things I noticed but didn't pay too much attention was.
Error stacks were usually meaningless.
And why was that?
First, well it was c#.
Second, the guys use to do this.
try {
ThrowingFunction();
} catch (Exception e ) {
throw e;
}
PS: I'm not doing c# anymore, that was 10 years ago. So syntax might be a bit off.8 -
This code base can't upgrade to 5.4 because it depends on register_globals. The files affected has no indentation for else blocks. Randomly indented with space and tab. On top of it all, one of the previous devs were dyslexic. Save me.
-
I feel like I am trapped in a maze of a 20 year code base so many dead ends. Dead code...dead code everywhere1
-
Fuck this shit
I’m interning at this place and the code is ALL OVER THE PLACE. I have to rewrite every damn function and the code base is so obfuscated and stupid on multiple levels. I’m sick of this shit and literally every damn thing needs to be rewritten from scratch2 -
I hate people forgetting to enable option strict on Visual Basic .NET.
Why the heck does Visual Studio has it disabled by default anyways?!
Only use of disabling it I ever have found is for SignalR, disable it on just the file you need to.
Wait! There's another use, to compile the code of people that doesn't enable it. That is, of course, without rewritting the entire code base! -
What absolute fucking imbecile thought an upper limit of 6.0.0 would make sense for max supported PHP version on the entire Magento 1.9.3.X code base. Not to mention the installer is broken on account of them not fucking understanding InnoDB is default engine in MySQL.
Seriously Mage Rage is real.5 -
So a while back I decided to overhaul my entire code base and rewrite everything in one application... yesterday I thought this was bad so have moved back to separate applications, just this time as microservices! Does anyone else do this without ever releasing the initial thing you set out to do?
-
If you are reviewing pull requests to your code base, what aspects do you focus?
I am asking, because a colleague of mine most of the time complains about minor code style issues, like the following:
"why is that method static, it belongs to the object. I am not used to static methods, please adjust"
"the methods are not arranged in a standardized breadth-first order"
"Please use that other kind of initialization..."
Those nit-picks make me crazy sometimes. Is it just me?
I mean, her reviews also contain valuable content, but those small complains about coding style feel like "I did not found anything else but I have to". ^^5 -
This actually exists in our code-base like this. I have no fucking clue what it does.
function combine(arg0: string, arg1: string): string {
return !arg0 ? arg1 : !arg1 ? arg0 : `${arg0} ${arg1}`;
}9 -
Long time nothing from Mr. Gitmaster, somehow made my peace with him as the project moved out of my focus and he actually seemed to be contributing.
But now some pull request exchanges burst into flames as if they were on LKLM before Linus got castrated. Actually it's with the guy who is jamming out most of the front end code trying to make a really shiny UI with lots of animations that turn our macs into heaters.
Well, debate was over JS code styles or lack thereof and how commented out code should be removed (would actually support Mr gitmaster here). They have me a bit lost there, as I expect the freestyle JS code we produce without any agreed Coding Style Guideline to be an even greater clusterfuck than our C++ code base.
Anyway, hope they come to terms again, like at the start of the project when they jokingly attributed one another as assholes. Their opposing characters could actually benefit from each other. -
As I started learning React, I found the allure of declarative style of programming appealing. I try to avoid maintaining multiple state variables for data that can be derived from the base state itself that's stored in the redux store. It works wonders when I have to change something; as I just need to make changes to one function in the utils folder and that change is implemented across the whole app, rather than change the instances everywhere as was the case when I initially started working on this project after the previous dev left.
But I see myself redefining a lot of computed values everywhere, and if I just try to define them in the root component, I'll end up with a huge list of props being passed to a couple of components. Shifting it to the utils folder helps a bit, but then I find myself defining even the simplest of array filtering methods to the utils folder.
Is this need to define computed values everywhere a trade-off that you need to accept when you write declarative code, or is there a workaround/solution I am missing? As of now, the code-base is much better than how it used to be when they had a literal Java dev work on React with their knowledge of Java patterns being used in a framework that is the polar opposite of OOP, but I still feel like there's room for improvement in this duplication of computed values.2 -
we were taught separation of concern when getting into webdev, don't write html inside your js codebase, don't write js inside html code base, don't write css inside your js codebase. People who taught us this, are violating this same principles by introducing stupid frameworks.
-
Half of the courses we had in our college were about electronics. Except Microprocessors and Transistors, it's not relevant.
We even had chemistry and engineering drawing. So we essentially wasted more than half of our time.
Besides languages, weren't taught anything about real world software development.
Nothing about how to work with an existing code base, version control, design patterns, system design, creating a website, debugging, functional programming, scalability, reliability.
The industry should be involved in setting the syllabus and also contributing part time teachers.3 -
Any good books/reads when it comes to analyzing existing code bases/tracing?
I recently started a job with a decade old C code base with no documentation that requires me to break apart and modularize and I’m kind of losing my mind. There’s no comments nor properly variable names...1 -
Messy business rules results in messy code base results in unhappy programmers results in high turnover rate results in more messy code results in falling business
-
Collect project specifications & details.
- order by relevance.
List & install dependencies (possibly spin up a vm).
mkdir ~/Code/{lang}/{framework?}/{project}
Bootstrap skeleton & scaffold.
- ensure functional base.
Iterate specs list & create test case(s) one at a time, going: test => minimal to pass => refactor => next(repeat_cycle)1 -
Currently have the most experienced guy with this code baseline showing me how to implement something. I have not seen a code base this badly designed since I told someone they should quit the CS major.
-
We use MDD!! I coined this term one night after getting frustrated and having a lot of drinks. What's that, you ask?
MAGIC DRIVEN DEVELOPMENT
It's when you're working on a not-so-recent code base and are afraid to make any changes in fear of breaking things up. You've touched some modules, and now you restrict yourself to work only on those treating all others as a blackbox. Even if something can be achieved by a small change in one of the blackboxes, you still go for multiple changes in the modules you're familiar with! Such is the horror. You start saying that those modules work by some dark magic that nobody understands! -
I don't think I'll ever understand how someone can complain about a legacy code base in one breath, and then justify a bad design with "that's how the system does it everywhere else" in the next.1
-
Once again I see offshore "developer" copy paste entire code base to separate folder, work on it there and then copy paste it back. Use a git branch goddammit. Is there something I'm not aware, is source control banned outside EU and US?4
-
How can I get started in open source? I tried forking a repository and do a bug fix, but their code base was ugly as hell and makes me unsure about what open source projects to contribute to.6
-
This one makes me legitimately angry:
https://github.com/fzaninotto/...
This library is used by thousands of devs on a daily base while the code-base is an unchangeable legacy monster.
I could vomit, because I'm so happy!
Jeez! -
<previous_developer>'s_file_of_shame.me a log of hideous code base I've inherited. is growing and growing. The more I write the more I wish I would be rid of it.1
-
Does the perfect codebase exist? Or is it just a myth?
PS. I'm just a new grad with ~3 years of experience, and in my 4th company now.10 -
Found some particularly nasty global state problems in an existing code base and fixed them. Now I can legitly add this to my resume:
"Prevented a Global Apocalypse" -
Inherited a massive code base today... All JS is still being accessed via global scope... what are modules & modular design even... SOLID and DRY are things that clearly never crossed the devs mind during inception of this beast... and to top it all off all there is a weird BEM / SCSS style going on that somehow manages to confuse the IDE... thus all style helper utilities in the IDE are useless...2
-
I have started a freelance full-stack project with some existing code-base and it was horrible. They only have API endpoints for fetching whole data. No limit, No sort, No filter. They are doing all this shit on the front end. They are even aggregating data on the front end. Seriously who the fuck does that? On top of that the guy who has coded it was a senior developer. I am wondering now, did he write that kind of code purposefully or this kind of shitty devs actually exists?2
-
I’m one month into my first job as a C++ dev for a company with a MASSIVE code base and I still am struggling with having a consistent build environment, sometimes spending almost 3 hours a day troubleshooting because my environment is always inconsistent. I’ve barely gotten my hands into the code nor pushed anything because I’m stack tracing through thousands of compiled dlls through process of elimination to identify a bug in the software.
Is this normal? What am I doing wrong? I’m freaking out that I haven’t shown any productivity to this company.1 -
Built the most generic file importer.
So a customer had his SAP system giving us some 5 million barcodes in a csv which we needed to parse. But as there could be different file types and I thought the handling would always include the same steps I made them configurable through function pointers. - Did not want to make it as spooky as the rest of the code base where the function pointers were buried deep in some shared memory configs, which might even change at run time, but rather I statically used the member functions of my class. Just to poke fun on the ugly C++ syntax of member function pointers. I still shudder at the thought some poor soul now has to maintain that code.
(For the actual parsing I actually used a one liner in awk which was churning through the records in one minute which was faster than the SAP guys seemed to be accustomed to.) -
Working as a Dev for a while now, I tell new people not to bother with it. There is never any job satisfaction as people in charge never understand the basics.
Instead of learning to write efficient code, figure out how to solve real business problems, work towards a maintainable flexible product to quickly deliver value on changing requirements, write automated tests to improve quality, maintainability and prevent live issues - basically do anything a good Dev strives for - you will just constantly end up working for people with no interest beyond the next couple days, on a shit code base that no one can understand, with people that don't want to learn anything about software design and just check boxes off.
Apart from pay this must be the worst career possible in a technical field.4 -
I have a very little working experience with someone else's code, and even lesser experience working with a professional code base. All my previous apps had around 8-9 java files at max, with very rare moduling and folders.
And this start up where am currently the intern, has handed me theiir develop branch, it has almost a 100 java files, 50 external libs, massive use of architectural designs ,data binding and custom views and so much more ! Damn, am overwhelmed , but so excited to learn the practices i was procrastinating for so long 💗💗💗
The only problem is lack of a mentor, since the sir who made this beauty is a superman who is currently handling the server and ai side and isn't usually available.
But i guess i will do fine, hell it's a FBI's data key in my hands :D1 -
I know it's not really related to development, but I got in a discussion on twitter and one dude tweeted "in science, 1 isn't 1"
And so I was like "mate what? science is highly dependent on math and in math, 1 is kinda always worth math"
And this this girl comes in and just says:
"it's not true that 1 is always 1 because there's binary code as well"
And was was like totally astonished, like, have you even studied something? 1b = 1d = 1x and it's always 1 in whatever base!
(she even says she's some sort of engineer in her bio)8 -
Sometimes I just have a crazy idea for an amazing feature I could add to a side project.
Then my brain goes into a fight with itself over this feature, one side saying "that's a lot of work, not worth it" and the other side "but then we could also do this and that and hey maybe we could even simplify other stuff a little bit" and in the process getting really fond of that feature. After some time, the idea is really optimized because the lazy side of my brain hates unnecessary work.
Anyway, I just came home, created a new branch and deleted a quarter of my code base which is now obsolete. -
So I graduated last year learned everything I would need to succeed in the job world. I got to my first rotation, I solved a total of 6-7 jiras in the past 6 months. I got to my second rotation, my new team is pretty much all remote and it’s been 2 weeks that i have been sitting idle. Their code base is not on git they’re not organized as my first one and I’m confused as to what they do, there’s not really any confluence and the deployment of code is done via uploading a jar. I really want them to adopt a structure like my last team or something similar because but I don’t know enough how to implement a new deployment process. I feel like sitting idle is the worst so I’m gonna start to see if I can implement a proper structure for them but who knows if they’ll even use it.3
-
I didn't think that it could be worse than in the companies I've been previously working at (last one was good btw)!but the current company has a code base for a website made in grails with an angular app and no existing developer knows how this site works - and there isn't a single comment in the code either. There isn't any other form of documentation either D:
-
About a year ago I had the great idea to enforce ago I had the great idea of proposing that we all lint our legacy code base using eslint to increase the overall quality of our JS.
I distributed the task of initially fixing all the errors eslint would find to the whole Frontend team (Luckily we only use JS there). I've finished my part in a couple of weeks and came across this piece of spaghetti.
One of the guys who has been with the company for over 10 years said, that the guy who wrote this monster was very proud of it...
In case you cannot understand what this does: It calculates the distance between 2 points on earth.9 -
Java I hate you! I've been stuck on an authentication issue for weeks now and just figured out what was wrong. The probem was my variable wasn't STATIC so it was passing in an old auth header every time. Literally I've been skimming and modifying my code like crazy for like 2 weeks and this simple modifier changes everything! Java I hate you and can't wait to migrate my code base to kotlin!4
-
Damnnn my Team lead is hinting that i write a test for the feature I paired with a team member.
But the large django code base is ridden with abstract classes and classes and inheritance etc...its going to be a long night -
When you build off of someone else's base code and there are unnecessarily complex levels of inheritance 🤔2
-
What do you guys think of Flutter and AngularDart, for developing for Android/IOS and web, sharing a common code base?5
-
When you make a massive change to the code base and run the test suite to drive out functionality but nothing fails...
-
When software matures and becomes bigger it feels like even a small change takes a day to implement. How do you remain innovative with a large code base?1
-
First year as a professional developer, and this Thanksgiving break is making it hard to get back into the code base here at work. Am I the only one?2
-
Found another gem in the code-base I've been given to troubleshoot.
Let's call recv(), get the TLS encrypted message, and then call BIO_write() and SSL_read() instead of offloading it to OpenSSL.5 -
In my whole carrier as developer. I never felt so helpless as in naming things.
Could be class, method, file name. The worst thing is it become hard as the code base increase.
How you overcome this?8 -
Running unit tests on a peer review. Why have unit tests if people don't run them? That said: our system guy wants us to start doing agile TDD. This would not be a problem if we weren't a maintenance shop and the code base doesn't really allow for TDD.3
-
TDD shows you just how much "junk" you've added to the codebase before without TDD. Then it becomes TDD refactoring. Wtf, what a mess. 😑4
-
Not a rant/!rant
Got a new job, already learning a lot and nice and helpful colleagues. 😄 Except I find it really hard to get used to their codebase because it's huge! How long does it take for some of you to get used to the new code base of your new job?3 -
Fuck Redux/ngrx. I'm done, I can't get my head around this ugly shit. All I wanted was to load/save api data in a clean way and display a loading indicator now and then. But definitely not multiplying my entire code base by 10. Actions, Reducers, Effects. What is this?! Fuck that rocket science.5
-
First week at new dev job. Had to move my workdesk 4 times, which means not being with my team. The guy that should help me get to know the code base & project had to change team and project, and is busy all the time. What should I do ??1
-
Ever tried to code a plugin for SonarQube? ... Yeah, don't do that. Documented API? Nope. Just some not-helpful-at-all-tutorial.
Largest undocumented code base I have ever seen. It's unbelievable. At some point you decide it's better to look at the code of other (undocumented) plugins to extract any API methods there.
Hep from the (otherwise pretty active) mailing list? - You wish!
The best thing is when you discover on Stack Overflow that the thing you have been trying to do for two weeks (and someone else was too, apparently) is not possible with their API.
PS: Maybe this has changed since their last version but some months ago it was every bit like this. -
One of those "you have got to be kidding me moments":
struct Speaker: UnitNode, MemBufferBase {
typedef UnitNode super;
…
}
And then elsewhere:
#define Node UnitNode
#define Speaker AudioSpeaker
Never seen anyone typedef base class as super in C++ nor use a #defined variable as a class name. And of course elsewhere in the code class names are normal literal a but are referenced via a #define (and sometimes not via the #define)... The same obfustication done two different ways! -
Really hate it when a project is switching focus every month or so. You start focusing and committing a lot of time to make things work. Taking initiative to enhance things. Then some weeks later management is switching focus and you have to port all fixes in the new code base. Then some weeks later you have to work on the things you did before but with some adjustments that result in the old code not being possible to use and you have to port fixes again. When complaining you sometimes get the question "how hard can it be, it's just some code". Some motivation is lost every time. And repeat this like a "while true" loop.
-
So, like, why doesn't Java let me do manual memory management? In C# if I want to screw up the code-base and everyone that comes after me with my half-informed experiments it totally lets me.21
-
Been making minor refactors to code base. Ran into something that resembles and behaves like a brainfart. Accepts arguments, uses them to query DB then completely disregards result and builds own result yielding dubious output.
Dumb as I am, went to investigate the story behind it. Maybe some weird business rules involved.
Git gave commit. 100+ files changed. Nice one.
Went to original story and there it was, clearly stated, like a true moronic decision: "Squash all feature commits to a single commit". No specs, no description, no explanation... Nothing.
Well... FUCK YOU TO!2 -
I made this: https://gitlab.com/snippets/1992288
Spare me if the title makes no sense grammatically, not a native speaker.
I'm building a microservice that keeps a check of the subscribers on my product, I wanted to keep an eye of those subscribers that may be missing the latest payment.
One way to do that is to make it work with my code and some ORM magic, but that may become unsustainable as the customer base grows, another idea that occurred to me was doing it fully inside (?) the database. The solution is to compare how many days have passed since the last payment and right now, if 'right now' is larger than 'last payment' then the subscriber is late with their next payment.
I did this as a PL/pgSQL function with an example usage accompanying that code.
Now, I just need to figure out how to use the result of those calculations in a WHERE statement...2 -
I have no clue what I just did.
2 months ago I changed my repository name and today when I attempted to pushed an update I realised I had to update my remote key. Which I did.
Now..my repository now contains someone else's repository and my entire code base is non-existent.
Slightly pissed off that I'm now having to redo the entire work again but at same time I'm kinda amused on how I did this.8 -
Full code base with 0 comments. Either it's utter genius or terribly poor.
And I'm sitting here reviewing a PR.4 -
Web Dev course : open the starter code base in firefox and see a big smily Berlusconi's face as main banner :/
-
Gone in an instant was the shimmering gleem of hope that I'd get to work on modernization of our current code base. Back to last fucking century I guess.
-
Looking for opinions about clojure from people who work with it, I am not familiar with clojure but saw a job posting saying their code base is heavy on clojure.1
-
There's a type of shopaholism in big open source projects, in that decision making developers tend to search google and just add any javascript framework they find interesting, to the code base!
-
Okay, I'm learning XSD (I wish i didn't, but yeah)
Why the fuck does it require so much code to use the simplest regex?
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:pattern value="([0-9])*" />
</xsd:restriction>
</xsd:simpleType> -
Some of the rants that I’ve read recently have inspired me to write this one:
You know how some OOP based APIs require you to call the base implementation of an overridden method?
If you think about it, its pretty shit. None of the languages have mechanisms to enforce it, so all you can do is to rely on the caller to read the docs for that method that he is overwriting and then do the right thing.
And then you can also have the requirement that the base implementation should be called at the start or at the end of that method.
I really think that this is an OOP problem because if I would have to design it, I’d make a function that takes a closure as a parameter and then call that closure at the start or at the end of that "base" code. This is implicitly documented (by naming the closure appropriately so that the caller knows if it is called at start or end). And it is impossible to miss it because you need to pass something to that parameter. (Alternatively, you could also pass the closure to the constructor).7 -
I had written a feature that stored some data for all methods in a code base. And it worked in 99.9% of all cases, but for some projects, somehow there were errors in the logs that I couldn't understand.
After hours of debugging, it turned out that I inserted the method objects into a map, and the (existing) base class for these objects used the character offsets for the method's start & end in the hashCode() implementation. This meant that in the (extremely rare) case of two methods in two files with the exact same start and end offsets, inserting them into a map would overwrite the previous value.
Once uncovered, this bug was trivial to fix ;) -
What's the general Software Engineering rule of thumb again for frontend templating code?
If I look at certain websites, I notice some code smells in PHP such as:
$.modal = <?php echo $(base)["username"] != 'me' ?' ': echo 'style="display=none"' ?>
or just in general places in the code where PHP gets used as a templating engine for gluing together pieces of HTML code based on conditionals spread out over the codebase and the database itself too. To make things worse, this carries over to JavaScript ajax functions. As a developer, this to me just seems like spaghetticode.
On the other hand, many popular frameworks properly do templating, such as EJS, containing templating in one place and not mixing it with logic too much but just having simple output like <%= %>.
I know I've seen frameworks like Angular 1 contain pieces of HTML into directives, but maybe that's something different, more 'OO'-simulating or cleaner.3 -
Once again spent a day MacGyvering together all the missing pieces of the app for tomorrows presentation deadline. This time the code base is 95% good code and 5% of dirty hacks which are essential for the rest to function properly.
One day I'll enough time to finish a development cycle on time. One day... -
It sucks when you are unable to work on any new features in forever and mainly spend time updating the existing code base, doing visual designs & documenting the application.
Let me please work on a new feature that the clients will use instead of meaningless busy work2 -
So when I started at my current company, I was the second developer in the company. My job is to handle the embedded development side of our product. The existing code base? Made in fucking China. All of the comments were in Chinese too. They had implemented Huffman compression incorrectly and AES CBC encryption incorrectly as well. It was seriously some of the worst code I've ever seen. I remember one gem I found:
Int header = *(*int) "MGIK";
😫1 -
Big meeting in our hobby app team, surprise our app is not performing weel on abandoned silverlight framework for windows phone.
Should we go for uwp or xamarin? Our code base is as mentioned in Silverlight so a tool for some conversion exists towards uwp, but is half baked.2 -
Trying to get few things out of my chest.
Nothing is more frustrating than to make use of a bloated base code. Though it gets the job done, trying to fix bug-bombs planted by other developers is nerve wrecking and makes me feel like a member of bomb-squad. Damn!!
Also,
To the SUV guy who took a sudden left to dodge the pit, you startled me and I am sorry to have flicked my finger at you. I honestly didn't notice you had your family in car, heat of the moment made me do it. 3 weeks gone, still unable to get over it. Forgive mee!! -
Just discovered https://twitter.com/ExpertBeginner1. It's the story of my life. Giant classes, copying and pasting, and architects who create frameworks. It's great when we combine all three: A "framework" created by an architect which is made of giant classes that you copy and paste. Imagine a giant generic class where the generic argument is only used by dead code. Pause for a moment and try to visualize that.
It inherits from a base class with lots of virtual methods called by base methods that throw NotImplementedException, so if you don't need them you have to override them to return empty collections. If you're going to do something so messed up you could just put those default implementations in the base. But no, you can inherit, it compiles, and then it throws a runtime error unless you override methods the compiler doesn't require you to override.
The one method you're required to override has a TODO comment telling you what to put there. Except don't ever do what the comment says because that's the old standard. The new standard says never, ever do that.
Most of the time when I read about copy-and-paste coding it's about devs who copy and paste because they don't know how to write or reuse code. They don't mention the environments where copying and pasting the same classes over and over again is the requirement and you're not allowed to write your own code.
Creating base classes where you just override a method or two can potentially work, but only in the right scenarios and only if you do it right. If you're copying and pasting a class that inherits from the base class and consists entirely of repeated code, why the heck isn't that the base class? It could be a total mess, but at least it would be out of sight and each successive developer wouldn't become responsible for it by including it in their own code.
It's a temporary engagement, but I feel almost violated. I know it's a first-world problem, and I get to work indoors and take vacations. I'm grateful for those things.
Before leaving I had to document the entire process of copying and pasting an entire repo, making a ton of baseline edits that should just be in the template but aren't, and then copying and pasting from other places into the copied and pasted code. That makes me a collaborator. I apologize more than once in the documentation, all 20 pages of it that you have to read and follow before you even get to the part where you write the code for what you actually need it to do.
This architect has succeeded in making every single thing anyone does more about servicing the needs of his "framework" than about writing actual code to do what needs doing. Now that the framework is in and around everything it creates the illusion that it's a critical part of our operations. It's not. It's useless overhead.
Because management is deceived into thinking they need it they overlook the fact that it blows up, big and small, every single day. The log is full of failures that I know no one ever sees. A big chunk of what they think it does fails silently, and they don't even notice until months later when they realize how much data they're missing. But if they lose, say, 25% they'll never notice.
When they do notice they just act like it's normal, go into fire drill mode, and fix it. Doom. You're all doomed. I'm standing on the deck of the Titanic next to my jet ski.1 -
How much of "unique" the string that is the current epoch in milliseconds converted to base 36 ?
I know it is not universal. But require such a bad luck to have collision no ?
I am gonna use it for "transaction" primary key. (Every time a user pay, it it a new trasantion).
Uuid are very long, i need to put this pk in qr-code later
Thoughts ?24 -
I'm too retarded to understand how the fuck to get iframes (of other pages on our site) somebody wrote in the past in our code base to not become the page (the original has 2 other pages on our site "embedded") https://cheatsheetseries.owasp.org/...
I don't even fucking understand if I implemented the recommended framekiller code correctly, but it fucks shit up like the not recommended framekiller code so I'll settle for it. I also enjoyed (actually I didn't) reading about how this javascript framekiller stuff is fucking stupid anyway and mainly only applicable for old legacy browsers (in which case go fuck yourself anyway, just use a modern browser which benefits with from the x-header-options whatever the fuck, which was easier to implement and juSt WeRKs)
Guess I have no choice but to write AJAX to do this dumbass shit.
It's a shame I have no fucking clue how to fuckign front end3 -
Today I used NDepend to analyse my new jobs code base. It looks like the classic big ball of mud :(1
-
The single most asked question when you're a unwitting 'code archaeologist' working on an inherited code base:
'Why in the Lord's name can't I just start from scratch!?' -
When your only QA guy describes your QA process as "we just put a bunch of stuff in the code base and test"
-
Code base is full of /*bug fix - XXXX */ coments, sometimes it feels the software is a Bugenstein's Monster!!
Not sure if this kind of comments serve any real purpose...
Commented old code is a more familiar monster; but that's a tale for another day. -
Can a React.JS expert help me to understand something?
In short, I would like to know what are the main differences between react version 15.6 and 17, in terms of browser issues, and component compatibility?
We have a legacy code base that is in version 15.6 and the team wants to upgrade it and I am attempting to argue with my dumb CTO to upgrade to version 17. However, I’m not versed in react, I'm just a PO and the CTO doesn't know anything but for some odd reason is adamant about staying on an older version. The developers gave me their opinion but I'm interested in an outside opinion.5 -
Thanks monkey patching, now I remember why I hate Ruby so much.
Compare https://github.com/ruby/ruby/... with https://github.com/rightscale/...
I wonder how the fuck it even works. Also I'm amazed by countless hours of labour wasted digging through this pile of shit. (BTW thanks JetBrains for making it a bit less miserable)
Oh, and someone did monkeypatch Object#try! (which is also a monkeypatch by active_support) and then replaced all `#try` calls to `#try!`. WHY.JPG. Also how the fuck did it pass code review?! -
Hey fellow c++ devs, i have a question. I am currently working for a company that has a system with more than 300 000 thousand lines of maintained code and it is written in C++03. A lot of it utilises boost and custom performance work arounds and migration is currently out of the question, but I would really love to see some Cpp11 sugar in the code-base. I know there might not be too much business value to this potential endevour, but what do you think?1
-
senior: it should only take 30 seconds to replace multiple display strings across our code base
well it would be nice if they'd do it then, and somehow i don't think that 30 seconds included checking your work and making sure you don't fuck up other instances of those strings (e.g. in variable names, etc)
maybe you got a clever enough regex to only hit exactly what you want :shrug:1 -
My team and me nearly finished a big new feature for our website.
I am a junior dev and this was the first big thing I was in charge of and now that I see how it unfold I feel really bad.
It consists of php backend (integrated into a 20 years old monolith) and vue frontend (punctually jumpstarted by a clusterfuck of typescript files included into php rendered html) and especially the frontend part looks so bad.
Vue is relatively young in our project and almost nobody has a clue about it. I learned so much about vue in the process, but the result is a behemoth of awfulness that grew over several months.
I have a really strong desire rewrite the whole mess, but I will never be officially allowed because it works and practically all the flaws in our code base are subject to the classic
"well, someday, somebody probably has to do something about that, but for now let's start this shiny new feature"
So for now I think about doing it secretly and pass it to my buddy to review it. I guess chances are high that not even the colleagues in my team (apart from my buddy) are going to notice, since they aren't as interested into vue as I am and don't have the overview over this features code as I do, but on the other hand it feels like something I could get in trouble for and apart from the cursed code base my company is great.
Have you ever bin that disgusted by your own production code before it was even one year old?3 -
a Jenkins job that undeploys the last code base and deploys the newest. but if the previous deploy fails there is nothing to undeploy and therefore all future builds will fail. fml
-
Some days are like being a musician on tour. I wake up to a new code base every 2 hours. After a while I'm like, "What client am I even working on?"
-
Is their a better way than ASP Identity Claims to verify permissions before accessing a page? Refreshing claims in every page load doesn’t seem to be a great solution. Thinking about some sort of permissions middleware. I need to check those IsAdmin roles before any admin area data is accessed. What techniques are you using for authorization in your code base?3
-
Ok so giving chatgpt small instructions seems to kind of work
The question is how to connect to it through your own interface? Chat is cutting off code
I don't think this will put programmers out of business
You have to know what you're doing to instruct it lol
Do you think they'll lose their whole user base making this a 1000.00 a year pay service?2 -
Every time I have a large code base...
When you manage updating numerous 3rd party libraries by hand, git submodules sound like the greatest thing ever.
Replace all 3rd party sources with git submodules.
Realize how much of a pain in the ass they are and managing them yourself seems totally worth it again.
Replace submodules with folders of the 3rd party libraries.
Repeat... -
So I've been forced to work on a project for some time using JavaScript
Many parts of it must function synchronously and js has a lot of libs and otherwise that will spawn threads in threads
I'm horrified by the amateurish appearance of my code
Await this await that
Everything enclosed in something else and what is worse is the base node modules I'm using are ALL asynchronous! Were talking methods that one consistently has to wait on finishing like db reads !
Why is js so dumb ?26 -
We found out a spelling mistake in our code base 😆. We had a class called "FromMixin" instead of "FormMixin", and it's been there for a few months now. We're using it in a couple dozen files.