Twitter just needed to spin up a few more dynos
<3 Heroku
So I started programming in C, a couple years ago, and pretty much
started
in Ruby at that same time, but I didn’t know anything about programming,
and
anything about Ruby. My class taught me C, and I figured out how to
translate that into Ruby. As a consequence, my Ruby programs were
directly
mappable (pretty much line by line) into C programs, lol.
I think that C has some important things to offer, but as a first
language,
it’s offerings seem limited to weeding out students in a 100 student
“first
programming” course. C, being directly translatable into assembly, which
is
just a software representation of actual hardware implemented commands,
is
very “close to the road”. And there are a lot of potholes, and steep
embankments. I think you should know about pointers, and you should have
some idea of how what you are learning is represented in hardware. C
seems
good for this purpose, and it does seem like a good language for really
learning about data structures, because it is so close to the road, very
little implementation is hidden away in magic. But that said, while it
has
some educational benefits, students will not come out of it feeling
prepared
(or being prepared) to do anything actually useful. It will feel too
much
like academic masturbation, and will be frustrating as well, because
there
are so many nuances and subtleties in C that will keep you up all night
banging your head until you finally find some blog post or article about
it.
So, I don’t recommend C as a first language, it is too discouraging,
with
too little reward.
Java was the next thing we learned, and my C-styled ruby code suddenly
began
to look like my Java code, because I finally figured out what a class,
instance, method, etc were. I absolutely loved this class ( to be fair,
I
mostly loved the C class as well, b/c of what we were learning, even
though
I didn’t like the language ). Java is able to show you a lot of the same
things as C, without all the headache. We went through a thousand pages
in
Walter Savitch’s book Absolute Java (honestly, the best text book I’ve
ever
had), and I decided that I wished I would have learned Java first, you
can
get all the same knowledge (and more), except for pointers, which
probably
need to be understood before references make sense (meaning underneath
the
hood) And it has a nice API with lots of functionality. But, it does
have a
lot of boiler plate code, you make your method, then you make your
setter,
then you make your getter. Think about the wall of code necessary to
implement a Swing application. So all in all, I would consider Java a
decent
first language.
Then I took Assembly, which was where I really began to figure out what
goes
on underneath the hood of C. Earlier I said you should be able to map
what
you learn to what the computer is actually doing, well, I think most
of
that happened when I took Assembly. Which is even more of a pain to
write in
than C. But it implies something interesting, it contradicts most of the
academic reasons for choosing C as the first language. It seems that to
someone starting out, programming is programming, it is all magic,
regardless of it’s abstraction, and only later does it get grounded to
anything realistic. With that thought, it makes sense to choose a
language
that allows for high levels of productivity, with low levels of
configuration, boiler-plate, headache, hoop-jumping, special cases, etc.
They say if you throw a frog into a boiling pot, he’ll jump right out,
but
slowly increase the temperature, and he’ll stay until cooked. If you are
trying to keep the interests of beginning programmers, take out
pointless
hurdles, give them a language with a nice learning curve, that they can
quickly see the fruits of their efforts, and enjoy it long enough to
want to
take languages like C and Assembly, for the knowledge it will give them.
So I was able to do Ruby, at least as well as my C and Java, then I got
excited about it, started reading books, began interning at a design
shop
that used Rails, and somewhere along the way realized that I quite like
Ruby
My ability to do anything meaningful with Ruby exceeds my ability to
do
anything meaningful with C or Java a thousand times over, because of
things
like ruby-toolbox.com and gemcutter.org
You can still teach recursion and stacks and queues and hashes with
Ruby. It
might be a little more mocking of your efforts since those are all
implemented in the language by default, but you’re reinventing the wheel
regardless of whether you code one in C or Java or Ruby. The point is
the
abstract knowledge, which you can get with any of these languages.
So, why Ruby as opposed to some other high level language? I don’t know,
probably any high level language would be appropriate. I don’t know
enough
about others to compare them. But I will say that Ruby has a certain
ability
to express ideas in ways that feel natural, as opposed to syntactic. It
is
also very easy to get started, but there are a large amount of things
you
can learn, which will give you a better survey of other languages out
there.
As far as Rails goes, I tried going through AWDWR, and it took forever,
and
was frustrating. Probably this is due to the book being aimed at web
devs
from other languages, which I was not, but there is a lot to know with
Rails
before you can get started. In this regard, I think that Sinatra makes a
lot
of sense as a first web framework. Like Ruby, it has a very low barrier
for
entry, and you can get off the ground and start going with just a little
bit
of knowledge. It also translates quite nicely into Rails relevant
knowledge
as it’s programs grow in complexity. Rails I think is worth learning, it
is
a truly amazing framework written in Ruby. It will help you see
effective
ways to create, use, and design your code, and teaches a lot of good
coding
practices. If you are interested in Rails, I think that after you get
the
really basic basics down, then guides.rubyonrails.org is probably the
best
resource out there (better than the api, and most books).
So, yes, I think that Ruby would be a good first language, and will
progress
nicely into fun/interesting/useful code quickly, but wouldn’t say it
should be the first language, just that it would probably be a
rewarding
choice, allowing you to focus on programming at an abstract enough level
to
easily touch on important concepts without the overhead of syntax vomit,
contorted workflows, and tedious grinding away that some languages turn
into. And I think that Rails is a fantastic framework, but for a first
framework, I’d suggest Sinatra.
I know of three Ruby books aimed at newcomers to Ruby, but haven’t read
them.
The Well-Grounded Rubyist (Manning) *http://tinyurl.com/yba72rn *by
David A
Black, which is supposed to really present Ruby in a clear way that
makes it
easy to understand what is happening and why. I’d expect to come away
with a
really solid understanding of the language itself, and how to program in
general. In other words, I’d expect to “get it”.
Beginning Ruby (Apress) http://tinyurl.com/ybssb2x by Peter C.,
which
is aimed at taking people from beginner status, teaching them Ruby, and
introducing them to lots of useful/cool/rewarding gems, the Amazon page
says
it hits Sinatra, so that might make a good choice if you are interested
in
it.
Learn to Program (PragProg) *http://tinyurl.com/y9a9g4x *by Chris P.,
I
don’t know much about him/the book, but it seems geared towards people
brand
new to programming.
Hope that helps :)*
*
