Monday, October 07, 2013

Siri needs real documentation. Here's some.

COBOL was written for "managers". Unlike FORTRAN it was supposed to be readable and useable by non-programmers. Same thing for SQL. And AppleScript.

All of which are harder to use than C or Python or any number of well documented and rational programming languages (ok, SQL isn't as bad as the other two).

Siri reminds me of AppleScript. It's supposed to be a conversational companion, but as of 2013 it's an artificial form of conversation full of "magic words" like "Cancel" and incantations and capabilities that must be memorized in one form or another.

Yeah, Siri hasn't lived up to my early brainwashed enthusiasm. She can generate passwords (via Wolfram Alpha), but you can't copy the $!$#@$ strings.

Alas, contrary to my expectations, Apple isn't giving up on Siri. If anything, Apple's doubled down. You can't search iOS settings from Spotlight, but you can search from Siri. [1] It's widely assumed Siri will be required to use Apple's iWatch.

So we need to learn it, which means studying the documentation. There's a fair bit on the web (not much on Apple's web site of course), but I wanted a book.

Turns out there is one - Talking to Siri: Learning the Language of Apple's Intelligent Assistant - Erica Sadun, Steve Sande. It's $7+ on Kindle, $9 on Play [2]. I glanced at a few pages, learned/relearned 3 new things, and bought it. (The next edition won't be available until March 2014, so for iOS 7 used the book and Sadun's TUAW update.)

Between the book and the links below I'm writing my own Siri notes (in Simplenote of course). Siri is one foreign language I need to learn.

PS. My personal (Simplenote) Siri notes are public at http://simp.ly/publish/K19h9j 

See also

- fn -

[1] A mind-boggling omission. Does Google have a patent on searching settings?

[2] Play DRM can be removed - so worth the $2 to read it via Google's web pages, iBook, and BookReader

Saturday, October 05, 2013

Integrating Google Drive Google Docs into Spotlight search: "Webpages", Kinds and Smart Folders

Mac Spotlight was behaving oddly with my Google Drive. It's not the obvious issue with indexing Google Docs files in Google Drive; was more subtle but it was fixable.

To begin with there's no problem with searching PDFs and other relatively standard files that are stored in Google Drive. They are fully indexed and searchable by title and contents. [4]

The problem is with Google documents, like those with the extension of .gsheet. Of course Spotlight can't index the contents; for most of mine there's nothing there to index anyway.[2]. What's odd is that Spotlight search on the file name didn't work from the spotlight title bar [1], but it did work from the folder search UI.

It turns out that I'd configured Spotlight preferences to exclude web pages from search results, and for Spotlight a Google Doc is a web page reference [2]. So the Google Docs were excluded from results. They showed up in the folder search because evidently Spotlight disregards file type preference there.

Next I had to address Mountain Lion's Folder Bar 'All My Files' list. Even after I revised Spotlight preferences that list didn't include my Google Folder docs.

I right clicked on 'All My Files' to see the Search Criteria -- mine showed Documents and "Kind is Other - com.microsoft.com" (Silverlight files it seems). 

So all I needed to do was add the "Kinds" for the different Google Docs. I'm embarrassed to admin I tried file extensions and Google and Terminal.app and Get Info trying to figure out what "Kind" Spotlight assigned to these files (as distinct from Type, which was "Webpages"). The answer, of course, is simply to look at the Finder's detail list (duh). The kinds in my Google Drive were:

  • "Google document" (extension .gdoc)
  • "Google spreadsheet" (extension .gsheet)
  • "Google drawing" (extension .gdraw)
I didn't have any presentations, but you can guess that one. [3]
 
Once I added those (with quotes) to the 'All My Files' criteria [7] in the Finder Sidebar they showed up in the All My Documents list. Problem is, even in Mountain Lion you can't save your edits to "All My Documents" [6]. Indeed, any editing of a saved search is weirdly obscure (no edit in context menu).
 
There was still one problem.  'All My Files' -- at best I could remove the original and save a new one with a less appealing icon. The trick, of course, is to change the icon (see comments, also [5]).
 
Alas, I couldn't put my Saved Search back into the Finder Menu! I could drag folders there, but not a File. I had to use an obscure trick - Select the file then type Cmd-T. I think this is a Mountain Lion bug, possibly for non-admin users.
 
