Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "refactor"
Every time I do a dirty fix and someone in my MR comments "have you investigated the root cause" I wanna kill myself.
No bro, I havent investigated the root cause because this ticket is 3 months old and was passed around like a hot potato from team to team until it got assigned to me.
If you want I can add a comment to refactor this in the future. As far as Im concerned any refactors are out of scope, also I atleast came up with some kind of solution that noone else was able to in 3 months. So im not gonna waste my time on refactoring this piece of shit code under immense pressure from management who thinks it was me who dragged this ticket for 3 months.
Its working, it doesnt cause any side effects, we all gonna die soon and nothing really matters, so fuck off.9
We were still using python 2.7 waaay into 2020 - It had been heralding the impending doom since 2018 and finally end-of-lifed in 2020.
That's when I finally managed to be the loudest asshole in the room and allocate a team (myself included) to refactor shit up to 3.6 (then somewhat more modern) for a month or so.
COVID the destroyer may have helped by wrecking havoc on our client's demands pipelines.
It was the third week into "the red sprint" when my entire team (myself included) were beheaded out of the company since we had "not delivered ANYTHING in weeks!" (emphasis in the original).
Frankly, being laid off was by a large margin the best thing that company ever did for me.
I heard from a poor schmuck who stayed behind that they were still using the shitty spaghetti code from before our refactoring - in freaking November 2021 - and that our entire last effort was thrown out because "nobody knows how to use it".
There is tech debt and there is tech bankruptcy.
I may have a lot of tech schadenfreude now :)13
I was only seventeen back then and I was a Java Developer Intern, not knowing much about enterprise oriented coding.
The project leader in our dev team saw a lot of potential and passion in my work, but was convinced I wasn't taught enough to do the right thing.
I was mainly doing shitty mappers and services back then, which were somewhat used but never lasted long and were ditched a few months later, which always bummed me out. I wanted to make an impact on REAL projects that would deploy into production.
So Mister Mentor (GDPR forbid to use the actual name), who was always first to come and last to leave the office, taught me what it means to code for real.
We stayed after 5pm until 7-8pm multiple times a week and he taught me in a deeply understanding and calm way how to:
- Git (SVN)
- Unit Test
And most importantly:
- How to debug like an absolute BOSS
(We even debugged native Java Libraries just for fun to see if we could break them)
Fast-forward a month later and little intern me made his first commit on production.
Without Mister Mentor, I wouldn't be half as good of a developer as I am today.3
Ticket: Add <feature> to <thing>. It works in <other things> so just copy it over. Easy.
Thing: tangled, over-complicated mess.
Feature: tangled and broken, and winds much too deep to refactor. Gets an almost-right answer by doing lots of things that shouldn't work but somehow manage to.
I write a quick patch that avoids the decent into madness and duplicates the broken behavior in a simple way for consistency and ease of fixing later. I inform my boss of my findings and push the code.
He gets angry and mildly chews me out for it. During the code review, he calls my patch naive, and says the original feature is obviously not broken or convoluted. During the course of proving me wrong, he has trouble following it, and eventually finds out that it really is broken -- and refuses to admit i was right about any of it. I'm still in trouble for taking too long, doing it naively, and not doing it correctly.
He schedules a meeting with product to see if we should do it correctly. He tells product to say no. Product says no. He then tells me to duplicate the broken behavior. ... which I already did.
At this point I'm in trouble for:
1) Taking too long copying a simple feature over.
2) Showing said feature is not simple, but convoluted and broken.
3) Reimplementing the broken feature in a simpler way.
4) Not making my new implementation correct despite it not working anywhere else, and despite how that would be inconsistent.
Did everything right, still in the wrong.
Also, they decided I'm not allowed to fix the original, that it should stay broken, and that I should make sure it's broken here, too.
You just have to admire the sound reasoning and mutual respect on display. Best in class.19
Just spent 10+ hours refactoring a code, and at the end I've figure it out a one line fix to the problem... just wasted 10 hours of my life.. :)7
001 REM Code review
010 PRINT "Nitpick nitpick nitpick nitpick nitpick"
011 GOSUB REFACTOR
020 PRINT "This function is too complicated, break it up"
021 GOSUB REFACTOR
030 PRINT "Why do you have three methods for this? Put all the logic in one method."
031 GOSUB REFACTOR
040 GOTO 020
041 REM ARGH
998 PRINT "Looks good."
Spent an hour and a half renaming a method everywhere in a project from `feature_name` to `feature_name!`. There are a lot of constants, symbols, and other methods that use "feature_name" as a prefix (plus comments and spec descriptions), so was a little more difficult than normal.
Should have taken like 5 minutes with a proper IDE refactor tool. but noo, it was too difficult for RubyMine. wah wah wah. Stupid thing. Not even the search tool was useful -- it's limited to 100 results, and there were around 250 for that substring.
I ended up having to run specs repeatedly to find all the remaining instances, which took freaking forever. blahhh20
Have a function that takes parameters and then performs a switch statement to determine what function to call next with those same parameters. One of those parameters is a Union type.
During CR, my reviewer said they’d like if instead of returning the function per case, I instead assigned a handler to the value of the function per case and then returned that handler at the end of the switch. Simple change, right? Only snafu, I’m casting one of the parameters on a per-case basis.
Somehow, through no fucking change of my own, TypeScript in its wisdom has decided that the type of that value by the time I call the next function is a fucking Intersection.
WHY THE FUCK DO YOU THINK IT’S AN INTERSECTION?! I’m fucking casting it per case! I’m ensuring it’s the right type for the next function called on a per case basis!
…. And that, my friends, is how I wasted a day with a stupid refactor that was ultimately just scrapped because no one could figure out how to make it work.
Goddamn fucking TypeScript. I3
Our company is cheap, cheap as fuck. We have to use some third-party platforms and every year they choose something that is slightly cheaper than the other. (like a few $ per annual), they do not know that we have to refactor our code at the backend because the changes of the platform.
It doesn't end there, they even look for devs from third world countries to work for them remotely instead of hiring permanent staff (I understand it is cheaper because of currency difference and etc), but what about the training period or to let them become comfortable with the existing system, even when he/she is a genius... it takes time to be productive at work.
The worst part is they dont give a shit, they think devs can be replaced easily just like some construction workers carrying stuffs on site (no offence to them), management treating people like shit and doesn't care when they leave.2
Engineering managers will say things like -
- "I'll let the team decide what's best for them" & "code quality is our primary goal" -
but then they'll shoot down any & all requests to go back to some old piece of code and refactor/clean it, because of "deadlines".
Hypocrites, all of them.5
Problem: ugly-ass php spaghetti code that has a technical debt of 16(!!!) years. I mean, it's so spaghetti that has two legacy frameworks that talk to each other inside the same monolith.
Observation: after two months my colleagues, trying to refactoring stuff, they were able to touch so little stuff that it almost made no difference.
How much is worth a rewrite? Because i don't think i can make a difference on a codebase so messy.
I know that rewrite is not the answer 99.9999% of the time, but i have tons of doubts here.14
I have been working on this software for 3 years now. The code base was a working prototype made by my boss before I came, not more, not less. Php + Angular. Have been refactoring a lot, backend is backed with hundreds of tests now, frontend still lacks a lot. Still a lot of programm structures are still the same weird ones my boss once created in a rush between two meetings while learning Angular to get the prototype finished. Now it's used in production which makes hard to refactor, because we have to maintain backwards compatibility. Neither the parts I added or refactored completely are satisfying, because they are built on this structures, because i never got any feedback for anything I decided and because I changed my own paradigms over time.
So I am all alone on this project. All genuinly new projects are assigned to the new team members (i was the first one, no we are five plus my boss) because I wont have time, have to maintain the old one. So I never can do something new which is quite frustrating.
I did a little side tool, the only thing I invented and did completely by myself in our repertoire - and now some stakeholder shows big interest onto this. Instead of giving me the task to make a real project from this my boss wants to give it to them to develop it. Why? Because I need more time for the main application.
Also the more the software is used the more bug tickets and feature requests come. I was crying for help for months but the others had appareantly more important stuff to do.
This might be true to some extend. Yesterday we had some kind of crisis meeting and my boss wanted again to assing pur junior to help me, who has a shit load of other things to do and is a student. I insisted that this would not be enough, and one of the fulltime devs has to get involved because the thing is our core application and I am only part time btw. So my boss said we wont decide today but one of them should do it. They should have some time to figure out who which is understandable but it's not that I didn't keep saying this for months. Now they are all like whimp whimp when I have to do php i will quit. The new projects are all typescript, with node backend if any. But alas, one of them even said yesterday he doesn't want to do js anymore. Okay... but... this is our tech stack then get another job allready?
And I should do the same probably. But then again I feel very sorry for my boss who helped me in very dark times of corona and more. If both of us leave, the project he worked on for decade (including convincing poeole, collect money..) might be suddenly at it's end while he is so exited about it's access today...
I also get insecure if it's really that they hate php so much or that they don't want to work with me personally because maybe I am a bad team Player or what?
I experienced the same at my old workplace, got left alone with big parts of the project because they didn't want to do php and js in this case and it ended up five devs doing the python backend and me doing the frontend and the php cms part all alone. Then I quit and now everything seems to happen again.
And then again I think I am only fucked up so hard by this stuff because I do not really like being a developer at all. I only do it for the money and because I am good at it (at least i think so. Nobody ever bothers to ever to read my code and give me feedback, because you know, php and js). So I guess I would hate any other job in the field maybe likewise?
This job *is* convinient, salary, office
position, flexibility could not be better. At the end of the day it's not that stressfull. And i don't have any second of freetime (due to family) or energy i could offer a new and more demanding employer, can't work over time or even take a fulltime position, can't home office, can't earn less, can't travel very long to the office and especially can't go back to school to learn something completely new. Some of these constraints are softwe then other naturally but still my posibilities at the Moment are very limited. That might change in about five years if the family situation changed. So it would most likely be reasonable to stay until then at my current job? And bear being alone with this app, don't getting involved on any new project, don't learn anything new, don't invent anything.
There was one potential way out, they considered offering me PHD position to the upcoming ml part of the project... But I learned that I would attend to a bunch of classes at university first, which i would like to, but I don't think i have the time.
I feel trapped somehow. I also feel very lonely in the Office because those fucktards keep saying in home office.
Man, I don't want to go to work today.6
In flutter , there’s something called TextButton.icon. Which render a button look like this :
(👍🏼 Like Button)
But there’s this tiny twat decided to use countless of nested column in a nested row and containers just to create a fucking button! This particular class contains 1438 lines of code! Most of the code are redundant and nested fucking shit.
I want to punch this guy so hard but I do not intend to start a ww3 with china.
That means I have no choice but refactor it as I implement a feature requested by the product team, every components break. It is like a land mine field here. One changes , the entire application crash.
So there are useless mother fucking Sherlock fucking holmes kept telling me that “don’t worry about refactoring now , just complete the task.” , like seriously “how in the name of mother fucking god of all arseholes can I complete my task when I can’t change even one component?”
These people are fucking genius. Their intelligence resurrected Einstein and made him die the second time.3
Two brainfarts that resulted in... a lot of pain
I had been coding all day, ~6hrs. I was in the zone, so I hadn't saved to git. It was all uncommitted changes (you see where this is going...)
Brainfart#1: The code used the "Contact" class, but for some reason my hands typed "Product" in this ONE line.
Brainfart#2: I became aware of Brainfart#1, so I changed the variable from "Product" to "Contact". However, I instinctively pressed F2, "Rename Symbol", instead of just changing the variable I was using. Now ALL of the references to "Product" were to the "Contact" class instead, across all of our code.
I finished coding. I committed and pushed the changes, closed the IDE, and left the desk for a snack. When I came back, the automated tests were failing due to an import error. That's when I noticed my mistake. I couldn't do Ctrl+Z because I had closed the editor. I had to change the names one by one across all of our code. "Contact" and "Product" are probably our two most used classes 😭6
probably every time I see my tests failing.
Each time I am writing tests I'm convincing myself "it's an investment", "spend 2 hours now to save 2 days later", "unit-tests are good".
And each time I'm chasing away ideas like "perhaps they are right, perhaps writing unit tests is a waste of time..", "this code is simple, it should ever break - why test it??", "In the 2 hours I'll spend writing those UT I could build another feature"
Yes, it is terribly annoying to write tests, especially after writing the production code (code-first approach). Why test code that you know works, right?
But after a few weeks, months or years, when the time comes to change your feature: enhance it, refactor it, build an integration with/from it, etc, I feel like a child who found a forgotten favourite candy in his pocket when I see my tests failing.
It means I did a very good job writing them
It means it was not a waste of time
it means these tests will now save me hours or days of trial-and-error change→compile→deploy→test cycles.
So yeah, whenever I see my tests fail, I feel warm and fussy inside :)3
Here we are, three years later. Our system breaks down at the slightest load. An architecture is hardly recognizable anymore. The code consists of methods that have been refactored beyond recognition. The so-called architects came and went, leaving behind an ever-growing fiasco. Wrong decisions are concealed, criticism of them dismissed as ignorance. Our clients are on the verge of having us all killed. Daily crisis meetings are the norm. The remaining developers skulk around the unmaintainable code like emaciated ghosts. Everyone who has even the slightest chance to escape takes a parachute. Our dailies are made up of lies to cover up yesterday's lies. Our Mondays have become days of dread, because that's when the weekend disaster news has to be analyzed. Yet there are still developers who turn a blind eye. Who recommend this and that workaround in a good-humored tone. The code consists only of workarounds. Sarcasm has replaced any normal discussion. Reasonable suggestions on how to basically refactor the whole thing are rejected for cost reasons. In the process, our entire budget is eaten up by maintenance costs. Middle management should be put up against the wall. Why am I still here? This deceptive feeling that one could still turn the tide. This is eating me up.2
Oh, as a noob dev my team was using a dropdown library for our filters in the website. The code was messed up cause they kept changing the design halfway through dev and after releases and then finally after some releases, the client wanted multilevel options as a new requirement.
So I scrapped the whole thing and made my own multilevel dropdown component (there were no decent libraries then) and we used that from then on. It has many issues now that I look back (who cares about keyboard interaction right?). But that is a refactor for another day.
Today i had to revisit my code to change some functionality for an application i made 3 years back.
I wish i could go back in time, refactor the code and write Unit tests.1
I was asked to make proof of concept small frontend app with some simplified requirements, they asked me because it should be written in the stack I done most of my career work with. I do it in 3 days instead of 5, using those 2 days to optimise the app and explore different approaches. I noted down my findings, what to avoid and reasons and also what is good to use and reasons and shared with everyone.
We waited for the project to start, I started working on another project in the meantime and there was a big rush to make project go live etc., so I was consumed 100% on that new project.
So they put in charge backend php developer to do frontend js work. I said ok, do you need help in starting out? Nah, my proof of concept repo is enough.
4 days before that small project goes live they asked me to do code review. All things I noted down to avoid are in the codebase, few bad practices but everything is over-engineered (in a very bad way), some parts should be more flexible as current setup is very rigid, having almost all kinds of CSS, I saw SASS, CSS variables, 2 different CSS-in-JS tools with some additional libraries that is used to toggle classes.
I don't know how to approach this as I am not asshole as a person and I don't want to say to my colleague that his codebase is completely trash, but it is.
The worst parts: They called me to help finish the app and budget is almost spent!
I would rewrite the whole app as the state of the current app is unusable and everything is glued with bad Chinese ducktape that barely holds.
Additional points because it won't bundle as everything is f**ked.
I am seriously thinking of duplicating master branch and refactor the whole fricking app but won't do that as I am burning midnight oil on other two projects. Don't worry overtimes are paid.
I hate those shitty situations, this project was supposed to be tiny, sweet and example of decent project in this company but it is instead big fat franken-app that will be example how smart it is to avoid putting backend dev to do frontend work (I also agree for vice versa)!
So I made an update to my React Native app. I changed UI of a couple of screen, added a few animations here and there, refactored how my graphQL resolvers work in the backend(no breaking changes), changed how data gets loaded into the database etc.
It worked in dev so I figured hey let's deploy it. Today is(was because it's now 3am but more on that later) a national holiday so no one goes to work so no one will use my app so I have an entire day to deploy.
I started at 15:00(because i woke up at 13:00 lol). I tested the update once again in dev and proceeded to deploy it to prod. I merged backend to master, built docker images, did migrations on the db, restarted docker-compose with new images. And now for the app. I run ./gradlew assembleRelease and it starts complaining that react-native-gesture-handler is not installed. Ugh, rm -rf node_modules && yarn install. It worked. But now gradlew crashes and logs don't tell me anything. Google tells me to change a bunch of gradle settings but none of them work. Fast forward 5h, it's around 20:00 and I isolated the issue to, again, react-native-gesture-handler. They updated from 2.2.4 to 2.3.0 which didn't fucking compile. 2 more hours passed (now 22:00) and I got v2.3.1 working which fixed the problem in 2.3.0 but made my app crash on startup. YOUR FUCKING LIBRARY GETS 250K WEEKLY DOWNLOADS AND YOU DONT EVEN BOTHER CHECKING IF IT COMPILES IN PROD ON ANDROID?! WHAT THE FUCK software-mansion?
After I solved that, my app didn't crash. Now it threw an error "Type errors: Network Request Failed" every time I fetch my legacy REST API(older parts use rest and newer use graphql. I'll refactor that in the next update). I'll spare you the debugging hell i went through but another 5h passed. Its 3am. My config had misspelled url to prod but good for dev... I hate myself and even more so react-native-gesture-handler.3
Seriously guys, how do you deal when remotely collaborating with lets say not the most motivated and competent devs?
Our scrum team got formed about 6 months ago from leftover devs of other teams, choosing a couple competent devs at the core and other devs who were kinda gotten rid of by their old teams, and after 6 months of working together I can see why.
Situation is that we are 7 devs in our team and 4 of devs are not pulling their weight. They are seniors on paper, but in reality not really.
They rarely take something complex to work on and even if they do, they make sure they take as much time as possible. Two of them are contractors who I imagine decided to treat the job as a paycheck and nothing more. There is no initiative, no push to make things better and in general attitude is to do bare minimum: only what is being asked and then delaying the hell out of tasks.
Im not exaggareting: Im talking about every possible way of dragging out the tasks: delaying communication, sitting around for a few days while not asking for new tasks to work on if they are blocked, also avoiding standups. Working for days on very basic comments in their MR's. Getting "sick" for a couple days on deadline when things get tough, so that someone else would come in, refactor and save the day. Once or twice it could be a coincidence, but nowadays I can already guess ahead of time what kind of trick they will pull now.
Our project is an android app where we have to support few different tablets, so the most recent new trick that I witnessed is devs avoiding hardware delivers, sometimes for months. Idea seems to be if you dont ping your team that you dont have hardware, then you can avoid working on related tasks with that hardware.
Worst part is that they get away with it. Our teamlead is a senior dev who is first time teamlead, doesnt code anymore and doesnt want to rock the boat. He is the type of teamlead who sets arbitrary deadlines, makes it sound that they are urgent and takes a few days off in the middle of chaos just before deadline. Restrospectives don't help at all and if I try to bring up stuff directly to him he tells me to bring it up during retrospectives. We discuss issues, rant a bit ant then continue carying on like nothing happened and nothing changes.
So little by little in the past 6 months we came to this point where 2-3 devs are carrying the weight of the team and are in a constant crunch mode, while others are allowed to slack. Its becoming ridiculous.
Problem is that this is starting to affect our morale. Only way that is left to keep my sanity right now is to pull away sometimes and also slack. Then I come back at full capacity, give my best for a couple weeks until I have to go and fix some basic leftover task that has been purposefully dragged out for 2 months and left unfinished, then I just want to scream and I know that its time to disconnect again.9
Quick questions for some vim lovers out there.
I've seen a lot of youtube videos of people using vim/nvim/spacevim/... as their main IDE, claiming that they are perfectly fine with this setup. However, most of this people are programming in not heavy object oriented languages, like JS, C, Rust, Go.
My question is: are there any Java developers who are using vim as IDE and are satisfied with their setup? Is is even possible to migrate from Jetbrains tools to your setup without huge productivity drop? By productivity I mean - a lot of IDE stuff like name refactor, great lombok support, debugging tools7
Been working on a project for 2 months with Colleague "Jim" doing the code reviews. Project is finished in a stable form and can be extended if needed. Then my other colleague/boss "Mo" decided that we need to do a refactor. Fast forward a bit and the conclusion is "Mo" and "Jim" are going to discuss every step with me. And we started a new project that should do the same as the project I just finished
Here some facts:
Every day a meeting/ code review / discussion.
Decisions they make I do not agree with.
I need to redo my work multiple times.
Now this does make me look like a toddler that needs supervision which is not the case.
They want something future proof and something that fits his new coding standard "Mo". and certain things I do agree with and is clearly the better architecture. however somethings are just stupid, time wasting, making it worse. I'm getting so frustrated by the fact that billion dollar companies have clear coding standards that work. and are correct. and this company decided to do their own thing of stupid rules!
- shorten variables
- Keep lines under 90char
- put multiple things in 1 file
- Keep function names short
and many more of removing stuff and let you guess stuff..
I just... *sigh* get so tired of this shit.
*names are randomly chosen2
How to disconnect from work after working hours? Im working for the last 4 months as a mid level dev in this company. I mean Im able to problem-solve and do my work but sometimes I get so addicted to problem solving that I get worried and become obsessed, hyperfixated (especialy if Im stuck on something for lets say a couple weeks). It goes to the point where I work from home 12-14 hours a day just to figure out some bug in the flow.
Thing is, our codebase is large and when doing every new refactor/feature some surprises happen. I dont have a decent mentor who could teach me one on one or even do pair programming with. All i have is just some colleagues who can point me to right direction or do a code review from time to time. Thats it.
I dont know why I take this so personally. For example I had to do a feature which I did in 1 week, then MR got approved by devs and QA. After that during regression they found like 3 blockers and I felt really bad and ashamed. While in reality our BA did not define feature properly, devs who reviewed it didnt even launch the code and poke around in the app, and our team's QA tested only the happy scenario. Basically this is failing/getting delayed because of a failure in like 6-7 people chain.
However for some reason Im taking this very personally, that I, as a dev failed. Maybe due to my ADHD or something but for the next days or weeks as long as I dont find solution I will isolate myself and tryhard until I get it right. Then have a few days of chill until I face another obstacle in another task again. And this keeps repeating and repeating.
My senior colleague tells me to chill and dont let work take such a toll on my emotional/physical/mental health. But its hard. He has 7 years of experience and has decent memory. I have 2-3 years of experience and have ADHD, we are not the same. I dont know how to become a guy who clocks out after 8 hours of work done everyday. Its like I feel that they might fire me or I will look bad if I dont put in enough effort. Not like I was ever fired for performance issues... Anyways I dont know how to start working to live, instead of living for work.
I hate who Im becoming. I dont work out anymore, started smoking a lot, dont exercise. I live this self induced anxiety driven workaholic lifestyle.6
At my new organization , they love spaghetti code, they neither want me to refactor it, because it works. Special thanks to php.6
Alright, I need an advice.
I have legacy Angular client. It’s impossible to refactor it. The only real option is to rewrite everything from scratch, however, while the team does it, it needs to be accessible to our clients.
The approach I am thinking of is making micro-frontends out of original client and rewriting each of them (in React, Vue, don’t know yet.)
Anyone has experience with that? I would appreciate any advice or suggestion.6
Perfectionism... I often refactor my code because I always see something that could be "done better" in my own work, which can slow me down if I'm not paying attention to my main task.
If I could stop time I would perfect my code all day, but that isn't realistic. 😂
Doesn't apply to dev work only, I've had to learn the art of not giving a shit about every single detail in many other disciplines. I just love getting things done really well.
♫ It's high time we reviewed our design, ♫
♫ The code behind our system is just too byzantine, ♫
♫ We'll rewrite all the legacy and take it off line, ♫1
I'm going to confess: I am the type of developer that creates the ExcruciatinglyLongAndSpecificClassNameObject with the UtterlyDetailedExplanationMethod. It's just a thing I keep doing, despite voiced frustrations from people I've worked with. It just feels right in the mindset of self-documenting code
And while I acknowledge this isn't a flawless process, I see no other way around without losing information. I've tried alternatives, but everything feels like trading one issue for another:
- Abbreviations work as long as they are well known (XML, HTML, ...). As soon as you add your own (even if they make sense in the business context) you can bet your ass someone is going to have no idea what you're talking about. Even remembering your own shit is difficult after X months.
- Removing redundant naming seems fine until it isn't redundant anymore (like when a feature with similar traits gets added). and you can bet your ass no-one is going to refactor the existing part to specify how it differs from the newly added stuff.
- Moving details to namespaces is IMO just moving the problem and pretending it doesn't exist. Also have had folks that just auto-include namespaces in VS without looking if they need the class from namespaceA or namespaceB and then proceed to complain why it doesn't compile.
So, since I am out of ideas, I'd like to ask you folks: Is it possible to reduce class/method name lengths without losing information? Or is self-documenting code just an ideal I'm trying too hard to achieve? Or are long names not a problem at all? I'm looking forward to your answers.6
mark point of interest i don't know how to refactor but have a work around of avoiding additional changes on
nobody has feedback or alternative solution
tech lead and manager still approved MR
How do you deal when you are overpromising and underdelivering due to really shitty unpredictable codebase? Im having 2-3 bad sprints in a row now.
For context: Im working on this point of sale app for the past 4 months and for the last 3 sprints I am strugglig with surprises and edgecases. I swear to god each time I want to implement something more complex, I have to create another 4-5 tickets just to fix the constraints or old bugs that prevent my feature implementation just so I could squeeze my feature in. That offsets my original given deadlines and its so fucking draining to explain myself to my teamlead about why feature has to be reverted why it was delayed again and so on.
So last time basically it went like this: Got assigned a feature, estimated 2 weeks to do it. I did the feature in time, got reviewed and approved by devs, got approved by QA and feature got merged to develop.
Then, during regression testing 3 blockers came up so I had to revert the feature from develop. Because QA took a very long time to test the feature and discover the blockers, now its like 3 days left until the end of the sprint. My teamlead instantly started shitting bricks, asked me to fix the blockers asap.
Now to deal with 3 blockers I had to reimplement the whole feature and create like 3 extra tickets to fix existing bugs. Feature refactor got moved to yet another sprint and 3 tickets turned into like 8 tickets. Most of them are done, I created them just to for papertrail purposes so that they would be aware of how complex this is.
It taking me already extra 2 weeks or so and I am almost done with it but Im going into really deep rabbithole here. I would ask for help but out of other 7 devs in the team only one is actually competent and helpful so I tried to avoid going to him and instead chose to do 16 hour days for 2 weeks in a row.
Guess what I cant sustain it anymore. I get it that its my fault maybe I should have asked for help sooner.
But its so fucking frustrating trying to do mental gymnastics over here while majority of my team is picking low hanging fruit tasks and sitting for 2 weeks on them but they manage to look good infront of everyone.
Meanwhile Im tryharding here and its no enough, I guess I still look incompetent infront of everyone because my 2 weeks task turned into 6 weeks and I was too stubborn to ask for help. Whats even worse now is that teamlead wants me to lead a new initiative what stresses me even more because I havent finished the current one yet. So basically Im tryharding so much and I will get even extra work on top. Fucking perfect.
My frustration comes from the point that I kinda overpromised and underdelivered. But the thing is, at this point its nearly impossible to predict how much a complex feature implementation might take. I can estimate that for example 2 weeks should be enough to implement a popup, but I cant forsee the weird edgecases that can be discovered only during development.
My frustration comes from devs just reviewing the code and not launching the app on their emulator to test it. Also what frustrates me is that we dont have enough QA resources so sometimes feature stands for extra 1-2 weeks just to be tested. So we run into a situation where long delays for testing causes late bug discovery that causes late refactors which causes late deliveries and for some reason I am the one who takes all the pressure and I have to puloff 16 hour workdays to get something done on time.
I am so fucking tired from last 2 sprints. Basically each day fucking explaining that I am still refactoring/fixing the blocker. I am so tired of feeling behind.
Now I know what you will say: always underpromise and overdeliver. But how? Explain to me how? Ok example. A feature thats add a new popup? Shouldnt take usually more than 2 weeks to do my part. What I cant promise is that devs will do a proper review, that QA wont take 2 extra weeks just to test the feature and I wont need another extra 2 weeks just to fix the blockers.
I see other scrum team devs picking low hanging fruit tasks and sitting for 2 weeks on them. Meanwhile Im doing mental gymnastics here and trying to implement something complex (which initially seemed like an easy task). For the last 2 weeks Im working until 4am.
Im fucking done. I need a break and I will start asking other devs for help. I dont care about saving my face anymore. I will start just spamming people if anything takes longer than a day to implement. Fuck it.
I am setting boundaries. 8 hours a day and In out. New blockers and 2 days left till end of the sprint? Sorry teamlead we will move fixes to another sprint.
It doesnt help that my teamlead is pressuring me and asking the same shit over and over. I dont want them to think that I am incompetent. I dont know how to deal with this shit. Im tired of explaining myself again and again. Should I just fucking pick low hanging fruit tasks but deliver them in a steady pace? Fucking hell.4
#Suphle Rant 6: Deptrac, phparkitect
This entry isn't necessarily a rant but a tale of victory. I'm no more as sad as I used to be. I don't work as hard as I used to, so lesser challenges to frustrate my life. On top of that, I'm not bitter about the pace of progress. I'm at a state of contentment regarding Suphle's release
An opportunity to gain publicity presented itself last month when cfp for a php event was announced last month. I submitted and reviewed a post introducing suphle to the community. In the post, I assured readers that I won't be changing anything soon ie the apis are cast in stone. Then php 7.4 officially "went out of circulation". It hit me that even though the code supports php 8 on paper, it's kind of a red herring that decorators don't use php 8 attributes. So I doubled down, suspending documentation.
The container won't support union and intersection types cuz I dislike the ambiguity. Enums can't be hydrated. So I refactored implementation and usages of decorators from interfaces to native attributes. Tried automating typing for all class properties but psalm is using docblocks instead of native typing. So I disabled it and am doing it by hand whenever something takes me to an unfixed class (difficulty: 1). But the good news is, we are php 8 compliant as anybody can ask for!
I decided to ride that wave and implement other things that have been bothering me:
1) 2 commands for automating project setup for collaborators and user facing developers (CHECK)
2) transferring some operations from runtime to compile/build TIME (CHECK)
3) re-attempt implementing container scopes
I tried automating Deptrac usage ie adding the newly created module to the list of regulated architectural layers but their config is in yaml, so I moved to phparkitect which uses php to set the rules. I still can't find a library for programmatically updating php filed/classes but this is more dynamic for me than yaml. I set out to implement their library, turns out the entire logic is dumped into the command class, so I can neither control it without the cli or automate tests to it. I take the command apart, connect it to suphle and run. Guess what, it detects class parents as violations to the rule. Wtflyingfuck?!
As if that's not bad enough, roadrunner (that old biatch!) server setup doesn't fail if an initialization script fails. If initialization script is moved to the application code itself, server setup crumbles and takes the your initialization stuff down with it. I ping the maintainer, rustacian (god bless his soul), who informs me point blank that what I'm trying to do is not possible. Fuck it. I have to write a wrapper command for sequentially starting the server (or not starting if initialization operations don't all succeed).
Legitimate case to reinvent the wheel. I restored my deleted decorators that did dependency sanitation for me at runtime. The remaining piece of the puzzle was a recursive film iterator to feed the decorators. I checked my file system reader for clues on how to implement one and boom! The one I'd written for two other features was compatible. All I had to do was refactor decorators into dependency rules, give them fancy interfaces for customising and filtering what classes each rule should actually evaluate. In a night's work (if you're discrediting how long writing the original sanitization decorators and directory iterator), I coupled the Deptrac/phparkitect library of my dreams. This is one of the those few times I feel like a supreme deity
Hope I can eat better and get some sleep. This meme is me after getting bounced by those three library rejections