About this series
This series of posts documents the learnings, challenges i encountered and the decisions i made on my journey to hone the (algorithmic) tools of my trade. It's partly a tool for me to arrange my thoughts on this, partly a resource for me to revisit every now and then, and partly to serve as a guide for anyone who might find it useful.
Check out the meta post for a list of all related posts. For any Hiring Managers/TA Partners seeing this, drop me an email if you like what you see!
Selecting a programming language
Factor | Rationale | Candidates |
---|---|---|
Proficiency in the language | Assessment time should not be spent second-guessing (or worse, debugging) syntax and language features. | Javascript, Python, Java, C++ |
Relevance of the language | Selected language should ideally be relevant to the desired roles and the work they entail | Javascript, Python, Java, Go, Rust |
Time constraints of the programming assessment | Languages which allow for more intuitive expression of logic (such as dynamically typed languages and languages with syntactical sugar) save mental bandwidth for actually working on the problem | Javascript, Python |
Support for useful features | Assessment time shouldn’t be spent writing code to reinvent the standard data structures wheel or to figure out abstracted away memory management | C++, Java, Python, Javascript (w/ external modules), Go (w/ external modules) |
Decision:
- When building off known data structures to arrive at solutions, use Python
- When required to implement data structures from scratch, use Javascript
- Only when required to directly manipulate memory, use C++ (or more ideally, Rust)
Stray Thoughts
- A scripting language really allows for clarity in thought and lets the logic to shine though
- See my solution (and the community solution) for LC 1768 for an example
- Switching between Python and Javascript can often cause “crossed wires”
- Accessing
arr[-1]
yieldsundefined
in JS and the last element in Python - Accessing
str[len(str)]
yieldsundefined
in JS and an error in Python
- Accessing
- C++ and Java really bring with it a lot of syntax which detracts from the logic of the solution!
- However, in the memory manipulation cases, C++ does not have any competition (in the selected 3), allowing for crystal clear expression!