Marquee de Sells: Chris's insight outlet for category 'spout' 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.




Working Remotely for Microsoft: Can You Focus On Work At Home?

First off, I don't recommend remote work for folks who don't like spending the vast majority of their time away from their colleagues, sometimes having trouble focusing on the work in favor of household duties or interactions. In fact, the ability to focus on work while at home is the #1 issue you'll have to face as a remote employee and I've seen it drive 80% of folks back to the office. I've always been naturally in the 20% bucket on that issue.

As an example, when I first started at DevelopMentor, my office was in an open back room separated from the dining room by a hallway kitchen. My two infant boys had me in clear view when I was handcrafting RPC packets for communication with a DCOM server, hanging on the child gate, crying for me to play with them. My wife also had in plain sight when she wanted something from the high shelf. My family often heard me protest, "You know, I am actually working over here!" I eventually built a door, purchased Melissa a stool and learned to be very mushy about the split between work and home life. My family's actually been very supportive and I've always preferred the work environment I've established at home over any I've ever had from an employer, if for no other reason than my home has my family in it.

My advice to anyone that wants to switch to remote work is to try it for a month or two first. Are you able to balance work and family life when you're at home? Are you able to go for days or weeks without the hallway conversations with your colleagues? Can you communicate effectively in ways that aren't face-to-face? If you don't like it, don't force yourself into it. For example, while DM instructors didn't seem to have any attrition due to remote work, all of the names I listed above as remote Microsoft employees have either quit, moved to Redmond or complained bitterly during their transition (Scott's still new : ).

Tomorrow I'll discuss "Can I Find Someone To Let Me Work From Home?"

0 comments




The Whiteboard Whisperer: Working Remotely for Microsoft

I've been at Microsoft about 4.5 years, the whole time a "remote employee," i.e. I work mainly from my home in a suburb of Portland, OR but the teams I've worked for have all been based at Microsoft HQ in Redmond, WA.

Microsoft is traditionally a company that moves the bulk of their employees to WA, especially for product team and related duties. Of course, we've got subsidiaries and sales world-wide, as well as the occasional technology team in talent hot spots around the world, but there is a large corporate bias towards moving new hires to HQ. In fact, so much so that when we've got open spots, I've learned not to recommend someone that I know won't move.

And yet, there are notable exceptions. Martin Gudgin worked from England for a number of years. Tim Ewald worked from New Hampshire. Scott Hanselman works from Portland, as did Rory Blythe. Sometimes if there's enough need and the right role, the distance bias can be overcome. And when it does, I sometimes get an IM, an email, a phone call or a meeting request so that I can answer the question: how do you do it?

Tune in tomorrow for "Can You Focus On Work At Home?"

0 comments




Fun With GridView*RowPresenter

I was searching for advanced WPF tree samples the other day and ran into the tree-list-view sample:

Notice how the left-most column does the indenting, while the rest of the columns line up nicely. The code for the tree-view-sample is a little C# and a bunch of sophisticated XAML templates I didn't understand, so I stripped it down to the bare nubbins to discover what was going on. Assume a simple class holding the data:

class Person {
  List<Person> children = new List<Person>();
  public string Name { get; set; }
  public int Age { get; set; }
  public List<Person> Children { get { return children; } }
}

The juicy bit that makes the tree-list view above possible is the GridViewRowPresenter:

<Window ...
  xmlns:local="clr-namespace:WpfApplication10"
  Title="GridView*RowPresenter Fun">

  <Window.DataContext>
    <local:Person Name="John" Age="13" />
  </Window.DataContext>

  <GridViewRowPresenter Content="{Binding}">
    <GridViewRowPresenter.Columns>
      <!-- NOTE: must explicitly create the collection -->
        <GridViewColumnCollection>
          <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
          <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
      </GridViewColumnCollection>
    </GridViewRowPresenter.Columns>
  </GridViewRowPresenter>

</Window>

Here, we're creating an instance of the GridViewRowPresenter, which is the thing that the ListView creates for you if you use the GridView. Here, we're using it explicitly and setting the columns explicitly, binding it to our data and yielding the following:

Notice that we're showing a single item, arranged as a row of values according to our column definition above. It's boring and not at all interactive, at least because we don't have a header, which we can get with an instance of the GridViewHeaderRowPresenter:

<Window.Resources>
  <GridViewColumnCollection x:Key="columns">
    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
    <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
  </GridViewColumnCollection>
</Window.Resources>

<StackPanel>
  <!-- NOTE: must share access to same column collection to get shared resizing -->
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
</StackPanel>

Here we're creating an instance of the row presenter, passing in a reference to the same columns collection used by the row presenter so that the column sizes and positions are shared between the header row and the row presenters:

If we want more than one piece of data, all we have to do is use an items control with an item template that in turn creates a row presenter for each item in the collection:

<Window.DataContext>
  <x:Array Type="{x:Type local:Person}">
    <local:Person Name="John" Age="13" />
    <local:Person Name="Tom" Age="12" />
  </x:Array>
</Window.DataContext>

<Window.Resources>
  <GridViewColumnCollection x:Key="columns">
    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
    <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
  </GridViewColumnCollection>
</Window.Resources>

<StackPanel>
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <ItemsControl ItemsSource="{Binding}">
    <ItemsControl.ItemTemplate>
      <DataTemplate>
        <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
      </DataTemplate>
    </ItemsControl.ItemTemplate>
  </ItemsControl>
</StackPanel>

Now, we've got a stack panel that combines the header to the grid view rows with the grid view rows themselves, one per item in our collection:

Now on a rush of discovery and simplicity, I took the next step to show hierarchical data, hosting the data in a TreeView control and using a hierarchical data template so that I could build the tree list view shown above with the tiniest bit of XAML and code:

<Window.DataContext>
  <x:Array Type="{x:Type local:Person}">
  <local:Person Name="Chris" Age="38">
    <local:Person.Children>
      <local:Person Name="John" Age="13" />
      <local:Person Name="Tom" Age="12" />
    </local:Person.Children>
  </local:Person>
  <local:Person Name="Melissa" Age="39" />
  </x:Array>
</Window.DataContext>
...
<StackPanel>
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <TreeView ItemsSource="{Binding}" BorderThickness="0">
    <TreeView.ItemTemplate>
      <HierarchicalDataTemplate ItemsSource="{Binding Children}">
       <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
      </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
  </TreeView>
</StackPanel>

Unfortunately, that's where we run into the limit of what we can do without cranking things up a notch:

 

Beside the border around the tree view (caused by focus), the worst part about our simple tree-list-view is that, while each grid view row has the proper column sizes and relative positions, because the tree does the indenting, all of the columns are offset, not just the first one. The key to fixing this problem is to put the styling for indenting into the template for the first column only using the CellTemplate property of the GridViewRowColumn, taking over the drawing of the tree view items, which is what the tree-list-view sample does.

0 comments




"Programming WPF" (finally) shipping!

John Osborn of O'Reilly and Associates had this to say in my morning email:

"Congratulations, guys. The book is printed and shipping! Just got my copy this morning and it looks great. A very substantial body of work, to say the least.

"Thanks for all of your hard work on this project. Now to crank up the PR machine and make sure no book shelf is without a copy."

Wahoo!

0 comments




How to write a book - the short honest truth

I found this on digg.com and liked the short, honest style. Bottom line: anyone can write a book; it takes real work to write a good book.

0 comments




"How you doin'?"

I wanted to figure out how to emit a new CLR type at run-time using Reflection.Emit and Google revealed the following article: Generating Code at Run Time With Reflection.Emit in DDJ.As usual, I skip most of the initial prose to the first code sample (I don't need some author's fancy intro -- I just want the code!). Then, I'm reading along and I find some phrases I enjoy, e.g.

"If you plan on generating lots of calls to Console.WriteLine(), you should be aware that the ILGenerator class exposes a method for just that purpose: ILGenerator.EmitWriteLine() generates the exact same code as our example. (Could this be the first assembler ever devised that includes explicit support for creating "Hello, World" sample programs?)"

and

