This morning I did a small presentation (around 40 minutes) about Swift at the bi-weekly tech breakfast we have at Axel Springer (to be more precise, it’s organized by Axel Springer IdeAS).
When I was asked to prepare something, I didn’t know where to start. I always dream of becoming a good speaker and doing presentations all over the world, but when it comes to real life, I have not much experience about speaking in public.
So when I had to decide a medium for the presentation, I opted for a Xcode Playground. I was always fascinated by how quick one could dive into the code and test new things with Playgrounds, I use them almost on a daily basis to check if something is possible or how some concept could be represented without adding real code to the project and waiting 15 minutes to compile (but that’s a topic for another post!).
The main problem is I didn’t have any idea of who I would have been talking to. I usually join another bi-weekly breakfast that is not tech-related, but closer to the product we’re working on, so I didn’t know how many developers would have been there, if any. A playground is a really nice way to present things, since the audience can ask questions and see them replied in real time, but if the same audience is composed of managers, QA people or designers, the effect is not the same.
The only thing I knew was I had to make a high-level presentation of Swift, and maybe show something like an Hello, world. That was amusing, since a Hello, world actually is a one-liner in Swift:
Nevertheless, I decided to open the playground exactly with that: a quote from Wikipedia
A “Hello, World!” program is a computer program that outputs “Hello, World!” (or some variant thereof) on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language.
And the one-liner above.
Then, I read this post explaining how to include HTML documentation into the playground (since Xcode 6.3 was still in beta and we didn’t install it on our work machines), and spent one evening or so creating 15 HTML files and 15 Swift code sections. Topics ranged from really basic (constants, variables, closures) to more advanced (function currying, custom operators) in a well-layouted way, in order for me to be able to cut at any point if I was taking too much time or if I saw the audience was getting really bored.
Then, Xcode 6.3 came out, and we quickly installed it on our machines to enjoy the dramatic improvements in the build times (spoiler: we didn’t see any). I had to apply some changes to the playground (ok, that’s a bit of an understatement. I had to convert all my nice HTML documentation to the new Playground format), but then I was ready to go!
Fast-forward to this morning, and to myself a bit nervous of how my performance would have been (would I feel thirsty at some point? Should I eat something before? I was maybe too nervous indeed).
There I am, sitting on the sofa with my notebook on my lap, beaming my playground to around 20 people (luckily most of them developers!).
The outcome: not bad at all!
Eventually I even ran out of the allotted 30 minutes and the guy having a presentation after me gave me his time to let me finish my presentation since all of the people were interested in the last topics (namely function currying and custom operators).
I was blown away by the feedback I got from these people.
Overall it was a nice experience for me and I’m really looking forward to having more speeches like this!
Here you find the link to the playground, if you’re interested in a high-level overview of the language and how it compares to the other major languages.