Using MVVM with tables and cells in iOS

When I ventured into native iOS development I immediately took a look at the possibility to use data binding on iOS which enables me to simply declare the relationships between the UI and the ViewModel. This article takes that approach further shows you how to use MVVM and data binding when using tables and cells, or in the world of iOS UITableView and UITableViewCell.

Sample scenario

Let’s start with simple example scenario. You want to show progress of some flow that contains of multiple steps, each of the steps can be either running or complete. When a step is running it can report its progress. You want to display this flow in a table that looks like this

[Read More]

Using data binding in iOS

When I started working on a native iOS project after a few years of Windows (Phone) development I looked into ways to write a more declarative and more elegant code than the “standard” iOS way. I wanted to transfer some of my habits over and the first thing I really missed was XAML data binding. I did some research on how to do data binding in iOS and found a few libraries that make it possible. This allowed me to write better code and I think data binding is a concept that all the iOS developer should look into. If you are interested in my experience with using binding in iOS, read on.

Sample scenario

Let’s use a simple example scenario. You have a screen where the users have to choose their country and then enter their mobile number. The number has to be validated with respect to the selected country and if everything is ok the Next button should become visible. So basically it should work like this

[Read More]

Creating a TV schedule grid in UWP

I am currently working on a UWP app for a cable TV company. The app allows their clients to watch the TV channels they are subscribed to with additional information like the TV schedule, information about TV shows, recording TV shows for watching later, etc. One of the main functionalities of the app is a TV schedule grid. Creating this TV schedule grid in UWP is not so easy, especially because of the poor XAML rendering performance.

TV schedule grid

The TV schedule grid shows a TV schedule for all the subscribed channels for a given day. The channels are being shown in rows and the columns represent TV shows. The grid is scrollable in both directions and the channel logos are sticky. The users can be subscribed up 70 channels and all of this should work reasonably well even on a Windows Phone.

This is how the result looks in a Windows Phone emulator. Spoiler: there is just no way to make it so smooth on a real Windows Phone device.

[Read More]

Using macOS with a Windows keyboard

When you start using macOS after years of using Windows there are some things you expect to work in certain ways. One of those things is the ways the OS handles keyboard input and keyboard shortcuts. This is especially important if you still also use Windows and use a Windows keyboard with macOS. Here are a few things regarding the keyboard that help me when using macOS working on a side project.

Control, Option and Command keys

The fist thing you may notice when using macOS with a Windows keyboard is that the modifier keys are not in the right order. The order of the modifier keys on an Apple keyboard is Control, Option, Command but the Ctrl, Windows, Alt keys on a Windows keyboard map to Control, Command, Option by default. You can fix the order of the modifier keys in System Preferences | Keyboard | Modifier keys

[Read More]

My (negative) experience with the Microsoft MVP awards

Getting a MVP is a big thing when you are a developer working with the Microsoft stack. It is supposed to be some kind of approval a sign that you are doing something well. I applied for the MVP award back in 2012 and then got nominated in 2016. I want to tell you about both cases because they really made me think that the whole MVP concept is just wrong.

Disclaimer: First, this post is not a hate post because I did not get an MVP award. I do not really care about it. I just want you to know how it works and what is it like. Second, I am in no way generalizing and saying the MVP awards work like this in every region. This is my experience with the Czech Microsoft branch (2012) and later with the CEE, Russia & CIS (2016). I suspect things may work differently in different regions and with different Microsoft branches.

[Read More]

Hacking a mobile API and how to protect yourself

Sometimes when I use a mobile app that provides data that I find useful my curiosity awakens and I ask myself a question: how does the communication work and how hard would it be to break their security and access the data outside of the app? Mobile apps I have encountered are generally not very well secured and stealing their data is not much of a challenge. But what can the authors of the app do about it?

Lets take an app and an API and walk through the process. The model app is an app I tried last week and provides TV schedules for many local stations, so data that someone might be interested in stealing.

[Read More]

About the decline in software quality

In the last few months I have been noticing a huge decline in software quality on every device I use. It seems to me like bad quality software is a current trend, especially for big corporations like Microsoft or Apple. Even though I consider Apple more of a “fashion company” than a “technology company” I think it is unacceptable for software from such big companies to works as bad as it does.

I am programmer so I know that software has and always will have bugs. My points is not buggy software in general but that software contains more bugs with every release and that stay unfixed.

Windows 10

Windows 10 updates are where I notice the software quality degradation the most. I cannot remember a bigger Windows 10 update that did not break something for me or millions of other users (like the Anniversary Update breaking millions of webcams). I do think this is because of my hardware configuration. I experience all the problem usually on both my laptop and my desktop computer.

[Read More]

Fixing first annoyances with Bash on Windows

When you enable the Linux Subsystem on Windows in the Windows 10 Anniversary Update so you can use Bash and all the GNU utilities, you may encounter a few annoyances like strange error messages, wrong language settings, etc. Here is how to fix the ones I encountered.

Adding Bash to cmder

If you use cmder, you can add a new Bash task like this.

[Read More]

Creating a simple Windows 10 game with Win2D

Some time ago while looking at some pixel art work I got an idea to create a retro pixel art game for Windows 10. The choice was obvious, Sokoban. I have a very special relationship with the Sokoban game. The Delpi version of Sokoban was the first game I ever created. I later ported it to all the platforms I played with, namely J2ME (for my Siemens S60 phone), Linux (using Kylix which was basically a Delphi for Linux), Windows Phone 7 and now Sokoban Pixel for the Universal Windows Platform.

[Read More]