# Monday, June 14, 2004

My latest codeguru column, C++ Language Changes for Visual Studio 2005, has been uploaded to the CodeGuru site.

Monday, June 14, 2004 7:53:47 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, June 10, 2004

Scott Bellware has to reschedule his appearance at the East of Toronto .NET User Group, much to our regret. We're looking forward to announcing the new date soon. The good news is that Marcie Robillard has stepped up to the plate and agreed to shuffle her “DataGrids and GridViews” talk forward a few months. Same time, same place, same URL. See you there!


Thursday, June 10, 2004 11:11:08 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, June 09, 2004

On Tuesday, June 15th, Scott Bellware will be at the East of Toronto user group (meeting on the Durham Collage / UOIT campus at Simcoe and Conlin.) Scott will talk about Unit Testing and he's bringing his own prizes:

Unit testing is one of the few reliable ways to repeatably validate the quality of your code. Without unit testing, code is more brittle, less changeable, and simply fraught with higher defect rates. All of these issues lead directly to software project failure rates. Unit testing helps to bring a measure of cost-effectiveness to software development and enables developers to fearlessly incorporate new features and refinements into their products. Testing leads to better design, higher quality, and to the Holy Grail of software development - reuse. In this session, Scott Bellware will demonstrate test-first coding techniques, and unit testing tools for .NET.

Two licenses of HarnessIt, Unit Binary's unit testing tool will be given away.

On Thursday,  June 17th, Jason Beres will be at the Toronto user group (meeting in Mississauga at the Microsoft offices). Jason will talk about Windows-app-style functionality in a web app, and he's not coming empty handed either:

This discussion focuses on meeting today's IT challenges, using thin client or browser based delivery to maximize ROI while still delivering the rich client features users expect and demand. The discussion will look at the Infragistics Expense reference application as a real world example of some of the power and advanced features that are possible with ASP.NET and outside-of-the-box development tools. We will discuss the challenges of delivering a robust interface utilizing HTML and explore some working code to evaluate solutions.

You will not believe you are looking at a user interface in ASP.NET!!!

Infragistics will arrive at the User Group with NetAdvantage 2004 product give-a-ways, special discounts of 20% off of NetAdvantage for user group members, and a developer resource CD that has a full working trial version of NetAdvantage and both the Windows Forms eBook and reference application as well as the ASP.NET reference application mentioned above.

Remember, meetings are free, membership is free, all we ask is that you register for the meetings on the web site so we order enough pizza. The East of Toronto site has some recurring problems with the Register link disappearing so please, if you go to register and it's not there, email me about it and then try again the next day. An accurate attendance count is so important to us. 



Wednesday, June 09, 2004 7:08:14 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, June 08, 2004

I have loved this trick since I saw it and I've just decided it's time to share it. Say you have some application or folder open, but it's minimized or has stuff on top of it, and you want to drag a file to it. Here's how I was taught to do that: grab the thing you're dragging, and drag it down to the taskbar, then wait patiently without letting go. If you let go, Windows will nag you:

So you wait, eventually the window opens up, and then you drag back up from the taskbar before dropping. If you're trying to drag another file into a product like FrontPage and a file is already open, you want to drag all the way to the top menu bar, otherwise the new file will just be inserted into the open document -- hardly ever what what you want.

Next time, try this instead. Get your drag started, and after moving the icon just a few pixels, and without letting go of the mouse button, use your other hand to ALT-TAB. Pop around to the target app and let go of the ALT-TAB, then let go of the mouse button to drop your icon onto the target. This is faster and less frustrating and now I do it all the time. I just checked, and you could do this even in NT 4, if not before. I just never knew, until I saw Scott Hanselman do it in a presentation. Very neat trick.



Tuesday, June 08, 2004 4:05:12 PM (Eastern Daylight Time, UTC-04:00)  #    

Now people I haven't even met are blogging about donuts... not that the back door he describes could persuade me to scan my own groceries, until the UI improves dramatically. It's forever telling me to put the bag back on the scale or take things off the scale until I'm ready to abandon everything I've bought just to make the process stop.


Tuesday, June 08, 2004 12:46:06 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, June 05, 2004

My blog about knowing what you want when you're networking (a job, an article, or whatever) triggered some more thoughts about knowing what you want in other situations. This post is about meetings.

I hate meetings. One of the great things about having so many remote clients is that I don't have to go to meetings. [Many years ago we were doing some work that ended up in Visual C++ 4. One day my Microsoft contact called me, saying "I'm just going into a meeting and need to know a, b, and c." We talked for about five minutes and then he headed off to the meeting. Four HOURS later he called me back to tell me the results of the meeting and as I got off the phone I was filled with gratitude that I had not been in the meeting. It's been an important part of my business model ever since.] But if you're going to go to a meeting, the least you can do is make it worthwhile. The key to this is to know what the meeting is for and what you want from it. These are not always the same thing at all.

Every meeting, no matter its nominal purpose, can give you something you want. A status meeting is an opportunity to be recognized for recent accomplishments and to get the credit you deserve. Or perhaps it's an opportunity to get a decision maker to make a decision the way you want it made. A sales meeting is easy; you want the sale, or permission to submit a proposal, or to be put on the list of bidders. A "let's get this stuck project unstuck" meeting or a kickoff meeting have obvious purposes, but that doesn't mean you shouldn't stop to think about what you want from them. Do you want to be assigned the unsticking tasks? Do you want a deadline moved? Do you want someone else's behaviour to be redirected?

