As one of the most powerful features in Swift, Generics can be tricky. A lot of people have trouble understanding and using them, especially application developers. Generics are most suitable for libraries, frameworks, and SDKs. In this post, I’ll try something different than other tutorials. We’ll open a restaurant...
I was using Javascript and wasn’t happy with the language. Even if it has a lot of features and cool things, it’s not type-safe. This doesn’t feel right to me. In fact, I lost myself in the code a couple of months ago while trying to understand one undefined error. Javascript is a big world, and there are millions...
Vapor 2 is released 🚀🎉 This is a big breaking change, but a good one. We have a small server-side project which is developed with Vapor. When Vapor 2 was released, we directly took a look at what changed. We were a bit 😍 and a bit😩. Vapor 2 has fewer lines of code, the performance is better, and has a lot of new...
Apple’s Swift is becoming more and more popular amongst the developer community. Most of us already started adapting our projects to this folk. While adopting, we may not be as careful as we should be as Swift is a very flexible language, and it’s really easy to misuse it. Especially coming from an Objective-C...
TL;DR Swift accepts only one executable file for the app. We need to split the app and library to make it testable. Because testing requires a separate executable file. main.swift file is the main executable for app. LinuxMain.swift file is the main executable for tests. To split them, we’ll create two targets. One...
After deciding to join more conferences this year, the very first one was dotSwift. It was held in a great old theater in Paris. It was a half-day conference, but it was better than I guessed. There were good talks about backend development in Swift. After hearing a lot about that and the great performance of Swift,...
Let’s talk about Firebase a little bit first. On the Firebase website, it says, “Firebase gives you the tools and infrastructure you need to build better apps and grow successful businesses.”. It provides several features divided into three groups develop, grow, and earn, and all of them are connected to Analytics....
There is an effective way to add a property to a category. These are called runtime objects. If you want to add functionality or property to existing class, you should implement category. In this way, class stays stable and you can do what you want. First I'll talk about categories in Objective-C. After that, I will...
This assignment is given in Computer Graphics Lecture in Ankara University. This is assignment #2. To complete this assignment, a little bit OpenGL knowledge is required. Task is to model and animate a 3D ball-and-stick man according to the sketch given on the right: The body, neck, upper/lower arms and legs should...
The main idea was ‘keep it simple’. Apache Commons Net Library also has functions to file operations. But FTPFileOperations class usage is easy. The class have copy directory, and list files of specific directory which they are not in Apache Commons Net Library. Firstly, baglantiAc function is to open an FTP...
Project Mechanism There are two public methods, and four private methods. ziptenCikar and ziple methods are public. Other methods are private. To zip a directory or a file, there is ziple method in the project. This method takes two parameters. One parameter is source directory address, and the other parameter is...
Note to myself: Blank finals must be initialized in the constructor. Ex: class A { private int i; A(int ii) { i = ii; } } public class MainClass { private final int i = 0; // Initialized final private final int j; // Blank final private final A a; // Blank final reference // Blank finals MUST be initialized in the...