Saturday, August 7th, 2004
It might appear that I haven’t been working on any projects for a while, but looks are deceiving. A little while ago I announced that I would be diving into GTK 2.0 in preperation of the porting of Nimf to GTK 2. I started with creating some simple lists and, before I knew it, I was working on a new project.
The new project will be a replacement for quicklist. While quicklist is a nice application, it is lacking some features which I would like to see. Next to that, the interface is terrible. For one, the keys are all wrong (copy/paste is alt-c, alt-v). At first I decided to work on the source of quicklist, but it’s quite old (still uses GTK 1.x).
So was born: Listpatron. (I’m not sure if that’ll be the final name). Since it will probably be a while before it’s released unto the world, here’s a little sneak-preview:
Import dialog
Imported list of books
Editing and menu
Update : I’ve just noticed that the official website of quicklist (www.quicklist.org) is for sale. The application hasn’t been updated in quite a while, but was still available from the website. Now it’s gone. There are still the Debian Binaries and sources, but the original source is gone. I’ve tried to find it somewhere else on the internet but couldn’t.
Saturday, August 7th, 2004
I’ve created a levelset of sokoban levels for XSok, the sokoban game for Linux. The levels are a copy of the Sokoban levels in Nethack. I use them to practice a level before playing it live in Nethack. (If you make a single mistake in the Nethack Sokoban levels there’s a chance you can’t finish the levels).
Thursday, August 5th, 2004
Finally, there’s a gnome application repository:
http://www.gnomefiles.org
Monday, August 2nd, 2004
During my programming years, I’ve noticed that Developers documentation adhears to a couple of laws:
- If you write documentation, they don’t read it.
- If you don’t write documentation, they complain about it.
- If you update documentation regularly, they don’t.
- If you don’t update documentation, they complain about it.
- If you read other people’s documentation and you follow it, it is out of date and they complain about it.
- If you don’t read other people’s documentation, they’ll complain about it even though the documentation was out of date and wouldn’t have helped anyway.
These laws are unescapable. I’m sorry.
Monday, August 2nd, 2004
I saw a trailer for the movie I, Robot and was disgusted.
The movie’s supposed to be based on a book by Isaac Asimov. Asimov was one of the best science fiction witers of our time and it was he who conjured up the Three laws of robotics. These three laws were used in his fiction books and have been used by many others since then. I’m sure that by the time we invent A.I, these rules will be applied to it.
Unfortunatelly the trailer for the movie made ‘I, Robot’ look like a complete travesty. I haven’t even seen the movie yet and already it appeared to me that this was the worst book-based-movie ever. Nothing more than a Yet Another Action Movie with a dumbed-down story because, well, the audience should have to really think about anything, should they? They’re just ignorant little consumers.
Maddox agrees.
I’m hereby banning this movie without even having seen it, just because maddox says so.
I hate hollywood.
Thursday, July 22nd, 2004
This looks pretty inconvenient:
Programming with o:XML.
It’s an XML based programming language. Pretty useless, if you ask me.
Thursday, July 15th, 2004
PHP 5 has been released.
New features:
* The Zend Engine II with a new object model and dozens of new features.
* XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/).
* A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
* A brand new built-in SOAP extension for interoperability with Web Services.
* A new MySQL extension named MySQLi for developers using MySQL 4.1 and later. This new extension includes an object-oriented interface in addition to a traditional interface; as well as support for many of MySQL’s new features, such as prepared statements.
* SQLite has been bundled with PHP. For more information on SQLite, please visit their website.
* Streams have been greatly improved, including the ability to access low-level socket operations on streams.
* And lots more…
Also check out this post on my log.
Thursday, July 15th, 2004
I’ve been playing a lot of Nethack lately. It’s quite addictive. And you tend to die a lot.
For instance: In my last game I arrived at the Medusa level. Now, Medusa will turn you to stone if you look at here directly, so I was going blindfolded. I read somewhere that you can use a mirror to defeat here, so I went back up in the dungeon to get one. On the level directly above the Medusa level, I encountered a cockatrice. These will also turn you to stone, but only if you touch them. “Okay, let’s be carefull” I think, and kill it from a distance with some daggers. When it’s finally dead, I walk over the corpse, but I forgot I was wearing the blindfold. When wearing the blindfold, you can’t see what’s on the ground, so instead you’ll feel what’s on the ground. “You feel here a cockatrice corpse“. Feeling usually involves touching, and touching a cockatrice…. turns you to stone. Ooh, the irony!
This is just one of the many splendid ways in which you can die in Nethack. Pretty neat huh? :)
Anyay.. I’ve been collecting all possible information given to me during the game in one way or another. I’ve put my notes on-line for all to see.
Nethack notes
Thursday, July 8th, 2004
Sun’s Looking Glass looks pretty awesome. (Click the screenhots and the select different ‘views’ from the dropdown)
Thursday, July 8th, 2004
Now that I’ve taken the job at ZXFactory, I’ll be doing some heavy-duty PHP programming again. It’s been a while since I last programmed in PHP. (Not that I’ve forgotten how to do so). I did a little research for some functional specifications I am working on at ZX and found some interesting sites and articles.
PEAR DB
The project I’m currently working on will probably be put on the market, so it was decided that we should start looking for some database abstraction library. The idea is that you should be able to change the database back-end from i.e. MySQL to Postgresql without having to change any code.
So I started looking around and ended up at the PEAR repository. It has some nice database abstraction layers like PEAR::DB. DB provides an Object Oriented layer around the database call-functions. It unifies things like the various different functions for counting the number of affected rows so that it will work on any database. It also restructures the results from queries so that you won’t have to deal with different types of resultsets. Best of all are probably the standard error reporting routines.
The PEAR::DB_DataObject_FormBuilder is also pretty cool.
PEAR::DB_DataObject‘s description sounds really cool (“An SQL Builder, Object Interface to Database Tables”), but isn’t really usefull. It’s just a kind of template for building classes for retrieving data from tables.
What you really want (yes you do!) is a unified way to write queries. You see, the problem with different database backends is that you can’t use any of the database vendor specific functions and/or syntax. And this really limits the possibilities. I haven’t really found any useable way of doing this, so you’ll probably just have to stick with ANSI-SQL and do any complicated things in the code.
PHP’s DBX
If you don’t like PEAR, you could always use PHP’s native DBX library. It’s faster than PEAR’s stuff (if you believe these statistics) and you won’t have to fiddle around with PEAR installations. Here are some DBX examples.
Shared memory
Another cool feature in PHP is the POSIX Shared memory PHP library. Suppose you have to retrieve some statistics from a database, do some calculations on them and show the endresult to users visiting the page. Let’s say you’ve got 8 million rows in the database and you have to add the values of some column of all those rows. That’s going to take some time. You most certainly don’t want to do that every time a user visits the page now, do you? The awnser to this problem is probably shared memory.
With shared memory you could simply perform the calculations once and then allocate some shared memory (the size of the results) and put the result in there. Then, when another user visits the page, you can first query the shared memory to see if the results are already calculated. If so, you can simply retrieve the results from memory without having to perform any queries or calculations at all. Pretty neat stuff. Here’s an article on how to use them.
Debugging
Did you know you can produce tracebacks in PHP? You could write your own errorhandler function which shows the traceback.
PHP 5
On a final note, I’m eagerly awaiting the release of PHP 5. Check out this new stuff. Lot’s of great new Object Oriented features like public, private and protected vars/methods, interfaces, class type hinting and best of all: Overloading! Too bad they’re also implementing exceptions. I hate exceptions.
The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.