Tag: programming

  • Bubblewrap sort

    The problem Anyone familiar with computer science algorithms knows about bubble sort. In this algorithm, you sort a list of things in “bubbles” by going over it repeatedly in sequence and swapping two bubbles next to one another until they’re all sorted. Although this algorithm is simple to explain, it’s really inefficient as you will…

    Read more

  • Monty Python Hall: A Monty Hall simulator in Python

    The infamous Monty Hall problem goes something like this: Monty Hall, the host of TV game show “Let’s Make A Deal” shows a contestant three doors. Behind one door is a new car. If the contestant picks that door, they win the car. The other two doors have a goat behind them, which are not…

    Read more

  • My own QML TreeView

    It’s Valentine’s Day and here’s the point where I have to confess my love as a software engineer for QML. It’s a markup language for building simple modern UIs with Javascript controls, and can be bound to C++ and Python via Qt. Since it’s based on Qt it runs on pretty much any modern desktop…

    Read more

  • Programming in Vala

    As some of you may know, I work for an open source software non-profit called Yorba. Our best known product is Shotwell, a photo management application that’s similar to Picasa or iPhoto, but created for Linux. It’s the default photo app these days in both Ubuntu and Fedora. What many of our users don’t know…

    Read more

  • Accelerated 2D graphics with OpenGL and SDL: part 1

    As some of you know, I’m working on an old-school puzzle game with Hryx. This game makes use of OpenGL’s graphics capabilities, but not for 3D graphics. Nope, the game is entirely two dimensional. So why OpenGL? Because it’s really, really fast on most systems. Much faster than the slowpoke graphics in SDL. This is…

    Read more

  • Programming is a lot like writing

    Computer programming is a lot like writing. You use the same tools to do both (chair, computer, scraps of paper) and you have to follow a similar set of rules. What sort of rules? There’s the strict rules, like syntax, grammar, and spelling. Then there’s the not-so-strict rules, like style and taste. Same idea, slightly…

    Read more