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
-
CptFox16195yMy guess: wanted to check the hash function worked in this scope, never got around to properly removing it, and after forgetting about it, kept it in case it had a side effect that magically let's the program run that would be destroyed if the call were to be removed
-
@CptFox How silly of me? How can I forget the basis of programming?
Never delete pieces of code even they're not needed anymore :) -
CptFox16195y@PsCustomObject You may comment it out for a test period of 3 months before actually deleting it, even through you have git, comments are safer. It is known.
-
@CptFox GIT? What is it? I forgot to mention all the changes to the code I posted were performed on a production server... directly in the script code without notifying anybody.
Well it is just a script handling automation of users provisioning in our LDAP infrastructure so nothing important :-/ -
@PsCustomObject so sounds like someone was troubleshooting an issue on a production server, must have been pretty desperate
-
@Plasticnova err not sure how to say this.. but err... was not troubleshooting for this person this is the standard way of ‘developing code the DevOps way’ his words not mine.
-
CptFox16195y@PsCustomObject This way of programming and the fact that this is PHP makes me all the more suspicious that:
a) This project may have been implemented using the SEOP Paradigm: Side-Effect Oriented Programming.
b) The Dev in question may be particularly used to this paradigm, making him especially weary of deleting or moving code that doesn't seem to be relevant where it is. -
@CptFox it is Powershell :-)
And yes person question is used to do a lot of copy/paste/never delete with little or no care -
-
CptFox16195y@JustThat Because of reasons. Do not question the comments, fool. You might anger the code 👻
Related Rants
So today I started working on a code base someone else wrote and stubled across this and thought it was worth sharing.
Why somebody would be doing something like this is beyond my understanding.
Not commenting on the empty catch block keep in mind the whole snippet has nothing to do with rest of the code...
WHY!!!!!?!?!?!?!
devrant
scripting
powershell