META: Is Ruby a good language to choose as your first one to learn?

I’m a complete beginner to coding and I was wondering if there are
‘better’ languages to start on if you are trying to learn a language for
the first time?

I chose Ruby due to it’s seemingly “simple” code, and by that I mean
that it seemed more intuitive, less cluttered with code and overall more
“straight forward looking”. I’m using Chris P.s eBook ‘Learn to
program’

However after chatting to my Dad who was a programmer during the 80’s
and 90’s he seemed to think I was jumping in at the deep end with Ruby
due to the fact that there is a lot going on “under-the-hood” of some
processes that I won’t understand, straight off the bat. He thought
"lower level languages would be easier to understand because you are
closer to the machine and using smaller pieces of code so you can see
everything that’s going on.

Anyone have thoughts on the difficulty level starting with Ruby as a
first language to learn, compared to others?

Also any tips on general strategies for learning code would be greatly
appreciated :slight_smile:

Many thanks

Josh

On Thu, 28 Nov 2013, Joshua P. wrote:

and 90’s he seemed to think I was jumping in at the deep end with Ruby
due to the fact that there is a lot going on “under-the-hood” of some
processes that I won’t understand, straight off the bat. He thought
"lower level languages would be easier to understand because you are
closer to the machine and using smaller pieces of code so you can see
everything that’s going on.

I suppose he wants you to start with Mix…

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

On 28 Νοε 2013, at 18:54 , Matt L. [email protected] wrote:

However after chatting to my Dad who was a programmer during the 80’s
and 90’s he seemed to think I was jumping in at the deep end with Ruby
due to the fact that there is a lot going on “under-the-hood” of some
processes that I won’t understand, straight off the bat. He thought
"lower level languages would be easier to understand because you are
closer to the machine and using smaller pieces of code so you can see
everything that’s going on.

I suppose he wants you to start with Mix…

Then jump to x86 asm, then C, then maybe Java, before jumping to ruby.

Knuth would be proud.

As a starting point, a (not very but quite) short introduction to
computer programming instead of Chris P.'s book could be “The Art of
Computer Programming”[1]. It’s a little bit expensive but it’s one hell
of introduction.

ps. When was the last your father wrote any actual program? Because he
got it all wrong.

[1]
http://www.amazon.com/Computer-Programming-Volumes-1-4A-Boxed/dp/0321751043

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

Panagiotis (atmosx) Atmatzidis

email: [email protected]
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

The question to ask is do you want to know how computers work, or how to
make them do things.

Ruby is great for the latter. It makes it very easy to tell the
computer
what you want it to do, by hiding a lot of stuff ‘under the hood’. It’s
a
good language to learn because it lets you make the computer do
interesting
things quickly.

I would say that if you are serious about programming, you should
eventually learn c, or something similar. Low level languages teach a
lot
about you what the computer is actually doing, which comes in extremely
handy when debugging or optimizing, or even figuring out how to do
something in a new language. Once you know c, learning additional new
languages is much simpler, since you can break any high level function
down into its basic components.
-Adam

Ok, so far the answer is: ‘no, don’t worry about it’ from these two
previous replies.

But why is that the case? My dad, used a range of languages up until the
2000’s. I’ve heard him talk about visual basic but I would have to ask
which other ones he meant. I think it’s more important for me to
understand why you don’t think that view point is correct.

It depends on what sort of personality you have and what your computer
is. For me I require instant feedback and gratification, so it was
graphics programming that got me interested in programming. Making
pictures appear on the screen was incredibly addictive. If I had started
with assembler, which I have used a lot later in my career, I probably
would have lost interest because of the amount of work required to do
the simplest thing. On the other hand if you are interested in machine
control, interacting with the physical world, then low level programming
would be a good choice.

As for Ruby, I think if you just want a taste of general programming
then Ruby is a good choice. You can make simple scripts that don’t
require complicated concepts but still have plenty of room to grow.

Henry

That’s a great breakdown from Adam, Henry and Matthew! Just the kind of
insight and advice I was hoping for. Thank you all for putting it in
perspective for me, I feel better about my choice and can see myself
wanting to understand C at some later point :slight_smile:

Ruby is easy to learn, is fun to write, and has a great support forum :wink:

I do recommend learning it even if you only end up using it for
scripting, just for the sheer joy of working with it!

This site helped me get a basic of understanding of several languages
without having to commit by installing any frameworks for them:

It’s important to start out with the goal of learning more than one
language. What you really need to learn is the process of breaking every
problem into small steps, as this is fundamentally how computers work,
and is a critical problem-solving skill.

