Skip to content

Instantly share code, notes, and snippets.

@ddieppa
Last active October 3, 2022 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddieppa/a136f03faaff0d1d555f33963436b3ff to your computer and use it in GitHub Desktop.
Save ddieppa/a136f03faaff0d1d555f33963436b3ff to your computer and use it in GitHub Desktop.
Job Interviews
published: true

Interview questions

C# Questions

  • Overloading vs Overriding
    • Overloading: Is the ability to have multiple methods within the same class with the same name, but with different parameters. Each of these methods has their own implementation as well, meaning that they can behave differently depending on what is passed in.
    • Overriding: Is the ability to redefine the implementation of a method in a class that inherits from a parent class. When a method is overridden, the name and the parameters stay the same, but the implementation that gets called depends on the type of the object that's calling it.
  • DI(Dependency Injection) what is and what solve?
    • DI: Is a software design pattern, which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies. Is a technique whereby one object (or static method) supplies the dependencies of another object
    • Solve: Is a key part of building loosely coupled applications, since implementation details can be written to depend on and implement higher-level abstractions, rather than the other way around
  • What is SOLID
    • S: Single Responsibility
      • States that each class, module, or function in your program should only do one job
    • O: Open Close
      • Software entities should be open for extension, but closed for modification.
    • L: Liskov Substitution
      • Any class must be directly replaceable by any of its subclasses without error
    • I: Interface Segregation
      • Many client-specific interfaces are better than one general-purpose interface
    • D: Dependency Inversion
      • High-level modules should not depend on low-level modules. Instead, both should depend on abstractions
  • Difference between Abstract class and Interface
  • Reflection
    • pros
    • cons
  • what http response contains
  • http code 200 and 500, what they are
  • what I have implemented using Rest API
  • what is sql injection and how to avoid it (validations)
  • 4 important http verbs
    • POST, GET, PUT, DELETE
  • when you think of microservices, what comes to mind?
  • what is most important thing when designing database (what are main concepts?)
    • Database design basics
    • Determine the purpose of your database: This helps prepare you for the remaining steps.
    • Find and organize the information required: Gather all of the types of information you might want to record in the database, such as product name and order number.
    • Divide the information into tables: Divide your information items into major entities or subjects, such as Products or Orders. Each subject then becomes a table.
    • Turn information items into columns: Decide what information you want to store in each table. Each item becomes a field, and is displayed as a column in the table. For example, an Employees table might include fields such as Last Name and Hire Date.
    • Specify primary keys: Choose each table’s primary key. The primary key is a column that is used to uniquely identify each row. An example might be Product ID or Order ID.
    • Set up the table relationships: Look at each table and decide how the data in one table is related to the data in other tables. Add fields to tables or create new tables to clarify the relationships, as necessary.
    • Refine your design: Analyze your design for errors. Create the tables and add a few records of sample data. See if you can get the results you want from your tables. Make adjustments to the design, as needed.
    • Apply the normalization rules: Apply the data normalization rules to see if your tables are structured correctly. Make adjustments to the tables, as needed.
  • what are main concepts of rest api?
  • how do you secure your api?
  • how do you test your apis?
  • what is main difference between abstract class and interface?
    • Abstract: Use it when wanna achieve Generalization
    • Interface: Use it when wanna achieve Standarization
  • how are you with working on minimal requirements?
  • are you familiar with async/await?
  • what is Static, when to use it https://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp A static constructor is only called one time, and a static class remains in memory for the lifetime of the application domain in which your program resides. Two common uses of static fields are to keep a count of the number of objects that have been instantiated, or to store a value that must be shared among all instances.
    • pros The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created.
    • cons Only one copy of a static member exists, regardless of how many instances of the class are created. Static methods and properties cannot access non-static fields and events in their containing type, and they cannot access an instance variable of any object unless it's explicitly passed in a method parameter. Static methods can be overloaded but not overridden, because they belong to the class, and not to any instance of the class. No polimorphism, no interfaces

Javascript Questions

  • what are the ways of create and object in Javascript
    • Object Literal syntax
    • using the new keyword
    • Object.create
    • Object.assign
    • ES6 classes
  • what is the rest functionality in javascript (rest params?)
  • Get the top of an array and how to get the bottom
  • what are observables in javascript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment