• Vala interface madness

    Gergely Polonkai
    Feb 26, 2016 :: 13:07

    Although I have just started making it in C, I decided to move my Matrix GLib SDK to Vala. First to learn a new language, and second because it is much easier to write GObject based stuff with it.

  • Emacs: Implement a GObject’s virtual function

    Gergely Polonkai
    Jan 13, 2016 :: 13:31

    I have recently started creating a GLib implementation of the Matrix.org API. For that, I have created a GObject interface, MatrixAPI, which has as many virtual functions as API calls (which is a lot, and expanding). This way I ended up with the following scenario.

  • How my e-mail gets to that other guy?

    Gergely Polonkai
    Aug 27, 2015 :: 21:47

    A friend of mine asked me how it is possible that she pushes buttons on her keyboard and mouse, and in an instant her peer reads the text she had in her mind. This is a step-by-step introduction of what happens in-between.

  • F/OSS Fail meter

    Gergely Polonkai
    Aug 19, 2015 :: 10:12

    I have recently bumped into this article. Naturally, I quickly calculated the FAIL metrics for all my projects (most of them are pretty high). To ease calculation, I made up a small page based on this list (although I have divided the points by 5; I really don’t understand why spot is using such big points if all of them can be divided by 5). Feel free to use it, and if you have any recommendations (point additions/removal, new categories, etc.), leave me a comment!

  • @ParamConverter à la Django

    Gergely Polonkai
    Jun 7, 2015 :: 18:14

    One thing I really miss from Django is Symfony’s @ParamConverter. It made my life so much easier while developing with Symfony. In Django, of course, there is get_object_or_404, but, for example, in one of my projects I had a view that had to resolve 6(!) objects from the URL, and writing get_object_or_404 six times is not what a programmer likes to do (yes, this view had a refactor later on). A quick Google search gave me one usable result (in French), but it was very generalized that I cannot always use. Also, it was using a middleware, which may introduce performance issues sometimes[citation needed]. So I decided to go with decorators, and at the end, I came up with this:

  • Good bye, Digital Ocean! Hello again, GitHub!

    Gergely Polonkai
    Apr 25, 2015 :: 21:18

    Few years ago I have signed up for a Digital Ocean account. I used one single droplet for my private needs, like hosting my private Git repositories and my blog. However, as I didn’t host anything else there except my blog, I decided to shut it down. From now on, my blog is on GitHub Pages, as it provides just everything I need (except automatically converting my resume to PDF. But I can live without that.)

  • Using Git bisect to find the first good commit

    Gergely Polonkai
    Feb 26, 2015 :: 10:42

    Few months ago we “implemented” a bug in our software, which was released to the customers. We continued development for two weeks when the first customer ticket arrived about the bug. We successfully reproduced it with the customer’s version, but not with the development sources; it turned out that one of the developers unconsciously fixed the bug. The devs spent some hours finding where the fix lied before coming to me like “There is git-bisect which we can use to find the commit where we messed up things. Is there a way to find where we fixed it?”

  • Rounding numbers to N decimals in Emacs

    Gergely Polonkai
    Oct 7, 2014 :: 10:28

    I have recently faced a problem, where I had a bunch of SVG files with a large amount of fraction numbers in the path definitions. These images were displayed in small size, so this amount of precision was irrelevant, and these numbers took almost half of my SVG images’ size. So I created an Elisp defun to round these numbers to 2 decimals:

  • NyanMacs

    Gergely Polonkai
    Sep 17, 2014 :: 12:45

    I was a Vi/ViM user for years. For several reasons I had to change to Emacs now and then. And then, I found this. I surrender. Emacs is just better. (And it’s working even in plain text mode without graphics)