Details
-
AboutCS student at Dalhousie university
-
SkillsAngularJs, PHP, Java, SQL, JS, HTML
-
LocationHalifax, NS
Joined devRant on 9/22/2016
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
-
The iPhone X is in Germany so expensive that it would be cheaper to fly to the U.S. stay there for one or two days and buy it there.25
-
Someone on the IP 127.0.0.1 has been creating a lot of bugs in my code, please beware of you notice any connections from that address.15
-
Hired a new backend Dev. He writes a script and sends it for testing...
Tester: "It's not working..."
Backend Dev: Goes to Mongo and deletes the tester's whole profile...
I cant control my laughter every time I remember this incident...He claimed it was a mistake, I don't think that it was a mistake...the tester had it coming...
"It's not working" that's all he says every time...I mean at least give me something to start with...!4 -
"Why are people using Git? It's too complicated. Dropbox can do the same kind of things."
- A fellow CS student at university26 -
I somehow want to make an ai that analyses porn videos and learns to distinguish the parts when he cums on her face. I would call it facial recognition.
Sorry.19 -
I automated the process of downloading songs from YouTube and transferring them to my phone.
This is how it works, very simple:
- I have a youtube playlist in which I add songs that I'd like to download
- When I run my python script, it parses my playlist and checks to see if I have added any new songs that aren't already downloaded
- Uses a library to download MP3 for all the songs I want to download
- Transfers all those MP3 files to a designated folder that is tracked by Google Music manager
- Google Music manager syncs those songs to my phone and downloads them for offline playback
That's it 😎 No need for YouTube Red
I'm going to run this script 24x7 on a Raspberry Pi, so everytime I add a new song to the playlist, script starts it's job without me running the script manually.13 -
"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!"
So, as the author of the code in question, I join the bridge... And what happens next, I will simply never forget.
First, a little backstory... Another team within our company needed some vendor client software installed and maintained across the enterprise. Multiple OSes (Linux, AIX, Solaris, HPUX, etc.), so packaging and consistent update methods were a a challenge. I wrote an entire set of utilities to install, update and generally maintain the software; intending all the time that this other team would eventually own the process and code. With this in mind, I wrote extensive documentation, and conducted a formal turnover / training season with the other team.
So, fast forward to when the other team now owns my code, has been trained on how to use it, including (perhaps most importantly) how to send out updates when the vendor released upgrades to the agent software.
Now, this other team had the responsibility of releasing their first update since I gave them the process. Very simple upgrade process, already fully automated. What could have gone so horribly wrong? Did something the vendor supplied break their client?
I asked for the log files from the upgrade process. They sent them, and they looked... wrong. Very, very wrong.
Did you run the code I gave you to do this update?
"Yes, your code is broken - fix it! Production is down! Rabble, rabble, rabble!"
So, I go into our code management tool and review the _actual_ script they ran. Sure enough, it is my code... But something is very wrong.
More than 2/3rds of my code... has been commented out. The code is "there"... but has been commented out so it is not being executed. WT-actual-F?!
I question this on the bridge line. Silence. I insist someone explain what is going on. Is this a joke? Is this some kind of work version of candid camera?
Finally someone breaks the silence and explains.
And this, my friends, is the part I will never forget.
"We wanted to look through your code before we ran the update. When we looked at it, there was some stuff we didn't understand, so we commented that stuff out."
You... you didn't... understand... my some of the code... so you... you didn't ask me about it... you didn't try to actually figure out what it did... you... commented it OUT?!
"Right, we figured it was better to only run the parts we understood... But now we ran it and everything is broken and you need to fix your code."
I cannot repeat the things I said next, even here on devRant. Let's just say that call did not go well.
So, lesson learned? If you don't know what some code does? Just comment that shit out. Then blame the original author when it doesn't work.
You just cannot make this kind of stuff up.105 -
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 -
Freshman: hey can you check what's wrong with my code?
Me: ya of course
*Sees zero comments, no indents, all variables named a,b,c,etc.*
Me: oh would you look at the time!6 -
"Are you familiar with uploading your code to Google Drive?"
I left the building at that exact moment.41 -
This was at my first internship (was fired later for other bs reasons).
They got me as a programming intern but very soon I felt very conflicted with multiple things:
1. Got to google translate their internal CRM into five languages. After two weeks (the estimate I gave them) I discovered that I overlooked the second half, apologized and got a whole shitstorm at my face.
2. Was only allowed to use Internet Explorer for everything *cry face*.
3. Saw multiple security flaws in their main product, told my boss (also my internship manager) about it because hey, I'm security oriented and it might help them. Next day he called me into his office and I got a huge speech about who the fuck I am to criticize their product and that I was a security wannabee who doesn't know shit.
4. Boss came home after a product presentation went sideways. The interns didn't have anything to do with that but he called (or, yelled big time) us every dirty word he could think of and blamed us.
Luckily I was fired after like five weeks. I literally cried of happiness when I walked home. I was too shy to stand up for myself by that time (even only 2-3 years ago)14 -
Warning: This is going to be a long one!
Day 1: Fresh outta grad school. Joined a start-up in silicon valley (50% lower pay than avg salary) . Moved to the bay area and rented a car to travel to work. First day, all excited, drive 35 miles to work.
It's a small company with just 5 people. Greeted by the CEO himself. Asks me to wait outside while he goes speaks with the project manager. In the meantime the office manager asks if I have a copy of my resume.
10 minutes later, the CEO walks out and tell me: "I'm sorry but I don't have a job for you at this time. Please come back after a month". Palms are sweaty, Knees weak, arms are heavy. I feel my heart skipping several beats. As an F1 student I immediately start thinking about my visa status.
I drive back home and try to think what I should do next. Then suddenly the CEO calls me back saying pls come back and we can work something out. I drive back and I'm offered a small spot on a round table with my colleagues. Everyone looks stressed out and sad.
Day 2: Work starts early since we need to collaborate with a team in India. I reach work at 6:00 am hoping my second day is better than the first. Couple minutes into the early morning meeting, the CEO flips out and screams: "I'm going to fucking fire everyone. This fucking thing is taking too long. Just get the fuck out already".
Day 547: I finally quit and joined another start-up :)10