All fields

“Match” in Information Technology

74 questions across 12 technologies.

Information Technology

74 questions in 12 technologies

#QuestionTechnologyTopicLevel
1What is the match expression introduced in PHP 8, and how does it improve upon the traditional switch statement? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Beginner
2How does switch pattern matching improve code? C# › Records & Pattern MatchingC#Records & Pattern MatchingIntermediate
3How would you use pattern matching (switch expressions) with an enum, including exhaustiveness warnings from the compiler? C# › Enums & FlagsC#Enums & FlagsAdvanced
4How would you design an enum-based state machine using pattern matching to enforce valid state transitions at compile time or runtime? C# › Enums & FlagsC#Enums & FlagsAdvanced
5How does pattern matching in an 'is' expression differ from a traditional type check with 'as' and a null check, and what does it enable? C# › FundamentalsC#FundamentalsAdvanced
6How would you implement the Visitor pattern in Java to add new operations to an existing class hierarchy without modifying those classes, and how do Java's sealed classes and pattern matching (switch expressions) provide a modern alternative? Java › Design Patterns in JavaJavaDesign Patterns in JavaAdvanced
7How does a try/catch block work in C#, and what happens if no matching catch clause exists? C# › Exception HandlingC#Exception HandlingBeginner
8How does a try/except block work, and what happens if no matching except clause exists? Python › Exception HandlingPythonException HandlingBeginner
9What is a regular expression, and how do you use PHP's preg_match function to check whether a string matches a specific pattern? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPBeginner
10What do common regular expression metacharacters like the dot, asterisk, and plus sign mean, and how are they used to build flexible matching patterns? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPBeginner
11What are Cupertino widgets in Flutter, and how do they let you build a user interface that closely matches Apple's own native iOS design language and visual style? Flutter › Flutter Cupertino (iOS Style) WidgetsFlutterFlutter Cupertino (iOS Style) WidgetsBeginner
12What is a Hero animation in Flutter, and how does it create that genuinely popular smooth visual effect of a specific widget appearing to fly smoothly from one screen directly across to a corresponding matching widget on an entirely different screen? Flutter › Hero Animations & Page TransitionsFlutterHero Animations & Page TransitionsBeginner
13How does the tag property on a Hero widget genuinely and uniquely identify exactly which specific widget on one screen properly corresponds to a genuinely matching widget on an entirely different destination screen? Flutter › Hero Animations & Page TransitionsFlutterHero Animations & Page TransitionsBeginner
14What are matchers in Flutter testing, such as equals, isTrue, and throwsA, and how do they let you express several genuinely different kinds of specific assertions within a given test? Flutter › Unit Testing in FlutterFlutterUnit Testing in FlutterBeginner
15How would you use a template literal type to validate that a string matches a specific structured pattern, like a hex color code? TypeScript › Template Literal TypesTypeScriptTemplate Literal TypesIntermediate
16How do you validate that an API's actual behavior matches its published OpenAPI specification, preventing documentation drift? ASP.NET Core › API Documentation with Swagger/OpenAPIASP.NET CoreAPI Documentation with Swagger/OpenAPIIntermediate
17How do route constraints (like {id:int} or {id:guid}) restrict which requests match a given route, and why are they useful? ASP.NET Core › Endpoint Metadata, Route Constraints & TemplatesASP.NET CoreEndpoint Metadata, Route Constraints & TemplatesIntermediate
18How does route template precedence work when multiple routes could potentially match the same incoming URL? ASP.NET Core › Endpoint Metadata, Route Constraints & TemplatesASP.NET CoreEndpoint Metadata, Route Constraints & TemplatesIntermediate
19What is the valueOf() method on an enum, and what happens when you pass a name that doesn't match any declared constant? Java › EnumsJavaEnumsIntermediate
20How would you implement a global 'not found' (404) handler in Express for any route that doesn't match a defined endpoint? Node.js › Error HandlingNode.jsError HandlingIntermediate
21What is hydration mismatch, and what commonly causes this error in a React app using server rendering? React › Static Site Generation (SSG) & HydrationReactStatic Site Generation (SSG) & HydrationIntermediate
22What causes a hydration mismatch error, and how can you fix one? Next.js › Client Components & HydrationNext.jsClient Components & HydrationIntermediate
23How do you find rows that exist in one table but have no matching row in another table using a join? SQL Server › JoinsSQL ServerJoinsIntermediate
24How do you search for keys matching a specific pattern in Redis, and why is the KEYS command generally discouraged in production? Redis › Redis CLI & Basic CommandsRedisRedis CLI & Basic CommandsIntermediate
25How does preg_replace let you find and replace text matching a regular expression pattern, and how do capture groups let you reuse parts of the matched text in the replacement? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPIntermediate
26What are named capture groups in a regular expression, and how do they improve the readability of extracted match data compared to using only numbered groups? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPIntermediate
27How do route parameters and route constraints let you capture dynamic segments of a URL while also restricting what values are actually considered a valid match? PHP › Routing & MiddlewarePHPRouting & MiddlewareIntermediate
28How would you write a generic 'pick' utility function that mimics the built-in Pick<T, K> utility type, but as a runtime function with matching compile-time types? TypeScript › GenericsTypeScriptGenericsAdvanced
29What common runtime-vs-type mismatch bugs does migrating to TypeScript often surface in previously 'working' JavaScript code? TypeScript › Migrating JavaScript to TypeScriptTypeScriptMigrating JavaScript to TypeScriptAdvanced
30How would you write a simple reflection-based object mapper that copies matching property values from one object to another of a different type? C# › Attributes & ReflectionC#Attributes & ReflectionAdvanced
31How would you implement a custom EventHandler using async/await, avoiding the common 'async void' anti-pattern while still matching the standard EventHandler delegate signature? C# › Delegates, Events & LambdasC#Delegates, Events & LambdasAdvanced
32How would you configure CORS to allow any subdomain of a known domain (like *.mycompany.com) using SetIsOriginAllowed with custom matching logic? ASP.NET Core › CORS (Cross-Origin Resource Sharing)ASP.NET CoreCORS (Cross-Origin Resource Sharing)Advanced
33How would you debug why a specific request isn't matching the route you expect it to, using ASP.NET Core's routing diagnostics? ASP.NET Core › Endpoint Metadata, Route Constraints & TemplatesASP.NET CoreEndpoint Metadata, Route Constraints & TemplatesAdvanced
34How 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
35What performance considerations should you keep in mind when writing middleware, since it runs on every matched request? Next.js › MiddlewareNext.jsMiddlewareAdvanced
36How should an API validate the structure and types of incoming JSON data to ensure it matches the expected schema before processing it further? PHP › JSON Handling in PHPPHPJSON Handling in PHPAdvanced
37How can a custom routing system be designed to support efficient route matching performance even as an application grows to have hundreds or thousands of defined routes? PHP › Routing & MiddlewarePHPRouting & MiddlewareAdvanced
38How does pattern matching, introduced through Dart's more modern switch expressions and destructuring, let you write more concise and expressive code when handling different possible shapes of data? Flutter › Dart Language Basics & SyntaxFlutterDart Language Basics & SyntaxAdvanced
39How can you properly implement Pigeon, Flutter's own official type safe code generation tool, to eliminate genuinely error prone manual string based method names and reduce the genuine risk of a mismatch between your Dart and native platform channel code? Flutter › Platform Channels (Native Android & iOS Integration)FlutterPlatform Channels (Native Android & iOS Integration)Advanced
40What is a record and how does it differ from a class? C# › Records & Pattern MatchingC#Records & Pattern MatchingBeginner
41What does the with expression do? C# › Records & Pattern MatchingC#Records & Pattern MatchingBeginner
42What are records in C#, and how do they differ from classes and structs? C# › Records & Pattern MatchingC#Records & Pattern MatchingBeginner
43What 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
44What is a record struct and when would you use it? C# › Records & Pattern MatchingC#Records & Pattern MatchingIntermediate
45What are enums introduced in PHP 8.1, and how do backed enums differ from pure enums in terms of the values they can represent? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Intermediate
46What 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
47How 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
48What are property and positional patterns useful for? C# › Records & Pattern MatchingC#Records & Pattern MatchingAdvanced
49When should you NOT use records? C# › Records & Pattern MatchingC#Records & Pattern MatchingAdvanced
50How 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
51How 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
52What is an abstract class, and how does it differ from a fully concrete base class? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesBeginner
53How do default interface methods (C# 8+) let an interface provide implementation, and what backward-compatibility problem do they solve? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesIntermediate
54How do required members (C# 11's 'required' keyword) enforce that certain properties MUST be set during object initialization? C# › Modern C# Features (Global Usings, File-Scoped Namespaces, Top-Level Statements)C#Modern C# Features (Global Usings, File-Scoped Namespaces, Top-Level Statements)Intermediate
55How do you correctly use an enum as a switch statement/expression's target, and what changed with the introduction of arrow-style switch expressions (Java 14+) regarding exhaustiveness and fall-through? Java › EnumsJavaEnumsIntermediate
56What is the difference between a compile-time constant expression and a regular final variable, and why does this distinction matter for switch statement case labels and certain compiler optimizations? Java › Java Fundamentals: Syntax, Data Types & OperatorsJavaJava Fundamentals: Syntax, Data Types & OperatorsIntermediate
57What is array destructuring in PHP, and how does the list function or short array syntax simplify extracting values from an array? PHP › Arrays in PHPPHPArrays in PHPIntermediate
58What are arrow functions introduced in PHP 7.4, and how do they simplify writing short closures compared to traditional anonymous functions? PHP › Closures & Anonymous FunctionsPHPClosures & Anonymous FunctionsIntermediate
59What 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
60How 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
61What are named arguments introduced in PHP 8, and how do they improve the readability of function calls with many parameters? PHP › Functions & ScopePHPFunctions & ScopeIntermediate
62How does the readonly property modifier introduced in PHP 8.1 help enforce immutability for specific class properties? PHP › OOPPHPOOPIntermediate
63How would you implement the CQRS (Command Query Responsibility Segregation) pattern's basic structure in a C# application using MediatR-style handlers? C# › Design Patterns in C#C#Design Patterns in C#Advanced
64How would you implement the Builder pattern using method chaining (a fluent API) to construct a complex object step by step? C# › Design Patterns in C#C#Design Patterns in C#Advanced
65Why is it critical that GetHashCode() only depend on IMMUTABLE fields, and what bug occurs if you violate this rule? C# › Equality: Equals, GetHashCode & IEquatableC#Equality: Equals, GetHashCode & IEquatableAdvanced
66How does record type equality work by default, and how does it differ fundamentally from a regular class's default equality? C# › Equality: Equals, GetHashCode & IEquatableC#Equality: Equals, GetHashCode & IEquatableAdvanced
67How do C# 12's primary constructors on regular classes (not just records) change how you write simple constructor-and-field boilerplate? C# › FundamentalsC#FundamentalsAdvanced
68How would you design a class hierarchy combining an abstract base class WITH multiple interfaces to model both shared implementation AND multiple independent capabilities? C# › Interfaces & Abstract ClassesC#Interfaces & Abstract ClassesAdvanced
69How would you use an EnumMap combined with a switch expression to implement a state machine, and what compile-time safety benefits does an exhaustive switch over an enum provide? Java › EnumsJavaEnumsAdvanced
70How would you design a sealed interface (Java 17+) to restrict which classes are permitted to implement it, and what benefit does this provide over a traditional open (unrestricted) interface for exhaustiveness checking? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesAdvanced
71How do first class callable syntax and higher order functions in modern PHP support building flexible, composable, functional style code? PHP › Closures & Anonymous FunctionsPHPClosures & Anonymous FunctionsAdvanced
72How do enums, introduced in PHP 8.1, provide a more type safe alternative to using class constants for representing a fixed set of related values? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsAdvanced
73How do function type declarations and return type declarations improve code reliability, and how does PHP handle nullable and union types in function signatures? PHP › Functions & ScopePHPFunctions & ScopeAdvanced
74What 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