You ever been worried about a developer after reading the code?
Posted by RedFlounder7@reddit | ExperiencedDevs | View on Reddit | 173 comments
I'm in a codebase right now that has all the signs of being really professionally done. Code structure is excellent, documentation, tests, etc. I'd assumed it was created by a team because it's a fairly big app, and while most of it is A+, some of it is really hacked: commented out code, bad formatting, dead-ends, no tests. It looks like the work of senior dev(s) and then edited by junior dev(s}. Or like an entirely new team was handed the codebase to support with no transition training.
I've since found out out that only one developer ever touched this code before it found its way to me. I'm finding myself wondering how they created such an image of beauty, only to start systematically destroying it from within. I seriously wonder if this guy had some kind of breakdown.
Mystery dev: I salute your hard work, and I hope you're all right out there.
pund_@reddit
I did a
svn blame
once when I was investigating a bug since I was puzzled as to what I found. After asking around about this person I found out he was fired.The story: He was transferred from another team that was working on a project that was winding down and had to pick up web development in a new language.
Apparently he just started panicking and making a mess and they had to get rid of him after a year or so of trying to calm him down and coaching him.
RandomlyMethodical@reddit
This sounds like what happens when deadlines get tighter on a big project.
RedFlounder7@reddit (OP)
I don't think this had a full lifecycle. It looks like he delivered the project and then got rapidly tired of supporting (his own) legacy code. That is, at the beginning there was a clear changelog (indicating post-release changes), but then it just went off the rails.
powerfulsquid@reddit
As others stated he became overwhelmed and stretched too thin. He likely had been assigned a new project after this one and his priority shifted to this but was also expected to continue supporting this app thus the codebase became shoddy as things needed to get done fast.
bunk3rk1ng@reddit
YUUUP. We had a new payment processing application. Since it dealt with money it was super well tested and documented... Initially.
As soon as we had an issue in production (not even a bug, it was a disagreement within the business of how they thought something would work and how it was actually working in practice, so it's not like some test could catch it). We were eating through thousands of dollars an hour. So I went to update the code and of course a bunch of tests started failing. My boss said "screw the tests! we need this out now!" So we just.... turned off the tests and never bothered updating them.
We had several issues like this and everyone knew better than to try to update the tests because they would end up hurting you any time something else like that came up. The documentation wasn't updated either because there was never any time to go back and weed through all the places these changes might have been mentioned.
NostrilLube@reddit
This really hits home. I just left a place of employment, longer than I'd like to admit. I sold myself as the 'do all and anything', cause i was young and dumb and needed this opportunity to work. Decade or 2 later, and it all just unraveled as it was never actually feasible to begin with. I'm doing fine and not worried, just odd how older you, can really be disrupted by the younger pure lack of experience. Something as simple, as saying NO. The employer is like, hey you "superman", why cant you be 3 supermen now... fuck off clown.
C_Madison@reddit
"No" is at the same time the easiest and hardest thing. If only we could somehow train this earlier and spare people having to learn themselves that not using it won't well.
drd-dev@reddit
I think I’m currently in this situation
HeyHeyJG@reddit
Very standard practice, it's terrible
zenware@reddit
Is this really the order it happened in the change history?
Typically I’ve seen the opposite from solo developers, it starts out as a steaming pile of garbage while they explore the solution space. After grappling with the problems for a while, they eventually start striking gold with the domain modeling, and huge areas of the code start to clear up and become really clear to a new reader.
In the very same way that usually anyone new to any topic doesn’t really know what’s going on and would struggle to explain much of it, then after some study and practice they can begin to stammer out explanations, and eventually that can give crystal clear, concise sound-bites that a five year old could understand.
catecholaminergic@reddit
You sure are making a lot of assumptions
RedFlounder7@reddit (OP)
I am, but it's based on what I see in the codebase.
-casper-@reddit
I think this could just be life happening. Be it burnout, outside of work disruptions / events, the greenfield project losing its shininess, or changes within the business to accelerate timelines
dexx4d@reddit
Having a kid and losing sleep could do it too, especially a kid with medical issues or extra needs.
Maybe a divorce or death in the family.
Or all of that, at once.
TScottFitzgerald@reddit
I mean yeah, that sounds about right, especially for a solo project. You get that initial wind in the sales with a fresh project but over time you just get fatigued, bored, + there may have been different project constraints, priorities shifting, budgets tightening, etc etc.
This isn't really reflective of their mental health as much as the project's health and resources dedicated to it over time. Can you tell how long they worked on this from the changelogs or git?
Mortimer452@reddit
"Quick fix for production issue I'll come back and redo this later"
RedFlounder7@reddit (OP)
Time since commit with the TODO still in the code: 7 years.
Healthy-Bonus-6755@reddit
Yep, when there's a manager breathing down your neck to release something, you have to make cuts and unfortunatley those cuts are in the best practices department. You can't write good decoupled code because that takes time in design and discovery. I push back as much as possible and always make clear to the manager that yes I can write this quick but we will be revisitng this in three months. Ultimately that's up to them.
agumonkey@reddit
other issues can cause demotivation, if the project is derailed by a higher up, contributions not valued, raise refused
Typicalusrname@reddit
Can’t up vote this enough as it’s 100% true. Tighter the timeline, more things don’t get cleaned up
the_fresh_cucumber@reddit
The worst work you see is rarely an indication of poor skill. It is an indication that they were being hasty.
a_reply_to_a_post@reddit
business needs shift too and it needs to be done yesterday, and then devs are not given the proper time to decruft it because we need to ship the new thing tomorrow too
pguan_cn@reddit
Exactly, seen similar happen several times. Project released and was a success, core member got promoted to do other things or not getting enough credit and left, after shuffle new team comes in to “maintain” it (as their secondary goal since it’s just maintaining) 3 yrs later there’s a new requirement, but it’s already an old code base that no one from the new team really understands the code/project except from how to restart it, and they are force to add code into this code base they’re supposed to understand. That’s why you see what you see, OP.
Captain_Flashheart@reddit
I worked on a project where the developer had killed himself and we had to salvage the project and get it up and running. It was depressing cause you could get the vibe that he was becoming more and more disturbed by looking at individual code blocks. It was really complex code, too.
tomugon@reddit
Non dev people and bad devs would never understand how much of self there is written in the code that runs our life's.
It really is a subtle thing, but emotions, life situations, mood, all of it is transmitted to the Code.
To me it's amazing how much you can learn about a person by just reading their code, as I've experienced it over and over.
Kuresov@reddit
I hate to ask, but I’m curious. What about the code that was written gave you that impression?
Sounds like a tough and uncomfortable situation. Sorry you had to go through that.
Animostas@reddit
What I've generally seen is that it's when a developer is tunnel visioning on edge cases that make no sense and not even really thinking about the happy path at all. It kind of reflects a "Sky is falling and I don't even know how to bring myself back to reality" kind of feeling and maybe some delusional thinking.
So for example, if I have to implement an input field for a name in a signup form and my health was in poor shape, then I might:
Not even properly save the state of the value in the input field
Consider edge cases for what if the language reads from right-left, like in Arabic, or top-down, like in Chinese, when the rest of the page doesn't check for that
Adding character length restrictions, and then handling cases where the length of the name is so long that the browser runs out of memory.
Preventing SQL injections by base64 encoding the name, inventing my own half-finished cypher to encrypt the name, then incorrectly decrypting it server-side and base64 decoding it
Trying to figure out how to disable ad-block on the user's browser in case it might block validation errors for the user's input.
RiverRoll@reddit
I would say CV driven development also explains this sort of stuff.
awkward@reddit
I think the switch from greenfield development from concept, design and specs to brownfield ticket based work causes a lot of this. When you have to clear a specific ticket to close out the sprint, often with pressure, it’s easy to get bogged down.
Spleeeee@reddit
This is ocd
petitlita@reddit
b64 encoding client side won't even prevent sqli
stabamole@reddit
Don’t @ me lol
Mostly kidding, but recently was building an API key rotation system for a single server to multiple client scenario that was down the chain from a major site, not high priority but still in the path. I was thinking of some wild edge cases and failure scenarios that I needed to spend a few hours graphing to even explain the type of scenario I was accounting for to my coworkers
All that to be said, I had limits to how extreme of scenarios I was willing to account for and this isn’t how I code in almost all other cases
Animostas@reddit
"What if a malicious actor manually rotates the API Key 100 times within an hour and the clients are never able to catch up???" is always enough to make anyone unwell lol
RedFlounder7@reddit (OP)
You know, it's not even my physical health, so much as my mental health. When I feel like I'm out of control in general, my coding choices I can control. Let's face it, it's usually easier to let myself drift into the absorbing world of edge cases than to face what's going on in my reality.
Animostas@reddit
Yeah I think we all have moments where we go down ridiculous rabbit holes. But they always last for like an afternoon until we talk to a coworker or get some food and realize "Wait wtf was the point of this again".
For me, these kinds of "moments" were always accompanied by really intense work stress, lack of sleep, poor diet, etc. It all sort of compounds together at a certain point.
notascrazyasitsounds@reddit
It was a wild ride reading this - I think I identify with those thought processes a little too much for my liking.
Part of it is that I'm a new coder (I'm writing software full time and have been for 18 months, but I have no formal education or experience prior to this job) and don't have any mentors in the company so sometimes I just... Do dumb shit and lose the forest for the trees
But I also had/ve mental health struggles and sometimes I find myself so worried about failing or pushing a bad update that I just don't do any coding at all, or waste time on things that aren't "the happy path" so to speak.
Thanks for sharing your comment it gave me an opportunity to reflect
Animostas@reddit
I feel like we all resonate with these a little bit. I know personally when I was early in my career and wildly stressed out and sleep deprived, I would slip into some of these thought patterns sometimes too. Also when we're early in our career, we don't really know when we're missing the forest for the trees because we don't have the right context yet. It's really only an issue when it's going on for days and a sleep or some fresh air doesn't help out.
RegrettableBiscuit@reddit
Code Creepypasta... I wish I hadn't read this whole thread, I will never look at code the same way again.
RedFlounder7@reddit (OP)
Same. I've read a lot of code in my time, but this is the first time I've felt this about the developer. I'm guessing that I'll be seeing it more often now that I know what to look for.
negativecarmafarma@reddit
I don't know why, but all the things you listed are genuinely unsettling.
Animostas@reddit
Which is honestly the healthiest reaction to have lol. I think it tends to be unsettling because it's "technically correct", as in those are possible things to consider. So it ends up being very hard to talk someone out of it. But when someone has a very strong and different view of reality than you do, you just know that something is off and then you question your own sanity for a minute.
negativecarmafarma@reddit
You hit the nail on the head. Thanks for putting this to words for me
deathhead_68@reddit
This sort of scared me lol. It sort of painted someone who isn't in their right mind really well
Animostas@reddit
Sorry for scaring you! But I think as we get older, we end up running into someone who's in one of these headspaces in our personal or professional lives, for better or worse
deathhead_68@reddit
No worries. I've seen it happen more than my fair share of times, your comment sort of reminded me of it and my aversion to being in such a state myself.
lunacraz@reddit
crosses fingers it's not reflective of the code i'm writing subconciously
NewFuturist@reddit
Curly braces on new line.
TwoAndHalfRetard@reddit
what is wrong with Eric Allman code style?
M8LSTN@reddit
No way? Maybe an AI in GitHub should check for that
NewFuturist@reddit
Hook it up to an AI doctor and AI controlled cannula auto dispensing antidepressants.
bernaldsandump@reddit
Lmao
ventilazer@reddit
He started using tabs instead of spaces. This is it.
DoctorYoy@reddit
This actually sounds like a great movie.
RedFlounder7@reddit (OP)
I'd watch the hell out of that movie.
Evinceo@reddit
Breakpoint (2025)
CallMeKik@reddit
Oh that’s really fucking good, damn.
nonsenceusername@reddit
Checkout onepointo, 2003
touristtam@reddit
https://www.imdb.com/title/tt0317042/ ? cheers for the recommendation
nonsenceusername@reddit
Yep, that's the 1.0
Knock0nWood@reddit
The twist is that he didn't kill himself and went into hiding planning a terrorist attack and the clues are in the code
RedFlounder7@reddit (OP)
I like it. Somebody get this treatment greenlit!
Evinceo@reddit
He's going to work on Greenfield development even if it means ploughing over some legacy codebases.
SexualInnuendoAlert@reddit
This summer; staring Keanu Reeves
PianoConcertoNo2@reddit
This summer is over, you mean next summer?
PaulTR88@reddit
The southern hemisphere would like word.
damondefault@reddit
I'm in Australia but I'm ok with LibreOffice Writer actually
PaulTR88@reddit
God dammit :P Fixed.
hackthenet88@reddit
I wonder if a codebase can be haunted or cursed.
ProfessionalSock2993@reddit
Bloom house production has entered the chat
hackthenet88@reddit
Metaverse has entered the chat
EvilCodeQueen@reddit
Haunted? I doubt it. Cursed? Absolutely.
tonnynerd@reddit
Ken Thompson already came up with a mechanism to make a codebase haunted, in theory =P
divinecomedian3@reddit
Isn't every codebase?
DJOMaul@reddit
I had one of those. Scared odd three high level devs.
I am sunsetting it next quarter. 🎉
chicknfly@reddit
qpazza@reddit
I think there's been some low budget sci-fi movies on the subject
RelevantJackWhite@reddit
It reminded me a little of Bandersnatch
met0xff@reddit
True, reminds me a bit of Mr Robot
WornPomegranate89@reddit
Oof that sounds rough
ryuzaki49@reddit
Jesus F Christ
choochoopain@reddit
:( This is so sad
SillAndDill@reddit
Depends if you know the full history of how this codebase was used.
I can imagine a scenario where an old codebase was replaced and no longer used in production, but someone kept using it as an experiment/hack (perhaps while pair-programming with juniors to get them up to speed) and suddenly it had to be used again cause the new replacement failed.
randomInterest92@reddit
This sounds like my payment gateway implementation. I had 3 months to build it, which is waaaaaaay too much, so I naturally tried to make it "perfect".
Then after the 3 months it was released to prod. Worked well for nearly 2 years, didn't even have to do a single bug fix (unbelievable i know).
Then suddenly a new CTO came on and wanted a lot of new features, e.g. replacing the external billing service with an internal one, an admin panel, statistics panel and so on. I got extremely tight deadlines on all these projects and couldn't convince anyone to push the deadline further. So I kept hacking everything in.
Now the core code of this is still good and well documented. The rest though is pure trash.
Ps: the CTO got fired a few months ago and I got promoted. So, Karma i guess
jcradio@reddit
Sounds like non engineers got involved and things get pushed out in unrealistic timelines.
boolean1567@reddit
Maybe he learned to code better! Our jobs aren't to create code that is a thing of beauty, it's to build things of beauty.
netderper@reddit
He probably just stopped giving a shit. Too many Zoom and Teams meetings, too many Slack interruptions, too many operational issues. Eventually you just start dropping stuff on the floor.
Wishitweretru@reddit
I have an Albatross site. I started it 22 years ago. Homespun CMS/Ecommerce/Inventory/Vendor... just everything to run a small manufacturing business. I grew a lot as a developer during those years, and some of those years I had a lot more time to work on it than others. I beg them to move on, pick something else, but sadly it is actually pretty good for their specific very complex product line. Such a brutal evolution from Monolith to Plugin, with some very special dives into performance. Had to go back and upgrade it from php 5.5 to 8.3 recently, so very painful. Someday I will die ; finally be free of that application.
touristtam@reddit
Upgrade jump is never fun regardless of the language. I feel your pain.
TheESportsGuy@reddit
Sounds like someone who copied someone else's work.
dusnik@reddit
I've seen that, but it was actually a paid app template
powercrazy76@reddit
Most organizations that do not consider IT to be a value add, usually fall foul of this because they don't reinvest in maintenance and support and the accounting for business changes and/or technical debt.
You can architect, design and build the best thing ever but turn it into a PoS by not maintaining it with the same level of due diligence.
It's also very common for the original implementers to move on for one reason or another and to have the training/transition not be great, further eroding the support of the system.
Finally another 'ism' I hate is, often new devs in an existing codebase, if allowed, will refactor it. Why? For lots of different reasons, from "I don't agree with the original design" all the way to "I don't understand the original design". And so the architecture drifts without explicit management.
Dapper_Tie_4305@reddit
There was one time where this was me. My manager started mistreating and bullying me so I stopped giving a fuck about my work.
WaitingForTheClouds@reddit
Yep. Currently my code is on a downwards spiral because my lead dev thinks that instead of providing clear feedback in reviews, he's just going to say the most vague and generic criticisms that are more like riddles and let me figure out what he means which leads to us just playing table tennis with Jira tickets. Hard to stay motivated when a task returns 5 times and the only comment is "X still not fixed".
RedFlounder7@reddit (OP)
Sadly, this is a common story in software.
mothzilla@reddit
Sometimes I like to do archaeological investigation. Check out the code a year ago. Look at the ticket that introduced the weird code. Look at the Teams chat from that time. Fascinating.
Humble_Ostrich_4610@reddit
It seems like a "higher up" problem. Some people think it's released and done and don't factor in the time needed to support it. I'd say the dev was moved onto something else 100% yet expected to support the old codebase.
yegor3219@reddit
You can only 10x so much on a 1x salary.
mosby42@reddit
Dead
Beneficial_Map6129@reddit
Sometimes people leave companies, there is no documentation, and a poor developer gets thrown an urgent task and does their best on a tight deadline.
One of the best senior architect devs I worked with said to always assume your fellow developers are smart, and it was a business situation or some crappy circumstance that led to broken or messy code. Always do your best citizen duty to clean up after them.
bwainfweeze@reddit
Almost everyone I’ve worked with has been really smart.
A lot of them have not been particularly wise and a choice few have taken the train to Crazy Town.
casey-primozic@reddit
It got outsourced to you know where
qdolan@reddit
If the developer is no longer there the change is quality is possibly a reflection of how they felt about their future at the company and just stopped caring at some point. Maybe they got burnout, or had a falling out with management, but it sounds like they just started phoning it in for some reason until they divorced themselves from the project completely.
ablue@reddit
I had worried that a developer had sustained a head injury after reading their code.
Indifferentchildren@reddit
I was pair programming with a guy one day who I had worked with for a couple of years. He started not making sense. He was using technical words, but nonsensically. I contacted our HR and had them contact his wife (since we were all working remotely). They resisted for privacy reasons, but after a couple of hours they relented and called her. She was at home with him but had not noticed anything. At the ER they determined that he had had a stroke. He seems to be okay now, but I wish it didn't take two hours to get him help.
thisisstephen@reddit
that's the most horrifying thing I can imagine, just suddenly having your brain not work and not noticing because your brain isn't working
RegrettableBiscuit@reddit
It's a common pattern with people suffering from schizophrenia that they go off meds when they feel well because they think they'll be able to tell when things start to go sideways. The problem is exactly what you point out: the very thing they intend to use to figure out if everything is okay is the thing that is no longer okay.
IAmA_Nerd_AMA@reddit
Have known a few like this now and its very sad. There is a pride factor involved: I don't want to be dependent on meds and I'm doing fine right now! It's understandable, nobody wants to feel broken. But not being able to self-evaluate is the kicker and they ride that forced optimism back into the next psychotic breaks.
misplaced_my_pants@reddit
What was the aftermath? Did he get help? Did he get better?
northrupthebandgeek@reddit
TIL I've been having a stroke for the entirety of my career.
Indifferentchildren@reddit
I should clarify: we were not working on a PHP project.
DigThatData@reddit
Wow great call!
yanumano@reddit
You’re a good person. Thank you for making a difference in his life.
tooawkwrd@reddit
Thank you for being a person who notices shit and takes action. You undoubtedly made a difference for that family.
modeezy23@reddit
I did this on my previous project. Only because deadlines were getting tight and I was like fuck it as long as it works. Got a 5 star review from the client 🤷🏽♂️
Satanwearsflipflops@reddit
Yup. I still have nightmares about it.
gemengelage@reddit
Usually it's the timestamps related to their work that make me worry, not the code itself.
Most devs try to superficially hide it by changing commit dates / squashing their commits, but when I log on Monday morning I get ten automated emails that they pushed to their PR on a Sunday. Or that they have one commit at 3AM and one at 7AM.
We have a pretty chill project overall and I usually can't tell if they feel pressured to work like this or if they just have a weird personal life.
Little_Dick_Energy1@reddit
I wish I could care that much about someone else's code.........
KerryAnnCoder@reddit
That sounds like what happened to my work just recently. I ended up taking a leave of absence until after the election, with the caveat that if Trump wins, that would be my last day either way (I'm relocating if he does, I don't trust that I won't end up in a camp.)
blast_them@reddit
i hesitate to ask, but if your concern is such, have you tried « git blame » to identify the author?
codepossum@reddit
for what it's worth - just because someone is capable of producing good work, doesn't mean they will always produce good work all the time for every client on ever project.
it's much much more common that you have someone who is potentially an excellent programmer... as long as they are handled properly. Give them the right manager, and they'll shine.
Hziak@reddit
I have three guesses
Deadline / scope of work change
Developer treatment changed (new manager? Laid off but came back as a contractor? Some other BS?)
Developer priorities changed (got a new side hustle? new girlfriend? Family crisis?)
I’ve been all three and it sucks to watch my code quality dip, but life be the way it be and at the end of the day, when you’re a solo dev, you’ll probably get away with it every time. The blow is softened if you know you’re not going to be around to have to fix it, I’ll tell you what.
ReloadRestart@reddit
Sounds a lot like you can determine via the git history when exactly the CEO sent out the "RTO for [collaboration |productivity|engagement]" reasons....
TheEndDaysAreNow@reddit
So he started out delivering a superior product. Did anybody notice? Care? Reward him? Was he equally ignored when he did the minimum? You are probably the first person to recognize the quality of his initial code.
derpinot@reddit
all budget went in development, maintenance however become the dev side job (and have to respond on a ridiculous timeframe) on top of another new project he/she does full time.
termd@reddit
Those hacks are usually new features, bug fixes, and "hey can you make xxx do some custom yyy when zzz happens" requests.
The happy path code is much easier to keep clean and awesome looking
tehsilentwarrior@reddit
If I was to guess, probably bet on: the guy did a PoC, got approved, worked on it on his own as a proud piece then after it was in UAT or actually prod, the bullshit pushers came in and started requesting bullshit and it went downhill.
When you are in a team it’s easier to distance yourself from bullshit by abstracting it as an idea and wrapping it as some sort of new shiny feature but if you got perfect project where everything just clicks and someone comes in and starts to throw a wrench into it, it gets messy.
www_the_internet@reddit
I have had that before. Inherited a messy, janky codebase like it was hacked by someone teaching themselves (on a live production codebase, no less). Took a while to clean it up. defo see a before and after.
fakehalo@reddit
That doesn't sound like OPs thing. One dev went from good structure to bad, the opposite.
bartekus@reddit
Software Engineer was put on PIP and became a developer…
DigThatData@reddit
My private process is messy, and it often takes extra effort to "clean up" code before I feel like a particular PR of mine is ready to be merged. If I'm in a rush, I will 100% every time prioritize getting ugly changes in that get the job done over making my code pretty and tidy.
gomihako_@reddit
People aren't static, we go through ups and downs in life. Illness, divorce, death, whatever.
Your ability to perform intense knowledge work is of course linked to your current mental state.
nuc540@reddit
Have you checked the commit history? I’m curious is the code started bad and got better or the other way around.
As people are suggesting though, as deadlines get tight you cut the quality to just get it over the line so I assume the latter
RedFlounder7@reddit (OP)
This was a contractor and the git history was missing when we were given the code.
ghostwail@reddit
Is it normal for contractors to deliver a code base without history?
RedFlounder7@reddit (OP)
I don't think this is normal, but it's been known to happen.
dexx4d@reddit
Maybe, depends on the contract.
Sometimes it's also normal for the client to send over a .zip of the repo to the contracting team vs giving github repo access.
OkImReloaded@reddit
I think yes. I had this as well
catecholaminergic@reddit
> junior dev(s}
You ever get worried about a redditor after reading their use of delimiters
UntestedMethod@reddit
How long after the apparent turning point did the developer stop contributing to the codebase? I could definitely see this being something based on organizational matters like feeling underappreciated or unrewarded for their efforts, then checking out and doing bare minimum care and effort until they land a new job.
chunky_lover92@reddit
Sounds like they didn't finish.
CaptainTheta@reddit
This happens with basically every project. It begins with an architecture designed based on a thoughtful, well understood picture of the requirements and capabilities needed. The interfaces, classes and APIs make sense relative to the needs of the original design.
Inevitably your understanding evolves, major changes are needed to support new features and those needs are often not accounted for by the original design paradigm. This is totally normal and expected but it means that the code extending upon the original base inevitably looks out of place and sloppy. Often in the form of some random Singleton called all over the code base.
I wouldn't worry about it too much. Sometimes a more loosely coupled original architecture can help mitigate it but the complexity of the problems being solved are going to cause mayhem in the code at some point.
cosmic_timing@reddit
ADHD ai dev here, this is what happens when they iteratively go through code learning by mistakes until final product is done
maria_la_guerta@reddit
Every project turns to shit. Generally speaking its easy to argue for a decent budget when you're building a greenfield platform to serve an upcoming products / features needs.
Once it's launched though, the product needs trounce eng needs 9/10 times, and it's our jobs to find the right balance of duct tape and engineering to serve that.
3legdog@reddit
this guy entropys
maria_la_guerta@reddit
I'm staff dev on a 7M LOC pile of shit that pulls in $2B a year. It was built well... 10 years ago.
shamshuipopo@reddit
Hi are you me
maria_la_guerta@reddit
No I'm me, are you me instead?
fhgwgadsbbq@reddit
My guess is the a+ code took forever, deadlines weren't met, and then the last bits had to be rushed.
I expect most successful projects to have a rushed initial phase with "prototype" code hanging around long after it should have been refactored. The later phases, hopefully, have enough time to be done with care!
civicode@reddit
I once worked as the EM for a team responsible for preventing life and death situations from code written by the wider engineering organisation - I was the terminal escalation policy in PagerDuty. For an internal hire from another department, me and another engineer spent like 6 hours at night making this dudes interview test project (~80-lines) production ready which he produced for the internal interview. We basically rewrote the entire codebase.
We rejected him. The most safety critical engineering team hired him. Our team were responsible for any safety critical issues from this team.
It’s a testament to how strong my relationship with my partner was that she didn’t leave me in the resulting on-call periods.
IntermediateFolder@reddit
My guess would be that either people (usually who themselves have no idea about writing software) started demanding the features done faster than possible while maintaining quality so the developer started cutting corners wherever they could or that second part was written shortly before they left the job and had already mentally checked out by then. But the first scenario I have seen happen plenty of times in plenty of different companies.
hyrumwhite@reddit
Sounds like a standard project. Dev started off strong with good principles and then the deadline loomed, the project scope changed, or the work environment changed dramatically, or a combo of all three.
Western_Objective209@reddit
I mean most of just manage technical debt right? If you have a zero technical debt policy, that's also not great. Like I'll comment out code, or write stuff without tests, and write a bunch of TODOs, but I will actually resolve them down the road and pay down technical debt when it becomes an issue. This guy probably just left in the middle of working on features and didn't take the time to refactor before he left
Yodiddlyyo@reddit
This is exactly how my last year's worth of projects are. The first half is the most perfect, well thought out, documented code. The last half is the most disgusting, thrown together garbage that just barely works to meet a deadline that changed 3 times hah
NRG_108@reddit
Pretty much this.
qkthrv17@reddit
Sounds like me :')
In my case I almost left the company several times. Initially I was the only one working on the systems which felt engaging. They eventually brought in a "lead engineer" that had the most absurd ideas and almost no grasp of basic engineering principles or CS fundamentals.
I got heavily demotivated (that's why I almost left a few times) but now there are other lovely people surrounding me and the lead is trying to maximize their lazyness and go into management so they do almost no code right now, which kind of motivates me again.
There is also the sporadic and obvious deadline/focus issue but aside from that I'm suffering from my own choices and lack of pushback on dumb ideas.
NowImAllSet@reddit
It seems odd to me that we're jumping to mental health conclusions here?
Could very well be standard production maintenance tech debt. Dev is excited about the greenfield project, it's a labor of love, designed and coded with passion. Goes into prod, dev moves onto other stuff, but still has to maintain this project. And so they just start slapping fixes on and pushing them up.
EncroachingTsunami@reddit
Bro probably expected some reward for his good work. Then when the reward didn’t come he gave up.
adamjwise1@reddit
My first thought is that a code generation framework made the initial app, and then perhaps the dev struggled to maintain it? Is it possible it was made using JHipster or one of those cli tools?
met0xff@reddit
Honestly I feel over time I more and more realized being OCD about your code isn't worth it. Perhaps if you work in long-lived infrastructure code but most projects and products ... and even companies lol... I have worked with have been quite short-lived.
Not even necessarily because they failed but there was often some sort of deprecation. You know like you have to write your own neural network model format and then a year later there's ONNX or Tensorflow lite models or similar and you migrate to that . Early in my career I've worked on stuff that we later replaced with Nessus. I mean I remember I had to implement stuff in C with JNI for Java 1.3 that later became part of the standard library (I guess). I've written an SNMP Agent for the SUNSpot lol. Libraries for Blackberry and Windows Phone. Java ServerFaces eGovernment stuff that was already a rewrite from something else and probably was replaced by some other technology soon later.
Whatever, in any case I now rather have a product in three week that people can use for a couple months than a product in a year that nobody cares about anymore (and as crazy as the difference sounds, this is actually what I've seen in a startup product that was well liked by customers and then post-acquisition took over a year for the "enterprise rewrite" that people then didn't like anymore and also came absolutely too late)
Economy-Beautiful910@reddit
I worry about myself after reading my own code all the time
RedFlounder7@reddit (OP)
Hahaha! This is the answer.
SwitchOrganic@reddit
I've been the dev in question before. I started a greensfield project as the lead dev and did everything by the book, got a lot of compliments about my code base. Over time, I took on more and more responsibility and had less and less help. Then I found out that I wasn't being looked at for promo despite leading a team and holding a stretch role. So I stopped giving any fucks and did the bare minimum to keep my job while looking for a new one. I still maintain that project and I'll feel bad for whoever is going to take it over once I leave.
Dense_Age_1795@reddit
maybe it's possible that they was waiting for more people to enter to work in the project, and then after a meeting his pm said to them that they will be the only developer for the project, so they decide to not make an effort anymore to make the code understandable for anyone other than themself.
exploradorobservador@reddit
Yes. Especially if code reviews are not improving quality. I'm fairly patient but after a few I have to say I'm not gonna touch this until you've run our linter over it
micseydel@reddit
I'd be super curious about the timeline, I wonder if there was some kind of brain damage like https://www.nejm.org/doi/full/10.1056/NEJMe2400189 documents.
kaflarlalar@reddit
Wait until this happens and it's 100% your own code.
InfiniteJackfruit5@reddit
I do this after reading my code.
DeterminedQuokka@reddit
I wouldn’t worry that’s pretty normal. I am positive you’d say the same thing if you looked at my codebase it’s mostly caused by the fact that requirements change over time. So things with really solid requirements are built well, things with shifting requirements are hacked and sometime you quit before you fix them.
ninetofivedev@reddit
No. I don’t worry about such silly things
j-random@reddit
Sounds like your typical "new customer just came on, and we need to ship that POC you created, make this major change by the end of the week!" project. Best one I ever had was one where we got release 1.0 ready to ship, then the company "changed direction" and we mothballed it, then over a year later we had to hurridly revive it, update all the dependencies and get it out to a customer in a month. Good times, good times...
Some_Developer_Guy@reddit
You never know what else was going on when a piece of code was written.
maybe there was an incident or they up against a deadline, maybe their dog just died.
duckwizzle@reddit
If it's anything like where I work, you get a scope of work that is like 60% what they actually want, so you do it, then you spend the rest of the time making changes to whatever they actually wanted and they want it fast so it's not as pretty as the first 60%
keelanstuart@reddit
Shit happens. Cheers fam.