Part I (closed) Flashcards
(39 cards)
Odpowiednik repozytorium i UoW w EF?
DbSet i DbContext
What is kernel responsible for?
CPU, RAM, I/O
What is virtual addressing?
Layer of abstraction between process and memory. If not enough available memory then writing to disk happens.
Describe interrupts on example of disk?
Processor asks disk for data but doesn’t wait for the result but comes back to executing some other work. When disk is ready it interrupts the processor.
What’s the purpose of expression trees?
To translate code into data that can be then translated e.g. into string (LINQ to SQL) and executed somewhere
Difference between arithmetic and logical bit shift?
Arithmetic right shift includes the sign but while logical uses zeros.
Template method vs strategy?
Template uses inheritance, strategy uses interfaces, more runtime. Template method can substitute only part of algorytm that is the derived class.
What is IOCP?
I/O completion port - API in Windows for asynchronous I/O operations
What thread pools are there in .NET how they are different?
Worker Process Thread Pool and IOCP Thread Pool. IOCP uses OS-managed queue while worker process thread pool uses managed .NET queue.
How is thread pool related to application domain?
Each app domain has its own thread pool.
Why and when setting min threads in thread pool can be advantageous?
When app has to deal with many requests at once. Thread pool is updated every 500ms and then additional threads are eventually created.
What is preemptive multithreading?
A situation in which a thread can be suspended after reading a variable from memory but before manipulating it and storing in the memory.
Database denormalization
Keeping redundant data in tables if very much data in Db and joins could cost too much.
Describe 3 normal forms of a database
First that each column has only one piece of information (eg separate columns for different address parts). Second that each category of information should be stored separately and keys should be introduced. Third that each informational column that can be computed from others should be dropped.
What is a ViewBag?
One way of providing data to a view in ASP.NET MVC.
It is not strongly typed. Preferred way of providing data is through a view model.
How is editing/delete done in controllers (GET/POST)
Basically there are two methods with the same name, one is get and second is post.
What is salting a password?
An operation in which user’s password is combined with a dynamically generated salt (value) and a hash function generates a hash from it. Then hash and salt is stored in a database. Protects against dictionary attack, rainbow table attack. The same password has different hash for different instances.
How to suggest eager loading to EF?
By using include method.
Difference between eager loading and lazy loading?
Eager loading tries to use one query with join while lazy loading uses multiple queries.
What’s the most important factor in Kanban?
WiP - Work in Progress, defines how many items can be placed in each Kanban’s board column, if there are too much work whole team should help
Relation of Scrum to agile?
Agile is an idea, a specification while Scrum is a specific framework.
When to use GET method in ASP.NET MVC form?
When e.g. searching by filters and we want to see the filter in URL so that some other people can copy them and use.
What convention is used by default with GET method and database?
That all methods not changing database can be queried using GET.
What is HATEOAS and HAL?
HATEOAS (Hypermedia as the engine of application state) is a concept in which contract between client and server is not express through IDL or interfaces but is dynamically managed by hypermedia (e.g. bank account with dynamic actions depending on its state). HAL is just implementation of HATEOAS.