What's the difference between VARCHAR and NVARCHAR columns? b
How do you investigate slow SQL queries? b
How can we avoid deadlocks on database?
- Serialise the inserts, change isolation level
How can you make "Create Table" SQL statement idempotent? b
- delete if exists / replace;
What kind of indexes are there in SQL Sever?
- clustered / non-clustered / columnstore
What are pros / cons of using foreign keys?
- data consistency vs performance on changes
What is transaction isolation level? (name at least some)
- read uncommitted / read comitted / repatable read / serializable / snapshot
What is difference between out and ref operator?
ref is reference and not value, out is to hold a return value
What is difference between == and .Equals
== is reference comparison and .Equals is value comparison
What is early binding and late bindig?
early - at the time of compilation, late - during run time
What are properties and method?
properties are members that provide flexible way to read, write, or compute private members. Methods are used to perform an operation on object
What is garbage collection?
Which format is best for data transmission and why? csv, json, xml
- list of methods from the beginning of a program until the execution of the current statement
Can you think of any immutable types in .Net? How could you make an immutable type?
- string, all value types / structs.
What floating point numbers are there in .Net, and what's the difference between them
- float / double / decimal. Precision and consistency
What is the difference between Linq enumerable extensions .Any() and .Where()
- First blows up if empty, else 1st. SingleOrDefault nothing if empty, first if 1, and blows up if 1+
Entity Framework (other ORM/ ADO.NET) retrieving 1 mil records takes 10 mins. Is there anything we can do to speed this up?
- not really - streaming?
What's the difference between Floor-ing and Ceil-ning a number?
- flooring always rounds down, ceiling always rounds up
Explain Dispose(). When have you implemented IDisposable?
- defines set set of characters a string can contain, and how are they stored
Can you think of some typical retry strategies, and what are they useful for?
- linear / exponential. Overcoming temporary infrastructure or timing issues
If my app, the memory consumption is increasing over time (when running for many days). What could be the reasons for it?
- Not releasing memory, unmamaged memory, pinned objects
Can generics improve runtime performance, and if yes how?
- Yes – by avoiding (un)boxing (and casting)
Name at least one http Verb that should pass content in the request body (1 try!)
What’s the difference between DateTime and TimeSpan?
- DateTimeOffset also includes timezone information
When loading a Web Page, what is processed first – HTML or JavaScript?
Order serialisation formats: Xml, Csv, Json by typical output size, starting from smallest:
(Multithreading) How to detect that a Task has failed?
- catch await t / t.Wait() / t.Result; t.IsFailed / t.Exception;
How to process a items in parallel? How to control the max parallelism, is .Net controlling it?
- Parallel.Foreach. DataFlow blocks, manually List<Task>, Threads, ...
Entity Framework what is change tracking? Can it be turned off?
- Keeping track of changes, for SaveChanges() generates correct SQL. .AsNonTracking()
In a Message Bus, what's the role of the Broker?
- persistent storage that enables temporal decoupling of publishers and consumers