Friday, 31 December 2010

On being outclassed

I got a kick out of solving puzzles. The feeling of churning (rusty) gears in my head is a great feeling - and many times unstoppable. That's why I could, after a nice lunch in our Common Room, go on with various Sudoku versions for ages. But as I find many games boring after a while, programming never really got to that point so far. That's why programming + puzzles is such a tempting combination for me.

Not that I'm really good at it, au contraire. All I said is I enjoy them. The place which grew synonymous to programming puzzles for me is TopCoder, a site with regular "single round matches" or SRMs, which are basically frantic 75 minutes coding fests, for score and glory. And learning. I'm on TopCoder since 2003, but only took part in a handful of SRMs, about one a year, while they are held almost every week. The schedule of the one this week was kind to my timezone, 10am is good to do anything that requires great deal of thinking. It was really fun, and while I haven't got a great score, I got some (unlike in the last few matches :P ) and it was interesting to see the differences between good and great coders.

The ranking system divides people into two divisions based on their scores. In every SRM there are three problems, in increasing difficulty, Level One, Two and Three. Divison Two's Level Two and Three problems are the same as Division One's Level One and Two, thus one can see how people in the different division solve the same question. Oh, because you can see, check and challenge every submitted code.

This time I finished the easiest problem, but run out of time on the second one (see links to the problems and explanation in the SRM 492 Match analysis). So I was really curious how does the best solution (highest score) looks like in my division. It's two pages of code with multiple helper functions, global variables and the likes. Even the second and third were similar in essence.
Then I took a look at the best solution of the top people: about 3/4 of a page, single function, concise, organized.... And all that had to be written in a very short time to have such high score. (Could check some of this out from the SRM 492 Match statistics).

All this got me thinking, there has to be a qualitative difference between the good and great people, not just the "quantitative" difference in the score. To solve the problems you are given (in this competition, or any programming) most programmers who try hard enough would get somewhere. But what makes a person who can code so clearly? More practice? Or is it more like going from Siddhattha to Buddha, a transition that goes one way: you are either enlightened, or not, and if you are, you'll never look at the world the same way.

Thinking about it, this qualitative difference must be here present in many other things as well. Like all the "good" coffees that I drink to fuel the brain, but that cannot prepare me for the occasional find of "great" coffee. The two share almost only the name. Just like programmers: same title, different universe.

Probably I'll never get great, but I'll sure will try. And how? Practice and learn more from people ahead of me (not hard, on TopCoder I'm currently at the 13th percentile, such a crying shame:). There are other places as well to solve maybe different kind of problems Coderloop and Facebook engineering puzzles. But once, just once, I'd like to do the TopCoder Marathon Match. But that's for a different post.

Ps: the coffee example just popped up because I had a really great one yesterday. Almost 24h ago and I can still feel its effect.

Friday, 10 December 2010

Chrome Web (Candy) Store

My first browser was Netscape in 1997. Never really cared for IE for many reasons. Then along came Firefox and I really liked it. Started to spread the word, convert family and friends - with reasonable success. Then Google Chrome arrived. I really adored it. It was fast, useful, kinda no-nonsense browser that I wanted. But at that time it didn't have any extension support so I went back to Firefox for most of Internet adventures, only had a few "flings" every now and again. But then it got out of control and I eloped with Chrome... Now I only use that whenever I can (even if sometimes running the latest developement version, like 10.0.607.0 at the moment, can be slightly painful, but that's by definition).

When Chrome got extensions, they felt like an evolutionary step. I can install something in the browser that does not need restart? It was like going from Windows to Linux where instead of waiting for the reboot all the time you could run the same system for weeks and months if you wanted to. A bliss...

Don't remember when I first heard of the Chrome Web(App)Store, but I do recall that I didn't think much of it. The idea looked neat but not something that I would use. A few days ago, however, it got a bigger advertising push, had new features (as much as I can tell) like syncing the apps between different computers (the extensions did that before as well),... So I set out to try it.

It's like first trip to the candy store - I go and install every one of them that looks interesting. So what do I have now?

First impression of the whole Web Store that they are still looking for their own definition, what is an app - and most crucially, how's an app different from an extension or even a bare bookmark?
My thought so far: in most cases the difference is from marginal to non-existent. This is especially obvious for Google's own "apps": Gmail, Finance, Blogger, .... Those are just links to the respective websites. Why make it an app, then? I have two guesses, which are not exclusive:
well, they cannot be left out, duh!
many of the websites we use now are closer to the stand-alone desktop software we know very well than to a traditional website. This might be a nudge of reminder: "this is not a website, this is a web 2.0 application!"
The second one seems to be the more important insight, the blurring boundary of what's on the web and what's off. Guess the distinction is made when you go in a lecture room in the basement of your university and there are no plugs and waves and 2,3,3.5,4G connections... If you can still take notes? App. If have to ask your neighbor for paper, and yeah, pen, then it's Web 2.0.... Duh.

And even besides the Google apps, most others are just links. Some feel more "linky" than other. That's partly a design challenge (there are some truly gorgeous apps, sure) and partly an UI challenge of when to ask for that darn "sign-up" that will bring the business in. The pushy apps, and the ones that don't have Gmail login feel more "old-school" than the seamlessly integrated ones. I definitely don't want to make a new login for every app I install. That wouldn't be more convenient but more annoying than the desktop cousins.

So, what do I installed (and kept for more than 10 seconds)?
  • Graphics apps. They need to improve but I can see their potential, mostly for quick and dirty editing.
    • Aviary has a bunch of those (along with e.g. music editor), I have Advanced Image Editor (compete with Irfanview or GIMP) and the Vector Editor (compete with Inkscape). We'll see how they'll work out. Though I was surprised that it's flash instead of HTML5. Guess I expected too much
    • Sketchpad, because looks cool, otherwise yet another Paint clone.
  •  Productivity/Work, this seems to be a lot of very similar apps, I tried a few in many categories, currently using these ones:
    •, looks quite useful, simple and under developement. I had so many todo lists, but still the paper is best. This is quite okay so far. And it has an API, could think of what to do with it. Even though it merely a link, does not feel like that. Appness is quite justified, I think.
    • 280 Slides, well, I make most of my presentations in Latex/Beamer. But this chould be handy when something's needed quick. Though have to investigate if it can export things in a format other than .pptx (brrrr).
    • Write Space, this is one that I would really call an app, since it is really standalone and works offline. Pretty much a PyRoom clone, but a good one. Goal: distraction free writing. I think it gets there. I'd request the ability of editing more than one document, though.
    • LucidChart, flowchart, mindmap, wireframe, UI mockup site. Haven't tried it much, kinda "just in case". Seems to be team-oriented, collaborative editing.
    •, website builder. For the ease of it. If there's something I care about I'll create it in a text editor anyway.
  •  Communications/Mobile:
    • Seesmic, a Twitter/Facebook/Linkedin client. Not bad, though I'm not sure how long I will use it: Twitter interface is very similar and already got used to it, Facebook takes up too much of my time already, and I'm on Linkedin not because of the status updates. I feel obliged to try it, though, since on Android it is the one I use.
    • Android Push Contacts, regardless the name it is to send SMS from your computer, through your phone. Also, received messages could show up on your desktop/laptop. I installed because it seems like a very convenient idea. I need to think of a reason/recipent to send an SMS, though, 99.99% of my business is email now. It is also open source (the Android part, the AppEngine site and the Chrome extension as well) so could be an interesting source of learning.
    • Fiabee, file sync between Chromes and other devices, phones included. Have to try it in detail. Looks like a more flashy Dropbox with smaller space and more features.
  • Random
    • Google eBooks, also slightly "linky", but feels like a library (well, it should!) so I guess an app is good for this. Going to check my favorite public domain books, I haven't commited myself to buying electronic versions yet.
    • Geni, a family tree creator. Great idea and I was looking for proper family tree visualization software before (though the jury is still out on how "great" this is), so I'll probably use it. Feels very weird that the program has so many fields to fill out about every single person - but if I think about it, there's nothing unusual. On the contrary, other sites few "bullet points" hollow out the differences between people. Nevertheless, I'm trying to set the right boundaries between usefulness of the site and my willingness of giving them any info.
