lessthanuthink
lessthanuthink
cjoseph.com
48 posts
Hi, I’m Charles and I make iOS apps and bad jokes. Check out my music app, Picky!
Don't wanna be here? Send us removal request.
lessthanuthink · 4 years ago
Text
SwiftUI Jam
Last weekend was the first (and hopefully annual!) SwiftUI Jam, which I had a lot of fun taking part in. For a completely remote event I found it to have a surprisingly communal feel, with lots of great discussions and tips flowing through Discord all weekend.
My project for the jam was an app I brainstormed that same weekend with my wife, Emily, based on one of her ideas: a toddler book reading tracker. Most reading tracker apps aren’t designed for super short books that you’re reading over and over and over again, day after day, and we thought it would be fun to be able to see how our son’s interest in books develops over time. When we read to him, we’re reading between 5-20 books a day, and he often seems to go through phases of obsession with certain books (he’s now at the stage where he brings us the books we’re going to read) that might be fun to track & chart.
Another thing I liked about this idea was that I could see a clear path from a weekend’s work on a prototype to shipping a minimum viable product and future updates post-jam. Here’s what I wrote as a feature list at the start of the jam:
List of books with number of times read & date last read
Flow for adding a new book (stretch goal: isbn scanner and lookup)
Flow for marking a book as just read
Flow for marking a book as read with a past date
Stretch goal: an Apple Watch app, since I often don’t have my phone with me when reading to 👶.
I didn’t end up getting to any of my stretch goals, or the flow for adding past read dates, but I did get the other main features built and fully functioning, and had a lot of fun while working on them.
Some technical takeaways…
While I’ve now used SwiftUI for just about every new screen and UI component I built for Picky over the last six months, they were all embedded within UIKit view controllers and working with a pure SwiftUI app has a different feel to it, especially when it comes to data flow.
While you get some really nice out of the box functionality when using Core Data, it really is showing its Objective-C origins and just doesn’t feel right with Swift (especially optionals). I think I’m going to explore some options for how to more naturally integrate it with some sort of middle layer to hide some of the rough edges from my pretty SwiftUI code.
I barely scratched the surface of what it can do, but the ButtonStyle protocol is a really neat way to customize controls.
I didn’t end up having any time to play with animations but I saw a lot of really inspiring work from other folks taking part in the jam. Definitely making it a goal of mine to really put SwiftUI’s powerful animation potential to use.
If you’re curious my somewhat hacky code (remember, this was a project done in one weekend, primarily while 👶 was asleep) is here on GitHub.
Lastly, here are a few screenshots to give you an idea of where I ended up at the end of the weekend:
Tumblr media Tumblr media Tumblr media Tumblr media
3 notes · View notes
lessthanuthink · 4 years ago
Text
My favourite albums of 2020
I suppose it’s unnecessary to state that 2020 was a difficult, strange year… but it was. And despite gestures at everything… there was really good music. A lot of it. Here’s what resonated with me the most.
Wolf Parade - Thin Mind
Fiona Apple - Fetch The Boltcutters
Run The Jewels - RTJ4
Taylor Swift - Folklore
Central Park Season One, The Soundtrack - Song-tral Park
Puscifer - Existential Reckoning
Will Butler - Generations
Metric - Live at the Funhouse Vol. 4 - Nov 28 2019
Dirty Projectors - 5EPs
Nick Cave - Idiot Prayer (Alone at Alexandra Palace)
0 notes
lessthanuthink · 5 years ago
Text
My favourite albums of 2019
Well, here I am sharing some favourite albums in an incredibly untimely fashion, but a) I’m a big fan of music recommendations and b) I want to get this out of my drafts folder.
My top two picks are, far and away, the ones that stuck with me the most over the last year and change, for very different reasons.
Vampire Weekend’s eclectic, sprawling collection of songs feels very much like an artifact of 2019, tied to routines and places (like train rides to work) that feel very far away.
Whereas Operators’ second album not only comes across as an incredibly cohesive, thought-out work, but somehow feels both very much of the moment and yet also of the future (and getting more prophetic and prescient by the day).
Operators - Radiant Dawn
Vampire Weekend - Father of the Bride
Thom Yorke - Anima
Trent Reznor & Atticus Ross - Watchmen (Volumes 1-3)
Bon Iver - i,i
Flight of the Conchords - Live in London
The National - I Am Easy to Find
Wilco - Ode to Joy
The New Pornographers - In the Morse Code of Brake Lights
Charli XCX - Charli
0 notes
lessthanuthink · 6 years ago
Text
My favourite albums of 2018
Well, I like making these year-end album lists, and since we’re now just about halfway through 2019 this is probably as good a time as ever to share this one 😂. Here are the albums released in 2018 that I most enjoyed:
Metric - Art of Doubt
Neko Case - Hell-On
Dirty Projectors - Lamp Lit Prose
Chvrches - Love is Dead
Jeff Tweedy - WARM
Frontperson - Frontrunner
A Perfect Circle - Eat The Elephant
Janelle Monáe - Dirty Computer
Eleanor Friedberger - Rebound
Ariana Grande - Sweetener
0 notes
lessthanuthink · 7 years ago
Text
My favourite albums of 2017
2017 has come and gone, and with it a lot of great music. Here are my favourites of the last twelve months 🙂.
Feist – Pleasure
Wolf Parade – Cry Cry Cry
Alvvays – Antisocialites
Lorde – Melodrama
Dirty Projectors – Dirty Projectors
Arcade Fire – Everything Now
Spoon – Hot Thoughts
The National – Sleep Well Beast
Taylor Swift – Reputation
Amber Coffman – City of No Reply
0 notes
lessthanuthink · 8 years ago
Text
MediaPlayer enhancements in the iOS 10.3 beta
Every time a new iOS beta is released I immediately scour the developer documentation to see if anything new’s been added to the (mostly stagnant) MediaPlayer framework, which my app Picky revolves around. It’s so rare that non-trivial changes are made to it that I wrote about it the last time this happened, about a year ago.
I was genuinely surprised and elated to find that yesterday’s iOS 10.3 beta finally adds what looks like proper queuing functionality to MPMusicPlayerController and I excitedly tweeted about it. Scott Edwards asked if I could “explain why that’s important to a non programmer”, so I’m going to try to do that here.
Alternatives to Apple’s Music app (like Picky) need to be able to access and play the user’s iTunes library, unless they’re part of a streaming service (like Spotify) or providing their own syncing and library management and companion apps (quite the tall order). While developers can build incredibly advanced playback functionality with tools like AVFoundation, that’s only possible for an increasingly smaller subset of users’ libraries: only locally downloaded, non-DRMed content — nothing stored in the cloud and nothing downloaded from Apple Music. People are storing more and more of their music in the cloud and expect third-party apps to be able to keep up. Apple’s one mechanism for developers to do so is MPMusicPlayerController, which Allen Pike of Steamclock Software cleverly describes as “more like a set of levers with which you can poke the system Music app than an API for making music apps”.
Any improvement to a framework one of my apps is built on is appreciated, but especially so for the addition of a feature like queueing, which has been needed for a long time now. Now I do already support viewing and adding to the current song queue in Picky, but it wasn’t easy to get working and is limited by its reliance on workarounds that could potentially stop working in a future update. I’m looking forward to being able to migrate my code to something more flexible and future-proof.
I still need to spend some time really digging into the new APIs, but just seeing this framework under active development has me more optimistic for the future of music players on iOS.
0 notes
lessthanuthink · 8 years ago
Text
AirPods
I love the sound of my current headphones, but more and more I find myself frustrated with their cords and pining for a great wireless alternative. With the hype around AirPods reaching a fever pitch I decided to give them a try (despite hesitations about their potential sound quality and fit). Here are my impressions after spending two weeks with them:
First off, the pairing process is so seemless that I literally blinked and missed it. That W1 chipset really does work wonders, making it super simple to change devices from the standard audio route menu. I was impressed by their range, and while I did get some dropouts they were rare.
The charging case is brilliant, with magnets that pull the AirPods in in a really satisfyingly secure way. Battery life is excellent too — by naturally returning them to the case when I wasn’t using them I never ended up running them down, and I could go 2-3 work days before even needing to charge the case again. The whole experience around using these headphones is top-notch.
Even the sound quality was surprisingly great: clear and detailed, and far better than I’d expected. They stayed in my ears securely, though I always felt like they were slightly too loose, which may be why the bass was a little underwhelming (it improved when holding them in tighter).
But the bottom line is that after spending years using in-ear headphones I really need more sound isolation than the AirPods provide — which is none. I didn’t try them anywhere really loud, like on the subway or a plane, but when walking around outside (or just at the office) background noise was far too distracting. I think the AirPods are a really great product that are going to wow a lot of people, but I returned them last weekend… they’re just not quite right for me.
Luckily these aren’t the only headphones with that fancy W1 chip, and after experiencing its benefits first-hand I’m now very eagerly anticipating the BeatsX, which are due out next month. They may not be quite as slick, but I’m hoping the in-ear design will be a much better fit for me.
0 notes
lessthanuthink · 8 years ago
Text
My favourite albums of 2016
I know “ugh, 2016!” has been a pretty much ubiquitous thought lately, but despite everything I firmly believe that it was another great year for music. There are still a bunch of albums1 I’d like to check out, and others that I want to spend more time with, but here are my absolute favourites of the year as they stand today.
5. Basia Bulat – Good Advice Another very good album from one of my favourite singer/songwriters of the last few years — great songs and an incredible voice.
4. Frank Ocean – Blonde I’m really late to the Frank Ocean party, but Blonde is a striking, introspective album with great production.
3. Wilco – Schmilco Wilco is one of my very favourite bands and I think this is their best and most consistent album since A Ghost Is Born. Schmilco also works well as a quieter complement to last year’s noisy Star Wars.
2. Nick Cave & The Bad Seeds – Skeleton Tree Heartbreaking, beautiful music.
1. Operators – Blue Wave I’ve gone on and on about this band before, but Blue Wave really needs to be heard. The excellent production from Graham Walsh (who also contributed to great albums from Hannah Georgas and Preoccupations this year) really captures the band’s dancy, retro-futuristic sound. Their live shows keep getting better and better, with their headlining set at Camp Wavelength being their best yet and also the best show I saw all year. I continue to be blown away by this band and can’t wait to see what they do in 2017.
Including: Run The Jewels 3, The Dillinger Escape Plan’s Dissociation, and Sleigh Bells’ Jessica Rabbit. ↩
0 notes
lessthanuthink · 9 years ago
Text
Picky Refactoring Journal #0: Prelude
A little background for those who aren’t familiar with it: my app Picky is an alternative to the standard iOS Music player, and it’s where the vast majority of my time in Xcode is spent outside of my day job. I work on it (in some capacity) just about every week, and use it daily.
I first started working on Picky all the way back in January of 2011. Before Swift, before Auto Layout, before ARC: different times. It’s an app I’m immensely proud of, and I find it incredibly satisfying to ship new features (v2.10.1 was released last month) and make my customers happy. But its codebase is old and creaky, and after spending almost a year writing Swift full time I find it hard to motivate myself to go back to it.
So, in the spirit of Brent Simmons’ classic Vesper Sync Diary and my friend Curtis Herbert’s illuminating Slopes Diaries I’m going to challenge myself to keep a public record of a project of my own: a complete and total refactoring and rethinking of Picky’s codebase. It’s not just that I want to be writing Picky in Swift; I’d also like to adopt some of the more modern design patterns I’ve worked with over the last while, and I need a better foundation to build off of to add many of the new features I’ve been planning. Plus I’ll finally be able to justify putting out an update as version 3.0!
Writing about this publicly is committing myself to finally going ahead with the rewrite, and I’m hoping it’ll help keep me focused, let interested customers follow its progress, and maybe even spark a conversation or two (getting feedback on coding decisions is almost always useful, and something that’s a lot harder to come by when you’re not working on a team).
Next time: a 1400 line singleton and some short term decisions!
1 note · View note
lessthanuthink · 9 years ago
Text
Operators
I listen to a lot of music1. I go to a lot of live shows (over 30 last year, a new personal record!). And I try to keep my ears open to new artists and recommendations from friends2… but it’s been a long time since a band’s hooked me like Operators has.
Two summers ago I came across this post on Pitchfork, listened to True, and bought a ticket to see them at the Horseshoe, mostly based on how much of a fan I was of A Thing Called Divine Fits (also featuring Operators’ Dan Boeckner and Sam Brown). Despite only being familiar with about a third of their set (if that), I was absolutely blown away by the songs and the energy that the three-and-sometimes-four-piece filled the small club with (an onstage dance party even broke out).
That show kicked off an obsession. Since then I’ve seen the band every chance I’ve had. At the Danforth, opening for The New Pornographers. At the Garrison, at Adelaide Hall. My girlfriend and I even made plans to spend New Year’s in Montreal to see them one last time in 2015. I’ve watched just about every live session, listened to unreleased tracks like “I Die” over and over, and even tuned in to a live stream from Iceland during the middle of the day.
I think there are a few factors contributing to my Operators-mania. For one, they’re an absolutely first-class live act, and I’ve gotten to experience that firsthand several times now. And because until now they’d only released one EP (plus the excellent “Ecstasy In My House” single), that scarcity of material made me all the more eager for every new performance and tidbit of news. But mostly because they’re just that fucking great.
And now the album, Blue Wave, is finally here! And despite having built up so much anticipation and hype for it, somehow it’s managed to exceed my wildest expectations. The new songs are fantastic, and the older staples, like “Shape”, are somehow even better than before. The production and recording manages to recreate the band’s live sound, and then some! I wouldn’t have thought that Operators’ music could use some added saxophone, but wow, those sax parts are magic.
The bottom line: if you’re at all a fan of Wolf Parade, Handsome Furs, Divine Fits, synths, new wave, post-punk, or just great music you need to check out Operators. And in the meantime I’ll be listening to Blue Wave over and over, waiting for Dan, Devojka, Sam, and Dustin to come back to Toronto.
🎶😍🎶
Being able to listen to music and still concentrate on my work is one of the many things I love about software development! ↩
So much so that I’ve been working on an app to help keep track of new music I want to check out. More on that soon. ↩
0 notes
lessthanuthink · 9 years ago
Text
Apple Music APIs
I was just checking out the iOS 9.3 beta’s API diffs and was surprised to see some actual additions to the oft-neglected MediaPlayer framework (which apps like Picky are completely dependent on).
While it was previously possible to have an app play Apple Music that had been added to a user’s iCloud Music Library, these new enhancements should make it possible to also play songs that aren’t a part of their library ([MPMusicPlayerController setQueueWithStoreIDs:]) or add new music to their library ([MPMediaLibrary addItemWithProductID:completionHandler:]). Songs (already in the user’s library or not) can now even be added to a given MPMediaPlaylist (but full playlist creation and editing functionality is still absent).
While I’m still hoping for many, many more changes to MediaPlayer (here’s one, for example) these additions are promising. And while I’m not sure whether I’ll integrate any of these new capabilities into Picky, I’ve already got one other idea that could make good use of them…
0 notes
lessthanuthink · 10 years ago
Text
Converting to Swift
It took me a while, but I finally got around to learning Swift. While I was excited by its unveiling back during the 2014 WWDC keynote, and I immediately dug into Apple’s official book, until now I hadn’t really written any code or built anything with it. Swift seemed too in flux and unproven, and so I decided to wait.
As the language continued to mature, and more and more iOS development articles and code samples favoured Swift over Objective-C, I grew increasingly worried about missing out and being left behind. Discussions with other developers at the conferences I attended this year worked as little checkpoints for me to reflect on whether it made sense to jump in yet, and after CocoaLove I decided I should at least give Swift a proper try.
So a few weeks ago, with some extra time on my hands, I decided to convert an app I’d recently written to Swift. It’s not a super serious project (just a goofy little tvOS game), and it only contains around 15 classes, so it seemed like a good candidate (and a fun little challenge). It took just under six work days to do and, according to Git, totalled 2110 lines of code added and 2603 deleted.
I went through my code line by line, and whenever I’d find something I didn’t yet know how to do with Swift I’d stop to read up on it. I also found the raywenderlich.com Swift Style Guide to be really helpful, because I didn’t just want my app to compile, I wanted it to be put together with quality Swift code1.
It ended up being a great way for me to learn the language; I think if I had been working on a new project all the starting and stopping would’ve really messed with my momentum and made it hard to stay focused on the big picture. And now it’s finally happened: Objective-C looks kind of outdated to me. I’m itching to write something new in Swift; like the best kind of tool, it makes me want to build something with it.
I ended up switching a ton of instance variables to constants, and a singleton to an enum, among other Swifty changes. ↩
0 notes
lessthanuthink · 10 years ago
Text
Emoji Sort
Tumblr media
The game we’ve been working on for the new Apple TV at The Young Astronauts, Emoji Sort, is finally live on the App Store! It was a fun little side-project that we spent most of our September and October Fridays on, plus about a week of full-time work from myself leading up to our App Store submission on October 28th.
The app spent just over two weeks “in review” before we were rejected for our use of “poop emoji, which is not appropriate for the tvOS App Store”1. I submitted a formal appeal, and while they stood by their original verdict, the official response did include the line “thank you for arguing in favor of the poop emoji” 😂.
We ended up swapping out our liberal use of 💩s with 👻s, and now our game is finally available on the tvOS App Store! With all the extra time app review took we ended up finishing an iPad version as well, and I managed to convert the entire codebase to Swift too.
I found this project to be a really fun experiment: it was my first experience working with SpriteKit and tvOS, my first game since Word Fall (back in 2009!), and using the Siri Remote for motion controls was an interesting challenge. It was also nice to take a bit of a break from the app we’ve been working on all year (which is currently in beta).
Anyways, if you give our silly little game a try (it’s free!) let me know what you think 😜. Just search for “Emoji Sort” on your Apple TV, or open this link on your iPad.
I’d like to think that the App Store reviewers spent those two weeks in heated discussions over the merits of the poop emoji. ↩
0 notes
lessthanuthink · 10 years ago
Text
More Thoughts on CocoaLove
I spent last weekend (Canadian Thanksgiving!) at the second annual CocoaLove conference in Philadelphia. As great as my experience was last year, I was even more impressed this time around. Just about everything to do with the conference was better: the incredible badges, the socializing, Saturday night’s outing, and even the overall quality of the talks (and last year’s set the bar really high).
A year ago I wrote about how it was tough to push myself to be more outgoing, but the friendly atmosphere and sense of camaraderie was even stronger this time around, and I think that in the time since then (thanks in part to NSNorth and AltConf) I’ve gotten better at striking up conversations (and met and made more friends from this wonderful community), which left me less exhausted and more energized as I headed home.
As I tweeted from the airport, this year cemented CocoaLove as my very favourite conference (and that’s not a knock against the other great ones I’ve been lucky enough to attend). Kristina Sontag’s reply of “I knew last year I was coming back, this year I know I’m coming back as many years as I can” puts into words what I was (and probably many of the other attendees were) thinking.
The perspective I gained at last year’s CocoaLove was instrumental in making the decision to find a new job. While I haven’t come away from this year’s conference with a resolution quite that radical, I have decided to commit to some smaller goals for the next year. In the spirit of accountability, and since I was heavily inspired by the the excellent talks1, I’ve decided to share those goals here:
Try to avoid complaining and negativity on Twitter (and in general, really).
Make more time for my side projects (and actually build that time into my schedule).
Work with one or two other people on a side project (collaborating can be so rewarding, but I haven’t done that outside of work in a very long time).
Write more on my website (once a month, ideally).
Convince at least one friend to come down to the next CocoaLove with me. It really is something special.
I found the talks from Jaimee Newberry, Allen Pike, and Dave Wiskus to be especially inspiring. Every session was good, but I found theirs resonated the most with me (and with a conference like this I’d bet that this really varies from person to person). ↩
0 notes
lessthanuthink · 10 years ago
Text
Dark Cocoa: How to display an iOS share sheet with AirDrop as the only option
Last week I was working on a feature for a new app which involves sharing some data between two devices (encoded in a URL to link into the app on the receiver’s device) — with the catch being that the transfer has to happen over AirDrop (trust me, there’s a good reason for it). I eventually got an AirDrop-only share sheet working, but I thought it’d be fun (and hopefully interesting) to dig into the process I went through in figuring it out.
Now since Apple doesn’t provide a way to access AirDrop directly, I had to go through UIActivityViewController. My first thought was to use its excludedActivityTypes property and just load up an array with every activity type listed in UIActivity.h (other than AirDrop). That works great… except when you come to iOS 8’s third-party app extensions.
My next idea was to just put together a list of some of the more popular share extension identifiers and add those to the excludedActivityTypes array. This wouldn’t have been a great solution, as there would always be extensions slipping through (and it wouldn’t have worked at all, as it turns out). Though this line of thought did lead me to what I thought was a very clever idea…
I suspected (and a quick trip to the debugger verified that I was right) that UIActivityViewController was just checking each extension identifier against the excludedActivityTypes array — so what if I passed its setter a trick NSArray subclass which would have a containsObject: method that returned NO to any object other than UIActivityTypeAirDrop? This worked like a charm for hiding all of the system-provided sharing options, but despite the fact that the array was checked for each third-party share extension’s identifier, the results of that check were ignored. I was disappointed that I’d have to scrap what I thought was a clever and elegant solution.
Okay, so it was time to go deeper. I took a look at some iOS 8 runtime headers, subclassed UIActivityViewController, and started to play around with some private instance variables in the debugger… and _activityGroupListViewController proved to be the winner.
Its two arrays, _activityGroupViewControllers and _visibleActivityGroupViewControllers, when run on an AirDrop-capable device, contained an object of an interesting sounding class: SFAirDropActivityViewController. By removing any other view controllers from those arrays (and hiding their views) I was left with an AirDrop-exclusive share sheet. All that was left to do was alter that UIActivityGroupListViewController’s preferredContentSize and disable scrolling on its collection view and — ✨ta-da! ✨— a pretty straightforward way to AirDrop something.
Tumblr media
I’ve shared my complete solution on GitHub, but remember: these sorts of tricks should really be a last resort, and could potentially break with any system update — use them at your own risk.
0 notes
lessthanuthink · 10 years ago
Text
Moving On
After more than five years, today marks my last day at Kobo. To say that I’ve grown in my time here would be an understatement. When I stumbled on that Craigslist job posting I had been out of school for less than a year, with only six months of Objective-C and iPhone OS (as it was then called) experience under my belt, having just shipped my very first app. I feel like I was almost a different person back then.
I’m so fortunate to have had the opportunity to work with and learn from so many talented individuals, and to have made so many good friends here. I’ve learned so much about not just software development, but teamwork, copywriting, leadership, delegation, design, publishing, and self-confidence too. Kobo was my first real, career-y job, and so this is also really my first time leaving — which in itself has been another learning experience.
Tomorrow I start work on something brand new, and I’m incredibly excited. If it ends up being even half as rewarding an experience as Kobo was, I’ll be thrilled.
0 notes
lessthanuthink · 10 years ago
Text
My favourite albums of 2014
Following up on last year’s post, here are my very favourite albums of the year. 10. Divine Fits — Live at Third Man Records I may have listened to this live album more than Divine Fits’ debut. Great songs, great performances (including a really good Frank Ocean cover). 9. St. Vincent — St. Vincent This music sounds like it’s from the not-too-distant future. 8. Thom Yorke — Tomorrow’s Modern Boxes The release of this one was a nice surprise, and the music is great too: atmospheric and electronic. 7. Lykke Li — I Never Learn A great breakup record. 6. Tweedy — Sukierae I’m a big Wilco fan, but this the best collection of songs that Jeff Tweedy has put out in ten years. Just lovely. 5. Le Butcherettes — Cry is for the Flies Super catchy punk-rock with synthesizers. 4. The New Pornographers — Brill Bruisers Six albums in and this is pretty much exactly what you’d expect from The New Pornographers, but it stands up among their best. And Dan Bejar’s three songs on this album may be his finest with the band to date. 3. Antemasque — Antemasque They may never get together as The Mars Volta again, but Cedric Bixler-Zavala and Omar Rodríguez-López’s surprise reunion with this new band was the best music-related news of the year. 2. Run The Jewels — Run The Jewels 2 Even better than their great debut as a duo, RTJ2 is modern hip-hop at its best. And next year they’re remaking the entire album with cat sounds. 1. Spoon — They Want My Soul The best album yet from one of my favourite bands. The best.
1 note · View note