swift

There’s a buzz in the air… or is it on your arm?

Can you feel it yet?

Apple Watch

This is a guest post by Boisy Pitre, Mobile Visionary and lead iOS developer at Affectiva. You can find him on Twitter here, and see his previous guest posts here.


It is the imminent release of Apple’s latest gadget-wonder… the long awaited Apple Watch. Announced last year, the wearable device is due to hit stores in a few months; its launch, sale price, and subsequent success or failure is the basis for immense speculation in and around the techno news websites and journals.

Last Fall’s announcement of the eagerly anticipated watch was true to Apple’s style of introducing something new: bold yet gentle, glamorous yet modest, confident yet demure. Touted as something truly personal to the wearer, the Apple Watch wooed and wowed the event’s audience and the wider general public. It was easy to see that this wasn’t just another technology device trying to act like a watch, but perhaps the very redefinition of the watch itself.

Predictably, it didn’t take long after the announcement for the questions to follow. How briskly will it sell? Who will buy it? And who wears a watch anymore?

What’s Old is New Again

The concept of wearable devices isn’t necessarily new; it’s been around for some time and has existed in various incarnations. Thinking back 15 years ago, I can distinctly remember attending PalmSource (yes, I’m talking about the Palm Pilot for those of you who can remember) in 2000, and witnessing an attendee walking around the show floor with Palm devices strapped to his forearms. It was reminiscent of Locutus of Borg in an episode of Star Trek: The Next Generation.

Thankfully, we’ve come a bit farther in style today. From arm bands with iPods to smartwatches like the Pebble and offerings from Samsung, you don’t have to look like a cyborg to have technology up close and personal to your body. And all indications are that with its myriad of colors, band styles, and body types, the Apple Watch will be as much of a fashion statement as a technology wearable.

Of course, as developers we are the spark and fuel that moves the pistons of Apple’s engines. Seeking new opportunities and pathways for our work is a constant motivation. So what does the Apple Watch mean for the developer?

A Totally New Platform

Just like the iPhone spurred the creation of the amazing “app economy” in 2008 with the release of the native iPhone SDK, the debut of the Apple Watch brings a whole new set of creative potential to the table. Although it has some utility on its own as a timepiece, where the Apple Watch really shines is its integration with the iPhone itself. The Apple Watch is really complete when it can pair up with an iPhone. The iPhone acts as a deliverer of both content and apps to the watch via Bluetooth. In essence, your Apple Watch becomes an extensible and conveniently accessible accessory to your iPhone.

This means if you have an iOS app already written, you can extend it to bring its functionality to the Apple Watch (assuming that there is some aspect of your app that makes sense appearing on someone’s wrist). Your iPhone is the “carrier” of the smarts that your Apple Watch will use; and in doing so, you have whole new ways to extend the usefulness of your iOS apps.

Think Different

A watch is not a phone, and a phone is not a watch. We carry our phones in our pockets and on our hips, but our watches adorn our wrists. As something that you will wear on your arm, the Apple Watch becomes a very convenient, immediate, and intimate place to view and interact with data. It opens up a whole new world of ideas for apps.

Not only is the Apple Watch as a platform more physically accessible, but its screen is considerably smaller in size than any previous iOS device. Given that the largest Apple Watch is 42mm tall (the other option is an even smaller 38mm in height), you have to carefully think about your app idea, and how it will “fit” onto such a targeted space.

The smaller design space of the Apple Watch, along with the intimacy and complete accessibility that it offers, is certain to inspire creative app extensions. It’s going to be interesting to see where developers will lay stake in this brave new world.

And It Will Get Better

Like all technology, the Apple Watch is bound to get “smarter” over subsequent revisions and generations. The perceived limitation of its tethering to the iPhone will become less and less pronounced, eventually to the point where Apple Watch may become a truly stand-alone, Dick Tracy type futuristic device. Think full audio and video interaction… a complete communications experience right on your wrist.

Challenges certainly remain to get there. Increased processing horsepower and capacity required to drive more features will require more battery life, and that will challenge Apple in interesting ways. There’s not a lot of room to put larger and larger batteries on your wrist.

Are You Ready?

Wearables are about to get a lot more popular, and the apps that will empower them are going to be more and more in demand. If you’re an iOS developer with an existing app, I encourage you to look at how your app might be able to augment your user’s experience on their wrist with their Apple Watch. Not all apps may be able to find that crossover, but many will, and with it will come the opportunity for you to become more familiar and close to your users.


Swift London Are you interested in iOS development? Swift London is a group for iOS and OS X developers of all abilities who want to learn how to use it, who meet regularly at Skills Matter. You can join them for their next meetup on Tuesday 17 February – full details here.

The organisers of the Swift London Meetup group have also put together an impressive line-up for a two-day Swift Summit which is taking place in London on 21 & 22 March. The programme includes speakers such as Chris Eidhof, Daniel Steinberg & Ayaka Nonaka. See the full agenda here.

What is our community expecting for 2015?

2015 is well and truly upon us, and it came along quick! After a busy, event-filled but ultimately fun 2014, we asked a range of experts from across the Skills Matter community what their predictions are for the year ahead. From social networks to BDD, here’s what they thought…


Cate Huston

Social Networks: Cate Huston

“These are less predictions and more hopes.

There’s some great insight in Coder’s at Work from Douglas Crockford where he talks about the social systems that existed around timesharing and how those went away when we moved to the “personal” computer. But social is normal – to be human is to be social – so I’d like to see social networking move away from contrived ideas of what social is, and more to enabling normal, human, social, interaction.

I think we will see fewer new social networks and more integrations and innovations on top of existing ones. See the way that Discourse is doing logging in as an example, they accept almost anything. It’s kind of ridiculous that so many people are building their own versions of identity. Android has had intents for a long time, but the advent of extensions in iOS 8 is a good sign for this.

The other thing I’d like to see is social networks taking harassment seriously. In 2014 we saw some truly appalling treatment of women online, taking place on social networks. Death threats, rape threats, revenge porn… I’d like to think by the end of 2015 we’ll have found better ways to balance freedom of speech and the freedom to threaten and harass.”

Cate Huston is a developer and entrepreneur focused on mobile. She’s lived and worked in the UK, Australia, Canada, China and the United States, as an engineer at Google, an Extreme Blue intern at IBM, and a ski instructor. Cate speaks internationally on mobile development and her writing has been published on sites as varied as Lifehacker, The Eloquent Woman and Model View Culture. She blogs at Accidentally in Code and is @catehstn on Twitter.


Daniel Steinberg

iOS Development: Daniel Steinberg

“At the end of 2014 developers had to decide whether to transition to Swift or to adopt the new techniques and APIs introduced in iOS 8. Apple will certainly give us more widgets, services, and APIs to play with in June, but I think this year will be about exploring what it means to write idiomatic code in Swift. This is a year where we’ll figure out the design patterns and best practices for coding in Swift. This will also be the year where Apple revises the language and the libraries to work more naturally together.”

Daniel Steinberg has been writing and teaching about programming the iPad and iPhone since the SDK’s first appeared in beta and Mac OS X for many years before. He has presented at Apple’s Worldwide Developer Conference, MacWorld, MacHack, CocoaConf, and other Mac and iOS developer conferences. Daniel also teaches the iOS 8 development and Swift Kickstart: Introducing the programming language and platform fundamentals course at Skills Matter.


christina ohanian

BDD: Christina Ohanian

“Behaviour Driven Development (BDD) isn’t a new concept in the software development industry, but it certainly has come a long way since the early days. BDD has proven (certainly for me) that behaviours and examples are very useful and powerful conversation starters to describe and talk about how our solutions should be experienced by people. It allows development teams the chance to discover ways to build (and test) their systems, collaboratively, with the ultimate outcome that we have built the right solution for our users where the system behaves as it should.

However, it hasn’t all been plain sailing. BDD has suffered from a number of misconceptions throughout the last few years, and I feel it is starting to lose its core meaning and purpose. One pertinent example is something I witness a lot: an unfortunate misunderstanding that confuses the practice of BDD with the practice of automating tests. The two are very different and distinct, and their role should be regarded as complementary – if practiced correctly. This topic has been at the core of many recent conversations. I hear the following questions often: what do we mean when we say BDD? How does it relate to test automation? Hang on – I thought BDD was just another way of writing test scripts? These are questions, which if interpreted incorrectly, can lead to harmful misconceptions. Ironically, they have the potential to lead, ultimately, to the very thing BDD was created to avoid – too much emphasis on the right way to build, instead of actually building the right thing for users.

