Wednesday, September 29. 2004
The articles themselves are mediocre, but the comments are hilarious ( the article is about a Spaceballs sequel):
Today I uploaded klumpat, a simple logging framework for the C programming language, and especially for dietlibc applications.
The idea is that you have a set of specialized loggers, e.g. for the console, files, syslog or logging to other loggers, which you create with a specialized function, and then log to them with a unified logging function. Every logger has a loglevel, which specifies the threshold from which loglevel on messages shall be logged. One special feature is the so-called meta logger: it's a logger to dispatch a log message to 0 to n other loggers, e.g. a debug logfile (with loglevel DEBUG), an error logfile (with loglevel ERROR) and a console logger (with loglevel NOTICE). The API itself is trivial, as the following example shows:
klumpat flogger = kl_new_file("file",DEBUG,"testlog.txt");
klumpat clogger = kl_new_console("console",ERROR);
klumpat * logger = kl_new_meta("meta",DEBUG);
kl_add_logger(logger,flogger);
kl_add_logger(logger,clogger);
kl_log(logger,DEBUG,"this is a debug message");
kl_log(logger,NOTICE,"this is a notice");
kl_log(logger,ERROR,"this is an error message");
kl_delete(logger);
Another nice thing is that messages in different loglevels are getting colored differently when being printed to the console. That makes the visual perception of e.g. error messages much easier.
Why the name "klumpat"? Well, "klumpat" means (roughly translated) "crap". It was just a random name that came to my mind when I started implementing the whole thing.
Monday, September 27. 2004
Do you know that when you have to sneeze so hard that you think your [[carotid artery]] is about to explode and that you have to die a horrible death? Well, I can tell you, I know that, I experience that right now, and it's horrible. Generally, having a cold and/or the flu or getting this typical "oh-it's-getting-cold-outside"-autumn-sickness is horrible.
Sunday, September 26. 2004
Just for the records: I noticed a salt generation weakness in htpasswd when using it in MD5 mode and reported it to the Apache developers.
Update: nobody replied to my email, so I went to the Apache website where found out that you now need to submit patches via their BTS. gna Well, I did that too.
Saturday, September 25. 2004
Do you remember then time when you learned calculating subnets and all that stuff and that the teacher told you that /31 prefixes won't work because "besides net address and broadcast address, there wouldn't be any other free addresses" (unless you haven't heard about [[CIDR]] and still learnt about the classes which are obsolete for more than 10 years). Oh, well, the stuff about /31 prefix isn't quite valid anymore, as I discovered today. For almost 4 years, RFC 3021 is available, which describes a way to do IPv4 point-to-point links. As far as I found out, it is meant to be used for transfer nets, where /30 nets have been used before. This absolutely makes sense, as you won't need more than 2 nodes in a transfer net, anyway, so identifying the net and the broadcast address is quite useless.
Yesterday, I shortly discussed a CAPTCHA system for WordPress to stop comment spammers. I also criticized that the CAPTCHA generator is not quite advanced. Well, instead of just talking I decided to improve it, and I think the result is not too bad. You can find the source for the createCodeImage routine here. It adds a gradient background and horizontal and vertical lines plus semitransparent rectangles that should pretty much mess up any OCR program's edge detection.
Not quite an error message, but the Liwest Infochannel is still hilarious. Yesterday we had a simple division by zero, today we get a window of Asus PC Probe:
Friday, September 24. 2004
I solved the blog spam problem with the following trick: I simply added a [[CAPTCHA]] to the comment dialog. This was inspired by Kristian Koehntopp's Serendipity advocacy, and fortunately, there's a CAPTCHA system available for WordPress. You can find it here. It took some hacking to get it running, but now it works like a charm, and keeps comment spammers off my site.
Of course, the CAPTCHA system is not really one of the most advances ones (there could be definitely more distortions than just a fancy font and a low constrast between font and background), it is IMHO definitely enough to make it too difficult for spammers to break the CAPTCHA in order to post the spam. On the other side: probably the spammers would really break the CAPTCHA and thus solve an [[AI-complete]] problem? Then we would move on to the next, better CAPTCHA system, and probably the spammers would break it again, and so on, and the comment spammers would drive on AI research.
Today I published my very first own Wikipedia article about Zeroconf. It is a lot more complete than the english counterpart. The article itself is based on a text that I wrote about Zeroconf on Linux with the plan to publish it in some computer magazine, but abandoned this project due to lack of time. So I simply ripped out the Linux-specific stuff from the text, put it on Wikipedia, and linked a number of words in the article to other Wikipedia articles.
Michael Prokop mentions a recent increase of blog spam. Yes, I also noticed that increase, and it sucks. Fortunately, most spams keep stuck in the anti-spam filter of WordPress, but some rush through.
I just saw this on the Liwest Infochannel:
What do I have to read in today's "Der Standard", Paris? You're not searching for a "good-looking idiot", but for a "kind-hearted man" and that the look "doesn't matter. Hey, Paris, I'm yours! I'm not necessarily good-looking, I'm definitely not an idiot, I'm kind-hearted (kind of), and I'm a man (at least the last time I checked). So I perfectly fit. Paris, I'm yours!
Thursday, September 23. 2004
Removing memory leaks on Symbian OS is really a hairy thing. Just in case you have to do programming on Symbian OS, if you get a panic with the reason code "ALLOC 0x<32bit-hex>", use either the technique described on this page. If you don't have MS Visual Studio (like me, I'm stuck with Metroworks CodeWarrior), use the following code snippet:
TBuf<255> buf;
buf.Format(_L("CFileDescription address: %x"),(TUint)this);
LOG_DEBUG(buf);
Replace the LOG_DEBUG with your own logging facility, and put the code snippet into every object's constructor. If you encounter a panic as described above, find the hex value in your logfile, and you know what type of object it is that is not properly freed and thus causes the panic.
Today, my employer WebDynamite celebrates its 5th birthday. Congratulations, WebDynamite! And we're going to celebrate it at a great location: at the SKY Media Loft in the Ars Electronica Center.
I'm working for WebDynamite for almost 2 years now, and it's been a real pleasure so far. I had the opportunity to work on a number of really interesting and innovative projects with very interesting customers and project partners. WebDynamite is also one of the few companies who started as a typical "dot-com" company but managed to survive the (now bursted) internet bubble.
Tuesday, September 21. 2004
|