Scott Hanselman

Hanselminutes Podcast 54 - Squeezing Continuous Integration

March 09, 2007 Comment on this post [2] Posted in Nant | NCover | NDoc | NUnit | Podcast | Programming | Tools
Sponsored By

My fifty-fourth podcast is up. In this episode we continue the discussion started in Episode 4 - Continuous Integration. We're fortunate to be joined by Jay Flowers, maker of CI Factory, a Continuous Integration Accelerator that lets you get a continuous integration build running in minutes, not days. It's a generator that creates build scripts, CruiseControl server files, project structure and more. Take a look at version 0.8 and the screencast on installation and setup. We believe that there's more to just Build and Test...you can automate everything and even have your build server pop out ISO images, CDs, or complete configured Virtual Machines. Enjoy.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

Jeff finally gets with it (mm0)
Backup Package (mm5)
How to make a CI Factory Package (mma)
Code Churn, Predicting how may bugs (mm1)
Playing for Real, More Than a Scoreboard - Threshold Package (mm6)
CI Factory Installation (mmb)
VSTS Integration (mm2)
Analytics Package - Xsl exsl:document or multi-output (mm7)
Phil Haack A Comparison of TFS vs Subversion for Open Source Projects (mmc)
Updated AsyncExec stuff (mm3)
Analytics Package Screen Capture (mm8)
Traceability and Continuous Integration (mmd)
AsyncExec stuff (mm4)
A Recipe for Build Maintainability and Reusability (mm9)

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Our sponsors are Telerik and /n software.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Screencast: Writing Managed .NET Plugins for the Optimus Mini Three Keyboard

March 08, 2007 Comment on this post [9] Posted in Coding4Fun | Learning .NET | Programming | Screencasts | Tools
Sponsored By

Here's a screencast demoing writing Managed .NET Plugins for the Optimus Mini Three Keyboard.

I'm a fan of the Optimus Mini-Three Keyboard for its potential. It's a harbinger of things to come, like someday a complete keyboard with screens for keys. Their hardware is wonderful. But, as a design shop with a specialization in hardware, not software, their software plugin model leaves much to be desired.

When I did my video on an Optimus Mini Three post in managed code, I ended up P/Invoking into their library, bypassing their plugin model and opting instead for a command line experience. Bummer, right?

The Optimus Configurator is pretty, to be sure, but it's programming model is obtuse and trapped in the C++ world. And not the nice OOP C++ world, the nasty part of that world.

The "implement these dozen virtual methods that tunnel strings via magic indexes" world:

virtual BOOL Paint(int button, HDC hdc) = 0;

// to collect INFO_* values from plugin 
virtual LPARAM GetInfo(int index) = 0;

 Meh. When your unmanaged C++ plugin gets called, the configuration app will call your GetInfo at least 20 times, passing in different magic numbers to get information about your plugin like name, webpage, version, etc. Not only are there these internal semantics to grok, there's a whole get/setProperties state bag thing to manage as well.

It's a common pattern for plugins though, especially when you as the host want to provide persistence to your plugins. The Windows Live Writer plugin model is similar...I had to maintain state for my Insert Amazon Links WLW Plugin via the same pattern.

On the other hand, the Paint stuff is very clever, actually. You get an HDC (handle to a device context) passed in, you paint to it, and they handle getting the resulting image over to the Optimus via their USB to Serial Bridge.

Screencast of managed Optimus Mini Three Keyboard PluginsBut, their plugins aren't managed code, and I believe that this more difficult model explains the fact that while the device is selling well, there are only (as of the writing of this post) three 3rd party plugins.

Harald Röxeisen went off (he says after reading my post...Cool!) and has released an alpha of a .NET library for Optimus Support. However, rather than supporting managed plugins in the Optimus Configurator, he's written his own configurator from scratch in .NET, and built a plugin model on top of that. It's basic, but a fantastic start. He proves my point about writing plugins, as even his alpha include THREE all new plugins written against his managed API. Excellent.

For me, I've done the inverse of Harald, and got managed plugins to work inside the existing configurator. After my last post, I got great ideas from Matt Davis of DocumentCommand and Jason Copenhaver. Jason's was managed/unmanaged C++ that would provide a bridge, and Matt's used COM and the .NET COM Interop stuff as a middleman. For me, Matt's was faster as I know that stuff pretty well.

Here's the general idea...Matt's shim implements the C++ virtuals that the configurator expects and calls CoCreateInstance on a known ProgId, in my example it's "Optimus.Nothing." Could be whatever. You'll need one shim and one ProgId per managed plugin as far as I can see. That call to CoCreateInstance is actually activating a .NET assembly that is implementing Matt's COM interface (that we might want to make even more COMish) created via TlbImp. Since we're .NET, the runtime and we get loaded, and wackiness ensues. 