"When creating a dynamic assembly with Reflection.Emit, you must declare, ahead of time, what you plan on doing with it. Do you want to run it or save it? Or both? (Of course, if your answer is 'neither,' then you should probably should have stopped reading this article long ago.)"

By the end of the piece, I've enjoyed the story and it told me exactly what I wanted and then some, pointing out some pitfalls I would've missed, being entertaining along the way. It's rare that I enjoy an article so much and I'm thinking I should send the author an email, congratulating him/her on his/her tight, fun prose.

And then I get to the author bios:

"Chris Sells is a blah blah blah."

"Shawn Van Ness is a blah blah blah."

Of course, now I remember Shawn writing this piece and me helping him with the polish. At this point, I feel a bit like the Joey Tribbiani of Windows technical writing...

0 comments




Programming WPF, 2e (RTM Edition) on Amazon!

Buy your copy today! : )

P.S. I read the QC1 (Quality Check 1), all 859 pages of it, in two solid days this weekend. I found a bunch of nits, all of which will be fixed before you see it in August. Wahoo!

0 comments




The T-Mobile Wing rocks! 'til the battery dies...

I was really loving my T-Mobile Wing with WM6, Pocket Office, external micro-SD slot, slamming keyboard, beautiful ClearType display, one-handed usage (even though it is a PocketPC, I almost never needed to pull out the stylus), blue tooth (very high quality!), wi-fi, Edge and a slamming keyboard! (yes -- it was that slamming.).

Unfortunately, I couldn't keep it. After four days of the battery going dead after 12 short hours of my normal usage, e.g. email, texting, surfing, etc, it was dead. I turned off wi-fi, blue tooth and DirectPush to no avail. The T-Mobile Wing is just too cool for the battery and T-Mobile didn't have a bigger one to give me.

So it's back to my i-mate smartflip (hurray for data sync!). I was *so* loving that slamming keyboard...

0 comments




Why do we pick on journalism majors, so?

Here's another one:

For example, if we had had a background in journalism, we might have used one-based indexing instead of zero-based indexing to...

That Ian didn't like, but it still makes me smile (and if you're not a smiling author, why be an author at all?!?).

0 comments




Sometimes I crack myself up

I forgot until the copy edit review process that I'd dropped this gem into a footnote:

On August 4th, 1997, the world’s oldest person so far, Jeanne Louise Calment, died at age 122, having taken up fencing at age 85 and out-lived the holder of her reverse-mortgage. Although I firmly believe that Ms. Calment is showing us the way to a richer, longer life, it’ll be a while yet before we need the full range supported by the Int32 class (2,147,483,647 years young).

This is what happens when you write into the wee hours of the morning... : )

0 comments




On becoming an empty nester...

I submitted the final manuscript for Programming WPF, 2nd edition, by Ian Griffiths and Chris Sells to O'Reilly and Associates this morning for publication. Of course, there's stuff still to do (today we hit step 8 of 18), but this represents a major milestone in the life of any book.

I have mixed feelings when I finish a book. The last few have been especially intense, as I have a real day job on a Microsoft product-team-to-be, so it's just been evenings and weekends. With this much work to do, you have to focus hard and the work becomes a part of you. This means that giving it up is also hard. My boys are just now becoming teenagers, so it'll be a while yet before they leave home, but I imagine I'll feel the same kind of melancholy I feel now -- happy to see something you've put so much of your life into make its own way into the world, but hard to have the cord cut.

On average, I've been an author, co-author or a "with" on 12 books over the last 12 years. At one time, I had open contracts on four separate books. This book represents my last planned book. I'm now truly an empty nester.

So, what's next for me in this new phase of my life? Well, I've already started some stuff. A couple of weeks ago, I started a little gooey shell for monad (I call it "gonad"  : ). And last Friday, I started private piano lessons (a blast!). I'd like to pick up my other hobbies again, too, but for the life of me, I can't remember what my other hobbies used to be...

0 comments




Glyn Griffiths: Ian's Dad and Damn Fine Reviewer

This was an email I sent to Glyn Griffiths, the final external reviewer on the WPF 2ed book before we submitted the final manuscript for copy edit and publication (and which has been posted here with his permission):

