Twitter Weekly Updates for 2011-03-27

March 27th, 2011
  • Tax Time. #
  • Is DSL upstream bandwidth limited by the technology, or by ISPs? #
  • xkcd is a comic version of Jon Stewart. Funny, but damn informative when making a point. On radiation: http://t.co/H9s72FN #
  • For years we've been hearing about how mobile is the next big thing. This time, it really is! #
  • BlackBerry PlayBook available for pre-order now. http://www.futureshop.ca/en-CA/category/id/PCblackberryplaybook.aspx #
  • @adriancrook Tried http://t.co/n2lP88T ? It's a pretty good web conferencing system. in reply to adriancrook #
  • Trying to figure out Outlook for Mac and how to build a Smart Folder that shows unread items from a bunch of folders. #
  • Can't build it through the Advanced Find UI directly, because it doesn't support OR queries. But there's that "Raw Query" field... #
  • Create a Smart Folder, then look in "~/Documents/Microsoft User Data/Office 2011 Identities/Main Identity/Data Records/Saved Searches/" #
  • A clue: ((kMDItemKind=="olk14_message")&&((com_microsoft_outlook_folderID==1)||(com_microsoft_outlook_folderID==118))) #
  • I wonder if using the Kinect sensors (head position + cameras) would be sufficient for eye tracking. #
  • tell application "Microsoft Outlook"
    get selected folder
    end tell
    (Paste into AppleScript Editor to find selected folder ID) #
  • @tweetstockca No, the iPad 2 doesn't support Flash. in reply to tweetstockca #
  • Finally have the Smart Folder I want in Outlook 2011. Time for a blog post. #
  • There we go: A few "easy" steps to a Smart Folder with an OR clause in Mac Outlook 2011. http://t.co/fkCctXr #
  • Future Shop store staff say they can get fired if they tell me how many iPad 2's they got in. #yikes #
  • It's Follow Friday, but you're probably already following enough people. So you have my permission not to follow anyone new. #ff #

Outlook 2011 Smart Folder with Raw Query

March 24th, 2011

There's a big feature missing from Outlook 2011 for the Mac. Okay, a number of big features, including being able to edit server-side rules. But the one that's been affecting me most is the inability to have Smart Folders that have OR clauses.

