Wednesday, December 10, 2008

Joys of Gmail's Basic HTML mode

Don't get me wrong, Gmail is great. It works really well, it makes using desktop mail clients a pointless endeavor, and overall I love it dearly.

Unfortunately, despite google working hard at making its javascript magic work everywhere, they don't quite succeed. Apart from weird browser-related issues that crop up once in awhile, its basic user interaction model is awkward. Pressing the back button creates a storm of loading screens, and it's never quite clear if the "Refresh" button does anything.

Thankfully, Gmail also provides a "Basic HTML" mode. In that mode, there is no client-side code being run, and all the pages are fetched from the server. Despite that, it is always just as fast as the standard mode (even faster on very big email threads, in my experience). Plus, all the usual browser interactions (like the back button, or hitting refresh) work exactly as expected.

I've been using this mode exclusively for almost a year now, and it is simply fabulous. Recently they have added email auto-completion on the From: field, which was the only standard feature I was missing in it.

There is a link to turn it on at the bottom of the screen, and it then provides an option to set it as the default. Oh, and did I mention that there are no ads to be found anywhere in the basic mode?

Thursday, November 27, 2008

Moment of Zen

No actual ranting in this post

When coding, I often find myself running out of short-term memory. There's a constant need to refer to some code snippet from somewhere, or a bit of documentation explaining what all those weird function parameters do, etc. etc. While having a second monitor helps with keeping stuff like that visible, I also find it quite distracting to shift my eyes across the screen expanse just to pick out a tiny bit of information.

What helps immensely in this situation, is a small text editor sitting at the bottom of the screen (just below the code edit area). On Windows, I use the brilliant DeskPins tool. I pin one of my notepad windows on top with it, and then simply paste anything I need into that. When not needed, the window can be simply minimised.

It looks like this, and works extremely well:

Naturally, this works ideally no matter what set of IDEs and tools I'm using, which is a great bonus. The editor is SciTE, which is the best Notepad replacement in the history if the universe.

Friday, May 16, 2008

0th reason for UML's demise

Little tutorials discusses why UML has lost. It's a correct, if slighty tedious, overview of why the favourite bullshit "technology" of the 90s failed.

Naturally, it fails to mention the main, zeroth, reason: the sort of people who ever cared about nonsense like UML are also prone to spending countless hours categorizing and discussing the patently obvious.

Sadly, this can be traced as the reason for the apparent popularity of many other "technologies" out there. REST anyone?

Monday, October 8, 2007

Can your clustered software platform do this?

Disclamer: I actually know nothing about cluster software environments. And what I call "threads" below aren't actually threads.

Suppose you're developing some sort of clustered multi-processor system. The sorta thing that runs on many computers, and uses fairly complex inter-node interaction with various bits of shared state and whatnot (i.e., something more involved than parallel processing jobs with a message bus in-between). Say, it's a clustered Instant Messaging server, or some sort of a HA database system.

For development, you're running many processes on your workstation, or have some sort of a test cluster thing. All of that is using sample datasets, debug clients, etc.

Now, the problem is that changing code while developing this system is a nightmare. Most of the time, any single change will require recompiling the thing, restarting parts (or all) of it, and then going through all the motions necessary to get it into the desired state. At which point the freshly-written code is debugged, new issues are found, and the whole cycle needs to be repeated. A nightmare.

Well, today I found myself in just such a situation: developing a clustered system that does something or other in many processes spread accross multiple machines. Only (of course) it was all being done in Erlang. And it was a pleasure.

I would be poking at the cluster through Erlang shell (an interactive yoke similar to what one finds in Python or Perl, only this one was running as part of the cluster, so I could easily examine states of various bits of code running on various machines, send them commands, kill & restart threads, etc.) When this poking found an error,
I simply fixed it in code, compiled that, and then issued this command at the shell:

rpc:multicall(nodes(), c, l, [my_module]).

What this says is "on all erlang processes known, purge old version of code for my_module, and replace is it with new version from disk". What it does is, it goes to every
connected Erlang node (and since Erlang clusters tend to organise into fully-connected graphs, that means all nodes in the cluster), finds all threads currently using code from my_module, and substitutes new code from disk instead. And it generally does it without affecting running in-memory state at all. Let me just repeat: I can change code a thread is running without restarting it, while keeping all of its associated in-memory data intact.

This way when I find a bug, or need some new feature, I can add it to my running cluster and have it available straight away, without any sort of restarting or messing necessary. It's very cool.

Monday, September 17, 2007

People who can't stop laughing on youtube.

After a very productive morning, here are some videos of people who cannot stop laughing:

  1. Silly americans
  2. German weather anchor
  3. Barbra Streisand