• @[email protected]
    link
    fedilink
    32 months ago

    here’s a more nuanced question: in school iirc my teacher was implementing terminal 2-human tic-tac-toe with us and used an only slightly less egregious 7-by-3 AND/OR gate to see whether any player had won. because I didn’t like all the repetition, my version iterated through a 7-by-3 list of lists of indecies instead. every toy programming problem I’ve seen since was so general that it didn’t go well with this kind of hardcoding either

    • @[email protected]
      link
      fedilink
      English
      22 months ago

      When creating an example for beginning programmers, sometimes using a very inefficient data structure is more illustrative and a helpful educational tool.