5 ms·
When I started programming at 12-13 I had no idea loops or arrays existed and implemented an absolutely criminal Tic-Tac-Toe game. The same year me and a frien
by quirino 3y ago
When I started programming at 12-13 I had no idea loops or arrays existed and implemented an absolutely criminal Tic-Tac-Toe game.
The same year me and a friend were studying for the national Informatics Olympiad and we were completely stumped when faced with a problem that required a list: "How do we know how many variables to declare if we don't know the N beforehand?".
(The problem if anyone is interested: https://neps.academy/br/exercise/384 https://neps.academy/br/exercise/384. Given a list of up to 50k distinct numbers (with values up to 100k) and another list of 50k numbers that should be removed, print the resulting list. Time Limit: 1 second.)
- freetime2 3y agoWhen I first started coding, I thought loop structures were confusing and redundant when I could accomplish the same thing with GOTO. So that’s how I implemented all my loops for years until I eventually took a course and a teacher told me I was never to use GOTO again.
- deleted 3y ago[deleted]
- wongarsu 3y agoDijaksta's “goto considered harmful“ is often interpreted as a much broader opinion than it was, but this is a perfect example of what he was against
- User23 3y agoYeah Dijkstra's main objection to goto is that it's really hard to formally define its semantics and even if you do, the formalism is so complex it's hard to reason about. Break and continue on the other hand are considerably easier to formalize.
- matheusmoreira 3y ago> national Informatics Olympiad That brought back a lot of memories... I wonder if there are participation records. The olympiad website isn't responding. I also took part in the astronomy olympiad.
- quirino 3y agoThe OBI website is really great, it's just been down for a couple of days. There's a good chance you'll find records there.