My new Alexa skill to help you take a positive view on life
Amazon Echos are slowly taking over our house. We’re up to 3 now, and mainly use them for tasks like:
Controlling the TV/Amp/Sky/AppleTV/BluRay/FireTV via our Logitech Harmony
Adding items to our shopping list in Todoist
Listening to music (Spotify) and the radio (BBC streams)
Setting timers while cooking (so much more reliable than Siri)
Voice assistants are still a long way from being great general purpose helpers, but for a subset of well-defined tasks like these they are fantastic!
Developing Skills for Alexa
I’ve already built a Halesowen Town Alexa Skill (of course!), which was a great learning experience. I’m hosting the NodeJS code for the skill on AWS Lambda, and doing it this way makes it pretty easy to get something up and running.
I was looking to build another skill - to be honest mainly to get a free Alexa hoodie from Amazon for any new skills published in December :)
An aside: Social Media Negativity
Going on Social Media these days can be a pretty depressing experience.
I’ve just about given up on Facebook, and although I get lots of good stuff from Twitter, it can be a pretty negative place - especially when the current divisive political climate on both sides of the Atlantic is being discussed.
Just Say Yes!
I also find during the cold Northern winters it’s easy to get a bit down.
A few years ago I embarked on my "Something New Every Day" project. This was possibly (and surprisingly) one of the hardest things I’ve ever done, but the main upside was I tried really hard to say yes to anything anyone suggested to do - any way of ticking off another new thing for the day!
I wanted some way to recreate this positive experience, so hence I built a simple new Alexa Skill called "Miss Positive"
All the skill (she?) does is answer any question you ask with a randomly selected positive answer.
Technically this was very easy to do of course, especially using the pre-written template for a fact-based quiz, but actually I’m really happy with the result. If I’m wavering on whether I should do something, I ask Miss Positive and she puts me right!
If you want to give Miss Positive a try, follow the instructions at this page
If I'm starting a new iOS project, which language should I choose?
I’ve been crazy busy over the last few months - a good problem to have, but it means I’ve had no time to blog on here 🙁
I’ve been switching between loads of different technologies to build mobile apps during that time. I thought it might be interesting to share my experiences switching between Objective-C and Swift, and the pros and cons of each.
It’d been a while since I’d worked in Objective-C, but I took on a project for one of my clients to enhance and modernise a couple of their apps which hadn’t been touched in a while.
To be honest the original code was pretty awful - they’d been let down by some contractors in the past and it took me a while to get my head around how the app worked.
Objective-C is notorious ugly to look at, with all those square brackets in the method calling, but once you get used to it I find it pretty productive to use.
I think knowledge of iOS APIs is by far the most important thing when developing on iOS, not the particulars how to type the code to call the API methods required.
The biggest plus point for Objective-C is the speed and stability of Xcode and the compiler. After mostly doing Swift development in the last year or so, it was really nice to get fewer mysterious compiler problems.
I strongly suspect Apple still do most of their internal development using Objective-C, and until they move over wholesale to Swift there will be less internal pressure to improve Xcode to handle Swift more reliably.
The main downside was that more and more of the code examples out there on the web - especially for the more modern APIs - are now in Swift. Less opportunities for “Stack Overflow copy-and-paste” development 😊
Most of my own apps are written in Swift now, and I’ve been doing the usual summer updates to keep them up to date for iOS 11 - and this year also for the challenge of iPhone X and the notch.
I must admit I do like Swift, and in particular the way it forces you to think hard about nullability of objects. This enforced type safety can be a bit painful at times (all the “!” and “?”s) but I trulythink you end up with more reliable code in the end.
However, as I mentioned above, Xcode and the compiler are MUCH less reliable when using Swift. Quite often I’ve seen it do a poor job of recompiling changes, so you’re never 100% clear if you are seeing the latest code in the emulator. A restart of Xcode usually fixes it, but that’s a real productivity hit.
The Swift compiler is also feels noticeably slower than the Objective-C compiler. All those small delays soon add up.
Also Swift is still a bit of a moving target, and once again we have Swift 4 and changes to the language. These seem to be getting fewer over releases, but I really hope the language gets to some sort of stability soon.
So which language will I choose for new projects?
I think I’ll still choose Swift for any new projects when I have a choice. Apple have strongly signalled this is their preferred language going forward, and as a language I do prefer it to Objective-C.
However after a few months back using Objective-C, I’ve really enjoyed the stability and speed of the tools. Let’s hope the Swift tools can improve to a similar state soon.
Daily Optimiser is the first iOS app I ever wrote, and it’s been looking a little tired and out of date recently.
So last week I spent a few hours improving and modernising the UI, and I’m quite pleased with the results (there are some screenshots are at the end of the article).
I’ve tried to be more consistent and subtle with the use of font size and color to give the information a clear hierarchy.
What was more interesting was how much I’ve learnt in the last few years of doing iOS development. Looking back at the original code, it’s clear I was I had no clear idea how best to structure the code. I was also very inexperienced in autolayout, and used tables EVERYWHERE to build screens!
I’ve also made the app iOS11 only to take advantage of large titles in the UI, but from my analytics I can see hardly anyone is using the app any more, so it’s not going to aggravate a non-existent user base.
I must admit I don’t actually use Daily Optimiser, as I prefer Todoist over Reminders as my task organiser. However if you are looking for a simple app based around Calendars and Reminders to help you organise your day, why not give it a go?
Why I added an option to remove ads in 'Count The Days Left'
Following on from an earlier post about why I put ads in my Count the Days Left app,
I’ve now added an option to let users make an in-app purchase to remove those ads for a low, low price.
Why do this?
Two reasons really.
Clearly nobody likes ads, as they are very rarely relevant to what you are looking for. If you find them really irritating, you can now remove them.
Second reason is about money. It’s unlikely that I will earn £0.99 of ad revenue per user, especially as I’ve deliberately not put the ad in a
prominent place for taste reasons. If users do pay to remove the ads, it’ll be (slightly!) more profitable for me.
This approach also gives users the chance to say thanks if they like the app. Asking for money while giving something back somehow seems a nicer approach than using a “tip jar” I’ve tried before.
Live long and prosper
I was particularly pleased with my use of the 🖖 emoji in the in-app purchase screen.
Feel free to contact me via Twitter at @yeltzland if you have any thoughts on any of this.
Following Workflow's acquisition by Apple, my thoughts on where (I hope) they might be heading
As the whole iOS world knows, the excellent Workflow App was acquired by Apple last week.
IMHO Workflow is an essential part of using iOS productively, and I’ve already written a coupleof times about how I use it.
I’m hoping the acquisition won’t going to turn out badly (although history shows it’s a real possibility), and I’ve been thinking about what Apple’s plans may be - quite possibly wishful thinking.
Current situation with x-callback-url
Many of the automation features in Workflow depend on apps implementing the x-callback-url specification. This method, which piggybacks on the iOS URL Scheme is an elegant
hack to solve inter-app communication problems in a way that just aren’t possible using existing iOS extensions.
However, it’s unlikely Apple are happy with this as a long-term solution - in particular x-callback-url has no notion of security and can easily be abused.
Apple are already working towards allowing users to control apps without directly opening them up via Siri.
iOS 10 introduced Siri intents via SiriKit. This allows you to pass commands
in pre-defined intents to apps that support them, and allow those apps to response in a structured way.
Clearly this is similar in usage to those functions exposed via x-callback-url.
Apple’s usual deliberate progress means Siri intents are only available in a limited number of domains right now (including VoIP calling, Messaging, Payments, Photos, Workouts, Ride booking).
I’d be shocked if this list isn’t greatly expanded in iOS 11. Hopefully we’ll find out more at WWDC 2017.
1. Workflows will be able to be triggered via Siri
This seems a no-brainer, and a great way of how the existing Workflow app could be greatly improved by being owned by Apple and having access to internal services.
Maybe even by iOS 11?
2. Apple will allow apps to add their own intents
This is definitely more speculative. Apple likes to tightly define what apps can and can’t do, so it feels too early for it to be opened up right now.
Also, for multi-language Siri support - something Apple does much better than Amazon right now - it’s clearly easier to support a smaller set of intents and gradually roll them out as the voice recognition models are trained.
However, if the intents were not just for voice, then there is less reason to restrict developers in this way. If an app could define its own intents for other apps to call them in a standard way, this could cause an explosion of automation opportunities.
I can’t see this happening in iOS 11, but would love to be proven wrong.
3. Workflow is transformed to be a “non-voice” way of calling intents
If apps could offer standard entry points as outlined above, then it would make sense that Workflow would switch to using them.
In fact if Workflow only supported calling intents (rather than x-callback-url entry points), that would be a strong incentive for app developers to switch to the “official” way of exposing entry points.
It also feels much more like an Apple way of doing automation.
I’m really hopeful the acquisition of Workflow was done to extend and improve iOS automation, rather than just an acqui-hire of the founders.
If my predictions are correct, I think we’d have a powerful system to allow our apps to be automated, and an extensible system to write secure and powerful scripts to tie apps together (that is integrated with Siri).
I’d be very happy - and shocked 😊 - if any of this comes true.
Feel free to contact me via Twitter at @yeltzland if you have any thoughts on any of this.