Electricmonk

Ferry Boender

Programmer, DevOpper, Open Source enthusiast.

Blog

Category: programming

Python destructor and garbage collection notes

I hardly ever use destructors in Python objects. I guess Python’s dynamic nature often negates the need for destructors. Today though, I needed to write some data to disk when an object was destroyed, or more accurately, when the program exited. So I defined a destructor in the main controller object using the __del__ magic […]

pyBrainfuck v0.2 released

I just released v0.2 of pyBrainfuck. PyBrainfuck is a speed-optimized Brainfuck interpreter written in Python. Some other Python interpreters already exists for Brainfuck, but they are either obfuscated or awfully slow. PyBrainfuck has been optimized for speed by doing various preprocessing on the code such as pre-caching loop instructions, removing non-instructions, etc. PyBrainfuck also has […]

Why Python Rocks II: Data structures

Okay. So what’s cool about Python? I can’t count the number of times I’ve had to show skeptics why Python is cool, what Python can do that their favorite language can’t do. So I’m writing a bunch of articles showing off Python’s Awesome. All articles in this series: Why Python Rocks I: Inline documentation Why […]

MiniOrganizer v0.1 released

I just released the first version of MiniOrganizer. MiniOrganizer is a small no-nonsense personal digital organizer written in GTK2, featuring appointments, todos and notes. It uses iCalendar files as its native back-end, supports multiple alarms per appointment/todo and has recursive todos. MiniOrganizer currently features: Appointments. Hierarchical Todos. Multiple alarms per appointment and todo. Alarm notification. […]

Breakpoint-induced Python debugging with IPython

Most of the Python programmers out there will know about IPython. Most of them will also know about the Python Debugger (PDB). IPython has an advanced version of PDB (spectacularly named ‘ipdb’) which does the same for PDB as IPython does for the normal interactive Python interpreter. It adds tab completion, color syntax highlighting, etc. […]

Why you shouldn’t be using S3 or Google App Engine

Recently a new ‘hype’ has been popping up, namely Amazon’s S3 and

Why Python Rocks I: Inline documentation

Okay. So what’s cool about Python? I can’t count the number of times I’ve had to show skeptics why Python is cool, what Python can do that their favorite language can’t do. So I’m writing a bunch of articles showing off Python’s Awesome. All articles in this series: Why Python Rocks I: Inline documentation Why […]

Links

Here are some random links to interesting stuff: FirePHP FirePHP is a PHP debugging library and a Firefox plugin which allow you to output debugging information to the Firebug debugging panel. Since it doesn’t intermingle debugging information with your page output, but writes in a special HTTP header instead, it’s especially useful for AJAX debugging. […]

pyBrainfuck

For fun, I wrote a brainfuck interpreter in Python. Brainfuck is an esoteric (joke) programming language which is Turing-complete (given enough memory) with only 8 op-codes (instructions). It was designed to allow for the smallest possible compiler. There are already some other Brainfuck implementations in Python, but they are either obfuscated or extremely slow. pyBrainfuck […]

SQL: Remove duplicate rows

In the post SQL: Find duplicate rows I explained how you can find duplicate rows in a table. However, if you want to delete them, you’ll run into a little problem as you have to delete all the duplicate rows except for one. Lots of solutions are floating around on the Internet, but most either […]

The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.