Below you will find pages that utilize the taxonomy term “Programming”
Posts
Tricking Programmers Into Being Helpful
People[1] accuse Stack Overflow of being unwelcoming to newbies. Older programmers complain that the site quality has decreased because of the influx of low quality questions.
I am part of the latter crowd. I expect that if I give out my time to help somebody, they will reciprocate and invest time into understanding the problem and redact a concise question. Unfortunately when one goes through review queues on Stack Overflow, a good portion of the asked question is copy pasted textbook exercises.
read more
Posts
How I discovered how iOS calendar app chooses colors by digging into the icloud.com JavaScript code
While making an iOS calendar app, I needed to find out how Apple calculates background and text colors when displaying events in the Calendar app. I wanted to use the same algorithm for my display, in order to integrate well with the OS.
I was hoping for some displayBacgkroundColor property on EKCalendar object or something similar, but it does not seem to exist. I almost decided to start approximating their algorithm while I realized one thing—the icloud.
read more
Posts
Pure CSS solution to retina images with a single file
Problem: You have an image and want it to display well in browsers on a high DPI display. There are many ways to do this, some of them more complicated than others.
My requirements were pretty simple:
I want to be able to publish “retina” images with default markdown syntax I prefer images to be blurry on non-high DPI screens, they are blurry anyway so what’s the harm. I do not care about wasted bandwidth by sending retina assets to clients with standard definition screens.
read more
Posts
Setting File Permissions on Windows With C
Edit 2018-01-19
In my original article I have naively supposed that the group names are not localized. This is false. Always use the Well Known Security IDs when manipulating permissions on Windows.
I’ve spent good part of my morning trying to find a way how to set permissions to a particular group.
Finally while digging though Stack Overflow I have found this question which lead to another because of deprecation errors.
read more
Posts
Gulf color theme for Xcode
I have started teaching myself some Objective-C which also means that I have to use something else than my beloved Qt Creator.
As to feel a bit at home I have ported my Gulf theme over to Xcode. The choice I have made in creating this theme is to conserve all of the colours from the original (e.g. Types and Classes are greenish, while attributes are blueish).
Sadly Xcode does not provide different colours for global and local variables.
read more
Posts
Gtk, Glade and signal handlers in C++
Much was written about connecting signal handlers to interfaces made with Glade and imported with GtkBuilder. The problem is that everybody uses a different system and/or language. So here is a guide which explains all the magic:
Glade Interface First of all create your widget in Glade and assign it a signal handler. We are going to create a very simple application which has a single button which exits it. The Glade interface should look something like this.
read more