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: mysamsungomnia.wordpress.com/ #

Thursday, November 20, 2008

daily tweets

  • 20:14 Toying around with my new Samsung Omnia tinyurl.com/6mzfpk 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 tinyurl.com/6krrmf Knuth's up there along with Einstein/Feynman! #
  • 11:24 Insanely large FAQ on Java generics by Angelika Langer: tinyurl.com/56eet7 #
  • 13:04 Looking at some astonishing A4 papercut works by Peter Callesen: tinyurl.com/2nxhxu #

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 = nodeIterator.next();
        pruneNode = pruneTree(nodeIterator, child, allowedNodeValues) && pruneNode;
        }

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

    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) {
    System.out.println();
    for (int i = 0; i < currentDepth - 1; i++) {
        System.out.print("\t");
    }
    System.out.print(root.getValue());

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

void printTreeParenthesized(TreeNode root) {
    System.out.print(root);
    List children = root.getChildren();
    if (children.size() == 0) {
        return;
    }

    System.out.print('(');
    printTreeParenthesized(children.get(0));
    for (int i = 1; i < children.size(); i++) {
        System.out.print(", ");
        printTreeParenthesized(children.get(i));
    }
        
    System.out.print(')');
}

The first one will print:

a
  b
    d
    e
      c
  c
    b
    e
      d
      f

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 tinyurl.com/6z6g4w.Best 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: tinyurl.com/5tuldy 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 (Box.net, 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. #