-
RegEx Knife 2.0.2 Released
RegEx Knife 2.0.2 is available in the App Store. This releases addresses some bugs, including a couple of crashing issues. It also introduces Dark Mode support.

-
MacScripter.net
I’m excited to announce that I have become the new host of the MacScripter.net discussion forum. MacScripter has been a long standing resource for information concerning macOS automation using technologies such as AppleScript, Automator, and JavaScript For Automation.
Ray Barber established the site many many years ago and has grown it to the point where it is today with almost 30,000 members and an archive of 175,000 posts. MacScripter is a core piece of the AppleScript and macOS automation landscape. Links to MacScripter articles appear almost everywhere macOS automation is discussed. This is all a testament to Ray’s vision in creating MacScripter.net and to his support of the site over the years. Ray has decided to step down and I’m really pleased to be able to provide the resources needed to keep MacScripter.net going in the future.
I sense we are at a point where automation of Apple products is seeing a resurgence. The release of Shortcuts in iOS 12 suggests that Apple has become serious about automation on its mobile devices. I feel this change will spur people to look for more opportunities to automate their Macs as well. All of this represents a great opportunity for MacScripter to grow and become relevant to a new audience.
MacScripter will remain more or less as it is. It will continue to be a place to discuss topics related to macOS and iOS automation in a technology and product agnostic environment.
-
2018 MacBook Pro?!?!
Over the years, I’ve been excited when the time came to replace my Mac laptop. There was a sense that the new laptop would be vastly better that the old one. New ports, more memory, faster, better display, better battery life. The pinnacle for me has been the 2012 MacBook Pro Retina that I’m about to replace. I splurged and maxed the thing out and it has been amazing.
This was the first SSD MacBook Pro, and its been a fabulous machine - apart from the difficulty of getting its battery replaced. Only now, 6 years later, it is starting to feel slow. 16GB of memory just does not cut it when running Slack or doing Swift development in Xcode. I also desperately want to run a 4/5K external monitor for my old man eyes.
I decided to pass on the 2017 MacBook Pros because of their 16GB memory limit. The keyboard issues that surfaced confirmed for me this was the right call.
I was going to go with a iMac Pro, but now the 2018 MacBook Pro has arrived and most of the concerns seem to have been addressed. But the keyboard - I tried one in the store yesterday and it sucks compared to the one on my 2012 machine. It is really awful to type on. How is this progress? I use my mac ~10h each day and typing comfort is huge. And then there is the loss of all the built in ports. I use the CF card reader regularly. Like everyone, I have a mountain of USA-A devices. Its a mess. The 2012 MacBook was thin enough for my needs. I want a flexible and capable machine, not a thinner machine.
I have to carry all kinds of crap around with me for my iPad Pro (keyboard, HDMI cables, card reader, etc) and it sucks (though I love the Apple Pencil). Forget one of these adapters and you are sunk. The thought of having to remember to carry all the different Mac adapters I may need with me is depressing. Sure, USB-C is the future, but its not compelling right now.
So here I am about to spend >CDN$6K on a machine that feels like a total compromise. I need the speed and the memory and the ability to drive a 5K monitor but almost everything else about it feels like a step backward.
Apple in 2018 is not delivering a compelling mac laptop in way it did 5 years ago.
And here’s another change. In the distant past, the price of “pro” Mac laptops always seemed to be about the same ~CDN$3K. Each time you got more, but the price stayed roughly the same. My 2012 MacBook was CDN$4K which I thought was extreme, but its lasted longer than any mac laptop I had before it. But recently, the prices have gone crazy. The 2TB, 32GB, i9 machine I’m considering is over CDN$6K! And all this for a machine that I’m not terribly excited to own.
Switching to Windows isn’t an option because my work is revolves around Apple, and I’m sure I would hate Windows, but looking over the fence at all the things happening in that hardware space, the MacBook Pro appears to be behind.
-
iPad Frustrations I
Over the weekend I played in a tennis tournament and used a GoPro to record the final match. I decided to edit the footage on my 12" iPad Pro.
Importing the footage from the GoPro was trivial using Apple’s Lightning SD Card Reader. iMovie on the iPad worked very well.
Problems started when it came time to share the finished movie with the other players. The result was over an hour and a half long, and weighed in at over 10GB when saved out as a 1080p movie. This is too large for my DropBox account and my iCloud account. What to do?
First idea: save it back to an SD card. Turns out you cannot do this.
Next idea: try and Air Drop the file to my Mac. Seemed to work but the resulting file was only a few hundred MB and would not open - sigh.
Next idea: save it to a USB memory stick. Can’t do this either even though I do have a lightning USB adapter.
In the end, I had to FTP the file (using Panic’s Transmit) from the iPad to my Mac. From there I could copy the file to a USB memory stick. Side note: When sharing a massive file like this, the iPad should not go to sleep in the middle and abort the share operation - it sucked having to baby sit the thing to keep it from going to sleep.
There is so much about the iPad that I really like. I take it with me almost everywhere. I pretty much live in Linea, OmniOutliner, Tweetbot, Slack, Mail and Safari. But when I try and do seemingly simple things with it I run aground, over and over again. iOS 11 is a huge improvement but it does not address this kind of issue.
-
Find My Apple Pencil, Part II
As a follow up to my We Need a Find My Apple Pencil Feature post, I’ve been experimenting with the Bluetooth Scanner apps in the app store.
I picked one of the free ones and found out an interesting thing.
Presumably to save energy, the Apple Pencil does not broadcast its existence unless it is physically moved. You have to touch or jostle it in order for it to be revealed by these scanner apps:

