Software Mechanics
Why do we even have that lever?

Catching up with recent stuff

May 1, 2010 15:39 by chris

Wow, get a little behind and how time flies. Sorry for the delays, folks, I’ve had some personal issues which kept me from updating this blog when I really should have.

So, in no particular order:

  • Enterprise Library 5.0 has been released! Grigori has the full release announcement, along with download links. The doc set is going through the final, final, FINAL edit passes right now, and hopefully should be out early next week. Once we get the docs out, the final standalone Unity 2.0 installer will release as well. In the meantime, if you want the Unity 2.0 bits, they’re included in the Entlib 5.0 bin directory. And yes, we know the MSDN landing page still points to Entlib 4.1 – MSDN is doing some kind of database migration (I neither know nor want to know the details) which have rendered our landing pages read-only until they’re done. The update is ready to go but until their system is updated we’re stuck with the old one.
  • As part of the Entlib 5.0 release, I did an interview with the Pluralcast about Entlib. I don’t think I made too much of a fool of myself. :-)
  • I did two presentations at the recent Seattle Code Camp. One was, to be honest, a flop, but the other one, titled “Abusing Lambdas for Fun and Profit” was quite well received. I’ve had several requests for the source code to that presentation, so I’ve put the slides and code up on my download page. Enjoy!

I guess that’s it for the moment. Have fun, and be sure to let the team know what you think of Entlib 5!


Currently rated 1.6 by 43 people

  • Currently 1.604649/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | Entlib | p&p | Unity | Personal
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Holiday Visitors

January 23, 2009 17:27 by chris

Having just gone through the bloodletting at work (luckily nobody in p&p was on the cut list, but we all know people who were), I wanted to think about something cheerier. And I figured this worked.

My parents came to visit over the holidays. Actually, they almost got stuck here when the airport shut down due to the massive 3 and 1/2 inch snowfall that closed down the Puget Sound area for three days. But that wasn't the cheery part. ;-)

So I'm putting my son to bed, when my father, who was sitting on the couch, hears a tapping on the back door to the deck. Thinking it's the dog, he goes to open the door when he sees the dog asleep on the floor in the living room. So who, pray tell was tapping at the back door?

Visitor

This full size racoon had climbed up onto our back deck, and decided he wanted to come inside. He wasn't aggressive, just cold, apparently. The cat had lots of fun staring at the racoon through the glass door, and we all just sat there amazed. It even tried to scratch its way through the door at one point.

gilbertvscoon letmein

Eventually it wandered off. I've never been that close to a racoon before. I was especially glad it wasn't rabid. :-) I often lament us living out in the middle of nowhere, but sometimes things like this come along to make up for it a little.

Sadly, our pictures didn't come out so well since I was trying to take a shot from a well lit room into a dark area through a glass door, but at least we have some evidence.

Oh, and the dog? Slept through the whole thing. :-)


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Personal
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

HP - Printer great, software is epic fail

September 16, 2008 16:56 by chris

My old HP Deskjet 970cse gave up the ghost about six months ago in a very annoying way. The print head worked fine, but the roller lost its grip on the paper, so every printed page skewed sideways as it printed.

I don't need color printing that much, but the Deskjet printed great photos and the occasional color PDF, albeit very slowly. I'd been researching a replacement for quite a while, asked around ... and then impulse bought an HP Color Laserjet CP1515n at Costco. ;-)

For less than $300, I'm thrilled with the print quality, and it eats toner a lot slower than the deskjet ate ink. Network interface included as well, so it just plugged in and worked. Loving the hardware.

The software, on the other hand...

I installed the print driver. At least, I thought it was a print driver. But oh, no - apparently I was to be treated to the HP experience. I now have not one, but TWO HP crapplets in my notification tray. One, the HPToolboxFX, is semi-useful, as it lets me look at all the printer settings, toner levels in the various cartridges and how many more pages I'll get out of them, that sort of thing. But does it really have to be in the system tray?

The other one, the "HP Digital Imaging Monitor", is apparently useless. If you double click on it, it brings up the "HP Solution Center", yet another crapplet whose primary function is to - open the HPToolboxFX! ARGH!

And, to top it off, for the last week every time I log in there's a background HP Updater process that demands admin privileges. If I give it, it tells me there's "two high priority updates". Try to download, it downloads two files and then - promptly fails to install them. And there's not even a configuration button to tell it just go the heck away!

I'm about to go looking for the business drivers, which HP usually has, which is the stripped down driver only install for companies that don't put up with this crap. But why would they go out of their way to force their crap into my face at every opportunity? This is not selling me on future HP products, people!


Currently rated 4.1 by 8 people

  • Currently 4.125001/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Personal
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Hosting BZR Repositories on IIS

September 16, 2008 16:42 by chris

I posted quite a while ago about using the Bazaar distributed version control system to provide offline capabilities for TFS. I've still been using it that way, but I've found that Bazaar is working quite well for me as a personal, low overhead source control system.

One of the nicer things about Bazaar is the easy hosting and sharing of repositories. All you need for a read-only repository is to put it up on web server. No special configuration required. And yet, every time I tried putting a branch up on this server, it failed.

Turned out that the problem comes down to the bazaar repository format. More specifically, there are filenames in there without file extensions, and IIS just doesn't like that (unless you put in a wildcard mapping which has tons of other issues). I was at a loss, when I remembered that I can just fake it with ASP.NET.

The trick was to give the request an extension. And there's an extension already configured that's perfect here - .ashx, or the ASP.NET HTTP Handler. So what I did was build a hander that takes an url like this:

http://www.tavaresstudios.com/branches.ashx/[Repository Name]/... bzr paths here ...

