Odnoklassniki.ru – the way to do site messages

After all the comments I received for my  other post about Odnoklassniki.ru, I decided to expand a little bit on the positive parts of the web site.  The biggest success of it, except of course for thousands of people registering spreading the word of a mouth, is the messaging system.  And the whole messaging system, but the notification part of it.

For me personally, the proof of the success of the notification system lies in the fact that I actually like it myself.  Because I am usually in the opposite camp.  I think that we have enough messaging and notification systems as we are, for web sites to develop their own ones.  But, in this case, I have to say that it was done very well, and that it works possibly better  than any other alternative could have.

If you are not familiar with it, here is a screenshot (NOTE: the green border on the left was added by me, I’ll explain why in a moment).

Odnoklassniki.ru profile

This is my profile page.  Or, more accurately, a part of it.  This is what I see when I login.  There is the main navigation menu at the top (orange color), with sub-menu (in light gray) for the currently selected tab.  There is my picture, and some basic information, such age, last login time, etc – something other users can see when they visit my profile.  And, there is the notifications section on the left side (I put the green border around it).

Users of Odnoklassniki.ru can send each other messages.  As far as I know, they can’t do mass mailings or group discussions or anything like that.  It’s purely one registered user to another.  There is a limit on the size of the message – 1,000 characters.  There is a rich text editor with some formatting controls, such as text alignment, foreground and background colors, copy and paste buttons, and font face and size selectors.  Of course, smiling images and some commonly used icons (money, beer, etc) are also available.

The nice parts of the notification system are as follows.  Firstly, it shows incoming messages and status notifications in full.  It doesn’t tell you something like “you have 1 new message, click here to read it”.  It just shows it you right there and then.  Secondly, it queues all notifications and messages and shows them to you in turn one by one.  Not all at once or in a digest form, but one by one, in chronological order.  Thirdly, the system doesn’t hide the message after it showed it to you.  And it does not insist on you dropping whatever is that what you were doing and acting upon the message.  No.  It keeps the message in its full length on the left side of your screen until you act upon it.  For this you have two buttons underneath the message – close it and reply to it.  If you close it, the next message appears if there is one, or the notification area folds, so that not to occupy your screen space with nothing.  If  you do a reply, then a popup window appears with the name and picture of the person to who you are writing the message, and a rich text editor.  You can type your message there and press submit button.  Once your reply is submitted, the popup window is closed and the notification for the message that you were replying to is closed.

The way this notification system works is totally intuitive and out of the user’s way.  There is no way one could miss the notification while browsing around.  And, at the some time, it is easy to ignore it if you are in the middle of something.  Considering that many users of Odnoklassniki.ru are middle aged people and older, with somewhat limited web experience, I think the system does them a big favor by not being too stealth or too aggressive.

Back to the wider system of messaging, there are a couple of other nice bits to it.

First of all, it’s the archives.  Message archives are easily accessible through the top menu.  You can go through incoming and outgoing messages separately. And again, there is always the name and image of the user with who you communicated, and the full text of the message right there – no need of extra clicks and deep navigation.

Secondly, the way email notifications are done is also nice.  The system is tracking if you are online or not.  If you are, it won’t be sending you email notifications.  And, if you are not, it will still give you a chance to come back before abusing your mailbox.  It does not send notifications right away as they happen, but keeps them in the queue for some time.  If you aren’t coming, you will eventually get those to your email.  But I have to say that the balance of immediate notifications without emergency email abuse hits right on.  Perfect.

Now, why am I so detailed and picky about this messaging and notification system of Odnoklassniki.ru?  Because, I believe that much of its popularity lies within just this part of the site.  Many of the registered users don’t know how to use other messaging systems (ICQ, Skype, IRC, etc).  Many don’t want to share their email address.  And many try to avoid any extra email.  Also, there is a large diversity in age, current location, and computer skills among the users, so finding another common medium for all these people to communicate might prove rather difficult.  But with this one, it’s not.  Anyone can send a message, get a message, and reply to a message.  And that’s all that matters.  I know some people who use Odnoklassniki.ru as an instant messenger.  They chat with a whole bunch of people at the same time, using really short messages of plain text (no rich formatting), and they send them back and forth a few times per minute.  These people stay online for hours at a time!

