Generating Even and Odd PostgreSQL Databases for Replication

I was recently faced with a problem of replicating two PostgreSQL databases with bucardo. The replication was to be in a master-master fashion so that the databases could be updated on both ends. Although this task can easily be handled by bucardo it requires that the two different systems generate completely different sets of primary keys. According to the Bucardo website (http://bucardo.org/wiki/Bucardo/Sequences) there are three ways of achieving this difference. Continue reading

Posted in How To do Stuff, PHP | Tagged , , , , , , , , , , | Leave a comment

Getting FLEX-ible with GEdit (Ant Style)

A while ago I had a post on this blog which described a crude way of using Gedit as an editor for Flex code. An interesting comment on this post actually got me thinking in another direction I had previously not thought about … using a build system. For those of you lost on the whole build system thing, a build system is simply a software which helps you to build source code in an “easier” way. This particular comment actually recommended the use of the ant build system. After a little research and some playing around with Gedit, Ant and Flex I kind of figured out this simple way to build flex projects in Gedit using Ant.
Continue reading

Posted in Flex | Tagged , , , , , , , , , , | 1 Comment

The Magic of Embedded Webservers

Sometimes non web-based applications you build may be installed on servers which are not physically accessible to you. In such cases you might want to rely on configuration files and log files to find out the status of your application. This may be cool in cases where you have very few or simple applications to manage. However, when the complexity rises, log files may no longer be easy to read and you may find yourself asking questions about variables in your own configuration files. Trust me these scenarios can get really frustrating and that is why you might want to consider embedded web servers. Continue reading

Posted in How To do Stuff, Ideas, Java | Tagged , , , , , , , | Leave a comment

Soft Shadows in OpenOffice.org using Gimp

There is no doubt about the fact that soft shadows make any piece of graphics stand out. It adds that extra touch of professionalism to any illustration and it makes the illustrations look and feel just right in any document or presentation (if properly used). I have been using Open Office for a while and after several hours of combing Google just to find a way to create soft shadows in OpenOffice, I only came up with this page which happens to be a page on the OpenOffice.org issue tracker requesting the same feature. This means that it is still a work in progress (and you can vote for it to give it a higher priority). In the mean time, while we wait for the guys at OOo to code this feature for us, we can actually play around with GIMP and open office to produce some rudimentary soft shadows which also look good.

Continue reading

Posted in How To do Stuff, Ideas | Tagged , , , , , , , , , , | Leave a comment

A JavaScript MP3 Player Tutorial

Lots of things go on around me yet making the time to write them is quite difficult. Well now I have made it a point to share some knowledge all the time so this time I am going to do a little piece about how an MP3 player can be implemented in JavaScript with the help of Adobe Flash, through ActionScript 3. I noticed this trick was being used on several websites. It took me a while to actually figure out that they were using a flash object to handle the playback of the MP3. I thought it was cool and I am sure there are several people out there who want to implement similar ones of their own. So in this post I am only going to help you build a basic player so that you would at least get the Idea. I believe that with the idea firmly understood, you could extend this to do just about anything you would want it to. This sure promises to be fun.

Continue reading

Posted in How To do Stuff | Tagged , , , , , , , | 4 Comments

Compiling PortMidi in Windows with Eclipse/MinGW

Why I did this?

Over the past few weeks I have been working on this project which in some ways uses MIDI. I have primarily been working in Linux  but I had plans of porting the finished application to windows. In order to convince myself after a while that my approach would work, I decided to try to compile the unfinished app in Windows. Continue reading

Posted in How To do Stuff, Ideas | Leave a comment

PHP/HTML Forms Made Easy

Introduction

I must admit here that one of the most annoying things for me when I was learning how to develop PHP/HTML applications was designing those HTML forms. Point blank, it sucks! It is very painful validating your data and doing all the other crap that comes along with that HTML chore. Don’t tell me about DreamWeaver and all those other WYSIWYG editors, they just don’t work for me.To solve my own problems, I decided to build a library to help me on the whole forms thing. This was actually inspired by the concept of the forms api in the Drupal content management system and the code igniter framework. I just didn’t use either because I wanted to be able to do something of my own so I could just extend it to do whatever I wanted without going through lenghty documentation. Trust me, the time invested is sometimes worth it. This forms library I am talking about has already been used in a couple of applications already (some by me and others by some very good developer friends of mine). This probably means that it has undergone some amount of testing already. I cannot stick my neck out that it is very secure and I can also not stick my neck out that it is very stable but one thing I can tell you is that it works.

Continue reading

Posted in How To do Stuff | Tagged , , , , , , , | 1 Comment

Getting FLEX-ible With GEdit

For a long time I had always wanted to develop for the flash platform but the huge cost of the authouring suite always put me off. I tried a couple of open source ways to develop for the platform but none of them really worked well for me. Earlier this year during a random escapade on the Internet I came accross Flex. Continue reading

Posted in How To do Stuff | Tagged , , , , , , , | 4 Comments

Is there really an easy way?

I must say that its been quite a while since I expressed myself on this blog. I know this sounds like the regular cliche excuse but I have been busy. I have also been very broke. Sometimes it feels like I am living the broke but almost rich lifestyle. So now that I am done with the excuses I would like to continue with my post. In the past month, I have been working on this crack down of a project with some software development company. Through this project I have had the opportunity to meet a few of the developpers who actually turn the IT wheels here in Ghana (although there are technically three people working on my project and the other two are not related to this articvle). I am trying hard to learn a lot about this “IT business” as it is called in Ghana but my first lessons have not been pleasant ones. Continue reading

Posted in What I think | 2 Comments

When PHP goes BOM! on Internet Explorer

I was recently working on a web content management system with a friend and we made a very surprising discovery. We were actually using PHP to include content from another page on our local server unto the page that was curently being viewed. This thing worked perfectly when I was using the Eclipse editor but when I moved to my friends office and we started using Expression studio (which obviously doesn’t seem to support PHP), the include statement started introducing unwanted characters. Although most of the browsers on which this was tested (Opera, Safari and FireFox) skipped these characters, IE of all browsers displayed them and messed up our template. Well we started to panic because we didn’t know what we had done wrong and IE is one browser you don’t want to mess with because everybody uses it.

Continue reading

Posted in What I think | Tagged , , , , , , , | Leave a comment