Archive for November, 2006

Simplicity

Here is a cool “quote by R Buckminster Fuller that I found”:http://bie.no/blog/computers/software-engineering/pragmatic-programming/2006/03/characteristics-of-great-software-designtm/

bq. “When I am working on a problem I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong.”

Here are some similar quotes:

bq. “You know you’ve achieved perfection in design, Not when you have nothing more to add, But when you have nothing more to take away.” Antoine de Saint-Exupery

bq. “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius—and a lot of courage—to move in the opposite direction.” E. F. Schumacker

bq. “To arrive at the simple is difficult.” Rashid Elisha

bq. “Complexity is a sign of technical immaturity. Simplicity of use is the real sign of a well design product whether it is an ATM or a Patriot missile.” Daniel T. Ling

bq. “Simplicity does not precede complexity, but follows it.” Alan J. Perlis

Two Simple Ant build Tricks

h3. Ant build scripts and NetBeans

Here is a small trick for working with NetBeans and Ant build files. One problem with NetBeans is that if your source code already has a build file, NetBeans will use that build file. Unfortunately, when you do this, you loose a fair bit of NetBeans functionality like the ability to run individual JUnit test classes. You can test the entire application, assuming that you have setup a JUnit test target in your build file, but you cannot run a single test. This little trick gets around that.

I have to start by saying that this trick is fairly obvious. The trick is to rename the build file. Instead of calling it @build.xml@, call it something else. This will allow you to setup your project, in NetBeans, as a “project With Existing Sources” instead of a “With Existing Build Script”. This means that NetBeans will create its own build script and give you the full functionality and power of NetBeans.

h3. Refactoring Build Scripts

If you have an application that is divided into several different projects that you would like to manage with separate build scripts, but not necessarily different build scripts, then this trick will work. The idea is to use the “DRY(Don’t Repeat Yourself)”:http://en.wikipedia.org/wiki/Don’t_repeat_yourself principle. Take all the parts that are the same in the build scripts and put them into a separate file. Then import that file into the build scripts for each project.

The advantage is now when you have to make changes, you only need to go to one file. You no longer need to edit one file and then copy-paste those changes into several more files. This saves you from copy-paste errors or forgetting to change a file.

Interesting Analysis of Why Companies use Waterfall

Found on the “Sysprog.net website:”:http://sysprog.net/quotlang.html

bq. Part of the reason so many companies continue to develop software using variations of waterfall is the misconception that the analysis phase of waterfall completes the design and the rest of the process is just non-creative execution of programming skills. (Steven Gordon)

Where are the open source modeling tools?

I use Eclipse and NetBeans almost every day. I use Ant, JUnit, jMock, Hibernate, Spring and half the Jakarta Commons library almost every day as well. I also use open source databases, web frameworks, and languages. What I don’t use though are open source modeling tools. This is because there aren’t any.

Where are the open source UML(Unified Modeling Language) and ER modeling tools? And why are no developers or organizations creating them? For me, the lack of existence of these tools can only lead to one conclusion: the open source community simply does not do any modeling before, during or after developing an application. The reverse of this statement is that only enterprisey companies do modeling. I am not sure if I buy into this conclusion.

Personally, I like to, before I start coding, to model the domain for my application. This gives me a better understanding of the relationships that exist between things in the real world and gives me to good starting point for building my domain object model. Modeling tools really help for this. I guess the open source community just uses the “back of the napkin” approach, literally. But napkins are hard to share with a distributed group of developers. Therefore, people must be using some tools. Where are they and what are they?

I think this is evidence one a problem with the open source community; only the tools that people use on a day to day basis get built. This ends up leaving holes in tool support. I can use an exceptional Java IDE(Integrated Development Environment) every day for free, but I have to go and pay hundreds to thousands of dollars to do database modeling because open source developers don’t do database modeling.

I realize that right about now the entire open source community is shouting in unison, “fix it!” And I would if I could, but the reality is that I am not sure that I can single handedly create an ER modeling tool. True, I would learn along the way, but Eclipse, NetBeans, JBoss, PostgreSQL, MySQL, and other tools were not created by single people, they were created by organizations. So where are the organizations creating modeling tools?

I also realize that there is “ArgoUML”:http://argouml.tigris.org/ and “DBDesigner4″:http://fabforce.net/dbdesigner4/ which are both modeling tools, UML and ER respectively. However, the last time I used ArgoUML is was almost unusable and DBDesigner4 does not work on a Mac.

Moving on up to the MacBook Pro

!http://www.fuzzylizard.com/wp-content/macbookpro-core2duo.jpg!

I have finally made the move to the Mac; the “MacBook Pro”:http://www.apple.com/ca/macbookpro/ to be exact. And I have to say, I like it.

I have spent the last several days installing software. It is amazing how much quality open source software exists out there for OS X. So far my favourite is “AdiumX”:http://www.adiumx.com/. It is a really nice little multi-protocol IM(Instant Messaging) application. The only program that I have not found a substitute for so far, aside from big programs like Photoshop or Dreamweaver, is “Paint.NET”:http://www.getpaint.net/index.html.

So far, the only thing I am missing is FreeCell and some of the other little solitaire like games that come with a Windows or Linux computer. Anyone have any recommendations?

New Job - ThoughtWorks

I think it is now safe to post this on my blog: for the last several months I have been going through the selection process for a position at “ThoughtWorks”:http://www.thoughtwork.ca. This past Wednesday, they offered me a position as an application developer and I accepted. The odd thing is that they don’t want me to start until February. This is because they want to send me to ThoughtWorks University and the next session doesn’t start until then.

I think this will be an excellent opportunity and it will definitely prove to be an amazing learning opportunity. I think the thing I am looking forward to the most is working with a team of smart, dedicated developers who are able to create and deliver software to the client. I have spent too much time learning how things shouldn’t be done; it will be nice to finally see how to do things right.

My Linux server distro - CentOS

My server died; first I smelled smoke and then the computer just shut itself down. Given the smell of smoke, it was probably a good thing. The downside is that I have had to rebuild my server. Part of the rebuild process was picking an Linux distro to use. The server had been running “CentOS”:http://www.centos.org/.

Lately I have been playing around with Ubuntu as a desktop version of Linux and have been really liking it. For the desktop it is excellent and may actually, finally put Linux on the desktop. Since it has been fairing so well as a desktop OS, I decided to try it as my server OS.

My server is very simple, mostly I just use it as a file server with the home directories shared and one large directory shared that can be used for dumping files. In addition, I also had a second drive in the machine on which everything in a home directory or in the shared directory was mirrored every hour. I realize this is not a true backup system as it also mirrored all deletes (this was mostly to save space). Now that the server is dead and I had to transform the larger of the two internal drives into an external drive, I have lost the backup capabilities.

Anyway, back to Ubuntu; it didn’t work. One thing I really like about CentOS is the administration tools. If I want to configure Samba I just click on the Samba config tool and add shares and users. There are also tools for Services, httpd and other apps. All of these are missing in Ubuntu (at least I couldn’t find them). I would rather use a GUI tool than try and work with config files. This is 2006, I should not have to open a shell and fool around with vim and config files to setup a few Samba shares. This is the main reason that I went back to CentOS.

Next Page »