Programming Fundamentals: What to Master Before You Take a Quiz
A language-neutral checklist of the fundamentals that programming quizzes and interviews rely on: types, control flow, functions, data structures, complexity, debugging and objects.
SmartCampus Buddy TeamSeptember 25, 20269 min read
Whatever language a quiz uses, the questions lean on the same handful of fundamentals. If these are solid, switching between Python, JavaScript and Java gets much easier. Use this list as a self-check: for each item, can you explain it in your own words and predict what code using it will do?
1. Variables and types
Know what kinds of values exist (numbers, text, booleans, collections), how conversion happens, and what happens when you mix types. Understand the difference between a value and a reference to an object, because that is behind many "why did this change?" questions.
Self-check: what happens when you assign a list to a second variable and change one of them?
Practise: Python Basics, JavaScript Fundamentals or Java Fundamentals.
2. Control flow
Conditions, loops and early exits. Be able to trace a loop by hand and predict how many times it runs, including edge cases such as an empty input or a loop condition that is false from the start.
Self-check: what does a loop that removes items from the list it is looping over do?
3. Functions
Parameters, return values, scope and side effects. Know what a function returns when you do not return anything, how arguments are passed, and what a function can see outside itself.
Self-check: can you describe the difference between a function that changes its input and one that returns a new value?
4. Core data structures
Arrays or lists, dictionaries (maps), sets, stacks and queues. For each, know what it is good at and how fast the common operations are. A hash-based set or map finds an item in roughly constant time, whereas scanning a list takes time proportional to its length.
Self-check: you need to test membership millions of times. Which structure do you choose?
5. Recursion
A function that calls itself needs a base case and progress toward it. Trace a small example, such as a factorial or a sum of a list, and watch the call stack build up and unwind.
Self-check: what happens if the base case is missing?
6. Complexity intuition
You do not need heavy maths. Learn the common shapes: constant, logarithmic, linear, linearithmic (sorting) and quadratic (nested loops). Being able to say "this is linear, that one is quadratic" is often enough in an interview.
Self-check: what is the complexity of looping over a list inside another loop over the same list?
7. Debugging
Reading an error message from the bottom up, finding the line that failed, and forming a hypothesis before changing code. Practise with snippets that are almost right. The interactive challenges, such as the Python Debug Lab, are built for exactly this.
8. Objects and classes
What a class is, how an object stores state, what inheritance and interfaces are for, and why hiding internal data behind methods is useful. See Java OOP concepts explained for a worked example.
A study routine that works
- Pick one language and go through its beginner quiz in practice mode.
- Write down every concept you missed, with a one-line explanation.
- Redo the quiz in exam mode a day later.
- Repeat with the next level.
When you are ready for interview-style questions, follow the technical interview preparation plan.
Key takeaways
- Fundamentals are shared across languages, so learn them once and apply them everywhere.
- Test yourself with the self-check questions before you take a quiz.
- Trace code by hand; do not rely on guessing.
- Explain each concept aloud, and keep a short list of weak spots to revisit.