Part I (closed) Flashcards

1
Q

Odpowiednik repozytorium i UoW w EF?

A

DbSet i DbContext

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is kernel responsible for?

A

CPU, RAM, I/O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is virtual addressing?

A

Layer of abstraction between process and memory. If not enough available memory then writing to disk happens.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe interrupts on example of disk?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What’s the purpose of expression trees?

A

To translate code into data that can be then translated e.g. into string (LINQ to SQL) and executed somewhere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Difference between arithmetic and logical bit shift?

A

Arithmetic right shift includes the sign but while logical uses zeros.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Template method vs strategy?

A

Template uses inheritance, strategy uses interfaces, more runtime. Template method can substitute only part of algorytm that is the derived class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is IOCP?

A

I/O completion port - API in Windows for asynchronous I/O operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What thread pools are there in .NET how they are different?

A

Worker Process Thread Pool and IOCP Thread Pool. IOCP uses OS-managed queue while worker process thread pool uses managed .NET queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is thread pool related to application domain?

A

Each app domain has its own thread pool.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why and when setting min threads in thread pool can be advantageous?

A

When app has to deal with many requests at once. Thread pool is updated every 500ms and then additional threads are eventually created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is preemptive multithreading?

A

A situation in which a thread can be suspended after reading a variable from memory but before manipulating it and storing in the memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Database denormalization

A

Keeping redundant data in tables if very much data in Db and joins could cost too much.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe 3 normal forms of a database

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a ViewBag?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How is editing/delete done in controllers (GET/POST)

A

Basically there are two methods with the same name, one is get and second is post.

17
Q

What is salting a password?

A

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.

18
Q

How to suggest eager loading to EF?

A

By using include method.

19
Q

Difference between eager loading and lazy loading?

A

Eager loading tries to use one query with join while lazy loading uses multiple queries.

20
Q

What’s the most important factor in Kanban?

A

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

21
Q

Relation of Scrum to agile?

A

Agile is an idea, a specification while Scrum is a specific framework.

22
Q

When to use GET method in ASP.NET MVC form?

A

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.

23
Q

What convention is used by default with GET method and database?

A

That all methods not changing database can be queried using GET.

24
Q

What is HATEOAS and HAL?

A

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.

25
Q

How is rendering done in ASP.NET?

A

Aspx files are turned into initialization class (with its partial classes), which in turn creates a tree which in turn is traversed using visitor pattern.

26
Q

Three ways of session variable persistence in ASP.NET?

A

In-process (recycled when ASP.NET process recycled)
State server - using special ASP.NET session service
SQL Server mode - using SQL database

27
Q

What is a session in ASP.NET?

A

Subsequent queries from the same browser sent during a specified period.

28
Q

What are some other methods of state management than session state?

A

Application state, cookies, cache, query string, view state.

29
Q

What is a view state in ASP.NET?

A

A way of state management for the same page betwen round trips e.g. restoring data from form. View state is a serialized state of all controls on the page sent to browser as base64 as hidden field. It can be also persisted on the server.

30
Q

What is the order in DataContractSerializer, is it important?

A

Base class properties, alphabetically (for properties without order set), according to order attribute. It’s important in serialization and deserialization especially when interoperability (Joomla PHP to ASP MVC)

31
Q

What is templating, how it works in ASP.NET?

A

Templating is reusing a part of a page (e.g. master page) when generating pages. It can be done on the server side, client side, proxy side. In ASP.NET there’s a concept of master pages.

32
Q

What is ASP.NET performance?

A

It’s better than scripting engines (like ASP for example). Code is compiled into MSIL during first request to a page. It can cause a short delay for the first time a page is used.

33
Q

What is AJAX?

A

Asynchronous JavaScript and XML, although today most often JSON, set of technologies (HTML, CSS, JavaScript, DOM). Generally JavaScript call and asynchronous response from server which changes the web page.

34
Q

What’s the newer construction to XmlHttpRequest? How is AJAX executed in JQuery?

A

fetch, in jquery its $.ajax or even $.get done failed

35
Q

How are TDD and BDD similar and different?

A

Both are based on tests. But BDD uses more descriptive, natural ways of describing requirements. Code written in BDD is in plain English which can be easily understood by all stakeholders in comparison to TDD. Both can be used in agile TDD test written by developers while BDD can be written by product manager and even understood by user

36
Q

How to delete object with references in EF?

A

Null parent properties of objects being deleted.

37
Q

What is seeding a database in EF?

A

Code First Migrations can be enabled in a project. Migrations folder is created with classes with methods Up, Down, Seed. Seed inserts data.

38
Q

How validation is done in ASP MVC?

A

Locally by jquery script and on the server. If importing jqueryval is commented for example then server validates. Result the same.

39
Q

What’s the order rule in ASP.NET routing?

A

Most specific routes first.