| 1 | How do you use print statements effectively for debugging, including showing variable names alongside values? Python › Debugging & Profiling | Python | Debugging & Profiling | Beginner |
| 2 | How do assert statements work for debugging, and why should they NOT be relied upon for production input validation? Python › Debugging & Profiling | Python | Debugging & Profiling | Intermediate |
| 3 | How do you use Python's built-in 'warnings' module to surface deprecated or risky code paths during debugging? Python › Debugging & Profiling | Python | Debugging & Profiling | Intermediate |
| 4 | How do you use pdb's post-mortem debugging mode to inspect a program's state exactly at the point where an unhandled exception occurred? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 5 | How do you use the timeit module to accurately measure a small code snippet's execution time? Python › Debugging & Profiling | Python | Debugging & Profiling | Intermediate |
| 6 | How do you use cProfile to identify which functions are consuming the most time in a larger program? Python › Debugging & Profiling | Python | Debugging & Profiling | Intermediate |
| 7 | How would you use the 'faulthandler' module to diagnose a program that crashes with a segmentation fault, typically from a C extension? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 8 | How would you use line_profiler (a third-party tool) to get LINE-BY-LINE timing information within a specific function, more granular than cProfile's function-level data? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 9 | How would you use py-spy (a sampling profiler) to profile a running Python process in PRODUCTION without restarting it or adding any code changes? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 10 | How do you use the built-in pdb debugger to pause execution at a specific line? Python › Debugging & Profiling | Python | Debugging & Profiling | Beginner |
| 11 | How do you use the traceback module to capture and format a full exception traceback as a string, useful for logging? Python › Debugging & Profiling | Python | Debugging & Profiling | Intermediate |
| 12 | How do you use memory_profiler (or tracemalloc from the standard library) to identify a memory leak's source in a Python application? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 13 | How would you use the 'logging' module's exception logging (logger.exception()) INSIDE an except block to automatically capture the full traceback? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 14 | How would you profile memory allocations specifically (not just CPU time) to find which objects are consuming the most memory in a running process? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 15 | How do you use conditional breakpoints in pdb to pause execution only when a specific condition is met, avoiding manually stepping through many unrelated iterations? Python › Debugging & Profiling | Python | Debugging & Profiling | Advanced |
| 16 | How does __repr__ help with debugging when printing a list of custom objects? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Beginner |
| 17 | How would you generate and interpret a CPU profile for a Node.js application using the built-in --prof flag? Node.js › Performance Optimization & Profiling | Node.js | Performance Optimization & Profiling | Intermediate |
| 18 | How would you use the 'clinic.js' toolset (clinic doctor, clinic flame) to diagnose a Node.js performance problem? Node.js › Debugging & Diagnostics | Node.js | Debugging & Diagnostics | Advanced |
| 19 | Why is a bare 'except:' clause (catching everything with no type specified) generally discouraged? Python › Exception Handling | Python | Exception Handling | Beginner |
| 20 | Why should you use the logging module instead of print() for diagnostic output? Python › Logging | Python | Logging | Beginner |
| 21 | What are Python's five standard logging severity levels, from lowest to highest? Python › Logging | Python | Logging | Beginner |
| 22 | How do you format log output to include the timestamp, logger name, level, and message? Python › Logging | Python | Logging | Beginner |
| 23 | What is the difference between __str__ and __repr__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Beginner |
| 24 | What does it mean that Python has 'automatic' memory management, and what's the trade-off compared to manual memory management in languages like C? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Beginner |
| 25 | What is a race condition, and how does it differ from a deadlock? Python › Concurrency (asyncio/threading/multiprocessing) | Python | Concurrency (asyncio/threading/multiprocessing) | Intermediate |
| 26 | What is the difference between 'raise' and 'raise ... from ...' for exception chaining? Python › Exception Handling | Python | Exception Handling | Intermediate |
| 27 | How do you access details about the exception currently being handled, like its type, value, and traceback, using sys.exc_info()? Python › Exception Handling | Python | Exception Handling | Intermediate |
| 28 | How does the 'else' clause on a try statement work, and what's its purpose compared to just putting that code at the end of 'try'? Python › Exception Handling | Python | Exception Handling | Intermediate |
| 29 | What is the relationship between Logger, Handler, Formatter, and Filter in the logging module? Python › Logging | Python | Logging | Intermediate |
| 30 | What's the danger of using %-style, f-string, or .format() interpolation directly in a log call's message argument versus lazy % substitution? Python › Logging | Python | Logging | Intermediate |
| 31 | How does Python's generational garbage collector work, and why generations? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 32 | What is the sys.getsizeof() function, and what are its limitations for measuring memory usage? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 33 | How does the gc module let you inspect and debug memory leaks caused by uncollectable objects? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 34 | How do mutable default arguments create a subtle memory and correctness pitfall related to object lifetime? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 35 | How does the tracemalloc module help track where memory is being allocated in a running program? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 36 | How do you troubleshoot a CORS error reported in browser developer tools, and what does the error message typically indicate? .NET › CORS & Cross-Origin Resource Sharing | .NET | CORS & Cross-Origin Resource Sharing | Intermediate |
| 37 | What is the purpose of setting explicit CPU and memory resource requests and limits for a Node.js container in Kubernetes? Node.js › Docker & Deployment | Node.js | Docker & Deployment | Intermediate |
| 38 | How would you measure how 'busy' the event loop is in a running Node.js process using a simple technique? Node.js › Event Loop & Non-blocking IO | Node.js | Event Loop & Non-blocking IO | Intermediate |
| 39 | What is an APM (Application Performance Monitoring) tool, and what capabilities does it typically add beyond basic logging? Node.js › Logging & Monitoring | Node.js | Logging & Monitoring | Intermediate |
| 40 | How would you profile whether a generator expression is actually providing a measurable memory or performance benefit over a list comprehension in a specific use case? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 41 | How would you choose between a list, a set, a dict, and a specialized structure like heapq for efficiently finding the K smallest/largest elements in a large dataset? Python › Data Types & Structures | Python | Data Types & Structures | Advanced |
| 42 | How do you implement a descriptor-based ORM-style field that lazily loads related data only when actually accessed? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 43 | How does exception performance (raising/catching) compare to normal control flow, and why does Python's EAFP style still encourage using exceptions for routine control flow, unlike some other languages? Python › Exception Handling | Python | Exception Handling | Advanced |
| 44 | How do you correctly handle character encoding when reading text files that might not be UTF-8, and what error occurs if you guess wrong? Python › File I/O & Context Managers | Python | File I/O & Context Managers | Advanced |
| 45 | Why is using a mutable default argument (like an empty list) a classic Python bug, and how do you avoid it? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 46 | How do you clear or inspect the cache of an lru_cache-decorated function? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 47 | How does itertools.groupby depend on input order, and what's a common mistake when using it? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Advanced |
| 48 | How does logger.exception() differ from logger.error(), and when should you use it? Python › Logging | Python | Logging | Advanced |
| 49 | How would you write a custom logging.Filter to redact sensitive data like passwords from log messages? Python › Logging | Python | Logging | Advanced |
| 50 | How does object interning (like small integer caching and string interning) affect memory and identity comparisons? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 51 | What is memory fragmentation in the context of Python's object allocator, and how does pymalloc address it for small objects? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 52 | How do circular references between objects with __del__ methods behave differently in Python 3.4+ compared to earlier versions? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 53 | How does Python locate modules during import, and what is sys.path's role? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 54 | Why does Python sometimes raise 'TypeError: Cannot create a consistent method resolution order'? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Advanced |
| 55 | How do you use the --inspect flag and Chrome DevTools to profile a running Node.js application in production? Node.js › Advanced Node.js | Node.js | Advanced Node.js | Advanced |
| 56 | What does the node:perf_hooks module provide, and how would you use it to measure precise execution time of a code block? Node.js › Core Node.js Modules | Node.js | Core Node.js Modules | Advanced |
| 57 | What is 'event loop lag' (or 'event loop delay'), and how would you monitor it in a production Node.js application? Node.js › Event Loop & Non-blocking IO | Node.js | Event Loop & Non-blocking IO | Advanced |
| 58 | How would you implement conditional middleware in Express that only applies to certain requests based on a runtime condition? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |