Speed up Tasks on Your Windows Mobile Smartphone

March 31st, 2008

One of my biggest frustrations with the Windows Mobile task application is that it synchronizes your completed tasks. After a while, this greatly outnumbers your active tasks, making the task app really slow. So I periodically move my completed tasks to a separate task folder (I like to have them around for searching). Alternatively, you could just delete them once a week or so. The following Outlook macro code can be used to move all the completed tasks in your tasks folder to the first tasks subfolder.

    Dim fld As Folder
    Dim fldComplete As Folder

    Set fld = Application.GetNamespace(“MAPI”).GetDefaultFolder(olFolderTasks)
    Set fldComplete = fld.Folders.Item(1)
    For x = fld.Items.Count To 1 Step -1
        Dim objTask As TaskItem
        Set objTask = fld.Items(x)
        If (objTask.Complete) Then
            objTask.Move fldComplete
        End If
    Next x

Platforms vs. Solutions

March 21st, 2008

From http://www.flickr.com/photos/tripu/Jeff Atwood recently discussed The Dark Side of Extensions, and advocated taking the five most useful popular extensions to Firefox and integrating them into the product as features. Before the Firefox team decides to go do that, it might be useful for them to step back and consider what they want Firefox to be: a solution or a platform.

The platform vs solution question eventually rises in any successful software project. The reason is that successful projects are used and usually by a lot of people. The more people use your software, the more people want to change it to fit their particular needs, address weak areas in the product, or adapt it for new uses. Once this pressure starts being applied, from your customers, you have a choice. You can hire extra people, work extra hard and try to take care of the most frequently requested changes as quickly as possible. Or you can do the work to make your software “extensible”, essentially to turn it into a platform. Of course, you can also do something in between.

The most obvious example of a platform in software is the operating system for a personal computer. Windows, Linux, and Mac OS X, are all platforms for personal computing. Of the three Linux is probably the most pure as a platform. Mac OS X is the least pure, because Apple sees it more as one part of a larger solution that they offer to users, and so don’t give their developers the same level of support that either Microsoft or the open source community does.

Those who advocate a pure platform approach like Linux, because you can include or exclude “bloat” (i.e. features) that you never use. This was very apparent in the comments to Jeff’s post, where tons of people said, in effect, “I don’t want a bloated browser like IE or Opera - I just want it to include the things I use.” Mozilla is definitely going down the platform route with Firefox, and the users who therefore choose Firefox reflect that.

Microsoft tends to take a middle of the road approach with its software. Windows and IE both attempt to be solutions and platforms at the same time. And both had great success because they got the killer “apps”: Windows had Office and IE had all the websites that only worked in IE for years. Heck, even now my wife won’t switch to Firefox because some pages “don’t look good”, despite Firefox’s apparently better support for standards.

Apple obviously approaches the problem by trying to produce a solution, and that has been extremely successful for them in certain markets (can anyone say iPod? iPhone?). In the past they haven’t had as much success as a platform, so it will be interesting to see how the new iPhone SDK works out for both Apple and it’s developers.

Ultimately, I’m not sure that creating a platform for end-user extensions is the right way to go in the browser market. Platforms are market makers. Windows created a huge market for all types of software by creating a successful platform for personal computers. The real market that browsers enable is the market for cool web sites and services, not the market for browser extensions (how many browser extensions are profitable products?). A browser needs to focus on becoming a platform for web sites and services, and becoming an easy way to get to those for end users. Browsers are not the only user interface to the internet, but they are the primary one and can remain so only if they provide an excellent platform for creating web sites. Of course, there are huge problems in trying to do that. But if a browser can do that, in a way that gives it a competitive advantage, it will become the platform for the web and be more successful, and probably more profitable, than Windows.

How to Get More Done and Be Happier

March 12th, 2008

So I realized the other day that I was getting up at the same time each morning, doing more, and getting to work earlier. I thought I’d share how I did it. First, you should know that my morning routine is important. I try to spend some time praying and studying the scriptures, plan my day, then do the standard stuff: eat, shower, spend some time with my family, and leave for work. In the past I always got caught wasting time in the middle of all this following blogs, watching new movie trailers, reading a good book, or getting distracted in any number of other ways. I knew it was a problem and I tried to fix it by “focusing” more, pushing through the things that were important, etc. It never worked for very long and my old habits came back.

But I realized this morning that all that changed a couple months ago and I didn’t even notice. I now get to work earlier, get more done in the morning, rarely give in to the distractions, and, most importantly, feel way better about the way the day is going as I arrive at work. This means that my “private victory” each morning is happening. Instead of arriving at work feeling like a failure because I’m late, or because I didn’t get anything done before coming in, or whatever, I now get to work and I’m able to focus on my work, knowing that all that morning stuff got done.

You’re probably wondering what my secret is.

And you’re getting mad because I’m dragging this out and not telling you.

Ok, I’ll tell you.

I decided to do more.

Yep. I decided I just needed to add a few more things to my morning routine. Ok, actually just one thing, but it usually takes 30-60 minutes. Despite that I’m getting more done, going to work on time each day, and doing so with more energy. You may wonder what this magical new activity is. But there is nothing magical about it. Unless it’s magical because I really like to do it and I’ve made a commitment to do it. But everybody has something like that. I think the only magical thing about it is that I decided it was important enough to do each day, and do early to make sure it happens.

For me, it’s running. Yep, I’ve been going running each morning for the last couple months and I’m still doing all those other things, and I’m getting to work earlier. I’ve run a couple marathons and loved to run in high school, but it’s been years since I ran regularly or towards a goal. But I’ve committed myself to run a marathon by the end of the year, and I’m on track. I’ve run 46 days straight without missing a day (excluding Sundays). I’ve worked up from my first week’s mileage of 5 whopping miles to 12 whopping miles. That doesn’t seem like much, but it’s part of my commitment to keep going. I’m NOT going to increase mileage so fast that I get burnt out, injured, or bored. I’ve also found a friend to run with in the last couple weeks and that has helped me to keep going.

Of course, if you want to get more done in the morning running probably isn’t going to cut it, though it might. The key is to find something that is important to you that you’re not prioritizing like you should. For me, it was running. For you, it might be photography, or practicing an instrument, or working on a coding project on the side, or riding your bike, or reading great literature (or not so great literature), or woodworking, or whatever. The main thing to recognize is that when you put your priorities in the right order, life is just smoother. The important things get done, the less important things are more clearly less important, and you’re happier about everything you do. By starting your day with the “first things first” you set the tone for the whole day. And anticipating that each night can make it easier to prepare accordingly. I’ve started getting all my running gear ready each night, and I’m going to bed earlier so that I’m ready to go when the alarm goes off.

So now it’s your turn. Ask yourself: what do I need to make a higher priority in my life? How can I work on that a little each morning? And then go do it. You’ll be happier.

Administrator in Vista

January 1st, 2008

ChessSo I’m working to setup my new “dev box at home” with Vista and finally noticed that there was no administrator account. That was not something I had heard about, but have since found quite a few articles referring to the change. It was interesting to see what the reasoning was behind the change, as well as the attempts of some to re-enable it for all the wrong reasons (like to get rid of UAC).

Based on this post at the Vista security blog, it appears that they’ve thought through the decision and all the interesting test cases fairly well. The one point I’m hitting is that I also have a Windows Home Server. On my other machines (XP, Media Center) I have the normal family accounts plus an Administrator account, each of which has some permissions on the WHS machine. This makes it easy on any machine to do administrative work on both the machine and the server. I found out about this whole no administrator thing when I tried to login (doh, where is it) and then create (can’t create an account named administrator) that account. Turns out it exists but is disabled.

Although it is fairly easy to enable the Administrator account, I’m not really sure if I should. It doesn’t have UAC enabled by default, but I can enable that. However, the fact that it’s different from other admin accounts makes me wonder if there are other differences that I should be aware of. I’ve been using Vista off and on at work for the last year and a half, and I haven’t noticed the need for the original “administrator” account until now. The alternative to enabling it would be to create a new admin account on all the other machines.

I think I’ll actually go that route. I like to have control of things, and being forced to create an account like this when I get a new machine is a good reminder of the bigger world of security issues that I need to be aware of. I should also note that despite the new UAC features in Vista, I’ll still be maintaining separate admin and user accounts. Though my wife sometimes gets annoyed when not running as admin I remind her that it’s kept our computers very safe over the last few years.

Building a Windows Home Server

November 26th, 2007

WHS Parts

Around September, Kami and I decided we would dedicate some money to replacing our dying backup server. It was nothing fancy, just a simple box that backed up important stuff via FolderShare and provided access to our printer. With the impending release of Windows Home Server it made a lot of sense to just wait a bit and setup a new box with that for backup, printer sharing, and away-from-home access. A friend of mine had recently tried to convince me to start building my own PCs for the savings, the customization opportunities, and the ability to build something more likely to last longer. So after thinking about it a bit I decided to do just that, instead of just getting the HP MediaSmart Server. I’ll outline the process of building the box in this post, and later talk about installing and setting up the software.

You can see the computer I got as a NewEgg (but without the motherboard, which is no longer available). Some of the things I wanted over the MediaSmart server included dual hard drives with more total storage space, a faster, upgradeable processor and motherboard, and 1G of RAM instead of 512 MB. What’s cool is that I got all this for less than the price of the cheaper MediaSmart server.

WHS Assembling

So, everything finally arrived and I found an evening to put it all together. I basically followed the instructions that came with each part and used Jeff Atwood’s excellent Building a PC series to direct my efforts. I skipped the overclocking, since I don’t really care about that at this point, nor do I have the time to really put that kind of effort into this PC. However, I may do it with the new dev box I’m buying for home use next month.

WHS Assembled

I got everything set up and connected, and it worked! I have yet to install the software, because I have yet to get the software. I planned on using Microsoft’s company store to get a nice discount on Windows Home Server, but they’ve been out ever since I started working on this. And the discount is big enough that I can wait, praying that our old backup server doesn’t totally die in the meantime. So I’ll post about that soon.

Why Keyboard Shortcuts Don’t Matter

November 13th, 2007

Photo taken by http://flickr.com/photos/cc511/So, my last post was all about how I’m trying to become more productive by learning a set of keyboard shortcuts that I can use for faster text/code editing. In this post, I’m going to argue against the premise that it could actually make you faster. The reasons I’ll outline include opportunity costs, lack of portability, anything else? Well, we’ll see, won’t we.

First, opportunity costs. Yes, the dirty little secret about using keyboard shortcuts is that it takes time to learn them. The same could be said of command line interfaces. The main reason that most users (i.e. non-power users, those poor souls) don’t use keyboard shortcuts, or command line interfaces, is because of the learning curve. And there is an obvious learning curve. I’ve spent too much of the last couple days working to remember the keyboard shortcuts and use them a lot so I can make them habits. “But wait!” you say, “It’s an investment!”. Sure, ok, I can buy that. Now let’s look at the numbers to see what the payoff on that investment is. This page seems to indicate that you could save 16 hours a year by using keyboard shortcuts. Two whole workdays. Um, that’s not much when you consider that it probably takes more than two full workdays to develop the muscle memory needed to really gain that much time savings. So you won’t really start to see a return until you’ve been doing it for a couple years. Of course, others state that the mouse really is faster, so I’m not sure why I even argued that point. Okey, I know, the point is that the mouse is faster for people who haven’t yet built up that muscle memory. But then again, maybe not.

Ok, now let’s talk about opportunity costs. What else could you do with the time invested in memorizing keyboard shortcuts and making their use habitual? Wisely invested, a few days each year could let you read lots of books, take training courses or attend seminars, develop personal productivity tools (more on this in a future post), start learning a new programming language, or listen to the 1000 songs that can fit on your iPod nano. Doh, I mean your Zune.
Anyway, the next challenge is portability. Sure, you might learn all the cool keyboard shortcuts for vim, or emacs, or Visual Studio, or whatever. But you can’t then use them in the others, or in Notepad, or a web browser, or a mail program, or whatever. Even the really basic navigation ones, much less the more interesting ones and potentially useful ones. This actually makes using other programs more difficult once you’ve mastered a lot of app specific shortcuts. Unless you want to go the route of the “Emacs As Operating System“, which may actually have benefits, but only for a very small subset of people.

Basically, those who would use Emacs As Operating System are people with a great memory. Those who can memorize, either in the head or in their muscles, thousands of useful commands. The rest of us are ok with a JIT use of commands. We find them and use them when we need them. Keyboard shortcuts are useful for commands we use more often then once an hour. That can actually include quite a lot of commands if you’re a developer who lives in a text editor of some type most of the day. But it probably doesn’t extend much beyond that. And trying to develop muscle memory of commands used less frequently will be very difficult.

Wow, I think I talked myself out of my latest project. Guess I’ll have to go find some other way to save 16 hours a year…

Visual Studio keyboard bindings and text editor requests

November 12th, 2007

I recently started experimenting with emacs on the many suggestions of Steve Yegge. Unfortunately, just getting up to speed in emacs (i.e. working as quickly as I do in Visual Studio or even vim) was taking a long time and when time is short, as it is during milestone development here at Microsoft, that’s not the best way to spend it. So I’m putting off that experiment until work slows down, or until my parental leave in January. In making the decision to stick with VS for the next few months of coding, though, I definitely want to improve how I use the text editor and as I began working to do that I ran across this post by Noah Coad. So I thought I’d respond to Noah and share some of the things I’m doing to improve my keyboard use (and therefore, speed) during development.

My familiarity with the vim and emacs commands has led me to seek a keyboarding compromise. I love vim’s ability to navigate very easily on the home row keys. But I like the fact that emacs doesn’t have two separate “modes”, command and insertion. I always get thrown off in vi because of that. So my navigation keys are basically the vi navigation keys while holding down the Ctrl key. I’ve also adopted a hybrid of the emacs convention of using Alt to switch from characters to words, lines to sentences etc. So Ctrl-Alt-J moves my down a page, etc. And then, I like the windows convention of holding down Shift while nagivating to select text, so I’ve added mappings to do that, e.g. Ctrl-Shift-K to select up a line. I’ve also added some other navigation keys that follow this same pattern, such as Ctrl-0 to go home. Of course, I’ve also remapped the commands that are at those bindings by default to other bindings depending on how often I use them.

So far this seems to be going well. I’m still learning these keyboard shortcuts and that’s taking a little bit of re-education, but I feel faster than when I use the mouse, which is a good baseline to start from.

Now to respond to Noah. I am now trying to use visual studio for more of my text editing needs, and customizing it more so that I can. As I’ve started doing this I’ve been impressed at how much power is there that I didn’t know about, but also frustrated by the little things that are possible but not easy to do. Searching, replacing, and regular expressions is an area that could definitely stand to be improved. Opening files from the explorer or from visual studio into new instances easily would be nice (an SDI type mode). One thing that would be useful is to have keyboard mappings that can be applied and then removed easily. This would be similar to modes in other text editors, but allow for some specific behaviors in certain cases.

Time for a new phone

November 2nd, 2007

Photo taken by http://www.flickr.com/photos/compujeramey/It’s time to buy a new phone. One of the cool benefits at Microsoft is discounts on phones and phone plans from most major carriers. So when my contract is up I go back to the discount web site to see what the latest deals are and if I should get a new phone. My current phone is a T-Mobile SDA that is falling apart because I dropped it when running across a parking lot in the rain. It’s a great little phone, but it would be nice to have one without a dorky rubber band around it. However, I have noticed other people with pretty beat up SDAs, so they must be reliably durable. However, having used it for a year and a half now, there are definitely some things I don’t like about it.

  • Candybar style. It’s just to bulky to put in my pocket, so I carry it around in belt clip, but I’d much rather have it in my pocket. The candy bar shape also requires that I lock the keys (which I don’t) or I randomly call numbers consisting of an odd mix of 0’s and *’s. So yes, I randomly call numbers consisting of an odd mix of 0’s and *’s cause locking the keypad is too much of a hassle.
  • No secondary display. I loved being able to look at my last phone (a flip phone) and see the time, missed call information, and number of messages. Now I have to push a key to get that and the information is mixed in with random stuff that the window mobile software puts on the home screen.
  • Four useless buttons. Yes, I know there are hacks to customize the SDA’s media buttons, but again, I’m too lazy to do it. So I use the speed dial, which, instead of being speedy, requires me to hold down a button for a long time. Its better than nothing for launching key apps (Calendar, OneNote Mobile), but it could be so much better.
  • Very tiny, but important, buttons. The home button, back button, and the two soft keys should not be the smallest buttons on the phone. And certainly not smaller than the media buttons. I’ll throw in here that the power button is difficult to use.

So yes, it could be better. Most of my qualms are with the hardware. However, I think the truly useful benefits and changes to phones could be done in the software. Before going further let me deal with the iPhone thing. The iPhone seems really cool. However, I doubt I’ll ever get one. Even if they sync with my outlook perfectly, have a flip phone, all that stuff. I just don’t want or need something so complicated. The same critique applies to the Windows Mobile phones out there. I want a phone that does three or four things perfectly.

  • Making phone calls. I don’t make a ton of phone calls, but when I do I want it to be seamless, fluid. I want a nice big number keypad with good feedback when I hit the buttons. I want an integrated list of recent calls (in and out), my contacts, etc. Modern phones basically have this list working well enough for me. But most phones don’t have a good keypad, least of all the iPhone.
  • Provide reminders. I want my phone to synchronize with all my calendars (home outlook, work outlook, etc.) and remind me of appointments and tasks. It should also be very easy to add one-off reminders for a relative or absolute time in the future. Those should be synced back to the appropriate calendar also.
  • Provide a recording service. But I’m not just talking about the wimpy voice recorder found in Windows Mobile. I want a button on my phone that kicks off recording so that I can instantly start talking. Once that happens, I want a list on the screen of things to do with the recording. The default, for me, would be to put it in my email inbox so that I can be reminded of it. Other possibilities would include making it a task, an appointment, emailing it, etc. Each of these would be preconfigured and would take just one more button click. If I just hit the “End Call” button it should do the default one. And for each of those it should run voice recognition, extract the best guess as to what I said and include both the text and the voice recording.
  • Provide voice access to information. I not only want the increasingly competitive 411 services automatically added to the speed dial (and a good speed dial would be nice), but I want a 411 service that allows me to access some of my own information that is in the cloud. I should be able to ask questions about my schedule, retrieve notes (like my wife’s library card number, which is currently in OneNote Mobile), and check for urgent emails.
  • Preferably a slim flip phone. I want to put it in my pocket. I want to have an external display with the time and information about missed calls and appointments.

It’s important to note what I left out. I do not want

  • An internet browser. They’re too much of a temptation when I’m sitting at my desk. I don’t need that with me all the time.
  • A camera. I’m not a picture taker. If I were, I’d want a decent camera with me also, not a significantly degraded phone experience. That said, I’ll take a camera in my phone if it is very much a secondary feature.
  • Driving directions, games, instant messaging, videos, a calculator, etc. Whenever something here is useful, it should be rethought as a phone number service I can call. Just as there are web services for many existing desktop apps, so most mobile apps should be phone services with voice as the main UI. Any time I need to enter text it should be possible to do so with my voice and decent voice recognition software, either on the phone or over the line.

At this point I don’t think there is a phone that meets my needs. I’ll probably settle for something that handles phone calls reasonably well, syncs my calendars, and is a flip phone. And it will have a bunch of stuff I don’t need or care about. But I can dream, right?

Habits are a Moat

July 31st, 2007

From http://www.flickr.com/photos/logicalrealist/Charlie Munger and Warren Buffett often talk about companies with “moats” or with some intangible asset that makes it very hard for other companies to effectively compete with them. Coca-Cola’s brand is their moat. The network effect has created an amazing moat for Microsoft around their operating system business. Google has a similar network effect moat around their advertising business. While I have almost always heard moats discussed in a business context, I was considering Munger’s “multi-disciplinary” approach recently and realized that moats apply just as well to individuals and the success that they can achieve.

An individual’s moat is their habits. After reading just a little of Munger’s writing it becomes clear that his great success in life comes from his habits of learning constantly, using mental checklists, and approaching all problems in a multi-disciplinary way. I’ve learned enough to recognize how powerful these practices can be but I haven’t really made them into habits. Most people haven’t. Of course, these aren’t the only habits that lead to success, and I’m sure Munger himself has many more. In some ways, his message for individuals is the same as Stephen Covey’s in The Seven Habits of Highly Effective People. Although Covey discusses seven specific habits to develop, he also states up front that it is the habits we have that create success. He wouldn’t limit success to just seven habits any more than Munger would.

Of course, corporations have the equivalent of habits in their corporate culture, and some corporations have great cultures that work like moats. The moats I discussed above, however, are not primarily culture based. Likewise, individuals can have non-habit moats such as personal networks or reputation. However, I believe that to develop these we need to have the right habits. Scoble’s habits of constant blogging and networking have made him into a force to reckoned with in the technology world. Many others have developed the same habits and the same ability to influence others.

Regardless, as I try to become a better software developer in the coming months, one thing that is weighing on me is the idea that I need to be developing the habits of a professional engineer in order to create a personal moat that makes me more competitive. But I’m also looking beyond that to the habits I need to be more successful in other areas of my life - my family, church, hobbies, etc. I suppose its time to go back and read 7 Habits, if only for the reminder of how to change them.

Old Construction Prerequisites

July 30th, 2007

Code CompleteSo it’s now been two weeks since my last post committing to a daily post about what I’ve been reading. I went on vacation to Bear Lake for a family reunion that was great fun except for the bad sunburn I got. I’ll have to tell you sometime about my bad burn from ‘91 (Florida).

Anyway, I did manage to get chapter 3 of Code Complete read at some point during the vacation. I was half-surprised by how much of McConnell’s advice parallels the agile principles that are so popular currently, given that it was written about 15 years ago. While the focus is still on waterfall development the value of iterations is recognized and the need for using development practices that “accomodate changes.” I did get a kick out of how many of the questions in the checklists are things that might not even be considered up front by many agilists nowadays. The most dated section was the section on programming languages, with no real discussion of modern programming languages like Java, C#, or any functional languages. I’ll have to go get me a copy of the second edition.