In the midst of crisis, opportunity … a counter-argument to “Free Kills”

Today I read this really insightful article about how giving away software can kill the market for it.

While I largely agree with the Andy, I think that he has missed one important point.

Giving away a really good product in a certain space can depress sales and stifle innovation, but there will always be that small percentage of users whose needs are not met by the free alternative. Because of this, niche users will be willing to pay top dollar for a product that goes beyond the free alternative.

What about the free alternative?
Won’t its developers be adding features too?
Sure. They might.
But its free, so its not a priority.
Your customers, on the other hand, will pay you good money to make adding features they want a priority … see the difference?

Case in point, Google Calendar added to-do lists, almost a year ago now … but despite cries for an api for it, nothing has happened.
2524 users (people requesting that feature) is not a large number to google, but if you’re a small development shop … and each of those users were paying you  … say $4.99 a month … you’d be doing okay.
Lots of motivation to bang out an api … yeah?

So, instead of looking at it as “Free” killing the market for your product.
Look at it as  …. “Free” doing you the favor of hand delivering the most passionate, keyed-in, highly motivated group of users in the market for your product, to your doorstep … for free :D

You’re welcome.

Add comment February 9th, 2010

Google dropping support for IE6 in March 2010

Finally!

No_IE6

Add comment January 30th, 2010

How to add updated_at and created_at (timestamps) columns to an existing table in rails

From Rails Guides …

change_table :products do |t|
  t.timestamps
end

Add comment December 23rd, 2009

Google Chrome adds RSS feed notification/preview/subscription via extension

This may have been around for a while, but I just learned of it today.

If you run the dev version of Google Chrome, you may already be aware that it supports extensions.

In fact when I first found out Google had published a few extensions for eager beta testers to try out, I went and got the rss feed extension.

Unfortunately, even though it showed the icon when a feed was present, clicking it only took you to Google Reader to subscribe to the feed (or so I heard, clicking it in my version of Chrome did nothing)

Google Chrome RSS feed Extension feed availability notification

Google Chrome RSS feed Extension feed availability notification

I am happy to report that with the new version of this extension (1.6.2), clicking on a feed allows you to actually preview the rss feed …
<sound of angels singing HALLEJUYAH />

I can finally test rss feeds I’m coding in Chrome without having to fire up IE8 or Opera (Firefox doesn’t preview either, just tries to subscribe you to live bookmarks … I hate that) and unstar this bug ticket!

Image of Google Chrome RSS feed extension previewing a feed

Image of Google Chrome RSS feed extension previewing a feed

Add comment November 19th, 2009

Don’t hit the business growth accelerator just yet Joel!

Yesterday, Joel Spolsky posted an article about why growing steadily but slowly might not be such a good idea.

When I read it, I had my reservations about it, but I couldn’t express them … the whole idea just sounded wrong?

Well, the guys over at 37Signals issued a rebuttal of Mr Spolsky’s argument, and I have to say … I agree.

The main thing that drives the use of software like Fogz bugz (a bug tracking web application), is how good it is, and how much buzz it generates. The size of your company doesn’t matter if people that matter (developers in this case) are talking about the other guy’s software on twitter, facebook, digg or reddit, and recommending it to every other developer they can find.

Just my 2 cents.

cropper_capture_11-05-200911-05-14 AM

Add comment November 5th, 2009

From the books: Exceptions to Ruby’s standard variable assignment by reference behavior

The un-reference: immediate values
Some objects in Ruby are stored in variables as immediate values. These include integers, symbols (which look like :this), and the special objects true, false and nil. When you assign one of these values to a variable (x = 1), the variable holds the value itself, rather than a reference to it

– From page 54 of The Well Grounded Rubyist by Robert Black

Filed under Things I did not know about Ruby :D

41A+B9T4yGL._SS500_

Add comment September 28th, 2009

Wordpress creator Matt Mullenweg on staying in the ‘zone’ as a developer

“Music helps me when I’m coding, which is still my priority. When you’re coding, you really have to be in the zone. I’ll listen to a single song, over and over on repeat, like a hundred times. And I turn off instant message and email. If you are taken out of the flow, if that little toaster pops up that says you’ve got mail — and you look at it, you’ve lost it. You’re juggling variables and functions and layouts. The moment you look away, it all falls to the ground, and you spend 10 minutes getting it all back in the air again.”

– Matt Mullenweg
June 2009 issue of  Inc. Magazine

Add comment August 26th, 2009

Passenger dying … too many apache processes

I encountered this problem when I first started working with Passenger, and have run into it repeatedly over the last year, so I thought I’d just throw out the fix I have for it.

Usually people having these problems are usually running the prefork MPM and have a section in their apache config file that looks like this

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxClients          150
MaxRequestsPerChild   0
</IfModule>

#Aside: To find out if  what multi processing module (mpm) you are runing (worker or prefork) just run this command.
apache2 -l
(it may also be httpd/httpd2/apache/apache2ctl/apachectl -l)

The apache processes themselves don’t usually take up a lot of memory, I’ve seen anywhere from 0.2MB – 14MB … but they usually lie in the range of 2 – 6MB.
The problem comes if you get a traffic spike and Apache spawns up to 150 process to handle the traffic.

You can see that you can easily have 300MB – 1GB of memory allocated to the processes and, consequently, run out of memory so that your server is now unresponsive.

