Wednesday, June 25, 2008

Reducing email distractions

Email has the potential to be very distracting. How many times a day do you check your email? Everytime that little Outlook notification pops up about a new email coming in, don't we all immediately go read it? That's a lot of interruptions in a typical day.

As of this morning, I'm trying out a new way to process email to reduce those distractions. I'm going to check my inbox just three times a day: first thing in the morning, around noon, and at the end of the day. I hope to get that down to two checks a day eventually.

I've turned off the default Outlook notifications. I've removed the Outlook icons from the notification area in the taskbar. I set up a new rule to pop up an alert if I get an urgent email (so if you need me to respond immediately, mark it urgent).

To make sure I don't need to spend much time in my inbox, I use a system very similar to that described in Getting Things Done where I immediately process the items in my inbox. They go into one of several specially named folders I created: @Action - Now, @Action - Soon, @Someday, @Waiting; or they get deleted; or they get moved into one of my reference folders (I have one for each project). The special folders start with "@" to sort them to the top of the folder list in Outlook. By moving things into one of these folders immediately, it keeps the inbox very clean.

@Action - Now is for emails I need to act on today. @Action - Soon is for things I need to act on but at a lower priority. @Someday are things I want to read in more detail and possibly act on later. And @Waiting is for emails that I can't do anything with yet because I'm waiting on someone else.

I'm one of the few people who actually likes the Outlook Today feature in Outlook. I have it configured to show me the next 7 days of my calendar, my task list, and the message counts of my inbox and the four special folders I mentioned above.

I'll let you know how it all works out.

Defining .NET properties the easy way

Once you've done a fair amount of programing in .NET, it quickly becomes tiresome to define your custom properties in code:

private int myProperty;
public int MyProperty

{
get { return myProperty; }
set { myProperty = value; }
}

It gets to the point where you seriously consider just declaring everything as a field instead:

public int MyProperty;

But resist the temptation! There are downsides to this including difficulties with databinding and all sorts of issues if you later change your mind and want them to be properties.

So, stick with properties but make your life a little easier by using the built-in prop snippet. When you want to create a new property, just type prop and hit Tab twice and Visual Studio will insert a nice template for creating the property. You can tab through the fields in the template and easily change the type and name to what you want.

And here's the really good news: the new version of C# that comes with Visual Studio 2008 includes a feature called Automatic Properties. This allows you to define basic properties using this syntax:

public int MyProperty { get; set; }

Behind the scenes, the C# compiler translates this to (basically) the same code as if you'd used the more traditional syntax.

For more information on Automatic Properties, see this post from Bart De Smet's blog.

Storage of NULL values in SQL Server

Earlier today a couple of team members asked whether NULL values in a database take up any space. I wasn't sure of the answer so I did a little research which I decided to share here in case anyone is interested.

The quick answer is no, NULL values don't take up any additional space. However, each column does take up a certain amount of space whether or not it contains any data. Fixed datatype columns (int, float, char, etc.) take up a specific amount of space depending on the size of the datatype (int=4 bytes, smallint=2 bytes, float=4 or 8 bytes). Variable length columns (varchar, varbinary) take up a minimum of 2 bytes per column even if empty (to store the actual length pointer).

The NULL status of each column is stored in a special part of the row called the NULL bitmap that contains one bit for each column, in 8-bit chunks. So a table with 1-8 columns has a one byte (8 bit) NULL bitmap but a table with 9-16 columns has a two byte (16 bit) NULL bitmap.

If you’re interested in the detailed version, be sure to check out Inside Microsoft SQL Server 2005: The Storage Engine, which I highly recommend with the rest of the series.

The document was sent to the printer

I click the Print button in Word (or any application) and I quickly get a popup in the taskbar telling me "The document was sent to the printer."

What a surprise--I wouldn't have expected that!

That popup has to be the most annoying Windows feature. It's unbelievable that it still remains even in Vista. Of course my document was just sent to the printer--I just printed it!

A useful message would be one that told me when it was finished printing.

And (in my opinion), they don't make it easy to figure out how to turn these messages off. But I eventually tracked it down (here is the Vista version):

1) Control Panel -> Printer
2) Right click and select Server Properties...
3) Go to Advanced tab and uncheck Show information notifications for network printers.
4) Click OK and print away.

Sunday, April 13, 2008

Learning to play the piano: it's just hard

One of my lifelong goals has been to learn to play the piano. That seems like a natural desire for me since my parents both have strong musical talents including having been music teachers and church musicians. In fact, my mother has long taught piano lessons, and attempted to teach me as a kid.

It didn't take.

I had two problems: the main one was that I just couldn't stay dedicated enough to practice as much as I apparently needed to; the other was that I didn't seem to be coordinated enough to be able to move more than one finger at a time.

Well, I recently purchased a musical keyboard in hopes of finally learning. I have been using a combination of a book and software program to pick up where I left off so many years ago. Not the same personal touch as Mom, but it seems to be going OK so far.

