Getting Familiar with a New Programming Language2 min
Sometimes I want to expand my horizon and learn a new programming language. I come up with a list of tasks I have to master before I can say that I have learned a new programming language.
I have Learned xy Task List
I divide the tasks into two groups. The first one covers the basics about a programming language and the second one covers its idioms and ecosystem.
- Download and install the language/compiler etc.
- Write a “Hello World” program. (Understand how compiling and running works)
Write a program, which contains a function with parameters and a return value. (Understand the syntax)
- Check if there are optional parameters
- Check if a function can have more than one return value.
- Check how exception handling works.
- Write a program, which contains the basic data structures List, Array, String and Map. (Understand the standard library and where to find information about it)
- Write a program, which reads a file from disk, gets a user input and writes it back into the file. (Understand how I/O works)
Idioms and Ecosystem
- Write a program, which uses an external library (Understand how dependency management works)
- Research if there are guidelines on how to structure a program. For example if there is a common folder structure or a specific way of naming files and functions (Understand common guidelines)
- Write a program, which uses more than one file and module/package. (Understand how to export something from a file/module/package)
- Write a unit-test (Understand how testing works)
- Check if there are widely used linters or code formatters and how to set them up (Understand how to use the common style guide)
- Write a restful web-server (by using a popular community library) with two endpoints. One for reading data from a database (MySQL or MongoDB) and another one for writing data to the database. Both endpoints should use accept and return JSON.
These are my two task lists for learning the basics of a programming language and for learning its idioms and ecosystem. Do you have a similar list for learning a new programming language? Do you have a task which you would add to one of the list? Please leave a comment :)