At last all seemed well; except the Finder Sidebar persistently showed the old gear icon, even though Get Info showed the current icon. A Finder Restart didn't fix this, so I'm a bit stuck for the moment. I suspect it's a Mountain Lion bug [8].
 
(BTW, if you're a new Mac user and you do this, you probably want to set New Window Default to Home Directory or something similar. Unfortunately you can't make a smart folder a default.)
 
See also:

[1] BTW, if you use the titlebar spotlight search and mouse over a result, you get a preview. You don't see filename or path though. If you hold the command key down, you will first see filename below the preview, then, after a second or two, it will alternate with path name.

[2] Here's what a gsheet content looks like in textwrangler (GUIDs truncated for security reasons)

{"url": "https://docs.google.com/spreadsheet/ccc?key=0AtgMeRwpi&usp=docslist_api", "resource_id": "spreadsheet:0AtgMec"}

[3] I'm guessing Google Drive installation tells OS X what Spotlight Kinds to associate with these file extensions.

[4] BTW, you can use Google Drive to convert Microsoft file types to Google formats.

[5] OS X Mountain Lion: Change the icon of a file or folder. Don't try to copy the preview icon, copy the wee icon at top of get info.

[6] It is a "Canned Search" Kind, not a "Saved Search" -- and it's a System File.

[7] Get Info shows the native search language version. Here's what I got when I added kinds without quotes:

(true) && ((((kMDItemContentTypeTree = public.content) || (kMDItemKind = "com.microsoft.*"cdw) || ((kMDItemKind = "Google*"cdw) && (kMDItemKind = "Spreadsheet*"cdw)) || ((kMDItemKind = "Google*"cdw) && (kMDItemKind = "document*"cdw)) || ((kMDItemKind = "Google*"cdw) && (kMDItemKind = "drawing*"cdw)))))

Here's the better results with quotes:

(true) && ((((kMDItemContentTypeTree = public.content) || (kMDItemKind = "com.microsoft.*"cdw) || (kMDItemKind = "Google Spreadsheet"cdw) || (kMDItemKind = "Google document"cdw) || (kMDItemKind = "Google drawing"cdw))))

[8] I'm not sure if this is new with Mountain Lion, but it looks like display of custom icons in the Finder Sidebar is a known issue.

Monday, September 30, 2013

Micro-Frameworks for web app development

A developer colleague (M.A) sent me a brief list of micro-frameworks organized by language. His list is in the same vein as Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit but quite a bit shorter.

For my own future reference, here's his list organized by server-side language
  • Java – Spark or perhaps something old fashion like Tomcat or Spring MVC in Tomcat
  • Groovy – Grails or Ratpack
  • Javascript – node.js or Meteor
  • Ruby – Sinatra
  • PHP – PHP
  • Python – Django or Bottle
For my own amusement (and perhaps my 14yo) I'd be inclined towards either Django (Python and packaged on DreamHost, my longtime hosting service) or Meteor (he likes).

PS. Clearly the world needs an AppleScript micro-framework. (ok, sick joke)

Saturday, September 28, 2013

The personal (corporate?) search tool I want

The modern publicly traded corporation is to data as water is to iron. Corrosive. There are reasons why this is getting worse - legal, regulatory, economic, political, technological. It's a long story, but trust me on the corrosion part.

Now if I kept all my data  on my personal dry dock workstation (we still have them) I could resist this, but there's power in sharing. So over time pieces of my extended (work) memory have fallen into abandoned repositories. Recently the number and complexity of these abandoned repositories ran past my cognitive limits.

In the long run part of the the solution is a corrosion resistant knowledge repository, but in the short run I need a way to track and search my archives and working repositories. I need an integrated personal search tool for pulling in data from a variety of server based search APIs. [4].

I haven't seen a tool like this and I can't be the only one who needs one; there's probably a (very) wee market here [1]. At least 10 people. Worldwide.

It's not too hard to imagine how it might work as a web app:

Search

There's a search box, a drop down with "All" or single target searches. Send (?Customized) strings to APIs of various repositories like SharePoint_1, SharePoint_2, Yammer, XWiki, Confluence, Rally, JIRA and so on. Get results back, convert to a normal form, display in a grid.

On the other hand, a web page of links to the various search engines would be better than nothing, and an embedded set of search forms would be quite good esp. with a little javascript to copy a string from one field to every search string.

