5 Steps To Effectively To Debug Software Problems

A key skill in being a good developer is the ability to effectively debug software problems. Your skill at debugging improves with experience. When I think back to the start of my career as a developer I sucked at debugging. Over time I have built up a number of strategies to get to the bottom of a problem and fix quickly and efficiently.

Read more

How To Add A Gradient Background In Swift

If you try and add a gradient background in Swift to a View  you will more than likely get this error: fatal error: array element cannot be bridged to Objective-C
I hit this problem trying to add a gradient background. My initial implementation of a gradient background looked like this:

Read more

How To Implement Two-way SSL in node.js

Recently I have had to work with SSL certificates a lot and have just finished adding a SSL certificate into Node.js. One of the services I am using requires two-way SSL I forgot how much I liked coding in Node.js, I haven’t got the opportunity to do it recently. I decided the learning would make a nice blog post…

Read more

Rocking the Singleton Pattern in Swift

UPDATE: KrakenDev published an updated Singleton pattern in Swift. Swift 1.2 gave us static class members which means we can amend our Singleton pattern be:

class Singleton {
    static let sharedInstance = Singleton();
    private init() {}
}

 

The Singleton Pattern is a common design pattern in software engineering.

The Singleton Pattern ensures, a class has only one instance, and provides a global point of access to it

The Singleton Pattern is useful when exactly object is needed. For example you may choose to implement a Logger as a Singleton to provide global access to a log.

Read more