We're in a no-man's land between managed and unmanaged code (and I'm sure we're leaking like a sieve) but we do things like Marshal.StringToHGlobalAnsi(managedString).ToInt32(); and

static int i = 0;
public int Paint(int button, IntPtr HDC)
{
    i++;
    DebugWrite(button);
    using (Graphics g = Graphics.FromHdc(HDC))
    {
        Brush b = ((i % 2 == 0) ? Brushes.Blue : Brushes.Red);
        g.FillRectangle(b, new Rectangle(0, 0, 96, 96));
    }
    if (i > 100) i = 0;
    return 1;
}

...for example. But, happily, we seem to not be noteworthy because the Mini Configurator loads us just fine.

I've approached Harald and perhaps we'll figure out a better bridge for .NET plugins where I could write a plugin that supports his managed API and use it in either his configurator, or the original configurator from Optimus. If I'm going to be promoting writing these plugins, we'll want the interface to hide a lot of the dispatchy stuff, more like the plugin model Bryan Batchelder and I did for the USB Security Key Fobs.

In Harald's .NET configurator, the abstract class you derive from to create a "Harald plugin" is very clean and includes new features like OnKeyHold and OnKeyDoublePress that the Optimus software doesn't make easy. He also, of course, uses BCL types like Bitmap over HDCs.

public abstract class OptimusMiniPlugin
{
    protected OptimusMiniPlugin();
    public abstract void Initialize();
    public virtual void OnKeyDoublePress();
    public virtual void OnKeyDown();
    public virtual void OnKeyHold();
    public virtual void OnKeyPress();
    public virtual void OnKeyRelease();
    public virtual void OnKeyUp();
    public abstract void Repaint();
    public void RequestNextUpdate(TimeSpan interval);
    public abstract void Terminate();
    public abstract void Update();
    public void UpdateImage(Bitmap image);
}

I'm excited to see the possibilities for this little device. Perhaps between my stuff and Haralds (and someone elses?) we can get a Windows Vista Side Show driver working for this thing...probably time for YAGCP (Yet Another Google Code Project). For now, here's what I've got. I'll do a Coding4Fun article on this in much more detail this weekend perhaps, for now, it's just scribbles and it works on my system. ;)

I wonder if the Optimus Keyboard folks care...I hope so. I'm convinced that writing managed plugins is easier than unmanaged (on Windows or in Mono). Is this even worth debating?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Email Signature Etiquette - Too Much Flair?

March 08, 2007 Comment on this post [23] Posted in Musings
Sponsored By
If you enjoyed this post, or this blog, please make a secure tax-deductable donation to the American Diabetes Association. Please read my personal story about life as a diabetic and donate today.

The topic came up on a mailing list this morning, when a colleague (whom I respect and am friendly with, to be clear) posted an email where his email signature was, according to Scott Stanfield's measurements, about 810 pixels tall. It is recreated here in a two-page format, because the signature was too long to fit on one page.

I responded, in jest,

Could you speak up? I couldn’t hear you over your email signature…

...and a discussion about Email Signature Etiquette ensued. Adam Cogan has some good suggestions on signatures:

  • They should include the phone number – if you want business
  • They should *not* have the address/location – rarely needed so find it on the website
  • They should have a URL
  • They should have a tag line (Scott: I disagree)
  • They should *not* have the email address
  • I don’t believe in images in footers – although I now have an exception for photos as they make things more personal
  • I believe in a tiny bit of corporate colour – for branding purposes
  • Your big signature should only be included *once* a thread

Looking back in time through the list server, with Scott Stanfield's help, we see a lot of different email signature styles.

Now, none of these are REALLY obnoxious...Some are classy and understated, with small icons as flair:

Some are a little louder and include a picture of a bull horn and a human ear:

 

Some are quick minimalist and to the point. Phone, Messenger, Blog. Full stop. I like.

Some use five different fonts and 7 colors, without being too garish:

Some have the audacity to include a picture of the author's huge head and an animation. Apparently you can get banner ad space on the forehead for a price.

Some have logos and certifications as pictures...

Others include everything there is to know about that person, including a quote from Einstein.

After we teased him, Joel went minimalist, and it was good.

 

The he went more minimalist...

Then he, apparently, became a Buddhist, threw out all his worldly possessions and became like Prince, recognizable only as a symbol. ;)

 

I think a good email signature says what you need it to say without distracting from the message.

As far as the address to my work, my phone number, these are things I'll send them out of band via Plaxo or IM, or whatever. Email is the primary way I start a conversation, and phones, IM, and other things are easily exchanged later, so I don't need them in my sig.

Now, go audit yourself. How long is your signature? Are you including inspirational quotes that might not be germaine to the conversation, or is your address and phone number on 8 lines instead of 2? Maybe we need a Daily WTF for Email Signatures?

If you have some REALLY obnoxious signature examples, post them on flickr, or on your site, link to them in HTML in the comments, or link back to this post.

