Getting Familiar with a New Programming Language

2 min

I have around ten years of experience developing software in various programming languages. I started with ActionScript 3, learned Java and C++ in university and develop web application for around five years in Python and JavaScript.

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.

Basics

  1. Download and install the language/compiler etc.
  2. Write a “Hello World” program. (Understand how compiling and running works)
  3. Write a program, which contains a function with parameters and a return value. (Understand the syntax)

    1. Check if there are optional parameters
    2. Check if a function can have more than one return value.
    3. Check how exception handling works.
  4. 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)
  5. 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

  1. Write a program, which uses an external library (Understand how dependency management works)
  2. 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)
  3. Write a program, which uses more than one file and module/package. (Understand how to export something from a file/module/package)
  4. Write a unit-test (Understand how testing works)
  5. Check if there are widely used linters or code formatters and how to set them up (Understand how to use the common style guide)
  6. 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.

Conclusion

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 :)