Friday, November 10, 2006

Windows Power Shell Coolness

I'm trying to learn the new Windows Power Shell, and I wrote my first useful little script. I used the following to count the number of source files in a directory that begin with S through Z:

$count = 0
$re = [regex]"^[S-Zs-z]"
dir *.cs | foreach { if ($_.Name -match $re) { $count++ } }
$count

I found the following O'Reilly article to be helpful in getting going with WPS.

Thursday, November 02, 2006

Working Backwards

Werner Vogels has an interesting post about Amazon's process for defining requirements called "Working Backwards". They use small development teams, and start with customer-focused documents like a press release, FAQ, and user's manual in order to help them define what they're going to build.

Monday, October 23, 2006

NHibernate Stuff

I hope this blog does not turn into just an index of Jeffrey Palermo posts, but he is often writing about something that I think will be useful to my current work. Now he's talking about NHibernate, which is the .NET port of the popular object-relational mapping framework for Java.

First is a post about autoflush mode, and the second is how typecasting affects an object's "dirty" state, both of which we will need to be aware if we choose to use NHibernate, which is likely unless we find that iBATIS.NET is a better fit for our current code and database schema.

Wednesday, October 18, 2006

Java Does Duck Typing

Duck typing is a feature of dynamic object-oriented languages that goes back to Smalltalk, although I first heard the term in the context of Ruby. Here is a very well written article about how to implement duck typing in Java. Although it's more work in Java than in Ruby or Smalltalk, it's not too bad, and could be a worthwhile technique for some cases.

Tuesday, October 17, 2006

Getting rid of god code

Jeffrey Palermo's post from last Saturday exactly describes what I am about to do at my work right now:
god code leads to overly complex applications. A remedy for god code is to push behavior down into the smaller classes being worked on. Empower the smaller classes to take some responsibility for themselves. They are quite capable.

Ruby Declared Mainstream

Curt Hibbs announces that Ruby has been declared mainstream, meaning that it has made the A-list on the TIOBE Programming Community Index, which attempts to chart the popularity of programming languages. On this list, Java is still number one, but dynamic languages such as Ruby and Python are growing in popularity.

Sunday, September 24, 2006

Experiment failed

My experiment in having a blog that combined my interest in Philosophy and Theology with the kinds of posts that I make on this blog did not work out well, so I'm back to posting my code notes here. I don't have high expectations for this site, except as a place to share some knowledge. I will continue to write about my Philosophical interests here, for those of you who might be interested.

Friday, September 15, 2006

Comprehensive guide to .htaccess

I ran across this tutorial on .htaccess, which is a configuration file for websites hosted by Apache. Even after just a five-minute glance, I found some information that allowed me to fix a Ruby code download problem I was having on this site.