Fighting Adobe AIR on Fedora 12

Until now I was completely and totally ignoring Adobe AIR.  As far as I was concerned, it existed in a separate universe.  But recently, quite a few Adobe AIR applications started to come up on my radar that I wanted to try.  Yesterday, for example, I saw the Flickrroom, which sounds exactly like something that I need.  So, I searched yum repositories, and then Google, and then I found this blog post, which provides clear instructions on how to install Adobe AIR on Fedora Linux.  Followed everything to a step, and failed.  Then Googled for more, tried, and failed.  And no matter what I do, it seems to fail miserably.

Adobe AIR in Gnome menu

As far as I can judge, Adobe AIR is installed on my system.  I see two items in the main menu and they even work when I run them.  But when I try to install any Adobe AIR application, I get a well known error message.

$ Adobe\ AIR\ Application\ Installer /home/leonid/Desktop/Flickroom.air
Application crashed with an unhandled SIGSEGVCrashlog has been dumped in /tmp/airCrashLogs/0219_1359_vG6AfW

This seems to indicate that I missing some dependency on my system, but I can’t which one. I’ve installed and updated everything that I could find a reference to.  I’ve also looked through the crash dump for any hints, but nothing jumped at me.

Any ideas?

New York Times on Google Buzz

New York Times runs a good story on Google Buzz.  It’s a gentle introduction into what Google Buzz is, and how it compares with some other social networks like Facebook, Twitter, and FriendFeed.  If you are still trying to make sense of this whole Google Buzz thing, you should definitely read that.

As for me, I do enjoy Google Buzz quite a bit.  It removes the almost unnecessary limit of 140 characters per post, doesn’t limit me to only text, and somehow seems to connect me with just the right people.  And what’s even more important, now I get notified of the follow-ups directly in my Gmail inbox.

There are a few annoyances here and there – like seeing follow-ups in both Google Reader comments view and Gmail inbox – but I’m sure they will get sorted out eventually.  Overall, Google Buzz is a useful and simple to use service, and I already see that I tend to Google Buzz more than Twitter.

Web site monitoring

Devlounge lists three web site monitoring services : Montastic, Mon.itor.us, and LinkPatch.  These services check your web sites regularly and notify you when something goes down.  They also provide additional services, like checking for broken links and such.

While I personally prefer a full featured monitoring tool such as Nagios (with SMS integration via Clickatell), it’s good to know that there are simple and straight-forward ways for basic monitoring.  After all,  installing and configuring Nagios makes sense only if you are geek or monitoring things is a big part of your business.

Update: Also http://www.alertra.com/ was recommended to me by Michael Cohen over on Google Buzz.

How accurate is Google Analytics?

That’s the question that I was asked recently by one of the co-workers.   It is simple and not so simple at the same time.  It really depends on what you are looking for, what is the acceptable accuracy, and what is that you are comparing Google Analytics with.

For example, if you compare the numbers from your Google Analytics reports to the summaries of the web server logs, you’ll probably find that Google Analytics reports lower numbers.  Almost like not everything is recorded.  Which is true because Google Analytics is using JavaScript to track your visitors.  Server logs record all hits to your web server, but the information in logs is very limited – it won’t be enough for anything but very basic tracking.

How much will numbers differ?  Here is what Google Analytics blog has to say:

Google Analytics uses JavaScript tags to collect data. This industry-standard method yields reliable trends and a high degree of precision, but it’s not perfect. Most of the time, if you are noticing data discrepancies greater than 10%, it’s due to an installation issue. Common problems include JavaScript errors, redirects, untagged pages and slow client-side load times.

Having used Google Analytics on a number of sites over a number of years, I’d say that that is just about right.

CakePHP : Building factories with models and behaviors

CakePHP is a wonderful framework.   Recently I proved it to myself once again (not that I need much of that proof anyway).  The problem that we had at work was a whole lot of code in once place and no obvious way of how to break that code into smaller, more manageable pieces.  MVC is a fine architecture, but it wasn’t obvious to me how to apply it to larger projects.

In our particular case, we happen to have several data types, which are very similar to each other, yet should be treated differently.  Two examples are:

  1. Client account registrations.   Our application supports different types of accounts and each type has its own processing, forms, validations, etc.  However, each type of account is still an account registration.
  2. Financial transactions.  Our clients can send us money via a number of payment methods – credit cards, PayPal, bank wires, etc.  Each type of the transaction has its own processing, forms, validations, etc.  However, each type of the transaction is still a financial transaction of money coming in.

Having a separate model for each type of account or for each type of transaction seems excessive.  There are differences between each type, but not enough to justify a separate model.  Having a single model though means that it’ll continue to grow with each and every difference that needs to be coded in.  Something like a class factory design pattern would solve the problem nicely, but the question is how to fit it into an existing MVC architecture.  Read the rest of this post for a demonstration.

Continue reading CakePHP : Building factories with models and behaviors