Tutorial: Writing your first iOS App

I’ve finished working through this excellent introduction to writing iOS apps. Having written step-by-step guides for developers learning new software myself, it’s clear just how much work has gone into this guide to make it accurate as well as useful and informative.

  • Having never used Xcode before, the guide did a good job of introducing the development environment and showing the workflow and how to manipulate the various views
  • The FoodTracker application itself covers quite a few techniques – it’s a shame that some of the early lessons are later deleted as the app is built, but it’s a trade-off to get something to run quickly
  • The frameworks clearly do much of the heavy-lifting. This reminds me of writing user interfaces in versions of Visual Basic – you didn’t need to know much of VB as a language, it was more about leveraging the tools to get a result
  • Swift is very concise, parameter syntax takes some getting used to (some parameters have both external and internal names, which is esoteric) but even the passing parameters by name is starting to grow on me.
  • It’s very cool that unit testing is integrated in the dev tools – I’m sure I’ll be writing plenty of tests against my data model when I work on this for real.

I have a couple of ideas for apps that I’d like to write for my new Apple Watch, so next I’m looking to try a tutorial specifically for a Watch app.

Leave a comment

Filed under Programming, Swift

Book Review: The Scarecrow, Michael Connelly

The Scarecrow, Michael ConnellyJack McEvoy is a crime journalist whose position has been put at risk – meaning he has only two weeks left in the job. As well as handing over to a younger, cheaper journalist, he decides to go all out to write a final, brilliant story to show his employer what they’re missing. And perhaps he’ll be able to finish his first novel too.

Rather than a newspaper story, McEvoy uncovers a serial killer. He hooks up with Agent Rachel Walling of the FBI in order to investigate. Now, Walling has also appeared in other Connelly books with Harry Bosch – e.g. Echo Park. I love it when authors recycle characters across stories, Jeffrey Deaver does similar tricks.

The investigation focusses on a web hosting firm with a highly secure data centre. The description of “The Farm” (the grid of machines hosting sites) is quite interesting, although it’s a shame that the technicians are so stereotyped (not everyone that works with computer hardware is a long-haired hacker!).

It’s a pretty good story – hard not to have sympathy with McEvoy (who’s ex-wife is quite successful whilst he’s left jobless with few prospects), and there are sufficient twists to keep one’s interest.
Four stars

Leave a comment

Filed under Book Review

MIT develops file system with data guaranteed

Wired reports that MIT have used formal verification to write a file system that to probably will not lose data in the event of a crash. 

Making sure that the file system can recover from a crash at any point is tricky because there are so many different places that you could crash. You literally have to consider every instruction or every disk operation

They used Coq, a proof assistant that enabled them to build the system from the ground up in a logically consistent manner. 

Leave a comment

Filed under Programming

Book Review: Protect & Defend, Vince Flynn

Protect and Defend, FlynnAfter the first Vince Flynn thriller that I read, my mind was made up not to read any more. However, my Dad recommended this one and I’m glad I persevered. This book features Mitch Rapp as a more established character. Where the earlier book sees him as a maverick agent, he’s now a senior figure, friend of the President and sage adviser on Middle Eastern affairs. Ok, so this is somewhat stretching believability, but it does make for an entertaining book!

What set this plot aside was that the storyline in Iran and ensuing political fallout was as intriguing as the action scenes where Rapp continues to be a master of his trade.
Four stars

Leave a comment

Filed under Book Review

Video: Animations

I was interested to see how animations are executed for Apple Watch apps.  These videos shed some light on it: WWDC 2015 Apple Developer Videos.  I watched:

  • Layout and animation techniques for WatchKit
  • Designing with Animation

It seems that a lot of the animations are ‘tricks’ achieved by tweaking the layout groups (either changing size, alignment or visibility).  Other recommendations include writing skeleton apps to mock animations by switching between images put together in KeyNote – this enables choosing between competing ideas without taking the time to code them all individually.

Leave a comment

Filed under Programming, Video

Programming is…

Bruce Dawson described programming as follows:

