Basic programming concepts: 100 questions to test your knowledge

One of my friends — a self-taught game programmer coming from game design — recently asked me to help him brush-up on some of the programming concepts that he may have missed or forgotten. This is not unusual — over the years I have met many programmers that are very capable, but feel they could benefit from knowing more of the stuff taught in traditional courses.

As a starting point to help him, I prepared this list of questions to assess how much he already knew. I don’t think being able to answer any of these questions necessarily makes you a better programmer (you may well have used and implemented pools without knowing what they are, for example), however, having some terminology and theory under the belt can be very helpful to structure your thoughts, find books or other resources, or finding ways to hone your craft.

Maybe this list can help other programmers looking for filling in gaps in their basic knowledge to discover where those gaps may be, so here it is.

Constructs

  1. What is a control structure?, Name two common types.
  2. Explain the concept of scope in programming.
  3. Define scope resolution.
  4. Explain destructuring in the context of JavaScript, C#, or Python?
  5. What is pattern matching?
  6. What is method overloading and operator overloading?
  7. Explain the concept of method overriding.
  8. What is reflection in programming?
  9. What are attributes in programming?
  10. What is exception handling?

Code

  1. What are documentation comments in code?
  2. What is code obfuscation, and why is it used?
  3. What is code signing?

Types

  1. What are primitive or basic types in programming?
  2. Describe how custom types are defined in a language of your choice.
  3. Describe the difference between dynamically typed and statically typed languages.
  4. What are generic types?
  5. Explain duck typing and its typical use case.
  6. What is type coercion?

Techniques

  1. What are mutable and immutable objects and how can immutability benefit software development?
  2. Describe lazy evaluation and its purpose.
  3. What is memoization in programming?
  4. Describe the concept of idempotency in programming.
  5. What is orthogonality in software design?
  6. Describe the concept of data normalization in databases.
  7. Define what a fluent interface is and its advantages.
  8. Explain the concept of data binding.

Memory

  1. What is the difference between passing a value and passing a reference?
  2. What is a memory leak, and how can it be prevented?
  3. What is garbage collection in programming languages?
  4. Explain the difference between deep copy and shallow copy.

Data Structures and Algorithms

  1. What is an algorithm?
  2. What is recursion in computer programming?
  3. What is an array?
  4. What is a linked list? How does it differ from an array?
  5. What is a dictionary data structure?
  6. What is a queue?
  7. What is a stack?
  8. What is hashing? How is it used in programming?
  9. What is a binary search tree?
  10. What is a graph data structure?
  11. How does big O notation work and what is it for?

Paradigms

  1. Define the object-oriented programming paradigm.
  2. Describe the functional programming paradigm.
  3. Explain the procedural programming paradigm.

OOP

  1. Describe what classes are in object-oriented programming (OOP).
  2. What is the difference between a class and an object?
  3. What is the purpose of constructors in classes?
  4. How does a static method differ from an instance method?
  5. Describe the concept and usage of interfaces in OOP.
  6. What is inheritance in object-oriented programming?
  7. Explain polymorphism and provide an example.
  8. What does encapsulation mean in the context of OOP?
  9. Define abstraction in OOP and its significance.
  10. What are the advantages of using composition over inheritance?
  11. How does composition differ from inheritance?

Functional Programming

  1. What is a function in programming?
  2. What is a closure in programming?
  3. What are side effects in programming, and how can they impact functions?
  4. Explain what a lambda function is and provide a use case.
  5. What are higher-order functions in functional programming?
  6. What is a pure function?
  7. What is currying?

Design

  1. What is code refactoring?
  2. Describe the concept of code smell.
  3. Explain the principle of least privilege.
  4. Explain what is meant by software modularity.
  5. Explain what is meant by the term loose coupling in software architecture.
  6. What is dependency injection and its benefits?
  7. Explain the Single Responsibility Principle (SRP).
  8. Describe the Open/Closed Principle (OCP).
  9. What is the Liskov Substitution Principle (LSP)?
  10. Explain the Interface Segregation Principle (ISP).
  11. Describe the Dependency Inversion Principle (DIP).

Concurrency and Asynchronous Programming

  1. What is event-driven programming?
  2. What is event propagation?
  3. What is asynchronous programming?
  4. What is multithreading and why is it used?
  5. What is concurrency in programming?
  6. What are deadlocks, and how can they be avoided?
  7. What is a race condition?
  8. What is a callback function?

Patterns and Idioms

  1. Explain the concept of software patterns.
  2. Describe the singleton design pattern.
  3. What is a pool in programming and what is it used for?
  4. What is a state machine and give an example of how it can be used.
  5. What is the Entity-Component-System (ECS) pattern?
  6. Describe the publish/subscribe messaging pattern.
  7. What is a software anti-pattern?

Technologies

  1. What are format strings and why are they useful?
  2. Define regular expressions and their common use cases.
  3. What are streams in programming?
  4. Describe the process of data serialization.
  5. What are XML and JSON? How do they differ?
  6. Explain the differences between the GET and POST methods in HTTP requests.
  7. Describe responsive design of UIs.

Testing

  1. What is test-driven development (TDD)?
  2. What is unit testing and why is it important?
  3. Describe integration testing and how it differs from unit testing.
  4. What is mocking in the context of testing?

About the author