Occasionally I wander into meetings without particularly thinking about what I want from them, just because it's the regular meeting or because my client invited me. Those meetings are boring and horrible. About 90% of the time I decide in advance what I want from the meeting. I usually put a little thought into how to get it, but what seems to really matter is just knowing what I am aiming for. Almost without fail, I get it. (If I go as part of a team and discuss it out loud with my team mates before we go, I have never got less than I wanted.) And this isn't just a matter of taking advantage of the unprepared people who wandered into the meeting without a plan and can be bent to my will :-). The really neat meetings are the ones where everyone in the room knows what they want and we dispense with the rest of the nonsense and get down to brass tacks. Then we really get things done, and I don't hate those kinds of meetings at all.


Saturday, June 05, 2004 11:30:56 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, June 02, 2004

One of the topics that came up and then became a theme at the Women in Technology Luncheon at TechEd was networking. One thing I said was such a surprise to me when I first learned it that I want to repeat it here. When you're looking for something, you need to keep in mind that someone out there wants, no NEEDS, to give it to you. I'm serious. If you're looking for a job, the person who is going to hire you isn't going to do so to be nice, they NEED another programmer or a project manager or an architect or whatever it is you are. If you want to write an article, there are editors who are looking for authors, who come to conferences for no reason other than to find authors. If you wrote a cool piece of code that you plan to sell for money, there are people who NEED that piece of code and just have to have the functionality it provides. You're not asking for favours. You're meeting their needs. They're meeting your needs too. That's what makes the world go round. Hook into that, and you'll get a lot of what you want.

Along with that comes the responsibility of knowing what you want. Very few people (if any) go to a conference needing to advance someone else's career. So if you are wandering around with the vague goal "I would like to advance my career" then you aren't going to find someone with the matching need. And really, why should someone else do the work of deciding what will advance your career? You're the one who knows what you're willing to do and what you really want. So stop for a minute and think about it. Then walk around knowing "I want to write an article" or "I want a new job" or whatever. And know the parameters of it, too. You want to write an article. Only for money? Or would a no-fee web site have a chance at publishing your words? You want a new job. Are you willing to move? How much do you want to earn? The time for deciding that is not while the no-fee web site editor's offer is hanging in the air between you, or right after the Microsoft recruiter has asked if you want to come out for an interview.

Know what you want. Know with as much precision as possible. Ask for it every chance you get. Don't waste people's time asking for things you can't actually accept, and keep in mind that when you ask you also offer. Know what you are offering.


Wednesday, June 02, 2004 11:55:24 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 31, 2004

Marcie blogs about donuts so I don't have to.

As for snacks at TechEd, just don't get me started.


Monday, May 31, 2004 8:14:14 PM (Eastern Daylight Time, UTC-04:00)  #    

Friday morning at Tech Ed I was talking to some folks on the C++ team about the language changes that are coming for C++ and what they really mean. I don't mean that “ref class” means a class whose memory is managed by the runtime. I mean “what is the importance to a language of its syntax, and of changes to that syntax?“ How does changing a language affect the community of people who are using that language?

Managed Extensions for C++ was an attempt to bring the CLR to C++ without changing the syntax of C++. It had the side effect, in my opinion, of changing the spirit of C++, of preventing you from writing “real“ C++ for the CLR. The new language, to be known as C++/CLI, changes the syntax, but oddly enough that makes writing C++ for the CLR more C++-like than ever.  The idioms, the ways of thinking, the patterns of development, transcend the syntax. We get destructors, we get templates, we get type-agnostic code. I want this new syntax to be widely accepted, and for people to move to .NET without leaving C++ for C#. I want this partly for selfish reasons, of course: there's value in being a C++ expert only as long as there are other C++ programmers doing my kind of work. Otherwise I'm just the last person to see the light and move to C#. But I also truly believe that if you've gone to the trouble of learning C++ (and really learning it, so you like templates and destructors and operator overloading and the like) then you are foolish to wander away from that and learn a different, less powerful language. You can't beat C++ for interop, and it's a first-class CLR language for libraries, services, and other back end work. Front end work is tough because certain product teams haven't built C++ wizards and designers, but it's not impossible. I for one am agitating for wizards and designers that support C++ and I'll report back as I make progress there.

To me, this is a turning point for C++, a chance for people who rejected the framework to stick with C++ or rejected C++ to go to the framework to get the best of both worlds. But I know that there's a limit to how many times you can change a language, and if this version is as poorly-liked as Managed Extensions, times will not be happy. The good news is I like C++/CLI a lot, and believe it will succeed as a language to bring .NET to C++ and C++ to .NET.

Who else feels the way I do? Stan Lippman, for one. He says “I personally guarantee that anyone that feels passionate about C++ will be both delighted by and engaged with the C++/CLI language that will be shipped with Visual Studio 2005.“ You might feel that “delighted“ is a bit strong, but wait till you see for yourself. And if you hate Managed Extensions, you'll chuckle to read how he feels about them. 

How can you learn more? I have an upcoming codeguru article on the syntax. Herb Sutter had a horrible timeslot at TechEd to talk about this, but you can find the slides at (I think you need to be a TechEd attendee to log in.) There are links all over http://msdn.microsoft.com/visualc/ as well. I am indeed delighted with the new syntax (am I hopeless or what, but I actually laughed with happiness when I saw how properties are done now,) and I hope you will be too -- for my sake and yours.

If you're working in C++ now but you're not working on the CLR, should you learn Managed Extensions -- the __gc stuff -- or wait for Whidbey? I guess I'll say get a copy of the Community Technical Preview (it's still pre-beta) and start learning Whidbey/2005 syntax now. If you are using __gc now, get ready for things to be a whole lot nicer really soon.


Monday, May 31, 2004 1:34:37 PM (Eastern Daylight Time, UTC-04:00)  #