If only I were

Building Great Software

Archive for the ‘Thoughts’ Category

You can stop putting Change History in source, it’s 2008

with 4 comments

v-someone        2008-08-21       Initial Version

It’s official, we are at the end of 2008 and there are lots of good source control tools out there(some of the best are free).

You don’t need to keep putting change history comments in your source if you are using source control. If you add comments when you commit your code this will be handled for you.


Written by Chris Sutton

December 5, 2008 at 10:37 am

Posted in Technology, Thoughts

Unity at CRineta

leave a comment »

Jeff Brand from our North Central Microsoft office came to CRineta and gave a very good talk on Unity, Microsoft’s dependency injection container.

From my experience when people talk about IOC/DI they end up skipping basic concepts, but Jeff didn’t. It was really good because he went back to the very beginning and built a live code example along the way. And as he built the code base, he introduced all the core concepts.

I learned a lot and think I’ll introduce Unity into my current project. Structure Map has been on my list to learn for awhile, so I’ll probably use it to compare for usability and features.

Written by Chris Sutton

November 4, 2008 at 11:12 am

Iowa Tech is Heating Up

with 2 comments

Early this year I blogged about the general state the .NET community in Eastern Iowa and Iowa in general. Some of the goals on January 1st were to see more techies blogging, more speaking, to run our first camp and to see the tech community grow in general.

So here is an update. We had an incredibly successful first code camp at the University of Iowa conference center on May 3rd. We had around 130 people attend over the course of the day with about 25 people presenting.

On the blogging front, Tim Barcz has really taken his blogging up a notch and has moved over to the devlicio.us community. Chris Missal has been doing some nice work with ASP.NET and jQuery and I hope to see some more good blogging from there.

Bryan Sampica, Javier Lozano and D’Arcy Lussier(well he’s Canadian, but that’s close enough) are writing “ASP.NET 3.5 Programmers Reference“. This is very cool to have two Iowa authors writing a major programming title.

I’m sure there are other good bloggers in Iowa who are doing good writing, let me know in comments who else is out there.

Our next code camp in Iowa is just a couple of weeks away on November 8th. It is being held at the DMACC West campus in West Des Moines. We have great speakers from Colorado, Minnesota, Iowa, South Dakota, Kansas, Texas and Ohio. We are also introducing a new format called a fishbowl in two of the sessions. Register here if you haven’t already.

The Cedar Falls / Waterloo area is getting a new Ineta group (tentatively Cedar Valley INETA) headed up by Josh Flory. We hope to see good things happen up north.

CRineta webcasted it’s first user group meeting presentation in October which was interesting. We have some work to improve this medium, but it has a lot of potential for reaching people that can make it into the meetings. Josh Flory is the primary person who made this happen, so thanks to him.

The University of Iowa has a new Ruby group as well, which is a great development.

We have 2 1/2 months left in 2008 so let’s finish this year off well.

By the way, Tim Barcz, Derik Whittaker and I might have some big news in a week or two but I can’t officially announce it yet.

Written by Chris Sutton

October 15, 2008 at 8:36 pm

YUI 2.6.0

leave a comment »

In case you missed it, YUI did a nice update recently to version 2.6.0. A lot of controls like the Rich Text Editor have made it out of beta and there are some new one added like the Carousel.

I’m looking forward to testing these updates in several ASP.NET/ASP.NET MVC projects.

Written by Chris Sutton

October 9, 2008 at 8:14 am

Posted in Technology, Thoughts

jQuery and Microsoft – Ripple Effects

with one comment

So a couple of days ago we received good and surprising news that jQuery would be bundled in the next version of Visual Studio and more immediately in ASP.NET MVC.

We are now seeing the ripple effects as DotNetNuke is deciding to add jQuery support into version 5 of their platform.

I hope to see more and more good come of this decision.

Written by Chris Sutton

October 2, 2008 at 2:37 pm

