All fields

“OOP” in Information Technology

247 questions across 13 technologies.

Information Technology

247 questions in 13 technologies

#QuestionTechnologyTopicLevel
1What are the four pillars of OOP in C#? C# › OOPC#OOPBeginner
2What is the event loop, and why does it allow Node.js to handle many concurrent operations despite being single-threaded? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
3What is the difference between concurrency and parallelism, and which one does Node.js's event loop actually provide by default? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
4What is a callback queue (or task queue) in the context of the Node.js event loop, and how does it relate to the call stack? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
5How does the event loop decide what to run next? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
6How does the event loop handle a large synchronous loop (like processing a huge array with a for loop), and what problem does this cause? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
7How 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 IONode.jsEvent Loop & Non-blocking IOIntermediate
8What's the relationship between requestAnimationFrame and the event loop's rendering step? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
9What are the distinct phases of the Node.js event loop, and what kind of callbacks does each phase execute? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
10What 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 IONode.jsEvent Loop & Non-blocking IOAdvanced
11What is the poll phase of the event loop, and under what specific conditions does it block waiting versus move on immediately? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
12How does the V8 JavaScript engine's microtask queue interact with the Node.js event loop's macrotask phases, and why does this occasionally surprise developers? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
13What is the Iterator interface in PHP, and how does it relate to how a foreach loop actually works behind the scenes? PHP › Generators & IteratorsPHPGenerators & IteratorsBeginner
14What is the difference between micro tasks and macro tasks in Node.js's event loop, and how does this affect Promise callback ordering? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
15How do you detect and prevent event loop blocking in a long-running Node.js service? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
16How do you loop over an async iterable? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsBeginner
17Can you use a for...of loop directly on a generator's return value? JavaScript › Iterators & GeneratorsJavaScriptIterators & GeneratorsBeginner
18How do you write a basic list comprehension, and how does it compare to an equivalent for loop? Python › Comprehensions & GeneratorsPythonComprehensions & GeneratorsBeginner
19What exception signals the end of iteration, and how does a for-loop use it internally? Python › Iterators & the Iterator ProtocolPythonIterators & the Iterator ProtocolBeginner
20How do you manually exhaust and inspect an iterator without a for-loop? Python › Iterators & the Iterator ProtocolPythonIterators & the Iterator ProtocolBeginner
21What is the difference between the Iterable and Iterator interfaces, and how does the enhanced for-each loop rely on them? Java › Collections FrameworkJavaCollections FrameworkBeginner
22What is ReactPHP and how does its event loop enable non blocking, asynchronous behavior in standard PHP? PHP › Asynchronous PHP (ReactPHP & Swoole)PHPAsynchronous PHP (ReactPHP & Swoole)Beginner
23Why are recursion and immutable data often used together in functional style, instead of loops with mutable counters? JavaScript › Functional ProgrammingJavaScriptFunctional ProgrammingIntermediate
24How does variable capture (closures) work in a C# lambda expression, and what pitfall occurs when capturing a loop variable? C# › Delegates, Events & LambdasC#Delegates, Events & LambdasIntermediate
25How do you efficiently copy data between two streams using Stream.CopyToAsync(), and why is this preferred over a manual byte-by-byte loop? C# › File I/O & StreamsC#File I/O & StreamsIntermediate
26What does functools.reduce do, and why is it often discouraged in favor of loops? Python › functools & Functional Programming ToolsPythonfunctools & Functional Programming ToolsIntermediate
27What is the practical difference between using functools.reduce and a plain for-loop for accumulation? Python › functools & Functional Programming ToolsPythonfunctools & Functional Programming ToolsIntermediate
28What is the difference between iter(obj) and using obj directly in a for-loop, in terms of what Python calls internally? Python › Iterators & the Iterator ProtocolPythonIterators & the Iterator ProtocolIntermediate
29How should exceptions be handled inside a BackgroundService's ExecuteAsync loop to prevent the entire service from crashing silently? .NET › Background Services.NETBackground ServicesIntermediate
30How should exceptions be handled inside a BackgroundService's work loop to prevent one failure from silently stopping all future processing? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
31How do you correctly iterate a 2D array using both traditional indexed for-loops and the enhanced for-each loop, and when is each approach preferable? Java › Arrays & Multidimensional ArraysJavaArrays & Multidimensional ArraysIntermediate
32What is LINQ, and how does it simplify querying collections compared to writing manual loops? C# › LINQC#LINQIntermediate
33In what situations does SQL Server's query optimizer typically prefer a hash join over a nested loop join or a merge join? SQL Server › Hash Indexes & Hash Join OperationsSQL ServerHash Indexes & Hash Join OperationsIntermediate
34What is a consumer group in Redis Streams, and how does it enable multiple workers to process the same stream cooperatively? Redis › StreamsRedisStreamsIntermediate
35How do array_map, array_filter, and array_reduce help you transform and process array data without writing manual loops? PHP › Arrays in PHPPHPArrays in PHPIntermediate
36How do control structures like loops and conditionals work within Blade and Twig templates, and how do they compare to writing the equivalent raw PHP directly inside an HTML file? PHP › Template Engines (Blade & Twig)PHPTemplate Engines (Blade & Twig)Intermediate
37What is the difference between microtasks and the event queue in Dart's event loop, and how does this affect the precise order in which asynchronous code actually executes? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Intermediate
38What is the reconciliation loop and how often does ArgoCD run it? ArgoCD › GitOps PrinciplesArgoCDGitOps PrinciplesAdvanced
39How does asyncio's event loop schedule and switch between multiple coroutines, and what makes this cooperative rather than preemptive? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
40How do you safely run a blocking, synchronous function from within an asyncio coroutine without freezing the event loop? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
41How would you use concurrent.futures.ProcessPoolExecutor together with asyncio to run CPU-bound work without blocking the event loop? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
42How would you implement asynchronous file I/O using aiofiles alongside an async context manager, to avoid blocking the event loop during file operations? Python › File I/O & Context ManagersPythonFile I/O & Context ManagersAdvanced
43How does a closure capture variables from its enclosing scope, and what pitfall occurs when creating multiple closures inside a loop? Python › Functions & ScopePythonFunctions & ScopeAdvanced
44How does cooperative multiple inheritance require every class in the hierarchy to call super() consistently, even in __init__? Python › Multiple Inheritance & MROPythonMultiple Inheritance & MROAdvanced
45How would you implement a background task queue accepting ad-hoc work items dynamically at runtime, rather than a fixed polling loop? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
46How would you efficiently copy, resize, or merge large arrays in Java, and what are the performance trade-offs between System.arraycopy(), Arrays.copyOf(), and manual loops? Java › Arrays & Multidimensional ArraysJavaArrays & Multidimensional ArraysAdvanced
47How does Java's autoboxing and unboxing mechanism work at the bytecode level, and what specific performance and correctness pitfalls does it introduce in seemingly innocuous code, such as within a loop? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsAdvanced
48How does SQL Server's query optimizer decide which physical join algorithm, such as nested loops, merge join, or hash join, to actually use for a given query? SQL Server › JoinsSQL ServerJoinsAdvanced
49How do nested and recursive triggers work in SQL Server, and what precautions should be taken to avoid unexpected behavior or infinite loops? SQL Server › TriggersSQL ServerTriggersAdvanced
50How would you troubleshoot a query that is unexpectedly using a slow hash join when a much faster index seek and nested loop join should be possible? SQL Server › Hash Indexes & Hash Join OperationsSQL ServerHash Indexes & Hash Join OperationsAdvanced
51How can regular string concatenation inside a large loop lead to performance problems, and what alternative approaches help avoid this issue when building up very large strings? PHP › Strings & String FunctionsPHPStrings & String FunctionsAdvanced
52How do properties provide encapsulation? C# › OOPC#OOPBeginner
53What are the four core principles of object oriented programming, and how does PHP support each of them? PHP › OOPPHPOOPBeginner
54What are the three visibility modifiers in PHP, public, protected, and private, and how do they control access to a class's properties and methods? PHP › OOPPHPOOPBeginner
55What is the difference between overriding and hiding (override vs new)? C# › OOPC#OOPIntermediate
56What does the sealed keyword do and why use it? C# › OOPC#OOPIntermediate
57How does inheritance work in PHP using the extends keyword, and how do you call a parent class's constructor or method from within a child class? PHP › OOPPHPOOPIntermediate
58What is the difference between a static property or method and an instance property or method in PHP? PHP › OOPPHPOOPIntermediate
59How does the readonly property modifier introduced in PHP 8.1 help enforce immutability for specific class properties? PHP › OOPPHPOOPIntermediate
60What is composition over inheritance and when do you prefer it? C# › OOPC#OOPAdvanced
61How do virtual method tables enable polymorphism, and what is the cost? C# › OOPC#OOPAdvanced
62How does PHP handle multiple inheritance limitations, and how do traits provide a mechanism for sharing reusable code across multiple unrelated class hierarchies? PHP › OOPPHPOOPAdvanced
63How does late static binding, using the static keyword instead of self, allow inherited static methods to correctly reference the actual calling child class rather than the parent class where the method was originally defined? PHP › OOPPHPOOPAdvanced
64Is JavaScript single-threaded, and what does that mean in practice? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyBeginner
65What is the call stack? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyBeginner
66What is the difference between the microtask queue and the macrotask (task) queue? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
67Why does a long synchronous function block UI updates and event handling? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
68What does 'non-blocking I/O' mean, and how does a Node.js function like fs.readFile() achieve it compared to fs.readFileSync()? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
69How does setImmediate() differ from process.nextTick() in terms of timing and typical use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
70What does it mean that Node.js's I/O is handled by libuv, and how does libuv abstract different operating systems' I/O mechanisms? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
71What is the difference between synchronous and asynchronous versions of the same core Node.js API, using fs.readFile vs fs.readFileSync as an example, and when is the synchronous version actually appropriate? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
72Why does Promise.resolve().then(cb) run before setTimeout(cb, 0), even with a 0ms delay? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
73How would you break a large synchronous task into chunks to keep the UI responsive? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
74What is 'starvation' of the macrotask queue, and how can recursive microtasks cause it? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
75How does async/await map onto the microtask queue under the hood? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
76What is the difference between how Node.js handles I/O-bound concurrency versus CPU-bound work, and why does this distinction shape Node.js's ideal use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
77How would you use async_hooks (the lower-level predecessor to AsyncLocalStorage) to trace the lifecycle of asynchronous resources in Node.js? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
78What is a const member function? C++ › Const CorrectnessC++Const CorrectnessBeginner
79What are the four C++ named casts? C++ › Casting & ConversionsC++Casting & ConversionsBeginner
80What is the difference between implicit and explicit conversions? C++ › Casting & ConversionsC++Casting & ConversionsBeginner
81What are auto-implemented properties, and what does the compiler generate behind the scenes for one? C# › FundamentalsC#FundamentalsBeginner
82What is an interface, and what can (and can't) it contain in its most basic form? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesBeginner
83How would you convert an existing plain attribute into a property later, without breaking any existing code that reads or writes it directly? Python › Descriptors & PropertiesPythonDescriptors & PropertiesBeginner
84What do the built-in @Override, @Deprecated, and @SuppressWarnings annotations do? Java › AnnotationsJavaAnnotationsBeginner
85How do you apply multiple different annotations to the same element, and does their order matter? Java › AnnotationsJavaAnnotationsBeginner
86What is the Singleton pattern, and how would you implement a thread-safe Singleton in Java? Java › Design Patterns in JavaJavaDesign Patterns in JavaBeginner
87What is the Factory Method pattern's simplest form -- a basic static factory returning different subtype instances based on input -- and why might you prefer it over exposing constructors directly? Java › Design Patterns in JavaJavaDesign Patterns in JavaBeginner
88What is an enum in Java, and how does it differ from simply using a set of integer or String constants? Java › EnumsJavaEnumsBeginner
89What is the default behavior of equals() and hashCode() inherited from Object, and why is it usually necessary to override them for value-based classes? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsBeginner
90What is a non-static (inner) class in Java, and how does its relationship to an enclosing instance differ from a regular top-level class? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesBeginner
91How do you instantiate a non-static inner class from OUTSIDE the enclosing class (from a different class entirely), and what is the exact syntax required? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesBeginner
92What is the fundamental difference between an interface and an abstract class in Java, and when would you choose one over the other? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesBeginner
93Can an interface declare instance fields, and if so, what implicit modifiers are automatically applied to any field declared in an interface? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesBeginner
94What is the difference between the == operator and the .equals() method when comparing two custom objects, if the class hasn't overridden equals()? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsBeginner
95How do you name a Java module, and what naming convention is recommended to avoid conflicts with other modules? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Beginner
96What is the difference between an interface and an abstract class in C#, and when should you choose one over the other? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesBeginner
97What is the difference between the synchronous, callback-based, and promise-based variants of Node's fs module methods? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleBeginner
98What is Node.js, and how does it differ fundamentally from running JavaScript in a web browser? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureBeginner
99What is PHP and what makes it particularly well suited for web development? PHP › Basics & TypesPHPBasics & TypesBeginner
100What is a constant in PHP, and how does it differ from a regular variable? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsBeginner
101What is dependency injection, and how does it improve the design of PHP applications compared to creating dependencies directly inside a class? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersBeginner
102What is a service container, and what problem does it solve when an application has many interdependent classes? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersBeginner
103What is a design pattern in software development, and why are they valuable for PHP developers to learn? PHP › Design Patterns in PHPPHPDesign Patterns in PHPBeginner
104What is an Object Relational Mapper, and how do Eloquent and Doctrine represent two different popular approaches within the PHP ecosystem? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMBeginner
105How do you define a basic Eloquent model in Laravel, and how does it automatically map to a corresponding database table? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMBeginner
106What is the difference between a PHP error and a PHP exception? PHP › Error & Exception HandlingPHPError & Exception HandlingBeginner
107What is an interface in PHP, and what purpose does it serve in defining a contract for classes to follow? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesBeginner
108What is an abstract class in PHP, and how does it differ from a regular class and from an interface? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesBeginner
109What are magic methods in PHP, and how do the __construct and __destruct methods represent two of the most commonly used examples? PHP › Magic MethodsPHPMagic MethodsBeginner
110What do the __get and __set magic methods do, and how do they let you customize behavior when accessing properties that do not exist or are inaccessible? PHP › Magic MethodsPHPMagic MethodsBeginner
111What is a namespace in PHP, and what problem does it solve when working with larger applications or third party libraries? PHP › Namespaces & AutoloadingPHPNamespaces & AutoloadingBeginner
112How do you use the use keyword to import a class from a specific namespace, letting you reference it by its short name within a file? PHP › Namespaces & AutoloadingPHPNamespaces & AutoloadingBeginner
113What is PDO in PHP, and what advantages does it provide over older database extensions like mysqli for interacting with a database? PHP › PDO & DatabasesPHPPDO & DatabasesBeginner
114What is the nullsafe operator introduced in PHP 8, and how does it simplify safely accessing a chain of potentially null properties or methods? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Beginner
115What is a trait in PHP, and how does it let you share a set of methods across multiple unrelated classes without using traditional inheritance? PHP › TraitsPHPTraitsBeginner
116Why would a developer choose to use a trait instead of simply duplicating the same method directly into multiple different classes? PHP › TraitsPHPTraitsBeginner
117What are assertions in PHPUnit, and how do commonly used assertions like assertEquals and assertTrue let you verify expected behavior within a test? PHP › Unit Testing with PHPUnitPHPUnit Testing with PHPUnitBeginner
118What is the mutable keyword? C++ › Const CorrectnessC++Const CorrectnessIntermediate
119Why is const correctness important in API design? C++ › Const CorrectnessC++Const CorrectnessIntermediate
120What is dynamic_cast and when do you use it? C++ › Casting & ConversionsC++Casting & ConversionsIntermediate
121What is the explicit keyword and why use it? C++ › Casting & ConversionsC++Casting & ConversionsIntermediate
122How do custom exception classes work in C#, and what's the recommended convention for creating one? C# › Exception HandlingC#Exception HandlingIntermediate
123How do expression-bodied members simplify simple method, property, and constructor definitions? C# › FundamentalsC#FundamentalsIntermediate
124Which operators can be overloaded in C#, and which ones (like && and ||) generally CANNOT be overloaded directly? C# › Indexers & Operator OverloadingC#Indexers & Operator OverloadingIntermediate
125How do you decide between using an interface versus an abstract class for a given design? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesIntermediate
126How does explicit interface implementation work, and when would you use it instead of a normal (implicit) implementation? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesIntermediate
127How do you create a custom exception class, and what's the minimal amount of code needed? Python › Exception HandlingPythonException HandlingIntermediate
128What is Python's LEGB rule for variable scope resolution, and what does each letter stand for? Python › Functions & ScopePythonFunctions & ScopeIntermediate
129What are Java's meta-annotations (@Retention, @Target, @Documented, @Inherited), and what does each control? Java › AnnotationsJavaAnnotationsIntermediate
130How does the Builder pattern solve the "telescoping constructor" problem, and how would you implement it for a class with many optional parameters? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
131What is the Factory Method pattern, and how does it differ from the simpler Static Factory Method idiom (like List.of() or Optional.of())? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
132What is the Adapter pattern, and when would you use it to make an existing class compatible with an interface it wasn't originally designed to implement? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
133What is the Template Method pattern, and how is it used to define the skeleton of an algorithm while letting subclasses customize specific steps? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
134What is the difference between composition and inheritance as ways to reuse code, and why does the design principle "favor composition over inheritance" generally guide modern Java design (including many design patterns themselves)? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
135How would you implement the Composite pattern to treat individual objects and groups of objects uniformly, such as a file system with files and directories? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
136How do you add fields, constructors, and methods to a Java enum, and how would you implement an enum representing planets with mass and radius that calculates surface gravity? Java › EnumsJavaEnumsIntermediate
137Why is it particularly important for a class's equals() and hashCode() to be based on effectively immutable data specifically when that class is used as a JPA/Hibernate entity, and what special considerations apply to entity identity before it's persisted (has a generated ID)? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsIntermediate
138How do you create and throw a custom exception class, and what constructors should a well-designed custom exception typically provide? Java › ExceptionsJavaExceptionsIntermediate
139What are the four kinds of method references in Java (static, instance-bound, instance-unbound, and constructor), and how does the compiler determine which form applies? Java › Functional Interfaces & Method ReferencesJavaFunctional Interfaces & Method ReferencesIntermediate
140What is an unbounded wildcard (List<?>), and when is it more appropriate to use than a bounded generic method with a type parameter <T>? Java › GenericsJavaGenericsIntermediate
141How does a local or anonymous class defined inside a static method or static context differ from one defined inside an instance method, regarding what enclosing state it can access? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesIntermediate
142Can a local class or anonymous class be generic, and how does its own type parameter interact with any generic type parameters already declared on its enclosing class or method? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesIntermediate
143How would you access the enclosing outer class's instance from within a nested inner class when there's a naming conflict (like a shadowed field with the same name), using the OuterClassName.this syntax? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesIntermediate
144How do default methods (introduced in Java 8) let an interface provide a method implementation, and what problem were they specifically introduced to solve? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
145How would you use an abstract class to implement the Template Method pattern, defining a fixed algorithm skeleton with some steps left abstract for subclasses to fill in? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
146Can an interface extend multiple other interfaces simultaneously, and how does this differ from a class's single-inheritance restriction for abstract/concrete classes? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
147What is the purpose of declaring an abstract class with a protected constructor, and how does this pattern communicate the class's intended usage to other developers? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
148How would you implement the 'mixin' pattern in Java using default methods on an interface, letting a class gain reusable behavior without traditional inheritance? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
149How would you use an abstract class's constructor to enforce that certain validation or initialization logic always runs for every subclass, something an interface (lacking constructors entirely) cannot provide? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesIntermediate
150How does Java's operator precedence and associativity determine the evaluation order of a complex expression, and what are some common precedence-related mistakes? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
151What is the difference between a Java text block (introduced as a standard feature in Java 15) and a traditional String literal, and what specific syntax rules govern indentation handling? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
152What is the difference between the ++ (increment) and -- (decrement) operators used in prefix versus postfix position, and what subtle bug can arise from using them within a complex expression? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
153How does Java's short-circuit evaluation for && and || operators differ from the non-short-circuiting & and | operators when applied to boolean operands, and why does this distinction matter for avoiding NullPointerException? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
154What is the difference between an instance initializer block and a static initializer block, and when does each execute relative to a class's constructors? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
155How do the requires and exports directives in a module-info.java file work together to define a module's dependencies and public API surface? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
156What is a qualified export (exports package to specificModule), and when would you use it instead of a plain, unqualified export? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
157What is the Module pattern in Node.js, and how does it enable encapsulation? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsIntermediate
158How does async/await relate to Promises under the hood, and what does 'await' actually do to program execution? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
159What is a 'stalled' job in BullMQ, and what causes it? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesIntermediate
160Why should CPU-intensive media processing like image resizing or video transcoding typically not run directly inside an Express request handler? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingIntermediate
161How do you sort arrays in PHP, and what is the difference between functions like sort, asort, and usort? PHP › Arrays in PHPPHPArrays in PHPIntermediate
162How does passing a variable by reference into a closure's use clause differ from the default pass by value behavior? PHP › Closures & Anonymous FunctionsPHPClosures & Anonymous FunctionsIntermediate
163How does Composer's autoloading feature, particularly PSR-4 autoloading, eliminate the need to manually require every class file in a PHP project? PHP › ComposerPHPComposerIntermediate
164What is the difference between class constants and global constants, and how do you define and access a constant within a class? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsIntermediate
165How does autowiring work in a service container, and how does it use type hints to automatically resolve a class's dependencies? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersIntermediate
166What is the difference between singleton and transient bindings in a service container, and when should each be used? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersIntermediate
167How does the Factory pattern help decouple object creation logic from the code that actually uses those objects? PHP › Design Patterns in PHPPHPDesign Patterns in PHPIntermediate
168How does the Strategy pattern let you define a family of interchangeable algorithms and select one at runtime? PHP › Design Patterns in PHPPHPDesign Patterns in PHPIntermediate
169How does the Observer pattern let objects react automatically to events occurring in another object, and where is this pattern commonly used in PHP applications? PHP › Design Patterns in PHPPHPDesign Patterns in PHPIntermediate
170How do Eloquent relationships like hasMany, belongsTo, and belongsToMany let you define and query connections between different database tables? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMIntermediate
171How does Doctrine's entity manager and Data Mapper approach differ from Eloquent's Active Record approach in terms of how objects are persisted? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMIntermediate
172How does the finally block work alongside try and catch, and what are appropriate use cases for it? PHP › Error & Exception HandlingPHPError & Exception HandlingIntermediate
173How do you create and throw a custom exception class in PHP, and why would you define your own exception types instead of using PHP's built in generic Exception class? PHP › Error & Exception HandlingPHPError & Exception HandlingIntermediate
174How does the static keyword affect a variable declared inside a function, and how does this differ from a regular local variable? PHP › Functions & ScopePHPFunctions & ScopeIntermediate
175What is the IteratorAggregate interface, and how does it provide a simpler alternative to implementing the full Iterator interface directly? PHP › Generators & IteratorsPHPGenerators & IteratorsIntermediate
176How does yield from let a generator delegate part of its iteration to another generator or an array, and why is this useful? PHP › Generators & IteratorsPHPGenerators & IteratorsIntermediate
177How do you decide whether to use an interface or an abstract class when designing a set of related classes that share common behavior? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesIntermediate
178How does PHP's type system use interfaces to enable polymorphism, allowing different concrete classes to be used interchangeably wherever the interface type is expected? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesIntermediate
179Can an interface extend another interface in PHP, and how does this let you build more specific contracts on top of a more general one? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesIntermediate
180How can PHP objects implementing the JsonSerializable interface customize exactly how they are converted into JSON when passed to json_encode? PHP › JSON Handling in PHPPHPJSON Handling in PHPIntermediate
181What does the __call magic method do, and how can it be used to implement dynamic method handling for methods that are not explicitly defined on a class? PHP › Magic MethodsPHPMagic MethodsIntermediate
182How does the __toString magic method let you control how an object is represented when it is used in a context expecting a string, such as being echoed directly? PHP › Magic MethodsPHPMagic MethodsIntermediate
183How do Models in MVC represent both data structure and business logic, and how does this differ from a Model being purely a simple database representation? PHP › MVC Architecture in PHPPHPMVC Architecture in PHPIntermediate
184What is the difference between using a relative namespace reference, a fully qualified name starting with a backslash, and importing a class with use, when referencing a class from within a namespaced file? PHP › Namespaces & AutoloadingPHPNamespaces & AutoloadingIntermediate
185What are PHP attributes introduced in PHP 8, and how do they provide a structured, native alternative to the older convention of using docblock comments for metadata? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Intermediate
186How do constructor property promotion, introduced in PHP 8, reduce boilerplate code when defining a class with several properties initialized directly through its constructor? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Intermediate
187What is Symfony's service container, and how does dependency injection work within a typical Symfony application? PHP › Symfony Framework EssentialsPHPSymfony Framework EssentialsIntermediate
188What happens when a single class uses multiple traits that happen to define a method with the exact same name, and how can this naming conflict be resolved? PHP › TraitsPHPTraitsIntermediate
189Can a trait define abstract methods, and how does this let a trait enforce that any class using it must provide its own specific implementation of certain behavior? PHP › TraitsPHPTraitsIntermediate
190How do trait properties and static properties behave when a trait is used by multiple different classes, and is that state actually shared between them? PHP › TraitsPHPTraitsIntermediate
191What are nullable types and union types in PHP, and how do they let you express that a value could be one of several different possible types? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesIntermediate
192What are readonly properties in PHP, and how do they help you create objects whose internal state cannot be accidentally changed after they are first constructed? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesIntermediate
193How do type declarations improve the effectiveness of static analysis tools and IDE autocompletion when working within a codebase? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesIntermediate
194What is the difference between shallow copy and deep copy in memory terms? C++ › Memory ManagementC++Memory ManagementAdvanced
195What is memory alignment and why does it matter? C++ › Memory ManagementC++Memory ManagementAdvanced
196How are lambdas implemented under the hood? C++ › Lambda ExpressionsC++Lambda ExpressionsAdvanced
197Can constexpr be used with classes and containers? C++ › Constexpr & Compile-TimeC++Constexpr & Compile-TimeAdvanced
198What is the difference between physical and logical constness? C++ › Const CorrectnessC++Const CorrectnessAdvanced
199How do you overload a member function on const? C++ › Const CorrectnessC++Const CorrectnessAdvanced
200What is the difference between static_cast and dynamic_cast for downcasting? C++ › Casting & ConversionsC++Casting & ConversionsAdvanced
201How do you run multiple async iterators concurrently and merge their results? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsAdvanced
202Why can errors thrown inside a setTimeout callback NOT be caught by a surrounding try/catch? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
203Why can setInterval() be a subtle source of memory leaks, and how do you avoid it? JavaScript › Memory Management & Garbage CollectionJavaScriptMemory Management & Garbage CollectionAdvanced
204How does a WebSocket connection differ fundamentally from repeated fetch() requests? JavaScript › Networking: Fetch, XHR, WebSockets & CORSJavaScriptNetworking: Fetch, XHR, WebSockets & CORSAdvanced
205Why can't extension methods be used to add STATIC members, operators, or FIELDS to an existing type, and what are the practical implications of this limitation? C# › Extension MethodsC#Extension MethodsAdvanced
206How does the 'sealed' modifier interact with abstract classes and interface method overrides to control further extensibility? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesAdvanced
207How would you implement inheritance between dataclasses, and what field-ordering rule must be respected across the hierarchy? Python › Dataclasses & NamedTuplesPythonDataclasses & NamedTuplesAdvanced
208How do you write a decorator that works correctly on BOTH regular functions and methods (instance methods) of a class? Python › DecoratorsPythonDecoratorsAdvanced
209How do you write a descriptor that behaves differently when accessed on the CLASS itself versus on an INSTANCE? Python › Descriptors & PropertiesPythonDescriptors & PropertiesAdvanced
210How would you design a custom exception HIERARCHY for an application, and why does this matter for how callers can catch errors at different granularities? Python › Exception HandlingPythonException HandlingAdvanced
211How do repeatable annotations work in Java (using @Repeatable), and what problem do they solve? Java › AnnotationsJavaAnnotationsAdvanced
212How would you implement the Decorator pattern in Java, and how does java.io's InputStream/OutputStream class hierarchy exemplify this pattern in the JDK itself? Java › Design Patterns in JavaJavaDesign Patterns in JavaAdvanced
213How does the getClass() versus instanceof choice in an equals() implementation affect whether subclasses can be considered equal to their superclass instances, and what's the Liskov Substitution Principle tension involved? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsAdvanced
214How would you implement equals()/hashCode() correctly for a class containing a mutable field, and why does using such a class as a HashMap key or HashSet element create a serious risk? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsAdvanced
215How would you correctly implement equals() and hashCode() for a class in an inheritance hierarchy where the superclass itself defines meaningful equality-relevant fields, without breaking the contract when subclasses add their own fields? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsAdvanced
216How would you design a custom exception hierarchy for an application, deciding when to create new exception classes versus reusing existing ones, and what fields/context should a well-designed custom exception carry? Java › ExceptionsJavaExceptionsAdvanced
217How does Java's type inference determine the target type for a lambda expression in an ambiguous overload scenario, and what happens when a lambda could match multiple overloaded methods accepting different functional interfaces? Java › Functional Interfaces & Method ReferencesJavaFunctional Interfaces & Method ReferencesAdvanced
218How do bounded wildcards (? extends T and ? super T) work, and what does the PECS (Producer Extends, Consumer Super) mnemonic mean for choosing between them? Java › GenericsJavaGenericsAdvanced
219How does generic method overload resolution interact with type erasure to sometimes produce a compile error for seemingly valid overloads (like two methods differing only by their generic type parameter)? Java › GenericsJavaGenericsAdvanced
220How would you implement a generic builder pattern with a self-referential generic type parameter (the 'curiously recurring generic pattern', <T extends Builder<T>>) to support fluent method chaining that correctly returns the actual subclass type in an inheritance hierarchy? Java › GenericsJavaGenericsAdvanced
221How do local classes (defined within a method body) and anonymous classes differ in their capabilities and use cases, particularly regarding capturing local variables and reusability? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesAdvanced
222How does the compiler implement inner classes at the bytecode level, and what synthetic elements (like a hidden outer-class reference field and synthetic accessor methods) does it generate to make this work? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesAdvanced
223How would you use an anonymous class to create a one-off subclass with a customized implementation, distinct from anonymous classes implementing an interface, and what specific syntax quirk applies? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesAdvanced
224How would you decide between using a static nested class, a non-static inner class, a local class, an anonymous class, or a lambda expression for a given design scenario, weighing their respective trade-offs? Java › Inner Classes & Anonymous ClassesJavaInner Classes & Anonymous ClassesAdvanced
225How is the 'diamond problem' (a class implementing two interfaces with conflicting default methods) resolved in Java, and what rule determines which default method 'wins' or whether the compiler requires explicit resolution? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesAdvanced
226What are private methods on an interface (introduced in Java 9), and what specific problem do they solve regarding code duplication between multiple default methods? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesAdvanced
227What are design patterns, and how are the Singleton, Adapter, and Strategy patterns typically implemented in C#? C# › Design Patterns in C#C#Design Patterns in C#Advanced
228What is the libuv library, and what specific role does it play inside Node.js? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
229What is the difference between process.nextTick(), setImmediate(), and setTimeout(fn, 0) in terms of execution order? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
230What is the node:diagnostics_channel module, and how does it differ from simply emitting a custom event? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
231What is Domain-Driven Design (DDD), and how do its concepts of entities, value objects, and aggregates apply to a Node.js codebase? Node.js › Architecture & Design PatternsNode.jsArchitecture & Design PatternsAdvanced
232How would you use the 'clinic.js' toolset (clinic doctor, clinic flame) to diagnose a Node.js performance problem? Node.js › Debugging & DiagnosticsNode.jsDebugging & DiagnosticsAdvanced
233How does Node.js achieve high concurrency for I/O-bound workloads despite running JavaScript on a single main thread? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureAdvanced
234How do you merge, combine, and compare arrays in PHP, and what are the subtle differences between array_merge and the plus operator? PHP › Arrays in PHPPHPArrays in PHPAdvanced
235How does binding a closure to a specific object or class using bindTo or Closure::bind allow it to access private properties and methods it otherwise could not? PHP › Closures & Anonymous FunctionsPHPClosures & Anonymous FunctionsAdvanced
236What is the difference between DateTime and DateTimeImmutable, and why might a codebase deliberately prefer the immutable version despite the extra verbosity? PHP › Date & Time HandlingPHPDate & Time HandlingAdvanced
237How does the dependency inversion principle relate to dependency injection, and how does designing around abstractions rather than concrete classes improve long term maintainability? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersAdvanced
238How can the SOLID principles guide the appropriate application of design patterns, and what risks arise from applying patterns without genuinely understanding the underlying problem they solve? PHP › Design Patterns in PHPPHPDesign Patterns in PHPAdvanced
239What are the limitations of PHP generators compared to regular arrays, particularly around rewinding and multiple iteration passes? PHP › Generators & IteratorsPHPGenerators & IteratorsAdvanced
240How does the Liskov Substitution Principle relate to properly designing interfaces and abstract classes so that subclasses can genuinely be substituted for their parent type without breaking expected behavior? PHP › Interfaces & Abstract ClassesPHPInterfaces & Abstract ClassesAdvanced
241How can __clone be used to customize what happens when an object is duplicated using PHP's clone keyword, particularly for handling deep copies of nested objects? PHP › Magic MethodsPHPMagic MethodsAdvanced
242How do union types and intersection types in PHP 8 provide more expressive and precise type declarations than were previously possible? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Advanced
243How can PHP 8's readonly properties, enums, and first class callable syntax be combined together to build more robust, immutable, and expressive domain models compared to earlier PHP versions? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Advanced
244How does Symfony's security component handle authentication and authorization, including the concept of voters for fine grained access control decisions? PHP › Symfony Framework EssentialsPHPSymfony Framework EssentialsAdvanced
245What are some common pitfalls or downsides of overusing traits extensively throughout a large codebase, particularly regarding code readability and maintainability? PHP › TraitsPHPTraitsAdvanced
246What are PHP 8's enums, and how do they provide a more type safe alternative to using plain class constants for representing a fixed set of related values? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesAdvanced
247How does PHP's type variance, specifically covariance and contravariance, affect how return types and parameter types can be safely changed when overriding a method in a child class? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesAdvanced