December 2003 - Posts
I've been bitten yet again. I just printed the 28 page WS-Security Drilldown in Web Services Enhancements 2.0 document and found that the copy runs off of the page. This happens all the time and I have to cross my fingers and re-print in landscape mode.
I don't like reading long articles on the computer and printing things lets me read them on the bus/train while commuting. MSDN uses special printing magic so when you click the Print This Page link, a different, printer-friendly page is printed instead of the one you're currently viewing. Selecting File|Print Preview shows the page as its rendered in the browser, not as it will be printed.
Is it too much to ask to have printed documents fit on a portrait 8.5” x 11” page? If not, how about a messagebox that tells me I need to switch to landscape mode? If I had an even moderately sophisticated brain I could remember to always do this. I don't, and I don't.
(Don't get me wrong, I love MSDN dearly. I just don't like wasting paper/ink/toner/time.)
If you're like me, every time you shut down or reboot Win2003 and are faced with the dialog asking why you're shutting down, you think “bloody hell, when I log back in I'm going to remove that dialog for good!”. While it's rebooting/shutting down, you grab a beverage, chat with your coworkers and possibly even play Halo if you're one of the eight people still employed by an “internet startup company”. By the time the OS is done shutting down/rebooting, the offending dialog box is a long-lost memory. ..Until you need to shut down again and the nightmare returns.
This is my reminder to you. Do it now. You deserve it!
The tip below is from one of my favorite email newsletters, Windows Tips & Tricks UPDATE:
Q. How can I use Group Policy to disable the Windows Server 2003 Shutdown Event Tracker?
A. Like Windows 2000, Windows 2003 has an event tracker that prompts you to enter a reason for shutting down a server. To disable this feature, perform the following steps:
- Open the Microsoft Management Console (MMC) Group Policy Editor (GPE) snap-in or use Windows 2003 Group Policy Management Console (GPMC) to load the Group Policy Object (GPO) that you want to modify (e.g., the Default Domain Controllers policy).
- Navigate to Computer Configuration, Administrative Templates, System.
- Double-click Display Shutdown Event Tracker.
- Select Disabled, then click OK.
- Use the Gpupdate command to force the policy to refresh.
This doesn't have anything to do with technology, but it's an interesting bit I'd forgotten about long ago. After getting my first job after college I decided it was time to buy some furniture. I was shopping around and found myself at Marshall Field's a few times over the course of a month or two. I noticed that everything was on sale every time. The names of the sales were different, but they were sales nonetheless. I got to talking to the sales lady and she told me that, yes, everything was always on sale, except for a couple days a year, because it's required by law that you can't have something on sale every day of the year.
So, it occurred to me that they don't have sales, but rather days where you really get shafted. They don't advertise those days. I feel for the sorry souls that go impulse shopping on the shaft days. Needless to say, I didn't buy my furniture there. Caveat emptor!
Got an email today from Buy.com with what looks to be a great deal: $99 for
TDK DVD ±RW after rebates. Not bad at all if you're good with the rebate thing.
I'm not sure why, but I've never liked Orbitz. Probably all of the popups back in the pre-popup blocker days. I'm having a heck of a time finding a car to rent so I can get back to Michigan for the holidays and decided to try Orbitz. Whew, they have cars! Or so I thought.
The matrix below was mostly full when I first saw it. I clicked a rate and a few moments later it replied with “Oops, we really don't have that car, sorry.“. Click. Wait. No car. Click. Wait. No car. Sixteen more click and waits, sixteen “no car“s. Finally, I find a car...and it's in Schiller Park. I searched Chicago. Schiller Park is fifteen miles away, which is fine if you have a car, and I obviously do not. Looks like I'm walking.

While reading some blogs today, I ran across a nice C# coding standards document. The document closely follows Microsoft's “Design Guidelines for Class Library Developers” and is very similar to my personal standards. My notes, as well as some additional standards I try to follow, are below:
3.2.2
I prefer to prefix private fields with an underscore.
5.2.6
Not necessary. The runtime knows when objects are no longer used, even within the body of a method. For example:
1 MyObject o = new MyObject();
2 o.DoSomething();
3 DoSomethingElse();
If a GC occurs at line three, the object referenced by "o" may be garbage collected.
7.2.1
Classes with internal accessibility don't need to follow this, as versioning is not an issue. All consumers of objects of that type are compiled with the class.
10.2.6
StringBuilder is not a panacea. See http://weblogs.asp.net/ricom/posts/43628.aspx and http://weblogs.asp.net/ricom/posts/40778.aspx for appropriate usage.
11.2.2
I prefer to have all of the fields at the top of a class in order of accessibility from public to private.
Personal:
- For methods that return arrays, always return an array. If the method produces no results, return an empty array instead of null. If you must return null, note this in the XML documentation.
- Use explicit interface implementation for code that does not adhere to the roll of the object, ie. debug code. For example, sometimes it's helpful while debugging to get a certain value from each object in a custom collection. A GetProductIDs method can be written to obtain these values, but the method has no practical use to the consumer and, since it's debug code, it may be changed or removed in the future. It also pollutes the public interface. Classes that contain methods like these should implement an IDebug interface and implement those members with explicit interface implementation.
- Provide as much information as possible in exceptions, including how to possibly avoid the exception in the future. Provide state information, if possible. For example, if a ProcessInvoice method encounters a line item without an ID, include the name of the product in the error message or in a property off of the custom exception. This can make debugging much easier for the consumer.
- Never store the integral value of an enum between application sessions. Members of the enum may be removed or reordered.
ChrisAn and
DBox have a new
MSDN TV webcast demonstrating XAML's versatility by creating a colorful console app. The show is capped off with three Windows Day songs, one for each of Longhorn's pillars. Enjoy the season, but please don't code and drive.
Maybe I'm still bitter from living the first several years of my professional life in the internet bubble where every other day some super-funded startup claimed they had a product that would change my life. When all the Ginger/Segway hype started, I wasn't moved. I'd heard it all before and the only life-changing thing I'd encountered was puberty.
Well, it looks like I wasn't the only one. Not only are they not selling here in the US, but they're actually illegal in most of Europe. Gory details at Wired.
I don't know how many times I've been typing something when a dialog pops up mid-word and then it disappears as quickly as it appeared because my brain doesn't work fast enough to tell my fingers to stop typing the instant an unexpected dialog box appears. This is generally A Bad Thing since whatever popped the dialog thought it was important enough to disrupt whatever I was doing in the first place. This just happened with my firewall. I was in the middle of typing an IM and apparently some app wanted to use the internet. Which app was that, you ask? I have no idea because the dialog contains a default button.
I consider this a bug and I'm going to file a bug report when I'm done typing this. Please, friends, if you must pop up a dialog that steals focus, don't give it a default button. I and many others thank you.
Early word is it won't be based on standards, which I find that a bit hard to believe considering the prevalence of UML. Time will tell.
What's behind Microsoft's Whitehorse modeler? [ADT]
More Posts
Next page »