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
Search - "hotline"
-
This code review gave me eye cancer.
So, first of all, let me apologize to anyone impacted by eye cancer, if that really is a thing... because that sounds absolutely horrible. But, believe me, this code was absolutely horrible, too.
I was asked to code review another team's script. I don't like reviewing code from other teams, as I'm pretty "intense" and a nit-picker -- my own team knows and expects this, but I tend to really piss off other people who don't expect my level of input on "what I really think" about their code...
So, I get this script to review. It's over 200 lines of bash (so right away, it's fair game for a boilerplate "this should be re-written in python" or similar reply)... but I dive in to see what they sent.
My eyes.
My eyes.
MY EYES.
So, I certainly cannot violate IP rules and post any of the actual code here (be thankful - be very thankful), but let me just say, I think it may be the worst code I've ever seen. And I've been coding and code-reviewing for upwards of 30 years now. And I've seen a LOT of bad code...
I imagine the author of this script was a rebellious teenager who found the google shell scripting style guide and screamed "YOU'RE NOT MY REAL DAD!" at it and then set out to flagrantly violate every single rule and suggestion in the most dramatic ways possible.
Then they found every other style guide they could, and violated all THOSE rules, too. Just because they were there.
Within the same script... within the SAME CODE BLOCK... 2-space indentation... 4-space indentation... 8-space indentation... TAB indentation... and (just to be complete) NO indentation (entire blocks of code within another function of conditional block, all left-justified, no indentation at all).
lowercase variable/function names, UPPERCASE names, underscore_separated_names, CamelCase names, and every permutation of those as well.
Comments? Not a single one to be found, aside from a 4-line stanza at the top, containing a brief description of that the script did and (to their shame), the name of the author. There were, however, ENTIRE BLOCKS of code commented out.
[ In the examples below, I've replaced indentation spacing with '-', as I couldn't get devrant to format the indentation in a way to suitably share my pain otherwise... ]
Within just a few lines of one another, functions defined as...
function somefunction {
----stuff
}
Another_Function() {
------------stuff
}
There were conditionals blocks in various forms, indentation be damned...
if [ ... ]; then
--stuff
fi
if [ ... ]
--then
----some_stuff
fi
if [ ... ]
then
----something
something_else
--another_thing
fi
And brilliantly un-reachable code blocks, like:
if [ -z "$SOME_VAR" ]; then
--SOME_VAR="blah"
fi
if [ -z "$SOME_VAR" ]
----then
----SOME_VAR="foo"
fi
if [ -z "$SOME_VAR" ]
--then
--echo "SOME_VAR must be set"
fi
Do you remember the classic "demo" programs people used to distribute (like back in the 90s) -- where the program had no real purpose other than to demonstrate various graphics, just for the sake of demonstrating graphics techniques? Or some of those really bad photo slideshows, were the person making the slideshow used EVERY transition possible (slide, wipe, cross-fade, shapes, spins, on and on)? All just for the sake of "showing off" what they could do with the software? I honestly felt like I was looking at some kind of perverse shell-script demo, where the author was trying to use every possible style or obscure syntax possible, just to do it.
But this was PRODUCTION CODE.
There was absolutely no consistency, even within 1-2 adjacent lines. There is no way to maintain this. It's nearly impossible even understand what it's trying to do. It was just pure insanity. Lines and lines of insanity.
I picture the author of this code as some sort of hybrid hipster-artist-goth-mental-patient, chain-smoking clove cigarettes in their office, flinging their own poo at their monitor, frothing at the mouth and screaming "I CODE MY TRUTH! THIS CODE IS MY ART! IT WILL NOT CONFORM TO YOUR WORLDLY STANDARDS!"
I gave up after the first 100 lines.
Gave up.
I washed my eyes out with bleach.
Then I contacted my HR hotline to see if our medical insurance covers eye cancer.32 -
At work today the guys showed me how I can listen in on calls so I can prepare myself for phone support.
We tested it through a call between two of the guys.
They started talking like "test test123 is this working"
I said yes and continued working behind my screen. They just didn't know I was still listening.
Both guys started saying stuff like "welcome to the sex hotline"
"hello and welcome to the *insert something sexual* hotline!"
One of the guys after a few minutes: why is your head so red?!
Wait.... Have you been listening along?? 😅
Yes 😂
*everyone bursts out in laughter*43 -
- Good evening, this is the support hotline for stupid questions, how may I help you?
- Hi, is this the support hotline for stupid questions?2 -
When doing first level support....
[windows desktop software]
Me: How can I help you?
Client: I installed the latest update from your website yesterday, but the version number hasn't changed
Me: You downloaded version *** ?
Client: Yes
Me: And you installed it?
Client: Yes
Me: Did you get an error message during the installation?
Client: No, everything worked fine, no errors
Me: And the installation process was completed?
Client: I think so
Me: Hmmm... Lets try it again. I will assist you.
Client: Ok
Me: Start your browser and open the website.
Client: ..... did it
Me: Good. Now click on the link to the download page.
Client: .... did it
Me: Do you see the the update package at the top of the list?
Client: Yes.
Me: Ok. Now click on it.
Client: Why?5 -
A few years ago I was in rage because I could not find the second page of my mobile provider invoice. So I called the support hotline to ask for the second page. Then he just asked: "Have you tried to flip the first page?" and I had to reply "oh, well...".1
-
Damn, credit cards are so fucking secure these days that you hardly can BUY shit with them!
I need some special electronics that I only can get from a vendor in the US, which is overseas. Click click, buy, done. Well no, credit card refused. WTF? Click retry link. No, still refused. FUCK.
Called up the 24/7 hotline of my CC company. Oh yeah, that got blocked by the security system, somehow. We disable that for 20 minutes, just retry. Clicked retry link at the vendor. No failure mail. Hmmm, too good to be true?! Called up the electronics vendor. Yeah should work, stuff is in the warehouse stage. 40 minutes later: credit card declined. FUCK.
Called up the CC company again. Ok, disable blocker for one hour. Nice advice from them, tell the vendor it's only 45 minutes so that there's some buffer. Clicked retry link at the vendor and called them up to make sure that they retry before the time runs out.
LO AND BEHOLD, I could finally pay the shit!!8 -
Customer: (calls emergency hotline) We have a really bad bug!
Rep: What seams to be the issue?
Customer: I need to talk to Sam, he knows what to do, tell him it's urgent.
Rep: can I tell Sam what the issue is?
Customer: Well, Sam built a newsletter program but I don't have a way to import mass amounts of emails addresses.
Rep: That sounds like a feature, not a problem.
Customer: why wouldn't it do that? Would you build a car without a steering wheel?
Rep: I am not sure that's relevant to the problem.
Customer: what do you mean?
Rep: I would say it is more like, "would you build a car without a pair of jet skis attached to the back." And we would respond with, "we would be happy to add Jet Skis, but it's going to cost you additional money."
Customer: So, how are we going to fix this bug in YOUR software?
Rep: :/5 -
Live chat with Verizon support online
Wait in line for 30mins finally get an agent
But then she doesn't respond
I take a angry screen shot of the chat and send it to Verizon's Twitter
Get a quick response and the agent replies.
---
Then...
Me: I want renew/upgrade my services at the discount price
Agent: not possible. Contact regular support number to discuss
Me: what if I cancel and sign up again
Her: OK here's the direct number to our retention hotline7 -
Okay I just wasted 1h of my lifetime trying to fix a css bug which was caused because the actual classname was 'itemWrapper' instead of 'item-wrapper'. I might just kill myself at this point. I swear to fucking god I end up calling a suicide prevention hotline everytime I have to do shit in css.3
-
After realizing I had a problem, I finally broke down and called the tinnitus hotline.
It just kept ringing and ringing.6 -
Back when I started my career (12 months ago lol), I was in IT support. Having to deal with people who have hard times locating and reading off a sticker, let alone telling me their IP adress, only to realize it's the whole store that's offline, not only their PC (gosh do they ever talk with each other). So I decided to code a small tool that shows your hostname and IP adress, and pings the router, firewall and Google DNS. Aaand just in case the number for the IT hotline. Plan was that we could just tell them to double-click on that one icon on their desktop and read out what it says. We deployed it and I was happily waiting for it's time to shine (still a trainee I was also kinda proud of it), but when the network engineer found out, he wasn't happy about it at all. He was afraid too many people would open that new tool without us telling them to do so and/or forget to close it, producing a number of pings to the router, firewall and google. He went on about Google maybe blocking our IP if we produce too many pings and so on.
In my opinion he was kinda overreacting, but he wasn't that wrong and is a nice guy and responsible for our network, so we recalled the tool and never actually used it.2 -
Adventures with house IT
I'm currently experimenting with PowerShell but my scripts won't run even though I've got every local permission. The error message indicates it's a GPO problem.
"No problem" le me thinks and calls IT hotline.
After 2 incompetent and unprofessional technicians i've still got no solution. I'm waiting for the second tech to call back because he "needed some time to get to know PowerShell" (he is a trained and certified SysAdmin).
During my call he couldn't decide if it was a GPO problem or not.
And this is just one story of their incompetence...8 -
My IBM 5150 doesn't have the standard IBM Asynchronous Card in it and was replaced with a Tecram First Mate multifunctional memory expansion, serial connectivity, and printer parallel card. It has more jumpers than a suicide hotline.1
-
Let's talk about the cargo cult of N-factor authentication. It's not some magic security dust you can just sprinkle onto your app "for security purposes".
I once had a client who had a client who I did server maintenance for. Every month I was scheduled to go to the site, stick my fingerprint in their scanner, which would then display my recorded face prominently on their screens, have my name and purpose verified by the contact person, and only then would the guards let me in.
HAHA no of course not. On top of all of that, they ask for a company ID and will not let me in without one.
Because after all, I can easily forge my face, fingerprints, on-site client contact, appointment, and approval. But printing out and laminating a company ID is impossible.
---
With apologies to my "first best friend" in High School, I've forgotten which of the dozens of canonicalisations of which of your nicknames I've put in as my answer to your security question. I've also forgotten if I actually listed you as my first best friend, or my dog - which would actually be more accurate - and actually which dog, as there are times in my High School life that there were more tails than humans in the house.
I have not forgotten these out of spite, but simply because I have also forgotten which of the dozen services of this prominent bullshit computer company I actually signed up for way back in college, which itself has been more than a decade ago. That I actually apparently already signed up for the service before actually eludes me, because in fact, I have no love for their myriad products.
What I have NOT forgotten is my "end of the universe"-grade password, or email, or full legal name and the ability to demonstrate a clear line of continuity of my identity from wherever that was to now.
Because of previous security screwups in the past, this prominent bullshit company has forced its users to activate its second, third, and Nth factors. A possibly decade-old security question; a phone number long lost; whatever - before you can use your account.
Note: not "view sensitive data" about the account, like full name, billing address, and contact info. Not "change settings" of the account, such as changing account info, email, etc. Apparently all those are the lowest tier of security meant to be protected by mere "end of the universe"-grade passwords and a second factor such as email, which itself is likely to be sold by a company that also cargo cults N-factor auth. For REAL hard info, let's ask the guy who we just showed the address to "What street he lived in" and a couple others.
Explaining this to the company's support hotline is an exercise in...
"It's for your security."
"It's not. You're just locking me out of my account. I can show you a government ID corroborating all the other account info."
"But we can't, for security."
"It's not security. Get me your boss."
...
"It's for security."8 -
Discovering that Steam exists on Ubuntu and being able to install and play Hotline Miami 2 increases my doubts on keeping a Windows partition on my computers. All I need now is to find a way to play WoW and / or LoL, and I'll be truely free :o7
-
A dev life in Queen songs:
„A Kind of Magic“ - Build successful
„A Winter’s Tale“ - Key Account Manager visits customer
„Action This Day“ - Release day
„All Dead, All Dead“ - System down
„Another One Bites the Dust“ - kill -9 4711
„Breakthru“ - 10 hour debuging session
„Chinese Torture“ - Microsft Office
„Coming Soon“ - Client asks for delivery date
„Dead on Time“ - shutdown -t 10
„Doing All Right“ - How's the progress on the new feature?
„Don’t Lose Your Head“ - git push -f
„Don’t Stop Me Now“ - In the zone
„Escape from the Swamp“ - Hand in resignation letter
„Forever“ - while(1)
„Friends Will Be Friends“ - friend class Vector;
„Get Down, Make Love“ - No rule to make target "Love"
„Hammer to Fall“ - Release day
„Hang on in There“ - 2 weeks until release
„I Can’t Live With You“- Microsoft
„I Go Crazy“ - Microsoft
„I Want It All“ - Google
„I Want to Break Free“ - free( (void*) 0xDEADBEEF );
„I’m Going Slightly Mad“ - Impossible feature requested
„If You Can’t Beat Them“ - Impossible feature promised by sales
„In Only Seven Days“ - Impossible feature ordered
„Is This the World We Created...?“ - Philosphic moments
„It’s a Beautiful Day“ - Weekend
„It’s a Hard Life“ - Weekday
„It’s Late“ - Deadline was last week
„Jesus“ - WTF?
„Keep Passing the Open Windows“ - Interprocess communication
„Keep Yourself Alive“ - Daily struggle
„Leaving Home Ain’t Easy“ - Time to get up and go to work
„Let Me Entertain You“ - Sales meets customer
„Liar“ - Sales
„Long Away“ - Project start
„Loser in the End“ - Dev
„Lost Opportunity“ - Job ad
„Love of My Life“ - emacs/vim
„Machines“ - Computer
„Made in Heaven“ - git
„Misfire“ - Unhandled exception at Memory location 0xDEADBEEF
„My Life Has Been Saved“ - Google drive/Facebook
„New York, New York“ - Meeting at customer
„No-One But You“ - Bus factor = 1
„Now I’m Here“ - Morning rush hour
„One Vision“ - Management goals
„Pain Is So Close to Pleasure“ - NullPointerExcption
„Party“ - Delivery completed
„Play the Game“ - Customer meeting inhous -
„Put Out the Fire“ - Support hotline
„Radio Ga Ga“ - GSM/GPRS/UMTS/LTE/5G
„Ride the Wild Wind“ - Arch Linux
„Rock It“ - Linux
„Save Me“ - CTRL-S/CTRL-Z
„See What a Fool I’ve Been“ - git blame
„Sheer Heart Attack“ - rm -rf /
„Staying Power“- UPS
„Stealin’“ - Stack Overflow
„The Miracle“ - It works
„The Night Comes Down“ - It doesn't work
„The Show Must Go On“ - Project cancelled
„There Must Be More to Life Than This“ - Philosophic moments
„These Are the Days of Our Lives“ - Daily routine
„Under Pressure“ - 1 day until release
„Was It All Worth It“ - Controlling
„We Are the Champions“ - Release finished
„We Will Rock You“ - Sales at customer
„Who Needs You“ - HR
„You Don’t Fool Me“ - Debugging session
„You Take My Breath Away“ - rm -rf /
„You’re My Best Friend“ - emacs/vim4 -
You know those Jolly go lucky fucking always happy and usually slightly retarded ppl?
Yeah those, try having one of them thinking you're a free tech hotline..
My head hurts from all that brightness and stupidity that person emits -_- -
Health anxiety is funny.
a pendulum between
"oh no, what if I have x and die"
"jesus christ, this anxiety is too painful i wish i was dead"
death is a fucking tease.
anyhow, just venting, not promoting self harm, if you are having thoughts of mortality contact your national suicide hotline.
also, not trying to be a dick, but id appreciate receiving no advice, just a "i hope you get better" will help me a lot.3 -
Needed my Windows 10 vm for parallax propeller development again. Should be pretty straightforward:
Start VM. Very unresponsive and Interface glitches with 2GB RAM so I give it 4GB to get on the desktop. Bruh, off to a good start.
Turns out that there are a few updates. So I try to install them. After two fucking hours Virtualbox screams at me for being out of storage. FFS Window$ updates managed to take up like 20GB extra.
Had to install it from scratch since my drive is full. Now my key won't activate because it is already activated. 15min support hotline, because 6*8 characters are necessary for a f*cking Phone activation.
Damage assessment:
1h of my life I will never get back, a barely viable operating system and I'm not even sure if USB passthrough works.
PSA:Gnome-Boxen has a superb unattended installer.8