Posted in Technology, Thoughts

Tagged with , , ,

World’s simplest source code updater

with 6 comments

Update: So, I’ll fess up and admit this wasn’t the simplest. Tim Barcz did this 1 (or 2 or 3) better and simplified the script with:

FOR /D %%a IN (“*”) DO IF EXIST %%~dpa%%a\.svn svn update %%~dpa%%a

I feel like I was trying to start a fire by hitting two rocks together and Tim walked in and pulled out a box of matches.

Many of the projects I watch are hosted on Subversion repositories. I’m tired of right clicking in each directory with TortoiseSVN and clicking “SVN Update.”

So I went the simplest route possible to automate updating source. I have this set of commands in a file called update.cmd. In the morning I double click it and I can see any updates from the previous day.

Of course, you need to adjust the directories and project names for the projects you watch.

rem this script expects svn to be in the path

cd witty
svn up

cd ..\ironruby
svn up

cd ..\subsonicproject
svn up

cd ..\masstransit
svn up

cd ..\spark
svn up

cd ..\crineta
svn up

cd ..\programmingmvc
svn up

cd ..\codecampserver
svn up

cd ..\coregallery
svn up

cd ..\csla
svn up


Written by Chris Sutton

October 1, 2008 at 7:53 am


with 3 comments

Wouldn’t it be ironic if Chrome wiped out Firefox’s market share, ended up with 10-20% of the market and relegated Firefox to an Opera-like status while everyone else stayed with Internet Explorer?

I like Firefox by the way, I want to see it thrive because of its extensions like firebug and its standards compliance.

In the late 90’s Internet Explorer soundly beat Netscape. Now Netscape’s descendant who has been working tirelessly to gain marketshare for several years could be in jeopardy.

Do you think Chrome poses a real threat to Firefox?

Written by Chris Sutton

September 29, 2008 at 10:56 am

Posted in Technology, Thoughts, Web

Please stop using Visual Source Safe

with 2 comments

I’ve had this kind of error dozens of times in the last 8 years. Does this inspire confidence? If any other database that you work with corrupted itself this frequently and this drastically would you keep using that database?

If you answered ‘no’ in both cases (and I hope you did), then consider something better, stable and free like Subversion and TortoiseSVN. Or if you have the money and you need to stick with Microsoft technologies then consider Team Foundation Server. At a very minimum both of these options have atomic commits where Visual Source Safe does not.

This is a fraction of the error message by the way. I cut out 9/10 of the error message for brevity.

Visual SourceSafe Analyze Version 8.0
Copyright (C) Microsoft Corporation. All rights reserved.
Database analysis in progress @  7/16/08;11:18a.
Unable to open file ‘\\nhdev\nhvss\data\G\GGBAAAAA’.
File “\\nhdev\nhvss\data\G\GGBAAAAA” not found
The project User references a child whose physical file (GGBAAAAA) is missing or corrupted.
Unable to open file ‘\\nhdev\nhvss\data\H\HGBAAAAA’.
File “\\nhdev\nhvss\data\H\HGBAAAAA” not found
The project User references a child whose physical file (HGBAAAAA) is missing or corrupted.
The file ‘web.config’ (LEBAAAAA) lists ‘ZDBAAAAA’ as its parent, but that file does not reference it as a child or is missing/corrupted.
The item ‘Registration’ (ZDBAAAAA) is orphaned and needs to be removed.
The item ‘User’ (WEBAAAAA) is orphaned and needs to be removed.
Analysis complete @  7/16/08;11:19a
Potentially serious errors or inconsistencies were found: run ANALYZE -F to fix these problems.
To fix the database problems, you can restart the analyze using the following command:
“C:\Program Files\Microsoft Visual SourceSafe\analyze.exe” -F -V3 -D “\\nhdev\nhvss\data”

Update: If you are not the admin for VSS then you may not have seen these messages, but you see them fairly frequently if you are the admin.

