Paulmohr’s Weblog

Open source developer personal weblog

What I have been doing

To see the antfarmgl project blog, use this link.[]

#!/bin/bash rm ants gcc -pg antfarmgl.c sighandler.c afopengl.c listman.c files.c \ -lglut -lGL -lGLU -lm -lasound -ljpeg -lgpm -o ants if [ -e ants ] then ./ants echo "There are ants here!" gprof -b ants gmon.out > results-file.txt kprof -p gprof -f results-file.txt else echo "There are no ants here!" fi

The important thing to notice in “gcc” is the use of the “-gp” option which generates the profile code in “gmon.out” .

I thought I would give this as an example of how to use gprof, gcc, and kprof to profile code for speed. I have used valgrind, ltrace, objdump, nm, strace, xtrace, mtrace, gdb, core analysis ( with ulimit -c 50000), and diagnostics incorporated in the code itself. I think that debugging and code analysis is an absolute necessity in any project. I discovered numerous little things that I did not know even existed. Documentation is another place that must be done right.

Interpretation of the results is a whole separate issue. Years of computer experience have taught me how and where to look and how to interpret the relationships. One interesting thing that I discovered is duplicate calls due to many levels of include. It is difficult to know when things like this happen without the proper tools. So I have a call that calls a library that in turn duplicates a call to an associated function. I would never expect that to happen, but it does.

I can bet that there is some really weird code running around in the Windows world. The reason I think that is because it grows in the dark under pressure and can never be checked. I have done commercial development and I know that I was not allowed to spend the time to do appropriate code testing and analysis, simply because it was extra cost. It can cost twice or even ten times as much to make gospel code. It is worth it to me, as I can easily find flaws in the code, because those thousands of little things that creep into a complex system have been removed proactively.


March 27, 2009 Posted by | Uncategorized | Leave a comment

My sourceforge project

I have been developing an open source project for the last year and I am finally getting the hang of using all the tools. I can that I now can use SSH, sftp, Doxygen, automake, LaTex, Python, perl, HTML, CSS, “C”, C++, svn, diff, patch, XML, XUL, OpenGL, javascript, Pygame, and the debian package system. I should look at WordPress project as it seems it would be using XUL, but I guess I will find out when I have some time to look it up.
My project at sourceforge is shaping up and there is a simple snapshot there, and I hope to have the Python and “C” “Ant Game” ready for download this week. I am also making a complete multipage tutorial that covers all the simple openGL techniques in “C” and Python. The range is from simply opening a window to compiled elements, perspective, joystick, models, terrains, and some Linux specific Xwindows methods to use xtrace.

I looked up the documentation on wordpress and I see it is PHP and Mysql. That seems to be very much like wikipedia source if I remember correctly when I installed it on my server. It has an interesting history. I, for one, welcome our new wordpress overlords. I have recently started doing PHP and Mysql seriously and perhaps I will get the source and do the nightlies to help out.

March 14, 2009 Posted by | Uncategorized | Leave a comment

WordPress advantages

I have been blogging with Google for some time and working on a project on sourceforge called antfarmgl. As part of the features of the hosting is WordPress and I have come to appreciate that it is a better interface and is open source so I think I will confine my efforts here. I have a blog and web site for the project and they are:
antfarmgl website
sourceforge antfarmgl project
anttfarmgl blog
antfarm blog

March 14, 2009 Posted by | Uncategorized | Leave a comment