Learning a New Programming Language for Production

Feb 5, 2023 | Tech Software

Language Peripherals

Setup
  • How to install the language and dependencies
  • How to use interactive console if possible
  • How to compile, if necessary, and run code from an OS terminal
  • How to setup dependency environment, create virtual environment or isolate dependent packages
  • How to automate setup using bash and pre-commit
  • How to package and produce only executable or binary with necessary files and dependencies
Debugging and Styling
  • How to debug, throw exceptions, back trace call-stack with files, functions, lines
  • How to format code using tools such as clang-format or Black with config files
  • How to lint using such as cpplint or flake8 and config file setup
  • How to write doc-strings

Language Itself

Program Structure
  • the main function or the entry point
  • basic console input and output
  • basic file input and output
  • basic logging
  • basic comments
Variables
  • variable scope
  • static variable if exists
  • constants
  • type, or type hints if not strongly-typed
Basic Data Structures
  • numbers
  • array
  • vector
  • map or dictionary
  • string, formatted string
  • pointer and reference, if exist; or, what's referenced and copied
  • stack and heap memory allocation, if exist
Operators
  • assignment
  • mathematical
  • relationship
  • logical
Control Flow
  • if-else
  • while
  • for, range-based, index-based
  • switch-case, or match-case
  • break, continue
Functions
  • declaration
  • arguments, default arguments
  • return and pass if exist
  • variable unpacking
  • overloading
  • lambdas
  • variadic arguments and how they are handled inside the function
Modules
  • how to include other modules
  • how to separate declaration and implementation if possible
Class
  • member variables and functions
  • class variables and functions
  • class static and constant variables
  • scope, public, protected, private
  • constructor and destructor if exist
  • friend class, if exists
  • operator overloading
  • overloading built-in class functions, if exist
Class Inheritance
  • derived class member variables and functions scope
  • override functions
  • calling base class methods, variables
  • multiple inheritance
Polymorphism
  • mechanism, through interface inheritance and pointer, or through pure function signature
  • does the concept of abstract or interface class exist
Exceptions
  • basic types
  • user-defined types
  • throw and catch
  • built-in or third-party backtrace if exists
Concurrency
  • mutex
  • async tasks
  • timer
Language Sugars
  • Things such as smart pointer in C++ and list comprehension in Python