It's nice wanting to follow the best practice but many Java programmer have the bad habit to overdo it making lasagna code which causes painful headaches to who needs to maintain it afterwards. This is just a little sample of the "paranoia driven development" many does in my company.

  • 15
    You never know when true is gonna change to false, better keep it flexible xD
  • 6
    Please, tell us more about this paranoia driven development!!

    What other instances have you met before?
  • 10
    wouldn't it be funny to replace true by new Random().nextDouble() < .97 or something?

    At the very least would it spice up testing and the search for errors
  • 2
    And I thought MY overengineering habits were bad
  • 9
    Wouldnt suprise me if the idiot who wrote this also define this in every single class to make it even worse.
  • 2
    We can’t expose the implementation of true and false. Encapsulation an shit
  • 7
    const int zero = 0;
    const int one = 1;
  • 3
    @Drunkzee Mainly abusing inheritance to reuse few lines of code making everything very hard to extend, giving every single HTTP endpoint his own microservice shattering the business logic among 40 Maven projects, splitting classes long less than 50 LOCs "just in case" making very hard to follow the execution flow and creating other stupid constants such as public static final Weekday FRIDAY = Weekday.FRIDAY.
  • 4
    @electrineer Lmao imagine if someone was dumb enough to do that for all the numbers they would us around the code. And someday some gets pissed at the company changes the values to be random.
  • 7
    @electrineer Guess what? They did that too 😁
  • 2
    @Frederick It happened at least at time as it happened to see constants defined from enum values such as public static final Weekday FRIDAY = Weekday.FRIDAY
  • 0
    @DEVil666 *at least ONE time
  • 2
    We must be prepared in case aliens take over and change 0 to something else
  • 5
    @DEVil666 Are you guys paid by LoC by any chance? 😂
  • 7
    TIL there is lasagna code and even ravioli code.
    If you ever get bored of spaghetti.
  • 0
    @Lensflare How Papa Franku said: "ravioli ravioli what's in the pocketoli"

  • 4
    @TeachMeCode still not enough encapsulation

    private static final boolean TRUE = true;
    private static final boolean FALSE = false;

    public static Boolean getTrue {
    return TRUE;
    public static Boolean getFalse {
    return FALSE;

    Now it’s encapsulated enough 😁
Add Comment