Different languages will introduce you to different aspects of
computing. By all means, learn Ruby. Then learn a bit of C#, a bit of
JavaScript, pick up whichever tool is best for the job at hand. As you
grow as a programmer in your own right, you’ll be able to voice your own
opinions and make more assiduous judgements.

Perhaps one thing that could give you some direction is to choose an
ultimate goal. Some program you’d love to have, even if it seems
unattainable. Then we might be able to advise you on the best options to
start working towards that goal.

One more point to consider is that no computer (that I’m aware of)
implements objects in its CPU instruction set, yet Object-Oriented
Programming is a very powerful and useful (and common) pattern. Ditto
functional programming. Both of these patterns or paradigms are
provided by Ruby, and allow a level of expression and a means of
representing complexity far beyond what you’d ever hope to achieve in C
or assembly. It’s still very useful to understand Computer Sciencey
concepts, like algorithmic complexity and whatnot, but you don’t need to
write C to do that.

Awesome reply as usual Joel :slight_smile: and certainly food for thought. I’m
getting into this primarily because I like the intellectual challenge
and also as a possible new career path. I haven’t given any thought to
what programs I want to see in the world, to create. I certainly will do
now!

It’s quite hard to pinpoint exactly where you should start. I’ve started
with C++ and Java, and I think it’s a good way to go. Since you have to
type most of the things, if you’re serious about studying, you really
get
to see a lot of cool things in Java or C++. Once you learn some of these
(or one of these), I think you’ll be more comfortable following some
nice
and well explained Ruby book, like the “The Well-Grounded Rubyist”, for
instance. Just my experience, of course =]

2013/11/28 Adam S. [email protected]

about you what the computer is actually doing, which comes in extremely

But why is that the case? My dad, used a range of languages up until the
2000’s. I’ve heard him talk about visual basic but I would have to ask
which other ones he meant. I think it’s more important for me to
understand why you don’t think that view point is correct.


Posted via http://www.ruby-forum.com/.


Thyago Barbosa Rodrigues [Natal-RN/Brasil]

“Who loves not wine, women and song,
remains a fool his whole life long”
(Martin Luther [Martinho Lutero], Telogo Alemo)

“Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt.” (Albert
Einstein)

Sounds like your father wants you to understand computation and not just
syntax. Ruby is a great language which wouldn’t be if it was not for a
language designer who studied many programming languages and built a
best
of feature set into his own hobby language. Seeing many different
variations on how one might go about creating data structures in various
contexts and uses will provide you with a more open mind and allow you
to
do many types of applications ranging from end user interfacing,
networked,
utilities and toolsets, finite automata and so forth where the only
limits
are your own imagination; not a limit of the machine or the current
state
of the art in itself. This sort of freedom can only come with the
advantage
to better understand the nature of the computation by both building upon
the abstraction and to also understand the primitive elements of the
abstraction which is already there.

Ruby may or may not be the best first language though it could be with
the
right student and environment (i.e. teachers and other students working
towards bettering the skill). Mind you that ruby is currently by
standard
three major paradigms and six or seven languages in one. Add the micro
languages (dsl) on top of that the concept of teaching syntax becomes as
logical as giving someone a thesaurus and telling them to go learn
english.

If your interested in computation and programming languages; *Structure
and
Interpretation of Computer Programs *is still one of the best books on
the
subject. It also came from the 80-90’s. Some of the greatest programming
concepts which we all use today came from ideas which where first
explored
between the 60’s and 70’s.

I’m sure your father will be more than happy to explore the theory with
you
so it sounds like your ahead of the game already.

Ruby can be a bit complex.

It depends on how you want to learn.

If you want to master 100% of ruby then ruby is hard.

My suggestion would be:

  • Use (and learn) only what is useful in ruby.

If something is complicated, reject it.

Keep ruby simple and it will be a wonderful language.

Use all that ruby offers and it can be immensely confusing.

Hi,

