You've reached the internet home of Chris Sells, Developer Tools at Telerik. This site is targeted at the Windows developer. Enjoy.
Tuesday, Dec 27, 2011, 1:36 PM in The Spout Tools
GUI REPL for Roslyn
If you recall from REPL for the Rosyln CTP 10/2011, I’ve been playing around building a little C# REPL app using Roslyn. That version was built as a Console application, but I’ve refactored and rebuilt it as a WPF application:
You can download the source code for both the Console and the WPF versions here:
The benefit of a real GUI app is that output selection makes a lot more sense and that you could imagine real data visualization into data controls instead of just into strings. However, implementing a REPL shell in a GUI environment requires doing things considerably differently than in a Console app. Besides the stupid things I did, like doing a lot of Console.Write, and things that don’t make sense, like #exit or #prompt, there are a few interesting things that I did with this code, including handling partial submissions, rethinking history and rewiring Console.Write (just ‘cuz it’s stupid when I do it doesn’t mean that it shouldn’t work).
Partial Submissions
In this REPL, I decided that Enter means “execute” or “newline” depending on whether the submission is complete enough, according to Roslyn, to execute or not. If it is, I execute it, produce the output and move focus to either the next or a new submission TextBox. If the submission isn’t yet complete, e.g. "void SayHi() {", then I just put in a newline. Further, I do some work to work properly with selections, i.e. if you press Enter when there’s a selection, the selection will be replaced with the Enter key.
So far I like this model a lot, since I don’t have to something like separate “execute” and “newline” into Enter and Alt+Enter or some such.
Rethinking History
In a GUI shell with partial submissions and multi-line editing, the arrows are important editing keys, so can’t be used for access to previous lines in history. Further, a GUI apps makes it very easy to simply scroll to the command that you want via the mouse or Shift+Tab, so there’s not a lot of use for Alt+Arrow keys. Pressing Enter again replaces the old output (or error) with new output (or error):
Currently when you re-execute a command from history, the command stays where it is in the history sequence, but it could as easily move to the end. I haven’t yet decided which I like better.
Redirecting Console.Write
Since this is a REPL environment works and acts like a shell, I expect that Console.Write (and it’s cousins like Console.WriteLine) to work. However, to make that work, I need to redirect standard output:
Console.SetOut(new ReplHostTextWriter(host));
The ReplTextWriterClass simply forwards the text onto the host:
class ReplHostTextWriter : TextWriter { readonly IReplHost host;
public ReplHostTextWriter(IReplHost host) { this.host = host; } public override void Write(char value) { host.Write(value.ToString()); } public override Encoding Encoding { get { return Encoding.Default; } } }
The hosts implementation of IReplHost.Write simply forwards it onto the currently executing submission (the ReplSubmissionControl represents both a submission’s input and output bundled together). You’ll notice that the TextWriter takes each character one at a time. It would be nice to do some buffering for efficiency, but you’d also like the output to appear as its produced, so I opted out of buffering.
However, one thing I don’t like is the extra newline at the end of most string output. I want the main window to decide how things are output, setting margins and the newline looks like a wacky margin, so the trailing CR/LF had to go. That’s an interesting algorithm to implement, however, since the characters come in one at a time and not line-by-line. I want separating newlines to appear, just not trailing newlines. I implement this policy with the TrimmedStringBuilder class:
// Output a stream of strings with \r\n pairs potentially spread across strings, // trimming the trailing \r and \r\n to avoid the output containing the extra spacing. class TrimmedStringBuilder { readonly StringBuilder sb; public TrimmedStringBuilder(string s = "") { sb = new StringBuilder(s); } public void Clear() { sb.Clear(); } public void Append(string s) { sb.Append(s); } public override string ToString() { int len = sb.Length; if (len >= 1 && sb[len - 1] == '\r') { len -= 1; } else if (len >= 2 && sb[len - 2] == '\r' && sb[len - 1] == '\n') { len -= 2; } return sb.ToString(0, len); } }
Usage inside the ReplSubmissionControl.Write method is like so:
public partial class ReplSubmissionControl : UserControl {
...TrimmedStringBuilder trimmedOutput = new TrimmedStringBuilder(); public void Write(string s) { if (s == null) { trimmedOutput.Clear(); } else { trimmedOutput.Append(s); } consoleContainer.Content = GetTextControl(trimmedOutput.ToString()); } }
Now, as the input comes in one character at a time, the trailing newlines are removed but separating newlines are kept. Also, you may be interested to know that the GetTextControl function builds a new read-only TextBox control on the fly to host the string content. This is so that the text can be selected, which isn’t possible when you set the content directly.
Right now, there’s no support for Console.Read, since I don’t really know how I want that to happen yet. Pop-up a dialog box? Something else?
Completions, Syntax Highlighting and Auto-indent
I was a few hundred lines into implementing completions using Roslyn with the help of the Roslyn team when I realized two things:
- Implementing completions to mimic the VS editor is hard.
- Completions aren’t enough – I really want an entire C# editor with completions, syntax highlighting and auto-indentation.
Maybe a future release of Roslyn will fix one or both of these issues, but for now, both are out of scope for my little REPL project.
Tuesday, Dec 27, 2011, 12:20 PM in The Spout
Moving to the Cloud Part 2: Mostly Sunny
In part 1 of this now multi-part series (who knew?), I discussed my initial attempts at moving my digital life into the cloud, including files, music, photos, notes, task lists, mail, contacts, calendar and PC games.There were some issues, however, and some things that I forgot, so we have part 2.
Before we get to that, however, it’s interesting (for me, at least) to think about why it’s important to be able to move things into the cloud. Lots of vendors are busy making this possible, but why? There are backup reasons, of course, so that a fire or other natural disaster doesn’t wipe out all of the family pictures. There are also the ease of sharing, since email makes a very poor file sharing system. Also, multi-device access is certainly useful, since the world has moved into a heterogeneous OS world again as smartphones and tablets take their place at the table with PCs.
For me, however, moving my data into the cloud is about freedom.
The cloud enables me to get myself bootstrapped with data associated with my personal or business life, using whatever device or OS I feel like using that day. It provides me freedom of location or vendor.
The cloud is still forming, however, so hasn’t really been able to make this a seamless experience, which is why I’m onto part 2 of this series.
Mail, Contacts and Calendar
Hotmail is a fine system for online access to mail, contacts and calendar that integrates well with Windows Phone 7. However, the integration with desktop Outlook and my custom domain isn’t good enough yet to rely on. The primary problem was the Hotmail Outlook Connector, which isn’t ready yet for prime time. It worked great with calendar and contacts, but fell down badly when it came to large email folders that I moved from my PST file. It never showed the sync’ing progress as complete, which made me uncomfortable that it never actually completed sync’ing and therefore my data wasn’t safe. Also, when I sent an email from Hotmail, either via the web or via Outlook, it showed the reply address as hotmail_44fe54cff788bdde@live.com. I assume the latter would’ve been fixed with Windows Live custom domains, but the former was the real deal-killer for me.
Also, I heard that Google Apps is the way to go, but that also requires some special software to enable sync’ing with desktop Outlook – I wanted something that was native to both Outlook 2010 and Windows Phone 7. Further, it cost money, so if I was going to pay, I wanted something that Microsoft was going to integrate well with.
So, I bit the bullet and hooked myself with the latest in hosted Exchange – Microsoft Office 365. That’s what I’m using now and just like the on-premise Exchange that worked great for me as a Microsoft employee, I’ve been very happy with it. However, because of the way I was using it, it was a pain to configure properly for use in hosting my csells@sellsbrothers.com email.
The easy way to configure Office 365 is to let it be the DNS name manager, which lets it manage everything for you, including your web site (via SharePoint), your mail, your Lync settings and any future service they care to tack on. However, that doesn’t work for me, since I didn’t want to move my 16-year-old web site into SharePoint (duh). Instead, I wanted to leave my DNS name manager at securewebs.com, which has been a fabulous web hosting ISP for me.
A slightly harder way to configure Office 365 for use with your domain is to only be used for selective services, e.g. set the MX record for mail, but don’t mess with the CNAME record for your web site. This would’ve been nice, too, except I don’t want to move all of the email accounts on sellsbrothers.com – only csells. Why? Well, that’s a family matter.
Over the years at family gatherings, to seem geek cool, I’ve offered free email boxes to my relatives. “Oh? You’re moving to another ISP again? Why don’t you move your email to sellsbrothers.com and then you can keep the same email address forever! And the best part is that it’s free!”
Now, of course, I’d recommend folks get an email address on hotmail or gmail, but this all started before the email storage wars back when you needed an actual invitation to set up a gmail.com account. Now I’ve got half a dozen family members with “permanent” and “free” email boxes and I don’t want to a) move them, b) charge them or c) pay for them myself on Office 365.
As cheap as you might think I am, it’s really migration that I worry most about – having successfully gotten them set up on their phones and PCs with their current email host, I don’t want to do that again for Outlook or migrate their email. Maybe it’s easy, maybe it’s hard. We’ll never know ‘cuz I’m not doing it!
So now, I have to make csells@sellsbrothers.com sync with Office 365 and leave everyone else alone. This is the hardest way to use Office 365 and involved the following:
- Set up a custom domain in Office 365: sellsbrothers.onmicrosoft.com
- Add myself as a user: csells@sellsbrothers.onmicrosoft.com
- Verify that I own sellsbrothers.com by asking securewebs.com support to add a DNS TXT record as specified by Office 365 (this took two weeks and a dozen emails)
- Make csells@sellsbrothers.com the primary email on that account
- Make csells@sellsbrothers.com the From address by removing csells@sellsbrothers.onmicrosoft.com and adding it back again
- Configure my ISP email (SmarterMail) to forward csells@sellsbrothers.com email to csells@sellsbrothers.onmicrosoft.com (I’m not also deleting the email on my ISP account yet when it forwards, but eventually I plan to)
- Login to my Outlook Web Access account on http://mail.office365.com
- Find my Outlook host name via Help | About | Host name (ch1prd0502.outlook.com) for use as my Outlook server on my Windows Phone 7 (along with my From email address: csells@sellsbrothers.com)
- Stumbling onto the right technical forum post to figure out how to configure desktop Outlook 2010 using advanced settings:
- Server: ch1prd0502.mailbox.outlook.com (my host name with “mailbox” thrown in)
- User name: csells@sellsbrothers.com (my From address)
- Exchange Proxy Server: ch1prd0502.outlook.com (my Host name again)
- Check both checkboxes to use HTTP first before TCP/IP
- Authentication: Basic Authentication
Obviously, this is a crappy configuration experience, but no amount of manual updates to Outlook provided by the Office 365 site seemed to help. It was nice that the WP7 Outlook was much easier, although I’d really loved to have just told desktop Outlook that I was an Office 365 user and had it figure out all the touchy config settings.
Everything seems solid except one minor annoyance: when I do a Reply All, csells@sellsbrothers.com stays in the list because my mail programs don’t know that my csells@sellsbrothers.com and csells@sellsbrothers.onmicrosoft.com email addresses are logically the same. I assume if I was hosting my MX records at Office 365, this problem, along with the crappy config experience, would go away.
The good news is that I’ve got access to my full range of Mail, Contacts and Calendar from the web, my phone and my desktop, including multi-GB email folders I’ve copied over from my PST file, all for $6/month. Had I to do it over again, I’d have long ago moved my family to hotmail and avoided the config nightmare. I may yet do just that.
Encrypted Files
With my mail et al sorted, my next fix from last time was the lack of confidence in my most sensitive files with Dropbox. Dropbox can be hacked or subpoenaed like anyone else, so I want a client-side encryption solution. Dropbox may someday provide this themselves, but currently they gain a great deal of storage savings by detecting duplicate blocks amongst their users, saving significantly on uploads and storage, which client-side encryption disrupts. In the meantime, I really want an app that encrypts on the client and drops my data into Dropbox, which BoxCryptor does nicely.
In addition to supporting Windows, BoxCryptor also supports MacOS, iOS and Android, although not WP7 yet. Further, it’s free for 2GB and only a $40 one-time fee for unlimited data, so it’s cheap, too.
I also looked at SecretSync, which has a similar cross-platform story and pricing model (although it’s $40/year instead of $40/once), but it requires Java and I don’t put that on my box. For an open source solution, you may be interested in TrueCrypt.
Financial Data
I’m a mint.com user. I like the idea of an all-up look at my finances across 29 online financial accounts. However, as a backup of that data, I wrote a mint.com scraping tool that downloads the CSV transactions export file and digs current snapshot data out of the homepage HTML. The format on the web site is constantly changing of course, so it’s a support problem, but having that data even a little messed up over time is way better than not having it at all, so I’m happy. The data itself goes into CSV files that I can query with LINQPad and that are stored in my Dropbox folder, which keeps them sync’d.
Books and Bookmarks
I can’t believe I missed this last time, but one of the big things I keep in the in the cloud is my set of Amazon Kindle books. I think that the proprietary format and DRM of Kindle materials will eventually open up because of competition, but until then, Amazon has been a great steward of my online books and bookmarks, providing me clients for all new platforms as well as their own e-ink-based hardware. I have an extensive book collection (this is just part of it), but am adding to the physical part of it no more.
Further, in the case that I have the “what the hell was that book I used to have?” moment after I finally truck all of my books off to Powell’s, the Brothers Sells have scanned all of the ISBN numbers from my 500+ books into LibraryThing. I won’t have the books anymore, but at least I’ll be able to browse, refresh my memory and add the books to Kindle on demand. The reason I picked LibraryThing is because it was easy to get all of the book metadata from just an ISBN (so it’s easy to spot data entry errors early), it’s easy to export from in a CSV file and, should I decide, easy to user their API.
App Specifics
In addition to the big categories, several apps keep data important to me:
- Twitter keeps Twitter users I’m following and searches
- Facebook keeps Facebook contacts, which is nice because they can maintain their own contact data for me and I don’t have to be constantly out of data with my copy
- Windows Live Messenger keeps my IM contacts for me, although Facebook has largely replaced that for IM chatting
- As of the latest update, Xbox game state in the cloud for me, although I’m not a big enough gamer that I really need it anywhere else except my home console. I assume in the future, MS will also keep the Xbox games I’ve purchased in the cloud as well
- Hulu keeps a list of several TV shows I like and notifies me when new episodes are available
- Netflix keeps a partial list of movies I’d like to see, but unfortunately not all of them
- I keep my blog posts in an instance of SQL Server maintained on securewebs.com, which I assume they backup regularly. Someday I’ll write the script to pull that data out into my Dropbox just in case. The source code for the site itself is already stored in Dropbox, so I’m set there
- Favorites: I don’t have a good app here, but I’d love it if some app could keep my IE favorites sync’d between my phone and my other computers. Suggestions?
Things Left On The Ground
As you may have surmised, I don’t put a lot of sentimental value in physical things. They’re not nearly as important to me as people, experiences or data. However, there are some things that I’d want to rescue in case of disaster given the chance:
- A few wrist watches that reminds me of a special person or event
- An inscribed copy of The Complete Sherlock Holmes that my grandfather, my father and I have all read
- Inscribed copies of The Hobbit and The Lord of the Rings trilogy that my mother read to me as a child
- A leather bound copy of Batman: The Dark Knight Returns because Frank Miller kicks ass
- Two pieces of marble and maple furniture that my grandfather built to withstand the onslaught from my mother barreling through each room at top speed as a child (I’d have liked to see the first collision of the immovable object and the irresistible force that day!)
As hard as I try, I can’t think of anything else. Should I have to jam, my plan is to place these few items into safe keeping and sell, donate and/or toss the rest.
Where Are We?
As I write this, I’m sitting in a Starbucks in Sandy, OR, 20 minutes from a cabin I’m renting for a few days. When I’m done here, I’ll explore the town, see a movie and make myself some dinner. I won’t worry about my phone, my laptop or my home being lost or destroyed, since 98% of the possessions I deem most valuable are being managed by cloud vendors I trust.
The cloud doesn’t just represent a place to backup or store data – it represents a way of life.
My data stores a lifetime of experiences, people and knowledge. By keeping it safe and available no matter where I go, I gain the freedom to wander, to experience new physical places and new hardware and software solutions, all without being unduly burdened.
Creative work requires a comfortable place to labor filled with the tools and the materials the worker needs to be creative. Today my tools are an Apple MacBook, Windows 7, Office 2010, Visual Studio 2010 and a Samsung Focus. Yesterday those tools were different and I’m sure they’ll be different again tomorrow. However, while other people build up their place with comfortable things around them – a bookshelf for reference, a comfy chair, knick-knack reminders of events or trips – my place is a lifetime of data and anywhere that provides access to electrons and bits.
Having my data safe, secure and available makes me feel comfortable, creative and free.
Friday, Dec 16, 2011, 2:26 PM in The Spout
Sells Manor: Running 64-bit Win8 on My MacBook Air
With the exception of //build/, I haven’t really been a public part of the Microsoft developer community for about a year. So, to make up for some lost time, I’m giving a talk about some of the //build/ bits at the Portland Area .NET User Group first thing in the new year. This means that I need a running installation of the Windows 8 Developer Preview on my new laptop, ‘cuz THE MAN took my old laptop back when I handed in my badge (although, to be fair, they paid for it in the first place : ).
My constraints were as follows:
- I really like boot-to-VHD. I find that any other kind of virtualization technology slows an OS down enough that it negatively affects any talk I would give.
- I have an existing VHD I wanted to reuse with Win8 and VS11 installed and running just fine already.
- I am running it on a MacBook Air. It’s the big one with quad-core i7, 4GB of RAM and 256GB of SSD, so it’s got the muscle but it needs to drivers to make everything work properly.
- I’m running Windows 7 on my MacBook. The wonderful Boot Camp Assistant in MacOS makes it a snap to get Win7 up and running on a MacBook, but making it run with Win7 and Win8 is a special challenge.
So, with all of that in mind, of course I started with Hanselman’s Guide to Installing and Booting Windows 8 Developer Preview off a VHD post. If you’re willing to build a new VHD, that’s the way to go. However, I was able to use the techniques I learned from that post, especially the comment section and a couple tips from my friend Brian Randall to make my existing Win8 VHD work. Some of this may work for you even if you don’t have a MacBook Air.
Getting Windows 7 Running on my MacBook Air
I started with a virginal MacBook and used the built in Boot Camp to create a Win7 partition, point to a Win7 Ultimate ISO I have on a network share for just these kinds of emergencies and get it installed and running. It wasn’t seamless, but Bing was helpful here to straighten out the curves.
Replacing the Boot Manager
The way I like to create VHDs is via Windows Server 2008 and Hyper-V. Once I have the VHD, I drop it onto the c:\vhd folder on my computer, do a little bcdedit magic and boom: when I reboot, I’ve got a new entry from which to choose my OS of the moment.
However, Win8 doesn’t boot from the Win7 boot manager, so the first thing I needed to do (as implied by the comments in Scott’s post) was use bcdboot to replace the Win7 book manager with the Win8 boot manager. To do that, boot into Win7 and fire up the Disk Management tool (Start | Run: diskmgmt.msc). Select your BOOTCAMP drive and choose Action | Attach VHD. Choose the path to your VHD and you’ll get another virtual disk:
In my case, C was my Win7 Boot Camp HD and F was my Win8 VHD. Now, start an elevated command prompt and use bcdboot to replace the Win7 boot manager with the Win8 book manager.

