Category Archives: Programming

Ruby 2.0 is out!

Want to Learn Ruby ? Try these free tutorials!

Ruby is one of the most popular programming language, specially when it comes to web development, with the popular frameworks like Ruby On Rails, Sinatra, Padrino etc. it’s very easy to learn and often recommended to absolute beginners.

Ruby is a scripting language – just like Python, PHP and Perl, but ruby is somewhat more beginner friendly than others and certainly it’s more human friendly.  it has elegant syntax that leads to easily readable and maintainable code, and cool built-in methods and conventions makes programming a lot fun.Learning Ruby

Okay, you’ve decided to learn ruby (that’s great!) and here are some cool stuffs to help you get started! Checkout these free tutorials now and enjoy programming with ruby.

#1. Try Ruby

Try Ruby is an interactive ruby tutorials, where you can start running your ruby programs in browser. it’s really good for beginners, just give it a try – you will get a nice overview of ruby, probably within 15 minutes.

#2. Ruby Monk

it’s another great interactive tutorial, along with some code challenges. You will learn a lot of basic stuffs, very quickly!

#3. Leanstreet Ruby Class

A great interactive tutorial, just started (currently in beta), but it’s simply awesome!

#4. humble little ruby book

A good introductory book on ruby, available in a pdf format or you can view it online.

Learning Ruby on Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.

You got the basic idea about ruby, now you can start exploring on your own. The only way to learn ruby is to write programs in ruby  – so start writing tons of code in ruby. start a simple project (e.g a command line app or anything) in ruby and write/read a lot of code.

Update 1 : Added a new resource for ruby.


UI Prototyping and Mockup Tools for Ubuntu / Linux Mint

UI prototypes and sketches/mock-ups are really very useful in early stage of Application development (Mobile, Web or Desktop App), it works as a great communication medium between the designers, developers, customers and users. Most of the UI designers/developers prefer – starting with sketches before jumping into the code (HTML, CSS etc). Some designers prefer sketching on paper while some prefer using some tools or both.

Sketching on paper is a good practice but if you use prototyping tools, then you can easily create great-looking mock-ups, much faster and of course it’s easy to share and collaborate (for example, in a presentation to your fellow developers, VCs or investors). For Ubuntu, native tools are also available, or you can just use the web based mockup tools.

Pencil – Free and Open Source ‘Sketching Tool’

it’s a free and open source sketching/prototyping tool. it’s a cross-platform application, available in stand-alone form or as a Firefox Add-on. Pencil has lot of great features – UI elements, icons, etc that allow you to easily create sketches for desktop and web apps.

The sketches can be easily exported to pdf, png, odt or templates (such as HTML Templates, but first you need to install the templates, Go to pencil -> Tools -> Manage Export Templates and locate the template downloaded from official site).


Installing Pencil Prototyping Tool in Ubuntu / Linux Mint

Download This Add-On (Latest stable version : 1.3.4) and Open with Mozilla Firefox (requires version 4+) to install the add-on. Then restart the browser and go to Firefox -> Tools -> Pencil Sketching and start creating cool sketches as you want.

Download Standalone version of Pencil (From the Official Page)

Other prototyping tools that you may should checkout


If you want to quickly create mockups for you web/mobile apps, then you should try Keynotopia. They have lots of awesome templates and wireframing components – so you can transform your ideas into a prototype – in minutes. It works with Microsoft Power Point, Open Office and Apple Keynote.


it’s a cool web application, for creating mock-ups and prototypes. it’s easy to use and it has nice widgets and icons to sketch UI quickly. The application is based on Cappuccino, an open source framework for creating desktop like apps in a browser; so you don’t need any flash player or something to use this app. The personal plans starts at $9 but there is also a free plan to get started with (1 project with 10 pages).

Checkout The MockingBird App

Ruby 2.0 is out!

How to execute/run Ruby program/script on Ubuntu [12.04/12.10]

Ruby is one of the most popular programming language, it’s a scripting language – like Perl, Python or PHP. Ruby is very easy to learn, it’s also very Human Friendly – so for beginners – it’s a good one to begin with. Ruby has become very popular, mostly in web development, with the Rails framework (most popular and easy to learn web application development framework for ruby).

If you want to learn ruby or may be just started, with Ubuntu (most probably – 12.04 LTS, if you prefer latest stable release), then this post may help you in setting up the ruby environment (on Ubuntu/Linux Mint/other_similar_distributions) and running your first ruby program; you should also checkout the recommended links section for some best free online tutorials (for ruby).