-
PEER
My new project has finally begun Beta testing. Its an iPhone/iPad app for neuroscientists doing research. The app uses a MUSE EEG headset to record brainwave data while the user plays simple games that create controlled stimuli. We are starting with a game called Oddball and have plans to implement a series of standard tests used in neuroscience research. Armed with this tool, and in collaboration with U.Vic., we hope to be able to collect normative data about a range of brain related conditions in the population.

-
RegEx Knife 2 Available in the App Store
I have updated my RegEx Knife iOS regular expression editing and testing utility so that it works on both the iPhone and the iPad. Check it out on the App Store!

This version of RegEx knife supports iOS 10 niceties like split-screen, hand off and more.
-
We Need a Find My Apple Pencil Feature
Hearing about the Find My AirPods feature Apple is introducing reminds me that we need the same thing for the Apple Pencil. I recently lost one and having some way of seeing if it was nearby would have been very helpful. Replacing the Apple Pencil was expensive and I find I’m constantly anxious that I’ll loose the thing when I’m away from my office with my iPad Pro.
-
Simple iPhone App Mockups
I’ve been looking for nice ways to present iPhone application mockups and today I came across these free attractive mockups on the UI8 site:

There are light (pictured) and dark versions available.
As you can see, there are several types of muckup offered ranging from 3 screens to 1 in various orientations.
##Example
Using the UI8 light mockup, I was able to create this image for my Tennis Cards application:

##How To
Here’s a short video demonstration of how my example image was created:
[embed]www.youtube.com/watch
-
2016 MacBook Pro's 16GB RAM Limit
A lot has been written about how Apple’s new MacBook Pro maxes out at 16GB of RAM. Some argue that 16GB is enough for almost anyone, and therefore it is not a real problem. I disagree.
Back when I bought my 2012 MacBook Pro Retina, I maxed out its memory and got 16GB RAM. This was a huge extravagance and at the time. It was hard to use more than 8-10GB of RAM. However, as the years passed, the macOS has used more resources and so has Xcode. Now, almost 5 years later, my machine fully utilizes that 16GB of RAM.

