Basic Software Engineer’s (Backend) Interview Guide (My Notes Compilation Part 1)

Most of the time, giving interviews is one of the most fascinating and risky task. I applied to around 20 firms for my first job as a software engineer in Karachi, Pakistan, and the majority of them ultimately rejected me (may be I was not that prepared or I did not have luck).

Uncertainty when looking for job is tense, boring, and adventure-filled all at once. While changing jobs is a completely different scenario, in Pakistan, being hired as a new software engineer is a significant accomplishment. Changing jobs is simpler than looking for a new position. You apply to every opportunity you see and frequently come close to failing.

We are subject to peer pressure and family pressure. Everyone constantly inquires about our job and salary. I’ve created this beginner’s guide in order for people ( Freshers and Professionals) to read it before going to any important software interview.

So lets get started:

All Topics List:

  1. OOP
  2. Abstraction vs Encapsulation
  3. Interfaces
  4. Partial Classes
  5. Stack vs Heap
  6. Generics
  7. .Net Core vs .Net Framework
  8. Dependency Injection
  9. Load Balancing
  10. Normalization in Database

Lets Get Started:

1.OOP

    Object Oriented Programming is a paradigm of computer science specially programming.

    It means creating object that contains both data and methods. It has 4 pillars.

    a) Encapsulation

    • Bind Code and data together.
    • Keep them safe from outside world
    • Protective container
    • Access modifiers are used for this purpose.
    • Wrapping up data member and method into single unit.

    b) Inheritance

    • When a class includes property of another class
    • Object reusability/Child-parent relationship
    • Examples: Child-Parent, Phone-Samsung, Phone-iPhone etc

    c) Polymorphism

    • One name, many forms
    • One function behaves in different forms
    • Many forms of single object
    • Ex: Person can be son, employee or father at same time.

    d) Abstraction

    • To represent essential features without representing background details
    • Showing only what, not how.
    • Provide relevant information
    • Class consists of common data
    • Must be inherited
    • Incomplete information in Abstract Class.

    2. Abstraction vs Encapsulation

    • Abstraction solves problem at design level while encapsulation solves problem at Implementation level.
    • Abstract shows relevant information but encapsulation protects and hides internal details.
    • Abstraction can be achieved through interface and abstract classes.
    • Encapsulation can be achieved through class.

    3. Interfaces

    • Interface are used to achieve abstraction
    • These are complete abstract class which can only contains empty methods and properties
    • Must start with I. (IAnimal/ICar)
    • By default, Members are all public and abstract.
    • No object creation
    • No constructor
    • Used for Security reasons and multiple inheritance.

    4. Partial Classes

    • Breaking Single Class into multiple files for faster development but compilation into single class is achieved.
    • Must be within same assembly and namespace
    • Same accessibility
    • Allows to use nested partial types
    • Main advantage of partial classes is multiple developers can work simultaneously.
    • UI and Backend can split into multiple partial classes.
    • Final Advantage is that We can compress large class into smaller ones.

    5. Stack vs Heap

    • Stack is a array of memory meanwhile Heap is an area of memory.
    • Stacks works LIFO while Heap works anywhere add/remove.
    • Stacks keeps value types while Heap stores Reference types
    • Stack has static memory allocation while heap has dynamic memory allocation
    • Variable size in stack is fixed while it can be resized in heap.
    • Stack is faster than heap.
    • Stack is only visible to owner thread and heap is visible to all threads.
    • Stack stores value and references to objects while heap stores objects only.
    • Garbage collector only works at heap.

    6. Generics

    • Generics means general form , not specific to particular form
    • Type parameter is placeholder for particular type specified when creating instance of generic type
    • It increases reusability
    • Its type safe
    • Performance is better because it removes possibilities of boxing and unboxing.
    • When compiler encounters constructor for class or function, it generates code to handle that specific data type.
    • Helpful with reflection

    7. .NET Core vs .NET Framework

    • .NET Core is open source while .NET Framework’s certain components are open source
    • .NET core is cross platform while .NET Framework works for windows only.
    • Microservices are supported in .NET Core.
    • There is no WCF Support in .NET Core
    • Performance wise .NET Core is much faster than .NET Framework.

    8. Dependency Injection

    • This is software design pattern which allows us to develop loosely coupled software systems
    • It removes tight coupling
    • It helps us to manage future changes and other complexity in our software
    • Make code readable and maintainable.
    • It can be acheived through constuctor DI, Property/Setter Injection or Method dependency.

    9. Load Balancing

    • Load balancing means efficiently distributing incoming network traffic across group of backend server/server farm/pool.
    • Acts as traffic cop
    • It maximzes speed
    • When one server is down, Load Balancer sends requests to other servers.
    • It ensures high availability and reliability.
    • It provides flexibility to add or remove servers dynamically/statically.
    • Some algorithms used as Round Robin, Least time, Least connections and Random with 2 choices.

    10. Normalization in Database

    • 1st Normal Form or 1NF means having atomic values and unique values in table
    • 2nd Normal Form or 2NF means no partial dependency in table.
    • 3rd Normal Form or 3NF means no transitive dependency in table.
    • BCNF means table is already in 3NF form and no further division is possible in table.

    That’s It for the Post.

    This is probably sufficient for one post; I’ll continue to create articles on interview preparation for software engineers and spread my knowledge and experience throughout the world.

    About the Author:

    As you are aware, my name is Saif Khan Hakro. I completed my BS in Computer Science at FAST NUCES Karachi between 2013 and 2017 with a 3.49 grade point average. I have been a software developer in the software sector since 2017 with a focus on (.NET Domain). I enjoy creating essays and reading books. These articles were created to make learning simple for professionals and students.

    Scroll to Top