• Hello Hotel@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        4 days ago

        This 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;
        }
        
      • logging_strict
        link
        fedilink
        arrow-up
        1
        ·
        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.