I subscribe to a number of mailing lists, and what I wanted was for all the messages to those lists to be delivered to subfolders (so they're not in my Inbox), but I wanted to be able to see all the unread messages in all those folders, in one place.

Outlook 2011's Advanced Search lets you search for unread messages, and search for messages in a combination of folders, but not both.

But all is not lost. Outlook 2011 on the Mac uses Spotlight to index mail, and supports creating queries that are passed right through to the Spotlight query engine. You can access this using Advanced Search in Outlook, and setting the search type to "Raw Query".

201103240929

You can enter any query here that's supported by Spotlight. Here's a list of Spotlight attributes that you can use in your queries, and from that page you can find information on the query syntax.

For example, to find all messages written by people named Steve:

201103240934

Note that in the Search ribbon bar, there are settings for the scope of the search. These don't get saved with the search, so you need to set them to where you want the search to be applied.

 Users Stevex Library Application-Support Evernote Data 101370 Content P1040 7831437B6F570Ffee97Fee5Bc5Cac224

So back to my problem. I wanted to find all the unread messages in a number of folders. I need to be able to query for two different things: Whether or not a messages is Unread, and what folder a message is in. These aren't Spotlight attributes. They're Outlook attributes. How do you find a list of these?

Well, not on the web, as far as I can see, but they are there in the file system. If you use the Mac command "mdfind" you can find a file containing some particular text, so I created a message with the text "xyzzy" in it (by attaching a text file with that name), and then did an mdfind to locate it. The message was in a file on disk:

/Users/stevex/Documents/Microsoft User Data/Office 2011 Identities/Main Identity/Data Records/Messages/0T/0B/0M/21K/x00_21535.olk14Message

An mdls on that file yields the list of Outlook metadata:
com_microsoft_outlook_accountID = 1
com_microsoft_outlook_attachments = (
"xyzzy.txt"
)
com_microsoft_outlook_author_email_addresses = (
"stibbett@adobe.com"
)
com_microsoft_outlook_categories = (
0,
0
)
com_microsoft_outlook_completed = 0
com_microsoft_outlook_flagged = 0
com_microsoft_outlook_folderID = 121
com_microsoft_outlook_forwarded = 0
com_microsoft_outlook_has_attachments = 1
com_microsoft_outlook_has_reminder = 0
com_microsoft_outlook_has_text_content = 1
com_microsoft_outlook_hasDueDate = 0
com_microsoft_outlook_hasStartDate = 0
com_microsoft_outlook_isFromMailingList = 0
com_microsoft_outlook_messageSent = 2011-03-24 09:38:23 -0400
com_microsoft_outlook_primaryCategory = 0
com_microsoft_outlook_priority = 0
com_microsoft_outlook_recordID = 18520
com_microsoft_outlook_redirected = 0
com_microsoft_outlook_repliedTo = 0
com_microsoft_outlook_size = 1
com_microsoft_outlook_unread = 1

And there are the properties I'm looking for: unread, and folderID.

folderID? How do I find out what the folderID is for the folders I'm interested in?

Well, one way would be to use mdfind to find messages in these folders and mdls to extract them, but that's a pain. Here's a slightly simpler way, using AppleScript.

Launch AppleScript Editor (a utility that comes with every Mac), and paste in this text:
tell application "Microsoft Outlook"
get selected folder
end tell

Select the folder whose ID you want, and click the Run button in the AppleScript Editor. You should see something like this:

201103240944
You can use this to get the Folder ID for each folder you want to include in your Smart Folder.

The last step is forming the query. Now that we have all the information it's pretty easy:
com_microsoft_outlook_unread != 0 &&
(com_microsoft_outlook_folderID == 123 ||
com_microsoft_outlook_folderID == 234)

Substitute your own folder IDs for 123 and 234, and add as many more (or less) clauses as you need. Paste this into the Raw Query box, make sure you have All Folders selected in the ribbon, and you should see the unread messages in those folders!

Click the Save button on the Search ribbon to save your smart folder.

There, now, that was easy wasn't it? :)

iPad 2 Internals

March 12th, 2011

iFixit posted a picture of the internals of the iPad 2. Check it out:

201103120743-1

Here's the part that I find amazing:

201103120751-1

The "computer" part of the iPad 2 is miniscule.

Acoustic Echo Cancellation

March 10th, 2011

The Flash Player's job has always been to add features to browsers that the browsers don't implement themselves, in a standard way across all browsers.

Days gone by, if you wanted to play audio, play video, play animation, stream radio, or do all kinds of other things we take for granted in browsers now, you had to use a plugin. And Flash was that plugin for most sites.

It's the job of browsers to implement the features that web developers need, which means Flash features will naturally move into the browsers. But it's the job of Flash to keep innovating and keep adding features that web developers need.

Flash is adding 3D support with Molehill. That's not ready to use yet, but it will be soon. Browsers will implement 3D as well, of course, but it will probably be a few years before it's implemented in a consistent way across browsers so that web developers can depend on it. It's Flash's job to give the industry a head start.

But another smaller feature that was just rolled into the 10.3 update and is ready to use now is Acoustic Echo Cancellation, which also includes noise suppression and voice activity detection.

Desktop and console games have been supporting voice chat for a while now, but have you ever seen a Flash game that supported voice chat? (Maybe you have, I haven't looked at many, but I haven't). With Molehill, rich 3D gaming is going to be coming to the browser, and why wouldn't you expect voice chat there? With 10.3, the infrastructure is there.

Check out the documentation for the Microphone class in the 10.3 API documentation here.

PlayBook Development Incentive

March 9th, 2011

The BlackBerry PlayBook is an indie developer's dream. A brand new OS and a new platform, from a large company that's got the momentum to sell a lot of devices. Free signup (unlike the days of game consoles and megabuck dev kits), an easy revenue model for apps, and to top it all off, the offer of a free PlayBook tablet if you submit an app to their App World store before the end of March.

"But that's only 3 weeks away. It's too late to start anything."

201103100553

No it's not. And I'll tell you why. The application model for the PlayBook is based on the Flash player and the AIR runtime. This means you can use Flash Builder, an Eclipse-based IDE, to build an app. It would sure help if you were already familiar with ActionScript, but even if you're not, it's a JavaScript style language that's easy to pick up, and Flash Builder gives you a lot of help along the way.

The steps involved in building an app for the PlayBook are outlined here, for Mac, Windows, and Linux.

If you run into any trouble or have any questions along the way, the RIM support forums for Tablet OS developers are right here, and there's enough traffic that questions are answered quickly.

So is 3 weeks enough? Well here's some inspiration.

I was off work for the last 2 weeks, taking some time off for the birth of our daughter Allison. During some of my down time (those rare moments when everyone else was sleeping) I started a simple application to help out with a household task that we always mean to do but never seem to get around to: planning out meals for the week.

I build an AIR application that presents at a glance your meals for the week and makes it easy to plan out. It's probably not for everyone but it's something I've always wanted, and now I've built it. In AIR, in less than 2 weeks, and for the PlayBook. And since it's AIR, I can run it on my desktop, in a browser, I can bring it to Android, and soon iOS.

This cross device portability is part of what makes the PlayBook the indie developer's dream. The free tablet offer is a great incentive to jump in, and once you've built something interesting, it's so easy to make it available to hundreds of millions of users on whatever channels you want, with the same code base.

One specific bit of information I wanted to pass on is a solution to a problem I had when I was setting up my Flash Builder / PlayBook development environment. If you install FB Burrito (that's the codename for the beta version of Flash Builder) and then install the PlayBook SDK (0.9.3 in my case), and then find that you can't choose the PlayBook as a target for a new mobile project, you may have run into a problem that I ran into. I believe it's related to permissions, because the solution in my case was to uninstall Flash Builder, reinstall Flash Builder, and then run Flash Builder as Administrator (apparently that last step is important).

App Store 30% Cut

February 21st, 2011

I have little doubt that Apple is within the law in asking for a 30% cut of sales of anything that's sold through apps in the app store. But that's not really the point.

Folks who create content or services that people subscribe to are putting a lot of work into it. They're building businesses around the value they're providing, and working hard to earn your money.

Apple has inserted themselves between iPhone users and these content and service creators, and is demanding 30% of the money that they've earned, without doing any work to earn it.

That's the part that burns me.

If I subscribe to Home Theater Magazine using Zinio, I'm using software created by Zinio and talking to Zinio servers. The content is coming from Home Theater Magazine. Where is Apple in this?

I don't buy that this is in the best interest of the users. Users would be better served by having the people who create the content they choose to purchase receive all the money the users are spending. This is in the best interest of Apple.

I'd be okay with a reasonable fee for acting as a middleman, in cases where they were actually doing that. But they're just extracting money from the transaction because they can.

Apple allows you to keep the money you earn provided you don't have a link in your app to where users can go to actually buy the content or service. I guess you could have text like "Go to our website to subscribe. You can find it with Google." For a company doing a million dollars a year in business, changing that text into a link would cost $300,000.

We used to like Apple because they opened up the walled gardens that the carriers had created. And now they've locked us into their own walled garden. At least this garden has a gate you can use to get out: Android.

iTunes Personal Cloud Service

February 14th, 2011

There's been some speculation lately about a mini-iPhone which would stream music from your home computer instead of having significant onboard storage. Whether that's true or not, the idea of streaming music from your computer at home isn't so far fetched.

There are a few enabling technologies already in place that make this possible.

MobileMe already has access to computers inside your house, through the Back to My Mac service. This is built on top of a number of other technologies including wide-area Bonjour and IPSec.

But what about the problem of accessing files on your computer while you're out and your computer is asleep? Apple has addressed this as well, with something called Sleep Proxy.

The Bonjour Sleep Proxy is a brilliant invention. In a nutshell, a computer on your network that wants to go to sleep can ask if there's someone else on the network that's planning to stay awake, and if so, hand off information about what services the computer has available over to that device. The computer then goes to sleep. If another computer on your network is looking for a service, the Sleep Proxy will advertise the services on your computer as if it was on. If one of those services is needed, the Sleep Proxy will send a magic Wake On Lan network packet that will wake up the computer so it can provide the service.

I believe Windows 7 originally had a sleep mode that was designed for background network server type operation, where a good chunk of the system would be in a low power state and some of it off, but enough would be alive to stream media from the computer. I can't find any reference to it right now, but a mode like would facilitate streaming without firing up 365 watts worth of computer to do it.

Put all these pieces together and you've got everything you need to stream music from a computer at home right to your phone in a secure, efficient manner.

Language Skills

February 12th, 2011

Which programming language should I learn?

I see this question all the time. 

In 2011, I think the answer is becoming easier than it used to.  And that doesn’t mean there’s any one language that’s “winning”, or that’s the language to bet on for the future.

No, in fact, the industry seems to be going the other way:  There is no such thing as a “best” language, and there isn’t even any such thing as a single language that’s the best one to learn for any particular career.

In 2011, the skill you need is the ability to learn languages, because in almost any software development job you’ll be working with more than one.

If you’re a server side developer then the obvious choices for years have been Java and C#.  But Java has been stagnating while lightweight alternatives have been becoming more and more popular.  Like the venn diagram on that previous link shows, a lot of projects are done using ad hoc technologies (where the developers want to try building the site in Rails or ColdFusion or PHP).

So in 2011 my answer to “which programming language should I learn” is “any two”. 

One to learn all the basic programming concepts you need to learn – loops, recursion, memory management, and so on – and then another to learn how languages typically differ. 

Because once you’ve learned two, the rest are easy.

Writing in Advance

February 7th, 2011

I remember an old episode of some TV news based sitcom, where the star was writing obituaries for people who weren't dead yet. The idea stuck in my mind for some reason. I'll bet newspapers still do that.

There are all kinds of news stories you can write in advance. For example, you could write a whole year's worth of coverage of the iPad 2 right now, and probably not have much to change when the actual device was released.

There are only a half dozen or so potential new features - one camera, two cameras, a faster CPU, a better screen, some extra ports - so it's not hard to write up generic descriptions of all of them and then just copy the ones that actually show up into your article later. And we already know what the sequence of articles will be.

For example:

Apple Announcement Coming on [Insert Date]. iPad 2?

Apple has scheduled a media event on [Insert Date] at the company's headquarters at One Infinite Loop ...

201102070716

iPad 2 Rumor Roundup

Apple's media event is tomorrow morning, so tonight lets have a look at the predictions for what they'll announce ...

Apple Announcement Liveblog

We're here bright and early this morning waiting for the doors to open ...

... they're playing [inset band name]. I wonder what that means ...

... I miss Steve ...

iPad 2 Hands On

After the media event we got a chance to play with the iPad 2 ourselves, and we're impressed! It's lighter than we expected, the screen looks beautiful, and the 2 cameras ...

iPad 2 Unboxing

As delivery trucks across the nation deliver the first iPad 2 boxes, unboxing photos are starting to come in ...

In-Depth Review of the iPad 2

[Most of this can be copied from our original iPad review]

iPad 2 Flaw

Now that consumers have started getting their hands on the iPad 2, not everyone is happy with the new device. Some users are reporting [insert flaw] and although the numbers are still small, some pundits are wondering if this is just the start of [Flaw]gate...

Kinectimals and the Sign In Process

February 2nd, 2011

I love the idea and technology of the Kinect .. it sounds like the perfect toy for playing some more physical types of games with my son.  Kinectimals is cute and he likes to play it.

But what spoils the whole thing is the awkward sign-in process in a lot of games.

Microsoft apparently has some policies that Xbox game developers have to follow, like asking users which device they want to store data on whenever they go to save something, even if there’s only one storage device in the system.  It’s normally just a bit annoying, but when you’re trying to direct a 4-year-old through just getting to where he can play with the cats, it’s enough of a speed bump that he usually gets bored and goes off to do something else before getting to where the fun is.

And if there’s someone else (like, say, me) already signed in, the process is even worse.  You have to sign that person out, which involves a bunch of awkward steps, before the new person can sign in.

With a normal Xbox game, I could just sign him in and then hand him the controller.  But Kinect recognizes you.  He has to do the signing in himself.  The recognition process involves standing still and looking at the camera for a few seconds, and that’s just not going to happen.

I’m going to go try it now.  The Xbox is off and Kinectimals is on my desk.  Let’s see how many interactions it takes to get to play with my cat. 

<Turn on XBox by pressing button> <About 2 minutes worth of logos, messages, loading> <Hover hand over Start icon><Kinectimals tries to identify me and fails, asks me if I want to sign in – I choose Yes> <Sign in window pops up, I choose myself> <Select a Device window pops up with one device I can choose>  <Prompted if I want to log in as me, or change identity.  Choose me>  <Start new game or continue saved game?  Continue> Game starts.

When you start a game, it’s reasonable to expect that you’re going to want to continue where the last player playing left off.  That’s not always true, but it’s close enough.  Here’s how I’d like to see this game start.

<Turn on XBox by pressing button> <About 2 minutes worth of logos, messages, loading> Game starts.

And if I wanted to log in as someone else?  Then I could do the gesture that brings up the menu and pick that.

Unfortunately, the end result of the current design is there’s this game that he likes to play but never gets to.