15

So the incompetence of this knob-head are unbelievable, so in our company there's a particular method that required to return object specific way like
{
'a' : 'b',
{
'c' : 'd',
'e' : 0,
}
};
}

which somehow will be use everywhere in the project, I decided to create a constant class therefore anyone can use it and prevent redundant code. (re write the same thing over and over again). He decided to tell me to rewrite the same method for every-time I needed to return data.

My method is to avoid writing the same thing in repetition , that is why I place a method in a constant class where I call every-time I need to return those data in the specific way.

But he prefer writing it in repetition. OMG

Comments
  • 4
    So I guess he enjoys typing! Why else would anyone want this over calling a function? I guess he also enjoys going around the code base changing replicated code
  • 11
    Reminds me a little of this:
    http://thecodelesscode.com/case/95
  • 5
    @Root codeless code is such an epic, under appreciated treasure of our time. ++++
  • 3
    @johnmelodyme reminds me of a guy who told me 'oh you're writing it like Java with so many functions.' He preferred to see the logic at call site because it is 'clearer'. Dude had very fucked up interpretations of clean, expressive code that he imposed on everyone.
  • 1
    @anux
    Everybody knows, that the most clean code is always to be found in a single file of epic length.
  • 1
    @Oktokolo absolutely. If something goes wrong there is a single place to check and discuss about. You could print out that one file and huddle with your team. Can't get any better.
  • 1
    @anux
    And it just looks epic on continuous form paper.
  • 0
    @Root Reminds me of .centered. lol
  • 1
    Your post appears to indicate that you have to give a shit what knob-head thinks. Is he your boss or something?
  • 2
    @CaptainRant .centered? Bootstrap?
  • 1
    @Root That was my critique on people who create an arbitrary (custom, belonging to no framework) .centered class just to center something, or create classes on the fly for every little thing, like: .floatRight.
  • 1
    @bahua nope, he is just the person thinks that he is the best and the rest are shit. But he is the person the boss will listen to.
  • 1
    @CaptainRant

    I think the important lesson is that (class/method/variable/module/etc) names should reflect intent, not a solution.

    "warning" is a better CSS classname than "boldRedText", because you intend to warn.

    The solution might be altered many times, and you don't want to end up in a situation where boldRedText actually renders as yellow because the client's wishes changed.
Add Comment