A while ago I passed the 70-483 exam and thought I might share some of my notes, which I think are the most takeaways from the learning material. The exam itself was fair, but as almost every knowledge test it had some very specific questions such as name of the methods on interfaces (e.g. CompareTo vs Compare on IComparable and IComparer respectively).
1. Parallel LINQ queries does not guarantee preserved order, need to add the AsOrdered() characteristic. It might be quicker than sequential linq query, but it’s not deterministic, need to be tested. Example PLINQ queries:
var orderedCities2 = (from city in cities.AsParallel().AsOrdered() where city.Population > 10000 select city) .Take(1000); var plinqQuery = table .AsParallel() .Where(n => Enumerable.Range(2, (int) Math.Sqrt(n.Item1)).All(i => n.Item1 % i > 0)) .Take(10) .ToList();
Handling lists of parameters in SQL
During development you might want to pass a list of entities to a query or command. The recommended and safest way is to wrap every item in a parameter and pass it to the query. The problem is that the number of parameters that can be passed to a user function, stored procedure or even dynamic query is limited. The first two are set to 2100 entries per documentation. The third can vary based on the sql server version and the size of the actual parameters. In Sql Server 2008 it’s 65,536 * size of the network packet.
There are numerous way of dealing with this and I’ll describe two possible solutions and one how to not do this, so let’s start.
How to make scrum planning meetings less useless?
Scrum methodology seems to conquer the project management in IT, outmatching classic waterfall solutions. While being agile, flexible and closer to the goal through the process, it’s easy to lose track of the agile manifesto.
One of the basic pillars of scrum is planning. By definition, it is an event in the framework where the team determines the product backlog items they will work on during that sprint and discusses their initial plan for completing backlog items.
I’ve seen scrums you people wouldn’t believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near.. oh wait, it’s not this kind of dark fantasy.
Let’s see how to make the scrum meetings more meaningful!
Enums are widely used in the .NET projects. They can save some roundtrips to the database and are self-documented, in theory. I’d like to explain how to and how no to use enums to avoid the butterfly effect in the repo.