maybe this should be the first step of learning ror.. :S it’s quite a bit funny that i found i don’t know this language at all after i managed to setup ide for ror development.
yes, it’s like python, suitable for rapid development and easy to pick up. but anyway, learning a complete new technique is more or less bittering i think. like how i picked up python, firstly needless to say, having a number of good tutorials is at least. here i recommend documentation below:
ruby in a nutshell (you can find it from the zip file i posted in my first post)
learning ruby
of course plus standard api reference
it’s always impossible that you become an expert or good at it BEFORE you really use this technique to do some jobs, especially on programming. it’s inevitable that you have to touch and learn new issues as development continues. i used to get to know such aspects when learning a new language from scratch:
language basics, like variables conventions, built-in functions, data types..
control structure, if, while, loop..
object oriented issues including exceptions handling
some key libraries that i have to use frequently when developing such as file IO, datetime, string, array and containers..
fortunately documentation i found accommodate my needs very well. moreover, taking advantage of some online shorter but elegant tutorials and samples i have an overall picture of ruby now. till now i found it’s very interesting in ruby:
iterators
no raw data types, all things are objects
code block and yield, like proc {|p| puts p}
classes and objects
being familiar with C and java, i sometimes feel ruby syntax and grammar are obscure. many people think ruby is more simple and readable, but i don’t think so. yes, code line numbers is reduced when accomplish same tasks compared with c or java. but i think i will use c style still.
after all, i now manage to understand basically what a ruby script full of “ruby way” features wants to do. it’s time to shift my focus to that how to do more useful jobs like database operations or network application.
manipulating mysql database must not be a complicated task in such an elegant language. for example, Using the Ruby DBI Module illustrates how to. i don’t want to make a post too long so that i will new another post later to test my knowledge to use ruby dbi or mysql module to interact with database.