Learning ruby - Baby steps
Baby Steps...
First you must have an editor.
For practical reasons, I suggest Netbeans IDE 6.1
Go ahead and download it. It is available for Windows, Mac and Linux!
First program -Hello world
puts displays output to the screen.
To print hello world: puts "Hellow world"
(Bold letters are source code).
The opposite of puts is gets.
eg:
value =gets()
It returns whatever the user has typed on the screen.
you can embed a variable inside a string like this.
Syntax:
print( 'What is your name: ' )
name = gets()
puts( "Hello #{name}" )
By the way, I tried "SciTE" - the default editor which comes with Ruby.
Good, but not great.
Then I tried Netbeans 6.1. It was amazing!!
1. Intelli sense -> you type a method, all methods are there in the pop-up, with descriptions and usage! A great tool to learn the language and get good at it!!
2. Auto completion -> You say "def" and type the function name and "end" is automatically typed and aligned for you by Netbeans. Three kisses to Netbeans!!
Technorati Tags: baisc Netbeans 6.1 ruby SciTE
First you must have an editor.
For practical reasons, I suggest Netbeans IDE 6.1
Go ahead and download it. It is available for Windows, Mac and Linux!
First program -Hello world
puts displays output to the screen.
To print hello world: puts "Hellow world"
(Bold letters are source code).
The opposite of puts is gets.
eg:
value =gets()
It returns whatever the user has typed on the screen.
you can embed a variable inside a string like this.
Syntax:
print( 'What is your name: ' )
name = gets()
puts( "Hello #{name}" )
By the way, I tried "SciTE" - the default editor which comes with Ruby.
Good, but not great.
Then I tried Netbeans 6.1. It was amazing!!
1. Intelli sense -> you type a method, all methods are there in the pop-up, with descriptions and usage! A great tool to learn the language and get good at it!!
2. Auto completion -> You say "def" and type the function name and "end" is automatically typed and aligned for you by Netbeans. Three kisses to Netbeans!!
Technorati Tags: baisc Netbeans 6.1 ruby SciTE
Comments
Post a Comment