samdphillips
2019-12-5 15:29:14

This is a good lesson!


samdphillips
2019-12-5 15:29:39

We should write tests.


wanderley.guimaraes
2019-12-5 21:03:11

I also spent some time debugging an error that a small test would help to avoid (or flag). If you target finish in top 100 (for a day), I don’t think that it is possible to do that writing tests. The top 100 finished the first four days under 6 minutes. Yesterday, it was average 15min.


wanderley.guimaraes
2019-12-5 22:17:25

I can see how tests speed up the development of harder (simulation) problems. I did until day 15 last year and there were few problems that were difficult enough to split in pieces and have tests for them.

(https://adventofcode.com/2018/leaderboard/day/15)


samdphillips
2019-12-5 22:31:07

I’m a smalltalk TDD, HTDP style developer so /most/ of the time I write a test first


sorawee
2019-12-5 22:31:50

I think that’s part of the reason why Matthias said that he dislikes this kind of contest. It encourages people to not developing good programs if you want to get high ranking.


wanderley.guimaraes
2019-12-6 00:37:21

Good and bad are trick words. But I get want he means. Programs in those competitions are small and self-contained and that is not how the real-world looks like.

By the other hand, one can craft several skills in those competitions that are useful in real-world problem solving: deep focus, habit to search for corner cases, top-down analysis (time and space for example) and how to prototype something fast.


wanderley.guimaraes
2019-12-6 00:38:15

Did you learn to program using the HtDP style or you started to use it later?


samdphillips
2019-12-6 01:41:34

Later.


wanderley.guimaraes
2019-12-6 03:41:21

How was your experience applying it and how painful was to overcome the old habits? Feel free to ignore my question if you don’t feel like sharing your experience.

I am asking because I somewhat incorporated the design recipe in my process but I always feel an internal resistance to apply it. By other hand, I wonder if people like Matthew (that builds tons of complex, big and good software) use it daily.


wanderley.guimaraes
2019-12-6 04:53:45

May the lambda be with you. Have fun guys.