Random thoughts, How loud can I scream in void ?

To content | To menu | To search

Software development

Computer programming (often shortened to programming or coding) is the process of writing, testing, and maintaining the source code of computer programs. The source code is written in a programming language. This code may be a modification of existing source or something completely new. The process of writing source code requires expertise in many different subjects, including knowledge of the application domain and algorithms to implement the desired behavior. Within software engineering, programming (the implementation) is regarded as one phase in a software development process. There is an ongoing debate on the extent to which the writing of programs is an art, a craft or an engineering discipline.

Entries feed - Comments feed

Saturday, June 6 2009

Most brilliant company idea for the open source community!

Three weeks ago, I've received an email from someone who was reporting a bug in my ftwin open source tool. The professionalism of its message was astonishing : He was including a reference number ("Report 001"), with two sections ("Steps to reproduce", "Possible Solution"), including a patch...

Continue reading...

Thursday, February 12 2009

How to cleanly build apr_dbd_mysql.c on Ubuntu Server

<disclaimer> I am not an administrator, but only a developer that likes things the most cleanly done.</disclaimer>

Obviously, you can't rebuild only the apr_dbd_mysql.c, because /usr/include/apr-1.0/apu.h defines APU_HAVE_MYSQL to a 0 value.
And the whole apr-util library with its apr_dbd frontend has been compiled without mysql support. It would have been nice to actually be dynamic, i.e. be able to load apr_dbd_mysql.so on the fly, but it can't.

Thus, the clean solution will be to rebuild the whole aprutil package. Don't worry, it's an easy task with dpkg tools.

$ sudo apt-get install devscripts build-essential fakeroot
$ apt-get source libaprutil1
$ sudo apt-get build-dep  libaprutil1
# The apr-util-1.2.12+dfsg name is susceptible to be different according to updates.
$ cd apr-util-1.2.12+dfsg
# Change one parameter in the configure script command line
# To add a --with-mysql in the following line
$ vi debian/rules
$(CONFFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-layout=Debian --with-apr=/usr/bin/apr-1-config --with-ldap=yes --with-dbm=db46 --with-sqlite3 --with-pgsql=/usr --without-gdbm --without-sqlite2 --with-mysql --with-berkeley-db

NB: In my case, the full version number for this package was 1.2.12+dfsg-3, thus I've incremented the revision from -3 to -4 in order to update cleanly the currently installed package 1.2.12+dfsg-3

# Add a message, and change the revision number into changelog and files :
$ vi debian/changelog
apr-util (1.2.12+dfsg-4) unstable; urgency=medium
 * Add mysql support
 -- Francois Pesce <francois.pesce@gmail.com>  Wed, 11 Feb 2009 23:51:32 +0100

$ vi debian/files
libaprutil1_1.2.12+dfsg-4_i386.deb libs optional libaprutil1-dev_1.2.12+dfsg-4_i386.deb libdevel optional libaprutil1-dbg_1.2.12+dfsg-4_i386.deb libdevel extra

NB: If unit tests failed, as it was the case for me, just comment out the C code line from the incriminated test suite. (In my case, I have commented out reslist test like this:

//    abts_run_test(suite, test_reslist, NULL);
# Launch the rebuild
$ debuild -us -uc
# Now the package should have been created in upper directory.
$ cd ..
$ sudo dpkg -i libaprutil1_1.2.12+dfsg-4_i386.deb
$ sudo dpkg -i libaprutil1-dev_1.2.12+dfsg-4_i386.deb


That's it !

Sunday, May 18 2008

Releasing osim source code

I have decided to release osim source code today, after having stopped the development of it a few months ago. Most of you don't even know that it is the command-line program behind this. And you probably don't realize how tough this decision is for me. I can explain this difficulty just by saying that it is one of the longest non-professional project that I've carefully followed with feedback from users, and if not daily, at least weekly improved. Please, follow me in this little journey through osim's life... it began in July 2006, and ended in October 2007.

Continue reading...

Sunday, December 9 2007

Comparing libtar vs libarchive in ftwin

libtar and libarchive are libraries used to access the content of a tar archive (and other kind of archives for libarchive). I've used both of them to implement the comparaison of files from an archive and regular files in ftwin, here is my comparison of these libs...

Continue reading...

Saturday, September 29 2007

ftwin finds similar images thanks to libpuzzle

After a little feature for the 0.4.0, I was looking the news @ freshmeat, and found a fabulous library to try !

Continue reading...

Sunday, September 23 2007

ftwin 0.3.1 out

ftwin 0.3.0 out (Updated : 0.3.1) , several bugs fixed thanks to your feedback.

Continue reading...

Monday, September 10 2007

I for one welcome our new useless tool

As a docile linux user, I always do backup of backup of backup... and duplicate at will files here and there into my home directory ...

Continue reading...

Friday, June 1 2007

Optimizing hash function by with genetic algorithm

My goal, during the three weeks of vacations that I took in the month of May, was to use genetic algorithm in order to develop best random values of arrays used in Pearson's Hash, Universal Hashing and Zobrist Hashing for a fixed (even if it's big) set of elements to hash. Even if that was an interesting project on many of its aspects, like the design of an adapter/wrapper object in C, or the re-usage of my good old genetic algorithm library, it was quite a failure as I don't like the results it gives. I think I should improve the mutation and the cross-over functions to minimize impact and compute best genetic individuals from these modifications, there's still work to do.

Continue reading...

Tuesday, March 20 2007

Counting number of on bits in C

A small .c file that shows (on linux) the performances of different algorithms that count bits in a number, no surprise, precomputed tables still wins.

Continue reading...

Friday, March 9 2007

Of speed and random

An example of premature optimization that breaks software development.

Continue reading...

- page 1 of 2