bigboismith@lemmy.world to Programming Horror · 2 months agoFound this beauty in one of my old projects from schoollemmy.worldimagemessage-square15fedilinkarrow-up155arrow-down13
arrow-up152arrow-down1imageFound this beauty in one of my old projects from schoollemmy.worldbigboismith@lemmy.world to Programming Horror · 2 months agomessage-square15fedilink
minus-squareSpicyLizards@reddthat.comlinkfedilinkarrow-up5·2 months agoThe best code has the fewest lines.
minus-squareHello Hotel@lemmy.worldlinkfedilinkEnglisharrow-up1·edit-25 days agoThis is just as easy to write, just as sloppy but hopefully way easier to read. Game.onload = (data)=>{ let a = data; a = JSON.decode(a)["saveGame"][0]; a = JSON.decode(a)["SaveGame"]; return a; }
minus-squarelogging_strictlinkfedilinkarrow-up1·2 months ago… an adult enters the conversation ;-) Easier maintainability is everything The best code Comes with tests what are easy to understand. As bugs are discovered, should be written in such a way, that it’s very easy to add more test cases. Fewest lines is not necessarily easy to maintain.
minus-squareSpicyLizards@reddthat.comlinkfedilinkarrow-up1·edit-21 month agoLol, I should have been marking that with a satire tag
minus-squarelogging_strictlinkfedilinkarrow-up1·1 month agoWhether you did or not, non-obvious what the answer would be. Might get 1000 cringe worthy responses that can’t withstand scrutiny So my eyes need not bleed and my mind not splatter across the room, wrote a worthy response.
The best code has the fewest lines.
This is just as easy to write, just as sloppy but hopefully way easier to read.
… an adult enters the conversation ;-)
Easier maintainability is everything
The best code
Comes with tests what are easy to understand. As bugs are discovered, should be written in such a way, that it’s very easy to add more test cases.
Fewest lines is not necessarily easy to maintain.
Lol, I should have been marking that with a satire tag
Whether you did or not, non-obvious what the answer would be.
Might get 1000 cringe worthy responses that can’t withstand scrutiny
So my eyes need not bleed and my mind not splatter across the room, wrote a worthy response.
Lol