The fix for this is to set MaxClients to, at minimum, your StartServers + Min Spare Servers. But you also want to take into consideration the Max Instances of your app that you’ve set for passenger and how many requests you want to be able to serve at a time.

From Apache documentation

The MaxClients directive sets the limit on the number of simultaneous requests that will be served. Any connection attempts over the MaxClients limit will normally be queued, up to a number based on the ListenBacklog directive. Once a child process is freed at the end of a different request, the connection will then be serviced.

Be sure to increase this number if you are running php apps on your server as well.

Hope this helps.


Add comment August 25th, 2009

rake aborted! development database is not configured.

You might have been happily running migrations on your development box for weeks and go to get the application set up on a production server.
And all might even have been going well until you ran

rake db:migrate

only to see it crash and burn like this.

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
development database is not configured

Fear not ye intrepid developer!
This happens when you leave out the development specifications in your database.yml.
(If you don’t define development.rb, you’ll get a weirder “No such file or directory – …../development.rb” error)

Apparently rake db:migrate runs in development mode no matter what environment you’re in (still looking into the reason for this).
So what you have to do is call migrate like this

rake db:migrate RAILS_ENV=production <—- or whatever your environment is

That should get you back on the path to true happiness.

Add comment July 2nd, 2009

Real programmers write in Fortran!

And oldie-but-goodie …

Mel’s job was to re-write the blackjack program for the RPC-4000. (Port? What does that mean?) The new computer had a one-plus-one addressing scheme, in which each machine instruction, in addition to the operation code and the address of the needed operand, had a second address that indicated where, on the revolving drum, the next instruction was located. In modern parlance, every single instruction was followed by a GO TO! Put *that* in Pascal’s pipe and smoke it.

Mel loved the RPC-4000 because he could optimize his code: that is, locate instructions on the drum so that just as one finished its job, the next would be just arriving at the “read head” and available for immediate execution. There was a program to do that job, an “optimizing assembler”, but Mel refused to use it.

“You never know where it’s going to put things”, he explained, “so you’d have to use separate constants”.

Add comment June 30th, 2009

Netbeans 6.7 final released

Click image to go to Announcement page.
Hopefully I’ll get a chance to install it and write a half-decent review soon (for the Ruby/Ruby on Rails part at least)

cropper_capture_06-29-200904-54-23-pm

Add comment June 29th, 2009

Rackspace goes down … takes internet with it.

Nothing insightful to say here but just link to the blow-by-blow account of the incident as it happened

Apparently it was such a big deal that even Justin Timberlake weighed in … pure hilarity. The ironic thing is one of the folks I work for, *just* got a rackspace server.

Justin Timberlake tweets about Rackspace Fail

Timberlake clowning Rackspace

Add comment June 29th, 2009

How to get a 25% boost in your Rails app?

I was working on a rails app today, and got to wondering about the very many

SHOW FIELDS FROM

MySql queries I was seeing.

I had always thought about whether there was a way to get rid of those completely, or reducing the number of them by caching or something.
Well, today I actually did some digging and found this little gold nugget about “SHOW FIELDS” calls in Rails.

Apparently, Rails does cache MySql “SHOW FIELDS ” with one notable exception.

However, upon inspection it turns out that Rails DOES NOT cache ‘SHOW FIELDS’ queries for has_and_belongs_to_many associations. So every time a select or an insert is done via a Rails has_and_belongs_to_many association, a ‘SHOW FIELDS’ on the join table is executed.

So the dreaded HABTM association strikes again!
Those darned things are pure evil eh? :D

Well the awesome blog writer figured out a patch to fix the problem.

And in his tests he reported this (see image below for reference) …

After rolling this change out we have seen a very noticeable improvement on performance. By using New Relic’s Compare With Yesterday feature (see chart below) we can see that our application response time dropped from an average of about 560 ms per request to 420 ms per request. This is roughly a 25% performance increase. The yellow line shows today, the blue line is yesterday. CPU and database load decreased by about 25% as well.

A 25% improvement in application response time!?!?!
Sign. me. up.

New Relic monitor app showing 25% improvement in response time

I followed the Rails ticket on this particular issue and couldn’t figure out whether the fix had been rolled into a Rails version yet. I asked the blog author and he says the patch has been included in Rails 2.3, so if you’re running that, this does not apply to you.

I’m about to apply this patch to a couple of applications, hopefully it helps you too.
Please post in the comments about your experience. Same? better? worse?

Add comment June 29th, 2009

Print Screen in Windows with bootcamp on a Macbook Pro

This one has eluded me for quite some time, until I came across the answer here

Simply hit alt+fn+F11 to do a screen capture on a Macbook Pro (fn+F11 maps to Prt scrn on a mac running bootcamp)

updated: If you have a newer version of bootcamp (2.1+) the combination is now shift+alt+fn+F11

Add comment June 27th, 2009

R.I.P Michael Jackson

Yes I know this is supposed to be a professional blog.
But today, a man I considered the greatest ever musician in modern history … died.

Thank you for the awesome memories Mike.
You inspired me more than you’ll ever know.
You were amazing.
I’ll miss you.

20090626-mj-dead-at-50

Add comment June 26th, 2009

Previous Posts


Feeds

Calendar

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031