Sunday, April 04, 2010

iPad review

So I finally got to use the iPad. Here are my first impressions.

It's heavier than I thought. At about a pound and a half you really feel it when you hold it continuously for about an hour or so. When you first hold it it just feels slightly heavy, like a hardcover book - you'll definitely want to rest it on your knee when reading a book on this device.

It's fast. Feedback is immediate and highly responsive. There were a couple of situations where button presses didn't respond straight away but for the most part everything screamed.

After launching Safari, the device's speed is immediately apparent - when you two finger pinch to expand the text, you can pan the page while holding the pinch magnification steady. When you drop the pinch, the resolution fills in the detail. Same with Google Maps - pull down and pinch out and the the image balloons under your fingertips like magic, with the map tiles coloring in like patchwork. It's a lazy async loading pattern and beautiful to watch.

The screen is so big and you hold it so close to your face that the apparent size is far bigger than the screen size belies. When you're using a computer you normally sit a lot further back from the glass. It makes for an impression of size that's huge. This is really obvious when playing games. Playing plants vs zombies is so much fun on the big screen. You find your eyes darting all over the real estate. And labyrinth 2 - the marble and wood tilt game - is gorgeous, eye-popping. The unused space while you're concentrating on one corner of the game seems indulgent.

Games are going to be huge on this device. Apple have overcome a bunch of technical hurdles to make handheld gameplay cheap for consumers and given developers the tools and speed they need. The only drawback is the controls, though accelerometer and virtual joysticks go a long way. I couldn't tell you how fast I would buy a bluetooth game controller for the iPad. The car racing game, Real Racing, is so in-your-face, it's hard not to be immediately drawn in to the action. Let's hope Prince of Persia makes it to the iPad!

The book reading app is fast and functional - with special attention paid to the bookshelf, page-turns and searching. The screen is definitely easy to read and if reading my kindle books on the iPhone is anything to go by, it will be pleasant to read on this too, but if you're lying in bed you'll want to rest it on something cause it'll get heavy. The hardware orientation lock will come in handy for books and web browsing - this is a constant frustration in safari on the iPhone (I'm sure we'll see this in the next iteration of the iPhone OS).

The built-in apps are polished and so fast. Photos flick by and load almost instantly, stacks can be opened and closed with a pinch, held and moved about the screen. Touch gestures have been given a very stable state system that allows the users a great deal of control. Given the ad-hoc nature of gestures, this was important for Apple to nail so it felt intuitive and stable.

The maps application is a world in itself (although I'd love to see the ability to change routes or search alternate routes, perhaps draw a projected route on the screen). The calendar app real-estate will be very welcome. The contact app is functional rather than mind-blowing. Notes still has the same lame comic sans font and the text doesn't even line up with the lines so that app is obviously not getting much love. Given the amount of great notes apps (including taskpaper, my favourite), that's fine by me.

There is a new Videos app by itself dedicated to showing movies - despite the squarish aspect ratio, the screen is so crisp they look great. And over 10 hours of battery life with movie playback is very desirable. Many children and adults will use these devices on long trips - unless motion sickness is an issue (that remains to be seen).

The iPhone felt puny when I'd finished using the iPad for a length of time. That's not to say I don't love the speed and richness of functionality I can get on the 3GS but for web browsing, there's not comparison: the iPad is what you want to have in your hands. It will remain to be seen how well that experience plays out for the vast variety of web pages out there. (Can anyone say Chrome for the iPad? Yeah right :)) Interestingly, when I went to google and put safari in landscape mode, google mail had an Apple-like mail web app waiting for me - at iPad launch day, that's pretty impressive. There was a list of mail on the left and detail on the right. I hope I can turn that on in Chrome.

Touch is here to stay. A generation of users, especially children, will be growing up with touch-based computers. We are still at the infancy of this technology but it's clear after using the iPad that you are starting a new paradigm of computer interaction. Gestures are going to become more and more intricate. The computer gurus, instead of using keyboard shortcuts will use little-known gestures and combinations to make the computer fly.

