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 - "sanity checks"
-
Good Morning!, its time for practiseSafeHex's most incompetent co-worker!
Todays contestant is a very special one.
*sitcom audience: WHY?*
Glad you asked, you see if you were to look at his linkedin profile, you would see a job title unlike any you've seen before.
*sitcom audience oooooooohhhhhh*
were not talking software developer, engineer, tech lead, designer, CTO, CEO or anything like that, No No our new entrant "G" surpasses all of those with the title ..... "Software extraordinaire".
*sitcom audience laughs hysterically*
I KNOW!, wtf does that even mean! as a previous dev-ranter pointed out does this mean he IS quality code? I'd say he's more like a trash can ... where his code belongs
*ba dum tsssss*
Ok ok, lets get on with the show, heres some reasons why "G" is on the show:
One of G's tasks was to build an analytics gathering library for iOS, similar to google analytics where you track pages and events (we couldn't use google's). G was SO good at this job he implemented 2 features we didn't even ask for:
- If the library was unable to load its config file (for any reason) it would throw an uncatchable system integrity error, crashing the app.
- If anything was passed into any of the functions that wasn't expected (null, empty array etc.) it would crash the app as it was "more efficient" to not do any sanity checks inside the library.
This caused a lot of issues as some of the data needed to come from the clients server. The day we launched the app, within the first 3 hours we had over 40k crash logs and a VERY angry client.
Now, what makes this story important is not the bugs themselves, come on how many times have we all done something stupid? No the issue here was G defended all of this as the right thing to do!
.. and no he wasn't stoned or drunk!
G claimed if he couldn't get the right settings / params he wouldn't be able to track the event and then our CEO wouldn't have our usage data. To which I replied:
"So your solution was to not give the client an app instead? ... which also doesn't give the CEO his data".
He got very angry and asked me "what would you do then?". I offered a solution something like why not have a default tag for "error" or "unknown" where if theres an issue, we send up whatever we have, plus the file name and store it somewhere else. I was told I was being ridiculous as it wasn't built to track anything like that and that would never work ... his solution? ... pull the library out of the app and forget it.
... once again giving everyone no data.
G later moved onto another cross-platform style project. Backend team were particularly unhappy as they got no spec of what needed to be done. All they knew was it was a single endpoint dealing with very complex model. There was no Java classes, super classes, abstract classes or even interfaces, just this huge chunk of mocked data. So myself and the lead sat down with him, and asked where the interfaces for the backend where, or designs / architecture for them etc.
His response, to this day frightens me ... not makes me angry, not bewilders me ... scares the living shit out of me that people like this exist in the world and have successful careers.
G: "hhhmmm, I know how to build an interface, but i've never understood them ... Like lets say I have an interface, what now? how does that help me in any way? I can't physically use it, does it not just use up time building it for no reason?"
us: "... ... how are the backend team suppose to understand the model, its types, integrate it into the other systems?"
G: "Can I not just tell them and they can write it down?"
**
I'll just pause here for a moment, as you'll likely need to read that again out of sheer disbelief
**
I've never seen someone die inside the way the lead did. He started a syllable and his face just dropped, eyes glazed over and he instantly lost all the will to live. He replied:
" wel ............... it doesn't matter ... its not important ... I have to go, good luck with the project"
*killed the screen share and left the room*
now I know you are all dying in suspense to know what happened to that project, I can drop the shocking bombshell that it was in fact cancelled. Thankfully only ~350 man hours were spent on it
... yep, not a typo.
G's crowning achievement however will go down in history. VERY long story short, backend got deployed to the server and EVERYTHING broke. Lead investigated, found mistakes and config issues on every second line, load balancer wasn't even starting up. When asked had this been tested before it was deployed:
G: "Yeah I tested it on my machine, it worked fine"
lead: "... and on the server?"
G: "no, my machine will do the same thing"
lead: "do you have a load balancer and multiple VM's?"
G: "no, but Java is Java"
... and with that its time to end todays episode. Will G be our most incompetent? ... maybe.
Tune in later for more practiceSafeHex's most incompetent co-worker!!!31 -
Fulfillment company: the order you put in our system is wrong, the hours we needed to correct this will be charged to you (Red: or rather my employer)
Me: *Checks logs and our server - finds out the order was made in their own webform/webapp*
Me: hey how come I can put in values in your webform that should not pass sanity checks, thats weird (in this case it was a product w/ a quantity of 0)
Fulfillment company: we don't do sanity checks or validation, we just find out when shit crashes and burns, nothing weird about that
Me: WTF1 -
I am working on an open source game project, and the most common way to draw things is using a class named ManagedSurface. The class is otherwise awesome, but it has a method called getBasePtr(x, y), which gives you a pointer to the requested coordinates. Fair enough (this is C++ without STL by the way).
But WHY THE HELL CAN I REQUEST ANY POINTER THAT I WANT, EVEN IF IT'S OUTSIDE THE SURFACE? Other cointainers have sanity checks, asserts and such, and the surface KEEPS TRACK OF IT'S WIDTH AND HEIGHT.
WAS IT SO FUCKING HARD TO ADD assert(x <= w); assert(y <= h);???
I spent 3 days on valgrind trying to find a heap corruption that manifested at random points in the code.
FUUUUCK!
On the bright side, I learned how to use valgrind (which is awesomely awesome).4 -
Parents had asked me to assemble some furniture, fix the pc and so some other "brain" work
Furniture
Me: *Stops to check something in the manual*
Parents: Are you stuck? Maybe try assembling the door upside down
Me: No, it is the right way
Parents: *Ramble, ramble*
Me: Just let me work, shut the hell up
PC
Me: *Checks cables, checks logs, ect*
Parents: Maybe it is the problem with (insert random tech word there)?
Me: No.
Parents: W h y?
Me: Let me finish, it isnt that, (tech word) isnt even correlated to that
Parents: But, but, you never talk to me... (ramble ramble)
Me: Get the hell outta the room
*Argumemt breaks out*
30min later
Me: *Finnaly manages to fix it after the heated argument*
Me: I finished, everything works
Parents: Great, but you are mean
Me: I managed to finish the work in 15 min, you dont even have enough strengh to call for a specialist, (but knowing me i wouldnt allow it anyway because a lot of them make a poor job), so in order to make it properly and to relieve you from learning how to fucking google i want you to stay out of this so i can just finish my job. Your interruptions waste time and i dont need your help at all. Everytime you tried to fix stuff you always managed to fuck shit up when you tried to do anything.
Parents: (ramble)
Me: SHUT THE FUCK UP, LEAVE MY ROOM
Parents:
Me:
Parents: *Leave the room*
1h later i get 25$ for the job perfectly done
Sometime i wish they were tech independent, so i can save my sanity and time but money is nice.
If anybody tries to argue that i should respect them:
I tried talking to them nicely countless times through years, but they always force themself to a project and they always fuck shit up because of it. I tried telling them about my problems and they tried helping me but after it didnt work they retured to the old: "it is the pc fault" and similar. Even if they couldnt help me i juat wanted them to understand my situation, but no that didnt happened.
First i fix my life then i will fix the relationship
But but greeeeeg, relationships should be cared for always!
Eat shit. There is time for family and there is time for me especialy when my life can suddenly colapse due to my problems.7 -
Ok so apparently somebody at Google gcp thought it would be a great idea to be able to select more than one instance at a time and select something like delete and it goes ahead and deletes it without any sanity checks.
3 days down the tube5 -
Bit of a stupid oopsie I had today that someone might appreciate.
We’re working on a microservice project in Spring Boot, running in a docker swarm. Past few days I get a Spring Cloud config server going in separate stack, create an overlay network, and get CI deployments to use the right profiles etc. It’s looking great, and the first component is working spectacularly.
Now just to do the other 6. Move config files to the Git repo, tweak CI, all the other faffing and hoohas; and deploy. Health checks keep failing, the containers are murdering themselves and resurrecting ad infinitum. They’re doing this so quickly that by the time I get the container ID to exec in and curl health, it’s no longer running. Cue frustration, increased caffeine and nicotine consumption; my sanity is slipping.
No errors in the logs, because from experience the Cloud Config errors ar at debug level. Whhhyyyy?? Some time later (way longer than it should have been) I realize I had never actually included the Spring Cloud Config starter. Boot 101, get your starter!
Since config client is just additional setup in properties.yml, there’s no issue of the dep isn’t there, it just doesn’t try to get the config.
The containers are still unhealthy, I can hear them screaming. But now at least it’s about something else...