and feed the resulting files back to the bazaar client. The actual path gets munged a little. I don't need to worry about encoding or anything else, just stream the bytes straight back out to the client.

Here's the code:

using System;
using System.Web;
using System.IO;
using System.Configuration;

/// <summary>
/// A small <see cref="IHttpHandler"/> that returns the contents of the file
/// under given pathdata. Used to serve up files that don't have an extension.
/// </summary>
public class BranchesHandler : IHttpHandler
{
    public void ProcessRequest(HttpContext context)
    {
        string requestedPath = context.Request.PathInfo;
        string root = GetBranchRoot();

        string resultPath = context.Request.MapPath(root + requestedPath, root, false);
        string rootPath = context.Request.MapPath(".", root, false);

        if (!resultPath.StartsWith(rootPath))
        {
            throw new HttpException(404, "File not found");
        }


        context.Response.ContentType = "application/octet-stream";
        CopyFileToResponse(resultPath, context.Response);
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

    private string GetBranchRoot()
    {
        return ConfigurationManager.AppSettings["BranchRoot"];
    }

    private void CopyFileToResponse(string filePath, HttpResponse response)
    {
        if (!File.Exists(filePath))
        {
            throw new HttpException(404, "File not found");
        }

        response.TransmitFile(filePath);
    }
}

As I build future samples, I'll still make them available as .zip files, but I'm also planning to put the bazaar repository up as well for folks who want to track them.


Currently rated 1.6 by 41 people

  • Currently 1.634147/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | Personal
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Working offline with TFS

February 28, 2008 18:09 by Chris

At p&p, we use Microsoft Team Foundation Server for work item tracking and source code control. This comes as a surprise to exactly zero people I'm sure. Laughing

TFS did take some getting used to, but after working with it for a while it's gotten pretty comfortable. At least while I'm in the office. There's one nagging problem with it; when I go home, or out of the office, I've got to have corpnet access to work on the project. TFS tracks on the server which files you're editing, which means that even working on a local copy without doing a checkin requires access to the TFS server.

While I do have remote access, it's a pain, it's slow (I live about three miles beyond the borders of civilization, apparently, and my home can't get real broadband service), and at times unreliable. I've resorted to turning all the read-only bits off locally, editing away, then using the Team Foundation Power Tools uu and online commands to get synced back up.

This worked, but I hate working without a net. I still want source control, even just for local projects. And the tfpt commands get really confused if you delete files, so I needed a way to track that somehow, other than a pad of paper.

I just came up with an idea that I'm trying out, and thought I'd share.

I've been playing for a few months with a new open source source control system called Bazaar. It's intended as a distributed version control system where people ship patches to each other and it help manage the merges and whatnot (kind of like GIT). It's highly portable and plays nicely on Windows (unlike GIT). You do need to be comfortable at the command line, but that's not a problem for me. One of the nicest things for my purposes is that there's no server to set up. Each working tree is it's own working repository. You just type "bzr init ." and you've got source control on that directory. No need to set up a Subversion server, for example. And sharing my branches are as easy as emailing a file. Not that I've done that yet; this was just for me.

Anyway, back to the point. Here's what I'm doing. First, I made my TFS workspace into a bazaar repository as well. This means that as I make changes in TFS, bazaar will treat them as changes to the working copy, and I can check them into bazaar too. Second, I created a separate bazaar branch for my offline work. This gives me local source control; as long as I'm working in my local branch, I don't need to be connected to TFS at all.

Here's the money shot. Bazaar supports easy merging between branches. When I'm ready to commit to TFS, I push my changes from my local branch back to the TFS bazaar branch. Then I check that into TFS. Similarly, I can do a "get latest" in TFS, check into the master bazaar branch, then merge those changes into my local copy.

It's not quite seamless (I still need to play with tfpt to get the checkouts set up right) but so far it's working out a LOT better than working completely disconnected from source code control. Having local source code control makes this work a lot more agile; I can freely delete and modify stuff locally, check in or even branch some more, and I don't have to push back up to the server until I'm ready.

So far this system has been in use for about four hours, but so far so good. I'll update later once I've got more experience with it.


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Lamenting the passage of a misspent youth

January 28, 2008 16:56 by Chris

I officially became old today. 

It's not that Phil Haack just had a birthday, and it turns out he's five years younger than I am. It's not that, after a long history of being the youngest guy on the project, I'm now the senior "guru". It's not even the aches and pains that are getting more and more common.

I finally got a chance to start playing Half-Life 2, after waiting for it to hit the bargain bin for several years. I was playing today, and after less than thirty minutes I got so motion sick I actually had to go lie down for an hour waiting for my stomach to stop chrurning.

When do I get to start telling kids to get off my lawn?

 

 


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Personal
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

And so it begins...

January 5, 2008 17:07 by Chris

I've been a professional developer for about 15 years, and a hobbyist for a lot longer than that. Over the years, I've seen waves of "technical celebrities" come and go. At the beginning, I recognized named because they wrote magazine articles or books. Everyone's heard of Charles Petzold. Do folks remember Jeff Duntemann or Michael Abrash? How about Scott Robert Ladd?

Later, at least for me, the "in the know" folks were the ones who did the conference circuits. Chris Sells, Don Box, Jeff Prosise, and such were my idols (and, luckily enough, some of them later became coworkers).

These days, it seems the key to recognition is the blog. Many of the the though leaders in the technical community (or up and coming leaders) haven't published a thing but blog posts.

It seems my first post on my new blog is a complaint about blogging. ;-) I get asked at work constantly where my blog is. I think it's time I grew up and joined the 21st century. And maybe this'll give me a place to write down those half-solidified ideas, confident that when I forget them later (as I always do) I know where to go look for them.

Talk to you soon!

 


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Personal
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed