New feature for Media hider

I already talked about Media hider, a hobby Android application that enables you to easily select which directories should get scanned by Android. I have added a nice feature: you can now view the list of all the directories that Android currently identifies as multimedia directories. You can then easily hide one of these directories by long-pressing it, and pressing “Hide for next scan”. If you find that the list is too exhaustive, you can go in the options to select which medias should be displayed.

New graphics API and Windows installer for pySFML

I added support for pySFML's new graphics API a while ago, and I recently added a Windows installer (that's the .exe file, the .zip are older releases). There's no Python 3 installer currently, because Visual Studio fails to compile it. I'll see if I can fix it, or use MinGW instead. If you're using Python 2 and are interested in multimedia/2D development, try it out! But please keep in mind that it's not a stable release yet and that bug reports and suggestions are very helpful.

New Android project: Media hider

As a new Android learning project, I have created an application that lets you tell media players which directories shouldn't get scanned. This is useful e.g. when application pictures such a logos appear in the gallery. The app currently only shows you directories and prevents you from going into an empty directory, to avoid wasting your time. Since it's occasionally useful to see which files are in a directory, I'm currently trying to find a nice way to list a specific directory.

Android stopwatch for working out

I recently started learning Android development, and as a starting point I wrote a simple stopwatch application that I actually needed. Let's say you want to do 6 x 10 push-ups; the app will increase a counter every time you reset the timer (after the break), so you don't have to remember the number of sets you have already done. Pretty useful if, like me, you seem to lose you lose your memory and confuse all these numbers after a few exercises, and are too lazy to write them down.

Recent gold change in Heroes of Newerth

Heroes of Newerth recently got an update that changed the way you get gold when killing a unit. A developer explains what's wrong with the former approach: “your carry farming a lane and their carry farming a lane could actually mean they get up to 1000 more gold over the course of a game just off pure RNG. Nonsense!” The most popular reply approves: “RNG in videogames are pretty lame, especially when it comes to competitive gaming.

New Python binding: pySensors

I recently started using lm_sensors, and I thought it would be interesting to write a simple graphical program to show the current temperatures, fan speeds and whatnot. I couldn't find a Python binding for their C API, so I wrote one: https://bitbucket.org/bastienleonard/pysensors. The examples directory contains a very simple graphical program that uses GTK 3 (you will need PyGObject). I still need to add some stuff, mainly make it work on Python 3 and complete the documentation.

2D spaceship game

This weekend, I wrote a small 2D game: https://bitbucket.org/bastienleonard/flight It was for the Bacon game jam, and the theme was “flight”. Basically, you’re flying around with your spaceship, getting crystal to make your ship move faster, while avoiding asteroids and mines. Your ship automatically moves; you point at the direction you want to move to with the cursor. There’s a lot of room for improvement, but hey, it’s the closest thing to a working game I’ve ever written.

Property and method with the same name in Cython

print sprite.scale # 1. Read the current scale sprite.scale = (2, 2) # 2. Set a new scale sprite.scale(3, 4) # 3. Call the scale() method As you can see, in practice it shouldn't be a problem that the property and the method have the same name: we can infer which one the user is calling from the context. However, both Python and Cython don't directly allow you to define a property and a method with the same name.

PySFML 2 news

Since SFML moved to Github, I decided to move my Python binding there as well, as I think it will make it easier for all users to find all the code on the same platform. The new URL is https://github.com/bastienleonard/pysfml2-cython. You can read the current documentation here: http://bastien-leonard.alwaysdata.net/pysfml/doc/index.html. If you're interesting in writing video games/multimedia applications in Python, check it out! The easiest way to test it is to download the snapshot (direct link).

Feedback on Viewsonic's after-sales service

When my desktop screen stopped working some time ago, the first thing I did was to read about people's similar experiences with the same problem (Viewsonic screen stopping to work during its warranty). I read so many awful reviews that I was already expecting to have to buy a new screen myself. People were complaining about the staff circling around the problem or successively receiving non-working replacement screens... So I was quite surprised to receive a new 24"

How to use strace to fix program dependencies on Arch Linux

It's been several months since I last updated my Arch Linux system, and as you may know, one of Arch's main advantages is that it always provides you with the latest programs. There's no punctual release, you just update your system when you want and it retrieves the latest packages. Since the packages are updated so fast, the dependencies usually aren't perfectly right because they didn't go through a lot of testing.

What I don't like about Python

Python is one of my favorite programming languages, and is often praised for its design, but there are still some things that I find annoying. For example, you usually have the entry point of the program at the end of the source file. This is because if it calls any function defined in the module, it has to occur after those functions in the sources. I hate it when you have to spend time looking for the entry point of a program, so I always have a simple main.