Details
-
Skillsjava, typescript, php, sql, bash, perl
Joined devRant on 6/18/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
-
try {
…..
} catch {
// this would never happen
}
and then it happened
fucking always print something when you catch exceptions15 -
I’m surrounded by idiots.
I’m continually reminded of that fact, but today I found something that really drives that point home.
Gather ‘round, everybody, it’s story time!
While working on a slow query ticket, I perused the code, finding several causes, and decided to run git blame on the files to see what dummy authored the mental diarrhea currently befouling my screen. As it turns out, the entire feature was written by mister legendary Apple golden boy “Finder’s Keeper” dev himself.
To give you the full scope of this mess, let me start at the frontend and work my way backward.
He wrote a javascript method that tracks whatever row was/is under the mouse in a table and dynamically removes/adds a “.row_selected” class on it. At least the js uses events (jQuery…) instead of a `setTimeout()` so it could be worse. But still, has he never heard of :hover? The function literally does nothing else, and the `selectedRow` var he stores the element reference in isn’t used elsewhere.
This function allows the user to better see the rows in the API Calls table, for which there is a also search feature — the very thing I’m tasked with fixing.
It’s worth noting that above the search feature are two inputs for a date range, with some helpful links like “last week” and “last month” … and “All”. It’s also worth noting that this table is for displaying search results of all the API requests and their responses for a given merchant… this table is enormous.
This search field for this table queries the backend on every character the user types. There’s no debouncing, no submit event, etc., so it triggers on every keystroke. The actual request runs through a layer of abstraction to parse out and log the user-entered date range, figure out where the request came from, and to map out some column names or add additional ones. It also does some hard to follow (and amazingly not injectable) orm condition building. It’s a mess of functional ugly.
The important columns in the table this query ultimately searches are not indexed, despite it only looking for “create_order” records — the largest of twenty-some types in the table. It also uses partial text matching (again: on. every. single. keystroke.) across two varchar(255)s that only ever hold <16 chars — and of which users only ever care about one at a time. After all of this, it filters the results based on some uncommented regexes, and worst of all: instead of fetching only one page’s worth of results like you’d expect, it fetches all of them at once and then discards what isn’t included by the paginator. So not only is this a guaranteed full table scan with partial text matching for every query (over millions to hundreds of millions of records), it’s that same full table scan for every single keystroke while the user types, and all but 25 records (user-selectable) get discarded — and then requeried when the user looks at the next page of results.
What the bloody fucking hell? I’d swear this idiot is an intern, but his code does (amazingly) actually work.
No wonder this search field nearly crashed one of the servers when someone actually tried using it.
Asdfajsdfk.rant fucking moron even when taking down the server hey bob pass me all the paperclips mysql murder terrible code slow query idiot can do no wrong but he’s the golden boy idiots repeatedly murdered mysql in the face21 -
I'm lucky enough to be able to work with an extremely competent yet down-to-earth and generous senior engineer that it's a pita to write his review abt "area in which he can improve" - the dude already wrote 1/2 the codebase to keep the team running.1
-
So, you want to tell me the security method used by the f*cking state of Missouri is CSS's "display: none"???
Source: https://missouriindependent.com/202...10 -
Welcome to this week's episode of "sudo-woodo tries to get a single Python script merged", starring...
•The software architect so senior they were working here while I was still in pre-school. Wasn't added as a reviewer and was completely absent on this project for two months but came in on this PR with a few questions, including questioning design decisions they agreed on the last time they saw the project.
•The QA lead with ten years of experience... in Java. Has never even touched Python and asked to review, only for every issue raised but one stemming from not knowing the language.
•The CI guy. A script guru who will find a problem with literally anything. Honestly the most helpful person of the bunch.
•My coworker. Hasn't said anything yet.
please send help -
Senior Management: We are severely disappointed in the timeliness of the two apps you built this year. You had budgeted 3 months for one and it took 4 months and the other was budgeted to take 4 months and took 5 months. We understand that we doubled the requirements halfway through and but that doesn’t take away from our need for you to deliver on time. We provided you with two extra devs on the project! We know they were novices and you had to train them from the ground up during the project, that doesn’t matter. The extra resources should have helped you but your lack of leadership ability is what caused them to hold you back. We know our other team with a budget of 6 months took 2 years on their project and was still unsuccessful but that is a different scenario! That was a pre-built 3rd party ERP plugin, way more complicated and nuanced than simply building and deploying something from scratch. Yes we’re aware your projects were the only successful tech projects at the company this year, that’s just luck and coincidence. The next app we need you to build in 6 months, no questions asked. It needs to consolidate and tie together our 3 different ERPs. Everything that we need out of these products that they don’t do out of the box we need you to wire up. We will decide the exact requirements in a month or so, for now just get started. Yes your apps changed the way we do business and allowed us to complete projects smoother than ever before while saving millions of dollars in wasteful and archaic processes that is OLD NEWS. Stop bringing it up. The successes of yesterday are the status quo of today. Don’t expect any new resources either, you clearly can’t handle them. You will now be giving status updates to 3 different managers as a corrective action to your missed deadlines in order to ensure the timeliness of future deliverables.
Dev: …25 -
This is what happens to overworked PMs.
Me: When users create accounts with social logins, they don’t have passwords in our database. If they try to enter an email and pw on the login form, what do you want the error message to say?
PM: Can we add a modal that says “Your account doesn’t have a password, set one now.” And have a password field?
Me: ☠️ That…would…allow…anyone…to…hijack…an…account…
PM: Right. Never mind.12 -
So I was code reviewing this guy's code before merging into the master branch.... and then I FOUND THIS FUCKING CODE, WHAT THE FUCK!!!!!!!!!!!!!!!! What the fuck is this ???66
-
A new urgent request today…
“ITS URGENT WE NEED THIS CODE IN IMMEDIATELY I DONT CARE IF ITS FRIDAY WE NEED IT THERE BY ONE HOUR”
“What is happening?”
“ADD THIS CODE TO OUR CODE”
(A snippet to track marketing conversions from fb)
“Uhhh it’s Friday and our product won’t release to the public for 2 months anyway?”
“YOU DONT GET HOW URGENT IT IS, MUST BE THERE IN AN HOUR OR WE’LL LOSE DATA”
“O….k”
Spoiler: data said that today we had no customers on an unreleased project. Go figure!5 -
I’ve been diagnosed with bipolar disorder type II. The age of “unidentified affective disorder is over”.7
-
Last week my company thought it would be a great idea to introduce a new sh*tty internal web portal that gives federated access to aws (instead of using our own accounts to assume dev roles like we used to do).
This broke a lot of sh*t that simply used to ask for an MFA token and used our practically permissionless accounts to assume a proper dev role. An MFA token that we'd enter directly into the terminal/tool. It was very seamless. But nooooooo we now have to go a webpage, login with sso (which also requires mfa), click "generate credentials," copy-paste those into terminal/creds file and _then_ continue our aws cli call. Every. Single. Day.
BUT TODAY I HAD ENOUGH.
I spent the entire day rewriting the auth part of our tools so they would basically read the cookie that's set by the web portal, and use it to call the internal api that generates the credentials, and just automatically save those. Now all we need to do is log into the portal, then return to the tool and voilà, the tool's also got access! Sure, it's not as passive as just entering an MFA token directly, but it's as passive as it gets. Still annoyed by this sh*tty and unnecessary portal, but I learned a thing or two about cookies.9 -
If you're sick, just type "I'm feeling sick today"
Don't give a full paragraph of all the drugs you're talking and all your symptoms. That's just cringe.5 -
Worked for a bozo I met on freelancer platform, we communicated and the dude gave me some tasks on mobile to theme the application and add some specifics I wasn't awarded project and I thought I was playing nice in order to win project and show ability whatfffff!!!!!, I didn't see it coming. To cut story shot I finished the job sent the apk and sent the code and the guy never responded again, what am I please ? a bozo too or a dunce and a Dunder head. I can't explain what I just did.10
-
looking back its going to amaze future generations how stupid we were to waste so many energy related resources on creating a fake currency just so people could pay for hookers.8
-
Manager: I read an article today
Dev: oh here we go….
Manager: We must pivot to only functional programming, which means only using functions instead of classes
Dev: Actually functional programming is a bit more nuanced tha—
Manager: Any use of classes going forward is not allowed. Everything must use functions! Classes are an outdated way of programming, using classes is why we continue to miss our deadlines. Functional programming is lean, classes are waterfall.
Dev: What about the libraries we use? Many of those use classes
Manager: Wrap them in a function then, that way they are pure which is one of the requirements of functional programming. You would know that if you spent as much personal time as I do keeping up with the times.34 -
Me, in a meeting with CTO trying to sort out some config stuff, manager messages me and tells me about a non critical issue (read: not production).
Me: I'm in a meeting
Manager: Yes but look at this when you have time
Me: Yes sure
Manager calls me after 15 minutes
Me: I was in a meeting?
Manager: Are you still in a meeting or were you in a meeting?
Me: I'll go back to the meeting when you're done
Manager tells me about the issue again. After I go back to the meeting manager sends me a meeting link about the issue literally 15 minutes from that time. Manager is 10 minutes late to the meeting he just arranged.
After the meeting manager pesters me and asks if I could figure out the issue every 15 minutes.
I fucking hate this job.3 -
One of my previous managers would constantly make promises our team couldn't keep. "You want it in a week? Sure, we can finish it in a week! You want it tomorrow? Sure, we can do that!"
It got so bad that our team basically had to stage an intervention. At one of our standups, we flat-out told him that even if the entire team dropped all of our other tasks to focus on the one big project, we still would not be able to meet the deadline he'd promised the client.
And that fucker actually said, "Well, if you want to come in on the weekend to work some overtime, I don't mind." as if he was offering to do us a favor by "allowing" us to work more.
No overtime pay because we had salaries.
So glad I don't work for him any more. Of course, my next manager wasn't great either, it just took longer for us to figure it out because she wasn't nearly as blatant about it.7 -
Why the heck is Office so incompatible with everything??? They have their own proprietary standards for Word, Powerpoint and Excel and then implement them WRONG. WTF?
And don't get me started on Outlook: MSG files are the worst horsecrap ever, why can't you use EML like a normal mail application? Not to mention the complete incompatibility with CSS in mails. Nooooo you have to design everything with tables and images like we are still in the 90s. WHAT YEAR IS IT? Everytime i have to work with this boolshit i can feel sweaty Steve Ballmer scream "DEVELOPERS!!!" right in my fuckin' face.
The real cherry on top is their permanent advertisement being shoved up your ass. The stuff is all over the place! When you register a new mail account via IMAP they open Edge and prompt you to give them your phone number so they can send you a download link to their stupid Outlook app. I could understand that if the Office suite would be free... but it isn't! I effectively pay a shitton of money to see ads.
Why is everyone still using these applications?4 -
Perfect job? Does it even exist?
We do a job because it's something others consider tedious or difficult or time consuming.
So my perfect job would be one that feels like a hobby every day and pays very well.12 -
Three syntax elements, pixels on screen.
By Unknown (for privacy), 2021
In this installation, the Author's desire to prove the whole world that stupidity is achievable with just 2 syntax elements is... self-evident!
Observe! The finely crafted letters composing this installation in their beauty! While the middle element is purely a distraction (one could argue it's there to be sure a critical issue doesn't happen even if the default value is already `true`), the sides of the installation reveals the true horror.
As the vision of the observer is attracted to the center, the peripheral vision sends the informations to the subconcious, making the observer slowly realize both that the Author willingly compiled `.less` files with postcss and that .less files are in the css folder, proving that stupidity is demonstrable in just two syntax elements.
A masterpiece. -
> Install linux
> Completely fuck up windows partition
> Can't get into safe mode
> The main program you use is windows only
fml14 -
Our company maneuvered themselves into a classic technical debt situation with a project of a second team of devs.
They then left, signing a maintenance contract and now barely work on the project for exorbitant amounts of money.
Of course management got the idea to hand off the project to the first team, i.e. our team, even though we are not experts in that field and not familiar with the tech stack.
So after some time they have asked for estimates on when we think we are able to implement new features for the project and whom we need to hire to do so. They estimates returned are in the magnitude of years, even with specialists and reality is currently hitting management hard.
Code is undocumented, there are several databases, several frontends and (sometimes) interfaces between these which are all heavily woven into one another. A build is impossible, because only the previous devs had a working setup on their machines, as over time packages were not updated and they just added local changes to keep going. A lot of shit does not conform to any practices, it's just, "ohh yeah, you have to go into that file and delete that line and then in that other file change that hardcoded credential". A core platform is end of life and can be broken completely by one of the many frameworks it uses. In short, all knowledge is stowed away in the head of those devs and the codebase is a technical-debt-ridden pile of garbage.
Frankly I am not even sure whom I am more mad at. Management has fucked up hard. They let people go until "they reached a critical mass" of crucial employees. Only they were at critical mass when they started making the jobs for team 2 unappealing and did not realize that - because how could they, they are not qualified to judge who is crucial.
However the dev team behaved also like shitbags. They managed the whole project for years now and they a) actively excluded other devs from their project even though it was required by management, b) left the codebase in a catastrophic state and mentioned, "well we were always stuffed with work, there was no time for maintenance and documentation".
Hey assholes. You were the managers on that project. Upper management has no qualification to understand technical debt. They kept asking for features and you kept saying yes and hastily slapped them into the codebase, instead of giving proper time estimates which account for code quality, tests, reviews and documentation.
In the end team #2 was treated badly, so I kinda get their side. But up until the management change, which is relatively recent, they had a fantastic management who absolutely had let them take the time to account for quality when delivering features - and yet the code base looks like a river of diarrhea.
Frankly, fuck those guys.
Our management and our PM remain great and the team is amazing. A couple of days a week we are now looking at this horrible mess of a codebase and try to decide of whom to hire in order to help make it any less broken. At least it seems management accepted this reality, because they now have hired personnel qualified to understand technical details and because we did a technical analysis to provide those details.
Let's see how this whole thing goes.1 -
Hey remember that edge case we told you about months ago and you said ya "don't worry, it's an edge case" ya, we just found the edge and sailed right off it