Adding IPv6 support to VestaCP 0.9.8-19

The current release of VestaCP (which I use to host this site) doesn’t currently support IPv6. In this tutorial I will explain how I managed to make my server accept IPv6 connections with very little changes to the config files of my server, in a way that makes it very easy to undo the changes when VestaCP eventually supports IPv6 officially.

Grand Opening

After many months of sporadic work, and many delays, I am finally happy to declare my new homepage! This, which I proudly claim to be the best domain hack I could get with my own name, will be the home of my portfolio page, blog, and software for at least some years, as I have now secured the domain registration until past 2020.

Swift: Using Enums to Write Safer Code — Part Two

Continuing on the concept of safe code, and how we can use Swift enums to achieve that, in this blog post I will try to demonstrate an application of this concept coupled with a new feature of Swift 4, which allows the encoding and decoding of JSON objects with almost zero glue code – because let's be honest: we all hate writing glue code.

Swift: Using Enums to Write Safer Code

If you have been programming for a while, especially for iOS, you've probably built plenty of View Controllers. The joke goes that 'MVC' actually stands for "Massive View Controllers". The reason is that it is very easy to just put a lot of code inside view controllers, making them absolutely humongous.

I will not teach you how to fix that now, because that's especially tricky, but I'm going to give you a short hint that might help you make that whole mess a lot more reliable.

Swift: Coding with Options?!??

Swift utilizes a concept borrowed from type theory called "Option type". What it means is that a variable of a certain type can be also declared to be "optional". In other words, it may have a value set to it, or maybe not. The program will have to check this every time it tries to read the value of this variable.

"But why do you need this??" you might ask. Well, that's a long story. So let's get straight to it:

A little bit of history

The year was 1965. A computer scientist, Tony Hoare, was working with colleague Niklaus Wirth on designing a new programming language: Algol W. It was based on (and intended to replace) Algol 60, a successful programming language introduced in 1958 and later updated in 1960. Algol W was designed to include many advanced features such as debugging, profiling, and typed pointers (all three new concepts, and extremely innovative at the time). However, one thing was missing…

MyToDo, a Basic iOS App Tutorial in Swift 3

In this tutorial we will cover the implementation of a basic iOS App in Swift that allows us to keep a to-do list.

The tutorial will cover the following areas:

  1. Setting up an iOS App project in Xcode
  2. Building a simple UI structure using Interface Builder
  3. Creating a data model
  4. Connecting the data model to the UI using a View Controller
  5. Implementing serialization to achieve local persistence

This tutorial will only use built-in features of iOS, and so we won't use any third-party libraries. Those can be very useful, but my objective is to make this as simple as possible and without any dependencies. Even if you have never written any apps for iOS, you should be able to follow along. Also, I will assume you are interested in learning some small details regarding iOS and Swift, and will throw some trivia and explanations along the way.

So let's get started!

Faulty Comparison

Critics of strong encryption are everywhere, but mostly in government agencies and in ignorant facebook posts. They usually go something like this:

Traditional mail (post) has been accessible by law enforcement for centuries and no one bothered about privacy until now.

However, this is a faulty comparison.