2010-07-24

Cassandra data model in two lines.

Lots of people don't get the Cassandra data model. Hope this helps:
[Keyspace] [CF] [Key] [Column]
[Keyspace] [CF] [Key] [SuperColumn][SubColumn]
Yes, the nomenclature is thoughtlessly confusing, but it pre-dates Cassandra so you might as well get used to it.

If you have no idea what I am talking about then this post is clearly not aimed at you :-P

2010-07-21

Programming languages for beginners.

People occasionally ask me what programming language to learn as a first language.  There is really no good answer to that question and what I recommend has changed over the years.  Rather than outright recommend a language I thought I'd summarize some of the things I think of when recommending a first language.
  • Instant gratification.  Yes, I know this offends the more scholarly programmers, but I think instant gratification is critical.  Positive feedback is immensely important when you are learning and there is nothing more satisfying than seeing software you have written do "real things".  Writing a program that posts to twitter or blinks an LED is a "real thing".  Writing a program that mutates or transforms a list of objects in some clever way is not.
  • Understanding what the program does is vital.  I often see people recommend languages that depend heavily on a deep understanding of more demanding subjects.   If the newcomer can't describe why a program works: effort has been wasted. "You'll get it later" is not a good way to learn.
  • Languages that require a lot of ceremonial fluff distract from what the student should be focusing on.  This applies to everything from how the tools work to syntactic fluff in the language itself.
  • It has to be a "real" language.  As in: a language that is actually used by a significant number of people in paid jobs. 
  • Languages specificly designed for teaching programming are rarely useful.  If they were useful they wouldn't be teaching languages.
  • No oddball or perversely domain-specific languages.
  • Some exposure to a hardware-near language early on can be beneficial, but not as a first language.
In general I think most programmers tend to forget what it was like to learn how to program and they are too colored by their current personal preferences when recommending languages.   It is important to remember that a lot of the things we as more experienced programmers think are cool will make absolutely no sense to someone who lacks our frame of reference.   Save it for later.  Save it for when they are ready to listen and can understand what you say.

Nobody starts learning the violin by having the teacher ram Paganini's 24 Caprices down their throat.

2010-07-13

Why Flash is hardly even a Web 1.0 technology.

The social web is all anyone is ever talking about these days and everyone and their grandmother is now a "social media expert" of some sort.

In essence the web has been social all along.  The only difference is that we have now begun to explicitly implement simple mechanisms to capture what is going on in a more systematic manner.  Years ago links spread through chat rooms and in email.  Now you have twitter and the "like" button in Facebook which serve essentially the same purpose.

Still, Flash represents a problem in these contexts because it sabotages the single most important aspect of the web: being able to directly link to any resource.  Be it a picture, a piece of video or just text.

A very common scenario is that I am researching a product.  I find the information I am after and then I either bookmark it in some way or I share the link with someone.  If the product is an expensive one, chances are that the web site will be one of those fancy Flash things.  Where I can't link to any single resource (like a picture or a spec sheet) and thus I can't share what I have found.  

You usually have to link to the site and then leave detailed instructions on how to navigate to the resource in question.  That is just plain stupid.

Let me give you an example: I recently got my wife a wristwatch.  Researching wristwatches online is a royal pain in the ass.  If you go to the official web pages of the manufacturers you will find that these are mostly made by inept companies that think I will be more impressed by animations and music than I will be by being able to quickly find what I want.  Some of them offer "search" interfaces in which you can specify parameters and have the interface list matching watches.  Could you answer up front whether you want tungsten carbide, gold or ceramic numerals on the dial?  Of course not.  You don't set out to buy a watch that way.  You want to browse, eliminate, compare, remember, revisit, and share.

I gave up using the web to buy a watch and visited a couple of brick-and-mortar stores instead.  I spent less time, learning more, and eventually ended up buying a watch that I hadn't even come across in the couple of evenings I spent online.  Simply because the web pages of manufacturers of timepieces are impenetrable pieces of shit that are of no real value to prospective customers.

And this is pretty much the case for any category of brandname goods:  the websites are more of an obstacle than a help.

Flash "websites" are a terrible idea because they do not even support old-fashioned "social web".  They fail even the most fundamental web 1.0 requirement that you should be able to do deep linking. You can't really link to something deep inside a "flash experience". 

If your company still does complete Flash interfaces, then I am sorry to break it to you, but your grasp of the web is worse than that of most companies in the 1990s and you are most likely being screwed by a bunch of really inept designers.  I recommend you get rid of both them and their Flash sites.