Mr. Griffiths, in chapter 7, you had a couple of comments about what happened in the 1ed of the book vs. what we've got now in the 2ed of the book. The first such comment was:

"The first edition of the book had '…selected by going backward and forward…' which I think is better. [ed: as compared to 'selected back and forward']

"This is one of several instances I've found of improved wording in the first edition that seems to have been lost in this one. Is this because work on the second edition was started using a text base that was earlier than the final version of the first edition?”

To answer your question, the post-copy-edited version of the 1ed is in Framemaker. Apparently, ORA does have a process for getting Word documents out of Framemaker for just this reason, but I didn't know that, so we started with our pre-copy-edited 1ed Word documents when we started the 2ed. Since so much of the 2ed prose is different than the 1ed, this doesn't concern me overmuch, but it's worth avoiding for the 3ed.

And now here's my question: how the hell do you know what was in the 1ed at this level of detail? Have you memorized it so that you can do a diff in your head? Do you have it open in front of you so you can compare? I can't imagine what powers you possess to be able to make comment such as these, but I'm happy to have you use them for good and not evil.

P.S. With your kind permission, I'd like to post your comment on my blog so that others may have a greater understanding of where Ian gets his monster intellect.

0 comments




My Foreword To ChrisAn's "Essential WPF"

Now that Chris Anderson's most excellent Essential Windows Presentation Foundation has transitioned to the physical world, I thought I'd share my foreword:

Thank God there weren't more people like Chris Anderson when I was making my living outside of Microsoft.

I work at Microsoft now (two doors down from Chris, in fact), but not all that long ago, I was an instructor at a Windows developer training company. My brethren and I were led by a deep-thinking PhD candidate that applied the same rigor he applied to a scholarly pursuit that had to stand up to the "crush or be crushed" mentality of academia. We learned how to think clearly as a defense mechanism and to communicate clearly as a survival technique. If we didn't do it to his exacting standards, he'd sweep us aside and redo our work before our eyes (we learned to call it "swooping" and you worked hard to avoid the phenomenon).

In a similar fashion, we learned to ignore the tutorial and reference materials produced by our vendor of choice, because it was clear that however clearly they may or may not be thinking inside their hallowed walls, it was certain that they weren't up to communicating it with the rest of us. Arguably, our whole job for close to a decade was "swooping" Microsoft itself, redoing their materials in the form of short course, conference talks, magazine articles and books. We called it the "Microsoft Continuing Employment Act," treating it like a pork barrel entitlement program that kept us in the style to which we had grown accustomed.

In fact, we made a nice living traveling the country saying things like, "remember to call Release," "avoid round-trips" and "ignore aggregation" because these were clear guidelines that distilled for developers what Microsoft couldn't manage to say for itself. That's not to say that there weren't clear thinkers inside of Microsoft (Tony Williams and Crispin Goswell being two of my very favorites), but the gap between the beginner and the reader of such advanced writings was largely unfilled in those days.

