April 2006 - Posts

Reston Code Camp - Register now.
Friday, April 28, 2006 1:11 AM

The Reston Code Camp has been announced for June 10th 2006.  This will be the 3rd Reston Code Camp - they are a great way to get your skills and knowledge up to date in a single day (and they are free!).  You can register here.

The Call for Speakers is hereSahil Malik is chairing the Data Track and is looking for local presenters!

I have submitted a few proposals (some new material such as the Tao of TDD and Refactoring) which should be fun.  See you there!

 

Jonathan Cogley is the CEO and founder of Thycotic Software, a .NET consulting company and ISV in Washington DC.  Thycotic has just released Thycotic Secret Server which is a secure web-based solution to both "Where is my Hotmail password?" and "Who has the password for our domain name?".  Secret Server is the leader in secret management and sharing within companies and teams.

 

Pair Programming Presented
Tuesday, April 25, 2006 1:01 AM

Over the last few months, I have presented a session on Pair Programming to two User Groups (WinProTeam Rockville and PA FoxPro) and one Code Camp (Richmond this last weekend).  I especially enjoy presenting this topic for a number of reasons:

  • It is not .NET specific so you can take it to many audiences (which gives different perspectives)
  • It draws lots of discussion from the audience who frequently relate personal experiences
  • Audience participation is mandatory by having a hands on exercise
  • It is controversial (and controversial topics are always interesting!)

We *believe* in Pair Programming and have practiced it for several years now so we are not just preaching a new fad or reading from a book - meaning we also have lots of best practices to share (and funny stories).

Presentations seem to work best when the audience gets involved and is forced to think ... read: less Powerpoint slides and more paper, pens and stopwatches.  But how do you get an audience to pair program together en masse? Get them to do the next best thing:  math problems! (yeah, that is usually the response I get from the audience too).  Actually many techies do live in the strange realm of the human population who actually *enjoy* word problems, so the complaints are minimal.

How does it work?

  • Pieces of paper are picked out of a hat (or promotional item) by each member of the audience.  The paper has either a pear or a gun on it.  This represents their assignment to either the group of "pairs" or the group of "lone guns".
  • "Pairs" are then randomly grouped into twos and arranged to sit next to one another.
  • "Lone guns" are grouped together away from the "pairs".
  • Each pair and lone gun gets a piece of paper containing the same 3 problems.
  • Everyone is given 15 minutes to complete the problems.  "Lone guns" must work on their own without discussing the problems with anyone else.  "Pairs" are encouraged to talk to each other but not across "pairs".
  • At the end of the time, everyone swaps papers and we score the results as a group. Scores are given for responding to the question and for whether the answer is correct.
  • A group discussion was then held to share ideas, impressions, observations, etc.

What were the results?

  • In two of the sessions, the "lone guns" performed slightly better than the "pairs".  In the one session, the "pairs" performed 100% better than the "lone guns".
  • Both groups seemed to respond to pretty much all of the questions so the differentiator was the accuracy of the answers.

Interesting observations:

  • The groups always enjoyed the exercise and really loosened up to further discussion of Pair Programming techniques, benefits, challenges etc.
  • Several "lone guns" expressed feeling 'left out' and wished they also had someone to talk to about the problems.
  • One of the questions deliberately had a subtle ambiguity in the language - the "pairs" resolved the ambiguity more effectively than the "lone guns" who complained and struggled with the question.  One gentlemen in a session (who shall remain nameless!) complained about the question - at which point we poked fun since it seemed he was complaining that the specifications weren't clear... :-) (a pain any software developer knows only too well!)
  • "Lone guns" always appeared to be very quiet and focused during the time.  Many admitted afterwards that would seldom have been able to keep up the same intensity for long periods in the workplace.
  • One question involved an obscure regular expression - this was answered more successfully by the "pairs" since one of the two was more likely to be familiar with regular expression syntax than a "lone gun".
  • No negative comments were received from the pairs - for example: no-one expressed that they could have solved the problems better alone.  Many positive comments were received about how much they enjoyed working on the problems together.  Some did mention that they felt like they spent a lot of time just talking about the problems.

Conclusion

Please note that my findings are hardly scientific but were mostly just an experiment to generate discussion and thinking on the subject of Pair Programming.  In this regard, they were successful since everyone seemed to enjoy the sessions and we all gained some new insights into our social problem solving abilities.

If you are interested in the slide deck, you can find it here.

For the really curious, here are the problems:

  1. A User Group Pizza is cut into 12 pieces. 11 of the pieces are the same size. The 12th piece is half the size of the others. What fraction of the User Group pizza is the smallest piece?  Drag here for the answer:  1/23 (Courtesy webmath.com)
  2. Each of two developers can drink a six pack of Mountain Dew in 20 minutes. Together with a third developer, they finish the six pack of Mountain Dew in 6 minutes. In what time can the third developer drink the six pack of Mountain Dew alone?  Drag here for the answer: 15 minutes (Courtesy webmath.com)
  3. What is this and what is it used for?   [:]{1}[-~+o]?[)>]+   Drag here for the answer: A regular expression to find smileys/emoticons. (Courtesy Ullrich Clemenz Canaan)

 

