Software Principles

Software Principles
Software principles form the foundation of systems that are clean, scalable, and easy to maintain. They serve as essential guidelines during design and development, helping create code that’s well-structured, readable, and adaptable. By following these principles, developers can reduce bugs and elevate the overall quality of their software.
Read more →

Configure Traefik to use custom domain name, Let’s Encrypt and Azure DNS Zone

Configure Traefik to use custom domain name, Let's Encrypt and Azure DNS Zone
In the previous article we configured Traefik to use magic domain name like traefik.me. In this article we configure it with your domain and Let’s Encrypt certificated authority.
Read more →

Configure Traefik to use traefik.me domain name

Configure Traefik to use traefik.me domain name
Sometimes during development we want to use domain names instead of IP addresses and ports, proper domain certificates instead of self-signed to make local environment similar to production, etc.. This problem can be solved with any reverse proxy and magic domain names like traefik.me, nip.io, sslip.io, etc..
Read more →

Edit Android’s emulator hosts file

Edit Android's emulator hosts file
Recently, I’ve developed Android app that during the development requires access to the backend service that is run in the docker behind reverse-proxy with custom myservice.traefik.me domain name. For sure, from emulator you can get access to your local service when connect to it by IP address with specified port. But this approach leads to some issues and ugly workarounds in a code. There are several solutions to this problem like edit hosts file, run own DNS server etc.
Read more →

Swift. Two-way communication between an iOS app and watchOS app. PART 2

Swift. Two-way communication between an iOS app and watchOS app. PART 2
In the previous article we created very simple SyncService service that can send and receive data between iOS as watch app. Which is good for very simple scenarios, but when application complexity is growing it is really important to keep you code clean, and well organized. In this article we will try to isolate sync logic from the rest of the application. In one of my project I had to synchronize data based on different events, in different part of application.
Read more →

Swift. Two-way communication between an iOS app and watchOS app. PART 1

Swift. Two-way communication between an iOS app and watchOS app. PART 1
So, you have decided to create iOS application with its watch companion application. And, you need to exchange some data between two of them. For this scenario Apple provides simple WatchConnectivity framework, that specifically designed for this type of scenarios. This framework does most of the heavy lifting and your goal is simply to implement the business logic. In this article consists of two parts: Part 1. Minimum you need to sync data.
Read more →

Swift. JSON serialization/deserialization

Swift. JSON serialization/deserialization
Working with JSON format, probably one of the most common task in the software development, whether you organizing the data storage or send data over network or any other reason. Therefore it will be very common task in the mobile development. Likely, Swift provides build in functionality to work with JSON format. To encode (serialize) or decode (deserialize) our object to JSON format we need to make sure that object implements Encodable protocol and/or Decodable protocol.
Read more →

Swift. Get Application Basic Info

Swift. Get Application Basic Info
Very often you need to get basic application information, for example to show user an application version or maybe some issue has occurred and you want to collect some details about user device. Some information are relatively easy to get some are not so. So, lets get some basic information. Personally, I prefer keep that information isolated and in one place. Lets create AppInfo struct and add couple of imports.
Read more →

Configure Synology VPN Server with Custom Domain

Configure Synology VPN Server with Custom Domain
Probably you heard a lot about VPN services that became very popular in past several years and wondered if you need one. If you are using public Wi-Fi a lot in coffee shops, hotels, malls (you know it is dangerous, right?) or you want to get access to the content that is not accessible in your region then yes you need it. So, you can buy one of those service or if you have Synology device you can configure your own VPN Server for free.
Read more →

Host you domain in Azure DNS

Host you domain in Azure DNS
There are many cases when you want to dynamically add/remove CNAME, A/AAA records to your domain. To do that you should get familiar with yours domain registrar API (if any) and its limits (like requests per day, throttling, etc.). But, if you’re already working with Azure it is much easier to use Azure DNS zone instead, because it provides full control over your domain and familiar experience. So, lets get started.
Read more →

Enhance the ASP.NET dictionary model binder for Multipart requests

Enhance the ASP.NET dictionary model binder for Multipart requests
Recently, for one of my pet projects I’ve create a web API that allows to upload file with extra metadata. During the testing files upload worked as expected, but metadata object represented by dictionary type did not go though, the dictionary always was empty. So, lets figure out how to fix it.
Read more →

Connect your app to Azure Cosmos DB Emulator on Docker. PART 2

Connect your app to Azure Cosmos DB Emulator on Docker. PART 2
In this article we are going to focus on how to connect our application to the Cosmos DB Emulator from Docker. This article is continuation of the Part 1 of this series. I suggest to read it first before continue, because this part is based on previous one. Add Docker support to our application Before we continue we need to add Docker support to our application we created in Part 1 of this article.
Read more →

Connect your app to Azure Cosmos DB Emulator on Docker. PART 1

Connect your app to Azure Cosmos DB Emulator on Docker. PART 1
Recently I’ve tried to use official Cosmos DB Emulator on docker , but quickly encountered some issues that I’ll try to address in this article. Following documentation I’ve managed to run emulator on Docker with no problem, but issues start appearing when I’ve tied to connect my application to it. Basically, I’ve had application that also running on Docker, but unfortunately documentation does not cover this scenario. So, to figure our how to make it work I’ve decided to run my application without Docker, just to make sure that everything is working, but again there were some small issues.
Read more →

Hosting Hugo site on Azure Static Web Apps

Hosting Hugo site on Azure Static Web Apps
Recently when I decided to start my own blog, one of the first questions I had where and how I’m going to host it. Long story short I’ve decided to use Azure Statics Web App , because Azure provides a free account. So, if it is free why not 😄. Prerequisites Because you are reading this post I can assume you already have Hugo site that you want to host, if not just follow this installation guide to create one.
Read more →