The 5 Types of Poor Architects

I have worked with so many architects in my career, including those who have the “Architect” word in their business card and those who play architect role in their projects. And while I had good fortune to meet very talented people, I am frequently disappointed by poor architects who put their ego, arrogance, fanaticism (and sometimes, ignorance) before anything else. Recalling the memories I have about the poor architects, I come up with the following grouping. Read more »

The Story of a Hope-Driven Developer

A fictitious story about a fictitious “hope-driven” developer… In a sense, it’s fictitious because there’s probably no one single coder exposes all these behaviors of being hope-driven. On the other hand, it’s not hard to find one who frequently displays one or more of these behaviors. Anyway, let’s now travel into the mind of our fictitious hope-driven fellow…



I am a hope-driven developer. I am superior and productive. I love coding and I’m different from others.

Unlike others, I don’t write unit test for my code. I hope my code will work right because I’m so good at coding. Even in the rare cases when it doesn’t, the QA team should be able to catch the defects easily and I will immediately know what happen to make necessary fixes. I hope I will never have to touch most of the already written code again and if I don’t have to revisit it, what would unit tests help anyway?
Read more »

Object-oriented database programming with db4o - Part 2

Finally, I could manage some time writing up the follow-up post about other interesting features of db4o, specifically about client-server feature and transaction & concurrency support. You can read the article here: http://www.codeproject.com/KB/cs/oop_db4o_part_2.aspx.

This write-up also gives me a chance to learn about some cool new features of db4o 7.2 (currently development version) such as LINQ integration, transparent activation and transparent persistence. These are really big changes from the previous version I tried (6.3). Hope that I can find some time writing about all these features. But don’t wait for me though, just go ahead and try them yourself…

On interviewing - beyond technical competence

In the last few posts on interviewing, I discussed mostly about the technical aspects of the interviewing process and some readers had raised the concern that whether technical competence alone is sufficient for doing programming job well. Well, it’s definitely not. In this post, I will discuss on the three most important factors, besides technical skills, that people must care about when evaluating candidates for a programming job.
Read more »

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 »