Etilyeti
I am pretty good with HTML, and I know a bit of PHP and MySQL.
I was about to plunge my head in my big PHP/MySQL book when I realized
that it may not be the best programing language to learn.
Would you recommend Rails for beginners?
If not, what language would you recommend?
Thanks a lot in advance.
I think this thread got a bit hijacked on some slightly esoteric
issues. Hopefully this didn't put you off.
I would say Ruby is a great place to start. There is loads of really
good stuff on the web that will lead you into good programming
practices (I think Marnen said that too). Also it is a beautiful
language in terms of readability. It is not a long way from Visual
Basic in a superficial readability and scripting sense, but is much
more in terms of being a fundamentally well designed Object Oriented
language. The thing I found tricky at the beginning was working out
the distinction between what was Rails and what was Ruby, but it soon
falls into place. Also you need to get used to using the API
documentation. But again that falls into place too. There are now the
RailsGuides which are excellent. http://guides.rubyonrails.org/
I actually started with a quick Rails Tutorial, and then adapted some
stuff I had done in MS access/visual basic into a Rails project under
windows. I produced some not very elegant code to begin with, but
hey some of that code is still in use after nearly 5 years - I am
trying to find time to refactor it now. Whilst Marnen is correct in
referring to test-first development, the problem with this is that it
can be a massive subject, which in my view makes getting started very
hard. I havn't looked lately, but I never really found any good
tutorials that start with test (or at a higher level, behaviour)
driven development. So learning to do TDD or BDD is important, but
don't le it put you off learning Ruby in the first place. Maybe
someone could suggest some tutorials.
It is very easy to play around with Ruby in a shell (irb) and do the
hello world type of stuff, and using the rubygems library makes doing
more complex stuff a breeze. There are not loads of things to bolt
together to get your first progams to work. You can even try the
Interactive Ruby Shell online at http://tryruby.org/.
Writing an actual program is nothing more than creating a text file
and running it under Ruby. And when you want to do something
specific, there is nearly always a Ruby gem to help you out so that
you don't have to re-invent the wheel - whether it is accessing
databases, scraping web pages, manipulating images or creating pdfs.
Just install the Gem (one line command like 'gem install pdf-
reader' ) , require it into your program and away you go.
As already stated, there are some drawbacks to using Windows, but they
are not show-stoppers. And anyway, it is not that hard these days to
set up a Linux system (I use Fedora)
As you can probably gather - I am extremely enthusiastic about Ruby
and Rails. They have allowed me to develop systems for which I was
struggling to find a cost effective solution. My biggest uncertainty
initially was "would rails become cumbersome or fall apart as I
extended my systems". In fact the opposite has been true. The
framework really holds together as your system develops and evolves.
There was loads of talk about such things in the early days, but now
it is pretty much just taken for granted. Something that used to
amaze me was that when I added some functionality into my code, the
number of program lines actually went down, because adding the new
function often resulted in me doing things in a better or more
efficient/effective way. Again these days I take such things for
granted, although I do still find occasions when for example, I
produce a nice object that builds a super report, or I manage to
create a nice object oriented structure to something I am trying to
solve.
hope this encourages you
Tonypm