Given what these new machines cost, I expect to be using it for several years. I anticipate that 2-3 years from now, 16GB RAM is going to feel very cramped. At that point, the only option will be a new machine.
I’m torn. My current MacBook Pro Retina is the best Apple laptop I’ve ever owned. I like it a lot. I really want to move to a retina (5K) external monitor except that my current machine’s Thunderbolt 1 ports are unable to do this. The new MacBook Pro solves this problem, but the memory issue gives me pause. I may just have the battery replaced and sit on my hands for another year to see what happens.
-
Chromecast Followup
A follow up to my Powering Chromecast post
After a bit of a rough start I have to report that the Chromecast is getting a lot of use. My daughter uses it almost daily to play vlogs and other content from YouTube, and the other social media she follows. Its less useful for me, but I watch the odd TED talk and YouTube video on it. I also play WWDC talks on it while working on other things.
A feature which at first gave us trouble turns out to be really nice. When you begin playing content through the Chromecast, it forces the TV (a SONY LCD in my case) to switch input to the Chromecast saving a trip to the controls on the back of the TV. If only the Telus cable box would do the same thing.
-
iPad Pro & Apple Pencil for the non-artist
I have to say that I’m really liking the iPad Pro. Apart from times when I have to code and when I need Lightroom (Lightroom on the iPad is useless for the work I want to do), it is the machine I take with me in my backpack.
I like to make rough sketches of software UI ideas as I work. I’ve tried several styli over the years and never been totally happy. I have been using a 53 Pencil which I liked quite a lot, but then I got an Apple Pencil. Its clearly nicer and the closest yet to drawing in my paper journal. I’m no artist at all, but these tools let me quickly capture what I’m imagining as I work. As I get older, I find that getting ideas out of my head and capturing them in some form becomes more and more critical to my work process.

Drawing with the Apple Pencil is faster and more responsive, and while its not in evidence in this example, pressure sensitivity helps. However, I do miss the eraser on the 53 Pencil a lot.
I used to make these sketches in my paper journal (which I still carry with me) but being able to make a quick sketch like this and attach it to an item in my bug database is better.
Tools used:
-
Re: What if JavaScript had persistent globals?
In a recent piece on his blog Dave Winer imagines what might have been had his ideas for persistent global variables in his Frontier development environment been copied into JavaScript. I find this a fascinating thought. It could have radically changed the way the local web app development evolved.
For me, Frontier’s Object Database was the most compelling of all the things in Frontier. I never really go into the language or the outliner parts of his work, but the Object Database was clearly a good idea. So much so that I’ve been trying to figure out ways of incorporating it into AppleScript ever since. Products like ScriptBase tried, but none of us have been able to achieve the integration that Dave did.
The closest I came was with FaceSpan 5 where the entire UI and application were entries in a hierarchical object database, and event handling flowed up through the object tree from the source (e.g. a button) to the root (the application). Everything was mutable and persistent which made for a hugely powerful tool, much as Frontier had demonstrated many years before. Sadly, FaceSpan 5 was never finished.
-
Re: On Apps that Get Acquired
On his blog Innesential Brent Simmons makes some good points regarding the today’s announcement by Dropbox that it is returning some applications.
I’ll add that when deciding to use an application, you need to ask a few questions:
-
If the application is free, who is the real customer (probably not you)? For instance, Safari is core to Apple’s business because it makes Macs saleable, but Mailbox is not core to Dropbox.
-
How do the economics of the application work? Is the developer charging enough money to sustain themselves and have sufficient resources to improve the product over time?
-
How hard is it to transition your data to an alternative application should the one you are using be withdrawn?
-
Does the developer have a history you can look at (Omni: yes, Bare Bones Software: yes, Apple: yes, Google: yes). A developer’s past actions give good clues to what they may do in the future (e.g. Apple & Google have pulled beloved apps many times).
-
-
Powering Chromecast
We got a shiny new Google Chromecast yesterday. Physically, this is a beautifully designed device, save for one thing: its power source. The device is designed to hang off one of your TV’s HDMI ports, but you’ll soon discover that you need to provide power via a separate cable. The Chromecast box provides a wall wart and cable that plugs into the bottom of the Chromecast.
My heart sank. I only have one power outlet near the TV, and both plugs were already in use for the TV and cable box. I set about finding some sort of adapter that would give me more plugs.
But there is something cool about the Chromecast wall wart: the wall wart is actually a USB power adapter and the Chromecast power cable is actually a USB cable. If you have a powered USB port on your TV, you can plug the Chromcast’s power cord into it and power the Chromecast directly from your TV! I was saved as my SONY TV has a USB media port right next to the HDMI port I am using - problem solved, nicely hidden behind my TV.

