Author: Rodnney

A case for missing curly braces

Many times as a deadline approach, we cut corners. We think in terms of “the less amount of keys pressed the better,” because we need to finish our code on time. At first, we tend to eliminate the curly braces when defining a block of code, specially in “if” and loop statements. The problem...

Unit Testing – AAA Pattern

Unit testing is one of the skills a good developer should have.   With it, we can create good code and we can minimize bugs in our code. Unit testing with the AAA Pattern The simplest way to do a unit test is to use the AAA Pattern.  The AAA Pattern refers to “Arrange,...

Executing database queries the Entity Framework way

Executing database queries the Entity Framework way

When using Entity Framework, we usually believe that when executing the actual Linq query will result in a call to the database.  A call that will bring the results we are asking for. This is not the behavior of the Entity Framework. Entity Framework will make the actual call to...

Dating in JavaScript

Since we are in Saint Valentine’s day, I was thinking about dating… Not about dating someone, but how to have a date in JavaScript. There are 4 ways to create a date in JavaScript by using the Date data type: Date() Date(number) Date(number1, number2, number3, number4, number5, number6, number7) Date(string)...

How to Install, Configure and Instantiate the Data Access Application Block

The Enterprise Library is one of my favorite third-party reusable software component.  One of the most important library is the Data Access Application Block.  The Data Access Application block simplify how you connect to a database. With this block you can connect to a Sql Server, Oracle, SqlCE databases. Today...