
Ask HN: How persistent and smart do you have to be to learn to program? - jamesfranco
I&#x27;m a beginner trying to learn Ruby on Rails. Most tutorials show who to .reverse strings of text. I want to create user logins not reverse text!<p>I usually go through the course and never understand how I am going to use them when buildings apps. Learn how to print 1+1 is boring and demotivates me. When am I going to learn the good stuff?<p>Has anyone else had this problem?<p>original question on Quora: http:&#x2F;&#x2F;www.quora.com&#x2F;How-persistent-do-you-have-to-be-to-learn-to-program
======
LarryMade2
One strategy is load up some interesting project already written onto your
workstation and dive in and tweak away. You will 'get your hands dirty' in
good code and get some instant gratification from the changes you make. Along
with that, work on building your basic scripts and projects, when you feel
confident with tweaking code go back to coding from scratch, get frustrated,
go back to tweaking stuff...

------
iamwithnail
If you're not seeing how you're going to use these things iqwn your own code,
you should have a think about why that is; these techniques are the basis of
everything else that you're going to do. I've been learning for 6 months now,
and I can say I'm definitely still using "boring" stuff that I learned when I
was doing the first cocademy tutorials. I learned a bit of python, realised I
wanted to put a lot of it on a web page and then went to Django from there.
I'm still making a lot of mistakes, so you do need to be persistent, but
smart? Not for the basics, not really, just willing to learn. There comes a
point where you need to be smart, but it's further down the line than I am. I
can _get away_ with the clunky hacks and boilerplate code I often end up using
but I pay a price for that in terms of speed of delivery and performance.
It'll get better over time.

------
dragonwriter
> I'm a beginner trying to learn Ruby on Rails. Most tutorials show who to
> .reverse strings of text.

Don't use an online tutorial, you need more. You really probably should learn
the basics of programming Ruby before diving into Rails, but, if learning the
basics is demotivating and you need a deep dive, I'd recommend you get the
book _Agile Web Development with Rails_ [1], which is a pretty good dive into
rails that covers a lot more than any web tutorial will.

[1] [http://pragprog.com/book/rails4/agile-web-development-
with-r...](http://pragprog.com/book/rails4/agile-web-development-with-rails-4)

~~~
jamesfranco
Would you recommend the book for beginners with minimal knowledge?

~~~
dragonwriter
I'm hesitant to recommend diving straight into Rails for beginners with
minimal knowledge, but if someone in that situation wants to dive straight
into Rails, I think AWDR is the best vehicle.

------
lutusp
> I'm a beginner trying to learn Ruby on Rails.

Really? That's like learning Calculus before addition and subtraction. I
recommend that you learn basic computer programming before trying to learn how
to manage a development scheme like Rails.

> When am I going to learn the good stuff?

Don't try to start at the top, you will crash and burn. Start at the bottom
and work upward.

There are many ways to start, and reasonable people may differ. I personally
recommend that you learn Python first -- it's very approachable and it teaches
you the basics first.

[https://wiki.python.org/moin/BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide)

------
NAFV_P
Not particularly smart I would say. Frameworks exist partially to make the
process of creating programs easier and quicker.

Very persistent I would say. I have a lot of persistence, but I don't think
that I have enough.

For now, put the train set away, and learn Ruby. With enough persistence, you
could end up beating some professionals.

I looked up reversing strings in Ruby and ROR, no wonder you're bored. I had
to write all this to get it done in C and it was quite entertaining:

    
    
      char *reverse(char *s) {
        char *a=s, *b=s+strlen(s)-1, c;
        while(a<b) {
          c=*a;
          *a=*b;
          *b=c;
          ++a;
          --b;
        }
        return s;
      }

------
gvickers
About two years

I'm serious, two years of an hour or two a day (at least!) will give you
enough foundation to really enjoy it. You have to start with tutorial, use the
sample projects you build and change them drastically. Break them, improve
them, talk to people about them.

The issue that is most common is the starting momentum is difficult. There are
some concepts that are dead simple in programming, by their nature they are
composable. The composition of simple concepts form virtually all the higher
level concepts. It's not so much learning to code as it is learning to think
in a certain way.

------
centdev
As someone who doesn't know Ruby, my only advice relates to coding in general.
When I first started out with absolutely no experience at all, I started by
getting a basic understanding of the language and trying to write small apps.
It felt more rewarding to have a goal in mind, even if the app would never be
shown to anyone else. Also I'd recommend not copying any code that you find on
the internet verbatim. Coding becomes an art form and you don't want to pick
up the bad habits of some developers by using code snippets you find around.

------
Ronsenshi
I concur with lutusp and also recommend learning Python first (or at least raw
Ruby).

Before you start working with huge, highly opinionated framework such as RoR,
you should understand how programming in general works. ifs and elses,
functional programming and object oriented programming, patterns etc.

Regarding your question. You have to be very persistent - there's a huge
amount of stuff to learn. Months of active study and tinkering with tutorials
and small projects.

If all you want is to whip out a login page and a blog, then maybe it'd be
better to use a CMS?

~~~
jamesfranco
Thanks for your reply. Would you recommend this course by Udacity?
[https://www.udacity.com/course/cs046](https://www.udacity.com/course/cs046)

Its in Java and seems to teach you how programming works. How difficult is it
to transfer from Java to Ruby?

~~~
Ronsenshi
Programming is a very peculiar thing. Peculiar, because if you understand
general concepts and ideas in programming, then learning various languages
wouldn't be a problem at all (generally speaking, there are some exceptions).

That course you've picked is fine for basics of programming and even though a
lot of people like to hate Java, it's a fine language and it'd be easy to
start with it. As czardoz recommended, if you'd want to learn python, then
learning python the hard way is also great book. I personally prefer that way
of learning.

------
collyw
I think it is the sort of skill some people get it some people don't.

I did a intense year long IT conversion course in 2000 (dot com boom time).
The course started with 3 weeks of intense Java teaching followed by an exam.
If the student failed the exam, they were advised not to take the course. A
couple of the people decided to stay on anyway, and didn't do very well
afterwards.

------
garyjob
Try learning and getting familiar working with and manipulating the more basic
data structures like String, Array, Integers.

These data structures usually get ported across various languages.

Once you have a good grasp of that try starting work on the tutorials they
have on Rails you can find online.

------
wturner
I taught myself conventional programming with javascript over the last few
years by virtue of my fascination with audio. The 'web audio api" exists hence
a lever is in place to keep me going through the inevitable "trough of sorrow"
dips.

------
Goranek
I think it's not hard to learn how to program but it's hard to be good at it
and be able to continue working and being productive when you encounter
uninteresting parts of a project.

------
phantom_oracle
Are you a professional actor?

~~~
jamesfranco
lol my username had been taken and I am a couple of accounts and I forgot
login details for them so I used James Francos name.

~~~
phantom_oracle
I wonder why I got downvoted for a logical question like that. What if you
were James Franco?

~~~
jamesfranco
I'm not. I wish.

