Author: Andy Balaam

  • “git what” is “git status” on steroids

    For when git status is not enough, I wrote git what: If you often have a few branches on the go, it could be useful.

  • Making 100 million requests with Python aiohttp

    Series: asyncio basics, large numbers in parallel, parallel HTTP requests, adding to stdlib Update: slides of a talk I gave at the London Python Meetup on this: Talk slides: Making 100 million HTTP requests with Python aiohttp. Update: see how Cristian…

  • Python – printing UTC dates in ISO8601 format with time zone

    By default, when you make a UTC date from a Unix timestamp in Python and print it in ISO format, it has no time zone: $ python3 >>> from datetime import datetime >>> datetime.utcfromtimestamp(1496998804).isoformat() ‘2017-06-09T09:00:…

  • Python 3 – large numbers of tasks with limited concurrency

    Series: asyncio basics, large numbers in parallel, parallel HTTP requests, adding to stdlib I am interested in running large numbers of tasks in parallel, so I need something like asyncio.as_completed, but taking an iterable instead of a list, and with…

  • Basic ideas of Python 3 asyncio concurrency

    Series: asyncio basics, large numbers in parallel, parallel HTTP requests, adding to stdlib Update: see the Python Async Basics video on this topic. Python 3’s asyncio module and the async and await keywords combine to allow us to do cooperative concur…

  • C++ iterator wrapping a stream not 1-1

    Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper Sometimes we want to write an iterator that consumes items from some underlying iterator but produces its own items slower than the items it consumes, like this: ColonSep items(“aa:foo::x”); // Prints…

  • How to write a programming language ACCU talk

    My talk from ACCU Conference 2017 where I describe a tiny programming language I wrote: Slides: How to write a programming language Cell source code: github.com/andybalaam/cell

  • C++ iterator wrapper/adaptor example

    Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper If you want to wrap an iterable range with another that transforms the underlying iterators in some way and allows looping or constructing other objects: for (auto ch : Upper(“abcdef”)) { // Print…

  • C++ iterator example (and an iterable range)

    Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper To make your own iterable range in C++ that you can loop over or make a vector out of (mine is called Numbers): // Prints: // 3,4, for (auto n : Numbers(3, 5)) { std::cout << n << “,”;…

  • Make Android Gradle display unit test failure messages

    By default, Gradle does not show you what happened when a unit test failed: $ ./gradlew test … MyTest > Black_is_white FAILED org.junit.ComparisonFailure at MyTest.java:6 ^^^ WHAT ACTUALLY FAILED???? … This is insane, and can be fixed (t…

  • Planet Code updates

    I maintain an unofficial aggregator of blogs by people who are involved with ACCU and things they might be interested in. It’s called Planet Code. Today I made it look slightly less ugly, and added several new blogs after attending the excellent ACCU C…

  • A story about magic and how we treat each other

    For a lightning talk at the ACCU Conference I wrote a little story: A story about magic and how we treat each other It describes one person’s journey towards realising that we need to act to be kind to each other, and not to expect it to happen automat…

  • Annual cost of clean water for every human

    According to a 2010 WHO-backed study the cost of safe water for every human would be about 10 billion US dollars per year. The UK government revenue for 2010-2011 was about 639 billion US dollars. I would vote for a political party proposing to raise …

  • Iterating over the lines of a file in Java

    If you’re trying to write a standard command-line tool in Java you are going to experience pain. In Python, if we want to do something with each line on input to your program, we can do something like: import sys for ln in sys.stdin: print(ln) # (…

  • Raspberry Pi Jam “Chaos Car!”

    Raspberry Pi 1 + battery pack + Bluetooth USB dongle + i-racer bluetooth car + Raspberry Pi camera + some Python code + loads of sellotape = Chaos car! Here’s the code: #!/usr/bin/env python2 import os import random import bluetooth import sys import…

  • Automated UI tests on Android

    I recently fought the Android emulator a lot to get my UI tests to run automatically during the build of Rabbit Escape, so I thought I’d better write down what I did before I forget. I already have tests that drive the Android UI (see e.g. SmokeTest.ja…

  • Submitting a package to F-Droid

    Here’s what I needed to get a dev environment for F-Droid up and running on Ubuntu 16.10, using F-Droid server version 0.7.0 (commit id 8147f9235), so that I could submit a package for inclusion in the F-Droid repository. Doing this is apparently the b…

  • Resources for year 6 teachers on coding and programming

    I have been introducing some year 6 (UK) teachers to coding by showing them how to lay out a simple web page by writing HTML. I promised I would find some links to resources for them, so here it is: HTML and JavaScript My examples of how to write HTML …

  • Setting up a sane Maven project

    Today I have spent hours trying to get wrangle Maven into letting me set up a sane Java project. The hardest parts were enforcing warnings-as-errors, and getting Maven to shut up a bit. Some code that warns My first problem was writing some Java code t…

  • Writing a unit test in Elm

    Series: Snake in Elm, Elm makes me happy, Elm Basics, Elm Unit Test, Elm JSON I’ve been having fun with Elm programming recently. Elm is a replacement for JavaScript that is pure functional and highly practical. Here’s how to go from nothing installed …

  • How to write a programming language – Part 3, The Evaluator

    Series: Lexer, Parser, Evaluator. Finally, we get onto the actual magic of the little language I wrote (Cell) – the evaluator, which takes in syntax trees and finds their real value, in the context of the “environment”: the symbols that are defined aro…

  • Basic Haskell project setup (unit tests, code, formatting)

    To start a programming project, we need to be able to build, format code, and run unit tests. Here’s what I have found makes a sensible starting point for a Haskell project. Full code: hunit-example. To build and run tests, just do:make setup make test…

  • How to write a programming language – Part 2, The Parser

    Series: Lexer, Parser, Evaluator My little programming language, Cell (Cell Elementary Learning Language) is designed to be simple. I want to use it to explain how to write a programming language. The parser is only 81 lines long, so hopefully it’s not…

  • Mousedown events delayed or sluggish on mobile

    I am learning about Elm and web apps by writing a little game called sootl. It’s all SVGs animated with requestAnimationFrame(), and you control your player by clicking or touch the screen. Everything seemed good on desktop browsers, but on mobile it t…

  • How to write a programming language – Part 1, The Lexer

    Series: Lexer, Parser, Evaluator I wrote a little programming language, Cell which is supposed to be simple enough to help explain how a programming language works. Here’s the explanation of the lexer, which is the first part of a compiler or interpret…

  • Simple example of Netty 4 usage

    I feel the title of this post over-promises, since I was not able to make an example that seemed simple to me. Anyway, here is a near-minimal example of how to use Netty to make a server that shouts back at you whatever you say: NettyExample.java:impor…

  • Elm resizeable SVG canvas filling the screen

    I am toying with writing an SVG-based game in (exciting-looking JavaScript-replacement) Elm, and I wanted an SVG that filled the whole screen and resized when the screen resized. I found it harder than I expected, so here is what I came up with for you…

  • Ambiguous names in Java due to non-normalised unicode – but all OK in Python

    In Java and several other languages, identifiers (e.g. method names) are allowed to contain unicode characters. Unfortunately, some combinations of unicode characters are logically identical. For example, á (one character: Latin Small Letter a with Ac…

  • Gracefully shutting down Firefox, to avoid the crash/session dialog

    I normally have several Firefox profiles open, and when I log out without closing the Firefox windows I get the “session restore” dialog on my next login. This is because of Bug 336193 which says that Firefox should shut down gracefully when it receive…

  • Snake in Python 3 + Qt 5

    Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. Python 3 broke compatibility to fix some mistakes – was it worth it? Qt 5 continues to offer more an…

  • Basic Concepts of Christianity video

    Update: my ideas have changed quite a bit since I recorded this, especially about the idea that “every crime requires a punishment”. If you’d like to explore more, try this sermon by my friend Jörg. As a Christian myself I thought it might be interest…

  • Elm Basics Video

    Series: Snake in Elm, Elm makes me happy, Elm Basics, Elm Unit Test, Elm JSON A lot of the documentation about the new language I am really excited about, Elm focusses on the Elm Architecture and the ideas of Functional Reactive Programming, and while …

  • How to analyse a .phd heap dump from an IBM JVM

    If you have been handed a .phd file which is a dump of the heap of an IBM Java virtual machine, you can analyse it using the Eclipse Memory Analyzer Tool (MAT), but you must install the IBM Monitoring and Diagnostic Tools first. Download MAT from eclip…

  • Elm makes me happy (old: Elm 0.17)

    Updated version: Elm makes me happy (updated for Elm 0.19) Elm lets you write interactive web sites in a really clean and safe-feeling way, which is a contrast to the feeling I get when using JavaScript and HTML. It’s functional, but instead of that ma…

  • What’s new in Java 8

    Java 8 makes some functional programming ideas available to the rest of us, using Lambda, function references and a streaming style (map, filter, replace etc.): Slides: What’s new in Java 8

  • Which Raspberry Pi photo was funniest?

    We had a great day at the Egham Raspberry Pi Jam, and Rabbit Escape and our Photo Booth: seemed to go down well: But which photo was funniest? Here are some of the entries (I had to choose kids’ ones without faces to go on here, but there were some o…

  • Raspberry Pi Funniest Photo Game

    For our latest Egham Raspberry Pi Jam, we worked on a photo booth program, using the Raspberry Pi camera. Here’s how we did it. Downloads: funniest-photo-game.odp, photo-booth.zip. Update 1: fixed a bug where it tried to create a directory that already…

  • Snake in Elm

    Snake Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 Elm Series: Snake in Elm, Elm makes me happy, Elm Basics, Elm Unit Test, Elm JSON I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. Elm brings t…

  • Out-of-school education settings

    Here is the comment I sent to the Government consultation on out-of-school education settings. Feel free to re-use, modify, distribute as you like. I am writing to express my opposition to the government’s plans to regulate the content of out-of-school…

  • New open source project on work time – git-history-data

    Announcing a little open source project that I have built at work and been allowed to publish Freely. git-history-data analyses a Git source code repository and dumps out data in a form that is easy to analyse. I wrote an article demonstrating how to u…

  • Java HTTPS to a server with a self-signed certificate

    Nothing is easy in Java, and nothing is more disproportionately non-easy than downloading something. If you add SSL to the equation, it becomes unfeasible for any human to navigate the twisted passages of the Java API, so here is a tiny fragment of map…

  • Vim as editor for Claws Mail

    I got sick of not having Vim as my text editor for emails in Claws Mail but GVim makes my eyes bleed so I wanted proper Vim-in-a-terminal as my editor, which was not particularly straightforward. The proper incantation was to make a script in my PATH c…

  • Using GitHub and GitLab

    Taking all the Git understanding we’ve developed through the series on Git and applying it to how to work on and contribute to projects on GitHub and similar systems like GitLab:

  • Avoiding postfix error “status=deferred (unable to look up host”

    My emails wouldn’t send when I was working from home, giving me this message in /var/log/mail.log: Nov 11 12:38:16 machinename postfix/smtp[20672]: CF5D6D41CE2: to=, relay=none, delay=14416, delays=14416/0.01/0.07/0, dsn=4.3.5, status=deferred (Host or…

  • Finding the download count of GitHub releases

    You can use the GitHub API to find out how many times the files in your releases have been downloaded. For example, to find out how many downloads there have been of my Rabbit Escape project you can do: curl -s https://api.github.com/repos/andybalaam/r…

  • Android: using a TextView to show rich text in an AlertDialog

    If you want to display a link or basic formatting in an AlertDialog on Android, you can do it by providing HTML. The key parts you need are Html.fromHtml and TextView.setMovementMethod. Make sure you pass the dialog’s context in to the constructor of t…

  • Assassination of individuals by the state

    I wrote to my MP (via writetothem.com) about the British government assassinating people they suspected of planning terrorist attacks. He replied saying that the government believes the action was legal, proportional and necessary. Part of this justifi…

  • Difficult merges in Git – don’t panic!

    A video in which I try to explain what merging and rebasing really are, to help you understand what is going on when Git presents you with scary-looking conflict messages. I also explain why you shouldn’t panic because it’s hard to lose your work, and …

  • ZX Spectrum BASIC Web Server

    Finally, you can write your web sites in ZX Spectrum BASIC, using my new project, ZX Spectrum BASIC CGI server . How it works Here’s what happens when a request comes in: Apache HTTPD receives the request, and runs the CGI script that does the magic. …

  • Letter to my MP on UK government assassination of British Citizens in Syria

    Below is a copy of the letter I sent to my MP this morning (via writetothem.com). Feel free to re-use and adapt it if you want to send a similar letter. Update: follow-up letter. Dear Philip Hammond, I was extremely concerned to hear of the assassinati…

  • Rabbit Escape out now on Android!

    Watch the video: Buy the game on the Play Store.

  • Changing the Docker daemon options in systemd on Ubuntu 15.04

    Update: now documenting the better way, as described in issue 14513. Update 2: I think this way is even better (works in Ubuntu 16.04, Docker 1.12.2, Reference: dockerd command line):sudo -s -H echo ‘{“insecure-registries”:[“myreg.example.com:5000”]}’ …

  • Docker fails to start on Ubuntu 15.04

    I installed Docker on Ubuntu 15.04 using: wget -qO- https://get.docker.com/ | sh as described at Install Docker on Ubuntu. I added myself to the docker group: sudo usermod -aG docker balaaman Then I logged out and logged in again, and ran: docker run h…

  • Preventing Audacity from crashing when using PulseAudio

    I found that Audacity would crash whenever the Playback Device in the Devices section of Preferences was set to “pulse” or “default”. This can be fixed by launching Audacity like this: Exec=env PULSE_LATENCY_MSEC=100 audacity I fixed it “permanently” b…

  • Movie podcast “The Good Robot Andys”

    My friend and I have launched a new podcast in which we discuss movies: The Good Robot Andys. Enjoy.

  • Code for detecting when you leave an Android app

    Further to Detecting whether an Android app is stopping (or starting), I implemented code to decide when you are leaving or entering my game Rabbit Escape. The relevant class is called Lifecycle2SoundEvents. (Yes, it’s a terrible name. Yes, I spent a l…

  • Mocks are Bad, Layers are Bad

    In which I argue that mocks are a code smell, and layers lead to increased coupling: Mocks are Bad, Layers are Bad (in ACCU’s Overload Journal issue 127) I also suggest some ways to avoid both mocks and layers, including Classical TDD, Selfish Object, …

  • Prediction result: corporate Linux

    Ten years ago I predicted that 30% of corporate desktops would be Linux or similar open source desktops. It’s very hard to find any accurate (or even confident) numbers, but it seems clear I was wrong. This month, NetMarketShare puts Linux usage at 1.2…

  • Detecting whether an Android app is stopping (or starting)

    I am writing an Android app (called Rabbit Escape), and I want it to start playing music when the user enters the app, and stop when the user leaves. Not as easy as it sounds because Android largely doesn’t think in apps, but Activities. Update: real-l…

  • Order of Android Activity lifecycle events

    I noticed some variation between devices so I tested various user actions on various devices and recorded the Android Activity lifecycle methods (e.g. onResume, onPause, onCreate, onStop) that got called. My results are below. [Why? I want to detect wh…

  • Snake in Dart

    Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. This time, Dart, which is for people who love Java and wish they didn’t have to do JavaScript. Sli…

  • Preventing Kupfer switching to existing windows

    I am enjoying using Kupfer but I don’t like the way it switches to an existing window of an application, instead of launching a new instance. I should write a patch for a config option or similar, but for now, here are my notes on how I disabled the be…

  • Using Kupfer on MATE

    I am trying out MATE desktop and really liking it. I like to use a (GNOME-Do style) keyboard-driven application launcher, and have found Kupfer really good. Kupfer as packaged for Ubuntu MATE does not support MATE desktop, so the file manager (“Caja”) …

  • Tweetable Art Code

    Picking apart some cool code to draw pretty pictures with code that fits into 3 tweets: This comes from a codegolf question here: Tweetable Mathematical Art. Slides: Tweetable Art Code.

  • Rabbit Escape 0.3.1 – now with zoom!

    I’ve just release the latest version of Rabbit Escape, which makes things look a lot nicer because you can zoom in, getting you much closer to your rabbits: There are still 60 levels of Lemmings and Pingus -like gameplay, all downloadable for free art…

  • Treat warnings as errors in a (Gnu) Makefile

    I got hit again last night by a bug in my Makefile that meant I effectively ran rm -rf /*, which was not fun. Today I have been looking for how to make Make stop if a variable is undefined. Here’s my solution. This Makefile contains a bug (“SRCS” inste…

  • Switching Xfce to use metacity

    I am trying out Xfce and liking it. However, I’ve never found a window manager better than Metacity, so I’d like to use it. Here’s how I switched: # Install it sudo apt-get install metacity metacity-themes # Tell it how many workspaces I want gsetting…

  • Java game programming: image rendering hints make no difference to rendering time

    I am writing an Open Source/Free Software Java desktop game (Rabbit Escape) and am experimenting with allowing you to zoom in so that the images being rendered are fairly big, and I’m seeing some slow-down. [Note: Rabbit Escape is also available on And…

  • Snake in ZX Spectrum BASIC

    Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. This time, the first language I ever learned: Slides: Snake in ZX Spectrum BASIC If you want to, y…

  • fetchmail complaining about GoDaddy SSL certificate

    Update: I don’t think this fixed the problem I was getting this every time I ran fetchmail. fetchmail: Server certificate verification error: unable to get local issuer certificate fetchmail: Broken certification chain at: /C=US/ST=Arizona/L=Scottsdale…

  • Encapsulation as passing on responsibility

    I recently dealt with some code that I felt was not properly encapsulated, but in a sense that I’ve not seen articulated in this way before. Please enlighten me if I missed it. Here’s a snippet: OutputThing manipulate( InputThing input ) { Processi…

  • Snake in Ruby

    Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m writing the game Snake in lots of programming languages, for fun, and to try out new languages. Slides: Snake in Ruby If you want to, you can Support me on Patreon.

  • Batch-converting audio files to be louder (on Linux)

    My mp3 player is very quiet, so I wanted to make all my podcasts as loud as possible. First I ran this to get the programs I needed: sudo apt-get install libav-tools normalize-audio To convert each file I made a script that makes a “loud” directory, a…

  • Why Rabbit Escape is Open Source / Free Software

    Why I wanted to make Rabbit Escape Free Software, even though I also plan to sell it. Because I want to share it.

  • What is a good company?

    I’ve been trying to work out what I think would be a good company to work for. Here’s what I’ve got so far. Please comment pointing out what I got wrong and missed out. Be coo We believe a company should be a good place to work. We sum that up in one r…

  • How to make your own levels for Rabbit Escape

    A little video showing you how to make levels for my new game Rabbit Escape. There are more instructions on the Creating levels for Rabbit Escape page.

  • Rabbit Escape v0.1 out now for Linux, Windows and Mac video

    A little video to announce my new game, Rabbit Escape. Download it, play it, enjoy it, and let me know how I can improve it!

  • Rabbit Escape (a bit like Lemmings) v0.1 released for Linux, Windows and Mac

    Today I am releasing the first version of my new game, Rabbit Escape. It’s an arcade puzzle game inspired by Lemmings and Pingus, but intended to be simpler and easier to control on a mobile device. Your task is to guide a party of rabbits from the ent…

  • Snake in Groovy

    Series: Groovy, Ruby, BASIC, Dart, Elm, Python3+Qt5 I’m starting a series where I write the game Snake in lots of programming languages. I almost always use writing Snake as my way in to understand a new language, so I’ll share my thoughts about each l…

  • Programmatic equivalents of web.xml sections for Tomcat

    Most documentation for J2EE configuration is based on having a web.xml file, but I want to configure my Tomcat programmatically. Here are some of the things I have found out. Please use the comments below to correct what I got wrong, and mention equiva…

  • JAX-RS (using Apache CXF) in embedded Tomcat example

    I had serious trouble today firing up an embedded Tomcat server that serves up REST resources using JAX-RS via Apache CXF. Here’s minimal example, hopefully saving you the same trouble: src/HelloJaxRs.java: import org.apache.catalina.startup.Tomcat; im…

  • Vim persistent buffer list combined with saved sessions

    I like to use several saved Vim sessions to remember what files I was working on in a particular project. I also like to have a list of buffers I have open on the left-hand side of the screen that is always visible and up-to-date. Sometimes, the existe…

  • Snowflake Christmas card web page on the Raspberry Pi

    In this video I will show you how to make an electronic Christmas card for your friends or family using HTML and JavaScript, which means it will be a little web site that anyone can see by going to it in their Internet browser. I’m doing this on the Ra…

  • Snowflake Christmas card in Scratch on the Raspberry Pi

    In this video I will show you how to make an electronic Christmas card for your friends or family using Scratch. Scratch can work on most computers – you can download it from http://scratch.mit.edu/. Scratch is already installed on your Raspberry Pi if…

  • Encoding URLs in Java

    To encode a URL in Java, create a new instance of java.net.URI and then call toString() or toASCIIString() on it. DO NOT use java.net.URLEncoder. It is for HTML form encoding, not encoding URLs, despite its name. Each part of a URL must be escaped diff…

  • Books that changed my life

    Further Programming for the ZX Spectrum by Ian Stewart, Robin Jones Foundation by Isaac Asimov Crime and Punishment by Fyodor Dostoyevsky Structure and Interpretation of Computer Programs by Harold Abelson, Gerald Jay Sussman, Julie Sussman S…

  • Why I use Linux

    I have used Linux at home for quite a few years, and a couple of years ago I changed my work machine from Windows to Ubuntu Linux. It’s made life at work better for me. Better for me This move has made me much more productive, saving valuable time and …

  • LibreOffice spell check not working in Lubuntu

    I installed LibreOffice into Lubuntu, but the spell checking didn’t work. It turns out I need to install a dictionary for my locale: sudo apt-get install myspell-en-gb I needed to restart LibreOffice, and then I got spell checking as I typed.

  • Is it ok to represent dates as Unix time (seconds since the epoch) in JSON?

    Yes. If your JSON contains integer numbers that represent Unix time (seconds since the “epoch”), and you parse your JSON to JavaScript, the range of integers that can accurately be represented is -9007199254740992 to 9007199254740992 (ref: EcmaScript s…

  • Using hexdump to represent a binary file in Java source code

    To embed a binary file (e.g. a png image) into Java source code: $ hexdump -v -e ‘/1 “%3i, “‘ myfile.png -119, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, … Copy and paste the output into Java code like this: private s…

  • Disabling screensaver on LXDE

    Caffeine wasn’t working for me. I got an error like this: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files Bug 1280449 contained the solution for me. …

  • Android development – saving state

    Series: Setup, Menu, Drawing, non-Android, Working, Saving state. Android apps like Rabbit Escape need to save their state when asked, and restore themselves later. This happens when you rotate the screen, and could happen at various other times. Here’…

  • Android development – Rabbit Escape really working on Android

    Series: Setup, Menu, Drawing, non-Android, Working, Saving state. Up until now, you weren’t sure to believe my promises that Rabbit Escape really was going to be an Android game, since I hadn’t actually got it running on Android. Well, the wait is over…

  • Showing urgent (flashing) windows on all desktop in LXDE’s taskbar (window list) in Lubuntu

    As it stands, lxpanel’s taskbar plugin (part of the LXDE desktop you get with Lubuntu) does not show urgent (flashing) windows if they are on a different virtual desktop from the one you are looking at. This seems wrong to me (I logged Bug 682), and th…

  • Launch an urgent window using Python and Xlib with the UrgencyHint flag

    I am trying to fix a bug in lxpanel’s taskbar plugin, and needed to launch an urgent window. Here’s how I did it in a little python. #!/usr/bin/python # urgent.py — launch an urgent window (Copyright messages are at the bottom) # To use: # sudo apt-…

  • Android programming – a non-Android, Android Game

    Series: Setup, Menu, Drawing, non-Android, Working, Saving state We’re planning to write an Android game. So why would we deliberately avoid Android while we’re writing it? To make sure we’re not overly-dependent on the Android ways of doing things, an…

  • Android programming – drawing bitmaps in a game loop

    Series: Setup, Menu, Drawing, non-Android, Working, Saving state I will be talking about how to write Android programs that share code with non-Android programs. The program I will be writing is a simple game. This time we’re writing a game loop and dr…

  • Don’t use email auto-forwarding (emails will go missing)

    I’ve been trying to chase down a mysterious problem with emails going missing. The problem with things being missing is that you can’t see them, so it has been difficult to track down exactly what’s going on, but it became clear that we were receiving …

  • Fetchmail “mda” option makes emails bypass the spamassassin filter in postfix

    I have spent several months with no spam filtering in my postfix+dovecote+spamassassin+fetchmail+procmail setup, and no idea why. I had spamassassin enabled and working when I piped emails into it manually, and I had lines like this in my postfix maste…

  • Android programming – a menu using Activities and Intents

    Series: Setup, Menu, Drawing, non-Android, Working, Saving state I will be talking about how to write Android programs that share code with non-Android programs. The program I will be writing is a simple game. This time we’re making a simple menu struc…