Friday, January 4, 2019

Hey Siri, Where is My Car?

I spent the last 15 years looking for nails, because I am the hammer. - Merlin Mann
When iPhone disconnects from a Bluetooth connection with a car, it does a special step to mark the location as "Parked Car" in the Maps app. My 2004 Prius is too old to have Bluetooth connection, so I was wondering if I could replicate this feature. Answer? Not really.
I thought it would be awesome if I could get a little Bluetooth dongle that plugged into the car power port and said, "Hey, I'm a car!" That way anytime I turned on my car, the device would power up and BOOM I would have that functionality, but it doesn't seem like any such device exists.
Next step, can I write a Siri Shortcut that does this? Also, not really, but I gave it go. The main shortcut command, "Get Current Location" provides the address you are at, not the GPS coordinates. If you're in the middle of a parking lot it's just going to provide the address of the place you've parked at and additionally Shortcuts doesn't give you a way to set a marked location / drop a pin. So the best I can figure out is to write out the address into a Dictionary (JSON text file) on iCloud Drive. Then I need a second shortcut to read it and open it in Apple Maps. I also launch Apple Maps at the end of saving so you can manually drop a pin on the current location.

Sunday, December 30, 2018

Getting Capped

Isn’t that life bro? - Owen JJ Stone
I'm moving my iPhoto library to iCloud and it is a insanely massive amount of data that burst me right through the Xfinity cap which is extremely expensive in overages. Comcast probably wants to solve this through zero rating and they've set things up to give them extreme power in the upcoming streaming battles if they remain free from consumer protections.
I can choose between AT&T (U-Verse) and Comcast (Xfinity) for home broadband and there is no fiber running to my door so it's either ADSL or Cable modem. A few years ago, I gave up AT&T because ADSL has an upstream pretty much capped by the technical spec to be slow and I couldn't get past 1.5 mbps upstream which saturates in a moment running a couple of internet cameras. Once your upstream is totally used, the downstream is broken.
When I moved Mrs. off her old 1TB SSD into the new MacBook Air with 256GB, the cost calculation for the 700 GB Photo library was to put into iCloud for her. I had not consider this bandwidth math:
  • 700 GBs uploaded to iCloud from old laptop
  • 700 GBs downloaded from iCloud to the desktop computer with Drobo
  • 700 GBs uploaded from desktop to Backblaze backup
During this first upload process is when I learned that Xfinity has a 1TB monthly cap and then you pay overages. They do give you a warning the first 2 months you hit your cap, but after that, the charges are intense: $10 per 50GB. So for just my iCloud Photo Library it would cost me $200 in overages to go through that upload/download/upload process.
While Xfinity proudly says, "99% of our customers do not use 1 terabyte of data" - Xfinity is estimated to have 25 million internet customers, which means there are 250k customers (a quarter million) who are going over this cap. On my average month I am going between 600GB-800GB so I'm dancing under the cap as well and I suspect that is where most modern family households are that are jamming with a couple adults, young adults, and a lot of Netflix (YouTube).
There are two clear Comcast strategies here with the demise of net neutrality. Xfinity television (e.g. Comcast) is zero rated and doesn't count against the limit. The second is to get Netflix, Hulu, etc. to pay Comcast to have their service zero rated (not count towards this limit) because without a zero rating for streaming video, if you were watching 4K content on Netflix, you'd fly right past this and you'd be paying an extra $200 a month.
Anyway, I finished out the month at around 2TB *AND* I'm not even close to be done with the whole process. So to avoid overages I'm going to need to more aggressively manage and probably complete this whole process over the next... 6 months? Alternatively, I'll just take my server to Starbucks and do the sync there?

Thursday, December 20, 2018

Overcast, AudioBooks, Huffduffer, and Workflow

