Older blog entries for drivers (starting at number 6)

Well, I am now officially the Documenter for ClanLib.

I'm also working on writing a multiplayer ClanTTT (Tic-Tac-Toe), network multiplayer game. Of course it's only an example. I will use it as a basis for a ClanLib tutorial. (The current tutorials (not written by me) are way out of date.)

I got one of the two lead developers to join Advogato. If some people could certify him as a Journeyer, that would be cool. Then he could actually sign himself up on the project page. Funny how "observers" can't sign themselves up even to their own projects. He's mstarch.

I have been studying object oriented architecture and design, along with trying to figure out the architecture of ClanLib, in order to write documentation for it. For the longest time I was stuck because the inheritance tree didn't make sense. There is a CL_Target interface, which is something you can draw on. Then there is a CL_SurfaceProvider which instantiates images that can be blitted to the screen. Then there is a CL_Canvas, which acts as both a CL_SurfaceProvider and CL_Target. That is, you can draw on it, then use it to instantiate a CL_Surface. A CL_Surface is packed into a special format designed for fast blitting to the video card, not for drawing on. In fact, the data may be cached on the video card. For some reason (probably for the benefit of CL_Canvas) CL_SurfaceProvider (which is an interface class) inherits from CL_Target. Yet, not all surface providers are intended to be Targets. Most surface providers just load an image from a file, or the resource manager. So I asked why they made it the way they did, and suggested an improvement if there wasn't a reason. That is, make CL_Canvas use multiple inheritance of interfaces, both CL_Target and CL_SurfaceProvider. I haven't heard back from the mailing list yet. I'm new to this so maybe it's some kind of social mistake to suggest an improvement (stated as a question) without knowing the whole situation, and without providing a patch (and testing it out yourself to see if it is feasible). Who knows. We shall see. Actually I just wanted to ask if I was way off base before I tried changing the code.

9 Oct 2000 (updated 9 Oct 2000 at 20:56 UTC) »

I am currently in the preparation phase of jumping into free software development. As I said in my previous diary entries, I am focusing on a project that is under active development (clanlib) by other people. I started reading several books (Game Architecture and Design; The C++ Programming Language (Stroustrup); Design Patterns; Object-Oriented Analysis and Design with Applications (Booch) in that order) before settling on the last one, as I believe that will give me the necessary background to (maybe) do what I want to do.

I have been wondering, to what extent, in the free software realm, do people use C++ as opposed to C. How much do they use C++ as more than [just] an improved C, with focus on the object model? (abstraction, encapsulation, modularity, hierarchy, typing, concurrency, and persistence) To what extent do they use a process and/or notation to design/document their software. Any free software projects out there I can look at as a good example? Or have I been reading too many books and need to face the real world? :)

(if someone replies to this directly, could you drop me a note so I don't miss it scrolling off of advogato: drivers AT reflexnet DOT net (two "nets"))


nymia, Dodger: Like I said, Source-Navigator would be useful if it would graph all references between classes, not just inheritance, and not just some references but not others. I also thought that a graph of function calls in a C project would be something it would have but it doesn't appear to.

vi and ctags: I hadn't heard of ctags so I did a little searching around and found flIDE "frontend on top of Exhuberant Ctags and make. It works very well in combination with any editor that can take filename/linenumber arguments, such as nedit, emacs or vi" Very interesting.... I'm also going to check out Code Crusader when I get home. It appears to have some of what I am looking for, maybe.


Currently looking for the ultimate source code analysis tool. I discovered Red Hat's (formerly Cygnus's) Source Navigator which they recently released under the GPL. I was somewhat disappointed that it doesn't do everything I thought it would. (For example, you can show a graph of references, but some reason it doesn't consider having one class a member of another class to be a reference, but it does if you declare an object of that class in a member function.) But I don't know if there exists a free tool that does what I want.

ian: Never work for a husband/wife team. I have and I regretted it. So have my friends at different companies.

3 Aug 2000 (updated 16 Oct 2000 at 16:28 UTC) »


or, scratching the itch. I decided the best thing I can do to help ClanLib at this point was to volunteer to do documentation. Reference documentation for the API, classes, functions, etc. to tutorials, and F.A.Q.'s. One of the things I want to do is, in developing this documentation, read over all the source code so I really understand what it is doing. Then I will be in a position to do more extensive testing, debugging, or even working with the developers to add new features. As well as explaining the "why" behind the system to make it easier for both developers who use clanlib and developers who work on clanlib. At least that is what I imagine at this point. I just don't get the feeling that the current developers do everything with the most attention to detail, and this seems like a way to go over the architecture with a fine tooth comb and find the boring details that they may have missed in the code because it works "good enough" for themselves. Documentation is also one of the major weak points of clanlib now.

