My new toy

ipod.png

New year, new iPod. They made so many small usability enhancments with those new models, that you actually ask yourself, whether the predecessors are really made by Apple (because if they would be, there weren’t that many usability flaws in the first place)

  • Playback stops when you plug out the headphones. Oh an speaking of headphones, I’m using these. They are a great compromise between extremely expensive and good-sounding
  • The menu item where the Music is stored is called – surprisingly – Music now. This is much better then the “Browse” in the older models.
  • The click wheel is the best user interface they created so far. I hated those soft keys in the 2nd genration: They were extremely inprecise and fired ofthen when I did not acutally want them to.
  • It’s faster. My old model paused quite a while when entering the artists list. The new model does this instantly.

Convinience-wise, the jump to the third generation of iPods was the biggest step. Thanks, apple.

Oh and the Music I’m playing on the photo is this CD. The music is difficult to describe. A bit jazz-ish, but not really. I really like it – especially as a passionate gamer of the Chrono series and Xenogears, where the music is inspired from. Consider buying it. It’s great!

SSH daemon on installation CD

First, my apologies for not posting for quite some time now, but I have a hell of a lot of things to do. One of those was setting up yet another IBM xSeries 345 Server. And yet again, I deceided to install Gentoo Linux on it and yet again this distribution does not stop to amaze me:

On their current livecd (used for installing the distribution), they have actually installed an OpenSSH-Server ready to be started, allowing you to do the whole installation procedure remotely. This is incredibly nice.

So I could put the server in our basement where its noise did not annoy anyone and still do the installation from my comfortable chair in my office. This is great!

But then I widened my thoughts: Imagine, you modify the CD just a little bit: Preconfigure the network with the IP of your server somewhere in a remote location, set a non-random root password and configure the SSH-daemon to automatically start on boot.

Then configure the server to boot from CD, if one is there.

Now, if your server (somewhere in a remote location where getting into is difficult or at least time-consuming) should crash and fail to come up properly after a reboot, just ask someone at the housing center to insert the CD and reboot. The rescue system from the CD will boot and the SSH daemon will start. Now you can try to fix your system remotely.

When you are finished, your customized reboot-script will eject the CD after unmounting it, allowing the server to reboot normally from it’s (hopefully) fixed installation. This would even allow to completely fresh-install a compromised system remotely, without forcing you to do that on-location.

This is extremely nice and just another reason why I prefer the seemingly simple and anachronistic installation procedure of Gentoo. I mean: Just try doing this with either Fedora or SuSE…

Wrong hand?

wronghand.png

(Taken using Snes9x)

As you may know I really like watching speedruns of video games. And yesterday, when watching the updated Super Metroid movie, I came across this picture in the intro.

Have you noticed? Samus is actually giving her left hand to this scientist. I needed quite some time to understand that this was not an error of the artist, but actually just another of those well layed out details: The right arm of Samus’ suit is equipped with her beam weapon, so she obviously can’t use it to shake hands ;-)

And this leads to other conclusions:

  • Her weapon seems hardwired. Else she would have laid it down before delivering the captured Metroid
  • She is right-handed. Because in her missions the beam weapon is quite necessary for her sruvival, she would not want to have it attached to the weaker hand
  • It must be quite difficult to take off this suit. This has the same reason as my first conclusion

It’s funny to see how much those designers seem to have though about all those details – either consciously or not.

Look what I’ve found!

This is great. This makes me incredible happy as it documents quite a relevant part of my live, which I though was long gone. Here is it:

My old webpage

And even more: Fabedit, too is still there.

I took the time to fix all long dead links and the syntax of the navigation tree, so it works in Mozilla (somewhat). Hell, I even fixed those little cgi-scripts.

I first thought, that fabgrats was lost, but I found a copy of it lying somewhere else. This is so incredibly great!

So. What’s the fuss?

In the years 96 till 2000, I was quite active in the web. The freeware tool RasInTask [the page has an usability defficit. There are some deeper links on the right side under “subtopics”] (unfortunately I lost the installer, so you cannot download the tool any more – unless you want to use the source, which is well-conserved) was quite well-known in the net. I actually got quite good reviews in two german magazines and I had quite some fans.

And I did more. I wrote articles, short stories, delphi components and such stuff. All of it, so I do think now, was kind of compensation for what I was not getting in real-life. Respect and a girlfriend. So this old page is not only interesting from a technical standpoint (I think, despite it being a bit amateurish, it was quite good back then [just look at how it’s possible to link directly into the page with an unique url despite frames being used. I did this with the RasInTask link above] – not to speak about RasInTask which I still think is quite good, though no one would use it these times), but also from a psychological.

This relict from old times is quite a good proof that people, extroverted on the web are quite different in the real live. And while I’m still kind of active in the net world, I think I can say about myself, that I’m finally adjusing my real live to what I always was on the net. This is a good thing, it seems.

So, what’s there for you, my fellow reader?

Not much. An old picture of mine, some texts written in quite bad english and this nostalgic flair of a webpage done in the 90ies. The only thing probably useful to you is, unfortunately, lost (and I really don’t think that you can still compile the sourcecode of RasInTask any more)

For me it’s something different. Its a testimonial of who I was and who I’ve become. Yes. Those years between 99 and 02 where great. And quite a lesson for me. It’s good to finally feel grown up after such a long time. And it’s good to see who I was, just to learn, who I really am.

Oh. And I will go back to more technical stuff the next time. I promise

UPDATE: I actually found the RasInTask installer somewhere, so it’s available do download now. But plase note: I know that the code is not very clean. I’m quite convinced that there are some access violations and synchronization errors just waiting to annoy you. So while it’s interesting from a nostalgic point of view, I’d recommend against installing it. Oh! And don’t ask me for support. I have not touched this fo years.

What a tool

I really like to photograph. I do so since I was a child. Then I bought my Canon ixus 500, which reawakened this old passion of mine. About a week ago or so, I bought O’Reillys Digital Photography Hacks and read through it, which was quite fun – it’s an excellent piece of work. Easy to read while still providing you with quite some knowledge.

You should defintiely read the book too, if you are interested in digital photography (some hacks apply to the old fashioned analog one too)

One thing, I noticed when reading through: There is quite a lot of stuff that can’t be done using those compact cameras. Many hacks just begin with “if you have feature X, you can…”

The feature list of this baby actually contains all those Xes from the book. Wow. That looks nice (besides being written in light-gray on white ;-) ). Expensive, but nice.

Full text search for outlook

As you may know, we are using Exchange and Outlook for our Email and groupware needs. The thing just works and has some really useful groupware features while – in contrast to all those PHP-solutions – still being well integrated in the usual working area (read: has a windows client). And even better: Using Outlook / Exchange, even synchronizing the PDA works out of the box without that much of tweaking.

But with all this greatness, there are two problems: First, Outlook is not what I’d call a good email client, but it gets near. I still can’t use it for mailinglist consumption (bad threading, no qote highlighting,…), but for the rest it’s usable. The second problem is the search function. It’s so incredibly slow, even when you create a full text index on the Exchange-Server (without it’s even slower). And besides being slow, it looks like it’s searching forwards. When I enter some search term, it walks through the messages from the oldest to the nweset which is quite inpractical

So for reading mailinglists and for searching, I used Thunderbird

Then I found Lookout which was recently bought by Microsoft and released as freeware. This wonderful Outlook Add-In builds a fulltext index of all your Outlook folders and actually uses it (in contrast to outlook and the indexes on the exchange server). Additionally it has quite a powerful query language.

And with “fast” I mean fast: It takes just about 0.1 seconds to search my about 33’000 mails for this one message containing a certain word. This is great.

I’ve actually only two small problems with the tool:

  1. It uses the .NET Framework which must be loaded each time I start Outlook. This increases the already long startup time
  2. It uses it’s own window to display the search result. Outlook’s “Look for” function does this better and reuses the message list.

Besides that: Great tool!

99 little emails

pilif@galadriel ~ % cat ebinerv.php
<?
 for ($i = 0; $i < 100; $i++){
   mail('xxx@sensational.ch', 'Gnegg', 'Gnegg!', 'From: xxx@xxx.ch');
   echo "rSent Mail $i";
 }
 echo "nDone!n";
?>

In principle I’m long ahead such little toys. But Ebi had this special configuration where each email that arrives at his mailbox is forwarded as an SMS to his very old mobile phone. And the phone has that nasty bug (or some may call it strange behaviour) where the “Delete all”-function does not really do it’s task.

In the end it was quite funny to see ebi manually delete neary each and every SMS he got because of my script. Maybe he will now buy a better phone or fix his configuration? We’ll see.

Copying with MOVE? Moving with copy?

Today I came across the situation where I had to copy – using delphi – some chunck of memory from one place to another. I nevery did that before (using OOP techniques gets you around that most of the time – at least in Delphi), so I had no idea how to do it. What I knew is that in C, I’d do that with memcpy. As a convinced fan of Pascals intuitive API notation, I looked in the help for MemCopy or CopyMem. Nothing (which is strange, considering things like AllocMem actually exist).

Some googling around turned out the name of the function: it’s

procedure Move(const Source; var Dest; Count: Integer);

Move? That can’t be. Can it? I want to copy, not to move. A quick glance at the help file revealed that it’s the truth: Move actually copies…

