CIPS CONNECTIONSINTERVIEWS by STEPHEN IBARAKI, I.S.P.
op-ranking Authority and Researcher in C++, C#, Development, and Advanced Customizable User Interface Architectures
This week, Stephen Ibaraki has an exclusive interview with the top-ranking development authority, Mark Schmidt.
Mark is a software engineer at Hewlett-Packard. His current research and development work involves advanced customizable user interface architectures. His research contributed to his popular talk he gave at the San Francisco, “2001 VSLive!” conference. Mark is using C# in many areas including UI prototypes, support tools and has even written a functional ASP.NET capable Web Server. His breadth of knowledge is the result of a constant search for information that leads him down several different technology avenues.
Mark has written articles on C# and C++ for Visual Studio Magazine, Visual Basic Programmer's Journal, and Visual ++ Developer's Journal. Mark also co-authored Sams Teach Yourself Visual C++ .NET in 24 Hours. You can find more information about Mark and his recent book, Microsoft Visual C# .NET 2003 Developer's Cookbook, at http://www.csharpcookbook.com.
Q: Mark, you are a leading authority in C++, C#, and advanced customizable user interface architectures. Thank you for taking the time to speak with us.
A: Not a problem. I tend to be long winded when it comes to programming conversations, so I apologize ahead of time.
Q: Give us a life history and explain how did you get into computing up to your present position?
A: I remember the first time I heard about this new device that will do “whatever you tell it to”. I was around 8 or so at the time and couldn’t believe that something so miraculous had been invented. I received a Commodore-64 for Christmas that year and my excitement faded when I realized you had to learn Basic. I assumed computers would understand English. Oh well. I tinkered on and off throughout the years, creating small games but nothing really serious. When I first entered college I was determined to become a psychiatrist. Don’t laugh, it’s true. I then wanted to be a journalist, then something to do with business, then marketing, and just about every other major out there. During that time, I was hacking away on my 386 computer and one day it clicked. I quickly switched schools to Portland State University (my old school’s main language was Modula-2 so I vacated quickly). I quickly found out that I was pretty good at programming and HP did too. I was hired by them 1 year before I graduated and have been here ever since.
Q: Can you share your top three “amazing” experiences?
A: That’s definitely a tough one. Working on user interfaces on a daily basis, I have quite a few amazing experiences. I have been known to jump up and shout when something works as expected after spending many hours on it. The first amazing experience would probably be the first time I created a “skinned” application. Skinning for those that don’t know is the user interface concept of creating a non-rectangular window from bitmap data. I did this quite a few years ago in Visual C++ which means it wasn’t as trivial as it is today when using .NET.
Definitely some of the most amazing experiences are the times I saw some of my work published. My very first article was on C# and was written for Visual C++ Developer’s Journal since C# and .NET were still in beta. My first book was quite exciting but I think this book tops them all since I spent so much time and effort writing it. Seeing the book in my hands makes those really late nights worth it.
Finally, I’m not sure if you’re looking for amazing “programming” experiences, so I’m going to throw a non-programming experience out and it’s the birth of my children. I’m someone who’s known by my friends and family as being quite an emotional person. Words can’t describe how I felt when I saw my children being born. The word “amazing” is putting it lightly.
Q: Do have any humorous stories to share?
A: That’s kind of a tough question. I’ve been known to be a comedian at work to liven things up a little. I guess one of the most recent would be during a teleconference. When you dial in, the system asks you to say your name which is then broadcast to those currently in the meeting. Most of the time, the feature is turned off. However one day it wasn’t so I thought I’d play a little trick on a colleague. I convinced him to say his name is Harry Belafonte which he proceeded to do. It backfired on me though since he accidentally had his headset on mute. Humorous? No, but it had potential.
Q: Can you describe your work at HP?
A: When I first started working at HP, I was a little fish in a huge ocean. I was still in college at the time and really felt out of place. It took awhile to finally feel comfortable. One thing about HP that really sets it apart from other companies is the mindset of the people that work here. You’ve probably heard of the “HP Way” and it still exists today. This is a company that fuels itself through invention and we’re encouraged to continually invent the next greatest thing. There were a lot of people that thought we were doomed when we acquired Compaq since it was such a large acquisition. As you can see, we’re still going strong and have proven a lot of skeptics wrong.
Q: What are your top five tips on advanced customizable user interface architectures?
A: First off, let me explain exactly what is meant by “advanced customizable UI architectures”. Being in the business for 5 years now, I’ve had my fair share of changing requirements. More often than not, those changes inevitably affect the UI. Throughout the years, my research has really been on creating architectures that minimize the time required to make changes and maximize the power of the architectures to do amazing things.
1) If possible, see if you can avoid embedding UI definitions in binaries. The architectures I create utilize XML for UI definitions which means changing the UI layout can be done with a simple text editor and the result viewed immediately. For some applications, doing this is overkill, but for the work I do, it’s a tremendous timesaver that carries a lot of other advantages with it.
2) Code with extensibility in mind. Again, all of my architectures utilize plug-ins to extend the UI engine after it’s been built and possibly shipped. Doing this allows the whole engine to grow by the addition of new features while the core remains untouched.
3) If anything in your UI architecture can change, create a way to customize that change. Furthermore, that customization shouldn’t require a rebuild of your engine binaries if possible. With the current architecture I am working on, just about every aspect of it is customizable. In fact, even the UI definition file format can be changed at runtime to read in XHTML, XUL, XAML or any other XML based UI file format if you wanted.
4) This is somewhat related to the first item. If a UI definition is external to the UI engine itself, you’ll need a way to implement logic. For this, I learned the ActiveScript engine by Microsoft inside and out. Scripting plays a large role for logic implementation for these dynamic architectures I create. I am currently researching the use of C# for logic implementation during runtime (with successful results I might add).
5) Have fun with UI. This is the whole reason I’m addicted to user interface architecture. In some of the demo’s I’ve given to colleagues, I’ve done everything from showing Men In Black videos with my UI to a screen full of bouncing cockroaches. Not only that, but only the UI person has the ability to hide Easter Eggs in the product. Just don’t tell my manager.
Q: Detail the development of your functional ASP.NET capable Web Server.
A: This was actually a little “proof-of-concept” project I started which has since been cancelled. The goal was to communicate with a peripheral device, in this case a printer, and display the data I received from it to a person sitting at a computer. ASP.NET was a perfect way to mix this data with an HTML presentation. However, since ASP.NET is largely a server based technology, you can’t guarantee that a person has IIS installed with .NET on their machine. So I created my own little web server that behaved like IIS with full support for the processing and serving of ASP.NET pages. It worked fine, but we never used it.
Q: What makes your book, Microsoft Visual C# .NET 2003 Developer’s Cookbook, an essential developer resource? With so many books on the market, how is it different from the “other” books? Who is the intended audience?
A: .NET has passed its infant stages and so have the developer’s who initially started using it. We’ve all done our “Hello World” programs so now its time to start using the language and technology platform for real world scenarios. MSDN is an excellent resource when you need to find out what a certain function does or how a certain parameter to a function will affect your results, but not so good when you want to solve a specific problem. This book does just that. In short, it focuses more on the “how-to” rather than spouting off page after page of theory and internal mechanics of .NET.
Q: Share five of your high-powered C# recipes and special coding tips from the book.
A: 1) One thing that always amazes me is the speed in which I can create something in C# using .NET. A good example is recipe 8.26, Docking Controls. This recipe shows how to create collapsible tool windows that expand when the mouse hovers over them. Each panel can also contain different tabs to switch the display to a different tab page. This behavior is somewhat similar with the tool windows in the Visual Studio .NET IDE. Doing something like this in C++ with the WIN32 API definitely wouldn’t have been as trivial.
2) I’m not one to simply demonstrate “Hello World” application. 2 recipes in the book 24.1, Creating an ATL-Based COM Component and 24.2, Using COM Objects in .NET are good examples. I could have created a COM component that simply returns a “Hello World” string, but I’m so tired of reading stuff like that. Instead, the COM component acts as a command shell proxy by simply sending commands to the OS and returning the result (think programmatic command line shell and you’re on the right track). Recipe 24.2 then uses Windows Forms and COM Interop to present the UI based on the results from the COM object. So what you get is a little command line shell similar to cmd.exe.
3) Similar to the previous recipes above is recipe 16.3, Handling Web Control Events. A lot of software development has to deal with creativity. When writing the book, I was always asking myself “What can I do here that is different than all the other books”? So I created a command line shell run within a web browser that allows you to send commands to the server hosting your ASP.NET application. I was planning on combining the recipes from above with this one to make it a “real” command line interpreter but that would have complicated matters too much. If I find the time in my busy schedule, I would like to revisit this project and really make it shine. Keep watching www.csharpcookbook.com and it may well show up one day.
4) I love programming on mobile devices. I’ve been dabbling ever since the first Microsoft mobile device SDK (at least I think it was the first), the Windows CE Toolkit for Visual C++ 6. Smart Device Extensions, introduced in Visual Studio .NET 2003 really shows how much this technology has grown. Creating applications on a Pocket PC is just about as easy now as it is on the desktop. I really like a lot of the recipes in Chapter 26, Smart Device Extensions, simply because that information isn’t covered as much as desktop programming. One recipe in particular, 26.5, Using the MessageWindow Class, was one I spent a lot of time on because I wanted to demystify it and do it right. Basically the project that is created uses a different form of Interop than PInvoke or COM Interop. The MessageWindow class will let you communicate using window messages.
5) Some of the recipes in the book are somehow related. There were a few times during writing that I created an application that covered several different recipes. These include an XML editor that lets you open an XML file, display it in a tree view and manipulate it. You can also use XPath expressions to navigate to a tree node. If someone were to create a simple XML editor, this is a good place to start. Another application is an image editor. This one actually covered a lot of recipes including printing; print preview; cropping, scaling and rotating images; saving images to disk and I’m sure a few more recipes that escape me right now. Other examples include a linear gradient viewer, a screensaver preview panel, the WebShell and COM Interop command line interpreter mentioned earlier, and a text editor with plugin support. As you can see, I was as much fun coding as I was writing.
Q: What future books can we expect from you?
A: Right now I’m taking a break from writing so I can spend some more time with the family. I will eventually get around to doing another one (maybe a few magazine articles in between) but I don’t have a definitive timeline set out. I would like to eventually do a user interface focused book but it all depends on the current crop of books that are already out there.
Q: What are the most important trends to watch, and please provide some recommendations?
A: 1) UI Architectures: I’ve seen my fair share of architectures through the years, but the latest and greatest is always being trumped. .NET utilizes Windows Forms now but we’ll have to wait and see if Microsoft changes it to utilize Aero coming in Longhorn.
2) Outsourcing: Although not directly programming, it does involve our industry. This has definitely become a hot topic recently and will be in the years to come. There is a proper way to utilize outsourcing, but a full on 100% outsourcing is not the way to go in my opinion. Of course the key motivating factor is money and right now, our industry is not the booming powerhouse it once was. In fact, I don’t think we’ll ever have another “dot com” period since it was stimulated by the prevalence of the Internet which has transformed from the “new exciting technology” to just another ordinary everyday technology we use. Sure we’ll have our peaks but there will be a few valley’s along the way. Will the industry ever stop growing? Absolutely not, but we are a lot higher on the bell curve than we were several years ago.
3) Mobile Devices: The “always connected” paradigm is slowly becoming a reality. People are scrambling to have information right at their fingertips but I don’t think we’ve quite made it yet. Microsoft has made some big strides for developers in this area as have other companies but we really need industry collaboration on many different fronts to really get the ball rolling. If you or your company has not jumped on the mobile bandwagon, now is a good time to do so.
4) Technology overload: This is something I noticed recently and it really hit me when I was writing the book. There was a time when a software engineer only had to deal with a couple of technologies to get their job done. Now it seems as if new technologies are popping up left and right on a daily basis (bit of exaggerated, but you know what I mean). This is largely due to the proliferation of distributed computing models and took a large leap with the introduction of Web Services. In the early 90’s, we could get by reading a book on how to program Windows 3.1, but those days are gone. The amount of information and technologies in use is staggering. That’s why we now see software engineers with different specialties. Is this a bad thing? Not in the least bit. In fact, I think it opens up more jobs for those looking to get into the field which of course is a good thing.
5) Web Services: I would be amiss not to mention the role Web Services are playing now and in the future. Companies are starting to look at ways of utilizing this technology and my team is starting to use Web Services for something you would never have thought they could be used for. There’s still a lot of growth in this area and is definitely something you should keep close tabs on.
Q: What are your top recommended resources for both businesses and IT professionals?
A: 1) Books: Not that I am biased towards print or anything, but I do believe books are an invaluable resource. Most of what I’ve learned is a result of hours of reading. Sure you can get good information off the Net, but right now, nothing beats a good cup of coffee and a thick programming book.
2) Tools: A software engineer should have an arsenal of tools at their disposal. I myself have several favorites including XML Spy (XML editor), Ultra Edit 32 (text/hex editor), Visual Studio tools such as Spy++, Dependency Walker, ILDasm, Visual Assist .NET and debugging tools like DebugView from Sysinternals. Naturally, Visual Studio .NET 2003 is my IDE of choice.
3) Internet: I guess this would probably be the #1 resource. There is just so much information out there and it’s expanding daily. Some of the sites I visit religiously include MSDN, codeproject.com, and windowsforms.com. I troll a lot on newsgroups and even pop up in an IRC channel now and then (#winprog on EFNet).
Q: What kind of computer setup do you have?
A: For my main development machine, I have a Pentium IV 2.4 GHz which is starting to show signs of aging. RAM is crucial for development, in my opinion, so I use 2 GB of it. I am also a big fan of dual monitors so I have 2 19” LCD screens in front of me. I also have a dedicated Linux box and an old Mac G4 all of which are connected to a Black Box switch and USB switch so I can use the same keyboard and mouse. Oh, I guess I do have a unique keyboard too. I use a Kinesis Advantage Pro keyboard. I get more comments about it then I do my monitors.
All of my writing however is done on my Compaq Evo n800w laptop. It sports a 2.4 GHz processor with 1 GB of RAM. It’s good enough to play some of my favorite games when I’m away from home on business. Since I’m a rabid gamer, my personal home machine has everything a gamer would want - 7.1 surround sound and an ATI Radeon 9800 Pro tops the list of components.
Q: If you were doing this interview, what three questions would you ask of someone in your position and what would be your answers?
A: Q1: How does one go about getting published?
A1: I started by simply emailing an editor for a popular magazine. I submitted an article, it was well received and a contract was signed. That got me a foot in the door. I then proceeded to write 2 more articles with the same publisher. This got my name out and soon requests started coming and I signed my first book contract with SAMS for the book Teach Yourself Visual C++ .NET in 24 Hours. So, my advice is to start out with magazine articles. You can start with online articles but you might get lost in the sea of other online authors. It’s really not that hard to get going. One thing I might stress is that it takes a lot of time especially if you have a day job like me. Prepare for late nights and lack of sleep.
Q2: What are your thoughts on the future of C++? C#?
A2: There are so many rumors surrounding C++. Some people think Microsoft is writing it off along with their other C++ technologies like ATL. In my opinion, Visual Studio .NET 2003 was Microsoft’s answer. They added a lot to Visual C++ which really shows they aren’t throwing in the towel on it. It’s still one of the most widely used languages in the world, if not the most, and to say Visual C++ is going to be cut is ludicrous. I hope Microsoft doesn’t prove me wrong. I still use it daily and love it.
C# has moved from the infant to the toddler stage, not so much as far as feature set but as far as developer adoption. When C# 2.0 comes along we’ll really start to see the language mature. Microsoft has put a lot of money into .NET and it shows. It’ll be awhile before C# gives its exit speech.
Q3: What keeps you going? How do you avoid burnout?
A3: I’m surrounded by programming on a daily basis. I’m usually in front of a computer almost 15 hours a day for several months when I’m writing a book and I rarely come up for air. Do I suffer burnout? Of course I do, but that’s just an occupational hazard that I’ve learned to deal with. I love learning new things and even more, I love teaching people what I’ve learned. That’s what keeps me going. In the instances where I’m just burned out beyond repair, I take a step back and do something else. This is either spending time with my wife and 4 kids (yes, busy household), holding a LAN party and gaming until the wee hours of the morning or taking my RC plane out to fly around. When all else fails, a good science fiction book calms my nerves and fuels my creativity.
Q: Do you have any more comments to add?
A: I just want to let readers know that I’m an approachable person. If you have a question, fire an email off to email@example.com or firstname.lastname@example.org. I also encourage you to visit www.csharpcookbook.com. There isn’t much on there now but since the book is finished I plan on adding some content and tutorials to supplement the book. I’m also looking for recipes that you would like to see that weren’t in the book.
Q: Mark, thank you again for your time, and consideration in doing this interview.
A: No problem.