Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "suicidal code"
So we had a dev on our team who was on a performance improvement plan, wasn't going to pass it, but decided to quit before it was over saving us 2 weeks.
I was ecstatic when he left (caused us hell). I knew updating his code wouldn't be great, but he was only here 6 months
"how bad could it be" - practiseSafeHex - moron, idiot, suicidal.
A little run down would be:
- Despite the fact that we use Angular 2+, one of his apps is Angular 1 ... Nobody on the team has ever used Angular 1.
- According to his package.json he seems to require both mongoDb and Cloudant (couchDb).
- Opened up a config file (in plaintext) to find all the API keys and tokens.
- Had to rename all the projects (micro services) because they are all following a different style of camelcase and it was upsetting my soul.
- All the projects have a "src" folder for ... you know ... the source code, except sometimes we've decided to not use it for you know, reasons.
- Indentation is a mess.
- He has ... its like ... ok I don't even know wtf that is suppose to be.
- Curly braces follow a different pattern depending on the file you open. Sometimes even what function you look at.
- The only comments, are ones that are not needed. For example 30+ lines of business logic and model manipulation ... no comment. But thank god we have a comment over `Fs.readFile(...)` saying /* Read the config file */. Praise Jesus for that one, would have taken me all week to figure that out.
Managers have been asking me how long the "clean up" will take. They've been pushing me towards doing as little as possible and just starting the new features on top of this ... this "code".
The answer will be ... no ... its getting deleted, any machine its ever been on is getting burned, and any mention of it will be grounds for death.6
Am I the only here who get so much PUSSY when encountering bugs in code?
P - panic attacks
U - uncontrollable anxiety
S - suicidal fantasies
S - sadness
Y - yearning to death14
Guy: - "Your restart script doesn't work."
Me: - "What do you mean?"
Guy: - "It does nothing."
Me: - "It should kill every processes that's running within the project and start them again. Wait... Why do you terminate it?"
Guy: - "I don't. It just stops."
Me: - "It says `Terminated` here. You killed it. Just let it do it's job, don't kill it."
Guy: - "I'm not killing it! It just stops!"
(...two hours later...)
Me: - "Wait... Where do you run it from?"
Guy: - "What do you mean? I just run the script you gave me."
Me: - "Yeah, but where do you run it from? Where did you put it?"
Guy: - "It's part of the project so I put it in the project, d'oh!"10
I have a love and hate relationship with programming. You'll see me as the happiest and most motivated person ever. The next minute, you'll see me as an extremely depressed suicidal person. Then when a code works, I jump like hell.1
We are all about structures, clean code and many other things that make our life easier, right?
Well... It's not all white and black...
As talked many times, projects can be rushed... Client budgets can be low at the start and only then grow...
Let me take an example:
Client X needs a tool that helps his team perform jobs faster. They have a $500 budget. So... Testing, clean architecture and so on - are not really a viable option. Instead, you just make it work and perform that task as needed. So the code has minimal patterns, minimal code structure, a lot of repetitive parts and so on.
Now... Imagine that 3 months pass by without any notice and clients are ultra happy with the product. They want more things to be automated. They contact developers and ask for more things. This time they have a bigger budget but short timeframe.
So once again, you ignore all tests, structure and just make it work. No matter what. The client is happy again.
A year passes and the client realizes that their workflow changed. The app needs total refactoring. The previous developer has no time for adjustments at this point and hires a new company. They look at the code and rants spill out of their mouth along with suicidal thoughts.
So... What would you do? Would you rant about "messy project" or just fix it? Especially since people now have a bigger budget and timeframe to adapt to changes.
Would you be pissed on such a project?
Would you flame on previous devs?
Would you blame anyone for the mess?
Or would you simply get in and get the job done since the client has a "prototype" and needs a better version of it?
Personally, I've been in this situation A LOT. And I'm both, the old and new dev. I've built tons of crappy software to make things work for clients and after years - they come back for changes/new things. You just swallow the pill and do what is needed. Why? Well, because it's an internal system and not used by anyone outside their office. Even if it's used outside the office - prototyping is the key. They didn't know if the idea would work or be helpful in any way. Now they know and want it done correctly.6
Me at interview ->
Imagine the frustration you may go writing code in a different platform not having your vimrc. Than imagine the suicidal thoughts you have after you finish your program and have tabs mixed with spaces and indent errors, well on top of that imagine losing all the code highlighting all the code using X to yank it and P to paste in another file
Well, i shut down the vim session and lost all the code i wrote in 2 hrs3
Why is it such a hassle to get Android Studio to work? Spending several hours filled with with installs, reinstalls, downloads, googling, troubleshooting, more failures, suicidal thoughts, env variable tinkering, crashes, total apathy - before I can finally start writing some fucking code is fucked up.1