Uncle Bob Is Right

I'm baffled by the podcast from Jeff and Joel. In many regards, I have had the same reaction as Robert Martin. In our organization we have tried our best to implement SOLID principles. The affect that these principles have had on our ability to produce software is both profound and staggering. To basically say that things like the Single Responsibility Principle and the Dependency Inversion Principle are "bureaucratic" and that they come from someone who "doesn't write a lot of code" is absurd. »

Author image Jonathan Oliver

Integers vs. GUIDs and Natural vs. Surrogate Keys

In the database world, there are few arguments that provoke such strong feelings as the proper choice for a database key. Should we choose a natural or surrogate key? If we choose a surrogate key, should it be an integer or a GUID? I have actually done work on all sides of the argument, so I can see it from the various perspectives. Natural vs. Surrogate Joe Celko argues that we should be using a natural key--one composed from the attributes of the entity being modeled rather than just assigning an arbitrary value. »

Author image Jonathan Oliver

DDD: Your Entity Object Is My Value Object

As a quick primer, an entity object is something that has a identity and can change over time--much like a person--whereas a value object is something that is immutable once constructed and can be interchanged with another value object holding the same value. I have read, from time to time, the laments of some who would like to see a published list of the all of the various kinds objects--and the classification of each: entity or value object. »

Author image Jonathan Oliver

Fedora 10 x64 and CERC 1.5 6-Channel SATA RAID

Fedora doesn't play nice with this RAID card. After installation it wouldn't recognize the hardware device. It would just say: Volume group "VolGroup00" not found After a bit of Googling, I came upon this post. The problem occurs because Fedora is loading too quickly and not giving sufficient time for the RAID card to be recognized. The solution is to boot into recovery mode using the Fedora installation disk. »

Author image Jonathan Oliver

Holy Wars: C# vs Java, Windows vs Linux

I was re-reading The 7 Habits and I came upon an interesting principle. In Habit 2, Begin With the End in Mind, Stephen Covey talks about how change can affect us. Specifically, he mentions how, by having a changeless, principle-centered core, we don't have to be afraid of change and that we can adapt and grow with change rather than fearing it or labeling/prejudicing ourselves against it. The thought occurred to me, how much does the lack of this principle permeate the development community? »

Author image Jonathan Oliver

HOWTO: Get 4 Extra Hours Every Day...

About two months ago, I was thinking of the goals I had that I wanted to accomplish as well as all of the projects that I wanted to complete. There just wasn't enough time. It occurred to me that there several immediate steps that I could take to gain a few hours every day. Wake Up Earlier I love to sleep. Let me repeat that, I absolutely, positively love to sleep. »

Author image Jonathan Oliver

Windows Server 2008 x64 & CERC 1.5 6-Channel SATA RAID

Just so you know, for some reason when you do a clean install of Windows Server 2008 x64 on a machine with Adaptec's CERC 1.5 6-Channel SATA RAID card, Windows doesn't have drivers built in. Easy enough, you can go get the drivers from the manufacturer website--in my case Dell. Obviously you want to use the x64 drivers because it's an x64 operating system. When you attempt to use the x64 drivers via the "Load Driver" option, because it can't detect the disks otherwise, it gives you the following helpful message: »

Author image Jonathan Oliver

Services: Infrastructure, Application, Domain, and Object

You may have read on various blog from individuals--including well-known master craftsmen--that having references to a service or repository inside of your domain entity is an anti-pattern or a code smell which leads to the dreaded "anemic domain model" problem. If you agreed with this, you'd be wrong. Allow me qualify the above statement. The issue isn't so much having services inside your domain entities--or value objects for that matter--it's having the wrong kind of services. »

Author image Jonathan Oliver

Assembly & Artifact Storage

In the process of implementing a more advanced process for our build server the question ultimately arose, "What do we do with the assemblies and other artifacts that are created?" The easiest and perhaps the best solution is to store them in your version control repository along with everything else, provided you are using a system capable of performing binary deltas on your files, e.g. Subversion. In our situation we wanted to build artifacts and store them in a tagged directory of SVN in order to easily get the exact binaries that were created at any point in time. »

Author image Jonathan Oliver

Making NHibernate Inversion of Control-Friendly

UPDATE: Fabio Maulo, the man behind NHibernate, posted the following recently on the topic: http://fabiomaulo.blogspot.com/2008/11/entities-behavior-injection.html ----- NHibernate is a little bit of a pill when it comes to dependency injection. Since it has its roots in the Java world it implements many helpful patterns such as Unit of Work, among others. Even so, the original Hibernate framework predates the time when dependency injection was widely used, so it does not adequately facilitate the use of this technique. »

Author image Jonathan Oliver