I just have to sort out one problem: turning on the TV powers the USB port which powers the Chromecast, and the Chromecast forces the TV to switch to Chromecast’s HDMI port when it turns on - kind of irritating.
-
Robotron 2084
For personal reasons, I have not been particularly productive over the last couple of years. This has been deeply frustrating to me, and at the suggestion of my friend Matt Neuburg I have started a series of fun development projects. The idea being to build things that I never plan to sell. Along the way, break the “writers block” I have been experiencing and learn some new stuff.
One of these projects has been an implementation of the classic Robotron 2084 video game from the 1980s for the iPad. I spent a lot of time as a youth playing this game, along with another Williams classic: Stargate, in local arcades. We became so good that we could play for hours on a single quarter, despite the game being incredibly hard.
Game Controllers
One of the key elements of Robotron was its use of two joysticks. One joystick controlled movement while the other controlled firing. I needed an analog to this for the iPad. I wanted to get as close as I could to that experience with my version of the game. After a lot of hunting, I finally found JSController project through the wonderful Cocoa Controls web site.
Initially I had no intention of creating a Mac version of the game, but when SpriteKit appeared in iOS 7 and Mac OS X Mavericks I had the opportunity to create Mac and iPad versions of the game. For this to work, I needed to get physical joysticks. I had an old LogiTech “Dual Action” USB game controller, so I set about trying to get that working. Mavericks introduced GameController.framework, but sadly that framework does not work with legacy USB controllers so I ended up turning to Dave Dribin’s DDHidLib.
SpriteKit
When I began this project, we had iOS 6. I was hunting for a simple 2D graphics framework on which to build my game. Cocos2D for iPhone seemed like the most mature of the free offerings, but somehow its complexity kept me at bay. I did a few experiments with it, but in the end it didn’t take hold.
Time passed and with the release of iOS 7, Apple introduced SpriteKit. It took me a while to notice SpriteKit, but I finally began working with it, and was successful in bringing up a few quick proof-of-concept tests. SpriteKit had the advantage of supporting both iOS and Mac OS X (much as Cocos2D does), so the idea of creating a Mac version of my game began to work in my brain.
Its been many years since I’ve written a game, so I won’t pretend that I can judge game frameworks in any meaningful way. However, I must say that SpriteKit was perfect for what I was trying to do. Getting 2D sprites onto the screen, moving them around, and playing sounds is trivial. I was on my way.
Reconstructing an Old Game
It turns out that a lot of people have spent a lot of time trying to reconstruct the Robotron game logic. They have gone so far as decompiling the original ROM code hoping to figure out exactly why the various enemies move the way they do.
For my attempt, I downloaded a couple of videos of people playing the game from YouTube, and set about reconstructing the logic as best I could. This is tough because there is a lot going on in Robotron that appears to be fairly random, but there are patterns if you watch long enough. However, with the videos and my memories of playing the game, I was able to recreate the game logic for several of the enemies.
The web also provided a lot of resources for reconstructing the sprite images used in the game. I’m sure I’m breaking copyright rules by using this imagery, but since its a personal project I decided to go ahead anyway. For game sounds, I extracted audio from the YouTube videos I downloaded using iMovie and Audacity.

