June 2004 - Posts

[OT] Pwned by the "F3ll0wsh1p of teh R1ng"

I usually avoid posting about off-dev/tech-topic matters, but I'm going to make an exception because this is laugh out loud funny:

http://www.hohto.to/forums/index.php?board=5;action=display;threadid=17720

It is especially great because this type of communication occurs all too frequently in the online gaming community.

BTW, if you're a l337sp34k noob, you might find this useful for translation:

http://www.urbandictionary.com/

-(hr1570ph3r

TechEd 2004 Videos and Slides Now Online

The videos and slides from TechEd 2004 are now available online at:

http://microsoft.sitestream.com/teched2004/

(Note:  You have to click on the session titles to watch video - and each takes a while to load.)

Now, I'm off to watch the videos from those numerous sessions I couldn't attend because they conflicted with other sessions!

-Chris

UPDATE:  Unfortunately, these have been taken offline.
UPDATE:  The above link is still offline, but if you attended TechEd, you can use your CommNet login to access the materials at:

http://microsoft.sitestream.com/teched/

Using "using" to Alias Enumerations

Most people understand that the C# using directive allows creation of an alias as a shortcut to a particular namespace:

using MAE = Microsoft.ApplicationBlocks.ExceptionManagement;
...
MAE.ExceptionManger.Publish(exp);

Many people know that this can also be used to alias a particular class:

using EM = Microsoft.ApplicationBlocks.ExceptionMangagement.ExceptionManager;
...
EM.Publish(exp);

I had never thought to look any deeper than that until I saw how ugly our code was getting when consuming some long enumeration names which had been generated via a tool.  It turns out that using can create aliases to enumerations (and delegates or contained classes) of a class as well!

For example (ignoring the hideousness of the contrived example logic,) compare having:

public void AmazingFeature(ObnoxiouslyLongGeneratedEnumerationName mysteryFactor)
{
   
if ((mysteryFactor > ObnoxiouslyLongGeneratedEnumerationName.Second) && (mysteryFactor < ObnoxiouslyLongGeneratedEnumerationName.Fifth))
       
//...

Versus:

using OLGEN = Experiment.TestClass.ObnoxiouslyLongGeneratedEnumerationName;

public void AmazingFeature(OLGEN mysteryFactor)
{
   
if
((mysteryFactor > OLGEN.Second) && (mysteryFactor < OLGEN.Fifth))
       
//...

This should help us keep our lines of code shorter and easier to maintain.  I hope this helps you, too!

-Chris

Information Sources in the Age of Blogging

My previous post against my stack of unread magazines has brought another matter to mind.

The sources of my technical information have shifted substantially in the past 18 months.

Previously, my sources of technical information were fairly evenly divided between browsing technology sites like CodeProject, GotDotNet, MSDN, ASP.net, etc. and reading magazines and books.

These days, I first turn my blogroll to get pointers to articles, news and books that could be of interest.  Periodically, maybe weekly, I visit the portal sites like TheServerSide and MSDN, but often I’ve already read the articles that interest me because they were called out by blog entries.  I turn to books for in-depth tutorials and reference.  Magazines, simply because I have no time left, come in last. 

The first shift for me is that much of the time I used to spend reading magazines is now invested in reading blogs

Some magazines, like MSDN, have adapted well and offer their content freely on the web (and as Stephen Toub points out, you can even read MSDN on your PDA.)  I enjoy MSDN, having been a reader through the days of Microsoft Systems Journal and Microsoft Interactive Developer.  I plan to continue subscribing because they consistently produce quality work and I want to support that.  There also remains an undeniable convenience in having a portable, pre-printed and colorful version of articles delivered to your mailbox.  Yet the fact remains that today I need to be more selective in choosing how much of that content I will read.

Another shift has been that the role which some technology sites play of being pointers to other sites and articles has been eclipsed by blogs.  I subscribe to the blogs of people working in the same areas I do and consequently, their posts lead me to the very same articles I would have clicked on had I been browsing the web myself.  Sites such as TheServerSide and CodeProject continue to hold their value because they are sources of content, not just pointers to other places.  I no longer rely on web sites to point out content for me, I have a community of like-minded people who do that very well.

Have many people experienced similar shifts?  Are there other sources of information you rely on?  Have blogs made magazines less relevant for you?  What technology sites still hold their value as sources of information, and not simply as lists of pointers?

-Chris

Text-To-Speech (to MP3) for Technical Content

I love listening to .NET Rocks while driving in my car.  The problem is, I finish each episode in a single day. 

About a year ago, I wanted to see if my other commuting and lawn mowing hours could be spent tackling my "to read" list (see also my "Stack" post.)  I experimented with available Text-To-Speech (TTS) tools to see if they would be useful for converting technical articles to MP3's so I could listen to them on my Pocket PC. 

I wasn't satisfied with the available tools at the time, which often resulted in miserable quality and generally required use of multiple tools to render to MP3.  Now, I'm ready to take a look at the current crop.

Some searching has turned up a decent number of TTS applications:

ReadPlease

ReadPlease has a helpful feature that allows you to add custom pronunciations (e.g. “.NET= dot net“) but seems to lack an option to render to MP3. 

TextAloud MP3

I liked TextAloud MP3.  The interface is a bit, well, VB4'ish, but it gets the job done.  I wish I could customize it like ReadPlease, however. 

Alive Text to Speech

Alive Text To Speech is decent as well, but I don't think the voice synthesis is as good as TextAloud.

Aye Text to MP3

I also liked Aye Text to MP3.  It has a nice clean interface and “just works.“

SayPad

I probably didn't give SayPad enough time, but I quickly realized it wasn't something I really wanted to use.  It might be a good program, but I only used it for a few minutes.

2nd Speech Center - EDITOR'S CHOICE :)

I liked 2nd Speech Center the most.  The interface is good, speech quality is superior, you can add custom pronunciations, choose between many voices and record to multiple MP3 files with one click.  You need to register it to avoid having a nag tag inserted with your MP3 (but I suppose it would be trivial to edit it out.)

Of course, these tools work best when the text has very little code ("...public int three two computesome left parenthesis right parenthesis left brace...".)  I'm willing to "listenread" an article and go back and review the code when I'm in front of a computer again, but only to a certain extent.

While most of the above tools are good for simple book text, they all seem to have problems when too many acronyms are present or try to make letters that should be pronounced individually into syllables of words (e.g. MSBuild as "muzzbuild".)  Not to fault to programs - it is a very hard scenario to detect with code - however, the end result is still quite annoying.  Being able to program custom pronunciations is very helpful, but given the large number of buzzwords and acronyms we have in the .NET world, it would be impractical to add all but the most common.

Any better tools out there?  Is anyone using TTS for technical content?  Please chime in if you have any tips!

-Chris

The Stack

Perhaps you know this feeling.

They're over there, standing by... waiting.  They call to you, gently at first, then more insistently, a hint of desperation in their voices.  Without moving, they tap you on the shoulder, reminding you of their presence.

You can understand their needs.  Each passing day further diminishes their importance, even their very right to exist.  Like pictures, they are frozen in time - as the world eagerly moves forward with changes, they are unable to keep up.

Of course, I speak of The Stack.  It started innocently and slowly at first.  That MSDN I was sure I'd finish in a couple of days, I'll just set it here.  Ah, what's this?  The new CoDe magazine?  Uh oh, now a ComputerWorld, eWeek, Mass High Tech... now another MSDN! 

If you're a developer or other type of technology person, you've probably been visited by The Stack as well. 

I've decided today to make the resolution to battle The Stack until The Stack no longer exists.  I look forward to that glorious day when I can again see that little 8.5“ x 11“ spot of my desk that has been denied its daily dose of fluorescent light for far too long.  It may be a fleeting glory, but it is a worthy goal indeed.

Join me in the battle!  Fight onward against those who dare say you cannot keep up with the flow of information! 

Be ever vigilant, else The Stack may return...

-Chris 

P.S.  The Stack has a perhaps even more fearsome brother, The Bookshelf.  The Bookshelf is a much more difficult problem to address, often requiring many trips to Starbucks to solve.  More on that battle later...

 

Visual Studio Team System - Videos & Interviews

At last night's Boston .NET User Group meeting, I gave an informal (er, very informal) presentation on Visual Studio Team System.  I mentioned that there are quite a number of video resources available. 

So, as follow-up to that, I've compiled a list of the video/audio resources I've found to date on VSTS:

Any others out there?

-Chris

VSTS Features Contrary to Test-Driven Development?

Visual Studio Team System has many great features baked right in.  Here's what might be a typical experience:

  • Fire up the Application Connector Designer.  Plot systems...  Generate projects - CHECK!
  • Bring up a Class Diagram.  Model classes and interfaces...  Generate files - CHECK!
  • Add some code here and there... CHECK!
  • Create my Test Project...  CHECK!
  • Right-click on some code, choose "Create Tests"...  Add unit tests - CHECK!
  • Start working on my tests...

Hmmm...  Wait a minute.  Something is not quite right here.

One of the ideals of Test-Driven Development (TDD) is that you should not write any implementation code without first having a failing test.  Also, a tactic of TDD is to address one test at a time from a list of continuously-evolving candidate tests.  These ideals are described in the excellent books "Test-Driven Development in Microsoft .NET" by Jim Newkirk and "Test Driven Development: By Example" by Kent Beck.

With these time-saving VSTS tools at my fingertips, I'm enticed to take the automatic route and generate as much as possible - projects, classes, unit tests, etc.  However, when I use the Class Diagram tool and then generate my tests from the resulting classes, I'm creating code without first having a failing test.  If I opt to follow TDD by manually creating a (failing) unit test first and then emploing the Class Diagram tool, I have to sacrifice the productivity other developers enjoy with the "Create Tests" option.  (Almost by definition whenever I run "Create Tests", I've probably written code without a failing test.)

I suppose one argument could be that by using the Class Designer et al., you are not actually writing "implementation", just the scaffolding upon which you will add the real mechanics.  You create your unit tests from the shell classes with empty members, then start addressing all of the Assert.Inconclusive() results.

That argument only goes so far - the concern remains that the "Create Tests" feature generally runs contrary to the approach where you maintain a list of candidate tests based on functionality.  Instead, you see the "Unit Test Generation" dialog, choose your classes and members, and effortlessly now have a suite of tests.  Unfortunately, these are based upon class members and not on specific slices of functionality to be tested.

This boils down to a basic concern that the "easy" or even "normal" way of developing systems with VSTS can run counter to some of the tenets of TDD.

Let's be clear, nobody is forced to use these tools.  However, my job as architect and standards-driver could become harder if I need to tell developers not to leverage available automation for sake of TDD purity, especially given looming deadlines.

Are there any features still to be added to VSTS which could help with this?  Maybe a feature to help people track candidate test lists?  (A new view into the Task List?)  It might include a wizard/designer such that I can take a test from the list, select a template, or target method(s) and have a shell test generated (and the test crossed off the list.)  Perhaps I could right-click on a method, a block of code or even the state of an object in the debugger and say "Add to Candidate Tests" so I could review it later?

Are my concerns unwarranted?  Does anyone have experiences implementing the “create a test first, then implement” approach in a large-scale .NET project?  If so, how do you feel VSTS will affect your approach? 

-Chris

Boston .NET User Group Meeting

If you will be in the Waltham, MA area this Wednesday night (6/9), stop by the Microsoft offices for two Boston .NET User Group presentations. 

The first, at 5:00, will be yours truly along with the other group development leaders giving a review of TechEd and an overview of Visual Studio Team System. 

The main presentation at 6:30 will be from Jeffrey McManus of eBay.  Jeffrey will speak about web services at eBay, their origins, supporting technologies and their use by affiliate companies.

It should be a great evening of content and discussion!

-Chris

UPDATE 6/9/2004 - Corrected start time of first session.

Tools Affected by Visual Studio 2005 / Team System

A common reaction to hearing about the functionality coming with Visual Studio 2005 and the Team System additions is to point out that much of the functionality already exists today in many open-source, third-party and even Microsoft products.* 

So this weekend, I wanted to quantify exactly how many of the tools that we use today at Monster will be affected by the adoption of VSTS.  That done, curiosity got the best of me and I decided to expand the list to include any tool that will be affected in some manner by the VS2k5/TS launch - whether they are swallowed entirely, have some overlapping functionality or will be integrated through the Visual Studio Integration Partner (VSIP) program.

Please let me know which tools are missing (I know there are many) and I'll keep this list updated.

-Chris

While much of the functionality in VSTS can be found elsewhere today, a primary benefit VSTS brings is one-stop shopping for that functionality and very good integration between each.  It is also important to remember that existing third-party tools will be able to integrate through the VSIP program, so we can continue to leverage these tools while enjoying VSTS integration going forward.

Tools Affected by Visual Studio 2005 Core Features

Code Editing & Refactoring