So what I need is an environment that lets me start with a simple web page of links, then add embedded forms, and gradually build more capability over time. A kind of hobby project I can work on when I'm stalled on my real work and need something to that's plausibly work related.

Maybe Meteor ... 

[1] Before Google there were tools like this for the public net, but post-Google those have been relegated to (mostly) failed meta-search engine projects like dogpile, search.com, and, arguably, duck duck go. I haven't found tools that work inside corporate firewalls.

[4] My personal custom search engine fills a similar role for the Google-accessible net.

See also

Tuesday, September 24, 2013

App.net: Supporting account substreams with PourOver

[This one's for @duerig.]

The earliest mention of "channels" in my web archives dates to 1996 [1]. There's not much more than a word about them, but I remember what I was thinking. There were a lot of things I wanted to share [2], but I didn't enjoy harming unwilling bystanders. I wanted broadcast channels (now we call them streams) that could be carved from my global shares [3].

The problem, of course, is that my interests are probably not your interests. Emily is my most faithful reader, but she skips my tech shares. On app.net some like my diverse shares, but others favor dialog and social chat. Political opinions? Religion? Right. Limited scope.

So, in the interests of minimizing collateral damage, like a political post appearing in a stream of iOS comments, I'd like an easy way to do streams off my shares.

Happily Pinboard, which I use as a micro-blogging platform publishing to @johngordon  (PourOver) and kateva.org/sh (IFTTT), supports those kinds of streams. Every tag has a feed, and when posting to Pinboard I can enter single character tags corresponding to streams. It's not the most elegant UI, but it works.

At the moment though all of my shares stream into one app.net channel (mixing metaphors there, but it kind of works). If my app.net account supported sub-channels/streams (I know that work is in progress, might be done) it seems like either PourOver and/or Pinboard stream-feeds would be a good step towards reducing drive-by share damage.

Update: app.net thread. Hope to see these pieces come together over the next few months.

- fn-

[1] My web "posts" from the early 90s are now embarrassing. The web was new then, even Alta Vista was years away. There was so much I couldn't imagine. More subtly, we live in the Randall Munroe web now. I know there are minds at play far beyond my own meager insights.
[2] Sharebot I am.
[3] In those days Global Shares were static web pages. I tried to generate things that were a cross between blog posts and Simplenote entries via FileMaker web page generation.

See also

Monday, September 23, 2013

Aperture's multi-project display and why you've never heard of it.

Since at least 2010 Aperture has been able to display multiple Projects side-by-side in a tabbed UI by option-click on Project name. I was amazed to learn about this a few weeks ago. Why isn't this prominently discussed in Aperture's manual or help file? Why, even after I showed it worked, is it so hard to find documentation?

I mean - this is big. I've been looking for it for years, missing iPhoto 9's easy ability to split and merge Projects and move images between them. Aperture's single project focus is my biggest complaint. At last I can move images between Projects ...

No. You can't. 

Which is probably why Apple has never documented this feature -- it's obviously only half-built. Rather than pull tabbed albums projects from the release Apple left them in, but removed documentation. Sad that in some fine Aperture updates since 2010 this feature was never completed.

Maybe in Aperture 4.

Saturday, September 21, 2013

Apple still has an express replacement service for iPhone: $187 for iPhone 4

Years ago I think I used Apple's 'express replacement service', probably for a 3G. Apple sent me a refurb, I returned my phone and used the refurb.

Turns out, the express replacement service is still around. Request the express replacement option for an out of warrantee service and you can swap your defective old iPhone for a refurb (with a fresh battery). In our case we have an iPhone 4 with a balky home button and another with a balky power button -- both with bad batteries. Good devices, but not much resale value. An Apple Store service swap would be great if one could be arranged, but an express replacement service would be a lot more convenient.

According to Apple's web site there's a $29 service fee, a $7 shipping fee, and device specific fees:

  • iPhone 4 or earlier: $150
  • iPhone 4s: $199
  • iPhone 5, 5c, 5s: $269

I don't know if the replacement phones are carrier locked, so there's a risk of sending in an unlocked phone and getting a carrier locked phone back. 

An eBay iPhone 5 seems to cost $200-$300 and is probably much lower quality than an Apple refurb, so $187 is pretty competitive.