Conclusion
While the project is still very much a work in progress, it is playable through to level 5 and incredibly hard. Its fun, and I’ve learned a lot along the way. It has been nice to be able to create new code with relative ease after such a long time of feeling blocked.
Along the way, Ive discovered some non-obvious things about SpriteKit which I hope to write about in future blog posts.
I have to thank Matt again for encouraging me to move forward with projects like this. It has been a real help to me as I persevere with a difficult period in my life.
Download
If you want to give the game a go and you are handy with Xcode, you can download the source code for the game from GitHub:
-
My First iPhone App
Now that Script Debugger 5 has been released, and most of the fires have been put out, I am turning my attention to new projects. As part of this I have been doing a lot of reading and experimenting with Android and iOS development. I realize I’m late to the party with iOS/Android development, but Mac OS work has kept my busy.
I finally decided to get my feet out of the mud and build something useful. I chose as my first significant iPhone app a client for the Victoria Virtual Tennis Club. This is a PHP/MySQL based web site which I developed to help this organization host Tennis matches in the Victoria B.C. area.
Like most desktop developers moving to mobile, I’m struggling to keep things simple on iOS and adopt the UI idioms users have come to expect and understand. I’m sure I’ll find ways to simply this app after I’ve had time to play with it.
This is a standard master-detail app which lists a calendar of upcoming VVTC events:

Taping on an event in the master screen takes you to a detail screen where you can see event details, a list of participants and then sign up for the event if you want to.

