Details
Joined devRant on 12/22/2021
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
-
On the 18th October 2021 I had to hastily write some magic numbers into our code.
I added a comment saying "TODO: add a damn enum to make this selection clear"
Today, I refactored this module... and I used a damn enum.
Good things happen – have a nice weekend yall10 -
Manager: Why did you clear the data from the database? The client is now specifically requesting it and we don’t have it anymore!
Dev: You told me to.
Manager: Well why did you listen? It’s obvious now that that data was very important and should have been kept!
Dev: Last time you told me to do something that wasn’t a good idea I tried to explain why and told me not to question you ever again and that doing so was “disrespectful” and then threatened to have me fired. So now I just go along with what you say and let you suffer the consequences of not listening.
Manager: Well don’t do that then! It’s obviously not working very well! It’s ok to disagree with me you just have to make sure that what you think is something I agree with!
Dev: …11 -
HTML quick maffs
If you want to have a placeholder for native <select> element, just do the following:
<option value="" selected disabled hidden>Choose...</option>
It will make a native placeholder that:
- is accessible and readable by screen reader
- doesn't show up in options list
- allows native validation with "required" attribute (note the empty value attribute in the placeholder option).
It's unfortunate that we don't have it the way we have placeholder in inputs, but this is the next best thing.3 -
Facebook (aka meta ) is having their Linux Ecosystem. What do you think?
https://opensource.fb.com/linux5 -
I've told the same story multiple times but the subject of "painfully incompetent co-worker" just comes up so often.
I have one coworker who never really grew out of the mindset of a college student who just took "Intro to Programming". If a problem couldn't be solved with a textbook solution, then he would waste several weeks struggling with it until eventually someone else would pick up the ticket and finish it in a couple days. And if he found a janky workaround for a problem, he'd consider that problem "solved" and never think about it again.
He lasted less than a year before he quit and went off to get a job somewhere else, leaving the rest of our team to comb through his messy code and fix it. Unfortunately, our team is mostly split across multiple projects and our processes were kind of a mess until recently, so his work was a black box of code that had never been reviewed.
I opened the box and found only despair and regret. He was using deprecated features from older versions of the language to work around language bugs that no longer existed. He overused constants to a ridiculous degree (hundreds of constants, all of which are used exactly once in the entire codebase, stored in a single mutable map variable named "values" because why not). He didn't really seem to understand DRY at all. His code threw warnings in the IDE and had weird errors that were difficult to reproduce because there was just a whole pile of race conditions.
I ended up having to take a figurative hacksaw to it, ripping out huge sections of unnecessary crap and modernizing it to use recent language features to get rid of the deprecation warnings and intermittent errors. And then I went through the same process again for every other project he'd touched.
Good riddance.