Thu Jul 19 00:33:51 CEST 2007

Keywords

All Java keywords. In one program. Here.
And people wonder why I somehow don't like this so-called "language" ...

Posted by Patrick | Permalink

Thu Jul 19 00:31:03 CEST 2007

Mhhh, Programming Patterns

This must be about the most overengineered bit of code I've ever seen. I feel my intelligence fading just looking at that ...

Posted by Patrick | Permalink

Wed Jul 18 23:12:02 CEST 2007

Just sayin' ...

The average Gentoo dev

That makes about as much sense as the mailinglists did the last days ...


Posted by Patrick | Permalink

Tue Jul 10 12:23:02 CEST 2007

Why proof-of-work doesn't work

Some time ago I had a discussion with a few people about proof-of-work concepts to mitigate the effects of Denial-of-Service. Basic idea being that you make anyone trying to communicate with you do some computational work to slow down spammers and other evil entities.
One good example is Hashcash, initially intended for email. By attaching a proof-of-work, the idea went, spammers are slowed down so much that they aren't a problem anymore. The idea has been taken on by P2P network people, thinking that they could limit the damage an evil entity can do in a given timeframe.
Obviously an attacker can just pull in more CPUs to do his proof-of-works, and an entity like a spammer might have a small botnet available anyway. Now you don't want to lock out people, thus you need to limit the difficulty to something the slowest participant can handle. So I just did a nasty distributed hashcash cruncher as proof-of-concept. Using some of the leftover machines I get results like these:
16 bit 50 sec (1 CPU)
20 bit 2m5.279s (1 CPU)
1m8.799s (4 slower machines)
24bit 57m18.670s (1 CPU)
7m40.082s (rerun) (6 CPUs mixed)
Every run was 24 pow's, so you can estimate the average time per pow. Because of the varying hardware the CPUs are not comparable - the Pentium-M seems to outrun the Pentium4 by quite a margin, and the Celerons combined have about the same processing power as the two fast machines. But corrected for CPU power I get a pretty nice linear scaling - adding twice the MIPS gives you half the time needed. What can we learn from that? Well, if you take the Celery as slowest machine you could handle about 20 pow/minute (16 bit). That would be the lower bound acceptable for a P2P network, for example. Note that the machine has no CPU left for other jobs - if it is supposed to do anything else it'll slow down the pows.
The fastest machines I have access to could handle about 60 or so. And if you go distributed you get a linear speedup, so for example all machines I have access too would manage about 750 pow/minute. A small botnet could still do a nice Denial of service, and all you have done is slow down legitimate users.
Not good. Not good at all ... lesson learned: proof-of-work systems don't work.

Posted by Patrick | Permalink

Thu Jul 5 11:08:58 CEST 2007

GUIs causing spontaneous aggression?

Using OpenOffice I realized again that often the limitations of GUIs are extremely frustrating. Extremely. Frustrating. Making me want to [censored] some [censored] to the [censored].
The problem, as simple as it may sound, is quite impressive: I wish to create a presentation using a given template. The naive approach thus would be to start OpenOffice, click around in the wizard until the template is selected and then use it.
Only problem is that OOo sources the list of templates from a magic location, thus offering you cream yellow with nicotine brown background and purple with green/yellow dotted background, which are not those I intend to use. And there is no "let me select the template" button. Thus I cannot use the wizard that wants to make my life easier.
Next try is generating an empty presentation without a template and importing the layout template. Well ... where does one import it? Argh ... Aaaaaaah! Urge to kill off the scale. Diediediedie. There is no obvious way to use anything beyond the retarded defaults.
So, we close OpenOffice, go for a walk until our blood pressure is beyond critical, then double click on the template ... ja, wunderbar! we have an empty presentation using our template. Now save that to the defaults so we can use it next time ... *click* *click* *grunt* *click* *click* [nonverbal expression of frustration] *click* *click*

Again there is no obvious way to do it. So I wonder ... how the farq does one import a template so that it is just there to select? I guess the easiest way would be to manually copy the template to a magic directory. Which is stupid. So, someone please tell me why we have GUIs that lack critical options so that we do everything by hand again?

I guess I'll finally recreate that template for latex-beamer and remove another source of frustration. Dear OpenOffice people: please make your app less stupid so that even a stupid user like me can use it.
Dear GUI writers of the world: Please think about usability and exposing all important parts through a GUI.

Posted by Patrick | Permalink