Well, I guess this candy store won't run out of sweets. Let's see which app sticks and which one will fade.

    Sunday, 7 November 2010

    Part of the network

    Went to see The Social Network today. It was good storytelling and even if tones down some aspects of it (there were too many comments from characters which they could only really make if they see into the future), life can be as strange or stranger than (pure) fiction. I enjoyed it a lot, probably because it struck a bell with what I know about computer science reference, the hacker culture, startups. Also probably because I "was" in there in 2004 when Facebook just started to take off abroad, and I had to have an email address to sign up. ;)

    Of course, a lot has changed since then, and I have changed a lot too. For example, I did have a (disastrous) interview with Facebook earlier this year, and a similarly bad (but slightly more encouraging) one with Google. Despite not being a CS major. And despite never applying there, but they came and asked me.

    The outcome of those interviews are not really surprising for me, but before both of them there was a time when I had to seriously consider - what if I DO get the job? Would I like it? Could I go from hobby to profession? Would I regret "giving up on Science"? Well, whatever were my thoughts at that time, it does not matter, since I'm still "here". But looking at the movie, the atmosphere, the offices, the workstyle... I feel I could give it a try. :) (no, not the "coke off a girl's belly" type of parties, that's the business section of the company I don't especially care for)

    So what would it take to get a job there? I feel if I had a few months off, let's say at least 3 or 4, I could polish up on the things I needed and could - not necessary ace it, but - do very well for a not strictly speaking professional. If I had to and I wanted to.
    On the other hand, if I take that much time and dive into any area of physics (which I supposed to do as my chosen profession anyway), how much would I gain? Could I ace that? I really hope I could.

    But I find choosing between these two paths that seem to be open (even if just a tiny little crack) very difficult, since they are almost have nothing in common. I've found no good personal measure of success yet, maybe that would be a good start.

    And in the meantime, if I'm not inclined to pick up the arrogance, but I think I can still learn some creativity and perseverance from this fictional "Mark".

    Wednesday, 25 August 2010


    Spending upwards to 8 hours every day on computers, I really start to feel that many times the productivity bottleneck is not in the brain, but in the channel that transfers my thoughts into the machine - the input. Keyboards and mice are more important than I have previously considered. I WAS interested in them, but curiosity, not much serious thought about what do I expect, what qualities I require... These days, however, I use multiple computers in a single day (some day 4 or 5, guess not much to true geek, but there you go), all of them different keyboards  and some annoy the hell out of me....

    After some consideration, what do I want? (not an exhaustive list)

    • Good tactile feedback
      Tactile feedback is great when typing blind (which is really the only way to be efficient). Some keyboards (especially laptop ones) have very much reduced feedback, some desktop keyboards (older ones) are pretty damn hard to press and make me fingers tired. Balance these out.... 
    • Separation between keys, but not too big separation
      Keys without gaps between them will make typing much more error prone. Too much separation and it becomes an exercise instead of flow...
    • The bottom-left corner should be Ctrl
      Ctrl is a very frequently used key indeed... So it should be easy to locate, easy to press. When in the original place of bottom-left, one can use the side of the palm to press down and not much thought needed where it is... Moving the Ctrl key away from there is just evil, I tell ya.....
    • Stand-alone keys for Page Up/Down, Home, End, Insert, Delete
      To save space on keyboards (mostly laptop ones, understandably) designers put these keys together with others, and use a Function (Fn) key to activate them... But these are pretty frequently used keys (navigation on page/text lines, copy-paste, ...), why do you have to be slowed down by looking for another key to do that? When I see the same design on desktop keyboard, it feels even worse. Sure, got to have them, there are applications (computerized cash registers come to mind) that needs small keyboard first and foremost, and they use a reduced set of keys. But for every other desktop, get a full set...
    • Slight inclination
      Don't like flat keyboards much, desktop keyboards used with their wee legs can be much more comfortable.
    • Bonus point: decent sized Enter, numpad, reduced typing noise
      Enter is a very frequently used key, just like Space. Why not make it proper size to make it quick and robust to type it?
      Numpad just makes it so easy to type numbers (duh), quite underappreciated by some.
      Laptop keyboards are awesome if one wants to type silently, in the evenings desktop keyboards can be very annoying...

    So basically, at the moment I like something along the lines of the classic keyboard, something like this...
    Maybe it can have a bit more border on the bottom, and a larger main Enter. But these are quite superficial things compared to other keyboards' issues... Notice the good arrangement of the PgUp/Dn keys and friends: 2x3...

    My current desktop keyboard (Asus):
    Fn key in the place of Ctrl? Just ridiculous... Have altogether 5 keys that needs Fn (Print Screen, Scroll Lock, System Request, Pause, Break), and there's still space above the numpad to place them... Why??? And during the day I got to get used to this arrangement (Fn and then Ctrl from left to right), then every other keyboard I have has it the opposite way (Ctrl and then Fn). Cue confusion...
    Also, Insert & Delete is placed in the top line with the F1-12 function keys, Home/End/PgUp/PgDn in a vertical line... Quite inconvenient.

    EeePC 8G:
    Small keyboard even for a laptop thus PgUp/Dn with Fn key and no inclination, but still one of my favorite. Keys have reduced tactile feedback but a good balance between feedback and noise so feels good... The key separation is too small for many, but I like it a lot. Not having a "Windows key" on it is a bonus point. :)

    Sony Vaio:
    I use this sometimes - combined with Chinese Vista weirdness (though that's not the keyboard's fault per se) one of the most tiresome typing experience. Such huge key separation, feels like olympic gymnastics...

    This is in software. When in portrait mode, the one-finger (index) typing is pretty tedious, but in landscape mode the two finger (thumbs) typing is one of the fastest I can do on any keyboards (mostly until I have to correct a typo). With predictive text it can be even faster, but can also break the flow - I usually turn prediction off.
    Non-alphabetic keys are on two alternative keyboard settings (accessed by the "12#" key, plus another one), though there are some on speed-button (hold the "12#", shortcut appears and then release over the desired key), though maybe I'd have chosen different subset of keys for that.
    Weird thing is that the touchscreen seems to be less sensitive to my left thumb than to the right one - which is not really the screens problem, but the way I'm "thumbing". I don't feel the difference, but would help to figure it out.

    Now look at some of the weird keyboards that I haven't used but would be interesting for one thing or another...
    Optimus Maximus:
    Keyboard for about $1300? Well, when every key is a reconfigurable little screen, the costs add up... The idea is great - a completely adaptable keyboard (e.g. show the capital versions of letters when pressing Shift, or define custom labels for the keys used in your favorite game). The execution, however, seems to be not as good. Reviewers say that it is quite uncomfortable... I'll probably use my one grand for something else (though one can by the keyboard key-by-key too :)

    Laser-projected virtual keyboard:
    Connected through Bluetooth, mostly aimed at PDAs and smartphones, this is a special one... Project the keyboard on any flat surface, monitor the reflection and there you have your "key-press". Never tried it, but wanted to do for years... I guess it would fail my requirements with zero feedback, slow typing, and small number of keys, but can see advantages sometimes: zero noise, completely portable, and just plan cool....

    This one I actually tried in the store a little bit (just on its own, not connected to computer, though), and it's surprisingly okay. The idea is, that one doesn't need much to make a key, just an enclosed pressure sensor, the enclosure can be anything - e.g. rubber. The tactile feedback is quite good (and not too springy:). The key separation can be a bit tricky, but I guess there are so many things that the mind have to get used to about the whole board, that it's manageable.
    Also, one can just fold up the board when finished, no problems with cleaning (did you know, that keyboards are dirtier than the inside of most toilets? I can totally believe that...)

    Anyway.... after typing this much about the things I used to type, should change from meta-work (née procrastination) into real work mode... But I keep my eye out for better boards, if you have any advice, would love to hear it....