Friday, December 31, 2004

2005...Already?

2005 is almost upon us. Time to reflect a bit on 2004...

One of the biggest changes for me has been going back to contracting. I decided to follow the way of the pragmatic programmer and take a little more responsibility for my work and career. I learned a bit of Ruby, some Groovy, looked into the Inversion of Control and Dependency Injection patterns and generally just tried to improve my design and coding skills.

Interestingly enough I was placed on a reporting project with Cognos tools. It was a bit of a disaster for a number of reasons and I fell back into an old pattern of griping about my predicament. Then I tried to take some personal responsibility for it and ended up taking a Microsoft OLAP course. It was a very good thing to do. The project didn't get much better but I took the opportunity to learn what I could. Now I know a lot more about data warehouses and cubes and OLAP tools and am better off for it. I plan to learn some C# in the new year too. Being a Java guy I may not get much of an opportunity to use it but I figure it never hurts to look on the other side of the fence. (BTW I'll probably blog about using Mono, the open source C# environment, on my Mac.)

I've also been dabbling with video editing for a couple years. I have a dual G5 PowerMac and use Final Cut Express. I finally bumped up my disk space and RAM (1.5 GB) so I should be in good shape to really get into it. It's a bit of a time pit but I have a lot of video I'd like to get into a digestible form. I got some DVD-R disks for Christmas, so I'm even ready to finally jump into iDVD and start burning some disks for family....

Finally I need to get back into doing some exercise. I used to walk to work but my latest contract is in a location where I have to drive. That means I'm getting a lot less exercise than ever before. I'm not exactly blobby yet but if I don't get proactive about it, it'll happen.

Wednesday, December 29, 2004

Regular Expressions

I regularly use JEdit (a Java-based code editor by Slava Pestov and company) and occassionally need to use a regular expression when doing a find/replace. Most of the time my regular expressions are simple and just look for a new line character (e.g., ">\n") but today I had something a bit more interesting.

I wanted to append a string to every line of a properties file that wasn't a comment line or a blank line and didn't contain a path. So the find expression looked something like "(^[^#^\n][^\\^\n]+$)". The interesting part was the replace expression which looked like "$0 suffix". The $0 says take the contents of the group (the stuff between the parentheses found by the first regex) and append the word "suffix". Very cool.

#this is a test

abc=c:\abc\def
def=test
ghi=this is a message

#another comment
jkl=Define:

turned into something like this:

#this is a test

abc=c:\abc\def
def=test suffix
ghi=this is a message suffix

#another comment
jkl=Define: suffix

Apple Pie?

I'm very curious to see what Apple will introduce in January. Think Secret seems to think a new cheapo headless iMac is in the works.... It's an interesting idea whose time has come, although I think the reason Apple has avoided this in the past is that they like to control the whole Mac "Experience". Will their reputation suffer if people have a less than stellar experience with slower (a.k.a., cheaper) components. As a Dual G5 PowerMac owner, I know Macs can be awesome. We'll see...