Written by Chris Sutton

September 25, 2008 at 7:52 pm

Posted in Technology, Thoughts

Tagged with ,

Chat with Sarah – the future of automated help

with 12 comments

PayPal has a virtual agent that is supposed to help field questions. Maybe it is helpful in some cases, but for a significant question it is useless. Here is the actual text from our “conversation.”

Sarah – PayPal :
Hello, I’m Sarah, and I’m here to answer questions you have about PayPal. Just type into the box below and click Submit to get started.
I’m in training now, so if I don’t know the answer to your PayPal question, I’ll try to learn it for next time!

You :
I forgot my password and I can’t get it reset, can you help me?
Sarah – PayPal :
If you have forgotten your PayPal login password, or if your password has been locked, you can reset your password by confirming your identity.

1.  Visit the PayPal website at https://www.paypal.com/
2.  Click the Forgot your Password? link.
3.  Enter the email address you used to register.
4.  Enter the code shown in the security text box.
4.  Click Continue.
6.  Confirm your account ownership and click Continue.
7.  Confirm additional account information and click Continue.
8.  Create a new password and click Submit. Anything else I can do to help you?

You :
I’ve already tried that.
Sarah – PayPal :
Ok, what’s your question?

You :
I already asked my question, you need to give a better answer.
Sarah – PayPal :
I was trained to give personalised answers, which sometimes means that I may have to ask a private question or two! If you think of anything else I can help you with, I’ll be here.

You :
Can you help me?
Sarah – PayPal :
As a virtual advisor I’m here to help you with questions about PayPal.

You :
Can I talk to a real person?
Sarah – PayPal :
I may be able to help with your request. However, if I can’t answer your question, you can visit the Help Center, or Contact Us.

You :
Do you know anything about Alan Turing?
Sarah – PayPal :
I don’t understand. If you think of anything else I can help you with, I’ll be here.

You :
That’s what I thought.
Sarah – PayPal :
If there’s anything else you’d like to ask me, I’m here 24-7 to answer any questions you might have.

Written by Chris Sutton

September 16, 2008 at 3:10 pm

TDD Mentoring

with one comment

Yesterday morning I mentored two people for about 3 hours on how to think about and how to do TDD (Test Driven Development). I was a bit nervous beforehand as it was the first time I’ve formally explained and demonstrated TDD.

We started by talking about how TDD gives you a set of test cases that can help you validate the function of your libraries at a low level (now and in the future). Even more, how it encourages you to think through the design of your classes and methods because it forces you the be the first consumer of your code.

We started with what many people would consider a dangerous beginning, but it turned out really well. We began by writing test cases for existing methods and retrofitting the tests.

One method we tested just generated a random string that was then used by a CAPTCHA component. The length of the string was determined by an Integer parameter on the method. Our first step was to write a test that expected an exception if you put in a negative number. We pretty quickly decided that any length <=0 was an error condition, so we did a bit of refactoring to support that change in the method.

Next we verified that if you passed in the numbers 5, 10, 15 etc; that the length of the string actually matched. No problems there.

We were running out of interesting tests pretty quickly when Shirley stated the obvious that Carl and I had overlooked. We needed to validate that the numbers were actually random. So we put in a test that passed in the number 7 four times and sure enough the Random implementation wasn’t being seeded properly.

So in a short time, we were able to significantly improve the design of a preexisting component using TDD. There were three of us coding and discussing it, so it was very interactive and tied to real code they were using. TDD really is primarily a design technique first and a testing technique second.

We found that even though the methods were already implemented, we were able build up a great set of test cases that will keep those methods from being messed up in the future even if their implementation is updated later on. Better yet, we were able to fix the design in some significant cases. Who wants a random string generator with non-random output?

Best of all, when we were done Shirley walked away with a smile and said “this is really cool.”

Written by Chris Sutton

August 12, 2008 at 3:19 pm