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.




Setting the Completion Character

Aug 7, 2001

Whenever I set up a new machine (which happens a lot as WinXP and .NET go through their beta & RC cycles), I always need to manually set up the completion character (to TAB, of course) in the Registry. Shawn VanNess posted a .rgs file that would set this up without the lengthy search through the Registry. Inspired by Shawn, here's my own completionChar.reg that doesn't require a program to parse .rgs files (which doesn't come with Windows).

BTW, if you don't know about the command shell's Completion Character, stop right now, run the completionChar.reg file, start up a WinNT/Win2K/WinXP command shell, type "cd c:\p[TAB]" and watch while the shell expands it to "cd C:\Program Files\" for you. If you have other directories that start with "c:\p", continue to hit [TAB] to cycle through them. This works for any directory or file name and it boosts my productivity by about 100% on the command line. I can't live without it!

0 comments




What I Love Best About .NET

Monday, 8/6/01

DevelopMentor has long attracted smart folks. Really smart folks. These are the caliber of people that forces you to look up every once and a while and question your own worthiness. With this many high-caliber people together, you'd think they'd be able to look objectively at the world and avoid such religious arguments as "What's the best language?", "What's the best platform?" and "What's the best editor?"

Nope.

We get into arguments like this (and even more esoteric) stuff all the time. Oh, open debate is healthy and we eventually come to a reasoned, balanced decision, blah, blah, blah, but these kinds of arguments made me realize that the thing I love most about .NET is that one of the most contentious arguments has just gone away: "What's the best language?" In the old days, this boiled down to VB vs. C++, otherwise known as practical vs. theoretical, simple vs. complicated or even, my personal favorite, journalism major vs. computer scientist. The argument was a real one, though, because VB6 and below put a real straight jacket on you when it came to real object-oriented features (the lack of implementation inheritance springs to mind), whereas C++ was so hard for so many people, it was almost impossible to build correct code with it. Much mud was thrown during these debates and no progress was ever made.

Until now.

Now, we have the same "What's the best language" arguments over VB.NET vs. C#, but they always peter out very quickly. While it's true that VB.NET makes it much easier to build late binding component clients and C# allows unsafe code sections, neither of these features is enough for us to avoid agreeing that, modulo syntax, the two languages overlap by about 90%. Which means, and now I'm coming to the part that really makes me love .NET, I get to work with lots more smart people at DevelopMentor. Before, it was about the star-bellied Sneetches and the plain-bellied Sneetches. Since I felt I was one with a star on his belly (doesn't everyone feel that way?), I couldn't work with those without stars upon thars! Well, Sylvester McMonkey McBean, you can teach a Sneetch! [1]

I just got off the phone with a good friend of mine who I've never been able to work with before, because we've always had a great divide between us caused by my C++ bias. Now, for the first time, we get to work together! He can do his stuff in VB and I can either work with it directly, or I can easily port it to C#, because all the classes and functions that he's going use in VB are going to be identical to what I would do in C#. So, while 90% of the language features overlap, there's 99.999% overlap in the framework and how to use it between the two languages. To answer Rodney King's immortal question, "Yes. Finally, thank .NET, we can all just get along."

[1] Those of you with kids will understand...

0 comments




NullScript Used to Reverse Engineer Gen<X>

Wow. I'm impressed as all get out. Hugh Brown has reverse-engineered Gen<X> as one of the tests of his NullScript implementation. I wish I would have had this when I started Gen<X> a couple of years ago. It would've saved me figuring out how ASP did it.

My thinking along these lines years ago led me to go the opposite way, i.e. I built a front-end ASP parser that generated script for VBS. I called it TextBox (which, as a Win32 programmer, I should've realized was a terrible name...).

0 comments




Some MORE signs that you may be taking COM too seriously...

Aravind Corera
Originally written for IDevResource
Private Email

0 comments




Moniker Wizard

Here's my moniker wizard that includes the framework used by the Basic Monikers.

0 comments




Tim's COM+ Utilities

Aug 4, 2001

The great and powerful Tim Ewald (author of Transactional COM+: Building Scalable Applications and personal friend of mine) put together a handy little set of COM+ classes and utility functions in a concise header file that he has graciously allowed me to host. Among my favorites are IsInActivity, IsInTransaction, IsSecurityEnabled, GetCallersName,  IsCallerInRole, and parameterized versions of CoGetObjectContext and GetAspObject (which is even cooler than my CAspPtr). Download the code! Buy the book! Feed your brain!

0 comments




My Favorite Web Sites

Friday, 8/3/01

These are the sites that I visit on a regular basis and like (the sites I visit on a regular basis and don't like are not listed : ):

0 comments




My Favorite Software

Friday, 8/3/01

The following software is what I install on nearly every computer I set up. BTW, I pay for all my favorite software and you should, too. While I am guilty of "trying" friend's software, I own legal copies of every piece of software I use.

  • Windows XP. The grand unification of Win9x and Windows 2000 is finally at hand (isn't that one of the signs of the apocalypse?) and it is awesome. The UI make over is great, but the two killer features for me so far (I've only have RC2 running for a few days at this point) are the new Terminal Services client (called Remote Desktop Connection and hidden under Accessories\Communications) is amazing for the keystroke handling alone and the ClearType support for LCD panels. Unfortunately, the latter is going to force me to buy LCD panels for all my computers and will make using the former with anything by Windows XP unbearable. No wonder they have a monopoly...
     
  • Microsoft Office XP. I know that they're a monopoly. I know that they should be broken up. But damn, they just make killer (sic) software! As a writer and web maintainer, I absolutely love Word and FrontPage. The last real feature they added was red and green squiggles, but now I can't live without them. As a guy dealing with lots of email and people and tasks, I live in Outlook. The fact that the integration with Word is now fast enough to let me use Word as my editor (to get red and green squiggles) has cut way back on people making fun of me for my shoddy emails. And while I can't say I've ever used 1% of the features in Excel, for whipping up a quick set of numbers and totals, there's nothing like it. Also, I was a proud owner of Visio 1.0, so that fact that they now bundle it is awesome. Truly, without Office, I may very well have skipped to Linux by now, but I'm addicted.
     
  • Microsoft Visual Studio.NET. There is no better set of development tools on the planet. This is #2 reason why I haven't gone to Linux.
     
  • WinZip from Nico Mak Computing. I keep trying others, but I always come crawling back after the flash of some upstart comes and goes out of my life.
     
  • Action Outline from Green Parrots Software. This is a free-form hierarchical information keeper. While I practically live in Outlook, it has never had a good way to keep bits and pieces from my head. And what I especially love is that, as a keyboard only boy, I can navigate between the tree view on the left and the text view on the right, including adding topics, moving topics, etc, all without taking my fingers off the keyboard, including starting it from Start->Run (via "action"). The only thing that I wish they'd add is encryption and password protectionbecause I'm embarrassed to tell you just what kind of information I keep in there in plain text (Keith "Mr. Security" Brown would not approve : ). Indispensable.
     
  • 1st Clock from Green Parrots Software. Actually, Green Parrots is one of my favorite software companies. They make some cool stuff. I can't live without 1st Clock for two reasons:
    1. It puts the day of the week and the date in the toolbar (because I can never remember and the time it takes to click my way to that info is too long).
    2. It lets me put custom strings into the toolbar. I always put the machine name in the toolbar so that as I switch between multiple PCs sharing a single keyboard, mouse and monitor using my Belkin OmniView, I can tell at a glance what machine I'm currently working with.

    The built-in automatic time synching with internet time service is really cool, too.
     

  • Process Explorer from Sysinternals. This software, formerly known as HandleEx, is invaluable in helping me track down all of my "Can't replace DLL: May be in use" error messages and it's free!
     
  • RegMon from Sysinternals. This tool will should you where a program is reading from the Registry or where it's writing.
     
  • tcpTrace from PocketSOAP. Simon Fell is one of the most talented contributors to the Windows development community. tcpTrace is the de facto tool for tracing SOAP packets.
     
  • WinVNC from AT&T. WinVNC is a free tool for controlling one computer from another. It's not as cool or as fast as the new Terminal Services client from Microsoft, but it lets you control the currently active Windows station instead of starting up a new one, so it's great for controlling the PC I have connected to my home theater, from the comfort of my couch (ever try to read PC output on a TV across the room? It doesn't work...).
     
  • DevTrack from TechExcel. DevTrack is a good bug tracking database. Even though it is not one of my favorite pieces of software (sorry to throw you for a loop there : ), it was so much easier to set up than any of the competitors at the time and it did 80% of what we needed it for, that we live with it. The web client enables developers to use it all over the world and we were able to squeeze the data out of it that we needed. We do struggle with it sometimes, but not nearly as much as we would have had to if we'd have built out own from scratch. In fact, that's why I list it here. Please don't waste your time writing your own bug database. Buy one. If I had it to do over again, I would definitely spend time looking at FogBUGZ from Fog Creek Software.
     
  • Source Offsite from SourceGear. Source Offsite is an NT service that allows access to your Visual SourceSource database across the internet. Until they fixed a mighty leak problem that required us to manually kill the server a couple of times a day, Source Offsite was a depressing maintenance headache that we had to put up with, because when it worked, it worked so well, and there wasn't anything else out there. Now that the leak is fixed, it just silently works. What more can you ask from a piece of software?
     
  • CleanVC from Bear Canyon. Mike Woodring and I go way back. Like me, he also has a bend for building tools and a website where he makes them available. The one that I absolutely cannot live without is CleanVC (he's got other cool tools worth check out, too). From the command line, CleanVC takes the name of a directory and recurses through it and all sub-directories, killing all the intermediate files you get during a build. From the shell, you can right-click on a folder, choose CleanVC and get the same thing. I use it right before I zip something up for distribution and I use it to dig through my own project directory just before my weekly backup. Fabulous.
     
  • RegSvr.reg from me. This is a simple .reg file that I built way, way back that lets you right-click on a COM DLL or EXE and register or unregister it. It's simple, I know, but I find I can't use my computer without it.
     
  • Reflector for .NET from Lutz Roeder. This software is the OLEVIEW of .NET and it's free!
     
  • UrlRun from me. This is a little console app that I use to reconnect URLs split between lines in an email. It's smart enough to take out spaces and > characters when an URL is split between forward lines in an email. To use, copy the URL (with spaces and weird characters and all) into the clipboard and run UrlRun.exe. It will take the URL out of the clipboard, clean it up and start up IE.
     
  • BTW, Doom, Half-Life, Max Payne and JellyFish are my favorite games, the latter especially since I let Don beat me badly at backgammon the other day and I need the practice!

0 comments




My Favorite Books

Friday, 8/3/01

When I started writing books, I decided to stop reviewing other peoples' books. I used to have a list of all of the books in the topic of my current interest and write a little review, either pumping them or panning them (this was long before Amazon.com). Once I decided to write books myself, I figured that there'd be a conflict of interest putting down competing books, so I stopped. However, I've had lots of folks ask me for a list of recommended books over the years, so I thought I'd provide one. While I'm still biased, there's at least less conflict of interest if I just tell you about books that I love (although I'm not so proud that I don't tag each book URL with my Amazon.com associates ID...).

I would give each of these books a 5-star rating on Amazon (and, in some cases, I've done just that). These are the books that I absolutely love (in no particular order):

  • The PC Is Not a Typewriter by Robin Williams. Of course, this is not by the famous actor, but Robin is as famous in the type design field as the other Robin is in the funny joke field. In fact, I'd say the former is even more impressive, because she doesn't let herself get talked into writing bad books. You can't go wrong with any of Robin's books, but this is the first one of hers that I read and it still holds a special place in my heart. She specializes in teaching text design amateurs how to do text design and she's great at it.
     
  • Genetic Programming III by J.R. Koza, et al. It's no secret that I've long had a weakness in my heart for programs that generate programs. This one is the ultimate -- programs that figure out themselves how to generate the correct program. Very wow. And, as is necessary for all books on this list, it's very well written. It's gripping in the same way that the latest John Grisham novel is gripping (to a certain kind of person : ).
     
  • Essential COM by Don Box. This is not only the classic work on COM, but it captures the heart of the movement of Windows programmers into component development. Be careful when you pick it up, though. You could start by looking something up and find yourself hours later still reading it for the pure pleasure. BTW, Don and I have good close friends for years, so I may be biased (except I'm not -- this book rocks).
     
  • Don't Make Me Think by Steve Krug. I'm still in the middle of reading this book, but wow. It lays out web usability in a way that even a web design cretin like me can appreciate. He points out the dos and don'ts in a way that's clear, concise and entertaining. I'd love to be able to convey so much with so few words. And the production values of this book are great. I wonder if Addison-Wesley will let me write a .NET programming book in the same style...
     
  • User Interface Design for Programmers by Joel Spolsky. Joel maintains one of my favorite web logs and has collected his usability musings into a wonderful little book (clearly influenced by the Krug book). What makes this book so wonderful is that he captures all my feelings about usability, making me feel like an expert. Of course, I love a book that agrees with me. : )
     
  • Effective C++ by Scott Meyers. This is the book that started a movement. Of course, if you're a C++ programmer, you need to read this book. But more than that, Scott laid out a style that has often been imitated, but never duplicated. (I know, because I tried.)
     
  • Mr Bunny's Guide to ActiveX by Carlton Egemont III. If you're a COM programmer, you need this book. Check out the close up of the pixel. It kills me every time.
     
  • C# Essentials by Peter Drayton, et al. This is hands down the best .NET programming book out there. It's clear, concise and accurate (a novelty in the Windows book market). It only took me a few hours to read, but I learned a ton. BTW, Peter works for DevelopMentor, but I'm not biased because I don't like him very much. : )
     
  • Fundamentals of Database System by R. A. Elmasri. This is one of the rare college text books that is not only readable, but practical. I read this after years and years of doing database work and was very surprised that they covered what software engineers actually need to know about how databases work.
     
  • Inside SQL Server by Kalen Delaney. Ironically, I haven't had much database experience under Windows (I was a Unix Informix guy), but when I read the earlier edition by Ron Soukup, I fell in love with this product. I'm sure it was the way that Ron described it, but I couldn't imagine doing SQL Server work without this book.
     
  • Modern Operating Systems by Andrew S. Tanenbaum. I sure wish I had had this book when I was taking my operating systems course in college, because then Linus Torvald would be reading about the success of my operating system and not the other way. This book is so great and so well-written that its inspiring. I firmly believe that every effective programmer needs to first understand what's going on underneath their drag-n-drop, click-button IDE and this book sure lays a great foundation.
     
  • Computer Networks by Andrew S. Tanenbaum. Along those same lines, Tanenbaum's networking book is also excellent. Makes me want to dig right into the plumbing.
     
  • TCP/IP Illustrated by W. Richard Stevens. Of course, the late Richard Stevens was a legend in the Unix community. This book, while slanted towards Unix, is still a great book about the world's most dominant network protocol. I can't decide whether I like this book or Computer Networks by Tanebaum better, but you can't go wrong by owning both.
     
  • Unix Network Programming by W. Richard Stevens. As a Unix programmer not even doing network programming, this was still the bible. I know that you Windows programmers aren't going to rush out and buy it, but if you wake up with a desire to program in a command line world, you'll need this book.
     
  • Philip and Alex's Guide To Web Publishing by Philip Greenspun. I don't know how much practical information there really is in this book, but after reading it, I really wanted to quit my job and go to work for Ars Digita. Unfortunately, after Phil brought in some "professional" management, they kicked him out and, as far as I can tell, are driving that company into the ground. Still, the amount that that guy has contributed to the internet community is staggering and inspiring.
     
  • ASP Internals by Jon Flanders. Now on this one, I'm very biased, because not only is Jon Flanders a fellow DevelopMentor employee, but he's also been one of my best friends since 3rd grade and I wrote the forward. That said, if you want to know how ASP really works, down to source code for an ISAPI extension that Jon builds to work just like ASP, you need this book. And what's so amazing is that he's able to convey so much so concisely. I wish I could write this briefly. I hope an ASP.NET Internals is forthcoming from Jon.
     
  • The C Primer. This book is long out of print, but it's where I learned the C syntax that has served me so well through so many languages, i.e. C++, Java, JavaScript and C#. I don't expect anyone to need this book anymore, but it does have a special place in my heart.

0 comments




Hanging Out My Shingle

Friday, 8/3/01

For the last three years, I've been in management. Oh, it started innocently enough. When the team was small, I was only managing a little bit. However, as the team grew and we got closer and closer to shipping our first product, I spent less and less time doing anything technical and more and more time managing. Eventually, I was doing nothing but dealing with the rest of the company and potential customers and "enabling" everyone else. Luckily, Don Box, co-founder of DevelopMentor and my long-time mentor, noticed that I'd been swept right out of the things that I loved the most. And he made me an offer I couldn't refuse...

Now I'm back on the consulting, teaching, writing, development train and loving it. I've been all over .NET for about a year, but now I get to concentrate on it full-time. If you'd like any consulting help in the area of .NET (or even COM and ATL), I'm here for you. Pass the word along. Thanks!

0 comments




Command Line Parsing

Aug 3, 2001

I got tired of not having getopt under Win32 and the best version to port doesn't handle slashes (as per the Windows standard) or @files for arguments and it requires you to give away the source for every app that uses it, so, inspired by my friend Josh Gray,  I built my own. It supports typed flags and params, @file support and building full usages on the fly.

Plus, the latest version has support for parsing ANSI or Unicode argfiles, as provided by Johan Nilsson. Thanks, Johan! Also, I've added a contribution by Paul Westcott to support arguments with restricted values. Thanks, Paul! And, as if that weren't enough, Adis Delalic contributed a UML diagram to describe how the CLP is built. Wow.

And as if that weren't enough, Keith Brown ported the command line parser to VS.NET. Thanks, Keith!

0 comments




Expando Objects

Aug 2, 2001

I've seen lots of interest lately in expando objects, e.g. objects that can add methods and properties on the fly. Joe Graf wrote a piece on IDispatchEx in MIND that was pretty interesting. My own implementation of IDispatchEx is available here. It supports expando objects that have no static properties or methods as well as those that do. Check out the DispExTest.js for a demonstration, dispeximpl.h, dynamemlist.h and dynamemlist.cpp for the implementation and MyExpando.h for the usage.

0 comments




Windows Template Library

Aug 1, 2001

0 comments




VARIANT_BOOL Wrapper

July 31, 2001

CComBool is a class to prevent the misuse of the VARIANT_BOOL type. VARIANT_BOOL is a problem because its legal values are -1 and 0 instead of 1 and 0, making converting back and forth between bool, BOOL and VARIANT_BOOL problematic. CComBool supports the constructors and operators needed to convert between the three C++ Windows Boolean types. It also supports operator& and CopyTo for common COM client and server usage. CComBool is available here.

0 comments




ATL CRT Numbers

July 30, 2001

The following table lists the various prices you pay for using the CRT and the default Win98 support in VC6. The builds were done with VC6, SP3, ATL COM in-proc server, no classes, no MFC, no merged p/s:

Target CRT Win98 Size
RelMinSize _ATL_MIN_CRT yes 24KB
RelMinDepend _ATL_MIN_CRT yes 24KB
RelMinSize _ATL_MIN_CRT /opt:nowin98* 7KB
RelMinDepend _ATL_MIN_CRT /opt:nowin98 10KB
RelMinSize MSVCRT /opt:nowin98 20KB
RelMinDepend MSVCRT /opt:nowin98 22KB

*Note: /opt:nowin98 is a VC6 linker switch that says not to align binaries on a Win98-friendly boundary. /opt:nowin98 builds will still load and run under Win98 without a problem, but the loading time could be longer. Also, when images get above 24KB, the /opt:nowin98 seems not to much of an affect on the size of the image.

0 comments




55 older posts       2580 newer posts