Skip to main content

Pretty Good Hat

My Weekend Rabbit Hole: I Made an App

I work out several times a week, and log those workouts to Runkeeper (because data!). Lately I discovered a small bug in the iOS client, in which a previously set equipment type (treadmill) was persistently being sent with my workouts, even though it doesn’t make sense for the workout type (that is, not running). Thing is, the Runkeeper client does not any longer offer the option to set that equipment type for the workouts I’m doing — this is a nice simplification of the interface, but I can’t get rid of the existing flag for treadmill.

This started to nag at me. I’ve long thought about building a workflow to quickly log my sessions rather than tapping through the app, but never got around to seriously looking into it until now. From working with Slogger, I already have an application registered with the Runkeeper API and am reasonably familiar with working with it, but until this weekend had only done so using scripted curl commands. Works great, but does not hook into iOS very well. I could build an ssh command to execute a curl command from a remote server, and kick it off from workflow or maybe a drafts action; this would have taken me ten minutes, but would have felt kludgy.

So on Saturday morning I downloaded Xcode and looked up iOS development tutorials on iTunes U. And there went my weekend.

Approximately one million browser tabs full of google searches, errors and compiles later, I have this: a tiny app preprogrammed with my two regular workout types (strength training and spinning), an array of scheduled session times, both of which I can cycle through via a pair of buttons (starting with my default of 6:15am). I also have a few extra fields to log additional data about the workout. The auth field is for my app’s token, and allows me to change it if necessary. This is a really basic replacement for a more full featured OAuth workflow, and I’m in the process of figuring out how to move this over to a settings screen so it’s out of the way most of the time; for now it’s also a convenient place to output the result of my http request to the API: if after a submission I get a 201 there, then I know the request was completed successfully.

Oh my gosh, Internet, I made an app1! I have to say, that first time it ran approximately like something I intended it to be, I was thrilled, like over the moon that I made something with buttons I could push and interact with on my phone.

So what have I learned?

I learned how to make https requests to an API using Just; how to make buttons and UI elements and hook them to actions in my code; how to use cocoapods (minimally, anyway); how to break my project using source control in Xcode sufficiently to require bringing the whole thing back from Time Machine (thanks, Synology); and how to redraw my content as the keyboard is revealed and hidden.

What get better at, among other things: I have not successfully triggered an activity spinner while my API request goes though. Fortunately it doesn’t take too long, but I want to read up on the asynchronous dispatch or whatever thing. I also really don’t know much about the schemes, targets, and so on that make up a project structure. Should also probably brush up on that little source control issue, and make more sense of the MVC thing. But hey, not bad for a weekend project.

This was fun. I have something I will use almost every day, which does lots more than scratch my original small itch about submitting the wrong equipment type. And I have a much fuller view than I did, of this world of applications that are such a big part of my life. Cool. Maybe next weekend I’ll come up with another itch.


  1. Recent changes in the Apple Developer Program allow for deploying an app to a local device without going through the App Store and its processes and costs. ↩︎

Dark Skies Star Party

Autumn is a good season for night skies, here. It’s starting to dry off, so there’s less monsoon weather to chase us back indoors, and our Dark Sky City designation means there’s an attempt to keep city light from flooding out the stars. I signed up for a night sky photography workshop with Stan Honda, who is opening an exhibit at a community art center.

After a couple of hours of slideshow and demo of night sky techniques, we trooped outside and joined the nearby Dark Skies Star Party, an annual stargazing event aided by the likes of Lowell Observatory (Pluto, yo), the Naval Observatory and the university. We found a quiet stretch of paths and set up our tripods.

I started shooting with my old Pentax for the wider field of view its lenses give, but its low-light sensitivity just can’t compare to the Fuji, so I traded out quickly and spent the rest of the night experimenting with composition, ISOs, and exposure times. When I finally retreated, cold — I had forgotten my jacket in the warmish evening — I hoped I had a few keepers. With some adjusting in Lightroom, this is what I came up with.

lightbox2

One of the things that resonated most from Stan’s slideshow were the descriptions of the event of some photos, particularly an expedition to the near-Arctic to shoot a solar eclipse. He showed some photos of the lineup of viewers to the eclipse and I liked the story that the photo told, so I experimented with a few of my own in the same theme. This is of one of the telescope stations at the star party, with viewers coming and going in the dark, with their red-lensed flashlights, beneath the stars.

lightbox2

Looking back toward the main path from my spot in the fields, moon shining over us.


lightbox2 lightbox2


Stars over the San Francisco Peaks are really something. One more reason I’m happy and lucky to get to live where I do.

Slow, Small Data

Via this writeup in Fast Company, Dear Data is such a cool project. Giorgia Lupi and Stefanie Posavec are spending a year exchanging a postcard per week, in which they each draw a representation of a specific behavior or facet of their lives. The front side of the postcard is the drawing itself, and the back side describes how to read the visualization.

Both images by Giorgia Lupi from “Week 38: A Week of Negative Thoughts

One of the things that really makes me love this is the intentionality and immediacy of it. I used Reporter for several months, but fell away from it; it started to feel like something that would add value someday, but in an undefined way that didn’t keep me with it. By contrast, Stefanie and Giorgia are deciding on something very particular, measuring it and then drawing it all within about a week. Unlike so much “big data” they aren’t looking for a long-term pattern or a huge number of observations. Their illustrations are colorful and capture sparks of their personality while describing whatever they chose to measure; and the differences between their drawings are a reminder of the many ways to tell a story with a common theme.

How Invisible, Inc. Gets It Right

This analysis by Robert Yang hits so much of what makes Invisible, Inc. a great stealth game.

You can always lose more. Unlike every other stealth game, slow and patient observation usually means slowly suffocating death here.

Incapacitating many guards the first time is easy; but they wake up again! You have to carefully time using your stun guns because they recharge slowly over several turns. Likewise, taking enemies out for good is hard and expensive, because you may never again get more ammo for that gun (if you even have something that’s effective against their armor).

Because guards are rarely actually out of the game, every turn puts you in more danger of being overwhelmed, caught without the resources to get to your goal. It’s a constant struggle between pushing just a bit further and getting in way, way over your head.

Robert’s description of a perfectly-laid out plan foiled by one tiny unexpected detail is basically the game in a nutshell: Flashes of “I’m brilliant!” colliding with “OH NO!” and it’s a great, great time.

Apple Music, so Far

Looks like my pre-release Apple Music thoughts are mostly bust: No API so far, no good last.fm connection, no clear way to migrate existing playlists from other services such as Rdio.

And there’s more it doesn’t have, like any kind of coherent cross-device connectivity: No way to listen on the iPhone, then pick up the same playlist or album when I get home and open up my MacBook. The ‘Recently Played’ smart playlist occurred to me to be one way to get to this information, but it’s unreliable, usually omitting about seventy-five percent of the tracks I have listened to. This is honestly really puzzling, and frustrating, especially given Apple’s emphasis on hand-off between devices. Perhaps the recently played list only shows those tracks that are in my own, actual catalog? If so, I’m even more confused about how to think about “my” music versus the service’s catalog. It’s supposed to make that distinction irrelevant, but it seems to emphasize it in unpredictable places.

There are also some interface issues. This is a clicky, clicky application. (Rdio, which has become somewhat inscrutable sometimes, is so much cleaner.)

So why keep using it, when Rdio continues to behave the way I much prefer? Well, a couple of things: First, the curated playlists are good. They are well-titled, have useful descriptions, and the ones that show up in my 💓 “for you” section are a pretty good match for my tastes. This is in contrast to everything algorithmic that I’ve ever tried, which just never felt right to me. I have been enjoying listening to them a lot.

Capturing this discovery, on the other hand, is tricky: Whereas when I have a last.fm connection going, and can return to the day’s plays and easily flag something that I loved, with Apple Music, if I don’t capture that right in the moment, I’m much more likely to lose it.

Also, Siri integration is slick. I mean, really cool. Driving in the car, I can just tell my phone to play me an album or a song, or a playlist. This has made impulse listening so easy and fun. And when my son requests his current favorite song from the backseat, I can just tell Siri to play it, no fumbling through playlists and menus to get to it. (On the other hand, he will quickly understand that I can no longer use “Dad’s driving, son, I can’t find ‘Fireproof’ for you right now.”)

Finally, I really like the unification of my own library with the Apple Music catalog. While I continue to share the feeling that it’s often unclear what the status of my own music is 1, it’s great to be able to can mix something from my home catalog with a playlist from Apple Music when I’m out with my iPhone. Another benefit of this integration is that I’m listening to my own old playlists from iTunes once again. There are tracks there that I haven’t listened to in years, and my only excuse is that iTunes became such a bloated and byzantine mess that I tried as much as possible to avoid it. Now that they show up in Apple Music, I am really, truly enjoying them.

I think Apple has done something very smart with the long free trial of the service. If they iterate quickly on some of the interface details and expand on the cross-device support, during this time when they service is still free, I think they’ll have something competitive and compelling. I hope that they do, because there’s a lot here to like, but I’m not turning over my keys to Rdio just yet.

Oh, one more thing: I didn’t like the “play blah blah in Apple Music” cruft that the app adds to a URL that you share from it, so I made a quick and dirty Workflow share extension that copies a track, playlist, or album URL to the clipboard. Here it is.


  1. Is it in the cloud? Is it ‘matched’ or purchased, will I lose my canonical copy somehow? Is something happening with my metadata while I’m not looking? ↩︎

At Rock Paper Shotgun: The 50 Best PC RPGs

I love the big game lists that Rock Paper Shotgun puts together, and this massive list of RPGs is a fine example of the form. Baldur’s Gate II, FTL, Dungeon Master I mean Legend of Grimrock, Eye of the Beholder, Ultima VII, Pool of Radiance … the list goes on, with references to good contemporaries to the classics.