When I’m describing what I do for a living to non-programmers I sometimes say that I solve puzzles. I solve fascinating puzzles that are different every day, and there’s no answer key, and very often nobody else knows the solution. Whether it’s figuring out why code is slow, or why it is crashing, or how to make code simpler and better, it’s all puzzles, and I love it.

I think that’s a useful point of view.  Whilst programmers need knowledge of some particular programming language and platform, it’s often the ability to solve puzzles that makes the star programmers stand out from the rest.  An average programmer will often make a meal out of a simple task (whether it’s development or testing) because they can’t see an elegant way to a solution.  The best programmers just get on with delivering quality, testing solutions without making a fuss – and they’re having a great time doing what they love!

Leave a comment

Filed under Musing, Programming

Book Review: The Devil’s Star, Jo Nesbo

The Devil's StarThis is another Harry Hole thriller from Jo Nesbo. There’s a clear chronological order to the books in this series – this one is the fifth and comes after his partner Ellen has been murdered. Harry is pitched against his nemesis Tom Waaler in an investigation into another serial killer.

As well as the excitement of the plot, Nesbo graphically depicts Harry’s fall into alcoholism as it threatens to destroy his relationship with Raquel and his career. The good news, though, is that this book isn’t as grisly as some of his other works.
Four stars

Leave a comment

Filed under Book Review

Video: Introducing WatchKit OS2

Catching up with this Intro to WatchKit OS2.  I found the following points interesting:

  • ClockKit has templates for watch kit complications, matching the different shapes and sizes available on the various watch faces
  • Complications should be immediately up to date when viewed, so watch kit allows you to bulk upload e.g. a timeline for a calendar widget that changes during the day.
  • Watch connectivity allows data sharing between phone and watch
  • CoreMotion, CoreLocation, MapKit and HealthKit APIs are available on the Watch

Leave a comment

Filed under Swift, Video

Video: Designing for Apple Watch

I watched this excellent video about Designing for Apple Watch from WWDC.  Some interesting take-aways:

  • Interaction with the watch is expected to be 5 seconds.  Any longer, you should steer the user towards the iPhone (e.g. via hand-off).
  • Notifications on the watch are much more noticeable, so should be kept to a minimum
  • The force-touch provides a context-sensitive menu whichever screen the user is on.  Although it’s less discoverable, it avoids the need for multiple swipes to reach an action screen.
  • The watch has a bezel!  But it’s only visible if your app doesn’t have a black background.  Interestingly, one of their recommend Apps, Toby (a cute dog) has a blue background that breaks Apple’s own guidelines.
  • Their are guidelines for the haptic/auditory feedback for events such as Notification, Up, Down, Success, Failure, Retry, Start, Stop, Click.  For consistency, Apple need *every* developer to use the right effect with the right event – otherwise, users won’t intuitively know the meaning across different App contexts.
  • The click event is interesting – it gives granularity to adjustments, but could easily be over-played – so it’s recommend to exercise restraint.
  • There are templates for glances – and they should “deep link” to the main App for more information.  Again, consistency of layout between the glances for different Apps is important to the continuity of experience for users.
  • Sessions are available for longer interaction with a watch app, intended for fitness apps (e.g. a period in the gym). Yet again, it’s easy to see App developers over-using this feature to avoid the watch returning to the time screen.

Much relies on Apple policing these guidelines, which could be a lot of work.

Leave a comment

Filed under Swift

Swift: Tutorial

swiftHaving recently purchased an Apple Watch, I’ve decided to learn Swift so that I can write a couple of Apps. So far, I’ve been very impressed with the language.

Here’s the link to the tutorial.

However, I’m completely bemused by the rules for named parameters. Unlike in F#, which optionally supports named parameters in calls to function if you want to use them, Swift 2.0 enforces that you must use them (except where you mustn’t, like the first parameter in the call). Seriously? I understand that, for functions with multiple parameters of the same type, it can be helpful to name the parameters – but making that a requirement on every call will seriously reduce productivity.  And what about refactoring – if I change the name of a parameter, will I have to change its name at all call sites as well?

Leave a comment

Filed under Swift