Can the existing system be improved?  Absolutely.  Firstly, I think it should use left-aligned or justified text whenever the text of the message is shown.  Now it uses centered text for some reason.  Secondly, I think formatting should be a little bit smarter.  Paragraphs and links should be recognized better.  Text *like this* should be bold.  Text _like this_ should be underlined.  There should be better support for quoting.  There should be a way to refresh your memory about older messages.  Maybe something like phpBB has.  Maybe group discussions will make some sense… Some of the possible improvements should be thought out and planned carefully not to make interface heavier or user interactions more complex.  But there are many potential improvements on the intuitive side of things – something that will minimize the annoyances and unexpected behaviors.

I’m eager to see how this part of the site will evolve in the future. What will be improved, what will be added, and what removed… What do you think?

MIME type of uploaded files in PHP

Today I came across something that rather puzzled me at first, seemed irresponsible and such, but was cleared later, upon reading the manual.  When uploading files in PHP, variable $_FILES stores a bunch of information about each file.  One of those stored bits is the MIME type of the file.  I was puzzled with how easy it was to trick PHP into setting a wrong MIME type.  However, documentation clearly says that:

The mime type of the file, if the browser provided this information. An example would be “image/gif”. This mime type is however not checked on the PHP side and therefore don’t take its value for granted.

Happy Birthday, Perl!

My favorite (so far) programming language has been born 20 years ago.   It’s been loved and hated.  It’s been praised and damned.  It’s been complimented and criticized.  But all that doesn’t matter.  What matters is that it has been helping people all over the world to solve problems.  Tricky, boring, annoying problems.  It provided enough power to build enterprise grade applications, while still being easy and flexible enough to be the super-glue of many systems.

I’m sure Perl will still be with us in another 20 years.  I wish it to be as useful in that time, as it is now.

Thanks, respect, and best wishes to everyone who created and supported Perl, its community and tools all these years.  Happy birthday!

Bloat is bad for you and your code

Steve Yegge has posted yet another of his excellent (and long) rants.  This time he talks about the size of code and why one should jump out of its skin to keep it minimal.

 Most programmers have successfully compartmentalized their beliefs about code base size. Java programmers are unusually severe offenders but are by no means the only ones. In one compartment, they know big code bases are bad. It only takes grade-school arithmetic to appreciate just how bad they can be. If you have a million lines of code, at 50 lines per “page”, that’s 20,000 pages of code. How long would it take you to read a 20,000-page instruction manual? The effort to simply browse the code base and try to discern its overall structure could take weeks or even months, depending on its density. Significant architectural changes could take months or even years.

As I said, it’s a long piece. But it’s worth every paragraph. Even though some Java programmers might be slightly offended by the article, I’m sure it’s not intentional.

Google Profile coming up

In my recent post about Google Reader and Google Talk integration I mentioned that it would be nice to have a possibility to control friends’ names and pictures.  Similar to the way I can do so in Gmail.  Having things a bit more centralized would be nice.

Obviously, Google realizes that.  They are some of the smartest people put together after all. Well, it looks like we’ll have something centralized in the near future.  Web Worker Daily runs a post about Google Profile.  Good news.

And while I was going through that stuff, I had a thought (yes, again).  Google must have some really nice tools for its developers. Usually, companies try to maximize the utilization of available resources, boost code reuse, and minimize time spent on re-implementing things.  Google shown a few decentralized bits over time.  Like this contact management issue, for example.  That probably means that creating something like Google Profile (simple, but very scalable application) has been made extremely easy.  It’s like it is easy to make one rather than to decide if one is really needed and what are the alternatives and how to use those alternatives. That, or they have some a weak approach to code reuse – something that I find hard to believe.  Either way, it’s interesting…