I've been thinking recently about how things like Project Euler, LeetCode, and to a bit less of an extent, Advent of Code, are so heavily focused on making clever use of math, data structures and algorithms, that it makes them suboptimal as a tools for getting familiar with a new programming language.
I know that that critique isn't new to anyone but it makes me think about how it would be cool if there were a code puzzler site that is specifically geared towards little self-contained tasks that are more to do with forcing you to get familiar with the common everyday tasks of software development.
Some example puzzlers could be like:
- open an http server on port 80
- open a file and write this data to it
- write temporary files to a location, deleting them when process exits
- query a database
- deal with such and such error scenario
- find a way to test this component
- bundle this code as an executable
- sanitize user input here
- make this behavior configurable
- take the config from environment variable variable and/or config file and/or arguments
- parse this data file
You do get a bit of parsing and file handling with Advent of Code but imagine a series of dozens of small problems that grill you on every corner of the python filesystem api. Would be a lot less dry than reading docs cover to cover.
I know that that critique isn't new to anyone but it makes me think about how it would be cool if there were a code puzzler site that is specifically geared towards little self-contained tasks that are more to do with forcing you to get familiar with the common everyday tasks of software development.
Some example puzzlers could be like:
- open an http server on port 80
- open a file and write this data to it
- write temporary files to a location, deleting them when process exits
- query a database
- deal with such and such error scenario
- find a way to test this component
- bundle this code as an executable
- sanitize user input here
- make this behavior configurable
- take the config from environment variable variable and/or config file and/or arguments
- parse this data file
You do get a bit of parsing and file handling with Advent of Code but imagine a series of dozens of small problems that grill you on every corner of the python filesystem api. Would be a lot less dry than reading docs cover to cover.