February 2005 - Posts

Getting VS.NET to Recognize @ as T-SQL Variable Prefix

Some of you may be rolling your eyes at this suggestion, but it's been bugging me for months and I finally figured out how to fix it.

For many moons I've been editing T-SQL stored procedures using VS.NET, but been annoyed because every time I when to the graphical query designer it didn't know anything about T-SQL variables (i.e. @MyVar). I could get around this by right-clicking the SQL pane and changing the property page. Very conveniently the designer deleted all your SQL when you do this so I always had to remember to copy my SQL change the property page and paste the SQL back in.

Turns out there is a setting in Tools: Options: Database Tools: Query/View Designer that will take care of it.

Posted by Wayne Allen | with no comments
Filed under:

Portland, OR XP Users Group Meeting - Mar 8

XPDX is having their next meeting Tuesday March 8. If you are in the Portland, OR area next week come on by. My buddy Mark Clerget is going to talk about running an agile project in a government environment. This post is a result of some of the work they did to fit into the culture of the existing PMO.

If you are new to the group and tell me you came because of this posting I'll buy you the beverage of your choice at the pub afterwards.

Posted by Wayne Allen | with no comments
Filed under:

Published in Cutter IT Journal

My article on peer reviews has finally been published by Cutter IT Journal. Unfortunately a subscription is required to view it. I'm working on making it available freely.

Posted by Wayne Allen | with no comments
Filed under:

Engineering, Craft or What?

Patrick Logan writes about the debate regarding whether software development is a craft or engineering. He has an interesting spin in that what makes software seem "craft-like" is the informalities.

I think the "informality" of software makes it feel craft-like. If only we had more formalisms. Could be, but we'll always have "informalities". Every engineering effort, and every creative effort in general, involves many informal conversations.

The difference is perhaps software depends more on informal conversations than do many of the traditional engineering disciplines. The requirements in those disciplines are more formal. Most of software development is really requirements development. The interpretation of formal requirements is most easily expressed in software as tests and code that (correctly one hopes) runs those tests.

Ultimately Patrick says that communications is the key and that failed is a result of failed communication not lack of formalism.

Which still begs the question for me - what is it that we, the software development discipline, are envious of from the "other" engineering disciplines?

Posted by Wayne Allen | 7 comment(s)
Filed under:

David St Lawrence on Self Publishing

David St Lawrence has a series on the ongoing process of self publishing his book "Danger Quicksand - Have A Nice Day". Since I look into self publishing every few years or so for myself or clients I am finding David's ideas and resources to be right on target, not to mention that the self publishing option seems to be getting better every year. If you are remotely interested in this topic you need to read part I, part II and part III and any future posts.
Posted by Wayne Allen | 1 comment(s)
Filed under:

Clarke Ching's Secret Ingredient

A teaser from Clarke's book. If you want to know what the secret ingredient is take a look at his Sticky Minds article.

Craig interrupted my thoughts, It doesn't surprise me that you are in the mess you are in. My education and experience are in Quality and Lean thinking and it is obvious to me that when your industry embraced quality it embraced the wrong quality guru and it neglected the one vital secret ingredient that makes doing quality easy.

I sat up straight in my chair. "Secret ingredient?"

[via Clark Ching]

Posted by Wayne Allen | 2 comment(s)
Filed under: ,

Watch Out World - I'm now Certified!

Just got word today that I am now a Certified Scrum Master!
Posted by Wayne Allen | 1 comment(s)
Filed under:

Why Technology Kingdoms Rise and Fall

My guild brother Mark Clerget has a great post about Why Technology Kingdoms Rise and Fall.

That lack of disrespect for the basic customer-vendor food chain required about 2 weeks of redesign of some key backend stored procedures and processes. Needless to say, it didn’t serve to improve my perspective of Sybase. The customer spent between $100k-$200k in the original port from Sybase to SQL Server. What value did it add….ZERO. It cost more, took longer and performed poorer. Fast forward...now the customer decided that their strategic direction is to migrate all Sybase applications to Microsoft SQL Server. So, it will cost Sybase millions of dollars from this customer and any customer that I do business with in the future that is willing to listen to my experience.

The lesson I learned is this, technology kingdoms rise and fall primarily due to fear, pride and ignorance. Excellent consultants, at least the ones I am willing to work with, have no room for any of these traits. If you are on a project where fear, pride and ignorance are given free reign, raise the red flag high. Waive the flag with vigor. Get executive sponsorship and root it out. These people are the type that are continually complaining, blaming and failing. An end user cracked me up with describing these type of people like this..."Their cubicles are vortexes where all happy thoughts go to die". Sadly their teams and their organizations are where good projects go to die as well.

Posted by Wayne Allen | with no comments
Filed under:

Variable Naming (Hungarian revisited)

A friend asked me today if I preferred to add a scoping prefix to variable with class scope like so:

private int m_MyInt;

There was a time when I did do this (VB5 era), but mostly because I couldn't use just a proceeding underscore C style. When I started using C# I quickly moved back to C style naming:

private int _myInt;

However, I find myself ignoring the friendly underscore these days in favor of just plain meaningful names. The only time I find myself reaching for the top row anymore is when the underscore adds clarity. Such as when my meaningful names collide.

public class Relationship
{
private
readonly int id; private readonly bool isEnrolled; public
Relationship(int id, bool isEnrolled) { this.id = id; this.isEnrolled = isEnrolled; } }

This to me is getting icky. So I fire up my trusty sidkick Resharper and do some judicious renaming with the following results.

private readonly int _id;
private readonly bool _isEnrolled;
public Relationship(int id, bool isEnrolled)
{
	_id = id;
	_isEnrolled = isEnrolled;
}

For me these kinds of patterns only show up in DTOs otherwise I tend not to carry around a lot of class scoped variables.

Posted by Wayne Allen | with no comments
Filed under:

Extracting Column Names for a Table in SQL as a CSV String

I had a need (creating CSV BCP files) that required knowing the column names of a MS SQL table in the order they were created. Some inspiration from Mark Clerget and a little fooling around with SQL Query Analyzer resulted in the following.

DECLARE @c varchar(4000), @t varchar(128)
SET @c = ''
SET @t='authors'

SELECT @c = @c + c.name + ', '
FROM syscolumns c INNER JOIN sysobjects o ON o.id = c.id
WHERE o.name = @t
ORDER BY colid
SELECT Substring(@c, 1, Datalength(@c) - 2)

Which gives the following result:

au_id, au_lname, au_fname, phone, address, city, state, zip, contract

Perfect. Note the use of @c = @c + c.name in the select clause to colapse 9 rows into 1 row. I've used this technique many times in the past to generate a single string from multiple rows without resorting to cursors.

Posted by Wayne Allen | 20 comment(s)
Filed under:
More Posts Next page »