Move copies Count bytes from Source to Dest. No range checking is performed. Move compensates for overlaps between the source and destination blocks.

Descriptive procedure names? Usually, yes. But this can only be described as way beyond the optimum ;-)

Oh… on another note: What do you think, Copy does? Copying memory? No way:

function Copy(S; Index, Count: Integer): string;

function Copy(S; Index, Count: Integer): array;

S is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or subarray containing Count characters or elements starting at S[Index]. The substring or subarray is a unique copy (that is, it does not share memory with S, although if the elements of the array are pointers or objects, these are not copied as well.)

If Index is larger than the length of S, Copy returns an empty string or array.

If Count specifies more characters or array elements than are available, only the characters or elements from S[Index] to the end of S are returned.

Yeah!. Right.

Oh and on second thought: The move-thing may have its roots in the assembler language, where MOV actually copies the data too – at least I think so. But anyway: If even C got it right, why has my beloved Pascal to fail in such an easy case?

Strange preconfiguration

Ever since I’ve updated our in-office Gentoo-Box to Samba 3, I had very bad performance (throughput wise). And with bad performance I mean at most 200 KBytes/s on a 100MBit network.

For quite some time I thought that it must be my client machine, so I rested the case. Till today, where someone else complained about really bad performance. So I began investigating.

At first I had one of our ultra-cheap switches in mind, so I tested the performance using FTP. Too bad: full speed there, so it must be a Samba problem.

What was really strange: Write performance to the server was great. It was just reading that took so incredibly long. So, armed with this information I did some googling and found … only vague stuff. While there are some people with the same problem as myself, they are always told that it must be a hardware or windows problem (the two easy solutions) and there was no further discussion in all cases.

Somewhere I found the tip to set the following in smb.conf for maximum performance:

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

I went and looked, but the setting was already there. Too bad. The next thing I did was to comment the line out and restart samba:

#socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

And you will not believe it, but it helped. The server is back to its old performance with 8 Mbytes per second which is a good value considering the cheap equipement involved.

Problem solved. Culprit: Strange preconfiguration by Gentoo. Why this helped? No idea! Why the wrong setting in the first place? No idea either. Why the wrong tip to put this option into smb.conf? Don’t ask me. I’m just happy, it works again.

Responding to search-strings (II)

While looking through the logfile analysis of gnegg.ch I saw that someone came to this site searching with

set ie proxy delphi

so I deceided that it’s time for anther episode of “Responding to search-strings” (the other being here). This time it’s about setting the IE’s proxy server from a delphi application.

When you do it manually, you access the proxy server settings from Tools / Internet Options / Connections in Internet Explorer. Whatever you change there, is used not only by IE, but by every application on your system using the WinInet API function InternetOpen with the flag INTERNET_OPEN_TYPE_PRECONFIG set. Additionally, many applications use the WinInet-API to get the Proxy Server settings and then use their own routines to actually connect to the server via the proxy they got before

So, if you want to change the Internet Explorer Proxy settings, you actually change it for the bigger part of the wohle system

When you go to Tools / Internet Options / Connections, you will immediately see that setting the proxy is going to be quite a task: You don’t just set one proxy server, you actually set one for LAN-Connections and one for each dialup connection that is installed on your system. Finally the proxy being used depends on the state of the radio buttons you see in the middle of the dialog because they define whether IE should even bother connecting to the LAN or just call one of the connections defined.

But it gets even more complicated: The proxy settings provided changed for each version of Internet Explorer. As always, it was an evolutionary process getting more complex in every iteration, so you will have to cope with that too.

But now to the details: While the settings are stored in the Registry, this is not the recommended way for changing them. Microsoft has created some API functions specifically for that, so you should use them as this is the only way guaranteed to be portable even for future versions of Windows.

The problem: The API is very painful to use – even more so because it is somewhat different for each version of IE (getting more complex along the proxy feature itself). Oh, and please don’t ask me how to get the version of the installed IE – that I do not know.

All is about InternetSetOption and InternetQueryOption respectivly. Both require a parameter to tell them which option you are interested in. Have a look at INTERNET_OPTION_PER_CONNECTION_OPTION (for IE5 and later), INTERNET_OPTION_PROXY and INTERNET_PER_CONN_OPTION

In the end, you will be calling InternetQueryOption quite a lot of times and change some settings with InternetSetOption, but you will soon see that it’s not actually worth it: There is always the possiblity that you have not anticipated some obscure setting a user may have which will distrub your application greatly

And additionally, changing the proxy server settings is a task for an adminitrator, not for a simple application. Before asking the question “How can I change the proxy server?”, the question should be “Do I really have to change the proxy server? Isn’t there a better way?”