HappyScrappy
New member
So a coworker and I have different assignments, but they are close enough that we have to write code to support the other.
Our project is a total clusterfuck, but we've given up on saying anything and now just keep our heads down and do just as they say, and then write back and forth laughing about it.
So my coworker is told to implement this one method, and for it, he will need something that looks like this:
Set getInterfaces(String strDeviceName)
Meaning this will take in a string and then return a Set (in this case it is a Set of Interface objects). Very simple.
So normally this would be where this method either calls others or it goes to the database and looks up interfaces based on that device name, etc etc.
But no, our manager in all of his wisdom decided that I needed to implement the following (and I just tried not to laugh):
There is an existing method:
Set lookupInterfaces(int iChassisNumber, int iCardNumber, int iPortNumber)
But he didn't like that b/c it didn't take in a deviceName and he didn't see how my coworker could get those values...
So of course the next step is he wants me to add another method just like it, but it also takes in the device name:
Set lookupInterfaces(String strDeviceName, int iChassisNumber, int iCardNumber, int iPortNumber)
So it takes in the same things, including that DeviceName - but it ignores it totally, never uses it at all. Perfect.
Then he decided that he wants to "hide" that method, so I have to write another one - which is the one he will actually call:
public Set getInterfaces(String strDeviceName){
return this.lookupInterfaces(strDeviceName, 1, 1, 1);
}
So, reviewing what that does... it takes in a string that is the DeviceName. It then passes that string on to another method... that will ignore it, and then also passes in 3 HARDCODED values. PERFECT! then it just returns what that other method gives it.
To most of you none of this is funny at all - but if you know programming, you know the above is totally worthless and an absolute clusterfuck.
as I call that technique "layers of suck"
I add in the comments that I didn't think up all that on my own, I'm just the one that gets to implement it.
shoot me. please.
Our project is a total clusterfuck, but we've given up on saying anything and now just keep our heads down and do just as they say, and then write back and forth laughing about it.
So my coworker is told to implement this one method, and for it, he will need something that looks like this:
Set getInterfaces(String strDeviceName)
Meaning this will take in a string and then return a Set (in this case it is a Set of Interface objects). Very simple.
So normally this would be where this method either calls others or it goes to the database and looks up interfaces based on that device name, etc etc.
But no, our manager in all of his wisdom decided that I needed to implement the following (and I just tried not to laugh):
There is an existing method:
Set lookupInterfaces(int iChassisNumber, int iCardNumber, int iPortNumber)
But he didn't like that b/c it didn't take in a deviceName and he didn't see how my coworker could get those values...
So of course the next step is he wants me to add another method just like it, but it also takes in the device name:
Set lookupInterfaces(String strDeviceName, int iChassisNumber, int iCardNumber, int iPortNumber)
So it takes in the same things, including that DeviceName - but it ignores it totally, never uses it at all. Perfect.
Then he decided that he wants to "hide" that method, so I have to write another one - which is the one he will actually call:
public Set getInterfaces(String strDeviceName){
return this.lookupInterfaces(strDeviceName, 1, 1, 1);
}
So, reviewing what that does... it takes in a string that is the DeviceName. It then passes that string on to another method... that will ignore it, and then also passes in 3 HARDCODED values. PERFECT! then it just returns what that other method gives it.
To most of you none of this is funny at all - but if you know programming, you know the above is totally worthless and an absolute clusterfuck.
as I call that technique "layers of suck"
I add in the comments that I didn't think up all that on my own, I'm just the one that gets to implement it.
shoot me. please.
Last edited: