Monday, March 05, 2007

Sark acquired by Sogeti

Many of you have already heard the news, but my company, Software Architects, was recently acquired by Sogeti.

My only real prior knowledge of Sogeti was that I knew that Tim Rayburn worked at the Dallas office.

It’s hard to know what to expect at first.  Most seem to think it’s an exciting change, probably because we will be introduced to a lot of new clients and have one of the largest Microsoft consultancies in Houston (among other cities).  I sincerely hope that the culture that I love here will not be disturbed.  Sark stands out among a number of similar companies here in Houston, largely because they have fun company meetings (open bar!), a great training program, you’re paid to get certifications, they have a great library and will order books if you need them.  We’re reimbursed for tolls and parking as well.

It is my hope that these things do not fall through the cracks as we make the transition to becoming “Sogetians” (ahh… just doesn’t have the same ring to it!).

We’re ramping up to integrate everything this month, mostly moving Sarks over to the Sogeti infrastructure.  March will definitely be an interesting month, that’s for sure.

Tags:

That's Just Plain Unprofessional

Codeplex ASP.NET error page

They should be ashamed of themselves…

Tags:
Friday, March 02, 2007

BlogJet - Version 2 Rocks!

I just upgraded to BlogJet version 2, and I wish I had done it sooner!  I always found it annoying that I couldn’t add tags on the fly through BlogJet, however now I can!

The interface looks a lot cleaner as well.  I’m sure I will uncover some other cool new features as I use it, but for now… if you’re not writing to your blog with BlogJet, go try it!

Texter - Transform any textbox into a snippet-aware editor

This is seriously cool.

Lifehacker has a couple video tutorials that only last about 30 seconds that will explain it all.  Basically, think of it like turning your textbox into a mini TextMate, this works for Notepad, BlogJet, or just about any old web input box.

http://lifehacker.com/software/texter/lifehacker-code-texter-windows-238306.php

Wednesday, February 28, 2007

JavaScript memory leaks

Most people don’t realize this, but JavaScript can leak memory if you don’t write it properly.  This is a strange concept, because for one, it runs in the browser, two, it’s a scripting language so it feels simpler, and 3 because you usually don’t do very much in JavaScript.

But, when JavaScript is written carelessly, it can lead to enourmous memory leaks that can actually crash the browser.

Take a look at this incredible article on javascript memory leakage up at CodeProject posted by Volkan Ocelik to find out the different leakage patterns and how to avoid them. In order to fully understand how to avoid memory leakage, it is important that you understant closures. The best explanation I have found is here. So make sure you think when writing JavaScript so you don't hurt yourself.

On to a new client

I wrapped up my project at a client today, so I’m on to a new one on Monday.

The project consisted mainly of SharePoint, but I did get to do some interesting development aside from that.  I worked on a Stock Quote web service that would gather information from pluggable sources.  They wanted to pay for a dedicated source, however politics and paperwork were such a barrier I ended up just scraping Google finance.  It won’t last forever, but it’s free and avoids the paperwork.

We wrote a few custom SharePoint Web Parts, and I found out first hand what a pain in the ass it is to deploy these things.  The deployment project outputs a CAB file.  This CAB file needs to be copied onto the server, and you have to use the STSADM tool to install it into the portal server.  This means you need Remote Desktop access just to deploy to a server!  Our production servers are load-balanced, so this means you have to do it twice.  To save us a lot of time and headaches I wrote a Windows service that would monitor a CAB file for changes using a FileSystemWatcher, when it detected a change, it would…

  • Extract the CAB to get the dlls
  • Copy the dlls to the target bin folder
  • Optionally sign the assembly so it can be installed into the GAC
  • Run STSADM to remove the old CAB file from the portal server
  • Run STSADM to get the new CAB file in the portal server
  • Reset IIS

This thing worked like a charm!  We could kick off a build, run a batch file the copy the new CAB over, and the thing would install itself.  I wish I could release the code here, but I wrote it at a client site, so it belongs to them.

We also managed to contort a SharePoint Portal site into something actually pleasing to look at, and ripped out most of SharePoints crappy markup.  Why in the world does SharePoint output so many damn tables?

To be clear, this is all with SharePoint 2003, so I imagine MOSS 2007 is loads better, but I haven’t yet worked on it.  Anyway, my next project doesn’t involve SharePoint, so I’m happy.

Wednesday, January 31, 2007

MCMS Installation Woes

Installing MCMS 2002 SP1a on my laptop proved quite difficult this week.  This is one product that Microsoft really did not focus on the install experience.

I first tried to install it without Visual Studio 2003.  It complained, so I got Visual Studio Installed.  It also asked for the IE Web Controls, so I downloaded those, extracted it, and ran the build.bat file.  I copied the sample app as directed and everything was working there.

I didn’t have SQL Server installed locally, so I didn’t have SQL-DMO, but the installer didn’t tell me how to get it.  It kept complaining that I didn’t have Visual Studio 2002, Visual Studio 2003, IE Web Controls, and SQL-DMO, when I clearly had 2 of those 4.