The best minds of my generation are thinking about how to make people click ads. - Jeff Hammerbacher
My preferred way of reading AudioBooks is to get the chapters loaded directly into Overcast so I can intersperse them with them with podcast episodes and so I can use Smart Speed and faster playback. It’s wonderful to finish up an episode of TWiT followed up by a chapter of Embassytown and so on.
You pay a subscription to Overcast so that you can upload your audio files to the Overcast servers and load your content from there. That is a fine way to do it. Castro actually supports side loading any audio files from your iCloud Drive, an even cooler feature, which I think will come next year in Overcast. But what to do for now?
There is this great, simple, free service called Huffduffer that lets you host your own Podcast RSS file where you an use a web form and fill in the title, audio location, and it will add it in. So I subscribe to that RSS in Overcast, upload my audiobook file to Dropbox, and then add the Dropbox public link to my Huffduffer. Even cooler, after Overcast downloads the audio file, I can delete it off my Dropbox account.
I was always a little annoyed and needing to get the link from Dropbox, and then use the Huffduffer web form to add it. On the iPhone, that is not always so easy and I wondered if I would be able to do it through a shortcut. The answer is yes, but it’s complicated.
Step 1: Getting the Dropbox URL is pretty easy. I mean, you share in Dropbox to Shortcuts and that activates the workflow. A little bit of replace to switch to the direct download URL and then I also regex out the filename so I can use that for a Episode Name suggestion.

Step 2: Storing the Huffduffer username and password I do a little tricky because I don’t want to store it directly in the workflow. So I think a decent little trick here is I store it in a dictionary file on iCloud Drive. It is pretty darn complicated to write the simple idea of, “if the file does not contain the username, then ask for it, otherwise use what’s in the file.”

Step 3: The Huffduffer login is easy, it just posts to a standard login form and gets back a session cookie. I don’t quite understand what is happening from sandboxing perspective but the workflow doesn’t get access to cookie that’s been set in Mobile Safari and the cookie doesn’t persist through multiple iterations of the workflow — but it does get sent in subsequent URL calls to Huffduffer.

Step 4: Sorry Huffduffer. On the form to add your article, there is a hidden randomly generated string called “csrf” which is probably something like “Client Side Reference” and I would guess is setup to make scripting harder. But in the modern world of scripts it’s really just an annoyance. Now getting with Shortcuts is a bit weird. When you “Get Contents of a URL” it basically gives you back the rendered page at RTF so you don’t have access to the hidden variable, but if you pipe that through “Make HTML from Rich Text” you get back to the original HTML of the page. From there a simple regex can pull the value out.

Step 5: Now the final step is just to execute the actual add form call with the form data and BOOM, magically the Dropbox URL (or any Web URL) has become a part of my Huffduffer account.

Epilogue: Shortcut development is painful. When trying to develop a little route (like getting the HTML) I have to setup a second shortcut with the small chunk of workflow and experiment. Once that is working I load the working test shortcut on my iPhone and re-implement it on my iPad because there is no way to copy-paste.
And then getting screenshots of the shortcuts if it is more than a single screen? I had to take multiple shots and then load them all into Pixelmator and crop and paste layers together. Not fun for anyone.

Tuesday, December 11, 2018

iPad Pro: The External Monitor Woes

I love The Count of Monte Cristo. It taught me it’s best to be patient and calculated about revenge. - Jean Grae
When the new iPad Pro was presented and it included support for an external 5K monitor I was excited, but the excited was misplaced or too early, because the current iOS 12 isn’t useful for me with an external display. It got me wondering what I really hoped for anyway.
I bought Mrs.Chaos a Satechi USB Type-C hub for her upcoming MacBook Air, but figured I could give it a go on the new iPad Pro and it’s as expected.
Satechi USB-C Slim V2
Split screen multi-tasking fails us. When you plug in an external display to the iPad, if you’re running an app full screen that supports it, it can display content on the second screen. This can be done really awesome by an app like Screens where you can remote connect to a multi-display Mac and have the two displays spread across your iPad monitor and external monitor.
I want to run the Apple TV app and display a show on the external display while doing other work on the iPad but it’s not quite what you’d hope. Whatever app is running on the left side of the split-screen is what gets to control the external display. So it is possible to put the TV app on the left and the app you’re working on on the right and get it to display. If the TV App is on the right side of the display? Not so much.
Issues with this function are many:
  • You lose a band of your screen to TV App that isn’t doing anything
  • It takes up on of the two spots — so you can’t run two other apps side beside
  • If you hit “home” or alt-tab to another app, your show stops
  • If the app doesn’t support split screen this won’t work (I’m looking at you Amazon Video)
  • If the app doesn’t support an external monitor this won’t work (I’m looking at you CBS and other tv network apps)
