- Entries : Category [ digital ]
- Things having to do with digital world items go in here.
08 May 2008
Crash Me Real Good
It can happen to any ATM
Came by this crashed ATM yesterday evening (on the way to the one and only Kalamakia place). Somehow these things deeply amuse me. Must be my lifestyle, my work, whatever. Actually I felt a closer relation of this green on black screen, than I feel to most ATM's angry fruit salad colorful "user interfaces".
I have no clue what kind of (operating) system this is. If you know, please leave a comment. Note how nice it is that the date is actually displayed localized with a Greek font.
Unfortunately there was no spill of 50 Euro bills on the floor in front of it, ready for me to pick up. If it was a person who crashed it, they obviously hadn't seen the film "Hackers".
09 May 2008
They are still around!
Perl programmers! Do not despair! Even though your language isn't all the hype of the dot-com era any more, even though "new" languages like python, haskell, lua, java, (...) have taken over all the buzzword space, there are still jobs for you!
Admittedly, the company in the picture (click for a slightly larger view) is something of a "special" employer, you will be perfectly able to "show off" all your assets there. The company name also suggests a certain high level of expertise required (I mean, "diamonds", right?).
Back to real life: The space in question had a sign "for sale or let" with a nice (Greek) mis-spelling for a while, which I had a chuckle with on my way to work. Now it obviously changed hands. The new owner (or renter) hasn't had much more luck with orthography, but what do we expect, if he knew how to spell, he'd probably work in a more respectable industry.
Update ~5 June 2008: Someone seems to have applied a patch... I would not assume that they have read about the bug here, but at least someone seems to have pointed out this nice misspelling.
10 May 2008
Can't determine Purported Responsible Address
Hey, it's just a technicality
Got a support mail from a (very patient) user today. The "please reset my password" mail from one system I co-admin didn't reach them. Checked the mail log and found the mail was rejected from their ISP with a response "550 5.7.1 can't determine Purported Responsible Address". This baby refers to RFC 4407, which I had never heard of. I found some other references on the web, but they were red herrings (no, it's got nothing to do with SPF), the RFC led me to the solution...
So, what is this business with this "Purported Responsible Address", and why did it bother the particular ISP of that user?
The thing is, RFC 4407 is about trying to find out, where an automated mail is really coming from. "Automated mail" in this respect can mean a mail that was re-sent from one mailing list to another, or it can mean a mail coming from some web application. In our case it was the mail sent out by the "please reset my password" link in a PHP (outch!) forum system.
RFC 4407 tells software to go through the headers according to a list of precedence and pick the first valid and unique header that points to the address who is responsible for that mail. A last step in this "ladder of headers to check" is to check the "From:" header (the one in the message, not the "envelope from" header). In our case the culprit was the nice and dandy word unique.
"Unique", you say? Yeah, going through the PHP code of the board software (what horror! imagine I did this on a saturday morning, to feel my disgust) and comparing with a sample mail I dragged out of an old mailbox, I finally noticed that the PHP code was doing this (line breaks non-original):
$email_headers = 'From: ' . $board_config['board_email'] . \
"\nReturn-Path: " . $board_config['board_email'] . "\n";
... and it resulted in the "From:" header being in the message twice. Once I changed that "code" to only add the "Return-Path" to the additional headers, there was only one "From:" header in the messages being sent out and the mail sent out was happily accepted by that ISP's mail server.
And the morale of the story is? Well, I was happy that I could solve the problem on our side (since indeed the mistake was on our end). In this message from an employee of Forthnet (the ISP in question) to the sid-milter-discuss mailing list, the problem is with Yahoo group verification emails. Of course if someone like Yahoo sends out messed up headers, you want to make sure that you can tell your own system to ignore the mess.
24 May 2008
USB2 Really Is Slower Than FireWire
Don't believe the hype
Who are these people who claim that USB2 is as fast as FireWire? I can't believe these people didn't go and just plain gave it a try. My ages old FW400 momobay box with a 2.5" 120Gig IDE drive beets the pulp out of the 2.5" 80Gig SATA (that came with my MacBook) hooked on USB2 with an A.C.Ryan adapter. Read on for my (totally unscientific etc. etc.) test...
The USB2 copy mostly kept in the 16-17MB/sec speed range, while the FireWire copy usually was more in the 21-22MB/sec area. Even more interesting was that the FW started to copy, went up to that speed and stayed there, while the USB2 jumped around a lot - looks to me like there's something not optimized.
To test this, I copied over the Video_TS folder of my PGP presentation from the internal drive to the external drive, using the shell and timing it with /usr/bin/time (and watching disk activity in the "Activity Monitor"):
% du -sh /Media/Movies/PGP\ Presentation
3.4G /Media/Movies/PGP Presentation
% # USB2:
% /usr/bin/time cp -r /Media/Movies/PGP\ Presentation/ .
201.97 real 0.02 user 12.00 sys
% # FireWire 400:
% /usr/bin/time cp -r /Media/Movies/PGP\ Presentation/ .
155.06 real 0.01 user 11.60 sys
Oh, that's only 46 seconds difference on 3.4Gigs of data. When I mirrored the 80Gig drive to my new drive last night, I guess the difference would have played out to a bit more time. Also too bad I don't have FW800 to test.
27 May 2008
Open Source Conference in Athens
Yeah, missed that one
Noticed this morning that the 3rd conference on Open Source Software in Athens is under way today and tomorrow. I totally missed the event. Which is a pity since this afternoon for example Diomedes Spinelli is going to speak. The Schedule can be found at the conference site.
31 May 2008
vim 7.1 with Unicode / UTF-8 on Mac OS X 10.4
Here we go
On my MacBook with Mac OS X 10.4, vim 6 was installed and worked fine with Greek text in UTF-8 encoding. Today I tried to install VST (a package to work with ReStructuredText in vim) and noticed that I need vim in version 7. Downloaded vim, compiled it and VST worked, but... Greek characters didn't work. At first I thought I'd have to compile my own ncursesw and figure out how to compile vim to link in the wide curses, but in the end I didn't need any of that. Only had to specify that I want vim with wide-char support in configure:
% ./configure --with-features=big
configure: creating cache auto/config.cache
checking whether make sets $(MAKE)... yes
.... lots and lots of output ....
.... lots and lots of output ....
% sudo make install
... and then convince my shell to use my "new" vim 7 instead of the standard vim 6. I did that by setting an alias in my shell setup file. Nice bonus: vim now has a spell checker, though I have yet to configure it with a Greek word list. Also on the todo-list: Figure out why I can't generate LaTeX documents with Greek characters out of VST.
31 May 2008
Greek spell checker in vim 7
Got it working
A quick addition to the last post: Got the spell checker in vim 7 working with Greek right now. What I did:
As suggested by the vim online docs, go to the Open Office dictionary page, download the file labelled "spelling" in the Greek category. Unpack it.
Open any file in the unpacked directory with vim,
type in this magic incantation:
:mkspell el el_GR
Which will gurgle on for a short while, then result in the creation of a file called el.utf-8.spl
Move that file to the directory .vim/spell in your home directory (likely you will have to create those directories first:
% mkdir -p ~/.vim/spell
% mv el.utf-8.spl ~/.vim/spell
Open any file in vim, (set the encoding to utf-8 if it isn't already), type something in Greek (with a nice typo here and there), now enter this:
:setlocal spell spelllang=el
and check with ]s if it finds the next misspelled word. With z= you ask it for suggestions. The :help spell-quickstart command has an overview about the commands you use for spell checking.
In the end, a shortcut for the :setlocal spell spelllang=el bit could
go into your .vimrc file.
05 June 2008
Web Developer wanted in Athens
What's with those PHP guys hiding?
My friend Manos (aka "scud" from HelMUG) is looking for a web developer. He's looking for a while already. I know him for a long time now and I know from experience that he's a serious guy to work with, so I can really recommend him. I've been to their new offices, which are very nice, close to the sea (ok, not really next to the sea, but close enough to be able to get to the sea for a stroll after work), decently reachable by public transport.
The job he offers is for someone for full time, working in their offices. They have various projects for clients and some of their own stuff. The catch: It's apparently mostly PHP. You can go and check out his JobAd (in Greek, on my wiki for now).
So what's it with programmers in Greece? Heck, PHP isn't rocket science! There ought to be some people around who know decent PHP (or other web technologies, personally I don't like PHP at all, but don't let that stop you) and are looking for a good job. But so far... no, he's still searching. There are lots of kids who know zilch, nothing out there. BTW: No, knowing "Dreamweaver" is not a substitute for knowing the underlying HTML and that's just one example of the kind of stuff he got. Anyway, if you are interested or know someone who might be, check out the ad (in Greek).
08 June 2008
Hacking and Beach day
This is how life is meant to be
Went together with graffic to Panos place today for some computer time
and later for a visit to the beach. Panos was taking his ibook apart
to install a new hard drive, while graffic and me did a little Zope
teaching session and some look at distributed version control. Then we
drove to the nearby beach and went for a swim. The sea being a bit
colder than last week actually, were it takes a bit of perseverance to
get into, after a while and a good crawl it gets to be just refreshing.
After messing with Zope (how to install, a few basic
looks into creating a Product), we looked at some distributed versioning
system things. First we had a look at darcs, using it for our sample
Product, pulling patches from the repos we had set up on each other's
laptops. Then we watched Linus Torvald's talk at google (the one where
he says some bad words about subversion), which was fun.
We had arrived at around 13:00 and when Panos had the ibook assembled
(at a little after 18:00, those ibooks are a total PITA to take apart)
we took his car and went to the nearby beach for a swim. It's so nice to
go to swim towards the end of the day. OK, it's nice to spend a day at
the beach too, but if I have to choose between late afternoon / evening
or 11 in the morning, I'll prefer the late afternoon for the beach most
of the time.
Now that we're back I'm attempting to actually install git on my
MacBook. Naive as I am, I tried to download the source and compile it.
Pfff, the list of dependencies seems to be endless. Next was to search
for binary installer... no such luck, there is one but it seems to be
of the "try it, it might work" variety. Last try (as suggested by Bill
Clementson was to get MacPorts and use that to compile git. It worked,
but boy did it compile a lot of crap. I mean, haven't these guys heard
of the news that Mac OS X comes with OpenSSH nowadays? Even if they want
a newer client, what's this garbage they do, install a startup item for
Here I was, thinking that darcs is complicated to install, because I
have to install ghc, but that was actually easier to get than this
stuff. Something tells me that I won't be switching neither to using MacPorts nor to git...
27 June 2008
darcs match reminder
Usefull options: exact, date
I'm one of the happiest cows around ever since sm made me discover darcs when I started hacking on Zwiki. Lately I've switched to darcs at work too. For a long time there was one single task in the user interface that had me confused: Seeing the diff for one particular patch in the past...
When looking at a list of patches (e.g. with darcs changes --last=10), you see one with a name like #27 u:w2pform add class="w2pform" (to body tag). Now when I want to see the diff of that patch, I had a hard time to convince darcs diff to show me the patch in question. The problem is that the --patch and -match options need all kind of regex or glob characters escaped when you feed them a patch name, you can't just copy+paste the patch name.
Taking some time going through the manual, I discovered the proper way to do this. The --match option is really powerful, as the manual says you can do things like these:
darcs diff --match 'exact "#27 u:w2pform add class=\"w2pform\" (to body tag)."'
Ok, you still have to escape the double quotes ("), but I seem to be rarely using them in patch names. In this case, where the name starts with a unique identifier (issue number), you could also use a regular expression with good success, which is matched against the patch name:
darcs diff --match 'name #27'
Using name with single word identifiers seems to be a good strategy to find patches in the depths of history - use with darcs changes first to see what you'd get. Similarly you could match against the author field. There's also a hash options, to find patches by their hash identifier, which I probably won't be using - it's meant more for automatic processing.
What I will be using more - even if it's for fun and information - is the date keyword to --match:
darcs changes --match 'date "2008-06-26"'
darcs changes --match 'date "last 3 days"'
# or even:
darcs changes --match 'date "between 2008-06-20 and 2008-06-24"'
I'll close with this wonderful quote from the manual:
The --match pattern can include the logical operators &&, || and not, as well as grouping of patterns with parentheses.
Which means when you really, really have to dig for that one patch you faintly remember back in $MONTH having to do with identifyer xy... you have a powerful search tool to find it!
01 July 2008
No Phones, no net
Don't take things for granted
Since yesterday noon our company's office is left without phone and
Internet service. We have a setup with two phone providers, so we have
some kind of fail over capability. But yesterday the regional telecoms
center "Ippodromos" in southern Athens went down and now both phone
providers are unable to provide service. As for Internet: we have a 3G
USB modem, which serves as a minimal life line.
It's quite strange for a company to be left off the Internet, especially
for a company like ours, where almost all customer communication is done
via the Internet. The proofs that normally get commented upon by the
customers in our extranet approvals system either have to wait, or else
I have to send them manually through that tiny 3G keyhole. Customers
then call us on our mobile numbers to discuss things.
The result is that I spend half my time sending mail for other people.
Interesting enough, I still manage to write some code in between. (Technical aside: The ability of darcs to work without all kind of net access - e.g. small things like relying on name servers - is a major advantage right now.)
How long will the failure persist? We don't know. ΟΤΕ tells us "it
could be fixed in one hour, but it could also be tomorrow". Oh yeah,
same thing they told us yesterday. The name of the installation, "Ippodromos" (ιππόδρομος), means "horse racing track"... thinking of it, the "customer support rep" at OTE should have told us: "Hey if you didn't have good luck betting on the ippodromos today, maybe tomorrow you win!"
at the sea
Open Coffee Athens is currently under way here in Kalamaki (a part of Athens right next to the sea. The presentations started late due to some audio hardware problems, so I had time to chat with some interesting people here.
Right now we're going through the first presentations. Mixed impressions so fare. You can guess that I'm not fixated enough on the presentations, that's why I'm writing this :-).
02 July 2008
PNG, Transparency, IE6, AlphaImageLoader, and SSL
Well, you did not expect to get away without problems here, did you?
In case you try to run one of the AlphaImageLoader fixes out there in order to teach Internet Explorer 6 to handle PNG images with transparent alpha channel information somehow gracefully... and in case you try to run this over SSL (https), you might or might not have run into problems where your images all disappeared. One moment, while you where still testing over unencrypted http, everything was there, then you go the the HTTPS site and all you see is your images blinking up before disappearing.
Been there, done that. It's the same problem with IE6 and SSL over and over. What you have to do is give those images a header that allows them to be cached. In Zope it will be enough to associate them with an "Accelerated HTTP Cache Manager". It's still not very nice and there are lots of caveats. We didn't expect better from IE though, did we?
Forgot to mention what got me to the solution:
This problem is happening because Internet Explorer requires that any content retrieved by the browser that is to be opened by a plugin must be cached. In this case, the ImageBundle .png file is opened by AlphaImageLoader, which qualifies as a plugin.
(From this google-web-toolkit issue page.)
Back in the world of communication
After 36 hours ΟΤΕ (OTE, the quasi-monopolist state telecoms giant here in Greece) managed to restore service in the telecoms center in the area of my employers office. Somewhere after midnight this morning our servers were reachable again and our phones could have been ringing. Until then, for one and a half business days we were functioning on a very minimal communications set.
15 July 2008
Small stuff that just works
"Distributed Version Control" systems are just so sweet to work with. They make a lot of tasks in a dynamic work environment easier. So I fixed a bug on the copy of my new app on my workstation. Pushed the patch to the demo server, working there, but... bum!
I had one line wrong in my fix, which got me an ugly error message on the demo server. Now I switched to the shell on the demo server and "unpulled" the bugfix patch (something like rolling back to the previous version, but without any tagging, branches, etc. etc. involved). An instant later the demo server was back in the state right before the bug fix, so people at least got their demos back.
Went back to the workstation, fixed that line that was so obviously wrong. (How did I miss that?) Then I did a "darcs amend" on the bugfix patch. This includes the bugfix-of-the-bugfix into the real bugfix, so there is now only one nice patch in the history. (If lots of people already got that patch this isn't such a good idea, but in a situation like this it's just what I need.) In the end I can "push" the amended patch again to the demo server and everybody is happy.
28 August 2008
Installing OpenERP (aka TinyERP)
Depending on dependencies...
The last few days at work I played around with installing OpenERP (which was born as TinyERP). It's a pain. Instructions are confusing, partially non-existing, sometimes misleading. Wow, Zope installation is actually child's play against this (even taking into account that I have a few years more experience with Zope).
Part of the odyssey was a binary installer for Mac OS X PowerPC (great idea for trying something out!) who used Python 2.3, even though in the end the product wouldn't actually run with Python 2.3. Then came a manual install on Mac OS X Intel 10.4 where at some random point I chose the newer PostgreSQL 8.3 - but current production TinyERP/OpenERP doesn't work with that. In the end I switched to installing on a virtual machine image with OpenBSD as the guest OS - if I mess that up it's easier to throw away. I've put my notes on my wiki (work in progress, not yet done, YMMV, etc. etc.).
Maybe I should add that contrary to source install on unix-derived systems, the windows binary installers actually worked fine, but then I don't really want to do anything on windows.