.NET Coder should give Ruby a try!
Last weekend, I gave Ruby a try. Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. I’m a .NET coder, everyday I use C# for developing projects in my company. There are few reasons that bring me to try Ruby because I see a lot programmers mention Ruby is a very powerful and flexible programming language, is it true? And the main reason, I would like to try something new because almost my programming skills are just in static typed language and a bit dynamic typed language with Javascript.
After I played with Ruby about a few hours, I started loving it. Ruby is a fun toy. Like the differences between spoken languages, Ruby differs from most other programming languages not only by syntax, but by culture, grammar, and customs. And some programmers consider Ruby is English for computers. Ruby brings a new way of thinking about programming and software development. I would like to show you very basic examples, let’s go to see snippet code comparing between C# and Ruby.
//Swap value between two variables
int a = 5, b = 10;
int temp = a;
a = b;
b = temp;
//Output message 3 times
for(int i = 0; i <= 3; i++)
Console.WriteLine("Hello");
//Output message if condition is true string
str = string.Empty;
if(str == string.Empty)
Console.WriteLine("str is empty");
#Swap value between two variables
a, b = 5, 10
a, b = b, a
#Output message 3 times
3.times { puts "Hello" }
#Output message if condition is true
str = ''
puts "str is empty" if str.empty?
Code comparisons above are not to show which language is bad and another is good, but I just want to show how I feel about new language. Ruby code is short and readable like in English. There are lots of more powerful features in Ruby that I haven’t mentioned here.
If you haven’t touched something new recently, why don’t you give Ruby a try?
3 people have left comments
.NET Coder should give Ruby a try!-WowKhmer Tech BEC Development Blog said:
[...] original post here: .NET Coder should give Ruby a try!-WowKhmer Tech Posted in Object, software. Tags: anti-virus, archives, clipboard, home, khmer-tech, net, orm, [...]
Frankie said:
Hello! Please e-mail me your contacts. I have a question zachary@complective.ru” rel=”nofollow”>……
Thanks!…
Commentors on this Post-
- Copyright 2010 WowKhmer Tech. All Rights Reserved. Powered by Wordpress | Theme designed by Chris Murphy
- Back To Top
- Home








Leave a Comment-