Thursday, December 14, 2006

Firebug

A coworker just pointed out Firebug to me. It is a Firefox plugin which is a web development IDE. I played around with it for just a few minutes and was very impressed.

Monday, December 04, 2006

Array Searching in .NET 2.0

Again, Jeffrey Palermo has written a very instructive .NET article. This time he describes the FindAll method, which works on a array or similar collection, and returns an array containing the elements in the source array that fulfill a certain condition. He also shows how the delegate keyword can be used to create an anonymous function to specify the search condition. Ruby, Python, Lisp, and other languages commonly use techniques like this, but it is not normally seen in more mainstream programming. Whatever you might think of Microsoft, one good thing about .NET is how it is picking up a lot of functional elements and bringing them to the mainstream.

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.