My prediction for 2015, or perhaps my aspiration for the year ahead, is that we need to look at how we tackle this misconception, so we can get back to the essence of what BDD is. This is critical, as we continuously grow in today’s digital world: a world where new behaviours are created at light speed, shaped by powerful forces like mobile.

So bring on 2015, and let’s get back to the fundamentals of good BDD practice.”

Christina Ohanian is a member of the team at The App Business heading up the Quality Assurance team, where she manages and coaches a talented and motivated group of mobile testers. You can find her on Twitter, check out her website, or see her talk at the upcoming London Tester Gathering Workshops in June.


Evelina Gabasova

Machine Learning: Evelina Gabasova

“I think that machine learning and data science in general will become even more pervasive than it is now, and the area of its applications will grow even further. For example, I?m a big fan of emerging data-driven journalism or computational social science. Another trend which will get more important over the next year is making machine learning easier to apply and accessible to non-experts. Unfortunately, applying machine learning to data is still far from straightforward. Typically there are many steps we need to take before we can even start playing with clever machine learning algorithms ? like sourcing and pre-processing data. I love how in F#, data can effectively become a part of the programming language itself and make this part of the process much more fun.”

Evelina Gabasova is a PhD student in statistical genomics at Cambridge University in the MRC Biostatistics Unit. You can find her on Twitter, check out her blog, or see her talk at this years F# eXchange where she will be discussing how she uses F# for data processing in her research.

A Look at Swift: Strings and Things

boisy-pitre-swift-guest-post

This is a guest post by Boisy Pitre, Mobile Visionary and lead iOS developer at Affectiva. Here he talks to us about string manipulation and interpolation, the simplicity of Swift and the power of Apple’s compilers – and how with Swift, less is more.

This is a follow-up post to Boisy’s While It’s Compiling interview from iOSCon 2014, which you can read here.


One of the very cool things about Swift is probably the most mundane: string manipulation and interpolation. The fact that as a developer, we can juggle using strings as naturally as numeric types is a huge deal. In this article, I’ll show you just why this is important, and how it can be not only a time saver, but a bug saver too.

Back In My Day…

Us “old timers” love to start out telling stories with that phrase. In this case, “back in my day” is not that long ago when we were (and still are in most cases) using Objective-C as our primary development language. Objective-C inherits a lot from C, and one of the things it tried to improve on was strings. If you’ve ever worked with C, you’ll remember the obtuse functions we had to use just to concatenate two strings:

char s[255];
strcpy(s, "This is a string. ");
char *p = strcat(s, "And this is another!");

No kidding. If this is foreign to you, then be thankful. Such code is fraught with potential security issues, not to mention the real possibility of outright crashes. Granted, functions like strncat and strncpy came along to limit the security risk by enforcing a maximum number of bytes to copy, but still remained unwieldy to use and slightly unnatural in appearance.

Objective-C did its best to make things better. Here’s the C code above, rewritten in the simplest Objective-C style:

NSString *s = @"This is a string. ";
NSString *p = [NSString stringWithFormat:@"%@ And this is another!", s];

… still not elegant, but fairly descriptive, and safe from the dangers of accessing memory in a more direct fashion in C. And by God, we loved it. And still do.

boisy-pitre-swift

Swift’s Response

If you think the above code is easy to understand, then you’ve probably seen it one thousand times over. If you think it’s way too complicated, then you’re probably right in line with the new crop of developers who have cut their teeth on scripting languages like Ruby and Python. No matter which camp you’re in, you have to appreciate the simplicity of this:

let s = "This is a string. "
let p = s + " And this is another!"

Come on. This is just too easy, isn’t it? That’s all it takes to add two strings in Swift. I have to tell you, when you come from the old way, it almost feels like cheating. Deep down, you don’t trust the compiler and think all of this pretty, sugary stuff is eating up tons of CPU cycles. Where are the good old “bare metal” programming days going to?