DISCLAIMER: I’m stealing the “works on my machine” graphic from Hanselman’s site because this action replaces a shipping, maintained, supported boot manager with one that is still in “developer preview” mode. Make sure you have your computer backed up before you do this. I am a trained professional. Do not attempt this at home. All stunts performed on a closed course. Some assembly required. Void where prohibited. I’m just sayin’.
Now that you’ve got the right boot manager in place, getting Win8 to boot requires bcdedit.
Getting Windows 8 to Boot
Scott’s post on booting to VHD involves bcdedit, which describes adding a new boot option in the “Setting up your Windows Boot Menu to boot to an Existing VHD” section:
Use bcdedit to point to the Win8 VHD.
Logging into Windows 8 on a MacBook
Now when you boot your MacBook, you’ll choose to boot to your Windows partition as you always have (which should just happen automatically), but then the Win8 book manager will kick in and you choose your Windows 7 install or your new Windows 8 install. Booting into Windows 8 shows you the login screen as normal, but now you have another problem.
The MacBook keyboard comes without a Windows Delete button. Oh sure, it’s labeled “delete” in trendy lowercase letters, but it’s really the equivalent of the Windows Backspace button. And that’s a problem, because you need to press Ctrl+Alt+Del to log into Win8.
Of course, Apple thought of that, so they created the Boot Camp drivers for Windows that maps fn+delete to Delete, but you can only install them after you’ve logged in.
So how do you log into a MacBook without a Delete button? Easy. You attach an external USB keyboard, press that three-fingered salute and login as normal.
Once you’re in that first time, you can install the Boot Camp drivers and never have to use the external keyboard again.
Installing the Boot Camp Drivers on Win8
When I created the Boot Camp USB to install Win7, it came with a set of drivers in the WindowsSupport folder with a wonderful setup.exe that makes Windows run great on the MacBook. Unfortunately, when you try to run it, you get a message that says you can’t:
If you search the internet, you can find folks that have gotten past this by tricking setup.exe into thinking it’s running on Win7, but you’ll also find that those tricks don’t seem to work for 64-bit installs on MacBook Air, i.e. the one I was doing. However, this is where Brian had another suggestion: you can edit the Boot Camp MSI itself.
DISCLAIMER: This is something that I made work surprising well on my own personal MacBook Air, but I provide no guarantee that it won’t cause your computer to burst into flames on an international flight causing your body to be lost at sea. These techniques are not supported by Microsoft, Apple or the American Dental Association. You’ve been warned.
You may wonder, “To what MSI is Mr. Sells referring?” And I answer: WindowsSupport\Drivers\Apple\BootCamp64.msi. This is the 64-bit MSI with the check in it for Windows 7. To make it work for Windows 8, you need to edit the MSI and change the version number. And to do that, the easiest tool I know of is the unsupported, discontinued Orca MSI editor from Microsoft, now hosted on technipages.com. Running Orca allows you to edit BootCamp64.msi and change the Windows version part of the LaunchCondition from 601 (Windows 7) to 602 (Windows 8):
Once you’ve changed this version, WindowsSupport\setup.exe seems to run just fine, installing the keyboard entries that allow you to login and the control panel that allows you to customize everything.
Where Are We?
Starting from a Boot Camp installation of Windows 7 on my MacBook Air, I showed you how I was able to get Windows 8 booting from a VHD. It wasn’t pretty and it required tips from all over the internet. I gather them here today so that future anthropologists will know how hard we worked to enable the coming of our robotic overlords. If you’re able to use these instructions to expedite their arrival, I’m sure they’ll take that into consideration when they’re sorting us into work details.
P.S. This post is dedicated to Jerry Pournelle. I used to pour over his Byte magazine column every month like he was the computer Sherlock Holmes.
Wednesday, Dec 14, 2011, 11:35 AM in The Spout Tools Data
Moving My Data To The Cloud: Stormy Weather
![]()
For years, I’ve maintained a single “main” computer. It was the computer that was the central authority of all of the personal data I’d accumulated over the years and from which it made me uncomfortable to be separated. Because I needed a single computer for everything, it had to work on my couch, on a plane, on a desk and everywhere else I ever needed to go. Also, it couldn’t have a giant monitor or multiple monitors, because it had to go everywhere. All of this was because I needed all of my data with me all of the time.
My process for moving to a new computer used to include a lot of manual copying of files from the old D hard drive (D is for Data) to my new hard drive, which was also carefully partitioned into C for Windows, Office, Visual Studio, etc. and D for a lifetime of books and articles, coding projects and utilities I’ve collected over the years, e.g. LinqPad, Reflector, WinMerge, etc. This is 30GB of stuff I wanted access to at all times. I was also backing up via Windows Home Server, keeping photos and music on the WHS box (another 30GB), then backing that up to the cloud via KeepVault. And finally, as I upgraded HDs to go bigger or go to solid state, I kept each old HD around as another redundant backup.
All of that gave me some confidence that I was actually keeping my data safe right up until my Windows Home Server crashed the system HD and I found out that the redundancy of WHS doesn’t quite work the way you’d like (this was before I installed KeepVault). This was a first generation HP Home Server box and when it went down, I took it apart so I could attach a monitor, keyboard and mouse to diagnose it, pulled the HDs out so I could read what files I could and ultimately had to drop it off in Redmond with the WHS team so I could get it up and running again.
There are some files I never got back.
KeepVault gave me back some of the confidence I’d had before WHS crashed, but they didn’t provide me a way to see what files they were backing up, so I didn’t have the transparency I wanted to be confident. Further, they don’t have clients on every kind of platform like Dropbox does.
Of course, simply sync’ing files isn’t enough – sync’ing my 10GB Outlook PST file every time I got a new email was not a good way to share 20 years of contacts, email and calendar items.
The trick is to sync each kind of data in the right way, be confident that it’s safe and have access to it across the various platforms I use: Windows, Windows Phone 7, iOS and possibly Android (you know, if I feel like walking on the wild side!). And since I’m currently under employed (my new gig doesn’t start till the new year), I figured I’d do it once and do it right. I almost got there.
Files
Let’s start easy: files. Dropbox has made this a no-brainer. You install the software on any platform you care to use, drop everything you want into the folder and it just works, keeping files in sync on the cloud and across platforms, giving you adequate (although not great) status as it does so. Most platforms are supported natively, but even on platforms that aren’t, there are often alternative clients, e.g. I’m using Boxfiles for Windows Phone 7. When I gave up my Microsoft laptop, instead of doing the dance of the copy fairy to my new Mac Book Air, I installed Dropbox on both computers, dropped everything I want backed up and sync’d between computers into the Dropbox folder. 36 hours and 30GB later, all of it was copied into the cloud and onto my new laptop, at which point I reformatted my Microsoft laptop and handed it into my boss.
Further, as a replacement for WHS and KeepVault, I now keep all of the files that I was keeping just on my WHS server – photos and music primarily – into Dropbox.
This keeps me the confidence I need to know that my files are safe and backed up to the cloud, while making it very easy to keep it backed up locally by simply running Dropbox on more than one computer at my house. If at any time, I don’t want those files on any one computer, I tell Dropbox to stop sync’ing those folders, delete the local cache and I’m all done.
There are two tricks that I used to really make Dropbox sing for me. The first is to change my life: I no longer partition my HDs into C and D. The reason I’d always done that was so that I could repave my C with a fresh Windows, Office and VS install every six months w/o having to recopy all my data. Windows 7 makes this largely unnecessary anyway (bit rot is way down on Win7), but now it doesn’t matter – I can blow any computer away at will now, knowing that Dropbox has my back. In fact, Dropbox is my new D drive, but it’s better than that because it’s dynamic. The C drive is my one pool of space instead of having to guess ahead of time how to split the space between C and D.
The other thing I did was embrace my previous life: I wanted to keep D:\ at my fingertips as my logical “Data” drive. Luckily, Windows provides the “subst” command to do just that. Further, ntwind software provides the fabulous VSubst utility to do the mapping and keep it between reboots:
Now, I’ve got all the convenience of a dedicated “data” drive backed up to the cloud and sync’d between computers. Because I needed 60GB to start, I’m paying $200/year to Dropbox for their 100GB plan. This is more expensive than I’d like, but worth it to me for the data I’m storing.
There is a hitch in this story, however. Right now on Dropbox, data and metadata is available to Dropbox employees and therefore to anyone that hacks Dropbox (like the government). I don’t like that and for my very most sensitive data, I keep it off of Dropbox. When Dropbox employees themselves aren’t able to read Dropbox data or metadata, then I’ll move the sensitive data there, too.
Music
I’m not actually very happy with how I’m storing music. I can play all my music on any PC, but I can only play it one song at a time on my WP7 because there’s no Dropbox music client. I could use the Amazon cloud drive that provides unlimited music storage for $20/year, but there’s no WP7 client for that, either. Or I could spend $100/year on Amazon and get my 100GB of storage, but their client isn’t as widely available as Dropbox. Ironically, Dropbox is using Amazon as their backend, so hopefully increased pressure in this space will drop Dropbox’s prices over time.
Photos
I’m not using Facebook or Flicr for my photos simply because I’m lazy. It’s very easy to copy a bunch of files into Dropbox and have the sync’ing just happen. I don’t want to futz with the Facebook and Flickr web interfaces for 15GB worth of photos. Right now, this is the digital equivalent of a shoebox full of 8x10s, but at least I’ve got it all if the house burns down.
Notes and Tasklist
For general, freeform notes, I moved away from Evernote when they took the search hotkey away on the Windows client (no Ctrl+F? really?) and went to OneNote. The web client sucks, but it’s better than nothing and the Windows and WP7 clients rock. I have a few notes pinned to my WP7 home screen that I use for groceries, tasks, etc., and I have all of my favorite recipes in there, too, along with my relatives’ wi-fi passwords that they don’t remember themselves, a recording of my son snoring, etc. It’s a fabulous way to keep track of random data across platforms.
On the task list side, I only sorta use OneNote for that. I also send myself emails and write little TODO.txt files every time I get a little bee in my bonnet. I’ve never found that the Exchange tasks sync well enough between platforms to invest in them. Maybe someday.
Mail, Contacts and Calendar
And speaking of Exchange, that’s a piece of software that Microsoft spoiled me on thoroughly. This is sync that works very well for contacts, emails and calendar items. IMAP does email folders, but server implementations are spotty. For years, I used Exchange for my personal contacts and calendar, only keeping my personal email separate in a giant PST file, pulling it down via POP3. This can sorta be made to work, but what I really wanted was hosted Exchange.
However, what I found cost between $5 and $11 a month per user. I’d probably have gone with Office 365 for sellsbrothers.com mail, even at $5/month except for two reasons. The first is that Microsoft requires you to move your entire DNS record to them, not just the MX record, which means there is all kinds of hassle getting sellsbrothers.com working again. They do this so that they can get all of the DNS records working easily for Lync, Sharepoint, etc., but I don’t want those things, so it’s just a PITA for me. If they change this, I’d probably move except for the other problem: I’m not the only user on sellsbrothers.com.
For years to be the big shot at family gatherings, I’ve been offering up permanent, free email addresses on my domain. That’s all well and good, but now to maintain my geek cred, I need to keep my mom, my step-mom, my brother, my sons, etc., in an email server that works and one that they don’t have to pay for. So, while I was willing to pay $5/month for hosted exchange for me, I wasn’t willing to pay it for my relatives, too!
One option I tried was asking securewebs.com (my rocking ISP!) to upgrade to SmarterMail 8.x, but that didn’t work. I even footed the one-time fee of $200 for the ActiveSync support for SmarterMail, but I couldn’t make that sync from Outlook on the desktop or the phone either.
Eventually I made an imperfect solution work: Hotmail. The nice thing about Hotmail is that it’s free for 25GB (yay webmail storage wars!) and it syncs contacts, mail and calendar items just like I want. Further, with some effort (vague error messages are not useful!), I was able to get Hotmail to pull in my personal email. And, after installing the Outlook Hotmail Connector (explicitly necessary because my Windows Live ID is not a @live.com or an @hotmail.com email address), I was able to sync almost everything, including the folders I copied from my giant PST file, via hotmail to both my desktop and phone Outlook. However, there are a few downsides:
- There is an intrinsic delay between when someone sends me an email and when it syncs to any device because Hotmail is polling via POP3. This polling is annoying and sometimes sends me directly to the web mail frontend where I can interact with my personal email directly.
- The Outlook Hotmail Connector sync’ing progress indication is terrible in that it seems to stack every time I press F9 (a bad habit from years of POP3 usage) and I can’t tell what it’s working or or when it will finish. Because of this, I’ve trimmed the set of email folders I sync to the ones I really use, using the PST file as an archive for days gone by.
- Hotmail does the right thing with the “Reply To”, but sometimes weird @hotmail addresses with random characters shows up in email threads, which breaks the fourth wall. That’s annoying.
- My RSS Folders don’t sync to my phone, which is a shame because I really loved having my Hacker News folder pinned to my WP7 home page letting me know where there were new items. None of the RSS readers on WP7 seem to work as well as a simple pinned email folder.
The good news is that this all works for free and my relatives continue to have working email. The bad news is that it doesn’t work nearly as well as the Exchange server I’m used to. Hopefully I will be able to revisit this in the future and get it working correctly.
PC Games
I purchase all of my games via Steam now and install them as the mood strikes me. I love being able to reinstall Half-Life 2 or Portal on demand, then blow it away again when I need the hard drive space. Steam is the only viable app store for Windows right now, although I am looking forward to have the Microsoft app store in Windows 8.
Backups
I no longer maintain “backups” in the sense that I can slap in a new HD, boot from a USB stick and have my computer restored in 30 minutes or less (that never worked between WHS and Dell laptops anyway). I’ve had HD problems, of course, but they’re so rare that I no longer care about that scenario. Instead, what I do is keep all of the software that I normally install on a file server (the new job of my WHS box). If the file server goes down, then most of the software I install, i.e. Windows 7, Office and Visual Studio, is available for download via an MSDN Subscription. The rest is easily available from the internet (including Telerik tools and controls!) and I just install it as I need it.
Where Are We?
In order to free myself from any specific PC, I needed to pick a new centralized authority for my data: the cloud. The experience I was after for my PCs was the same one I already have on my phone – if I lose it, I can easily buy a new one, install the apps on demand and connect to the data I already had in Exchange, Hotmail, Skydrive, etc. Now that I’ve moved the rest of my world to Dropbox, I can treat my PCs and tablets like phones, i.e. easily replaceable. It’s not a perfect experience yet, but it’s leaps and bounds ahead of where it was even a few years ago.
Hardware and software comes and goes; data is forever.
Wednesday, Dec 29, 2010, 9:13 PM in The Spout
Enabling the Tip Calculator in Your Brain
I can’t imagine anyone reading this blog needs to read this, but I can’t help myself.
When I was just a wee lad, probably the most valuable thing I learned was how to perform mathematical estimation, the importance of which and several techniques you can get by reading Jon Bentley’s The Back of the Envelope (this essay along with several others, are collected in his most excellent books Programming Pearls and More Programming Pearls, both of which are still relevant a decade later). Not only is estimation generally quicker than running a calculator, but even when you do run a calculator, it helps you figure out when you did it wrong, the latter of which has saved my bacon time and again.
For example, as much as I love the Windows Phone 7 marketplace and it’s quality and quantity of applications, the ones that puzzle me are the “tip calculator” apps (several!). I don’t understand why it’s worth the trouble of pulling out your phone and punching buttons when you can know the tip instantly.
For example, let’s assume the dinner bill is $37.42. If the service was bad, that’s a 10% tip (you have to tip them something ‘cuz the IRS assumes you will and taxes them accordingly – bastards). So, with a 10% tip, take the bill and move it right one decimal point: $3.74. Now, round up or down depending on how bad the service was, e.g. $3.50 or $4. Quick and easy.
Assuming the service was great, that’s a 20% tip, so double the bill and move it right one decimal point, making the math easier for yourself, e.g. $37.42 is close to $35, doubling is $70, so a $7 tip. Boom: 20% tip.
If you want to get fancy and provide a 15% tip for good but not great, then average the two numbers: ($4 + $7)/2 = $5.50. Zim zam zoom.
Honestly, as great as the apps are on your phone, tablet or BlueTooth headset (seriously), think about using the apps in your head first. Now only are they quicker and cheaper, but using them staves off dementia (which is a good thing!).
Oh, and if the tip is added as a mandatory minimum, then the additional tip is easy: $0.00. I don’t deal well with authority.
Wednesday, Oct 27, 2010, 1:48 PM in The Spout
A Function That Forces
At Microsoft, there’s this passive-aggressive cultural thing called a “forcing function,” which, to put it crudely, is an engineering way for us to control the behavior of others. The idea is that you set up something to happen, like a meeting or an event, that will “force” a person or group to do something that you want them to do.
For example, if someone won’t answer your email, you can set up a meeting on their calendar. Since Microsoft is a meeting-oriented culture (even though we all hate them), a ‘softie will be very reticent to decline your meeting request. So, they have a choice – they can attend your meeting so that they can answer your question in person or they can answer your email and get that time back in their lives. This kind of forcing function can take larger forms as well. I can’t say that our execs make the decision like this (since they don’t talk to me : ), but it is the case that signing up a large number of Microsoft employees to host and speak at important industry events does have the effect of making us get together to ensure that our technologies and our descriptions of those technologies holds together (well, holds together better than they would otherwise : ).
Unfortunately, this way of thinking has become so much a part of me that I’ve started to use it on my family (which they very much do not like). Worse, I use it on myself.
For example, I have been holding back on half a dozen or more blog posts until I have the software set up on my newly minted web site to handle blog posts in a modern way, namely via Windows Live Writer. In other words, I was using the pressure inherent in the build up of blogging topics to motivate me to build the support I wanted into sellsbrothers.com to have a secure blogging endpoint for WLW. Before I moved all my content into a database, I could just pull up FrontPage/Expression Web and type into static HTML. Now that everything is data-driven, however, the content for my posts are just rows in a database. As much as I love SQL Server Management Studio, it doesn’t yet have HTML editing support that I consider adequate. Further, getting images into my database was very definitely a programming task not handled by existing tools that I was familiar with.
So, this is the first post using my new WLW support and I’m damn proud of it. It was work that I did with Kent Sharkey, a close friend of mine that most resembles Eeyore in temperament and facial expressions, and that just made it all the more fun!
Anyway, I’m happy with the results of my forcing function and I’ll post the code and all the details ASAP, but I just wanted to apologize for my relative silence on this blog and that things should get better RSN. XXOO.
P.S. I’m loving Windows Live Writer 11!
Sunday, Aug 8, 2010, 8:19 AM in The Spout
Why can't it all just be messages?
My mobile device is driving me crazy.
I have an iPhone 4.0. Normally when it's driving me crazy, it's standard stuff like the battery life sucks or that the iOS 4.0.1 update didn't fix the proximity detection or stop emails I send via Exchange from just disappearing into the ether.
This time, it's something else and I can't blame the iPhone; I think all modern smart phones have the same problem. The problem is that I constantly have to switch between apps to see my messages. Here are screenshots for 5 of the messaging clients I use reguarly:
This list doesn't include real-time messages like IM, or notifications like Twitter or RSS. I'm just talking about plain ol' async messaging. We used to think of it as "email," but really voicemail, email, SMS, MMS, Facebook messages and Twitter Direct Messages are all the same -- they are meant to queue up until you get to them.
Now, some folks would argue that SMS/MMS aren't meant to be queued; they're meant to be seen and handled immediately. Personally, I find it annoying that there is a pop-up for every single text or media messages I get on my phone and there seems to be no way to turn that off. On the other hand, if I want that to happen for other types of messages, e.g. voicemail, I can find no way to turn it on even if I want to. Why are text messages special, especially since most mobile clients let you get over the 160 character limit and will just send them one after the other for you anyway?
iOS 4 takes a step in the right direction with the "universal" inbox:
Here I've got a great UI for getting to all my email messages at once, but why can't it handle all my messages instead?
Not only would this put all my messages in one place at one time, but it would unify up the UI and preferences across the various messaging sources. Do you want your text messages to quietly queue up like email? Done. Do you want your voicemail to pop to the front like an SMS? Done. Do you want the same swipe-to-delete gestures on your voicemail as you have with your email? Done!
Maybe someone with some experience on the new Windows Phone 7 can tell me that there is a "messaging" hub that manages all this for me. Since they're already doing things like bringing facebook pictures into the "pictures" hub (or whatever they call it), that doesn't seem completely out of the realm of possibility. If that's the case, I'll say again what I've been saying for a while -- I can't wait for my Windows Phone 7!
Friday, Apr 2, 2010, 10:37 AM in The Spout
College info for my sophomore
I went to a college planning sessions at my sons' high school not because I'm hung up on getting my Sophomore into a top school, but because I thought I'd get a jump on things. I learned I was actually behind.
For one, I learned that the high school has an online system that will do some amazing things:
- It will give my son a personality test and an interest test.
- From those tests, it will tell him what kinds of careers he might want to consider.
- Based on those careers, what major should he have.
- From the major, what schools around the country offer it.
- In those schools, what the entrance requirements are.
That means that my son can answer questions about personality and interests and draw a straight line through to what he needs to do to get into a school so he can learn to do the jobs he'll like and be good at. Holy cow. We didn't have anything like that when I was a kid.
Further, the online system has two complete SAT and ACT tests in it, so, along with the PSAT that he's already taking, he can do a practice ACT, figure out which test he's best at (my 34 ACT score was way better than my 1240 SATs) and just take that test, since most schools these days take both SAT or ACT results.
This is all freely provided by the high school and, in fact, they have counseling sessions with the students at each grade level for them to get the most from this system.
It's no wonder that 93% of students from this high school go on to 4 or 2-year college degree programs.
That was the good part.
The scary part is that my eldest, half way through his Sophomore year, is essentially half-way through his high school career. Colleges only see their grades through the end of Junior year, since most college applications are due in the middle of January of their Senior year at the latest. I have to sit down with my son and have the conversation about how "even if you get a 4.0 from now on, the best grades you can have are..."
Is it just me or is the world moving faster with each passing day?
Sunday, Mar 21, 2010, 1:40 PM in The Spout
you may experience some technical difficulties
I've been futzing with the site and I've got more to do, so unexpected things may happen. Last weekend I screwed with the RSS generator and that caused a bunch of folks to see RSS entries again. This weekend I'm moving more of my static content into the database, so you may see a bunch of old stuff pop up.
Feel free to drop me a line if you see anything you think needs fixing. Thanks for your patience.
Thursday, Mar 18, 2010, 7:59 AM in The Spout
On Building a Data-Driven E-Commerce Site
The following is a preprint of an article for the NDC Magazine to be published in Apri.
It had been a long, hard week at work. I had my feet up when a friend called and popped the question: “Do you know how to build web sites?”
That was about a month ago and, after swearing to her that I spent my days helping other people build their web sites, so I should oughta know a thing or two about how to build one for her. After some very gentle requirements gathering (you don’t want a bad customer experience with a friend!), I set about designing and building bestcakebites.com, a real-world e-commerce site.
She didn’t need a ton of features, just some standard stuff:
· Built on a technology I already knew so I could have the control I needed.
· Listing a dozen or so products with pictures and descriptions.
· A shopping cart along with, ideally, an account system so folks could check their order status or reorder easily.
· Shipping, handling and tax calculation.
· Taking payment.
· Sending email notifications of successful orders to both the customer and the proprietor.
As it turns out, there are a bunch of ways to skin this particular cat, but because I was a busy fellow with a more-than-full-time job and a book I’m supposed to be writing, instead of falling prey to my engineering instinct to write my own website from scratch, I decided to see what was out there.
As it turns out, there’s quite a few e-commerce web site solutions in the world, several of them recommended by PayPal, as well as one that PayPal itself provides, if you don’t mind sending shoppers to their web site. And if fact, I did. Requirement #1 was that I needed complete control over the code and the look and feel of the site. I didn’t want to configure somebody else’s web site and risk going off of her chosen domain name or not being able to tweak that one little thing that meant the difference between #succeed and #fail. (Friend customers are so picky!)
The e-commerce solution I picked was the one I found on http://asp.net (I am a Microsoft employee after all): nopCommerce. It’s an open source solution based on ASP.NET and CSS, which meant that I had complete control when it wasn’t perfect (control I used a few times). It was far more than full-featured enough, including not only a product database, a shopping cart, shipping calculation and payment support, but also categories and manufacturers, blogs, news and forums, which I turned off to keep the web site simple (and to keep the administration cost low). Unexpected features that we ended up liking included product variants (lemon cake bites in sets of 8, 16 and 24 made up three variants, each with their own price, but sharing a description), product reviews, ratings and site-wide search.
The real beauty of nopCommerce, and the thing that has been the biggest boon, was that the whole thing is data-driven from SQL Server. To get started, I ran the template web site that was provided, it detected that it had no database from which to work and created and configured the initial database for me, complete with sample data. Further, not only was it all data-driven based on the products, orders and customers the way you’d expect, but also on the settings for the web site behavior itself.
For example, to get shipping working, I chose from a number of built-in shipping mechanisms, e.g. free, flat rate, UPS, UPSP, FedEx, etc., and plugged in my shipper information (like the user name and password from my free usps.com shipping calculation web service account)
With this configuration in place, the next order the site took, it used that shipper, pulling in the shipping information from the set of size and weight measurements on the ordered products (from the database), calling the web service as it was configured (also from the database) to pull in the set of shipping options from that shipper, e.g. Express Mail, Priority Mail, etc., augmenting the shipping prices with the per product handling changes, and letting the user pick the one they wanted. All I had to do was use the administration console, tag each product with size information and tell nopCommerce that I’d like USPS today, please.
Everything worked this way, including tax calculation, payment options (we chose PayPal Direct and Express so that folks with a credit card never left our site whereas folks with PayPal logged into their account on the familiar paypal.com), localization, whether to enable blogs, news, forums, etc. Most of the time when I wanted to make a change, it was just a matter of flipping the right switch in the database and not touching the code at all.
As one extreme example of where the data-driven nature really came through was on the order numbers generated by the site. During testing, I noticed that our order numbers were monotonically increasing from 1. Having ordered from a competitor’s site, their order number was only 103, clearly showing off what amateurs they were (and the order itself took a month to arrive after two pestering emails, so it was clear how amateur they really were). I didn’t want us to appear like newbies in our order-confirmation emails (which nopCommerce also generated for us), so I found the Nop_Order table, and used SQL to increase the identity column seed, which it was clear was the origin of the order number:
DBCC CHECKIDENT (Nop_Order, RESEED, 10047)
From then on, every time an order came through, we protected experience simply because of the order number, which I changed without touching a line of code. If helping you “fake it ‘til you make it” isn’t enough reason to love a data-driven solution, I don’t know what is!
Thursday, Mar 11, 2010, 11:21 AM in The Spout
The incomplete list of impolite WP7 dev requests
In my previous list of WP7 user requests, I piled all of my user hopes and dreams for my new WP7 phone (delivery date: who the hell knows) onto the universe as a way to make good things happen. And all that’s fine, but I’m not just a user; like most of my readers, I’m also a developer and have a need to control my phone with code. I have a long list of applications I want to write and an even longer list of applications I want other developers to write for me.
Today at 1:30p is the first public presentations of how to do WP7 programming, so to affect the future, I have to get my feature requests for the Windows Phone 7 Series development environment posted now!
· I want the legendary Microsoft tools for code editing, UI design, debugging, deployment, version control, add-ins, project management, etc. Please just let me install the “Windows Phone 7 Series SDK” and have Dev10 light up with new project and project item templates et al.
· I definitely want to be able to write C#. Since Charlie’s mentioned Silverlight, it seems like I’ll be able to do just that.
· I want to be able to mark a program as useful for background processing, e.g. I’m writing Pandora, and let that trigger a question for the user as to whether to allow it or not, ideally with a message like “Pandora would like to continue to run in the background using XX% of your battery. Is that OK?”
· For most apps that would like to appear as if they’re running in the background, I want to register a bit of code to run when its own cloud-based notifications comes in, e.g. an new IM or sports score.
· I want to be able to access data from built-in apps, e.g. contacts, appointments, etc.
· Obvious things:
o Notification when the user switches orientation
o Access to the compass, GPS, network, camera, mic, etc.
o Access to the network using TCP, HTTP, Atom, AtomPub and OData.
o Low and high-level access to gestures
o A nice set of build-in standard controls, including simple things like text box and more complicated things like map and route
o Integration with existing apps, e.g. the ability to launch the map app from my own app at a specific location or to a specific route.
o Ability to create custom controls/do custom drawing.
o Serialization so I can keep user data between sessions. Notifications when my app is being whacked.
o App-selected keyboards for specific tasks, e.g. entering a URL.
That doesn’t seem like a very big list. I must be missing something. : )
Tuesday, Mar 9, 2010, 1:47 PM in The Spout
Creating a Lazy Sequence of Directory Descendants in C#
My dear friend Craig Andera posted an implementation of a function that descends into a directory in a "lazy" manner, i.e. you get the first descendant back right away and not after all descendants have been calculated. His implementation was in Clojure, a Lisp variant that runs on the Java VM:
(import [java.io File])
(defn dir-descendants [dir]
(let [children (.listFiles (File. dir))]
(lazy-cat
(map (memfn getPath) (filter (memfn isFile) children))
(mapcat dir-descendants
(map (memfn getPath) (filter (memfn isDirectory) children))))))
Craig was happy with this function because, even though it was a "mind-bender to write," it's easy to read and because C# "would almost certainly be at least somewhat more verbose."
Taking this as a challenge, I rewrote this program in C#, maintaining the laziness:
using System.IO;
using System.Collections.Generic;
namespace ConsoleApplication1 {
class Program {
static IEnumerable<string> GetDirectoryDecendants(string path) {
foreach (var file in Directory.GetFiles(path)) { yield return file; }
foreach (var directory in Directory.GetDirectories(path)) {
foreach (var file in GetDirectoryDecendants(directory)) { yield return file; }
}
}
}
}
The key hit here is the use of "yield return" which lets me return elements of an IEnumerable as I calculate them. This took me 5 minutes to write, my mind is straight and I find it fairly easy to read. I'll let you decide on the relative verbosity of each implementation.
Tuesday, Mar 9, 2010, 11:25 AM in The Spout
The incomplete list of impolite WP7 user feature requests
When I first moved from the combination of a dumb phone and a separate music player, I had modest requirements: phone calls, MP3 playback, calendar notifications, contact management, email, camera and solitaire. Even asking for only these seven things, my first smart phone was as life changing as my first laptop. I could do a great deal of my work while out and about, allowing me to have a much more productive work/personal life balance.
When I was first married, the word “love” didn’t seem big enough for what I felt for my bride. These days, the word “phone” doesn’t seem nearly big enough for the pocket-sized mobile device that I’m never without, like my wallet and my keys. Further, I expect my phone to replace my wallet and keys any day now, along with the Walkman, DVD player, TV, radio, book shelf, notepads, calculator, compass, alarm clock, wall calendar, newspaper, encyclopedia, dictionary, GameBoy, carpenter’s level, laptop, navigation device and landline it’s already replaced.
Now that I’ve been through several smart phones, including my favorites, the T-Mobile Dash and the iPhone 3G, I have a much longer, incomplete list of what I want from my Windows Phone 7 Series (and I know it’s incomplete because after I post this list, someone is going to remind me what vital things I missed : ).
· A calculator. It’s surprising how useful this is, including the scientific features.
· A battery that lasts at least 24 hours while I’m using Bluetooth, 3G, Wi-Fi, GPS, music and my apps. Oh, and please let me charge the thing with a standard connector (USB!) and let me use my phone while it’s recharging.
· An easy, high-quality way to run the music through my car stereo. The Sells Brothers and I like to jam!
· An easy way to switch back and forth to airplane mode. Or even better, can you make it so the device isn’t an FAA threat during takeoff and landing so I can stop reading the stupid magazine in the seat pocket in front of me for 5 minutes at the beginning and ending of my flights?
· Great auto-correct on my hard or soft keyboard entry. This is really the only way that allows my big fingers and the lack of tactile feedback to even work with a phone keyboard.
· Copy-paste: I can’t live w/o it anymore. Also, please include pasting into my phone during calls so I can stop memorizing 9-digit conference call IDs.
· I’d really love intelligent integration of music, i.e. keep it playing when I switch apps and not just the built-in Zune player, but 3rd party music apps, too (aka Pandora). Also, let me pause, next, previous while my phone is locked or I’m in another app. Finally, make sure to stop music when I get a call and start it back up again when my call is over. I love that.
· Full (!) calendar support:
o Sync’ing with Exchange and not Exchange.
o Recognition of phone numbers and addresses in my calendar appointments with links to dial/get directions.
o Reply All to an appointment so that I can let folks know I’m running late.
o Snooze on my meeting reminders (I can’t tell you how many times I’ve forgotten my meeting after the one and only 15 minute reminder).
o Show my appointments on my home page instead of making me dig into some app.
· Please provide a responsive UI, even if I haven’t rebooted in a week. Ideally I’d never have to reboot at all.
· Wireless sync’ing to my PC. My house is bathed in Wi-Fi; why make me connect a wire?
· Tethering so I can use my phone as a network connection for my PC. I’m paying for unlimited data – let me use it! And ideally make that wireless, too.
· Turn-by-turn directions! This won’t be ready until I go off course and I hear “recalculating” from my phone piped through my car stereo with Pandora playing in the background.
· There definitely needs to be an "app store" for phone apps, but also there needs to be a way to install apps from other sources without hacking my phone. Also, please let me install them on my SD card so I can take advantage of the extra memory.
· Let me install extra memory!
· Let me replace the battery! Batteries go bad over time and they need to be replaced on the go.
· I need a great audio book listening experience (bookmarks!) and a great ebook reading experience (formats!).
· I’d like some phone-wide search, including the ability to see where the result came from. I never want the email-only Contact from the list of everyone that I’ve ever received an email from – I want the real contact info that I’ve got cached on my phone.
· Full contact lookup, both personal and corporate (Exchange).
· Good camera (and flash): the one on my phone is the only one I ever use, as it’s the one I always have with me.
· Bluetooth and voice dialing for hands free operation (required by state law in both Washington and Oregon, where I spend most of my time). Also, I’d love the same integration with my Jawbone that I have with my iPhone, i.e. volume control and battery indicator.
· Apps I can’t live without:
o Evernote: I’m willing to move my data into OneNote so long as I can sync between the web, my phone and my PC.
o Social networking clients: IM, Twitter, an RSS/ATOM Feed Reader, YouTube and Facebook.
o Converter for currency, distance, volume, etc.
o A Compass.
o A Flashlight. I have used the ambient life from my phone to get myself out of the forest in pitch blackness. Without it, I’m sure I would’ve been hacked to pieces by Jason or Michael Meyers.
o TripIt, Movies, OpenTable, UrbanSpoon, Mint: I use these all the time.
o Shazam: Before this app, I used to record snippets of songs and email them to my son would be charge me $.50/ea. to find the title and artist so I could grab them for my phone. Shazam has cut out the middle man and represents ~100% of the music I purchase these days.
o Skype or some other good way to use my phone to do IP Telephony (or even IP Video Conferencing)
o Tetris! I guess there are other casual games in the world, but that’s mine.
Because the WP7 hasn’t shipped yet, I can pile all of my hopes and dreams on it and, like everyone else not on the WP7 team, I have very little idea of whether my hopes will be fulfilled, but that doesn’t stop me from dreaming. So now it’s your turn – what did I miss? : )
P.S. I know that lots of phones have a subset of these features and I’m sure someone will tell me that, with the correct config, I can make their favorite phone do all these things. I know that’s going to happen because whenever I complain about a missing feature in the Visual Studio editor, some emacs guy says, “Oh, you can do that with Alt+Shift+Left Elbow in my editor!” I don’t care about what your phone can do. No phone’s UI has stirred me like the WP7’s UI. That’s the one I want to use, so that’s the phone I’m going to bang on ‘til my incomplete list is complete.
Wednesday, Mar 3, 2010, 5:21 PM in The Spout
Please don't run apps in the background on my WP7 phone!
When I was but a wee lad, I learned that when it came to my computer, I was often going to be waiting on something, whether it was the CPU, the IO or the memory. Now that I'm all grown up and spending a great deal of time on handheld mobile devices, I've discovered a whole new thing I'm waiting on: charging the battery.
In the bad old days of DOS, I spent a disturbing amount of time working on my autoexec.bat and config.sys files to optimize the loading of drivers and TSRs (DOS programs that run in the background for you whippersnappers). Now, instead of optimizing for memory usage on my PC, I spend my time optimizing for power consumption on my phone, e.g. turning off 3G and Bluetooth when I don't need them, turning down the polling frequency on my SMTP mail accounts and spreading power adapters everywhere in my world where I sit for more than 5 minutes. The single most important feature on my phone is that's it's on and the way power is managed on my iPhone means that this is often not the case. Sometimes I pine for my Windows Mobile Dash for just that reason; it ran for days instead of hours.
And as bad as this power situation is, it would be even worse if my phone ran more than one app at a time. I don't worry about random apps from the AppStore using too much memory or crashing; I worry about them eating my battery and killing my iPhone in the middle of a route to somewhere I've never been. By not allowing background apps to run, Apple is trying to do the right thing but (although my battery life still sucks). I don’t have personal experience with Google phones, but since they do allow background apps to run, I have to imagine battery life is an even bigger problem.
So, when I see people lobbying for background apps on the new Windows Phone 7 Series, all I can say is, you don't want it. What you want is for work to go on in the background for you without the cost in power.
Oh, I want to listen to my MP3s or Pandora while I answer my email like everyone else, but I don't want every financial/IM/email/social/sports app I download sucking down my battery life because it feels itself to be more important than everything else on my phone. I want those apps to notify me when something I care about happens but I don't want the processing to discover such events to happen on my phone - I want the processing to happen in the cloud.
You may recall my piece about how important storage in the cloud is for moble devices. Let's let somebody else scale and manage the storage so we can leverage it. In the same way, we want to leverage CPU and power in the cloud, saving local resources for cool graphics, twitch games and streaming my "Pink" channel.
Of course, if we're going to push the processing to the cloud, I'm going to need an efficient and easy way to write my WP7 apps to be notified so I can do the actual processing that needs to happen on the phone. And that all needs to happen while I'm navigating and playing my bad girls party mix.
I'm saving my WP7 phone battery for important things after all.
Tuesday, Feb 2, 2010, 5:09 PM in The Spout
We need cloud apps to use cloud drives
Reading about Windows Azure Drive reminded me of a conversation I had when I was hanging out with my Microsoft brethren last week. We started by talking about how apps target a particular OS and how Microsoft's bread-and-butter is making sure that apps continue to work forever on Windows so that our customers can upgrade their OS and still get their work done.
We then moved on to wondering whether Apple was gonna do the same thing when it came to letting iPhone/iPod Touch apps run on the new iPad. As it turns out, we heard from the iPad announcement that Apple is doing just that (although in a particularly strange single-tasking way).
From there we moved on to how it's really not a big deal whether you ditch your current smart phone, e.g. Dash, iPhone, BlackBerry, Droid, etc., for another one because nobody really keeps data on their phones anymore anyway. It's either synch'd to their PC, e.g. photos, music, etc., or it's kept in the cloud. In fact, without realizing it, I already have a great deal of info in the cloud:
- Exchange: email, contacts, appointments
- TweetDeck: twitter search terms
- Evernote: random notes
- Amazon: Kindle books
- TripIt: trip itineraries
- Mint: account and budget information
- Facebook: social contacts
- LinkedIn: business contacts
Further, I could keep my pictures in Flickr, my documents on Live and I'm sure there are many, many more. This is fabulous, because I can move from platform to platform on my phone and it's in a vendor's interest to make sure that each major platform has their app on it and because it's a smaller, more focused platform, it's easier for them to do.
The problem here, of course, is that we've moved from mobile vendor lock-in to cloud data storage lock-in. What happens when Amazon decides to repossess another book or Mint decides to start charging or Flickr goes out of business? Unlike the physical storage business (you know, little garages where people keep stuff when their relatives die or they're going through a divorce), the logical storage business doesn't have any legal responsibility to keep the doors open for 30 days when they go out of business to let me move my stuff somewhere else.
And this has already happened. When GeoCities went out of business, all of those people's web sites were gone. When live.com decided to clean out my set of RSS feeds, there wasn't any notification or recourse. I'm sure there are more similar stories and there will be lots more in the future.
And because I know there will be more, I'm worried.
Right now, as we move our apps and storage in the cloud, we have a very different dynamic then apps and storage on the desktop. Because apps on the desktop use storage I own, I can back up that data, import it into other programs and, if I feel like it, write programs against it. It's my data. The vendor doesn't ever even see it, let alone gate my access to it.
On the other hand, cloud app vendors ARE gating access to my data; I have to use their apps to get to it. Unless there's some pressure, you can be damned sure the Flickrs and Mints and Amazons aren't going to be giving up the data they've got a wall around now so that I can take it to a competitor.
Which is why we need control over the storage for cloud apps just as much as we do for desktop apps. I want to go to a vendor I trust, e.g. Amazon, Microsoft, GE, i.e. someone big, someone you know is gonna be around for a while, and purchase cloud storage from them. I want to be able to use it as a HD for my desktop data (like Azure Drive and other products before it), including general-purpose backup, but I also want my cloud apps to store their data there, too. That way, if they start charging or they go out of business or I want to go somewhere else with my data, I can do so.
I expect to pay for this service, of course. That way, the cloud storage folks make money, the cloud apps folks make money for using my cloud storage and I get peace of mind knowing that I'll always have access to my data, no matter what happens to the cloud app or the cloud app vendor, just like today.
We need cloud apps to use cloud drives. Call your congressman!
Sunday, Dec 20, 2009, 10:23 PM in The Spout
Stead Defines 'Customer'
And here's one more from the paper file I'm putting into electronic format to reduce the pile of papers in my life:
During the all-associate broadcast, Jerre Stead shared with the team a memo another associate had sent about defining a customer. Here are the highlights:
- Customers are individual companies with unique needs.
- Customers are struggling with their competitors for success.
- Customers are people with feelings and opinions, therefore relationships and experiences matter.
- Customers will judge us by our performance, not by our words.
- Customers are influenced by every contact with us, each and every day.
Customer "Must Not's"
- We must not import our products or ideas on customers.
- We must not ask customers to deal with people who cannot make decisions.
- We must not make customers wrestle with our bureaucracy.
- We must not allow any question, issue or awkwardness go unattended or unresolved.
- We must never unpleasantly surprise our customer.
- We must never, never take a customer for granted.
Customer "Can's"
- We can help the customer succeed - make our customers winners.
- We can provide greater value to our customers than our competitors can.
- We can measure ourselves from the viewpoint of our customers.
- We can put decision-making close to our customers.
- We can continuously improve to better serve our customers.
Sunday, Dec 20, 2009, 10:09 PM in The Spout
How To Handle Angry Callers in 7 Not-So-Easy Steps
When I was first in technical phone support for the software I was building, I found out that I wasn't exactly a... um... "natural" at putting customers at ease. I used the following information from an AT&T magazine (I was working for a AT&T VAR at the time) in the fall of 1992 to start my education:
- Don't react. Stay calm. When confronted with an irate caller, everyone has the urge to return fire. But don't fight back. And don't take it personally, or you'll become an emotional basket case. Keep relaxed by breathing deeply. And remind yourself that this discussion will not change the destiny of mankind.
- Let them vent. Remember, you simply cannot get customers to deal with the logic of a situation until you've dealt with their emotions. Trying to attack the problem before people have fully vented their anger or disappointment just won't work.
- Defusing the anger. When a tirade is winding down, try asking - sincerely - "Is there anything else?" By this point, they're usually exhausted and willing to talk. If you hear profanity, try saying: "I know the words you're using right now aren't directed at me personally." If the caller replies, "Oh yes they are!" you're no worse off than you were. But generally they'll apologize, realizing it's not your fault. At which point, a real dialogue can begin.
- What do they want? Once they've calmed down, that's the time to find out what they want: Money back? A defective part replaced? Find out quickly to determine whether you can solve the problem on the spot.
- What can they have. Once you've figured out what they want, what can you do? This will be set by bounds of your company's policies - such as warranties or guarantees - as well as any flexibility that management may give you (which should be clearly spelled out).
- Customer solutions. Sometimes, the best solution you can deliver is one the customer suggests. And, surprisingly, it can end up being less than what you yourself were willing to offer. Recently, at a major department store, a customer wanted a discounting an imperfect blouse. The cashier was willing to take 35% off the marked price, but first asked the woman what discount she wanted. The answer: 20% off. Of course, some customers will make outrageous demands. In that case, ask them what they'd consider to be a "fair solution." Instead of confronting the customer, this reply opens up the discussion to a more equitable resolution.
- Follow up. Don't make an angry customer even angrier by not doing what you said you'd do. When a promise is made, keep following up internally to be certain that what was promised has been implemented. Even if that means making a minor pest of yourself!
Fred Gleek
Sunday, Nov 22, 2009, 4:59 PM in The Spout
Do you know someone that needs dinner this Thanksgiving?
The boys and I were driving past a church with a holiday bizarre, so we stopped by. It was a mix of silent auction, bake sale and a $1 raffle for a turkey dinner with all the fixings. I made several comments about how they could skip the formality of the drawing and to make sure they could read my phone number on the back of my raffle ticket, because I was obviously going to win. They laughed.
When they called this morning to let me know that I had won, they told me that they remembered me and I laughed.
Anyway, the Sells Brothers and I have already picked up all we need for our Thanksgiving dinner, so if you know of a family in the Portland metro area without the means for a traditional dinner this holiday season, please let me know. I doubt it'll be so big that I'll need a sled to cart it through the streets, but I'm happy to deliver it when it needs to go. You can leave a comment on this post or drop me a line.
Happy holidays, everyone.
Thursday, Oct 22, 2009, 1:06 PM in The Spout
The New Microsoft Store Looks Cool
And the folks in Scottsdale, AZ lined up overnight to be there when it opened and get their copies of Windows 7 (which goes on sale today and, if I may say so, rocks).
Tuesday, Sep 15, 2009, 1:48 PM in The Spout
The Downside of Transparency
Ever since Chris Anderson built his blogging software and shared it with his colleagues, more and more Microsoft employees has been pushing hard on being as transparent to our customers as we can be. This has been a very much grass roots effort. I remember coming into Microsoft six years ago just when legal was busy giving everyone disclaimers to put on their personal blogs and telling us what we could and could not say. It was always a worry whether the next blog post would get you fired. I got in trouble personally several times, but the brave pioneers before me laid the groundwork for people like me to comment on the internals of Microsoft culture, for Robert Scoble to call Steve Balmer out onto the carpet several times and for Rory Blyth to talk about penises, all on the Microsoft dime. Now blogging is just an accepted way to do things. It's not even questioned anymore; it's expected.
And by and large, this transparency is good for reasons that are obvious these days -- when our customers see how the sausage is made and have a say in the ingredients, they're happier eating it with their breakfasts.
As with all good things, however, these is a downside. For example, the product I've been working on for 4.5 years has gone through many transformations. This has to do with how new software is designed at Microsoft.
The tag line when we're hiring folks is always, "Don't you want to change the world?!" Of course, everyone does and that's good, because people coming in the door want to take big risks and do big things. If you're trying for the next Office or Windows, that's the kind of thinking you need. However, what that means is that we have a lot of folks building 1.0 software. We do this in my division with an organizational structure called an "incubation."
My product was in incubation mode for years and we started with zero assumptions. My first day on the job, I was asked to "think about synchronization." What did that mean? What problem was I trying to solve? Does replication count as synchronization? Does data import? I struggled with this for months before I got my head around the process of noodling with a technology enough to understand what problems there were in the space and how that fit with our general idea of what we might want to build into a product.
We tried a huge amount of stuff, often rebuilding shipping technologies to which we had ready source code access just so we could get a feel for how it worked (I personally built multiple data synchronization engines, a WPF-compatible XAML parser, a data binding engine and a set of universal data viewers during that period, all of which were thrown away, as expected).
As we got further along, we started producing things that needed to be published, even if they weren't a core part of our product anymore (like MEF and some new features in XAML 4.0). Once this started happening, we started to feel like we had a handle on what we were doing to move into "startup" mode, where we formed a team to make productization plans. At this point, we started telling folks what we thought we had, including analysts and "insider" customers, getting their feedback. Based on this feedback, we re-jiggered the product and the story and did it again. And again.
Eventually, we move out of startup mode to become a real product team with dev, test, PM and UA splits (up 'til then everyone does everything or, as we liked to say, "everyone shovels"). Eventually in this mode, you publish some set of bits that are your best guess at the time of what we think we're eventually going to ship. In our case, it was the October 2008 "Oslo" SDK CTP, guaranteed only to take up space on your hard drive. At the time, we'd been telling the "Oslo" story for more than a year and it had evolved a great deal. Since we published that initial CTP, we've published a few more, along with an entire web site filled with articles, videos, specifications, samples, etc.
I mean, we did it big. We were part of the keynote at the 2008 PDC and we had lots of folks on our team that are very visible in the community, including Don Box, Chris Anderson and Doug Purdy. These are the heavy hitters, so when they said something, folks listened.
And we definitely got a lot of community involvement -- way more than we expected, in fact. With that involvement, we got a ton of feedback, which is the benefit to us of releasing early and often. We take that feedback and we make changes to our product -- sometimes big changes. In this particular case, we were building on all kinds of SQL Server-related technologies, so because of pressure to build the absolute best thing we possibly could for our customers, we actually merged the division that owned "Oslo" (and WF, AD, WCF, BizTalk, etc) with the SQL Server division.
Of course, those are the kinds of changes that our customers don't see. What they see is that things are changing and that they're not quite sure what our plans are. That's one big downside:
When you share early information, sometimes it's half-baked, it often changes and is almost always confusing.
As an example, Jeremy Miller recently had this to say about "Oslo" and our communication about it's purpose in life. Believe it or not, this is helpful feedback and it's my team's responsibility to understand what exactly is holding folks up and get it fixed in the way we tell the story and in the product itself.
Another part of my team's responsibility, of course, is communicating what it is the product does so that folks can understand it and give us feedback. That means that the first people that know how confusing a product is are the folks writing the documentation and tutorials, building the videos and producing the samples. And believe me, we act as customers on the team as well, logging bugs and making complaints and bugging the developers and PMs directly, hoping to fix everything before customers even see it. Of course, we can't do that all the time (or even most of the time), so often:
We produce materials that tell the story in the very best way we know how with the current set of bits.
Kraig's recent "Oslo" blog post is an example of this. This is an important part of the process, too, actually. We, as Microsoft employees, can complain to the folks producing the software 'til we're blue in the face, but often real changes aren't made 'til real customers complain. As a consequence of this:
We take the slings and arrows of our customers and thank them for taking the time to shoot us.
This one can really hurt, actually. I'm a professional, but I take it personally when I say something that doesn't resonate with my audience (at a recent conference, I threw away an entire completed slide deck and started over only days before the deadline so I could tell a better story) and the audience takes it personally when I show them something that they don't understand.
In fact, everyone in marketing, DPE, UA and every part of the team that interacts with customers directly or via the software we're producing, including the devs and test engineers, all take it personally. We care deeply about building products that delight and empower our customers, which is why we push so hard on transparency from the bottom -- the sooner we hear your complaints, no matter how confusing we might be, the better able we are to build something you love.
I'll tell you though, if we could build something you'd love without giving you an early look, we might want to do that because:
When a customer is confused or disappointed by an early look at a product, they might not want to look at it again for a really long time, if at all.
Early looks are a double-edged sword. We want the early feedback to make our product better, but if you don't come to look at it again, you'll never know we made it better.
Still, transparency is absolutely worth the downsides. Keeps those cards and letters comin'! : )
Friday, Jul 10, 2009, 5:44 PM in The Spout
PowerBoots makes me want to use PowerShell!
I've picked up PowerShell half a dozen times or more. The central premise, that I can pipe streams of objects instead of streams of text between programs, is pure genius. However, in the day-to-day, two things make me put it down again every single time:
- The differences between ps and cmd.exe are annoying and unnecessary.
- The lack of pushing the boundaries on the text output in a GUI window leaves me wondering what I really gain when I get over the hump of #1.
I understand the need to "reboot" the DOS command line and get something scalable and consistent, but ps is a superset of cmd.exe and aliasing could've made the transition seamless. However, because little more than "dir" works (and "dir /s" doesn't) I'm constantly bumping into barriers just trying to get my work done in the new shell.
And I'd be really ready to learn ps, especially since it's everywhere now, but what am I really gaining? I never wrote a bunch of shell scripts in cmd.exe and I don't find myself writing them in ps either, which means that the cool "piping objects" thing doesn't make my life any simpler. What I really really want is for the text window of the ps shell to also be something active, e.g. if I do a "dir", I'd like to be able to click on a file or folder in output of dir and open it or right-click on a file and choose a method on the .NET File object to execute. Even better, I'd like all of that functionality but with a keyboard command interface like the old Norton Commander used to provide. I've tried the ps IDEs and GUI shells and haven't liked any of them.
Anyway, the first thing that's made me really really want to move to ps is PowerBoots! It's starting to really deliver on what I had hoped to get out of ps and it feels like Shoes, which I already know I love. Check it out!
Wednesday, Jul 8, 2009, 8:33 AM in The Spout
Dynamic Languages: A Separation of Concerns
I saw Nick Muhonen give a talk on the new language features in C# 4.0 last night at the Portland-Area .NET User Group. He did a good job in spite of the constant questions I asked. He showed one example that I found especially compelling:
object GetConfig() {
return new {
WindowSize = new Size() { Width = 100, Height = 200 },
ConnectionString = "...",
...
};
}
Of course, you wouldn't hard code settings in your application -- you'd load them from somewhere (ideally a database, but that's another story : ). Anyway, in C# 4.0, I can write code like this:
dynamic config = GetConfig();
mainWindow.Size = config.WindowSize;
...
Notice the use of the dynamic keyword -- this means I don't have to know the type at compile-type -- I'll check for the WindowSize property at run-time ala .NET Reflection, COM IDispatch or VB "Option Explicit Off". Of course, this is the cornerstone of all dynamic languages, e.g. Perl, Python, Ruby, etc. These languages have been gaining in popularity for the last few years and I didn't understand why. Tim Ewald, my close friend and compadre, kept trying to explain it to me, but I'm just too slow to get it and I didn't ''til last night watch Nick do his thing. It wasn't looking at the code that Nick typed that made the point for me, it was looking at what he didn't type.
When writing dynamic code, there is no requirement to define a type.
That is, when I inevitably add another property or 10 to my app config, I have to write code to use the new properties, but that's all. I don't have to write a class and I likely don't have to update the save/load code either, because it's also going to be dynamic and just expose whatever data is part of the serialized config. Or, to put it another way:
When writing dynamic code, I only have to write the part I care about.
In the case of dealing with application config, that's about 2/3rds of the code I no longer have to write. Of course, this isn't a new idea -- Stuart Halloway has been talking about embracing essence (the code you care about) and rejecting ceremony (the code you don't) for a long time now. It just took Nick's concrete example for me to understand it.
And not only does this make dynamic code good for reducing the code you type, it always makes it good for the code you're generating, e.g. COM interop assemblies, database mapping code, XML mapping code, etc. In general, I find that most of the code we have generated for us in the .NET programming environment is code to map to foreign type systems, i.e. COM, databases, XML, web services, etc. With dynamic languages, you can write that code once and just use it. In fact, in C# 4.0, there's no need to use Primary Interop Assemblies (PIAs) anymore -- those can just be mapped to a sub-class of the "DynamicObject" type that .NET 4.0 ships to provide that dynamic mapping bridge.
When writing dynamic code, you don't need generated code layers to map to foreign type systems.
This means I don't have to do the mapping to databases per query or to XML per XSD -- I can just have an implementation of DynamicObject, point it at my configuration and go -- no muss, no fuss. Of course, purely dynamic languages have a construct for DO built right in, so it's even easier.
Around the table after Nick's talk last night, someone was complaining that with purely dynamic languages, I give up the benefits of the compiler doing static type checking (I think it was Nick : ). I argued that this was a good thing. The compiler is really just one kind of unit testing -- it's testing names. It can't do any of the other unit testing you need done, however, so you still need unit tests. What that means is that, with static languages, you've got some unit tests separate from your code and some baked into the code via types, casts, etc.
When writing dynamic code, you can separate unit tests completely out of your code.
Of course, as software engineers, we already know that separating concerns leads to better, more readable and more maintainable code, which is why we've long separated our applications into tiers, separated our view from our data, our interfaces from our implementations, etc. Dynamic languages let us do another complete separation of concerns with regards to unit tests that static languages don't allow. In a static language, the ceremony is required, thereby obfuscating the essence.
And all of this is great except for one question -- how do I get my list of possible code to write when I type "." if I'm using a dynamic language or dynamic features of a static language ala C# 4.0?
When writing dynamic code, I don't get Intellisense.
My name is Chris Sells and I'm an Intellisense addict. Admitting I have the problem is the first step...
Friday, Apr 17, 2009, 11:43 AM in The Spout
Win7 killed a feature I love in Vista!
All my friends have updated to Windows 7. My 14-year old son is running Win7. I'm the only one I know that's not running Windows 7. The reason? Windows 7 took away a feature I use all the time, as shown on the right: Search the Internet.
Here's what I do all day, every day in Vista: Ctrl+Esc to bring up the Start menu, then I start typing. If I'm searching on my HD, I immediately get matches and I can choose one with just the arrows and the Enter key. If I'm typing in the name of a program in the Start menu, I get those matches and choose one. If I want "calc" or "notepad" I can just type those and those work.
However, 80% of the time, I want to search the internet, so enter my search term, optionally including attributes like "site:", I press, down-arrow once, highlight "Search the Internet" and press Enter. This brings up my default browser with my search results in my default search engine without me having to move the mouse or open the browser and wait for the home page or even decide where I want the search results to come from until after I've entered my search phrase.
And they took it out of Windows 7. : (
I logged the bug and heard nothing.
Does anyone know of I 3rd party program I can run that will work exactly like the Vista Start menu under Windows 7? Please?
Friday, Apr 17, 2009, 9:24 AM in The Spout
Twitter takes a bite out of blogs
At the last DevCon in 2003, blogging was rampant. We had about 100 posts in the lead up to the conference and during the conference itself.
A this year's DSL DevCon, there's a ton of buzz, but almost none of it is in the blogosphere. Instead, it's all in Twitter.Last I checked, it was more than 150 tweets and we're still on the first talk of the 2nd day (and day #1 was only a half day).
The worm has turned.
Sunday, Mar 15, 2009, 10:34 AM in The Spout
Why I Hate My iPhone
I've had an iphone for the last coupla weeks and there are some things that drive me crazy about it!
- The battery life is crazy short. I can't make it more than 6 hours on a charge. Good lord!
- Pandora, an app I dearly love, can't run in the background like the ipod app, so I can't do SMS, email, check my calendar, etc. while I'm listening. Are you kidding me?
- There's no tactile feedback on the keyboard, although the auto-correct is amazing ("let go, let iphone!").
- There's no copy-paste. I've never used a smart phone that did, but I soooo want this feature!
- There's no free out-of-the-box app for using my iphone as a laptop modem, which is something I really loved about my T-Mobile Dash.
- I used to be able to use my T-Mobile account to get free wifi at Starbucks. Can I do the same with my AT&T account? I have the unlimited data option.
- There's no turn-by-turn directions on the map app and easy re-routing when I go off route. It's so close; let's go all the way!
And all of that pales in comparison to the single worst deficiency in the app-suite of the iphone for which I've found no good work-arounds; the calendar app is nearly worthless in a business environment:
- There is no snooze, so I can't set an alert for 15 minutes and then 5 minutes before, then at the time, etc. In a meeting driven environment like Microsoft, the lack of snooze means that I'm actually missing meetings.
- There is no way to invite other people to events. Further, if I create an event via Exchange so I can invite someone, I can't edit it on the iPhone.
- I can't do a Reply All to an event to ask a question or let folks know I'm running a little late.
- There is no detection of phone numbers or addresses in event locations or the body, which means I get no integration with the phone or map apps. This means that I'm memorizing phone numbers and addresses stored in events so I can enter them manually. I have a smart phone so I don't have to remember this stuff!
- My appointments don't show on the home screen, so I have to constantly check the calendar app to see what my day is going to look like.
The calendar app is the single thing that makes me miss my Dash. Someone please tell me there's a workaround to these issues! I'll pay!
The reason I list the things I hate about my iphone is because the list of things I love about it would be impossible to enumerate. I had a T-Mobile Dash for years and it went with me everywhere. It was as big a boost in my electronic lifestyle as my first laptop. After having a smart phone for contacts, email, music and surfing the web, I couldn't go back. Plus, I loved the Dash so much that I'd try a new phone every 6 months or so and then bring it back because it just didn't compare.
On the other hand, the iPhone replaced my Dash in 24 hours. I've been twittering iPhone development related apps. I've purchased iphone charing cables for everywhere in my life where I sit for more than 5 minutes. I want to integrate my iphone as closely into my car as possible.
They will pry my iphone out of my cold dead hands.
489 older posts No newer posts