I have the day off of work today, because I switched to a 9x9 schedule (work 9 hours for nine days, then take every other Friday off). I think it's different than a weekend because then I usually want to just do too many things at once. Today I want to focus on source code.

I got tired of the noises coming from my computer. I've tried everything I could, buying replacements for my power supply and cooling fans but they still suck. Even supposedly quiet fans from pcpowercooling.com... The wall next to my computer desk has a panel for cable TV outlet, so I opened that up on both sides of the wall and passed the keyboard/mouse/speaker/monitor wires through the wall. Now I have peace and quiet, except birds chirping outside which are nice.

Finally, I upgraded the ram in my linux box last night from 32MB to 96MB. Now I can run Netscape under GNOME without it acting like... something really slow.


ESR says in "how to become a hacker" (I just finished reading his Cathedral and the Bazarre book) that you can't really learn to program from books, you have to read other peoples' code (and write your own of course). So I decided to start simple. How do the FSF and BSD projects compare in terms of they implement the very useful utility true(1)? BSD's version was something like:

int main(void) { exit(0); }

plus some optional strings for version control and copyright statements to show up if you run strings(1) against it.

The FSF version was about 10 times as complex. It implemented a --help function to print a help screen where --version was the only other option. It called several other functions related to locales, checking if POSIXLY_CORRECT was set in the environment, the return value was a #defined value instead of 0... tabs were two spaces... strings were passed to a function named "_" (underscore). Very idiomatic, I guess, is the word for it.

Oddly enough, running "true --help" on my Linux-Mandrake box does not produce any output, but I can see the help text running "strings /bin/true". Did Mandrake change their version of true(1), or is something more bizarre going on? (POSIXLY_CORRECT is not set in my environment so...) These are very important questions to discover! :)

Hello world. This is my first diary entry on Advogato. As you might expect, I learned what Advogato is about from the infamous Salon article. I am an advocate of Free Software, but I have not yet really contributed to the movement (reading Slashdot all day doesn't count). I decided to get an account on Advogato because I want to start contributing, and I figure writing diary entries here documenting my progress would be a good motivator.

My interest is programming games, and all the interesting fields that are used in game programming. I couldn't get a job as a game programmer (you have to have published games to get into the industry; go figure). Even in my current job, I do not really do any programming. I want to be a software engineer, but judging from the want ads I need three years of programming COM (for instance) on Windows to get a job. (Interesting how putting your excuses into words makes it easy to see how thin they are.) The reason I mention all that is I suffer from frustrated programmer syndrome, and this is also a strong reason I want to get involved in free software development.

I have been keeping an eye on the development of a project called ClanLib. ClanLib is a cross-platform Game Development Kit. It is written in C++ and is designed to be used by C++ programs. It might sound similar to SDL, but I think SDL is more suited for porting existing programs to Linux, and is intentionally much lower-level (the S stands for "Simple" after all). ClanLib is supposed to provide a lot of the services you would use in any game, and if you program everything through the ClanLib API, you can compile the same program on Windows and Linux (and purportedly BeOS but I haven't tried that). Under Windows, it uses DirectX to accomplish its services, and under Linux it can use several graphics targets. It also handles a lot more than the graphics, and seems to be very modular in terms of adding new display targets or API features, which I won't go into since you can just look at the web page.

A combination of looking at the sources of ClanLib, trying to follow the design discussions on the listserv, and trying to create my own game using ClanLib led me to a long side diversion of trying supplement my knowledge with books. The C++ I learned was from 1991, and a lot has changed since then that I needed to know if I was going to contribute, such as Design Patterns, Standard Template Library, and so on. Not only that, but how to design and architect a game. Right now I am reading Stroustrup's tome, as well as Game Architecture and Design by Andrew Rollings and Dave Morris, which I highly recommend.

I think ClanLib has a lot of potential, but I don't see many people using it. I see people starting new projects using SDL instead of ClanLib, and I think part of that is that the tutorials and documentation are very poor right now. I think enhancing the documentation and reading through the code may be beneficial, and I think I could try submitting a patch to clean some things up in the source... I've looked at the source and it seems pretty rough; I'm sure it could use some improvement from me. :)

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!