Marquee de Sells: Chris's insight outlet via ATOM 1.0 csells on twitter

You've reached the internet home of Chris Sells, who has a long history as a contributing member of the Windows developer community. He enjoys long walks on the beach and various computer technologies.




I Love Arguing with Ian

Here.

Ian and I submitted the final manuscript for Programming Avalon, Beta Edition, on July 13th (right on time, I'll point out). Since then, the O'Reilly folks have been working overtime to fix my prose (I'm not a big fan of editorial guidelines or templates). As part of that process, they sent Ian and me a 400+ page PDF file for us to check. In the process, I submit changes to the manuscript, Ian argues about the ones with which he disagrees and then I argue with his arguments. It's great fun.

Here an excerpt in which we're arguing over a single word that has nothing whatsoever to do with the technical content of the book while two professional editors from ORA watch, waiting for us to decide:

Page 51:  You want to change "breathing space" to "breathing room"?  Why?  The term "breathing space" is a common idiom.  (And judging by Google, that’s not just a UKism.)  I prefer it to "breathing room", so unless there’s a good reason to change I'd prefer to leave it.

[csells] googlefight shows "breathing room" to be slightly more popular than "breathing space," plus I’d never personally heard the latter. Also, you use the word "space" in a close previous sentence and I liked the variety.

Here we're arguing over a single word again and, to help make my argument, I claim super powers:

Page 205: Why do you want to change "useful" to "handy"? Is there something wrong with "useful"?

[csells] because you use the word "used" later in that same sentence. Having "useful" and "used" so close together made my spider sense tingle.

Here we're dealing with the vagaries of our personal styles and my preference for brevity (Ian can highlight a single word and write several paragraphs on it, while I like to highlight several paragraphs and comment "huh?"). In this case, I circled an URL and said "too big:"

Page 222: Yes it's a big URL, but there's not a lot I can do about that – if you can convince Microsoft to make a smaller URL in the next day or so, please do.  There's a shrinkster URL in there too, so I don't see what the problem is.  And I'm not going to agree to removing the original URL.

[csells] I didn't say it was a *long* URL (I can hardly blame you for that, Ian : ); I said it was a *big* URL. What I meant was, the font looks too big in comparison to the size of the fonts around it.

Here we're arguing over grammatic style, again, while two professional editors look on, letting us fight it out like children in the backseat of the car on a family vacation:

Page 224: I'm not quite sure what you’re proposing as the new text here, although I do see the problem.  How about:

"(It doesn’t matter where the UICulture element appears within this section.)"

[csells] I'm suggesting that I prefer parenthetical comments to be part of the sentence, e.g. "Foo sucks (and by 'sucks,' I mean 'blows')." You tend to do it the other way and I find it jarring, e.g. "Foo sucks. (And by 'sucks,' I mean 'blows.')" Plus, there's the matter of consistency, i.e. I do it in the former way in my writing and you do it in the latter way in yours; we should pick one and stick with it (and to be clear – we should pick my way : ). Unfortunately, I packed my Strunk & White, but I have every confidence that they got it right, too. : )

In this case, after reading several hundred pages of the book again, I was getting a little punchy, so I highlighted a Bezier curve, redrew it by a couple of pixels and suggested that after doing the math in my head, I feared a bug in Avalon's rendering of Beziers; could ORA check it with their Cray?

Page 252: Well those were all drawn in Avalon using the exact positions chosen for the control points.  Also, I've been using Bezier curves for about 15 years now, and they all look exactly as I'd expect them to look.  I just cranked up Illustrator on the Mac.  It seems to agree with Avalon…  So does Acrylic.  What maths are you doing that indicates a different result?

[csells] I was just teasing. If my mention of the use of a Cray wasn’t enough, didn’t the bit about me doing the math "in my head" tip you off? I am delighted to know that you spent time double-checking things, however. : )

See? Big fun! : )

0 comments




WinFX Beta 1 Online SDK Docs

I think the title says it all...

0 comments




Don Box Slept Here

I put my house in Beaverton, OR on the market today. Please buy it. Thank you.

0 comments




Limiting/Monitoring my sons' access to the 'net?

My 11-year old wants to do email and IM and he's already surfing the web. Does anyone have any recommendations for good software to limit and monitor his internet access? Thanks!

0 comments




Cool Avalon Default Style Trick

Karsten shows a cool trick for pulling out the default style of an Avalon lookless control. This is super useful if you want to replace an existing control's look, but you don't want to have to start from scratch.

0 comments




Have Sex With Prostitutes at the PDC

At least that's the message I'm getting from the 2nd episode of the Channel 9 guy's trip across country to the PDC (I'm not saying that's a bad message -- it sure beats the whole "ActiveX" thing...).

0 comments




I don't know who has time for this stuff @ work...

but it's fun anyway...

[Scoble]

0 comments




My First MsBuild Task

Here. The one where I built my first custom msbuild task.

0 comments




My First MsBuild Task

I wrote my first custom msbuild task this morning. I used the the Extend the MSBuild with a New Task topic from the msbuild wiki and it worked well to get me started. I started with the simplest thing that used at least an input property:

// HelloTask.cs
using System;
using Microsoft.Build.Utilities; // reference assembly of same name
using Microsoft.Build.Framework; // ditto

namespace MyFirstTask {
  public class HelloTask : Task {
    string _who;

    [Required]
    public string Who {
      get { return _who; }
      set { _who = value; }
    }

    public override bool Execute() {
      Log.LogMessage(string.Format("hello, {0}!", _who));
      return true;
    }
  }
}