Long time ago, in 1985 I started with BASIC for APPLE ][. The I learned
assembler then Pascal, then C, then C++. But this was in times when
there were no Ruby. I am embedded programmer and my current language is
C. Nevertheless I am happy to learn Ruby now. Its helps me creating test
environment of my C modules.

Now, I think that C is needed and some dynamic language is also needed.
Ruby is very good candidate because it is very natural. Its syntax is
not strange for C people. Why not to start with both C and Ruby? This
suggestion is practical. Some of Ruby gems have C ‘native extensions’.
One example is mysql2 gem that enables Ruby programs to access MySQL
databases. So if you are serous with Ruby and go into its deep waters
you will find that knowing C is an advantage.

Ivan

On Thu, Nov 28, 2013 at 10:34 PM, Joel P. [email protected]
wrote:

Ruby is easy to learn, is fun to write, and has a great support forum :wink:

I do recommend learning it even if you only end up using it for
scripting, just for the sheer joy of working with it!

Absolutely agree!

What you really need to learn is the process of breaking every
problem into small steps, as this is fundamentally how computers work,
and is a critical problem-solving skill.

I agree, although I would have put it differently: it is utterly
important to learn and understand the process of breaking down
problems into smaller problems (and these into even smaller problems -
it’s a recursive process!). But it’s not so much because this is how
computers work (basically you could write a program in assembler with
lots of gotos and no function calls) - the more important aspect for
me is that it’s the only way our human mind can handle the complexity!
In order to be able to write and maintain a program the human doing it
must be able to understand the program. The computer will do anyways
but only the human can decide whether the behavior of the machine is
as intended or not. We do write programs primarily for our fellow
humans - not for the machine. That way of looking at it may sound
weird at first because the primary purpose of a program seems to be to
make the machine do something. But that is fairly easy. The hard
part is making it understandable what the machine does to humans. You
can recognize the difference when looking at a program that just does
something and a program whose program text actually explains it (by
using proper abstractions, class, function, method and variable
names).

Kind regards

robert

Joshua P. wrote in post #1128901:

However after chatting to my Dad who was a programmer during the 80’s
and 90’s he seemed to think I was jumping in at the deep end with Ruby
due to the fact that there is a lot going on “under-the-hood” of some
processes that I won’t understand, straight off the bat.

I tend to agree with your Dad. I’m a firm believer that if you’re
looking for a programming language to learn as your first (not always a
choice, many get something foisted on them in school/college/work), the
ideal language is C. This is a great first language because

i. it’s the foundation of many other languages; if you understand C,
it’s pretty simple picking up most anything else like Java, Obective-C,
C++, Python, Ruby, Perl, etc.

ii. It’s been around for ages, which means there’s loads of
internet-based material to help you with problems as you learn

iii. It’s a relatively compact language which you can learn fairly
quickly.

If you can find a copy, start with Kernighan & Richie’s classic ‘The C
Programming Language’. It’s a simple, neat introduction to the language
in a couple of hundred pages (instead of the 500 page tomes by various
publishers) written by one of the languages founders.

On Sun, Jan 19, 2014 at 1:59 PM, Fldes L. [email protected]
wrote:

I would suggest ye olde’ Pascal. It is well documented, its speed is
close to C, it has a built-in debugger, it’s syntax is easy, has no
fancy modern features, just the old sequence, selection and iteration
(assignment, if, for/while), so you don’t need to learn a lot. Nor does
it have higher order functions, you don’t need them now. And Pascal will
force you to code in a certain style.
Also, Pascal natively allows you to write assembly code in asm/end
block, if you are interested.

Interesting: I always thought that it wasn’t the worst decision of my
university to use Pascal as language to learn programming. And I share
your judgement.

My theory is that constraints result in creativity. If you have a
language that is not omnipotent, you have to really think about how to
write code in it.

Yes, I think this is true.

Everybody mentioned that you have to learn to break down problems, but
IMHO you can only learn it by making mistakes, like learning to ride a
bike. So why not start with a language that is a bit restrictive :slight_smile:

No objection to that: the learning process will be the same regardless
of language. But languages with a smaller feature set (as Pascal)
probably make it easier to spot your own mistakes thus helping the
learning experience.

Cheers

robert

I say - for the start - forget low level languages like C or ASM. Either
you will write 10-20 line long code (so you can comprehend it), or
debug half of your coding time.
Assembly was easier on the 386, and much easier on the C64, anyone old
enough gradually grew up with those computers and was not thrown into
deep water immediately.
The easiest functional language (that focuses on what you want and not
how you want it) is SQL. Everybody who read about 2 hours material on
it, can use it. I do not suggest you start with it, it’s just an example
of a language, that is high level, and has a small instruction set (and
nobody cares about it :slight_smile:

I would suggest ye olde’ Pascal. It is well documented, its speed is
close to C, it has a built-in debugger, it’s syntax is easy, has no
fancy modern features, just the old sequence, selection and iteration
(assignment, if, for/while), so you don’t need to learn a lot. Nor does
it have higher order functions, you don’t need them now. And Pascal will
force you to code in a certain style.
Also, Pascal natively allows you to write assembly code in asm/end
block, if you are interested.

My theory is that constraints result in creativity. If you have a
language that is not omnipotent, you have to really think about how to
write code in it. Okay, if you want to exhaust your mind, look at Lisp
(:slight_smile: sorry Lisp-people…)

Everybody mentioned that you have to learn to break down problems, but
IMHO you can only learn it by making mistakes, like learning to ride a
bike. So why not start with a language that is a bit restrictive :slight_smile:

Next stop: Javascript and Ruby or Python :slight_smile: but Ruby is better.

This site has a lot of task that you can solve (if you don’t come up
with a suitable problem that you can practice on), with different
levels: easy Problem - CodeChef

The submissions in the Practice section are available, if you want to
peek into some existing solution.
Interestingly there are many submissions written in Pascal (like the
language has been revived or what).

On Sun, Jan 19, 2014 at 3:24 PM, Alarm B. [email protected]
wrote:

Joshua P. wrote in post #1128901:

However after chatting to my Dad who was a programmer during the 80’s
and 90’s he seemed to think I was jumping in at the deep end with Ruby
due to the fact that there is a lot going on “under-the-hood” of some
processes that I won’t understand, straight off the bat.

Not trying to intimidate Johusa’s dad here but this statement sounds
as if it comes from someone who loves details too much. You have to
stop digging deeper into details at some point otherwise you would
first have to study quantum physics to learn to program because then
“you can see everything that’s going on.” For learning basic concepts
of programming (control structures, functional decomposition, data
types) a more abstract language is better suited IMHO because it
avoids distraction by too many details.

I mention this because I believe this love of details is one of the
pertinent hazards we programmers face. I have seen it very often that
people feel uncomfortable at discussing programming problems at a
certain level of abstraction and dive down into details. By doing that
they lose oversight and burden their mind with too many information
which hinders proper understanding of what is going on on the more
abstract level. One of the most important traits we need to learn is
to resist diving into details too early where one feels comfortable
and stay in the colder heights of abstraction. Only if we have gained
a clear picture there we should allow ourselves to dive further in.

I am, of course, describing top down development. If we do not get the
most abstract concepts right then our programs are a mess right from
the start. If the abstract behavior is clear then readers of the
source code and documentation have a far better chance to understand
what’s going on. Errors in the lower levels are usually much easier to
fix than errors on the design level. This is why it is so important to
get that right before diving deeper.

I tend to agree with your Dad. I’m a firm believer that if you’re
looking for a programming language to learn as your first (not always a
choice, many get something foisted on them in school/college/work), the
ideal language is C. This is a great first language because

i. it’s the foundation of many other languages; if you understand C,
it’s pretty simply picking up most anything else like Jave, Obective-C,
C++, Python, Ruby, Perl, etc.

That’s like suggesting to learn physics if your intention is to
understand chemistry because physics is the basis. But that is not
needed when being introduced to chemistry. The abstractions provided
by chemistry work pretty well by themselves.

ii. It’s been around for ages, which means there’s loads of
internet-based material to help you with problems as you learn

That is certainly an advantage - although the age could also mean that
it’s difficult to find out whether the information you find applies to
your flavor of C (K&R, ANSI, which version of ANSI…).

iii. It’s a relatively compact language which you can learn fairly
quickly.

Compare pointer handling (and arithmetic) with those in Pascal. In
Pascal it is much easier to understand what pointers are because there
is no pointer array ambivalence and no pointer arithmetic. A pointer
in Pascal is really just a pointer to a memory address.

If you can find a copy, start with Kernighan & Richie’s classic ‘The C
Programming Language’. It’s a simple, neat introduction to the language
in a couple of hundred pages (instead of the 500 page tomes by various
publishers) written by one of the languages founders.

It is my understanding that today the flavor of C used as changed
quite a bit. Does the old book still give a good introduction to the
modern C?

Kind regards

robert

I’m somewhat intrigued by the source of this sort of question, and about
beliefs along the lines of “which language should I learn (first)?”

I’m sure there are lots of potential pitfalls to picking any computer
language to learn first, perhaps some more than others. But the first
computer language isn’t really about learning that language so much as
it
is about learning how to program: how to approach problems, how to break
things down, how to build things up, how to make sure what you’ve
written
works, how to make sure you are solving the right problem, etc.

I can’t really imagine any one language would actually be a bad choice
to
start with, as long as one has support, and there is adequate
documentation. The great difficulty lies, I feel, in these other aspects
of
programming.

One thing I see here and on other forums is the concern about picking
the
one right language. This is a pink unicorn. There are so many languages,
and so many problem spaces, so many things that one can and probably
should
learn, that what becomes even more important is learning how to learn
new
languages, new libraries, new frameworks, new approaches, honing skills
in
design and architecture, testing, deployment, and all the rest.

What actually concerns me most that seems inherent in the question is a
state of analysis paralysis – just pick up one and go. Once you learn
one,
it’s easier to learn another, and another, and so on.