Ranter
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
Comments
-
This is getting better with the minute...
Literally quoting a comment:
# Pick the best object, but there should be only one
What the fuck does it mean "There should only be one"?
For the sake of God you're fetching data from a DB which is in turn populated by a fucking enterprise HR System and not in the fucking world two users can have the same Employee ID so... What the fuck does it mean "There SHOULD only be one?" -
And now ladies and gentlemen the good old try with a completely useless empty catch block!
How nice he was experimenting with new and unknown concepts!
P.S. Sorry for using this rant as a "blog" but it's nice to keep all together in one place so few months from now I can come back and check this. -
@ShotgunSurgeon @Maer ahahha sure thing today I am going to continue with part two of this so stay tuned I am sure there are many other hidden gems just waiting for me!
-
Day two of this torture, as I said many many gems to be discovered in this mess so let's start.
Just bit of contest for completeness, code is PowerShell and while I would have used C# given the complexity of the "thing" this is to be supported by infrastructure Engineers so... it is what it is.
- 4 and I say FOUR lines to declare a string variable containing.... *drum roll* a PATH!!!!! A FUCKING WINDOWS Path like C:\Script_Path\configFile.wtf for an obscure configuration file.
The best part of this? Path is, of course!, hardcoded making all of this very portable... but wait it is not over yet path does not exist on the server where this lives AND FILE IS NEVER IMPORTED!!!!!!
So I'm here looking at my screen asking myself WHY? WHY? WHYYYYYYYYYYYYYYY??????
Today I want to cry, craddle in a corner and cry even more, scream, did I say cry already? -
Here's another one that is too good to be passed.
Script is configured to log its operations, a good practices I thought, issue here being there are 3 different (yes THREE) functions used for logging... all three are doing the same exact thing, logging on the same exact file... just with different name. Not signature eh, completely different function NAME!
As added benefit, log file path is defined 4 times in the script... 4 times in different parts of the code for... well for no reason.
Time for the 9th coffee... and it's only 11:30am over here.... -
Here we go for another round, I've already mentioned all variables have been configured with a global scope by default right?
Here's the best part.... let me calm down before I write this down.
All variables are 'sourced' from an EXTERNAL file which is stored in an obscure path, this per se could not be a bad thing what's really bad is that in every script "gloabl sourced" variable is assigned to a nother GLOBAL variable withiin the same script AND that "new" value is written back to the original Gloabl variable...
If you lost me up there don't worry, I'm lost as well and I'm reading this pice of monstrosity...
I'm revamping my CV and trying my fortune at McDonald's.
There is no amount of money they can pay me to endure this... -
finally got to read your comments... damn it that sounds like fun... you should definitely post this stuff as rants as they are better than 80% of what I've seen lately
-
@ShotgunSurgeon Lol guess I should start copying and pasting this :D I could do with another set of stickers from DevRant ;-)
By the way, this will be a full blown rant, I've just dropped my phone from literally 1 meter and despite it survived with no issues a 3 stories fall (long story) this time screen shattered...
Merry Christmas to me!
Related Rants
-
ohell4They see me coding, They hating, Reviewing and tryna catch me writing dirty.
-
needToRoll8This guy next to me in the train is coding C#... but his codestyle looks like... no words... I am now reading ...
-
tomtom277010We currently have multiple exercises for a lecture and they decided to use python this year instead of Matlab,...
Refactoring code of somebody who left and:
- Plagued the code with TYPOS (milions of them but ok I can live with those... to a certain point)
- Used global variables by default.... of course even where they're not needed
- Used comments only in parts of code where... well they're not needed, important ones are of course left out
- Did not indent code. 3..2..1... Did not FUCKING indent code properly and when he did... did WRONG!
- Instead of indentation he used commented line with multiple ==== signes.... so far top is 60 consecutive lines with olny ==== again no apparent pattern here
- Did not follow a fucking standard in variable naming... no camle casing... there are varaibles assigned multiple times to "temp" variables without no reason just for the sake of wasting resources on the system I guess
This is just the beginning of the review but I already want to change job, die, scream, cry... not in any specific order.
rant
codestyle
codereview