Trying to learn at this age has been very enlightening. I've come to the conclusion that playing the piano is just a very difficult thing to learn. And I think that was the biggest reason I gave up as a kid: I thought it was supposed to be easy and because I struggled so much, I figured it just wasn't for me. I thought it was supposed to be easy because my parents made it seem effortless. They often played all sorts of impressive music at church and at home. My mom had a parade of piano students arriving night after night, most of whom seemed to be learning it pretty quickly.

I had no problem learning to read music; I was an above-average trumpet player and a top-notch singer in school. I had a good ear and great rhythm and excelled in marching band, jazz band, and chorus. Why was the piano so hard for me?

I had no trouble learning touch typing. That's been invaluable for my computer career and I continue to be a great typist.

So what is so different about the piano?

Well, I've realized there's one big leap I never had to make with all those other things: playing more than one note at a time. With the trumpet, singing, and the computer keyboard, you only ever have to do one action at a time (not counting the occassional SHIFT and CTRL key combos on the computer keyboard). I'm convinced it's a tough skill to achieve. As long as I'm playing one note at a time on the piano I'm fine; making that leap to polyphony is just really difficult.

And so, I now see that all that practice really is necessary. Most pianists are good because they just worked really hard at it. I suppose there are people who can just sit down for the first time and play, but I think for most of us, if we want to really learn to play, it's going to take a lot of effort.

Knowing that has given me new hope. I feel like I have a pretty good chance of learning this and even getting pretty good if I just keep working through it. It's going to take plenty of time and effort, but now that I know that's what's needed, I should be able to stick with it.

Sunday, February 24, 2008

Beware of Adobe rebate fraud

I just want to put a warning out there for anyone counting on the rebate for Adobe products. You might get the rebate, but it's going to take some work.

I am a longtime fan of Adobe Photoshop Elements. An outdated version came with a scanner I bought a few years back. I liked it enough to upgrade to the latest version. And I've upgraded twice more since then. It's a great program for fixing up digital photos. I've been buying the bundle that includes that and Adobe Premiere Elements, which is a decent program for editing videos and creating slideshows.

The bundle sells with a $30 rebate. The first time I sent in my rebate request, I heard nothing for months. Finally, I get a letter stating I hadn't submitted the necessary proof of purchase (a tab torn off from the inside of the box flap). But here's the crazy part: in the envelope with the denial, they also sent back the tab that I had submitted! So I resubmitted the request and this time it was honored.

Well, a year or two later I upgraded again and sent in the rebate request. Again, it was denied for the same reason: no proof of purchase tab was sent. They didn't send back my tab this time. But I sent a reply letter explaining that I did submit the tab. They then approved the rebate.

So this year when I upgraded again and submitted my rebate, I was sure to make copies of everything. Sure enough, I get a postcard this week, telling me the rebate was denied because "we did not receive an original proof-of-purchase tab 1 with your request". This year's added trick is that it includes these instructions: "To resubmit for this offer please return this card or letter, with any items mentioned above, to the address shown" but they don't list an address! So, I'm going to have to track down an address.

I can't believe they get away with this, which seems to be standard procedure for them. I'm sure plenty of consumers don't bother to resubmit. This time I filed a complaint with the Federal Trade Commission.

Please leave a comment if you've had similar experiences with Adobe rebates.

Monday, January 21, 2008

Mourning for our country

I've been feeling a bit depressed since the start of the new year and it was particularly troubling because I couldn't figure out why. Things were generally going OK in my life. Perhaps it was just the post-holiday blues.

But a few days ago the cause clicked in my head. I'm mourning the death of our once fine country, the U.S.A.

I realized my malaise had set in around the time the results came in for the Iowa presidential caucuses and Ron Paul's fifth place showing made it clear there wasn't going to be a sudden, surprising show of support for Dr. Paul in the elections that count. The primaries that have followed have been about the same--Paul has done remarkably well but not well enough to be in serious contention for the nomination.

And I honestly believe Ron Paul as President could be the last hope for saving our country. Paul is the only candidate who is willing to speak the truth about the condition we're in and who discusses the reality-based plans we need to implement to save our country as envisioned by the founders (and perhaps to save it at all).

My main concern at the time was how all the other candidates would continue our empire building and progression toward fascism and tyranny. We would continue to lose our personal liberties and become more and more hated around the world.

Since then I've become even more aware of our very precarious financial situation. I've known for quite some time how damaging our social programs and then the Iraq war have been to our economy. But through some reading I stumbled on to more recently, I now see that we're on the verge of bankruptcy as a country. In fact, there's a very real chance that it's too late to avoid a serious recession. We have built up too much debt and our dollar is about to collapse, and this will undoubtedly cause a drastic drop in our standard of living in this country. There really isn't much left that the Federal Reserve can do to delay the collapse, and there is really no way remaining to avoid it altogether.

If you're interested about this, here is some recommended reading/viewing:
America: Freedom to Fascism (DVD)
Crash Proof: How to Profit from the Coming Economic Collapse (Book)
The Energy Non-Crisis (free video)

It is a sad time for our country. And just as sad is that most people don't even realize it yet.