Blog Archive Android App v1.6

Date: 09 Oct 2010
Tags: [ java ]  [ joindin

Today I have pushed the v1.6 release of the Android app to the market. A lot of things has changed, so it probably would have been more suited to rename it to v2.0. Here is a list of changes, plus a simple manual on usage.

Testing encoders for PHP

Date: 14 Aug 2010
Tags: [ encoding ]  [ PHP

A friend of mine posted a tweet about problems with Zend Guard just the other day. My friendly advise was: try using another encoder. Which he kindly ignored :) Which on my turn again made me wonder: how many encoders are out there, and more important how easy are they to work with?

Creating a traceroute program in PHP

Date: 30 Jul 2010
Tags: [ ICMP ]  [ IP ]  [ PHP ]  [ traceroute

Today i was reading upon this wonderful article about writing a trace-route program in Python in 40 lines. Even though trace-route is one of the many tools i use on day to day basis, i never really got into writing a version myself (something I like to do just to gain knowledge how things works). So when I was reading this post, i thought, Python is nice, but is it possible to do it in PHP as well? The answer to that: yes and no..

Minimizing cache stampedes

Date: 29 Jul 2010
Tags: [ jumanji ]  [ memcache ]  [ PHP ]  [ stampede

Caching is THE magic solution when it comes to optimizing your web applications. There are a lot of caching strategies and applications outthere. Some prefer MySQL query caching, others use memcache to cache either queries, objects, html or other data. However, one of the biggest problems that a lot of people tend to ignore with memcache or other caching daemons is dealing with stampedes. This phenomenon occurs when for instance the caching server is unavailable (because the instance is down, or due to network issues) or, most of the time, when the time to live of an object expires.When that occurs, all your processes will ask the cache for data, find that it’s not present and will try to generate it for you.

Moving from windows to mac

Date: 24 Jul 2010
Tags: [ mac osx

Even though most of my work is done on Linux systems, my laptop and home-systems are installed with Microsoft’s Windows. Even though I don’t want that OS anywhere even remotely near my servers, I think it still is the best system for day to day use. All the software I need is on there, I’m used to the interface and when maintained properly (ie: remove all unneeded services and programs, clean it up etc on a weekly basis), it’s stable enough to say I can leave my systems running for weeks without any problems. Suffice to say, i’m happy enough.. at least, I though i was.. until 2 weeks ago…

Passing the LPI-1 and LPI-2 exams

Date: 30 Jun 2010
Tags: [ certification ]  [ linux ]  [ lpi

I’ve just finished my LPI-201 and LPI-202 exams, which you both need in order to receive your LPIC-2 certification. Even though I’ve used Linux professionally since before 1998, I still wasn’t as easy I though it would be (but then again, you shouldn’t take them right after each other). I was kinda hoping that my experience would roll me through the program, and guess what, with some help of some test exams, it did :)

Deflating the universe

Date: 02 Jun 2010
Tags: [ compression ]  [ deflate ]  [ gzip ]  [ huffman

Compression is used all around us every single day. You (or your girlfriend/wife most likely) folds your clothes nicely so they all fit in your closet. When recycling, you flatten the cardboard milkboxes so they take up less space and you probably even text your friends with messages like: “hi, how r u? w r u? cya, xxx”. Stuff like that.

In the computer world, compression probably plays even a more important factor. When compressing data, it take less space and thus less time to send it over to somebody else through internet. Years ago, you bought a 100MB harddrive and use special software to increase the capacity to (up to) 200MB (doublespace, stackspace for those who can remember). It all uses compression one way or the other.

Some compression methods can compress and decompress in such a way that the decoded output is exactly the same as the original. For instance, gzip and deflate. It’s called lossless compression since no data is lost during the compression/decompression. Other compression methods don’t. For instance, JPEG or MP3 compression creates smaller copies of the original but they can never be decompressed back to the original format. Colors that are very similar (but not quite the same) are converted into 1 single color during JPEG compression. Or inaudible sounds are removed from an audio file when compressing to an MP3. With JPEG or MP3’s, for most people this is not an issue. The images are perfect enough for normal usage, and the audio quality of mp3’s are also good enough for the average use (although I know a few persons who want to kill me for saying this :)).

In this article I will talk a bit about the deflate compression method. A compression method used throughout the whole internet and probably the most used compression algorithm today.

Bit manipulation in PHP

Date: 02 Jun 2010
Tags: [ bit manipulation

Although you probably never need it as much as a C-programmer would, it’s not a bad idea to know how bit manipulation works. This post will tell you a bit about what bit manipulation is, why you could use it and how you are using it already (with or without knowing)

Suits v. Techies.. the neverending battle..

Date: 19 Apr 2010

Developers are proud of their work. The best way to get unhappy developers is to force them to create and deploy some crappy software. Sales however, does not care about crap software.. it just needs to work, it needs to be created quickly and cheap so they can sell even more…

Both departments have conflicting interests that 9 out of 10 times the developer will loose.. After all: at the end of the month, it’s the customer who pays the developer salary (and sales’ big bonuses). So, 2 departments, 2 different interests. Normally, the project manager is the person that sits between sales (or management) and development. It’s his job to make sure projects are constructed according the specs of the client, on time and on budget. Not an easy task when the two sides you are working with are in constant state of war.

As said, the sales department never really looses a battle since they generate money, while development generates code. How well written this code is, is never really an issue for a customer. But what if it actually is? Android Mobile App

Date: 11 Apr 2010
Tags: [ Android ]  [ joindin

When you visit PHP conferences nowadays, you’ll notice a lot of talk about the website ( It’s basically a site where you can register a conference, all the lectures and as a visitor of those conferences, let the speakers know about what you think off the lecture. It’s a very good way for speakers to learn and perfect their presentations. It’s also a pretty awesome site (who’s code is available on github!) and new features are added around the clock.

CybOS - Part 1 : In the beginning, there was 0x7C00

Date: 11 Feb 2010
Tags: [ cybos ]  [ operatingsystem ]  [ tutorial

Welcome to the first part of CybOS. We talk a bit about the bootsector. From part 2 on, everything is “kernel based”, which means we have setup the system and jumped to our main kernel. From there, things get really interesting so I jump a bit fast to the boot code. However, in the end of this post, the source code for the bootsector (and second stage loader) can be found so you can see what’s going on.

CybOS - A tutorial OS

Date: 10 Feb 2010
Tags: [ cybos ]  [ operatingsystem ]  [ tutorial

Somewhere in 1998 or even earlier, I started my own little project in creating a - functional - Operating System from scratch. Not a linux clone and not a MS-DOS wannabe. Just  a simple OS that is functional in such that some tools, games etc could actually work, not caring about Posix compliance, fancy graphics or all hardware support you can think  of..

So, today, 12 years later, where are we?

Cardinality & Selectivity

Date: 07 Feb 2010
Tags: [ MySQL

Cardinality and selectivity are two keywords that are very important when dealing with optimization in MySQL queries and indexes. This article will go a bit in depth on both terms and tries to let you understand their usefulness…

Handling binary data in PHP with pack() and unpack()

Date: 14 Jan 2010
Tags: [ PHP ]  [ pack ]  [ unpack

Nowadays most lowlevel functionality like reading or writing graphics are taken care of 3rd party libraries and that’s ok. It’s way to complicated to do things right and you probably want to focus on outputting or sending a PNG instead of construction one from scratch. While reading and writing these kind of binary data was normally done in languages like C or even assembler, most higher level languages still have these capabilities and yes, even PHP… Meet pack() and unpack().

Your email address is invalid. Please enter a valid address.

Date: 28 Dec 2009
Tags: [ email ]  [ validation

Error: Your email address is invalid.

Every time I see those or similar words when I fill out a registration form I start to cry a little. It’s not my email address that is invalid, it’s the websites email validation functionality and it’s a great and effective way to loose visitors and/or customers quickly.

TinyMCE Keyword plugin

Date: 27 Dec 2009
Tags: [ keyword ]  [ opensource ]  [ plugin ]  [ TinyMCE

TinyMCE is truly a remarkable editor. It’s the one I’m typing in now.. it’s the one we use for letting our e-commerce customers use for editing pages and it’s the one we use in our SiteManager5 CMS. You receive a fully down-gradable wysiwyg javascript editor which for non-technical users is very intuitive and thus easy to use and the best part: it’s completely customizable through their plugin-system.

Covering indices

Date: 22 Dec 2009
Tags: [ covering ]  [ index ]  [ MySQL

It’s almost to easy to use a SELECT * FROM query in your code. First of all, you instantly get all the fields from your database so you don’t have to worry about changing your queries when you decide to use other fields (in case you don’t use a DAL). However, there are some drawbacks on a SELECT * method,.. the most famous one: it takes more time to retrieve all fields instead of the fields you actually use.. but that’s NOT the most important reason why you should not SELECT * FROM queries..

The main reason? Covering indices…


Date: 21 Dec 2009

A lot of people are telling me to write some posts because I apparently have interesting stuff to say once in a while. This is the place I have picked out to do so. Since I don’t have a single area of expertise (or one could say, I’m an expert in ALL area’s :)), this will probably be a place of a lot of stuff you will find interesting, and a lot of things you don’t. Don’t worry, you are not alone :)

Big O notation

Date: 21 Dec 2009
Tags: [ Big-O ]  [ PHP

Normally you would develop against a test-database. It probably contains about 10 people so you can do your programming and testing.. Once it’s done and QA’d, it will go live and people start to visit the site. After a year or so,.. the site is too slow. Adding more db servers is of no use, your system administrator is spending his holiday inside the my.cnf’s and after dumping a gazzilion GB’s of extra memory to the systems doesn’t help at all…  Sounds like it’s the code that’s falling behind.. it cannot cope sorting or handling user lists of 40.000 people, or arrays with more than a million items and even simple validation functions are way to slow.. why? what just happened?