Example of using extensions in Swift

Recently I needed a image in my iOS app that was oscillating. I ran into an example of Swift code that showed how to do it and it was actually quite easy to do (for the theory behind the formula see this). The code makes use of the ‘extension’ feature in Swift. This is a really cool feature in Swift. The feature allows you to extend the functionality of a class without having to extend the class (like you would do in Java for instance). For a basic example of the feature see this example.
In my example the feature is used to extend the functionality of the SKAction class, another cool thing in the iOS SpriteKit library. Continue reading

Posted in iOS, Swift | Tagged , | Leave a comment

Starting developing in Swift: Using GitLab with XCode

Xcode_iconAs showed in my previous post I have set up a GitLab account so I can host my Git repositories there. In this post I will show how you can combine XCode (v7.1) with GitFlow and GitLab. In fact I will end up to use both XCode (for programming) and the Terminal (for my GitFlow) but that is the same when I am developing Java. In that case I also prefer the prompt most of the time for my (basic) Git stuff.
Continue reading

Posted in Git, Swift, XCode | Tagged , , , | Leave a comment

Starting developing in Swift: setting up version control with GitLab

logo-gitlab
Now that I have received my grade for the second part of the Coursera iOS with Swift specialisation I decided it is time to get started to build my own app. The first thing to do (as a professional developer ;-)) is to configure my versioning control in XCode.
Since I have pretty good experiences with Git I decided to setup a GIT repository to use. Normally I would use GitHub for this but since I want to have a free private repository I decided to use GitLab. In the past I have setup my own server running GitLab CE but for now I stay with the free hosting on the Gitlab.com server. After creating an account and signing in into GitLab.com it is just running the commands as shown on the GitLab site when you create your first project. But before I do that I set up the SSH key on my MacBook first so I can use the SSH protocol with GitLab.
Continue reading

Posted in Git, Swift | Tagged , , | 2 Comments

Next step with Swift

downloadAs I said in my previous post I really like building some fun apps with Swift. I also mentioned that to gather a more fundamental understanding I subscribed to the Coursera specialization course ‘iOS App Development with Swift Specialization‘. I am currently working on the second course of the 4 in total. The quality of this second part of the course is much better than compared to the first one, which was a bit messy. In this part lots of things start to fall in place. I also worked my way through the first 30 examples of ‘Hacking with Swift‘ which is a nice add-on to the Coursera training. With these two resources plus lots of other sites (like this one which explains some of the basics very nicely) about Swift and iOS I hope I will be able to create my own app and make it available in the store somewhere next year, which of course you will read here if the time is there :-)

Posted in Swift | Tagged | Leave a comment

The first steps with Swift

downloadAs I posted before I am currently using my sparse spare time to learn more about Apple’s new program language: Swift. As I said I started by following the excellent examples of Paul Hudson on his site ‘Hacking with Swift‘. Last month I decided to add some more structure in my process of learning Swift and subscribed to the online course offered by the University of Toronto at Coursera. It consists of 3 modules of each around 5 weeks and an assignment. Last weekend I finished the first module with great success :-). Although I had to get used to the lectures in the beginning of the course they started to become better in the end and I really learned a lot of the assignment and peer assessments at the final stage of the first module. So I’ll keep continuing to work through the examples of Paul Hudson and parallel to that subscribe to the Swift specialisation of Coursera and earn the certificates of the Toronto University. Here is proof of the first module:
Coursera PMMDL9GTLS4Z
Of course the ultimate goal is the get some apps in the Apple Store so as soon as my first app is in the Apple Store I will post it here!

Posted in Swift | Tagged | 1 Comment

Hacking with Swift

downloadA few weeks ago I started to look into Swift, the (rather) new programming language of Apple to build OS X and iOS apps. I decided to look into something different from building (enterprise) systems with Java (although there is still lots to learn there about Java, the different frameworks and so on). Being using MacBooks and Apple’s gadgets for many years I thought this would be fun to do.
So then comes the question ‘where do I start?’. I looked into Apple’s documentation and some of the resources there. I am sure everything to know about the language is there but it isn’t a great or fun way to learn it. Luckily I ran into this site: https://www.hackingwithswift.com/ of Paul Hudson. I think this site is awesome and going through the hands-on tutorials is really a great way to learn more about Swift and its capabilities. Within a few sessions I was already creating my own game on my IPad! Perhaps not the most spectacular game but for a start it was fun to do (and I am finally able to show the result of my work to my 7 year old son and getting an enthusiastic response :-) ).

Posted in Swift | Tagged | 1 Comment

Adding a NAT to your AWS VPC

VPC-logoIn a previous post I described how to setup a VPC with both private and public subnets with AWS. In the post I showed a basic configuration in which we saw that the instances in the private subnet didn’t have internet access, which was necessary to run ‘yum update’, for instance. In this post I will show you one way to solve that by adding a NAT instance to your VPC and have your EC2 instances in the private subnet use that to access internet resources. Here is the diagram I used in the previous post:

vpc
Continue reading

Posted in AWS, Security | Tagged , ,

Setting up your own VPC with AWS

VPC-logoWhen you are using AWS resources like EC2 instances they will be assigned to a default VPC. However, by using AWS it is quite easy to setup your own VPC. In this post I describe how to setup a basic configuration. This is a setup in which we have a public subnet for our servers that have to be accessible from the outside world (DMZ) and we have a private subnet for our (EC2) servers that we would like to keep away from the outside world. However, to be able to access the internet from our private subnet we will setup a NAT instance, which I will show in a separate post. Continue reading

Posted in AWS, cloud | Tagged , , | 1 Comment

I am now an AWS Certified Developer

Developer-AssociateLately I have created several posts about different areas of what AWS offers. The reason behind these posts is that I was preparing myself for the exam ‘AWS Certified Developer-Associate’. Although I have been working with AWS for several years now I didn’t take the time to sit down and test my knowledge about it. The best way for me to learn something is to show others how it works, hence these AWS posts.
This morning I took the exam and passed it with a 78% score. So this one is in the pocket and I will start working on the next one on my list: ‘AWS Certified Solutions Architect‘. Now you know what posts you can expect the coming period :-)

Posted in AWS | Tagged

Getting started with AWS IAM

iam-logoRecently AWS announced that using IAM Roles with their EMR service will be mandatory as of June 30 this year. In this post I will show you how to setup the IAM basics when you are starting with AWS.
When you are starting from scratch with your new AWS account then you will see the following management console. Choose the option Identity and Access Management so we can get started creating users, roles, etc.:
Screenshot at May 09 10-49-43 Continue reading

Posted in AWS | Tagged , ,