Jonathan Cogley is the CEO and founder of Thycotic Software, a .NET consulting company and ISV in Washington DC.  Thycotic has just released Thycotic Secret Server which is a secure web-based solution to both "Where is my Hotmail password?" and "Who has the password for our domain name?".  Secret Server is the leader in secret management and sharing within companies and teams.

MVP Reawarded!
Wednesday, April 19, 2006 10:04 AM

I am very pleased to blog that I have been reawarded as a MVP (Microsoft Valued Professional).

Recently I have been more involved in the Microsoft marketing and Microsoft partner side of the house and it is amazing how far this credential has been communicated within Microsoft.  Microsoft employees are certainly aware of the contributions made by MVPs and seem to always be looking for more ways to engage MVPs in their programs.

Ps.  Don't miss the Richmond Code Camp this weekend if you are in the area - register here.

Jonathan Cogley is the CEO and founder of Thycotic Software, a .NET consulting company and ISV in Washington DC.  Thycotic has just released Thycotic Secret Server which is a secure web-based solution to both "Where is my Hotmail password?" and "Who has the password for our domain name?".  Secret Server is the leader in secret management and sharing within companies and teams.

by thycotic | with no comments
Filed under: ,
Speaking at the Richmond Code Camp on Saturday, 4/22/2006
Tuesday, April 11, 2006 2:27 PM

I will be presenting on two topics at the Richmond Code Camp on 4/22/2006.  The event starts at 8:30AM and runs all day.  If you have never been to a Code Camp before, you are missing out.  They are a great place to ask questions and find out about technology from your local community.

My topics are:

You can register here.

Jonathan Cogley is the CEO and founder of thycotic, a .NET consulting company and ISV in Washington DC.  thycotic has just released Thycotic Secret Server which is a secure web-based solution to both "Where is my Hotmail password?" and "Who has the password for our domain name?".  Secret Server is the leader in secret management and sharing within companies and teams.

Duplicate column name weirdness in ADO.NET
Monday, April 10, 2006 7:11 PM

I came across the following issue the other day with a very large stored procedure that had *lots* of columns.  Unfortunately I had introduced a duplicate column name by using "as" in my SQL but things definitely work as I expected.  Take a look for yourself ...

  1 using (SqlConnection connection = new SqlConnection("user id=x;password=y;server=localhost;"))
  2 {
  3 	connection.Open();
  4 	SqlDataAdapter adapter = new SqlDataAdapter("SELECT 1 as A, 2 as a, 3 as a", connection);
  5 	DataSet dataSet = new DataSet();
  6 	adapter.Fill(dataSet);
  7 	DataTable table = dataSet.Tables[0];
  8 
  9 	Console.Out.WriteLine("table.Rows.Count = {0}", table.Rows.Count);
 10 	Console.Out.WriteLine("table.Columns.Count = {0}", table.Columns.Count);
 11 	Console.Out.WriteLine("table.Rows[0][\"A\"] = {0}", table.Rows[0]["A"]);
 12 	Console.Out.WriteLine("table.Rows[0][\"a\"] = {0}", table.Rows[0]["a"]);
 13 	Console.Out.WriteLine("table.Rows[0][0] = {0}", table.Rows[0][0]);
 14 	Console.Out.WriteLine("table.Rows[0][1] = {0}", table.Rows[0][1]);
 15 	Console.Out.WriteLine("table.Rows[0][2] = {0}", table.Rows[0][2]);
 16 	Console.Out.WriteLine("table.Columns[0].ColumnName = {0}", table.Columns[0].ColumnName);
 17 	Console.Out.WriteLine("table.Columns[1].ColumnName = {0}", table.Columns[1].ColumnName);
 18 	Console.Out.WriteLine("table.Columns[2].ColumnName = {0}", table.Columns[2].ColumnName);
 19 	Console.Out.WriteLine("table.Rows[0][\"a1\"] = {0}", table.Rows[0]["a1"]);
 20 	Console.Out.WriteLine("table.Rows[0][\"a2\"] = {0}", table.Rows[0]["a2"]);
 21 	Console.ReadLine();
 22 }
 23 

Think you know what the output will be?

table.Rows.Count = 1
table.Columns.Count = 3
table.Rows[0]["A"] = 1
table.Rows[0]["a"] = 1
table.Rows[0][0] = 1
table.Rows[0][1] = 2
table.Rows[0][2] = 3
table.Columns[0].ColumnName = A
table.Columns[1].ColumnName = a1
table.Columns[2].ColumnName = a2
table.Rows[0]["a1"] = 2
table.Rows[0]["a2"] = 3

I was surprised that I didn't get an ambiguous column name error but the "as" keyword does not seem to mind duplicates ... interesting.  How does ADO.NET then handle this since we can see the retrieval of the column by case specific indexer does not affect DataRow.Item[string]'s behavior?  It uses weird a1 and a2 columns. 

Any ADO.NET gurus know why this happens or where it is documented? (I couldn't find any mention of this behavior in the docs).
(I am using .NET 1.1 in this code and haven't tried it yet with 2.0)

 

Jonathan Cogley is the CEO and founder of thycotic, a .NET consulting company and ISV in Washington DC.  thycotic has just released Thycotic Secret Server which is a secure web-based solution to both "Where is my Hotmail password?" and "Who has the password for our domain name?".  Secret Server is the leader in secret management and sharing within companies and teams.

by thycotic | 3 comment(s)
Filed under: ,
More Posts

This Blog

Syndication