Swift Weekly – Issue 10 – The Swift Runtime (Part 8) – Switch Statement

I was thinking of writing an article this week about the switch statement but i almost fell asleep half way through the article. that’s super boring. to write it even! so I thought I’ll do something more exciting and that is looking at how theswitch statement and its complementary case statement works.

Click here to read the full article on Swift Weekly’s GitHub page…

iOS 8 Swift Programming Cookbook Videos, 50% off, only for 1 week

Hello interwebs,

I was informed today by O’Reilly that my title “iOS 8 Swift Programming Cookbook” videos is 50% off for a week

Here is a direct link to the video including the discount code

If you have no luck with the above link, just go to O’Reilly’s website and purchase the book with the discount code of VDWK

Ciao

Swift Weekly – Issue 05 – The Builder Pattern and Fluent Interface

A few weeks ago I started checking out some Wikipedia articles about various s/e design patterns and came across theBuilder pattern which is a Creational GoF pattern. Then as you know, I cannot just read one article in one sitting. I have to click every link that the article leads to, so I stumbled upon the article about Fluent Interfaces and I could then see the possibilities.

Note: Fluent Interfaces have nothing to do with IB or a visual interface that is displayed on the screen at all. Fluent interfaces are the way that we can write our software to ensure they are… well… fluent. Read on to understand how this works.

I don’t think fluent interfaces are the same as the builder pattern. I don’t really think fluent interface is actually a pattern at all. I believe that fluent interfaces are a concept, and a kick ass one at that. I think mixing fluent interfaces and the builder pattern will allos us to build Swift classes that are amazingly simple to use, instead of the classic OOP designs that we see on pretty much every Apple class these days. I wish Apple could read this article and (ehem), just update their iOS SDK classes for instance to use fluent interfaces and the builder pattern.

If you want to write your Swift apps in the most kick ass way, continue reading. I think this article will help you a lot not only in learning more about Swift, but also writing some really crazy code that will make your life and those around you much easier.

Click here to read the full article on GitHub.

Swift Weekly – Issue 04 – The Swift Runtime (Part 3) – Operators

I have always been interested in finding out how different compilers work with basic operators such as +, -, % and so on. This week on the train I was thinking that it would be nice if somebody could explore how Swift deals with operators so, long story short, I decided to do it myself.

In this edition of Swift Weekly, I will show you how the Swift compiler works deals with (system and your own) operators and how to use operators to ensure you get the maximum performance.

Note: in this edition of Swift Weekly, I’m going to change things a little bit and instead of building for the debug configuration, I am going to build for Release to ensure that the assembly code that we are going to analyze is as optimized as what you will get when you release the app for the App Store. Optimization is hence enabled and the assembly output is long. That means setting the Optimization Level in your build settings to Fastest, Smallest [-Os] to ensure you get the export GCC_OPTIMIZATION_LEVEL=s export when you build your project.

Note: to ensure that the assembly code which we will look at is clean and nice without too much unnecessary code, I will remove bits and pieces of it but will keep all the assembly code that is relevant.

Continue reading this article on Swift Weekly’s home page here.

Swift Weekly – Issue 03 – The Swift Runtime (Part 2) – Enumerations

This is the second article in the Swift Runtime series of the Swift Weekly. In this article, we will dig deeper into the Swift Runtime and how the compiler deals with producing code for enumerations. Saturday morning writings are always fun! Let’s get this show started.

If you are an Objective-C or Swift programmer and have not done any Assembly programming or are simply not concerned with the low-level details of this article, jump right into the Conclusion section at the end to get the juice of this article.

Continue reading this Swift Weekly issue on Github.

Swift Weekly – Issue 01 – Pointers

I have started working on a new project called Swift Weekly. The reasons behind this decision are plenty. I’ve noticed throughout years of publishing books that the best way to learn is to teach. In my quest to learn Swift better and better every day I have decided that I want to write about it. My son has recently been born so I am very busy at home too which means that I don’t have much time to write. So the weekly nature of Swift Weekly is perfect for me. Also, I believe in giving to the community so that is the third reason.

Swift Weekly issue 01 focuses on the niche subject of pointers in Swift. Swift Weekly is all hosted on GitHub and you can find it here:

Swift Weekly on GitHUb

Have a read through the first issue and see what you think. Ideas and suggestions are welcome. Also spread the word and share this with your Swift lover friends!

iOS 8 Swift Programming Cookbook

Hi lovely readers 🙂

My iOS 8 book is out and it is ALLLLL new, rewritten to use Swift with tons of new stuff in it.

Check it out, it is 50% off. Click here to go to O’Reilly’s website to purchase the book.

Also a surprise, I have also done a video course to teach you all about iOS 8 programming with Swift. THAT too is 50% off for a limited time. You can click here to get the videos.

Happy coding everyone