• @AliasVortex@lemmy.world
        link
        fedilink
        English
        23
        edit-2
        2 months ago

        We call that pseudocode and it looks fine to me. No computer will run it natively (AI meat grinders aside), but most devs will be able to pick up on the logic and convert it to actual code.

        Disclaimer: am a programmer.

        Edit: as an aside, manually dealing with time is its own form of madness and is usually best left to libraries (ie other people’s code) whenever possible.

      • @b000rg@midwest.social
        link
        fedilink
        English
        72 months ago

        This is honestly exactly what programming is: breaking down big problems into step by step simple problems. If you’ve never considered taking up programming before, I’d suggest you try it sometime and see where it takes you. It’s not hard to learn, it just takes time.

      • @bandwidthcrisis@lemmy.world
        link
        fedilink
        32 months ago

        COBOL is an old language Internet to make programs look a bit like English descriptions of what was needed.

        I don’t really know it, but your code reminded me of the idea of it.

        Don’t worry if your code is incorrect, just make random changes until you hit on something that no longer results in errors :)