My task implements the msbuild ITask interface by deriving from the Task helper base class, which provides the Log object, among other things. The only thing I have to do is implement the Execute method, which needs to return true on success. To prove that my task is called, I use the Log object to log a message (I could also log an error or a warning). The public Who property is set from the use of the task in an msbuild file. By marking the property with the Required attribute, I ensure that msbuild itself makes sure that a Who is provided.

Once I've compiled my task, I can use it directly from a .proj (or .csproj or .vbproj) file:

<!-- fun.proj -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="HelloTarget">
    <HelloTask Who="Joe" />
  </Target>
  <UsingTask
    TaskName="MyFirstTask.HelloTask"
    AssemblyFile="C:\MyFirstTask\bin\Release\MyFirstTask.dll" />
</Project>

Notice the HelloTask element, which creates an instance of my HelloTask class and sets the Who property. The mapping between the HelloTask and the MyFirstTask.HelloTask class in the MyFirstTask.dll assembly is in the UsingTask element. Running msbuild against fun.proj yields the following output:

C:\taskfun>msbuild fun.proj
Microsoft (R) Build Engine Version 2.0.50215.44
[Microsoft .NET Framework, Version 2.0.50215.44]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 7/16/2005 7:04:09 PM.
__________________________________________________
Project "C:\taskfun\fun.proj" (default targets):

Target HelloTarget:
hello, Joe!

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.04

Notice the "hello, Joe!" output by the task as its Execute method is called. Notice also that while the task is in its folder, the .proj file can be anywhere, so long as it has a UsingTask that maps appropriately. By convention, the UsingTask elements are kept in .targets files and put into shared folders to be used between multiple project files, e.g. Microsoft.common.targets, etc. Refactoring the UsingTask out of the .proj file and into a .targets file looks like this:

<!-- My.Fun.targets -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask
    TaskName="MyFirstTask.HelloTask"
    AssemblyFile="C:\MyFirstTask\bin\Release\MyFirstTask.dll" />
</Project>
<!-- fun.proj -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="HelloTarget">
    <HelloTask Who="Joe" />
  </Target>
  <Import Project="c:\My.Fun.targets" />
</Project>

Of course, a real task does far more than this one, but it was hella easy to get started.

0 comments




Amazing XAML Tool: Adobe Illustrator -> XAML

Mike Swanson has posted an amazing Adobe Illustrator to XAML conversion tool. You have to check out the eye candy page to really see what Mike's been able to accomplish; it's not perfect, but it's damn good.

0 comments




Eric Sink: The Game is Afoot

I don't know if Eric understands the ISV industry or not, but certainly seems to. Luckily, I'm on a real product team now, so I get to try to channel Eric into my work.

Eric's latest writing is The Game is Afoot, in which he describes various games and then draws lessons from them for ISVs. It's fabulous. He concludes by apologizing for the length and then teasing us with the analogies he left off. It wasn't too long, Eric! I wanted more! (I also want your blog to have comments, but that's another thing entirely...)

I think now I understand the public outcry when I suggested that I might cut down on the material in the Windows Forms 2.0 book...

0 comments




Looking forward to the Portland Code Camp, 7/23-24

The session list for the Portland Code Camp, July 23-24, has just been posted. I'm especially looking forward to the following:

That's only if my wife doesn't have my working on the house (we're prepping it for sale). Of course, I don't know if she'll understand that I've volunteered to give my own session: "Some Cool Avalon Stuff"...

0 comments




Enjoying This Moment

Here.

The one where I enjoy the passing of the book writing storm, if only for a moment.

0 comments




Is it creepy that I think this is valid?

I've used this technique to keep people from dumping their work on me. Now I'm creeped out about it...

0 comments




Enjoying This Moment

I'm sitting at my computer on Sunday morning with "nothing" to do (I mean, I could always work, but my team is good about taking weekends off). This morning comes after 3.5 months straight of evenings and weekends working on the Avalon book (I'm talking 20+ hours/week on the book on top of the 50-60 hours/week I spent getting up to speed on my new job). The final push was this week, which I took as vacation from work ("you took vacation to work!" my wife likes to say...).

Last night, I produced the 2nd draft of my last 1st draft chapter (which I was happy to trim by 17 pages w/o losing anything useful) and composed comments on a 2nd draft of Ian's chapter that was in my queue.

This morning, I took care of a reviewer comment that's been nagging me, sent Ian my feedback and composed a detailed schedule of the rest of my day which consists of:

Compared to how I have been spending my time lately, that's an extremely light day.

This book has been particularly difficult to write. Most of my writing has been on insights that I or the other members of the community have discovered in the use of the technology. These kinds of insights come after the technology is shipped and we've all had a chance to get to know it. Avalon, on the other hand, has a ways to go before it ships and the developer community is very small. Plus, some parts of Avalon don't work very well or have changed significantly since I first learned about them. The consequence of this is that most of my writings on Avalon have had to have at least one massive overhaul as I a) learn the best way to think about them and b) update them to actually reflect the latest bits.

The rub is that by the time the book sees the light of day (it should be on the PDC show floor), the Avalon team will likely have shipped another version of the bits, obsolescing what Ian and I have worked like dogs to ship. Of course, we'll post the errata and we'll update the book for the Avalon RTM, but still, it hurts that most of you won't be able to read the book when it's a perfect match for the bits.

I get to read it, though, and I'll tell you -- right now, the book rocks. : )  And the reason it rocks? Ian and I have worked hard to make sure it does, of course, but it's mostly been the internal and external reviewers that have done such a great job pointing out where we got it wrong. It's tough to hear, especially when it means a complete chapter re-write (I just finished one of those last night), but I'm so happy with the results that I'm willing to love them anyway.

Now I've raised the bar impossible high, but screw that -- I'm enjoying the moment...

0 comments




2050 older posts       585 newer posts