One Pager Cheat Sheet
- Understanding
typesystems in programming is fundamental to solving many programming exercises and challenges, and this article by Simon Drake serves as an amazing primer for language-specific interview questions. High-level languages are easier for humans to read and write, but need to be translated into machine code, which can be done through either compilation or interpretation.- The compiler takes in the
source codeand translates it into the target language (usually machine code), potentially through an intermediary language calledassembly. - The
source codeis translated on the fly tomachine codewhen needed, to be executed, with interpreters having optimisations to reduce resource waste. - Opting for a language with an
interpreterorcompilerwill impact the time and performance of your source code execution, with various additional complexities to consider depending on your language of choice. - Statically-typed languages will check code for errors before run-time, while dynamically-typed languages will only check when code is executed.
- Because of compile-time and run-time performance considerations,
statically typedlanguages provide better run-time performance and have different executables for different architectures, whiledynamically typedlanguages provide quicker set-up times and run the same code on all architectures. - A strongly-typed language is one where the programmer declares the
data-typein advance, whereas a weakly-typed language is one where thedata-typeis determined by the input given to it.