The simplest example of this effect was when I tried to pull up the control menu in Pages. I couldn't get it to work with gestures in the side bar, double-tap, swipe - nothing worked. I then later realized I had it in landscape mode - only turning it to portrait would yield the menu bar and controls. The gestural nomenclature has been extended to orientation.

Keynote, Pages and Numbers are a good reminder of how far this device might be pushed. With a bluetooth keyboard and a way to prop the device up you could easily do basic word processing, write a book or create keynote presentations on the road. People might use it to take meeting minutes and so on. The on-screen keyboard will suffice for short bursts of text or be useful for editing, but is still not so good for touch typing IMHO. (Early hint: take a rubber non-slip mat with you to let you prop the device up against things - would work well on a tray-table in a plane).

I'm holding out for a 3G model. Given the limited options for transferring files on and off the device, I suspect copy and paste mechanisms as well as online services like dropbox and iDisk will become more popular. When opening a keynote/pages/numbers document from mail there was a button to "open in keynote/pages/numbers" for each filetype but it didn't do anything. With any luck this will be enabled so a Dropbox app can use the built-in viewer and then launch pages or keynote and open the file. Without wifi or 3G your options are very limited - you might have a file stuck in the device until you get into wifi range or can connect it to your computer. If you're on the road - get the 3G version.

I've never had a computer experience so responsive and fluid. Perhaps once when playing a first person shooter on a tricked-out PC with a fast graphics card and decent processor, the mouse controls finely tuned, where every twitch yielded instant results. But never with a general user interface. To be able to turn a computer on and immediately get to precisely the task you want is going to be very welcome to most users. Being able to run one app at a time may not bother people too much in this context.

The iPad is an experience as well as a device - I enjoyed every minute of it.

Sunday, March 28, 2010

Convert your mail.app notes to text files for use with Notational Velocity and sync

Recently I wanted to move my notes from mail.app and the notes app on the iPhone to text files. This would then allow me to use Notational Velocity with markdown hack and simpletext.ws that I use with the excellent Taskpaper iphone app by Hogg Bay Software.

You can download the script files here or copy and paste from the article.

Here’s how I got it to work. I really hope I’m not missing a trivially easy way to do this but this way did work for me!

  1. Export from Mail to an archive. This is a plain text file.
  2. Download MacVim
  3. Run a script over archive file to reduce it to text
  4. Run ruby script in new folder to convert notes to text files

Export from Mail.app to an archive

  1. Click on notes
  2. Mailbox | Archive Mailbox
  3. Choose a new empty folder like ~/Downloads/Notes
  4. Copy the Notes.mbox/mbox file to ~/Downloads/Notes. You won’t need the table_of_contents file.

The ~/Downloads/Notes/mbox file contains all the notes in a single text file with a bunch of markup.

Download MacVim

  1. Download MacVim
  2. Drag to applications folder and open

Run vim script to convert mbox text file

The script:

   :%s/ / /g
:%s/<br class="[^"]*">//g
:%s/<br>//g
:%s/=\n/ /g
:%s/<div>\([^<]*\)<\/div>/\r\1/g
:%s/^X-Universally.*\n//g
:%s/^Content-Type: text\/html;\n//g
:%s/^\tcharset=us-ascii\n//g
:%s/^X-Uniform-Type.*\n//g
:%s/^Message-Id: .*\n//g
:%s/^X-Mail-Created-Date.*\n//g
:%s/^X-Mail-Generated.*\n//g
:%s/^Content-Transfer-Encoding.*\n//g
:%s/^Mime-Version:.*\n//g
:%s/^X-Apple-Base-Url:.*//g
:%s/^X-Apple-Mail-Remote-Attachments:.*//g
:%s/^From: .*\n//g
:%s/ -0400$//g
:%s/<span [^>]*>//g
:%s/<\/span>//g
:%s/=?MACINTOSH?Q?//g
:%s/=CA? Date: .*//g
:%s/^\tcharset=.*\n//g
:%s/<div>\([^<]*\)<\/div>/\r\1/g
:%s/<div>//g
:%s/<\/div>//g
:%s/<[^>]*>//g
:%s/=CA//g
:%s/? //g
:%s/_//g
:%s/=92/'/g
:%s/\s\+$//g
:%s/#\(\a\+\)/@\1/g
:%s/^Subject: /!!!\rSubject: /g
  1. Save the above vim script to a file, like ~/notes.vim using a text editor.
  2. Right-click on the plain text mail archive file you created above (~/Downloads/Notes/mbox) and choose: Open With | MacVim. You can also launch MacVim and open the mbox file with File | Open.
  3. Type:

    :so ~/notes.vim

    Or whatever you named the vim script.

  4. This will convert the file to text. You may need to do some small other adjustments - this script worked well on my file.
    What is remaining is a list of Subject: *, Date: * and message body blocks with the !!! separating the entries. We’ll use this in the ruby script to convert them to text files.
  5. Choose File | SaveAs to save the modified file to the filename “notes.text”, let’s say ~/Downloads/Notes/notes.text