Behind the scenes, this involved adding a simple REST service to the VVTC web site to get the current calendar information, and to request signup. This data is returned as a JSON structure.
I decided to avoid the various iOS REST frameworks I found, and simply roll my own since I only have two URLs (get calendar, request signup). This decision may haunt me in the future, but for now things are working and I can understand what’s going on. The new NSJSONSerialization class worked flawlessly with the data returned by PHP’s json_encode function. Dealing with dates was a bit of an issue, but I finally settled on the ISO 6801 date format and that problem was solved.
Going forward, I want to add a Month view that mimics Apple’s Calendar application using the Kal project as an alternative to the list view I currently have.
I want to give full credit to the following resources that made this whole exercise possible within the 2 days I gave myself:
-
Matt Neuburg’s new “Programming iOS 5” book. This book explained lots of things for me, but most importantly it allowed me to adopt ARC along with a lot of Objective-C 2 features in my iPhone app. After many years of doing manual memory management in Script Debugger, it took a lot to let go of the rains and trust this to the compiler. This exercise has kind of spoiled me for dealing with my old code.
I read the first edition of Matt’s book cover-to-cover a few years ago and that gave me my basic understanding of the iOS SDK. A lot has changed over the years, and the new version of the book was great at reacquainting me with the iOS SDK.
-
Erica Sadun’s “The iOS Developer’s Cookbook”. Lifting pieces of Erica’s code out of her examples saved me a bunch of time.
-
The QuickDialog project. I used this to build all the detail views in my app and it saved me a mountain of time.
-
There are many web sites offing directories of reusable iOS (and Mac OS) UI components, but I recently found Cocoa Controls. This site led me to stumble upon QuickDialog and a number of other useful things.
UPDATE: I am missing Cocoa Bindings under iOS. I know that iOS provides Key Value Observing, but Bindings are missing. How are others dealing with this omission?
-
-
Impression of the new Retina MacBook Pro
Marco Arment recently wrote a Retina MacBook Pro review (via Daring Fireball) which I found helpful in making my decision to purchase one of these machines for my development work.
I’ll add a few additional observations after having used my new machine for about a week:
-
It is fast! I’ve not had a desktop Mac for many years so I cannot compare this MacBook Pro to a Mac Pro or iMac, but this is the first time I’ve gotten a new Mac laptop that was dramatically faster than my previous machine. The combination of solid-state disk, lots of RAM and a fast CPU make the machine very responsive. Building my Script Debugger 5 product from scratch went from ~4m30s down to ~1m15s.
-
Like Marco, I’m running my display in scaled mode because the standard video mode does not provide enough space for my needs. In this mode, the GPU isn’t strong enough to keep up with some operations. Examples include swiping between spaces causes a noticeable lag and some scrolling operations are a little slow. But Xcode works just fine, as do all the other development tools I use.
-
iPhoto and iMovie are revelations. All my images look so much better on the retina display. I shoot a lot of images of sculptures and finally these images are starting to carry the same impact on the retina display as they do when printed. The awful flatness of older displays is gone. We are finally beginning to get back some of the power of slide film.
This change is more noticable on the retina MacBook Pro than it is on the retina iPad (which is very good). This may simply be a consequence of the MacBook’s display being bigger than the iPads.
-
You are going to use more disk space. For example, iPhoto and iMovie will generate higher fidelity thumbnail images which are going to take more space on your disk. If you have a large iPhoto library, this could mean a few more GB lost to thumbnails.
-
Surprisingly, Terminal really benefits from the retina display. Small font sizes are easily readable making it possible to show more lines and columns in a Terminal window.
-
If you like to rip CDs in iTunes, you’ll need to buy Apple’s external USB CD/DVD drive as the Remote CD/DVD drive sharing system does not allow this kind of operation (You also cannot use HandBrake to rip DVDs). I get the DVD limitation because DVDs are copy protected, but CDs are not and its a drag to buy yet another accessory (you will probably have already bought the Gigabit Ethernat to Thunderbolt adapter).
-
I have 50 year old eyes and eye strain seems to be reduced.
-
I’m waiting to see if this display improves my ability to catch errors when proof reading. In the past I found I have to print out my copy to properly proof read it. We’ll see if a higher quality display improves legibility and comprehension.
-
The machine runs much cooler than my old MacBook Pro. The silence of the thing is eery. I have to push the machine fairly hard (long Xcode compile) to get the fans to spin up.
-
The heartbeat pulsating light on the front edge of the body is gone. As a result, there is no visible clue when the lid is closed that the machine is sleeping vs powered down. The battery level indicator lights are also gone so you have to wake the machine to see where your battery is at.
-
Safari finally feels fast. I’ve always found Safari to be slow when loading PHP and Rails pages hosted on my own machine, but now it loads without any noticable delay.
Overall, I’m very happy with the machine.
New Machine: Mid-2012 2.7Ghz Core i7 Retina MacBook Pro, 8GB RAM
Old Machine: Mid-2010 2.66Ghz Core i7 MacBook Pro with Hi-Res Display, 8GB RAM
-
-
Blog Reorganization
With the release of Script Debugger 5 I am splitting my blog into two parts. Late Night Software announcements and Script Debugger related postings are available on a new blog hosted at www.latenightsw.com. All of my development and personal postings will remain here.
-
What is bad User Interface design?
-
My iPod Touch needs an FM radio
I really like my iPod touch. Its been so much nicer to use than my old hard disk based iPod that died more times than I care to remember. I never would have thought that video would matter to me on an iPod but it does. Email, Calendar and Contacts are huge for me. Web Surfing is nice too. And there are some 3rd party applications that I often use. But something important is missing: Radio.
I listen to CBC Radio (NPR’s rough equivalent here in Canada), and NPR stations coming across the border from Washington state when I’m at home or in the car. I want to be able to enjoy this material when I’m away from my home or car.
I’ve tried to live with the Podcasts that CBC and NPR produce and they go some distance to solving the problem, but in the end they are unsatisfying. I want to listen to what’s on these radio stations now.
I’m sure Apple’s marketing folks have made the calculation that things like compasses and better Exchange support are going to sell more units and they may be right. But so far nothing has tempted me to upgrade my 1st generation 32GB iPod touch. An FM receiver built into a iPod would make me look at dropping more money on a new iPod.
And before someone suggests a hardware add-on, I only want to carry on object in my backpack. And internet radio does not do it as I’m not near free WiFi often enough to make that work.
-
Sigh – MPAA Bans This Poster
I saw this post and it just makes you shake your head. Which of these two images is more frightening, and which one gets banned?
I think the “TAXI To The Dark Side” poster is a wonderful example of a good design.
-
Happy Canada Day!
I came across this on a sidewalk leading to someone’s house as I was returning home from a Canada Day celebration at the Provincial Legislature here in Victoria.
The song is, well, soppy, but you can’t be cynical all the time :)
subscribe via RSS
