Wednesday, December 31, 2008

daily tweets

  • 10:24 After a few print scans with 8800F, quality is good, but even at 2400dpi boy it takes time. Recommend:5% contr., 5% light, 5-10% saturation. #

Sunday, December 28, 2008

daily tweets

  • 20:36 It's easier to setup sirfStar GPS Tweaker ( to use an external GPS receiver instead of Omnia's internal one. #
  • 20:41 Whoao! Legnoart (, replied to evening-email within 3 mins from Blackberry! Awesome. Their products are fab too. #
  • 20:56 Mlesna Green Tea ( Are they serious? #

Saturday, December 27, 2008

daily tweets

Wednesday, December 24, 2008

daily tweets

  • 16:14 CoolPreviews on Firefox and Flickr. An interesting viewing alternative. #
  • 17:04 Scanning and tuning my new CanoScan 8800F. #

Tuesday, December 23, 2008

daily tweets

  • 17:33 Testing my new Gigaworks T20 Series II speakers. Headphones output and aux in necesitated the upgrade from outdated Goodmans. Tad bassy. #

Wednesday, December 17, 2008

daily tweets

  • 22:21 Watching the news on Cooliris ( #
  • 22:27 Read Petros Markaris' latest novel. Lighter than the others with a simpler plot.One more to read, "Basic Shareholder". #
  • 23:12 Those installations by Johan Lorbeer, well, of himself, are really something! #

Tuesday, December 09, 2008

daily tweets

  • 14:29 Read Roberto Saviano's Gomorra. You should read it too. It is so unbelievable that it makes for a fascinating reading. #

Friday, December 05, 2008

Samsung Omnia

It's been almost a month since my old K700i was put to rest for good and I bought the Samsung Omnia. I picked WM 6.1 as my first mobile OS, instead of Apple's OS X or Symbian or Linux. There are numerous reviews out there (check out gsmarena for example), but most concentrate on superficial first day use characteristics and specs instead of functional deficiencies, usability concerns, business aspects or programmatic abilities. This post is a personal account of the shortcomings and strengths I found in using Omnia daily in this past month. First of all this is not just a phone, this is mostly a PDA, so if all you want is a simple phone with a good camera, players etc go look somewhere else. It gets a lot of getting used to to familiarise yourself with Omnia. Although it's loaded with some great features, it requires someone quite comfortable with Windows OS, with installing custom applications, tweaking settings and generally good at finding their way in internet forums for help, apps, tips, hacks, solutions etc etc. Observations I bothered to collect:

  • User guides suck big time (online or otherwise)
  • Active Sync is crap. Good news if you have Vista, you can use Windows Mobile Device Centre which is a lot better. However, if you need to sync with more than 1 PC one of them will not work properly. See xda-developers thread for more.
  • Cannot set custom ringtones per contact; you need a small hack for that. I'll spare you the frustration with this twit.
  • Does not support voice calls out of the box!!
  • You cannot preselect type of message, SM or MM, this is done for you "automagically" once you put a subject or CC/BCC. You may only preselect email vs mobile messages.
  • You cannot separately turn off GPRS. You might wonder why would you want to do that. Well, I've already said that this is not your average phone, there's dozens of processes running underneath, and applications may need an internet connection for whatever reason (updates etc). If a program requests a data connection it will be granted the permission of opening a GPRS connection, after displaying a popup for some seconds, giving you the chance to cancel the attempt to connect. If you fail to notice that popup within the given timeframe and press cancel, you might be up for a nasty surprise when the bill comes at the end of the month. To separately disable GPRS you have to download a third party application, like MoDaCo's NoData or others.
  • You can turn off 3G individually, but even that is not at all profound: go to Settings, Telephone, More, choose Band Selection, Get Settings, and then choose GSM 900/1800 (for EU for example), instead of automatic and it will not connect through 3G.
  • GPS worked out of the box for both Google Maps and camera. A-Location worked fine too.
  • A few times had to re-enter the WEP key; haven't found out why yet.
  • Alarms are a charm to setup. Beware though, as when you wake up chances are you'll touch the screen somewhere, doesn't matter where, and the alarm will snooze. It's virtually impossible to cancel it unless you are fully awake and handle it with care. What's more, once you've snoozed an alarm, there's no way to tell whether it's cancelled or snoozed. You may not think this is a big deal, until you use it.
  • The oft-told screen legibility problem under direct sunlight will be the least of your problems. A tucked-in stylus would be handy sometimes, although Samsung has done a great job with their Touch interface.
  • No hand-writing recognition application (like LG's PSNote) in most non-English versions.
What about all the good stuff about the phone? They're all in the aforementioned review...

Friday, November 28, 2008

daily tweets

  • 21:55 Watched 2007's Die Falscher: at last, a good movie. #

Tuesday, November 25, 2008

daily tweets

  • 12:13 Omnia custom rings hack: create My Device/Storage Card/My Documents/My Documents/My Ringtones and stick your mp3s there. #
  • 12:45 All about Samsung Omnia blog of note: #

Thursday, November 20, 2008

daily tweets

  • 20:14 Toying around with my new Samsung Omnia More to come in a full blog post as soon as I find my way around. #
  • 14:26 WinMo Device Center for Vista waaay better than horrible ActiveSync. #

Tuesday, November 18, 2008

daily tweets

  • 22:09 American Scientist's100 or so Books that shaped a Century of Science Knuth's up there along with Einstein/Feynman! #
  • 11:24 Insanely large FAQ on Java generics by Angelika Langer: #
  • 13:04 Looking at some astonishing A4 papercut works by Peter Callesen: #

the ISO paper size concept

I've been using ISO paper sizes (A4, A3, etc) since the dawn of (my) time. I have even worked for a company that makes optimisation software for paper industries around the world. But I have never ever questioned the rationale behind their sizes. Well it turns out that the sizes are such that if you take any paper sheet of size An and fold it across the long side you'll get two An+1 sheets. So, if An has (x, y) dimensions, then An+1 will have (y, x/2) dimensions. Keeping the ratio constant gives us x/y = y/(x/2) or x/y = 2y/x hence x/y=sqrt(2)! So the aspect ratio of the sides for every paper size is 1:sqrt(2). In other words the ratio of any square's side to its diagonal. Given that A0 has this ratio and an area of 1sqm, we get the (0.841, 1.189) dimensions, and applying the halving process we reach the all too familiar A4 paper size of (0.210, 0.297). Since the sqrt(2) is an irrational number (1,4142135623730950488016887242097...), actual dimensions are always rounded to the nearest millimetre; there's even a type for calculating that but I'll spare you the details. ISO 216 has all that and more. For a free summary of the standard you may also have a look at Wikipedia.

Monday, November 17, 2008

one-pass tree pruning

A friend of mine wondered the other day if one-pass tree pruning was possible. Common sense dictates that a two-pass algorithm is required to first mark the subtrees due for deletion and then a second walk to do the actual pruning. I have since revisited this thought and managed to get a one-pass proof of concept:

boolean pruneTree(Iterator parentIterator, TreeNode root, Set allowedNodeValues) {
    boolean pruneNode = true;

    Iterator nodeIterator = root.getChildren().iterator();
    while (nodeIterator.hasNext()) {
        TreeNode child =;
        pruneNode = pruneTree(nodeIterator, child, allowedNodeValues) && pruneNode;

    pruneNode = pruneNode && !allowedNodeValues.contains(root.getValue());
    if (pruneNode && parentIterator != null) {

    return pruneNode;

This will remove parts of the tree whose node values are of no interest to us, otherwise retaining the same structural properties as those of the original tree:

    a                                               a
   / \                                             / \
  b   c                                           b   c
 / \  | \     pruneTree(it, a, {a,b,c,d}) -->    /    | 
d  e  b  e                                      d     b     
   |    / \                                                 
   c   d   f                                           

To make sure this was doing what was meant to do, a pretty print method was necessary. I used indentation and nested parentheses (with slight adjustments from Knuth's original):

void printTreeIndented(TreeNode root, int currentDepth) {
    for (int i = 0; i < currentDepth - 1; i++) {

    for (TreeNode node : root.getChildren()) {
        printTreeIndented(node, currentDepth);

void printTreeParenthesized(TreeNode root) {
    List children = root.getChildren();
    if (children.size() == 0) {

    for (int i = 1; i < children.size(); i++) {
        System.out.print(", ");

The first one will print:


while the second will print a(b(d, e(c)), c(b, e(d, f))). Unfortunately after some runs I realised that the tree pruning algorithm's performance is dismal; it prunes by removing nodes bottom up, one by one. After all, it has no other way of knowing what to prune in one pass. Compare this with a fast mark pass and a second prune pass whereby whole sub-trees can be pruned. What's worse, as it's written, it runs out of heap space for large trees with more than a handful of levels. I guess the question is, does anybody know of any fast one-pass tree pruning algorithm?

Thursday, November 13, 2008

daily tweets

  • 22:11 Enjoying a Frey Supreme Passion Pecan & Caramel Swiss milk chocolate when accompanying a malty Breakfast tea. #

Wednesday, November 12, 2008

daily tweets

  • 21:46 An exceptional Agiorgitiko:Domaine Helios-Grande Reserve 2003,by Kokotos. A must for the coming festive season. #
  • 22:50 OMG: I think I'm scared. #

Tuesday, November 04, 2008

daily tweets

  • 09:36 Outlook 2003 complains about MAPI32.DLL? Try renaming the MSMAPI32.DLL to MSMAPI32.XXX and restart Outlook. Likely cause: 2007 residue... #
  • 09:44 LinkedIn added Applications (, Slideshare, etc). Hmmm..... #
  • 10:14 Enabled Google Calendar gadget from Labs and put it on top, using nav bar drag&drop, also enabled in Labs. Highly recommended. #

Sunday, November 02, 2008

daily tweets

  • 22:00 Finished Philip Dick's Radio Free Albemuth: what a flop... #

Friday, October 24, 2008

daily tweets

Tuesday, October 21, 2008

daily tweets

  • 12:49 Got my new OCZ Rally2 USB 2.0 dual channel 16GB flash memory drive ( I can now make that odd DVD soft copy. #

Monday, October 20, 2008

daily tweets

  • 17:29 Lunch at Milos, hilton. Best restaurant service ever. #
  • 19:58 Vicky Cristina Barcelona=Woody Alen's sexual fantasies. Thank you very much, my own are more than enough. I'll tell my little niece though.. #
  • 20:31 Best "commercial" feta cheese: Sgouritsas, Taygetos. Hard to find (Vassilopoulos, N. Psychiko is one place I know) and pricey; my favourite. #

Saturday, October 18, 2008

daily tweets

  • 01:07 Just came back from Nonna pina, Daphni. A good italian restaurant it turned out to be. #

Friday, October 17, 2008

daily tweets

Thursday, October 16, 2008

daily tweets

  • 22:18 Vaio gives me: "The installed battery may not be properly connected to the computer or may not be compatible with the computer" ??!!?!?!? #
  • 22:32 Kill ISBMgr.exe process to stop nagging message. Run msconfig and uncheck ISB Utility in Startup tab. Sony's ISB Utility update went tits up #

Wednesday, October 15, 2008

emails, images, base64 and html

How many times have you received an image-laden email that can't quite show itself properly and instead you get the source? This is a recent email I received in Outlook:

Return-Path: <>
Received: from localhost (localhost [])
by Subject: More 3D Chalk Drawings by Julian Beever!
In-Reply-To: <BAY123-DS3D0865B1F4499DF30C37EA6310@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/related; 
References: <BAY123-DS3D0865B1F4499DF30C37EA6310@phx.gbl>
To: undisclosed-recipients:;

Content-Type: multipart/alternative; 

Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Excellent, as usual!

Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr"><div class="gmail_quote"><br><br><br>


Content-Type: image/jpeg; name=image008.jpg
Content-Transfer-Encoding: base64
Content-ID: <image008.jpg@01C92D89.A8F97520>
X-Attachment-Id: 0.8


This is a mime-multipart html mail, that's got a few image/jpeg parts. To get the image(s) out of it, save it as .msg somewhere and open it with an editor (e.g. Notepad++). Look for the image part you're interested in:

Content-Type: image/jpeg; name=image008.jpg
Content-Transfer-Encoding: base64

Then strip everything off leaving only the base64-encoded image payload that appears beneath (the one that starts with /9j/ and ends in /9k= in our example). Save as say img-base64.txt. This should now look like:


This is your image, base64 encoded. The "save as .msg" bit was necessary as what's shown in Outlook is fiddled with and will not decode properly.

Now there are several options on how best to proceed. You may use Notepad++ builtin base64 decoding capabilities (TextFX, TextFX Tools, Base64 Decode) and save it as .jpg. Or, if Notepad++ is not available, you may use a command line utility for that, like the excellent base64 by John Walker.

Few people are aware though that the base64 payload can be used directly into html pages, letting the browser do all the hard work! The simplest way is putting the payload in an <img> element:

<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA...UG1j/9k="/>

Likewise in a CSS background:

div.image {

This paradigm applies to other types of entities not just images. CSS stylesheets and javascript scripts can also appear as base64 encoded payloads in html pages. I will simply reiterate here two examples by Grey Wyvern:

<link rel="stylesheet" type="text/css" href="data:text/css;base64,LyogKioqKiogVGVtcGxhdGUgKioq..." />:  

<script type="text/javascript" href="data:text/javascript;base64,dmFyIHNjT2JqMSA9IG5ldyBzY3Jv..."></script>  

Now, I don't know why anyone would want to do that with javascript in particular, since base64 encoding bloats original size by a factor of 4/3, other than a perverse pleasure of tinkering about.

Tuesday, October 14, 2008

daily tweets

  • 23:19 I just now realized that all of the urls include the last dot when the tweets are posted to my blog! #

Sunday, October 12, 2008

daily tweets

  • 20:13 Happy go lucky: pleasant if you've lived in the UK. #
  • 01:50 Dinner at Pakindian, Menandrou: not that great food... #

Sunday, October 05, 2008

daily tweets

  • 16:19 Another excellent meal at the renovated Furin Kazan. #

Friday, October 03, 2008

daily tweets

  • 09:19 Upgraded my Vaio to 2GB of SODIMM DDR2 memory. Now it's ready for an upgrade to Vista. Or is it? #
  • 09:45 Eating one of the last "saragli", bought from Papaparaskeua confectionery in Xanthi. Nea Ellas equally if not more fantastic-thx jerry... #

Thursday, October 02, 2008

email hiding

I thought that spamming was an issue of the past. Not because spammers have ceased bombarding email addresses with all sorts of unthinkable propositions, but because now we have the means to render their assaults harmless. It's been ages since the last time a spam email transpired into my [Inbox] instead of going straight to [Spam]. Some people though employ this and that in a vain attempt to hold back the very dumbest of spammers out there hunting for valid email addresses. Historically, the most popular way of hiding an email is by replacing @ and . characters with words:

One can think many variations on this, but they all obey the same principle. I read a personal page the other day using a context-sensitive approach:
This obviously can be used in conjunction with the previous technique. Some organisations have also relied upon context to camouflage their emails by omitting the domain part altogether, so becomes simply firstname.lastname and they do not allow employees to maintain contact lists in their email clients; marvellous. Instead of disclosing their email addresses many incompetent companies provide a mostly ill-designed kind of contact form that does not let you use any other client or know whether a man or /dev/null is handling your email. More recently, emails have started to appear as distorted images of the actual email text, much like a simple captcha:

Alternatively, one may want to prepare a static flash file specifically for hiding your email. Carnegie Mellon have taken this a step further with their reCAPTCHA Mailhide application. The email (or part of it) is replaced with a link that shows you a captcha. If you solve the captcha then the full email address is shown to you, otherwise you are asked to solve another captcha. All challenges are random and you can switch to audio challenges too:

Others have come as far as suggesting using Javascript XORing. The idea is you take a normal email link like <a></a>, XOR each character with some key to get the XORed version, and then serve that together with a script that will dynamically XOR this back to the original link using the same XOR key of course. The idea is to make life difficult for scouting bots since the html page will only have the script and the XORed email. Anoop Sankar demonstrates an example of that technique. Sarven Capadisli reports a few other options. One notable example uses CSS to reverse the direction of text in a inversely written email:

span.codedirection { unicode-bidi:bidi-override; direction: rtl; }
<p><span class="codedirection">moc.liamg@niagaeemz</span></p>

As for myself, I've already made it readily available to spammers worldwide. Here it is once more:

daily tweets

  • 10:06 At last, public transport navigation for Athens is live at Give it a try. #

Tuesday, September 30, 2008

daily tweets

  • 23:28 Listening to Time to Pretend by Mgmt. Unbelievably fantastic song. #

Monday, September 29, 2008

daily tweets

Thursday, September 25, 2008

daily tweets

  • 19:29 Uploaded 26th Sep. issue of Economist onto my ipod mini. Good stuff for traveling to work. #

Monday, September 22, 2008

daily tweets

  • 10:10 It was spoolsv.exe hogging CPU after all! XP SP3 the culprit. Ah, Microsoft, Microsft, Microsoft... sc stop spooler for instant relief. #

Friday, September 19, 2008

daily tweets

  • 08:26 Went to Mespilea, Gazi the other day; they too give fake receipts! Food is mediocre too. Professionalism my ass. #
  • 08:38 Urgently need to buy a pair of speakers with headphone jack. #

Thursday, September 11, 2008

daily tweets

  • 12:07 Unsure about the accuracy of your anti-virus software? Double check with #

Friday, September 05, 2008

daily tweets

  • 09:16 Addicted to Mock the Week. #

Thursday, September 04, 2008

daily tweets

  • 10:36 Very good source for Windows time service, clocks, synchronisation, accuracies and the like: #

Wednesday, September 03, 2008

daily tweets

  • 10:11 Picasa Web Albums added face recognition/tagging capabilities! Neat. Read more in #

TinyUrl Creator

How I've always hated all those people using TinyURL versions of otherwise perfectly legible urls in the vast white expanses of their normal 1280x1024 web pages. This moronic habit made you think that these links were most likely cover ups for god-knows-what phishing, porn, cracks, illegal pills sites they led to. Until Twitter came about and TinyURLs made sense all of a sudden. There's a great Firefox add-on for that, TinyUrl Creator by Jeremy Gillick. Can't tweet without it I tell you that.

Thursday, July 31, 2008

the Albanian Generals Problem?

Funny how the name of the Byzantine Generals Problem came about. This is an account by Leslie Lamport:

There is a problem in distributed computing that is sometimes called the Chinese Generals Problem, in which two generals have to come to a common agreement on whether to attack or retreat, but can communicate only by sending messengers who might never arrive. I stole the idea of the generals and posed the problem in terms of a group of generals, some of whom may be traitors, who have to reach a common decision. I wanted to assign the generals a nationality that would not offend any readers. At the time, Albania was a completely closed society, and I felt it unlikely that there would be any Albanians around to object, so the original title of this paper was The Albanian Generals Problem. Jack Goldberg was smart enough to realize that there were Albanians in the world outside Albania, and Albania might not always be a black hole, so he suggested that I find another name. The obviously more appropriate Byzantine generals then occurred to me.

Tuesday, July 01, 2008

downgrade from Outlook 2007 to Outlook 2002

I recently had to move all of my Outlook 2007 stuff to 2002. First issue: Outlook 2007 does not give you any option to export to an older data file format. The one used by 2002 has smaller capacity (read: different format) and no Unicode support. There is a way around this: create a data file in the older Outlook 97-2002 Personal Folders file (.pst) format and import items from the newer data file format to the older .pst file format. Then import that .pst into Outlook 2002. You can read more about .pst data files in different versions of Outlook here.

Second issue: Once you have imported all of your items into Outlook 2002, you may need to copy your calendar items to a different target calendar. You cannot just right click on the source calendar and copy all the items; if you paste onto the destination calendar, a subfolder will be created containing the source calendar. I know it's stupid, but here's an article to the rescue.

Tuesday, April 29, 2008


This is a diagram from Reviel Netz and William Noel's book [The Archimedes Codex] How a Medieval Prayer Book Is Revealing the True Genius of Antiquity's Greatest Scientist . It's part of Archimedes' proof that a parabolic segment is four-thirds the triangle it encloses and it's particularly astonishing. Most of us I'm sure have the silly figure of a naked man jumping out of a bath shouting "eureka" in our minds when we hear the word Archimedes. This extraordinary little book does a great job revealing the magnitude of this genius. I was shocked at how much I didn't know about who Archimedes was and what he had accomplished...

Tuesday, April 08, 2008

Google calendar nuisances

I am very happy with Google Calendar's syncing with my Outlook. I don't have Microsoft Exchange at work so I can only share my calendar through Google. That is all right, after all that's the whole point of having your calendar online. Or, is it? Not quite! Whenever you go to Google Calendar's first page, and you're not logged in, you have two options: log in or sign up. Yes, no search for somebody else's public calendar. You have to go through the usual Google search route for that. You can send your friends an html link (mine is here) or an ical entry of your calendar, but that's certainly not practical. What's more, each calendar has its own unique link (fine) but what happens if someone wants to see your merged public agenda? To top it all, a private event with "Show me as busy" in a public calendar still shows up when shared, complete with the event's time info and a telling, for-those-in-the-know (or for-those-in-the-law at other times, depending on the event), "busy" title. That's not very private to me.

Wednesday, March 05, 2008

darjeeling tippy golden flowery orange pekoe tea

For all tea aficionados, this Darjeeling Fine Tippy Golden Flowery Orange Pekoe is the "champagne" of teas, as Fortnum & Mason calls it. It is Darjeeling 1st & 2nd flush only, grown on the Himalayan foothills, one of the highest-grown and a rather lighter black, almost greyish tea, that, simply put, has no rival. Even at double the cost of other good quality teas this variety is in a league of its own, and one will have to search high and low to find a better one.

Monday, February 11, 2008

sennheiser hd650

After 9 years of what I, back then, thought of as an absolutely superb pair of headphones, both in looks and in sound quality, I went ahead and replaced them with the ones in the picture above. Friends usually accuse me of overreaching myself. This purchase was definitely a case in point. I started out considering a good pair of audiophile headphones, then I found out that I could afford a much better set if ordered on the web, for the same price, like the Sennheiser HD595. Next thing I know, I was already ordering the top of the range Sennheiser HD650 from eBay... Going from a 40 euro to a $600 piece is like going from a Citroen 2CV to a Bugatti Veyron so my blog entry may not attest to their astonishing sound. Here's some hard facts:

  • Systems with narrow tolerances (± 1dB), hand-picked in pairs.
  • High quality, titanium finish.
  • Specially modulated connecting cable (detachable) made from highly conductive OFC copper, Kevlar-reinforced, with very low handling noise.
  • Extremely lightweight aluminium voice coils for excellent transient response.

Wednesday, January 30, 2008

the age of turbulence

When chairman Greenspan speaks, the world listens

said Bill Clinton back in May 2000, and this statement alone is bold enough for this book to be high on one's reading list. I am not going to comment on whether the actual economic policies during his tenure were right or wrong. Greenspan presents his support for free markets in a persuasive manner and the analysis of the US and world economy's underlying principles and powers both in a historical and recent context is particularly illuminating. I guess the writing, compared to the Fedspeak many people were used to, is unencumbered by such things as, well, the Fed Chairmanship. However, don't hold your breath for any spectacular revelations; the style is rather dry but lucid. Perhaps the most fascinating aspect of this book is his observations on past presidents, from Nixon to Bush II. The analysis of other main economies in Europe and elsewhere is also very interesting, though it appeals more to non-US readers. Definitely worth reading.