Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How persistent and smart do you have to be to learn to program?
8 points by jamesfranco on Feb 11, 2014 | hide | past | favorite | 22 comments
I'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!

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?

Has anyone else had this problem?

original question on Quora: http://www.quora.com/How-persistent-do-you-have-to-be-to-learn-to-program



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...


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.


> 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...


Would you recommend the book for beginners with minimal knowledge?


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.


> 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


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;
  }


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.


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.


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?


Thanks for your reply. Would you recommend this course by Udacity? 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?


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.


I would take Udacity's CS101 course instead and then the Web Development Course they provide. This will give you a very good foundation for getting started. I have taken both and I highly recommend them.

The language you will use will be Python, but what is important are the fundamentals you will learn in these courses. You can then apply them to any language and framework you want to work with.


If you do decide to learn Python, I would recommend http://learnpythonthehardway.org/. The book is thorough and assumes no prior knowledge at all.


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.


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.


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.


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.


Are you a professional actor?


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.


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


I'm not. I wish.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: