Archive for July, 2010

Keep Your Project Files in the WAR

July 13, 2010

Have you ever created a project and had someone say (maybe that person was yourself) “we better put that file in an external place so I can be changed at runtime just in case”? Chances are if you did and followed through on it without a specific requirement for it then I would be willing to bet you ended up never changing the file at runtime (presuming you have a relatively strict change process at your shop). I have put myself in the same situation many times creating overly complex software which involved many random file system structures external to the central package (in JEE the WAR file) because of the “in case we need it” rationale. I want to convince people that we should stop unless its required.

When you start creating file system dependencies or other dependencies on your code outside the package you are basically trading increased complexity for flexibility. In most cases I have seen this trade off made (outside of requirements) because people are trying to anticipate issues with the code but it actually just heightens the probability for issues in the future because of the increased complexity. It’s not that you won’t code it right the first time but in the future it can and probably will cause confusion and problems with new developers without a lot of extra work. The extra work being creating hooks in the build process, handling potential environment differences, and deployment issues beyond the initial build.

In the end if you have the belief you can code it write in the first place then just code the simplest solution right, don’t over shot the mark. Unless you have a compelling need avoid creating external dependencies on your application.

Advertisements

Exim4 HELO config in Debian

July 7, 2010

Not a normal post subject for me but I spent sometime today toiling with getting Exim properly configured to work with my new scanner today. Figured maybe someone else can save themselves sometime.

The scanner has the ability to email scans but when I adjusted all the configurations, I got a SMTP communication error on the scanner. Checking out my /var/log/exim4/mainlog I saw something like the following…

2010-07-06 21:12:42 rejected HELO from [X.X.X.X]: syntactically invalid argument(s): DIGITAL_MFP

With a quick search on the web I found this message thread. Seemingly it had all the information I needed. However I have a Ubuntu server install and it doesn’t seem use the default configuration setup (/etc/exim4/exim4.conf) it has a template configuration file (/etc/exim4/exim4.conf.template) and then a variable file (/etc/exim4/update-exim4.conf.conf). Using debian package config you won’t have the flexibility to add or update the needed configuration…

helo_allow_chars = “_”

But you can just add it to the top of /etc/exim4/exim4.conf.template file and then run through debian package configure and your problem will be fixed!  Hopefully that saves someone some pain, its a pretty obvious thing to try but I went through a couple of other guesses wasting quite sometime.