Also, connecting to an external 5K may actually not be possible in 2018. The iPad Pro supports 5K over USB Type-C, but the 5K monitor that Apple sells is a Thunderbolt monitor. If you connect it to your iPad over USB Type-C it will not display as 5K and I can’t seem to locate ANY external monitor that can do 5K over USB 3.1, so I guess will just have to wait.
The summary here is, like many things we take for granted on our laptop/desktops, using an external display with an iPad is harder than you’d expect, confusing, and you’re going to bump up against weird behavior a lot.

Friday, November 30, 2018

Charger Town

I do think as a species we are capable of sensing much more than we are capable of articulating. - Jony Ive
I'm looking to upgrade Mrs.Chaos' 2011 MacBook Pro and it turns out to be a lot more fun than I thought I was going to be. I mean, there are some easy solutions if I'm willing to spending exorbitantly, but trying to be cost efficient in the process makes makes me take a train to complication-ville.
The first part is that the family Apple Photos library is on her current MacBook Pro. It is 680GBs of photos locally stored on the 1TB SDD I bought aftermarket and installed. To upgrade the MacBook Air 2018 model to have enough storage would be the 1.5TB option fo an additional $1,200 which doubles the price of the computer. Fun times, right? Since that is the only major storage item on Mrs.Chaos' computer, I think the right solution is to move to iCloud Photos and pay for the 2TB family plan which costs $120/yr. So basically, we could store photos there for 10 years before it would be more cost effective to put in the larger drive, right? Right.
The next change is the entrance into the world of USB Type-C which is exciting in a different way. The first way it is exciting is charging. Mrs.Chaos has three key computing locations: (1) office desk, (2) bed, (3) backpack (e.g. on the go) and so I need to have a charger option in each of those locations and the bed and backpack require a 6' charging cord. Here is where it gets "fun" - to charge a laptop, both the charging "brick" and the charging cable need to be able to deliver enough power. I have a lot of USB-A chargers, but just connecting one of those to the laptop with a USB-A to USB-C cable is not going to charge the laptop. The Wire Cutter has a good summary of which cables they found where able to correctly negotiate laptop-level power requirements. There are basically four potential specs that a USB Type-C cable could have that needs to be negotiated:
  • USB 2.0 or USB 3.0/3.1 - this impacts data speed and what devices work. Most important display capabilities.
  • Thunderbolt 2 or Thunderbolt 3 - this impacts data speed and what devices work. Yeah, these cables may or may not support sending Thunderbolt across which also have impacts to display.
  • DisplayPort - I have quiet figured this out, because this will either be DisplayPort over USB or DisplayPort over Thunderbolt. I don't think there is a separate spec for the cable on this one - but there is for the monitor. It's important to know if the monitor is a Thunderbolt monitor or USB 3.1 monitor.
  • USB PowerDelivery (USB PD) - this is required to be able to send high amp/volt power through to charge a laptop device.
    Simple, right? Also, I need the bed and backpack cables to be six feet (6') in length, which impacts things, because distance matters in the cables ability to send high throughput data.
So I think what I ended up with here was the desk can use the three foot (3') USB-Type C cable that comes with the Mac and the other two should use Anker's Cable. Now note that those cables are USB 2.0 they don't have Thunderbolt or DisplayPort, so they won't be able to carry video. Also, if we ever got a USB3.0/Thunderbolt peripheral this cables wouldn't work there either. Awesome, right? I thought so too.
From a brick standpoint, same basic idea, is that it needs to be able to carry enough current and you can't just go with wattage, because there is a wattage/amperage math thing going on here. So to toss in the bag I think it's that long cable along with an Anker charger. For the desk it would be the short cable and this HyperJuice charging hub which has the bonus of also charging a phone/iPad from the USB-A port.
Almost done, right? One final trip into dongle-town since this laptop comes with only two Type-C she needs a way to get photos off the SD Card, connect to the Cricut over USB-A, and connect to an external display (to watch movies) over HDMI. Once again, Apple is pretty expensive to get the three dongles required for this, so instead I think this nice little Satechi hub will do it.
I gotta say, that was pretty stressful.

Friday, November 16, 2018

Getting the Sounds Going

Technology is anything that wasn’t around when you were born. - Alan Kay
For most people I receive a lot of iMessages from I've setup a custom text tone on their contact. I've got a couple new people I needed to give sounds and I wondered, can I do this entirely on the iPad? Well, probably not, but let's get started.
I was asked to get a sound for "Mr Krabs" - which I'll admit, I didn't know who that was, and also Kermit the Frog's "Hi Ho." First step is to find a YouTube clip of sounds and download it using one of the web-based download services. I have found the best way to do this is get the URL YouTube, paste it into a YouTube download site, get the URL of the converted MP3 and then paste that URL into GoodReader to download. Trying to download/export directly in Safari don't always work well for me. Once the file is in GoodReader, I can export to Files / iCloud Drive.
The next step is to trim down the portion of sound that I want. No problems here, import the file into a Hokusai project for audit editing on the iPad and export it back out as a new m4a file.
So close, but sadly, I couldn't make it any further than this as I ran into two things that were tricky on the device. The first seems really crazy to me - you have to change the extension from m4a to m4r, and you would think that should be easy except the Files App doesn't let you change extensions on files. Ha! I did reading and searching and nope. The one work around people have suggested is there are some apps which will let you clone the file into the App's storage, rename the file extension, and then export back into Files. But, I cheated, and just used Screens to connect to my Mac server and rename the extension.
The second one I sort of expected. There is no way to take that m4r file inside of Files and add it as a ringtone on the device which could be tied to a contact. I tried messaging it to myself and messaging around in files - but nothing work. So for that too, I had to turn back to my Mac. I use a cool program called "WALTR" that lets you drop files on the Mac and have them wireless transferred over to the iOS device using the Mac's iOS sync APIs (without doing an iTunes sync) - and that worked like a charm.
Soo booooya! I got two new ringtones.
Update: Well, I actually added the ringtones to my Phone and then realized they weren't on the iPad which can also receive messages and calls. When contacts sync through iCloud it doesn't sync the custom ringtone files. I guess it's possible if I had Apple Music paid where my music files are in the cloud maybe it would? Anyway, I just used WALTR to plop them onto the other device and I'm good. Also I need to keep a backup of all the m4r files in iCloud

Wednesday, November 14, 2018

It's Glorious: The iPad Pro 12.9"

Apple’s nickel and diming costs a quarter now. - Peter van Broekhoven
When the Modbook came out in 2008 I looked on enviously at the tablet I wanted, but this year's iPad Pro 12.9" is so much better. It's big, I mean BIG, but also way lighter than one would expect. I bought my iPad without the Pencil, but after using it for a couple of days, I made an emergency trip to the Apple Store to get a Pencil 2. I had the Pencil on my wishlist, but I couldn't wait until Christmas when there were low odds someone would even buy it for - so I just did it. Now my setup is complete with a cool cheap 3rd party cover (using magnets) and the canopy case with the Apple Keyboard. The setup is so good to work on, but the other thing that is great, is that it's easy to just kick back and read on the iPad without the keyboard around at all. It's usually just leaned up on my kitchen counter without the keyboard all day to take quick looks.
What is it like as a developer trying to use the iPad? Not good, I'm way more efficient using my computer for a bunch of different reasons. The biggest issue is that I'm a massive multi-tasker between - Chrome, Slack, AirMail, Coda, Screens, Prompt, etc. and context switching on the iPad is expensive. Apps frequently get "pushed" out of memory and reset or take way to long to swap to context.
Past that, there are a few things you just can't do. So a decent portion of my mojo is using Screens to connect to my Mac to do Xcode development or other more complicated stuff.
It's when the simple stuff can't be done that's infuriating. I was sent an online tutorial which is a website: a zip file of HTML, CSS, Images. I can get it unzipped, but there is no way to load that on the iPad.
The other challenge I've had is being the technical lead on a team of people. It would be unreasonable that all my problem-solving mojo would go into developing crazy iPad flows rather than tools that can be re-used by the rest of the team. So while I could probably start smacking together Scriptable/Pynthonista/etc workflows to get a lot of stuff done, that won't help anyone else.
I think the reason this is so fun is that there will be very few times in your life you can, as a technologist, experience a technology coming into being and the iPad is one of the those times. So it's fun to work at the edges of the possible.
The next computer iteration I want to happen is where my phone (or maybe even my watch!) is the computer. I get close to my keyboard, trackpad, and screen, and BOOM it all wirelessly connects to my computer core and runs it.