Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: Unit testing involves testing the smallest parts of an application (units) independently to ensure they work correctly. It is important because it helps detect bugs early, improves code quality, supports re…
Short answer: Unit Testing: Tests individual units in isolation. Integration Testing: Tests interaction between multiple components or systems. Functional Testing: Tests end-to-end functionality from the user's perspecti…
Short answer: Assertions verify that the actual outcome of a test matches the expected result, determining if a test passes or fails. Real-world example (ShopNest) Arrange a cart with 2 items → Act Checkout() → Assert to…
Short answer: Code coverage measures the percentage of code executed by tests. It helps identify untested parts but doesn’t guarantee test quality. High coverage with meaningful tests improves confidence in code correctn…
Short answer: xUnit is a free, open-source unit testing framework for .NET, designed by the original authors of NUnit. It’s popular because it supports modern testing practices, is lightweight, extensible, integrates wel…
Short answer: public class CalculatorTests { [Fact] public void Add_ReturnsSum() { var calculator = new Calculator(); var result = calculator.Add(2, 3); Assert.Equal(5, result); } } Example code public class CalculatorTe…
Short answer: NUnit is a popular open-source unit testing framework for .NET. It allows developers to write and run automated tests by marking test methods with attributes. NUnit discovers and executes these tests, verif…
Short answer: [SetUp] runs code before each test method to prepare test environment. [TearDown] runs code after each test to clean up resources or reset state. Real-world example (ShopNest) ShopNest unit tests cover pric…
Short answer: [Test] marks a standard test method without parameters. [TestCase] provides inline parameter values to run the test multiple times with different inputs. Real-world example (ShopNest) ShopNest unit tests co…
Short answer: MSTest is Microsoft's official unit testing framework for .NET. It’s tightly integrated with Visual Studio and is a good choice for teams using Microsoft tooling and wanting a straightforward, supported tes…
Short answer: Mocking is creating fake objects that simulate the behavior of real dependencies. It’s important because it isolates the unit under test, avoids reliance on external systems, improves test speed, and allows…
Short answer: Moq is a popular, open-source mocking library for .NET that enables developers to create mock objects, set expectations, and verify interactions in unit tests, helping isolate dependencies easily. Real-worl…
Short answer: TDD is a software development approach where you write tests before writing the actual code. It follows a short, repetitive cycle of writing a failing test, implementing code to pass the test, and then refa…
Short answer: TDD writes tests before code, driving design and implementation. Traditional testing usually happens after coding, as a verification step. TDD promotes continuous testing and refactoring, while traditional…
Short answer: Integration testing verifies that multiple components or systems work together correctly, unlike unit testing which tests individual units in isolation. It focuses on interactions between modules, databases…
Short answer: CHAR: A fixed-length string data type. It always reserves the same amount of space regardless of the string's length. Use case: When the length of the string is known and consistent. VARCHAR: A variable-len…
Short answer: The LIMIT clause is used to specify the number of records returned by a SELECT query. It is commonly used to restrict the number of rows, especially for pagination. Example code SELECT * FROM Employees LIMI…
Short answer: NULL represents the absence of a value in a column. It is not the same as an empty string or zero. Handling NULL: To check for NULL, use IS NULL or IS NOT NULL. To handle NULL in queries, use COALESCE() (re…
Short answer: And does not log individual row deletions. Explain a bit more Cannot be rolled back (in most databases). And does not log individual row deletions. Cannot be rolled back (in most databases). nd does not log…
Short answer: TRUNCATE: Deletes all rows in a table, but the table structure remains. It is faster and does not log individual row deletions. Cannot be rolled back (in most databases). Resets auto-increment counters. DEL…
Short answer: An Index is a database object that speeds up the retrieval of rows from a table by creating a data structure (often a B-tree). Indexes improve the performance of SELECT queries but can slow down INSERT, UPD…
Short answer: Start with gratitude, then move to value: explain why you are excited about the role and why your impact justifies a better package. A post-offer negotiation works best when your ask is anchored in market d…
Short answer: A reasonable increase is one that reflects both market rate and your capability uplift. The right number depends on role criticality, tech stack rarity, and whether you are moving from support to core produ…
Short answer: Freshers can negotiate, but the strategy is different: prove readiness, not tenure. If you have internships, strong projects, or competition wins, use them to justify a modest but meaningful revision. Focus…
Short answer: Email negotiation should be crisp, evidence-led, and respectful of timeline. A strong mail includes appreciation, rationale, expected range, and a clear next step. Keep it short enough to read in one screen…
Unit Testing C# Programming Tutorial · Testing
Short answer: Unit testing involves testing the smallest parts of an application (units) independently to ensure they work correctly. It is important because it helps detect bugs early, improves code quality, supports refactoring, and provides documentation for expected behavior.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: Unit Testing: Tests individual units in isolation. Integration Testing: Tests interaction between multiple components or systems. Functional Testing: Tests end-to-end functionality from the user's perspective.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: Assertions verify that the actual outcome of a test matches the expected result, determining if a test passes or fails.
Arrange a cart with 2 items → Act Checkout() → Assert total and that payment was called once.
Unit Testing C# Programming Tutorial · Testing
Short answer: Code coverage measures the percentage of code executed by tests. It helps identify untested parts but doesn’t guarantee test quality. High coverage with meaningful tests improves confidence in code correctness. xUnit Framework
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: xUnit is a free, open-source unit testing framework for .NET, designed by the original authors of NUnit. It’s popular because it supports modern testing practices, is lightweight, extensible, integrates well with .NET Core and Visual Studio, and encourages clean, maintainable test code.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: public class CalculatorTests { [Fact] public void Add_ReturnsSum() { var calculator = new Calculator(); var result = calculator.Add(2, 3); Assert.Equal(5, result); } }
public class CalculatorTests
{ [Fact] public void Add_ReturnsSum()
{
var calculator = new Calculator();
var result = calculator.Add(2, 3); Assert.Equal(5, result); }
}
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: NUnit is a popular open-source unit testing framework for .NET. It allows developers to write and run automated tests by marking test methods with attributes. NUnit discovers and executes these tests, verifying that the code behaves as expected.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: [SetUp] runs code before each test method to prepare test environment. [TearDown] runs code after each test to clean up resources or reset state.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: [Test] marks a standard test method without parameters. [TestCase] provides inline parameter values to run the test multiple times with different inputs.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: MSTest is Microsoft's official unit testing framework for .NET. It’s tightly integrated with Visual Studio and is a good choice for teams using Microsoft tooling and wanting a straightforward, supported testing solution without external dependencies.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: Mocking is creating fake objects that simulate the behavior of real dependencies. It’s important because it isolates the unit under test, avoids reliance on external systems, improves test speed, and allows testing specific scenarios and edge cases.
Unit Testing C# Programming Tutorial · Testing
Short answer: Moq is a popular, open-source mocking library for .NET that enables developers to create mock objects, set expectations, and verify interactions in unit tests, helping isolate dependencies easily.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: TDD is a software development approach where you write tests before writing the actual code. It follows a short, repetitive cycle of writing a failing test, implementing code to pass the test, and then refactoring.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: TDD writes tests before code, driving design and implementation. Traditional testing usually happens after coding, as a verification step. TDD promotes continuous testing and refactoring, while traditional testing may be more manual or batch-driven. Integration Testing
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
Unit Testing C# Programming Tutorial · Testing
Short answer: Integration testing verifies that multiple components or systems work together correctly, unlike unit testing which tests individual units in isolation. It focuses on interactions between modules, databases, APIs, or external services.
Integration testing verifies that multiple components or systems work together correctly, unlike unit testing which tests individual units in isolation. It focuses on interactions between modules, databases, APIs, or external services.
ShopNest unit tests cover pricing and discount rules so a bad coupon change fails in CI before customers see it.
SQL & Databases SQL Server Tutorial · SQL
Short answer: CHAR: A fixed-length string data type. It always reserves the same amount of space regardless of the string's length. Use case: When the length of the string is known and consistent. VARCHAR: A variable-length string data type. It only uses as much space as needed to store the string. Use case: When the string length can vary.
CREATE TABLE Example ( fixed_char CHAR(10), variable_char VARCHAR(10) );
SQL & Databases SQL Server Tutorial · SQL
Short answer: The LIMIT clause is used to specify the number of records returned by a SELECT query. It is commonly used to restrict the number of rows, especially for pagination.
SELECT * FROM Employees LIMIT 5; This will return only the first 5 rows from the Employees table.
ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.
SQL & Databases SQL Server Tutorial · SQL
Short answer: NULL represents the absence of a value in a column. It is not the same as an empty string or zero. Handling NULL: To check for NULL, use IS NULL or IS NOT NULL. To handle NULL in queries, use COALESCE() (returns the first non-NULL value) or IFNULL().
SELECT Name, IFNULL(Salary, 0) FROM Employees;
ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.
SQL & Databases SQL Server Tutorial · SQL
Short answer: And does not log individual row deletions.
Cannot be rolled back (in most databases). And does not log individual row deletions. Cannot be rolled back (in most databases). nd does not log individual row deletions. Cannot be rolled back (in most databases). Resets auto-increment counters. DELETE: Deletes rows based on a condition, and can be rolled back (if using transactions). Slower compared to TRUNCATE. DELETE FROM Employees WHERE Age < 18; -- Deletes only specific rows TRUNCATE TABLE Employees; -- Deletes all rows nd does not log individual row deletions. Cannot be rolled back (in most databases). Resets auto-increment counters. DELETE: Deletes rows based on a condition, and can be rolled back (if using transactions). Slower compared to TRUNCATE.
DELETE FROM Employees WHERE Age < 18; -- Deletes only specific rows TRUNCATE TABLE Employees; -- Deletes all rows
ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.
SQL & Databases SQL Server Tutorial · SQL
Short answer: TRUNCATE: Deletes all rows in a table, but the table structure remains. It is faster and does not log individual row deletions. Cannot be rolled back (in most databases). Resets auto-increment counters. DELETE: Deletes rows based on a condition, and can be rolled back (if using transactions). Slower compared to TRUNCATE.
DELETE FROM Employees WHERE Age < 18; -- Deletes only specific rows TRUNCATE TABLE Employees; -- Deletes all rows
ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.
SQL & Databases SQL Server Tutorial · SQL
Short answer: An Index is a database object that speeds up the retrieval of rows from a table by creating a data structure (often a B-tree). Indexes improve the performance of SELECT queries but can slow down INSERT, UPDATE, and DELETE operations.
CREATE INDEX idx_employee_name ON Employees(Name);
ShopNest adds an index on Orders(CustomerId, CreatedAt) because “my recent orders” is queried constantly.
Salary Negotiation Career & HR Interview Guide · Salary Negotiation
Short answer: Start with gratitude, then move to value: explain why you are excited about the role and why your impact justifies a better package. A post-offer negotiation works best when your ask is anchored in market data and your recent outcomes. Keep the tone collaborative so HR sees you as a long-term hire, not a short-term transaction.
This is easiest to do in the first 24 to 48 hours after offer release, before background checks and onboarding steps begin.
Priya received an SDE-2 offer from Flipkart while working at TCS. She thanked the recruiter first, then shared numbers showing she reduced production incidents by 38% and cut API latency by 120 ms in her current role. Rahul, now at Razorpay, helped her present a range rather than a single demand. Flipkart revised her CTC upward and improved the fixed component, and Priya accepted confidently.
Ask once, ask clearly, and support it with proof.
Salary Negotiation Career & HR Interview Guide · Salary Negotiation
Short answer: A reasonable increase is one that reflects both market rate and your capability uplift. The right number depends on role criticality, tech stack rarity, and whether you are moving from support to core product ownership. Evaluate total compensation quality, not just percentage hike.
Karthik worked in support engineering at Infosys and got an SRE role interview at Swiggy. His first instinct was to ask for 30%, but the role required incident leadership and automation ownership across teams. Neha from PhonePe helped him benchmark similar roles in Bengaluru and identify a better range. He negotiated a 47% increase with stronger fixed pay and still met company budget expectations.
Reasonable means market-aligned and sustainable for both sides.
Salary Negotiation Career & HR Interview Guide · Salary Negotiation
Short answer: Freshers can negotiate, but the strategy is different: prove readiness, not tenure. If you have internships, strong projects, or competition wins, use them to justify a modest but meaningful revision. Focus on fixed pay and learning runway rather than only CTC headline.
Ananya, a final-year student from Pune, got an offer from Infosys and another from a product startup in Chennai. She showed her internship results, including a dashboard feature adopted by 2,000 internal users. Vikram from Razorpay suggested she ask for a better fixed component and an early performance review. The startup increased fixed pay and offered a 6-month review milestone, which she accepted.
As a fresher, negotiate with proof and humility.
Salary Negotiation Career & HR Interview Guide · Salary Negotiation
Short answer: Email negotiation should be crisp, evidence-led, and respectful of timeline. A strong mail includes appreciation, rationale, expected range, and a clear next step. Keep it short enough to read in one screen but specific enough to approve.
Neha got an offer from Infosys while finishing interviews with two other firms. Instead of negotiating on chat, she sent a concise email with three impact metrics from her previous role at CRED and a realistic range. Arjun from Razorpay helped her remove emotional phrases and keep the message business-focused. HR replied the same day, revised the fixed pay, and closed the offer quickly.
Hi [HR Name], Thank you for sharing the offer. I am genuinely excited about this opportunity and would like to discuss compensation once before final acceptance. Based on role scope and my recent outcomes in [domain] (for example: [metric 1], [metric 2], [metric 3]), I am targeting a CTC range of [X]-[Y], with preference for a stronger fixed component. If feasible, please let me know whether we can review this. I am available for a quick call today/tomorrow. Regards, [Your Name]
One clear email beats five vague follow-ups.