Install Ruby : Getting Ready for Fun

You can install ruby from the system package – using the apt-get or from Synaptic Package Manager but you’re recommended to use RVM (Ruby Version Manager) for installing ruby( instead of  apt-get install ruby1.9.1). RVM is a great tool that allows you to manage multiple versions of ruby – without any hassle, so the rvm way may seems unnecessary at this point but it’s better in long run.

I’ve already explained about installing ruby on Ubuntu/Linux Mint and I’m not going to repeat that again, Just go through this link – installing ruby on rails in Ubuntu 12.04 and follow the steps 1-3 (leave the 4th step because you just want the ruby right now).

Write your first Ruby program

Open the gedit and write the following lines of code

#! /usr/bin/env ruby
puts "Hello, Ruby"
# it just prints Hello, Ruby on the screen (comment)

Now, save the file as hello_world.rb (Ruby source code has the extension .rb ) in your Home directory (~).

Run/Execute Your first ruby program

Open a terminal and type the commands –

cd ~
chmod +x hello_world.rb
ruby hello_world.rb

This video might give you some additional hints if you need.

Recommended Link(s) for Learning Ruby (Free Online Resources)

Learning Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.


How to Compile ‘n’ Execute/Run C/C++ program in Ubuntu 12.04

Now a Days, Ubuntu is one of the most popular OS among programmers (not only nerds but also the beginners who just entered into the programming world) but for a beginner Ubuntu user coming from Windows may feel some problem in programming with Ubuntu.

On Windows they use nice GUI based IDE, but in Ubuntu things are little different. In Ubuntu it’s better to use Terminal (specially for the beginners), instead of GUI based IDEs such as Eclipse, Netbeans etc for compiling programs. In fact, the command line approach is much easier and efficient, due to the powerful shell such as bash, zsh etc.

So, in this post – you will learn – how to compile and execute (run) C/C++ programs in Ubuntu 12.04 (Precise Pangolin)/12.10(Quantal Quetzal) or other Linux distributions such as Linux Mint 13 (Maya). You don’t need to install any extra applications or tools other than the compiler. The default text editor – gedit will work fine for source code editing (unless you have a preferred source editor such as Emacs, Vim, Nano, Kate or something else).

#1. Install the C/C++ Compiler

First make sure that you have GCC (GNU Compiler Collection, for C language) and G++ (for C++ language) installed on your system. If not, then install it by typing the following commands on Terminal –

For C

sudo apt-get install gcc

For C++

sudo apt-get install g++

#2. Write the Program (Source Code)

Open gedit and write the following lines of code (it’s a simple program that contains one print line and one comment, just for explanation purpose) –


void main()
	printf("Hello! Human!\n");
	/* Do something more if you want */

Then save the file as hello_human.c on your Home Directory (~). If you ae writing a c++ program, then give it the extension as .cpp (and of course you will also have to change the command accordingly during compilation)

#3. Compile it

The command structure is :

gcc source_file_name.c -o executable_file_name

if leave the -o option (name of the output file) then by default a.out will be created as the executable output file.

To execute the above example program, open a terminal and type –

cd ~
gcc hello_human.c -o hello_human

[In case of C++, just replace gcc with g++, rest of the things are same, e.g g++ source_file.cpp -o executable_file]

#4. Execute It

On Terminal, type (from the same directory where you have the executable file, in this case, it’s Home Directory(~) ) –

First make the script executable (sometimes, it may not be necessary)

chmod +x hello_human

Then run the program using the command –


Now you should get the output –

Hello! Human!

Perl/Linux : A Linux Distro for Perl Lovers

Perl/Linux => Everything Perl. Yeah, It’s a Linux distribution where all the programs are written in perl. So if you’re a (that kind of) perl programmer who loves playing with various Linux distributions, then you may give it a try – may be just for fun (after all it’s not going to hurt, in fact, you may learn some interesting stuffs).

Here is an Screenshot (from official site (the project is hosted on sourceforge)), to get a preview of Perl/Linux.


Download the latest version of Perl/Linux (From Official Page)

The Perl/Linux seems to be – some what like LuaOS, but instead of Lua (A light weight scripting language) Perl is used. If you have tried any of these then consider sharing it with other Humans :)