26
bioDan
8y

SICK AND TIRED OF READABILITY VS. EFFICIENCY!!!!!!!

I HAD TO SEPARATE A 4 LOC JSON STRING, WHICH HAD AN ARRAY OF A SINGLE KEY-VALUE PAIRS (TOTAL OF 10 OBJECTS IN THE ARRAY).

ITS READABLE IF YOU KNOW JSON. HOW HARD IS TO READ JSON FORMAT IF YOU GET YOUR STYLE AND INDENTATION PROPERLY?!?

SO I HAD TO
BREAK THE POOR FREAKING JSON APART TO A FUCKING DIFFERENT YAML FILE FORMAT ONLY SO I CAN CALL IT FROM THERE TO THE MAIN CONTROLLER, ITERATE AND MANIPULATE ALL THE ID AND VALUES FROM YAML BACK TO MATCH THE EXPECTED JSON RESPONSE IN THE FRONT END.

THE WHOLE PROCESS TOOK ME ABOUT 15 MINUTES BUT STILL, THE FUCKING PRINCIPLE DRIVES ME INSANE.

WHY THE FUCK SHOULD I WASTE TIME AT AN ALREADY WORKING PIECE OF CODE, TO MAKE IT LESS EFFICIENT AND A SLIGHTLY BIT MORE READABLE?!? FML.

Comments
  • 2
    Well, there has to be some compromise between both.

    If it exists and it's working and it's readable well no reason to change it but if it's clearly readable only by creator then yes, again experience will tell better.

    spending 15min could get you mad but save you lots of headaches in future
  • 3
    A true devRant
  • 3
    @lostpirate i agree and fully aware of the tradeoffs.

    and i also know from expierence that large JSON objects with nested values can be difficult to read.

    But this case is simple, perhaps i wasnt clear enough of what the JSON consisted:

    [ {name: 'Google', url: 'www.google.com'},
    {name: '...', url: '...'},
    {name: '...', url: '...'} ];

    IS THIS REALLY UNREADABLE ?!

    (not single key-value pairs. my mistake. complexity should converge to infinity in any given moment)
  • 3
    WHY THE HELL DO YOU WRITE WITH CAPS LOCK?!!!
  • 4
    @Madeindjs its a good way to express rage and also cause i can :)

    its really liberating, cant you tell?
Add Comment