I installed the SQL Client tools and that solved the SQL-DMO requirement.  Then I found an MSI installer for IE Web Controls, and that did the trick there (apparently it doesn’t REALLY check to see if you have it, it just checks the Add/Remove Programs section).  Visual Studio 2002 isn’t really required, the wording is just off on the installer.

That was a waste of a day.  I could have gotten much more accomplished if this installation had been easier.

Sunday, January 28, 2007

NHibernate in Action

Finally.  A book on NHibernate!!!

I was the first to guess that this was the secret news so I suppose I will be getting a free copy.  Maybe I can be a technical reviewer for them (though I’m sure they already have one lined up).

Pierre Henri KuatĂ© should do an excellent job with the book, especially knowing that Bauer and King are behind him!  (If you don’t already know, they wrote the original Hibernate in Action — which is a must-have)

Friday, January 26, 2007

My Presentation on Continuous Integration

I gave a talk on Continuous Integration last night at the Houston Sark Office.  Thanks to all who attended.

We had pizza and discussed some of the processes and principles behind CI, as well as some of the tools to get you there.  I did a live demo of an app, connected to source control and a build server.

A-la Jeremy Miller, I had my CCTray audio clips setup, so when the build failed, you’d hear Napolean Dynamite say “Freakin Idiot!”

I think it went well, however for those of you who attended, I’d really like to hear your thoughts!  Please take a second to leave a comment.

Here are the files used in the demo:

continuous integration.zip (8323 KB)

(included are the sample project, cruise control config, and power-point slides)

I left out the build server installation because it was over 70mb.  It consisted of Subversion binaries, Nant, and a Cruise folder with some project state data.

I got amazing help from Jean-Paul Boodhoo, who has a 9 part NAnt starter series, which ends on a screencast of setting up CruiseControl!

Additional resources were:

Monday, January 22, 2007

My Wedding

Many of you already know, I got married to Silvia on December 30th, 2006!

We had a beautiful ceremony with lots of friends and family.  Everyone had a good time.  My wife and I are quite the happy couple!  As promised, here are some pictures from the wedding.  The entire album is avaiable on flickr.

IMG_2246

IMG_2258

IMG_2293

IMG_2325

IMG_2365

IMG_2456

IMG_2551

IMG_2604

IMG_2635

IMG_2714

IMG_2725

IMG_2741

IMG_2854

 

Saturday, January 20, 2007

Database Migrations for .NET

In my search for the one-command automated build, I’ve often stumbled upon how to deal with the database while writing code on a multi-developer project.

Most of us use source control, however only a small fraction of us actually store the database scripts in source control.  This is a powerful tool that is often missed completely.

This is a development process I see frequently:

  • get the latest version of the source from VSS
  • exclusively check-out the code files you need
  • make changes to the code and the database to enable your new features
  • check in the code once it is all done
  • do a sql compare to the dev/test databases to get a delta script
  • run the compare script in the test environment and deploy the project to test.

There are a number flaws in this process, but it doesn’t stop people from continuing along this path for an entire project.  Rather than point out everything that scares me from that list, I’ll focus on the database portion.

What’s wrong with just making changes and then doing a SQL compare?  Well, for starters… that compare script is used once and thrown away.  It is never checked into source control.  If we need to restore the state of an application as of 4 months ago, we can do it with the code, but not the database.  The database only stays on the current version, and there’s no going back.  Another drawback is that the process is a manual one, and we want to get into automation.  Lastly, SQL Compare (and SQL Delta) are both licensed tools, and not all of us can purchase them.  At home I cannot justify the cost, so I am forced to come up with something else.

The Ruby on Rails community is lucky.  Baked into the Rails framework is something called migrations.

Let’s say you’re on a ruby project for managing houses for sale.  You get a new feature request where you want to know how many bathrooms a house has (strange request, huh?).  You make the changes to model (adding a bathrooms property) but now you need the database to support it.  So you type rails script/generate migration Add_House_Bathrooms.  This will generate a ruby code file in the /project/db/migrations/xxx_Add_House_Bathrooms.rb file.  (the xxx will be replaced with sequential ordering, so rails knows what order to execute the migrations) Inside this file are 2 methods:  up and down.  This is, how to I create the changes, and how do I remove the changes.  Inside these methods you can write code that adds and removes the column you want.

So then when you need to deploy, rails knows what version the database is on (by having a version table), and can apply the migrations since that version to bring the database up to speed with the code.  If something goes wrong, it can roll the changes back to the original version (by using the down methods).

You can even create migrations that load dummy test data, or default values for static lookup tables.

It usually only takes a little while for a cool idea to make its way into the .NET world, and migrations are no exception.  The Castle Project is a collection of many RoR-esque utilities packaged into one.  One of those utilities is called Migrator, which lives in the Generator project.

To generate a migration, you type:

generate migration Add_House_Bathrooms

With this, you can enable this style of migration in .NET.  You create migrations, these end up as C# code files in your db/migrations folder.  The same concept applies.

The migrator is fairly young, but it was extracted from CastleContrib into the main Castle trunk, so that is a good sign that it is here to stay and will have active support.

When I have more time to play with this, I’ll try and post a little demo.  For now, check out the castle project at http://www.castleproject.org

What does your team do to manage database changes and enable versioning?

Remortgage - Loans - Credit Card Consolidation - Credit Counseling