Unit testing the data access layer

Unit testing can be difficult sometimes. In some cases, you need to refactor your code-under-test to make it more testable; in other cases, you need to apply some special techniques into your test code so that it can do what you want; and in the worst cases, you can’t think of any such techniques nor are able to refactor the production code and thus, don’t write any test at all. It’s in my experience working with many teams applying unit testing that they often have troubles writing tests for the data access layer (DAL), UI layer, service interface layer, and multi-threading code, mostly because they are not aware of the techniques for doing that. That is not surprisingly difficult to understand though, business logic is much more intuitive and straight-forward to be tested and every single article or book out there will have examples writing test for the business logic firstly.

In this blog entry, I will explore some techniques of testing the data access layer. While it won’t be very comprehensive (I think an entire book can be written just to explore in details all facets of database unit testing), I hope there is enough of topics covered for you to explore more. Read more »

I am a dVP

I have just been recognized as a db4o Most Valued Professional (dVP) for the year 2008 and won a trip to Berlin next year to attend the ICOODB 2008 conference. It has always been a pleasure working with a great product like db4o and I surely enjoy this award.

BTW, to those who are expecting to see part 2 of my db4o article, I am a bit overwhelmed with other stuffs lately and could not have time to start working on it; but I’ll surely do that as soon as I can.

Microsoft Tech·Ed SEA 2007

I will be attending the Microsoft Tech·Ed SEA 2007 event at Malaysia from Sept 10-13. According to the website’s statistic, not a lot of my blog’s readers come from the South East Asia area; but if any of you will attend this event, send me message to my email address (see About Me), we might meet over there.

When you learn new things, learn from books

I can hardly believe that there is any Java developer who never reads a Java book, or “agile developer” who never reads a book on XP, Scrum… Unfortunately, there are just so many many of those. In fact, many people I know/interview have very fundamental gaps in their knowledge and in most cases I discover that it is partly due to the fact that they never spend time learning things from books. Reasons provided often are: not enough time, internet resources are more than enough etc. In most situations, I don’t think it’s a good mindset to develop software. Read more »

The wrong attitude of learning on the job

I can’t tell you enough about how much surprised I was when some developers applying for senior .NET development position, when being interviewed by me, could not answer very fundamental questions about a specific technology or programming language as well as were not aware of any trends in the field. What I found out was that usually this had something to do with their attitude towards “learning on the job”. Read more »