You can relax, because Apple’s compiler wizards have worked hard to optimize these statements under the covers. Just bask in the enjoyment of all that typing you’re going to save.

Format Specifiers… Ugh!

Another win that we get in Swift is with the printing of constants or variables. How many times in your code do you do this? A lot. And it’s a lot of typing… and tedious to boot. Here’s a simple contrived example:

int x = 42;
char *s = "life";
printf("The answer to %s is %d!\n", s, x);

Now multiply that times one hundred lines!

This has been the bane of C and Objective-C for a long time. Keeping track of what format specifiers to use for what types is a pain, but what’s even more of a pain is if you have a ton of them in one printf statement, and forget a couple, or worse, transpose the variables so that the types don’t match. Compilers got smarter over time and warned you of such transgressions, but what a time killer nonetheless.

C++ tried to get it right, and did a decent job, but it still didn’t have that “natural” syntax flavor:

cout << "The answer to " << s << " is " << x << "!\n";

Nice try, C++, but Swift cuts through this problem like a hot knife in butter:

let x = 42
let s = "life"
println("The answer to \(s) is \(x)!")

You may have to get used to typing a backslash followed by open and closing parentheses around your variable names, but this is clear and concise and has minimal chance of collision with your string characters.

Less is More

Strings are just one of many things that Apple has really made fun and easy to use in Swift. The theme of the language certainly seems to be “less is more.” Less typing and gaining more functionality. After all, computer languages are about us humans expressing ourselves more naturally in our work so that things can get done quicker.

If you haven’t started learning Swift yet, you should. If you have started, hold on to your bucket seats, because it’s going to be a wild but great ride!

This Week at Skills Matter: 21 – 25 July

swift-blog-postWe’re joined tonight for the first series of talks by the new Swift London user group, following on from their opening meeting a week ago. The group’s focus is on this brand new language from Apple, which is promising to make waves in the developer community.

We’ve also got some great talks on Big Data, App development, Code Golf and public speaking – check out all of our meetups below!


 Monday:

Join Swift London, with speakers Anthony Levings and Roger Domenech, for an evening all things Swift. Drawing on his own experiences, as well as common difficulties surfacing on Twitter, StackOverflow, and the like, Anthony will be giving a cautionary guided tour of optionals, passing closures, and other major new features of Swift.

Roger presents an introduction to Xcode’s Playground, with a practical focus on Scene Kit. A mixture of tool demonstration, basic Playground setup, Xcode integration, Scene Kit 3D object creation and custom shader use, with a little room for surprises (or Xcode crashes).

Tuesday:

Tuesday brings Pentaho London through our doors for a series of discussions on Pentaho, ETL and Big Data. Mark Melton begins the evening talking about visual map reduce with Pentaho and how this fits together with Yarn. Mark is followed by Diethard Steiner discussing Kimball-style data mart with PDI, Harris Ward on cool CTools plugins, Matt Casters on the latest and greatest cool big data POCs and Tom Barber looking at the possibilities that Apache OODT bring to BI.

Next up on Tuesday, the London Java Community will be speaking out with a workshop for public speaking in tech. Along with Richard Warburton and Martijn Verburg, find out how public speaking is a great opportunity for people to raise their professional profile and employment opportunities, and why it is also regularly identified as the activity which people fear the most.

Wednesday:

One of the biggest advantages of Julia is that it shares the strengths of both Matlab and Python, but it’s much quicker. There are a lot of exciting packages being built in Julia, and on Wednesday evening the London Julia Users Group and Samuel Colvin will demonstrate some of the best and give a short guide to creating your own ones. Samuel comes from an oil industry background where Matlab rules. Now he is a freelance developer, a Python user but also a Julia devotee.

Mean Stack are joined by three speakers, with Marek Karwowski telling us that good application development is all about making educated choices, and Martin Pomeroy & Paul Boon talking on Q&A Spot.

Thursday:

Rounding off the week of meetups for us, the F#unctional Londoners return to enjoy a pleasant round of Code Golf in F#. In this hands-on session, you’ll be having a game of Code Golf, where the objective is to complete your program in as few (key)strokes as possible.