Run ruby script to convert to text file

Most mac systems these days have ruby. To test, open the Terminal and type:

    ruby --version

It should return something like:

    $ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

Save the script below to ~/Downloads/Notes/n.rb

    class WriteNotes
@counter = 0
def WriteNotes.writeout(subject, note, date)
# write out new file
if subject != ""
# make subject the filename
filename = subject
# limit file names to 50 chars - make longer if required
if filename.length > 50
filename = filename[0..50]
end
# strip out filename-unfriendly characters
filename = filename.strip.gsub(/ /,"_")
filename = filename.gsub(/[?:,@="'.\\\/]/,"")
# check if we have a date in the date field (basic check)
d = date[0..1].match(/[0-9]/)
# default a current date if date not found
if !d
date = Time.now.localtime.strftime("%Y-%m-%d")
end
if date.strip.length == 0
date = Time.now.localtime.strftime("%Y-%m-%d")
end
# remove comma from date if it's non-standard, like "Aug, 2"
date = date.gsub(/,/,"")
# filename template - change to taste
filename = "zan-" + date + "-" + filename + ".txt"
# write out file
notefile = File.open(filename, "w")
notefile.puts note
notefile.close
@counter = @counter + 1
# puts "__filename[#{@counter}]: " + filename
puts "Subject: [#{@counter}]" + subject
# puts "__note: " + note
end
end # writeout
subject = ""
note = ""
date = ""
file = File.open("notes.text", "r")
while (line = file.gets)
if line[0..2] == "!!!" # at a new note
# write out new text file
writeout(subject, note, date)
# init vars
subject = ""
note = ""
date = ""
else
# collect data into subject, note, date fields
m = line[0..7]
# puts m
if m == "Subject:"
subject = line[8..line.length].strip
note = ""
else
if line.strip[0..3] == "Date"
date = line.strip[6..15]
date = date.gsub(/:/,"")
date = date.gsub(/ /,"_")
else
note = note + line
end
end
end
end # while
writeout(subject, note, date)
puts "total files: #{@counter}"
file.close
rescue => err
puts "Exception: #{err}"
err
end

Open terminal (under Utilities in Applications folder) and type:

    cd ~/Downloads/Notes

Now we can run the script, type:

    ruby n.rb

If the script runs correctly, the notes.text file will be processed and each file will be written out in the format:

    zan-YYYY-MM-DD-.txt

If there is a problem, just remove the text files generated and start again (rm *.txt)

Good luck! The vim script and ruby script may require a little tweaking. Please leave a note if you found this useful.

Friday, March 19, 2010

Get etude and learn the piano











Want to learn the piano and download free sheet music? This great app will help. etude is US$3 (introductory price) and has a selection of music for free in the in-app store. You can download sheet music like Moonlight Sonata and Fur Elise to your bookshelf. The range is limited, but the app only just came out. The same developer (Wonder Warp Software) has released Shovebox Mobile.

Etude really shines when you open the score. It will play at different speeds and shows a keyboard with lit-up keys. You can move the play cursor along at your own pace and work the keys out or have the app play the music for you.

The app needs better music management and a search feature and it should remember your position when you exit the app but for a beginner learning sheet music, it’s still excellent.

Friday, March 05, 2010

MacHeist NanoBundle

Well MacHeist is over, but MacUpdate Promo is now on.

MacHeist is running another bundle for only US$20 for the next couple days.

I am a user of RapidWeaver, which was part of a previous bundle, and can highly recommend it for developing pretty web sites fast.

My main reason for purchasing was the inclusion of MacJournal which looks to be a rather neat way to write and maintain a journal and publish the journal online should you wish.

I am very interested in using the file transfer software Flow. The other utility software, like Tracks and RipIt look cool enough to give a try.

There is also Clips and CoverScout which might be useful to someone.

The Tales of Monkey Island are old games, but damn they were entertaining back in the day. AirBurst Extreme is somewhat awkward to control. Burning Monkey Solitaire is a colourful entertaining version of Solitaire with a very wide range of Solitaire rules and random noises and jokes thrown in - surprisingly fun.

Tuesday, January 12, 2010

To:Mail.app From:MacHackShack.com Subject:Advanced keyword searching with Mail.app and spotlight

Thanks to @rands on twitter, I now realize you can use the gmail-style keyword text search queries in mail (Command-Option-F). This technique also works in spotlight.

Try:
to:someone from:someone subject:something
The "someone" part seems to work with full names or email addresses.

The only confusing thing is the mail search bar should switch to "Entire message" when you're using a keyword-style search rather than the "From", "To" or "Subject" buttons.

It's a very limited syntax and not well publicized but welcome anyway cause what's there works. These tests done in Snow Leopard 10.6.2 and Mail.app 4.2.

Wednesday, January 06, 2010

How to restart a hung Finder in Mac OS/X without rebooting


Warning this is HIGHLY UNAUTHORIZED. Proceed at your own risk.
So: save everything first before going on.

Okay - to do this, it's pretty basic. We're actually not sending it the kill signal, instead telling it to restart itself or in unix signal parlance: SIGHUP. I learnt this doing some BSD coding on HP/UX systems years ago.

So first, we need the Finder's pid. This will get it:
ps -e | grep Finder | grep -v grep | cut -c1-6

And then pass that to the kill command with -sighup switch:
kill -sighup `ps -e | grep Finder.app | grep -v grep | cut -c1-6`

This will clobber Finder and it will reopen fresh(ish) as a daisy.

Put it in a script for reuse call this restartfinder.sh
#!/bin/bash
kill -sighup `ps -e | grep Finder.app | grep -v grep | cut -c1-6`
chmod +x restartfinder.sh

And you're done.


Monday, December 28, 2009

There's a better way to access your emails from everywhere - use IMAP

If you haven't heard yet, IMAP is the best method for accessing and organizing your email.

Here's why:
  • You can access and modify your email from web, phone or local computer applications and have the changes synced automatically.
  • It's faster and more efficient to access emails and email headers.
  • Folders are synced between the server and all clients.
  • Move an email to a folder and it gets moved everywhere.
  • Most popular email clients support IMAP.
  • Emails can be copied between server and locally very easily using drag and drop (even large volumes).
These reasons were enough to convince me. So turn off your POP3 access and convert to IMAP. I use gmail as my mail client, but yahoo supports IMAP as well. The iPhone, Android and Blackberry use IMAP. Mail.app, Outlook and Thunderbird all support IMAP too so there's no excuse. And you can connect to your IMAP account and copy your existing POP3 emails over.

Do it, do it now. Or when you've got a few hours to kill. You won't regret it.

iPhone apps worth looking at

These apps have worked their way into my life and are worth checking out.

Everyday or frequently:
Safari, Tweetie 2, Now Playing, Amazon.com, YoContacts, iTalk, IMDB, Squarespace, Analytics, Tumblr, Mint, Kindle, Google, RedLaser, AroundMe, Files, Labyrinth 2, Dragon's Lair, TheDeep, Kayak, Zenbe, Facebook, Todo

Sometimes but good:
1Password, BeejiveIM, Darkroom, Driver, Flickr, GPS Drive, GoodReader, Google Earth, Gowalla, Instapaper, Lose It!, Matches, NOVA, OpenTable, PAC-MAN, Pandora, Postman, Pzizz Relax, Remote, Rotton Tomatoes, Shazam, Skype, Taxi Magic, Trails, TripIt, Yelp, Zipcar, iTimeLapse, iWant

Sunday, December 20, 2009

Upgrading? Archive your old iPhone backup folders and save space

I upgraded my old iPhone 3G to a 3GS and lost about 8 gig of disk space. If you have successfully upgraded your iPhone to a new version the old backups are retained here:

$HOME/Library/Application Support/MobileSync/Backup

Look at in Finder, sort by date and then just move those folders to an external backup drive you aren't using any more. Note, you will definitely want to keep the most recent folder as that is the active backup of your iPhone. This worked for my setup, but please use caution cause these are your iPhone backups - move, don't delete!

It's worth it to get 8 gig or so back.

Finding open files on a Mac: lsof

If you want a way to find open files on a Mac, you can use the "lsof" command at the terminal (located: /usr/sbin/lsof). Open Terminal (under Applications | Utilities) and type:

lsof | more
This will list all open files and be a long list. To restrict the list, say, to all files on mounted volumes, use grep:

lsof | grep "Volumes"
I wanted an alternative to the useful windows "handle" command-line utility to locate open file handles. The new Snow Leopard finder tells you what program has open files on a mounted volume, but earlier versions of Mac OS/X won't.

The application name is the first item in the list and the file is the last.

Friday, November 06, 2009

SQLite database browser

If you're looking for a SQLite database browser, the SQLite Data Browser sourceforge project may be what you're looking for. It's developed in Trolltech QT so runs on Windows, Mac and Linux but needs to run under Rosetta so performance may be a little slow. It's great on Windows though so I thought I'd give it a try on the Mac.
You can get it here.

Chrome beta for Mac is available!

Chrome is now available for download on the Mac, in beta form.

I know I shouldn't be as excited as this but, okay, I'M EXCITED. Chrome is SO MUCH FASTER than Firefox or Safari on the Mac. Finally, a really quick browser. So far, so good.


I use Chrome on my work PC all the time and apart from excessive swapping when many (30+) tabs are active, it's a great, fast browser to use.

And being able to close tabs consuming too much CPU is SO WELCOME.

I still use Firefox because it's a nice browser but Chrome is fast and stable, and that matters.

I'm going to have a little lie down now.

Saturday, October 31, 2009

Down memory lane with a TrueType VT 220 Font




Viacheslav Slavinsky created a DEC VT 220 truetype font so you can take a nostalgic trip down memory lane when using Terminal. Just download the font, double-click and install in Font Book. Then go into terminal, duplicate your current profile in preferences and change the font. Size 20 works best on Macs. Change the color to green and we're walking back down memory lane. Or change it to any color you want :)
Thanks to Simon for the tip.

Tuesday, October 27, 2009

Looking for a free SQLite database manager?

Since developing for iPhone OS 3.0 I've been creating, editing and maintaining sqlite databases. The command-line tool "sqlite3" is quite nice to use but sometimes you just want a graphical editor.

Mike Titlebaum has created the ridiculously literally named: "Mike T's SQLite Database Administrator Tool". It's free and even goes further than the basics to offer an import function, SQL query autocomplete, a comprehensive schema view and export functionality. You can also create new tables and edit data.

It does have its quirks but for a free app it's worth a look.

Monday, October 26, 2009

Snow Leopard disk eject quirkiness

After installing Snow Leopard the eject button in the Finder for external hard disks occasionally fails. If you click eject and nothing happens (repeatedly) the solution is to right-click on the drive and choose the "Eject" menu entry. This will just about always eject the disk (unless it's still spinning up and Finder is waiting for the control signal to kick in). You would think the selectors for the widget and menu item are the same, but they mustn't be. I thought I'd mention it here in case anyone else had the problem.

Saturday, October 24, 2009

Convert any text to your own mp3 automatically!

I heard Andy Ihnatko on MacBreak Weekly saying you could convert any text to an audio clip using an automator action in the services menu. This is handy for any time you want to hear something read back to you but listen on your iPod (in the car, for example). Andy was right - this is an awesome feature of Snow Leopard. Here's how to do it.



Launch Automator or if in Automator, File | New
  • Choose "Service" type of workflow
  • Make sure the service receives "text" in "any application"
  • Search for "audio" in the Variables pane
  • Choose "Text to Audio File" and drag to workflow workspace (right-hand pane)
  • Choose a voice (default is Alex)
  • Choose a file name: TextRecording
  • Choose a location (default is desktop)
  • Search for "audio" in the Variables pane
  • Drag "Import Audio Files" under the "Text to Audio File" workflow action
  • To save space, check "Delete source files after encoding".
  • Click Save, call the service "Text to mp3"
The service will now be available. To test, go to mail, highlight some text and choose from the menu: "Mail | Services | Text to mp3". The automator action will take the text, convert it to speech and convert that to an mp3 file in iTunes. The file can then be played straight away or synced to your iPod or media player.

If you want to run the automator action, search for "Get Specified Text" from the Actions pane and drag "Get Specified Text" above the "Text to Audio File" action. This will let you type text and run the workflow in Automator. You will have to remove the "Get Specified Text" action to save the workflow as a service.

Thanks Andy and thanks Apple for this amazing, easy feature.

(And if you were wondering where this magically puts the services entry, go to System Preferences, Keyboard, KeyBoard Shortcuts, Services and you'll see a list there you can modify)

Sunday, October 11, 2009

Gatting and iPhone - the joke's on you

The iPhone's auto-correct mechanism makes Gatting (a famous English cricketer) out to be an arse. As you can imagine, Australians particularly like this joke.


Gatting auto-corrects to be farting. The keys are close together... many thanks to my Aussie friend Michael for pointing this out.

Thursday, October 01, 2009

Warning: Parallels 3.0 does NOT work with Snow Leopard and upgrading will cost you $50

I found out that Parallels 3.0 doesn't work with Snow Leopard when I tried running it today. This is highly annoying because version 4.0 costs $50 to upgrade. If you don't upgrade, your virtual machines will be inaccessible under Snow Leopard.

Parallels will not support version 3.0 under Snow Leopard in the future according to their website.

So I'm stuck with the forced upgrade. I wonder how many other customers feel annoyed at being forced to spend $50. Not cool Parallels and not appreciated. VMWare Fusion works fine on Snow Leopard. I'll be moving my machine to that as soon as I can.

Taking out the trash - keyboard shortcut to empty the trash

Ok, this is trivial but how do you empty the trash using a keyboard shortcut?

command-shift-delete
empties the trash with prompt.

and if you're really sure:
command-shift-option-delete
empties the trash WITHOUT a prompt.

Note: A friendly warning, if you rely on this too much, it'll become a habit so beware! You might lose something you want.

The most annoying Xcode error ever: The Info.plist for application at (null) specifies a CFBundleExecutable of (null), which does not exist.

If you're developing an iPhone application in XCode and getting the error:
“The Info.plist for application at (null) specifies a CFBundleExecutable of (null), which does not exist.”
here's how to fix it:

In Xcode, choose "Executables" from the project hierarchy. Click your project executable then press Command-I. Choose the General tab and set the working directory to "Build Products directory".

This fixed the problem. The advisory from Apple did not help much, but did mention the Build Products directory. Under SDK release notes for iPhone OS 3.1, XCode/Developer Tools:

"Changing an iPhone Executable's working directory from “Build Products directory” may cause the application not to install properly with the error message “The Info.plist for application at (null) specifies a CFBundleExecutable of (null), which does not exist.”"
Hope this saves you a little time. It frustrated me for a while.