How do you know when an Idea is a ‘great’ idea
Everyday, we are surrounded by ideas. Ideas that emerge within our brains or ideas shared by other people, there is simply no dearth of ideas. The art is to find out the idea which does the trick and can make a huge difference. Of course, I am not discounting the execution bit here, but it is not the point of discussion in this article.
All of us in our lifetime not once but multiple times, get ideas which can change our world. However, we fail to execute and the reason why we fail to execute is because we ourselves ‘dilute’ the whole thing or just do not think that it’s indeed a great idea.
On of the things I have learned about ideas is that if you think a little bit more, there are some ideas, which just do not leave us that easily. They keep coming back to us. In my view, we human beings are designed with an inbuilt capacity to identify ‘great idea’. Here is a diagnosis recipe to identify a great idea:
1. The ‘great’ idea moves you in a small or big way. It inspires you to take an action
2. The ‘great’ idea stays there for a while..sometimes a week sometimes a few months
3. The ‘great’ idea touches others in the same way as you
4. The ‘great’ idea at times occurs to you as ‘day dreaming’
So, if you have an idea…watch it closely and discover it for yourself…
Does this idea inspire you?
How to set-up Ruby on Rails server on a Linux cloud (Ubuntu 10.04 LTS)
Setting up Ruby on Rails using passenger on a Linux server is a fascinating experience….provided everything works well
. I had to try several times before getting it right. I would like to share what I learned the hard way; so that, doing the same for you becomes a breeze.
I am assuming that you have some familiarity with Apache web server, Ruby on Rails and basic Linux commands. So let’s get started…
When you sign-up for a cloud server or a VPS, you get the server IP address, username and password. This is all we need! Log-in to your Linux server using the SSH protocol.
I have chosen Ubuntu 10.04 LTS (Lucid Lynx) as the Linux flavor. I prefer Ubuntu due to it’s simplicity compared to other Linux flavors.
Step 0: Update your Linux
Update your Linux source repository:
sudo aptitude update
In order to make sure our packages install correctly we need to set the locale information for Perl correctly:
sudo aptitude install language-pack-en-base
Now to keep the server secure, we will update the server using following command:
sudo aptitude update
Your Linux server is ready for some real action!
Step:1: Install Apache
You will be serving your website over the web and you need a web server. So, here is the command to install Apache web server:
sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
Now open the main apache config
sudo vim /etc/apache2/apache2.conf
At the bottom of the file add the following line
ServerName demo
In the above line change the text “demo” with your ServerName of your Cloud Server hostname or a FQDN. Remember for the sake of example I am using the Server Name as “demo”
Once done, save the file and restart Apache gracefully using the following command:
sudo apache2ctl graceful
Now, if you navigate to your cloud server IP address, you will find the default Apache welcome screen “It works”
http://233.49.493.43
Step 2: Install MySql
Use this command to install MySql server:
sudo aptitude install mysql-server
When you are prompted for your root password, enter it and press OK
When you are prompted for your root password, enter it and press OK
After the installation is finished, it begins to run your server. Your MySql server is ready.
Securing MySql
The default MySql server set up is unsafe especially when your server is going to be exposed in public. It’s important to secure your MySql server installation. Let’s secure it by using the following command:
sudo /usr/bin/mysql_secure_installation
When you are asked for your current root password, enter the password you chose earlier and press Enter.
Because you have already chosen a root password, press N and then Enter.
You will be prompted to remove the MySQL anonymous users. For security reasons we want to do this. The text above the question explains this in more detail. Press Y and then Enter.
When you are asked if you would like to disallow remote login for the root user and only allow connections from the server itself, press Y and then Enter to keep the server secure.
MySQL ships with a default database called test. You do not need this and can delete it. Press Y and then Enter to delete the test database and it’s associated users.
This step reloads the user settings (called privilege tables) so that all user changes take effect. Press Y and then Enter to continue.
That’s it your MySql server is now secure and ready for production use.
Step 3: Install Ruby, Ruby Gems and Rails
Note: we will be installing Ruby 1.8.7 in this example. If you want to choose the latest version of ruby simply find out the latest version and replace it in the following command.
sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby
Once the Ruby packages are installed, we need to symlinks from the installs to the locations every program would work:
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby sudo ln -s /usr/bin/ri1.8 /usr/bin/ri sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc sudo ln -s /usr/bin/irb1.8 /usr/bin/irb
Once done, use the following command to verify if everything is working correctly:
ruby -v
You will probably get something like the following in return:
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
Now let’s go ahead and install Ruby Gems from source. The reason why we are doing this is to ensure that we get the latest and most stable version of Ruby Gems onto the Cloud Server and the easiest way to do that is by installing from source.
Let’s create a folder called “sources” in our root directory
mkdir ~/sources
Now go inside the “source” directory
cd ~/sources
And download the latest version of Ruby Gems. At the time of writing this article, the latest version was 1.8.11
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.tgz
Once the file is downloaded, unpack it and go inside the unpacked directory
tar xzvf rubygems-1.8.11.tgz cd rubygems-1.8.11
Now we can compile it:
sudo ruby setup.rb
Once the compile and install process is complete (it will take a couple of minutes or less) you will get the following message:
RubyGems installed the following executables:
/usr/bin/gem1.8
If `gem` was installed by a previous RubyGems installation, you may need
to remove it by hand.
Now lets create another symlink
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Once done, check the version of Ruby Gems installed by typing the following command
gem -v ... 1.8.11
We need to update the gems to the latest version
sudo gem update --system
Now the foundation is ready, so let’s go ahead and install Rails:
sudo gem install rails
You can now install any gems specific to your rails application. I will leave that up to you and lets’ move down to the last and the most important part of this installation i.e. Passanger a.k.a mod_rails installation.
Step 4: Mod Rails Installation
Mod Rails Installation can get tricky at times if you do not follow the instructions carefully. Let’s install the passanger Gem first:
sudo gem install passenger
Once completed, we need to install the Apache2 Module for passanger. Without installing this module Apache will never know that it should route the incoming requests to Passanger. So let’s go ahead and install it:
sudo passenger-install-apache2-module
Now, here is the surprise. The system will not allow you to install Passanger module for Apache. Apache 2 module requires some dependencies before it can install the Passanger module. The good part is, it will tell us which dependencies are required and the command line to install those dependencies. So carefully copy/paste all the commands mentioned in the error screen and start installing the dependencies one by one.
Important note: This is the area most susceptible to problems. If some dependencies do not get installed using the command mentioned in the error output; instead of using the usual “Aptitude” Linux command use the “Apt-get” command to install those dependencies. I could figure this out after wasting a lot of time!
Once all dependencies are installed, we can try installing the Passanger apache 2 module again:
sudo passenger-install-apache2-module
Everything should go well. At the end of installation, you will get an output similar to the following:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.6 PassengerRuby /usr/bin/ruby1.8
Copy these lines and paste them at the end of your “apache2.conf” file.
Note: The above output is specific to every installation. So do not copy/paste the above output. Instead copy/paste the output which you got from your installation.
Once done, restart Apache:
/etc/init.d/apache2 restart
Bingo, you just installed a Ruby on Rails Server from scratch. Now start deploying and sharing your app to the world!
Thanks for coming this far….Let me know how your experience was following instructions in this article and if I can improve any aspect of it further.
New JavaScript framework – Batman.js
While searching for a JavaScript solution, I bumped across Batman.js. I tried the example below and just loved it:
http://batmanjs.org/examples/alfred.html
After going through some documentation, here is what I found:
- Extremely light-weight
- Less and clean codes
- Very flexible in how you want to use it (server side v/s. front end)
- Works with Jquery library
- A lot less painful as it uses convention over configuration
5 reasons to switch to Linux from Windows
A couple months back, I switched to Linux using the Ubuntu Windows Installer. First few days, I was on and off, not really getting along with the Linux GUI which seemed a bit raw to me. My webcam did not work for the first couple of days, which I finally fixed with the help of Ubuntu documentation. The display drivers, sound drivers and even my broadband connection worked almost instantly.
And that’s it. I have never looked back to windows. Here are a few great things I discovered while using Linux:
Amazing apps
Linux ‘Ubuntu software center’ has thousands of amazing free apps, Just the way we use IPhone apps.
Very stable
I never had problems like the way we have in windows – the system never crashed even if a software is not responsive.
Great user experience
I installed the KDE Plasma Desktop and it has such a great user experience, very much in the lines of a Mac. The smooth graphics and fonts rendering are the stuff you get addicted to very quickly.
Peace of mind
Finally NO virus/trojans to deal with, NO anti-virus software to download, what a peace!
Everything you need – out-of-the-box
Kbuntu desktop has everything you need to be productive. The LibreOffice suite is exceptional for your documents, spreadsheets and presentation needs, GIMP editor is a powerful graphics editor and Banshi Music player to satisfy your ear buds.
Ubuntu Linux has just wowed me with its awesome power and usability. I have pushed back my plans to switch to Mac…Linux has provided me all I needed.
….goodbye windows, the Linux decade has begun….
Five great tools for internet entrepreneurs
With the phenomenal growth of internet users, flourishing open source technologies and availability of on-demand cloud computing, it has become far less expensive and attractive to begin your internet business. Here are five tools I found indispensable for every internet entrepreneur. Using these tools, you can kick-start and operate your internet business at negligible infrastructure cost.
1. Website/Content Management System
For the front-end customer facing website and blog, you certainly need a CMS/blogging platform. If you are slightly techie and can do things on your own, I recommend using WordPress. If you are not techie and need something out-of-the-box, go for Weebly.
2. Hosting
With myriad choices in hosting, this part gets trickier. If you are looking to play a long innings, I strongly recommend using Rackspace cloud for hosting, even if you are new to cloud hosting. The reason is – for less than $30 a month, you get your own cloud sever which you can scale up or scale down in minutes. I found Rackspace cloud control panel the easiest to work with and their help/documentation/support is awesome!
3. Visitor Tracking
The third most important thing to do for your web business is tracking your site visitors and finding out what attracts them and what puts them off. Fortunately, Google analytic free edition does the job exceptionally well.
4. Up-time and performance monitoring
Your internet businesses relies on the availability of your website. It is critical to keep a watch on your website up-time and performance. Pingdom offers website up-time and performance monitoring completely free for one website. You can always opt for advanced (paid) features at a later stage.
5. E-mail/Online Collaboration
Your web business needs its own e-mail and online collaboration tools. Google apps (free edition) is the answer. Recently, Google has buried its free Google Apps edition inside its hyperlinked pages such that it is not easily found. Click here to sign up for Google Apps free edition.
I hope these tools become helpful in your journey to be a successful web entrepreneur. What tools do you use?
Good software is addictive
Way back in 2006, someone told me that he has got an access to Google’s e-mail service and he can invite me to use it. I got the invite and since then, I am using Gmail, everyday. As I begin to use Gmail, unknowing and gradually my usage of Yahoo mail got lesser and lesser to a point where I could not even remember when was the last time I check my Yahoo mail.
I am sure there will be many of you who have experienced the same. There is nothing wrong with Yahoo’s mail service (which all of us used for many years) but there was something intimidating about Google’s software. It created a pull effect on users and people got used to it, to a point where they got ‘addicted’ to it.
The above story tells us an alarming truth about software usage patterns. People all over the globe are now addicted to ‘great usability’ and gradually they are switching from old school software to the software that provides them great usability – an addictive user experience.
A few more examples of ‘addictive’ software which I am aware of:
Basecamp
Highrise
39shops
Zendesk
Freshbooks
Is your software addictive?
The ‘software trap’
Organizations and software development teams often get into what I call the deadly ‘software trap’. This usually happens in 3 stages:
Stage – 1. A happy beginning
Software is created to solve organizational problem. Everyone is happy, people love the software
Stage – 2. The demands keeps rising
As organization evolves, people demand more – ideas are thrown in from all sides – software team gets into reactive mode, they roll out features to satisfy immediate needs – innovation and foresight takes a back seat.
Stage – 3. Software becomes hard to live with
As more layers of software are added, it gets difficult to modify it – the pace of change reduces – the software is not in sync with the organizational change. Software becomes yet another problem to be solved!
Finally, there is stage when software stops evolving, the development team gets into defense mode, users get cynical about the software, managers begin the blame game.
Getting into this trap is almost a natural process (thanks to the way human beings are) but it can be avoided with some discipline and simple measures. I will write more about these measures in future articles.
The Agile Myth
While taking interviews of Rails developers, I often ask this question:
What kind of development process do you follow? and most of the time answer is ‘Agile’. When I ask them a few more questions, there are hardly any credible answers.
This makes me concerned about a lot of development shops across the globe who are struggling between the ‘Real Agile’ and what I call ‘The Agile Myth’. Here are a few ‘Agile Myths’ that I would like to share:
1. Communication will do the job, documentation is not necessary
Wrong. Agile teams lay a lot of stress on communication, but that does not mean that we do not organize ourselves well and write things down which are important. User stories should be detailed well, developer should determine their tasks list for every user story and quality assurance should write descriptive bugs.
2. We will ‘figure that out later on’
I listen to that phrase a lot of times – especially in context of user interface / usability design. Client and development team often ignore user interface during the early phase of development. Development begins without enough planning for the end user, the ultimate audience of the software. And guess what happens, when the time comes to ‘figure it out’, hundreds of lines of code is already written and things get harder to change.
3. Test driven development will slow down development
Quite often, development teams ignore test driven development. A classic excuse is, what if the requirements change and we have to re-write the codes. On the contrary, it is much easier to change things in a test driven environment versus without it. Test driven development improves the quality and speed of delivering software.
4. Using Agile tools will do the job
Not really. Not even the best tools out there will make you agile, UNLESS, you choose to become Agile. Agile thinking is a mindset that should sink into the work-style of the entire team. Agile is more about how you think about your software and less about what you actually do with it!
Agile has turned out to be a great sales pitch for development shops, now it’s time to make it a recipe for success!
Cloud computing and software-as-a-service : the future of Software
Every time you search Google, you take advantage of cloud computing. Many of us use Gmail or other Google applications like Google docs and Google sites. These wonderful applications are a result of Google’s cloud computing infrastructure.
Before I write more about cloud computing, let me provide a perspective on what are web based applications and how they work:
Any program which is used over the internet through a web browser is termed as web application. Most commonly used web applications are Facebook, Google, Yahoo, Twitter etc. According to internet experts, in the next 10 years, 80% software will be used over the web.
A web application functions in a completely different way than your desktop software. With web application, information is processed and stored on the Web Server which runs the application.
When you send request to a Web Server it processes your request and returns appropriate result on your web browser. Therefore, your personal computer is free from the burden of storing and processing information, since all the action happens on the Web Server.
Despite the fact that using web application is fun and extremely productive, it also invites problems such as availability and reliability. With increase in the number of users, the number of requests a Web Server has to process also increases exponentially. If the number of request a server receives, increases than its capacity, it crashes. That’s when we see errors such as ‘Server down’ or ‘Server inaccessible’.
You must be wondering how all this is related to Cloud computing. So let me tell you the story of Google and how they solved similar problems faced by their web application (in this case their search engine).
In late 90’s when Google was gaining huge popularity world-wide, one of the biggest challenges they faced was scaling their Web Server to handle millions of requests. In order to ramp up their capacity, they vociferously installed hundreds and thousands of web servers at various locations across the globe. This capacity built up was done at an investment of millions of dollars. A similar problem was faced by other internet companies like Amazon.com and they did the same with their own infrastructure. With the capacity ramp up, they were able to handle large number of user requests very efficiently.
However, they faced another problem after doing this ramp up. They realized that the processing and storage capacity of these servers were not fully utilized all the time. They discovered that other than peak loads, most of their servers resources were utilized only up to 50%. A large pool of server resources was lying underutilized.
During this period, the concept of Virtualization had started gaining momentum. Virtual Servers are similar to a physical server in terms of performance and availability but the biggest difference is in the fact that a Virtual Server in itself does not posses processing or storage capability; but it utilizes the underlying hardware to store and process the information.
With the advancement in Virtualization technology, companies like Amazon and Google started thinking about their Server as a piece of software that provides necessary resources (like processing power, memory and storage) to run a web application. Instead of web application being directly installed on the physical hardware server, they inserted an intermediate piece of software on the physical servers which would provide processing, storage and memory to the web application. Gradually these companies realized that by using the Virtualization technology, they can combine the processing power of thousands of server into a big Virtual Server which can be used to distribute computing capabilities to a variety of web applications. This was the birth of Cloud computing. Cloud computing allows resources needed by a web application to be virtualized by using an intermediate software layer called Virtual Server.
Here is the web definition of cloud computing on Wikipedia:
“Cloud computing is Internet-based computing, whereby shared resources, software, and information are provided to computers and other devices on demand, as with the electricity grid.”
The use of Cloud computing provided immediate and long lasting benefits to these internet companies. They were able to scale up and scale down server resources much faster without worrying about the underlying hardware. A Virtual server normally uses resources of multiple underlying physical servers. So in case one particular physical hardware is down, the Virtual server can quickly switch over and use resources of other physical server. This allowed for 100% availability and almost zero down time.
With the growth of cloud computing, using software over the internet became more reliable, fast and secure. A lot of innovative companies started serving up web applications by using cloud based servers. Companies like Amazon.com now provide their own cloud computing infrastructure to individuals and business through their service offerings such as Amazon EC2, Amazon S3 and Amazon DB2. These services are very cheap and highly scalable, allowing even a small business to scale and grow their web application rapidly.
By using Cloud computing, many companies are now offering Software-as-a-service over the web. Salesforce.com is one such company which pioneered the use of serving software over the web. Salesforce.com’s flagship on-demand CRM (Customer Relationship Management) is now used by millions of people across the globe. Its annual revenues are to the tune of 1.27 billion US dollars in 2010. The growth of companies like Salesforice.com signifies the growing popularity of Software-as-a-service, which was the result of innovation in cloud computing.
Here is the web definition of Software-as-a-Service on Wikipedia:
Software as a service (SaaS, typically pronounced [sæs]), sometimes referred to as “software on demand,” is software that is deployed over the internet and/or is deployed to run behind a firewall on a local area network or personal computer. With SaaS, a provider licenses an application to customers either as a service on demand, through a subscription, in a “pay-as-you-go” model.
Google’s e-mail service and Google apps are a good example of Software-as-a-Service on cloud. Other popular services utilizing cloud computing is our own e-commerce platform www.39shops.com . We are using software-as-a-service and Rackspace cloud computing platform to power thousands of online stores.
Cloud computing and Software-as-a-Service, collectively represents the future of Software. Time is not far when our own desktops will be on the web and accessible from any computer connected to the internet. Possibilities are limitless…limited only by our imagination…