With this book, that gravy train has run right off the track. Chris Anderson was one of the chief architects of the next-generation GUI stack, the Windows Presentation Framework, which is the subject of the book you're now holding in your hands. You'd have thought that the very nature of the architecture job, that is, to make sure that the issues deep, deep inside were solved properly so that others could come along and build the trappings that made it into plain sight, would disqualify him from leading the developer from "go" to "whoa," but that's not the case. Chris's insight allow him to shine a light from the internals of WPF to those standing at the entrance, guiding you through the concepts that form the foundation of his creation (and the creation of more than 300 other people, too, let's not forget).

As the author of a competing book from another publisher, I can't say that this is the only book you'll ever need on WPF (or they'd have me in front of a firing squad), but I can say this with certainty: it belongs on your shelf within an easy reach. I know that's where my copy will be.

0 comments




Best WPF Resources?

I’d like to provide a list of the best WPF resources, including real-world apps, free web resources, SDK docs, samples, blogs, etc. If you’ve got something that belongs on that list, I’d love to hear about it. Thanks!

0 comments




"Student who needs to interview a programmer"

Jimmy, a very polite 14-year old student of Washington Manor Middle School in California had an assignment to interview a computer programmer. I have no idea how he found me, but I did my best to help him out.

[jimmy] Thanks for your time! Here are the questions...

[jimmy] How long have you been working in this profession?
[csells] I've been a professional programmer of one kind or another since I was 20 years old, so 17 years.

[jimmy] How did you realize you wanted to be a computer programmer?
[csells] I had three professions in my mind as a child, first magician, then architect and by the time I got my first computer in high school, I decided I wanted to be a programmer. From that point on, I was pretty much a full-time programmer who took time out during the day to go to school.

[jimmy] What kind of education did you have to have?
[csells] BS in Computer Science from the U of MN, MS in Software Engineering from the Oregon Graduate Institute

[jimmy] What are some of the classes you took in High School that maybe helped you in your career choice?
[csells] The course that made me want to become an architect was my Jr. high school drafting courses. The thing that made me want to be a programmer was using first my friend's computer and then mine. By the time I got to my programming classes in high school, I knew much more than the teacher (and, in fact, he would often pull me out of my other courses to fix other people's computer problems).

[jimmy] Tell me about a typical day in this job.
[csells] For the last two years, I've been involved in an "incubation" project at work, which means that I'm in a small group of engineers doing advanced product development thinking. We look at a bunch of problems that developers are having building software on the Microsoft platform and build various experimental pieces of software to see if they would be useful in helping developers build applications that are more secure, more robust and more full-featured, while still helping them to build them faster.

Toward that end, my day is filled with design meetings where we run design ideas past our peers, build our ideas and then try to use them to build applications the way our customers would. I spend about half of each day in verbal and written communication, e.g. meetings, presentations, emails and design documents, and half the day writing code, specifically C#/.NET.

[jimmy] What skills are important to be successful in this position?
[csells] Communication, both written and verbal, customer empathy, logical thinking, debate, compromise and willingness to live with vague, under-specified problems and requirements.

[jimmy] How would you describe the responsibilities of the position?
[csells] With my team, it’s my responsibility to not only generate and try new ideas, but also to push the good ideas into customers' hands. That can include everything from forming my own product team, to forming ad hoc "virtual teams" from existing product groups around the company, to "selling" my ideas to product teams to get them to ship them with their products.

[jimmy] What long and short term problems and opportunities do you think this career faces?
[csells] Short-term, there's a shortage of computer science graduates, so high-tech companies, Microsoft included, are doing what they can to make sure that they attract smart, motivated, educated, experienced software folks. This includes higher salaries, better working conditions and better benefits, all of which is good for folks in this industry.

Long-term, software engineering is changing rapidly, both how we build and apply our development tools and how we turn our craft into an actual engineering discipline. The tools I'm using this year are more full-featured, more rigorous and, at the same time, simpler than the tools I used even a few years ago. I don't anticipate that change slowing down any time soon. We've got a long way to go before we've got a solid set of principles that can make software into the same kind of measured, certifiable activity that engineering fields like civil, electrical and mechanical engineering now enjoy.

[jimmy] What are the positives and negative about being a computer programmer?
[csells]
Pros:

  • flexible work environments
  • fun work (if you like bending a computer to your will)
  • rapidly evolving
  • challenging
  • important – the entire world is being remade by software

Cons:

  • vague requirements from customers that don't really know what they want (but they sure know what they *don't* want...)
  • engineering discipline left up to individuals, leading to a wide-range of software quality
  • lots and lots of work to do, making it very easy to balance the work/home life far away from non-work related activities (all work and no play makes Jimmy a dull boy : ).

[jimmy] Is there anything else about being a computer programmer that you would like to tell me about?
[csells] If you've got the disposition, programming and related software engineering work can be extremely rewarding, not just for the fun and satisfaction of taking control of a tiny virtual universe, but also because of the real difference software has and continues to make on real people's lives. Over the last three decades, I believe that software has literally changed the world for the better and I see that trend accelerating. Bottom line: It's fun, flexibly, in-demand and makes the world a better place -- what could be better than that?

0 comments




435 older posts       75 newer posts