Ferry Boender
Programmer, DevOpper, Open Source enthusiast.
I’m writing a daemon and needed a method of redirecting anything that gets sent to the standard out and standard error file descriptors (stdout and stderr) to a logging facility. I googled around a bit, but couldn’t find a satisfactory solution, so I came up with this. import logging import sys class StreamToLogger(object): “”” Fake […]
(The lastest version of this article is always available in from this location). 1. Introduction A (Finite-) State Machine is a method of determining output by reading input and switching the state of the machine (computer program). Depending on the type of State Machine (more on this later), the state of the machine is changed […]
There’s an interesting on-going series of articles on file system latency over at Brendan’s Blog. Usually when system administrators look into I/O performance, we look at the I/O of the disks. This is usually fine for a rough estimate of raw disk performance, but there’s a lot more going on between the actual application and […]
When is a closure useful? Before we start with why a closure is useful, we might first need to understand what exactly a closure is. First-class functions In order to understand what a closure is, we must realize that in many, if not most, languages we can not just call functions, but we can also […]
It’s only logical, but I hadn’t really thought about it much. Turns out Regular Expression can be vulnerable to external Denial of Service attacks.
Lessons on development of 64-bit C/C++ applications: The course is devoted to creation of 64-bit applications in C/C++ language and is intended for the Windows developers who use Visual Studio 2005/2008/2010 environment. Developers working with other 64-bit operating systems will learn much interesting as well. The course will consider all the steps of creating a […]
Many people may not now, but you can comment your MySQL schema: SQL: good comments conventions
Maatkit is a suite of command-line tools for MySQL. It contains some rather nifty things for query analyses, replication, and other stuff. Some of the more interesting highlights: mk-deadlock-loggerExtract and log MySQL deadlock information. mk-log-playerSplit and play MySQL slow logs. mk-error-logFind new and different MySQL error log entries. mk-index-usageRead queries from a log and analyze […]
I finally found a decent replacement for the MySQLcc database browser: SQuirreL SQL SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc It’s Java, so it’s slow, but it does everything I want, and […]
Preface Randomly selecting elements from a set of items is easy. Just generate a random number between 0 and the length of the set minus one, and use that as an index in the set (if it is an array) to get a random entry. The chance that an entry is picked is the same […]
Search this blog:
The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.