UPDATE: I've since changed my mind and I'm against pics in signatures. I just have two dashes, then my name and domain. Like this:

--

Scott Hanselman http://hanselman.com

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

NewsBreak RSS Feed Reader and Podcasts on PocketPCs

March 07, 2007 Comment on this post [9] Posted in Reviews | Tools
Sponsored By

If you're looking to read feeds on a PocketPC or SmartPhone and listen to podcasts, there's a number of choices. NewsBreak 2.0 just came out, and this site's feed looks pretty decent on it.

While this blog renders pretty nicely on a PocketPC due to DasBlog's mobile support, the site isn't very bandwidth friendly, nor, of course, is it available offline.

The screenshot on the left is the site in PocketIE, and the screenshot next to it (and the one at far right) is my blog's Feed in NewsBreak. Notice that NewsBreak uses ClearType in its reading view - not sure why that's not working in PocketIE or in NewsBreak's view showing list of posts.

   

It also supports podcasts, which is pretty sweet. I'm still evaluating options, but seems to be that $8 for a piece of software is pretty cheap. It supports PocketPCs and SmartPhones.

For now, NewsBreak is US$7.95 until it's not, then it'll be $19.95. Check it out.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Is the Library at Alexandria burning every day? How do we cluster the cluster?

March 07, 2007 Comment on this post [4] Posted in Musings
Sponsored By

Stuart discovered splogs today and Jeff learned to lower his blog's bandwidth. Hard learned lessons both, but both got me thinking.

Splogs: If you look at SplogSpot, their weekly splog dump XML file is 56Megs this week. I guess if you filled a library with 90% pron and 10% content (or 99% and 1%) you'd have a pretty interesting library. Does it make things hard to find? Sure, especially if the goo is mixed in along site the good stuff.

Distribution of Responsibility: Jeff's starting to distribute his content. Images here, feed there, markup here. Ideally his images would be referenced relatively in the markup and stored locally, and he'd rewrite the URLs of those images on the way out, be they hosted on S3 or Akamai, or Flickr.

Aside: The Rails guys are definitely ahead of the .NET folks on this stuff, with things like asset_host, and gems that support hosting of files at S3 and elsewhere. Distribution of content and load is a good thing, but only if you can turn it off at any time, and easily. Every external dependency you add is a potential weak point in your content delivery - and content permanence - strategy.

I went looking for something yesterday and found it, I thought, on an old broken-down Tripod.com site. When I got there, however, it was just the text, the links to CSS, some JavaScript and more importantly, images, were long gone.

Broken images on a web site are the equivalent to broken windows in a building; fix them, or they mark the beginning of the end. - Me.
(Call back to old partially-related-but-not-really-but-he'll-tell-me-it-is Atwood post :P )

Which leads us to the Day's Questions:

  • Is the addition of splogs to the Global Index representative of a watering-down of content? Does the proliferation of content-free MySpace pages increase the internet's usefulness, or decrease it?
  • Does the breaking apart of "atoms" of content - like this post, for example - into "quarks" of text, images, styles, etc, all hosted at different locations, affect it's permanence and, forgive me, historical relevance?

I would propose that in both cases, there are emerging problems. Spam and Splogs must exist because there are eyeballs looking at them. Otherwise they (the evil-doers) would stop, right?

Breaking apart content into multiple delivery channels at different hosts helps to offset the cost to host the content. Right now the bandwidth costs for hosting this blog are covered by advertising because I update the blog regularly.

But, if I stopped adding new content, I'd stop getting advertisers, then I'd stop paying the bandwidth bill and the blog would rot. Folks might stumble upon the rotting carcass of this blog in some far-flung theoretical future (like two years from now...WAY out there in Internet Time, people) and find only text, no images, broken javascript and wonder if a library burned? How is content permanence possible? If I don't pay my DNS bill, the site disappears. If my ISP goes out of business, the site disappears. If flickr goes out of business, many photo links on this site disappear. Is it reasonable to depend on these external services?

When the Library at Alexandria was at its peak, apparently 100 scholars lived and worked there. In the time it took to read this sentence, I'm sure 100 MySpacers have joined up. Not exactly scholars, but you get the idea. Things are moving fast, and they aren't lasting long. Some might argue that Wikipedia itself isn't "scholarly" and lowers the bar as well, although I find it useful more often than not. Either way, there's a crapload of information out there with 20% of the planet adding new content everyday.

Alexandria failed because it had no geo-located redundancy. Like the vast majority of of human knowledge, it wasn't clustered. The internet, on the other hand, is a cluster in more ways than one. But is it useful and is its usefulness permanent?

If I may mix my metaphors, is the future of the Internet a worldwide library like Alexandria at its peak, or are we doomed to collectively search a Bathroom Wall for the wisdom of the ages?

I don't know if the flash-mob that is Digg qualifies as a good filter.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.