Jun 272012

Recently I have written an article about how to wait for two threads to finish. The technique described in the article can be perfectly used when writing unit tests for asynchronous methods, especially for the ones exposing events. Test scenario Lets go straight to the code to be tested. This is a very simple implementation of a Document Generator Service, a class that is responsible [… read more]

Jun 152012

In the recent period Microsoft has put a lot of emphasis on the asynchronous programming. Multithreading, which is obviously connected to the asynchronous execution, gets an important support in the Microsoft.NET 3.5, 4 and 4.5. Just to name some new things introduced starting from .NET 4: Tasks: Introduced in Microsoft.NET 4. A Task represents an ongoing activity, which may be CPU intensive work running on [… read more]

LINQ Standard Query Operators

 Posted by on June 10, 2012
Jun 102012

Standard Query Operators are the “heart” of LINQ, as those operators are representing the API that we need to go through in order to do any LINQ query. There are two sets of LINQ standard query operators, one that operates on objects of type IEnumerable and the other that operates on objects of type IQueryable. They are defined as extension methods of the type that [… read more]

May 312012

A decompiler performs, as far as possible, the reverse operation to that of a compiler. In case of Microsoft.NET, it translates an assembly that has the IL code into a human readable form, which means in one of the Microsoft.NET languages. It is not guaranteed that the decompiler would generate exactly the same code as originally used to compile a program. I tried to collect [… read more]

May 292012

In which scenario should we use the interfaces and in which scenarios we use abstract classes? At the first sight the two provide a very similar ability, but we will see what makes them different. Abstract Class Defines the interface for a hierarchy of classes while deferring the implementation to subclasses. Abstract Class lets subclasses redefine the implementation of an interface while preserving the polymorphism [… read more]

May 222012

Being a Leader means working with people. This automatically involves the interaction at many levels and with different kind of personalities. The “real leader” needs to be able to deal with all kind of situations by keeping in mind that the pre-set goals need to be achieved. Delegating In general, people don’t like delegating as this often means loosing control or wasting the time explaining [… read more]

May 202012

This post is a continuation of the earlier post Object Oriented Javascript – Object Creation, on which are explained the different ways of creating objects in javascript. With this post I would like to explain the other possibilities javascript offers when it comes to the method and properties creation. Adding and deleting methods and properties Javascript is so flexible that we are able to attach [… read more]

May 072012

The primary key of a table on an RDBMS uniquely identifies each record in the table. It can either be a normal attribute that is guaranteed to be unique or it can be generated by the RDBMS (such as a globally unique identifier). Primary keys may consist of a single attribute (single key) or multiple attributes in combination and in that case we speak about [… read more]

An introduction to NoSQL

 Posted by on May 7, 2012
May 072012

In my working career I had to deal with databases since my first day at work and it is a bit a hate-and-love relationship. Usually well working application is always backed up by a good designed database schema and good accessing mechanism. So far I always used RDBMS – Relationship databases such as Microsoft SQL Server, Oracle, MySql, Sybase. Right now there is a big [… read more]

May 052012

Transactions are an integral part of any (serious) database development when there is need for data consistency. Transactions in a database environment have two main purposes: To provide reliable mechanism to allow correct recovery from failures and keep a database consistent To provide isolation between programs accessing a database concurrently. It’s impossible to mention transactions without mentioning the ACID (Atomic, Consistent, Isolated and Durable) attributes [… read more]

May 052012

The following is a list of books that I would recommend to every experienced (or not) software developer. Very often I take inspiration by reading again and again some chapters as very often the knowledge (theory), if not practiced, tends to blurry overtime. Please take the list as it is without any order of precedence. Every book is important for its own topic. Patterns of [… read more]

May 042012

We mention Cohesion and Coupling when we are talking about Software Design Principles. Those two principles were first introduced in the book Structured Design: Fundamentals of a discipline of computer program and system design many years ago, even though the principles were around Structured Programming, they are still valid in the Object Oriented world. Cohesion Cohesion represents the degree of the systematic or logical connection [… read more]