Live data from Hacker News

Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

news.ycombinator.com

51–59 of 59 posts

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#51
post #18

Earlier quoted context omitted.

Focus less on your 'platform choice' or whatever, as that can actually be quite fluid Yeah, but programming on Windows is a PITA so I found its simpler to just eliminate that from the equation :)

And this is why your advice is actually bad, op said nothing about his platform choice and you're recommending he should go run a marathon when he's never even jogged. Windows programming is not a PITA, that's a flat out lie from you. It's total and utter nonsense, especially as Windows has arguably the best IDE of all the platforms. In the end it's exactly the same as linux programming. And iPhone programming. And B…

There's much more to a productive programming environment than IDEs, and most Python programmers don't use IDEs anyway.

The OP says he wants to do a startup and plans to go to grad school for physics, but in terms of programming, he doesn't really know what he wants.

That's why he is asking for advice on what path to take -- he is asking for "preferences," recommendations, and guidance. How many startups do you know that run Windows? How many high-performance physics labs?

When people were asking for faster horses, they didn't know to ask for automobiles because they didn't know that was something to consider. The had no perspective. Helping someone onto a more productive path from the start can help them get to where they want to go faster in the long run.

How long does it take to run a marathon? The OP has a timeline of 6 months.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#52
post #18

Earlier quoted context omitted.

Focus less on your 'platform choice' or whatever, as that can actually be quite fluid Yeah, but programming on Windows is a PITA so I found its simpler to just eliminate that from the equation :)

Why do you feel Windows a PITA to program in?

The windows command line and setting up the environment primarily. And most of the tutorials online are from a Linux perspective so it's usually easier for new programmers not to have translate the tutorials into a different environment.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#53
You need to learn about

    https://secure.wikimedia.org/wikipedia/en/wiki/Apache_Subversion
    https://secure.wikimedia.org/wikipedia/en/wiki/Debugger
    https://secure.wikimedia.org/wikipedia/en/wiki/Profiling_%28computer_programming%29
and I believe http://perldoc.perl.org/index-tutorials.html is easy to learn for a novice

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#54
post #40

I wrote this: http://learnpythonthehardway.org/book/ It's free. Do this: 1. Use your current computer. It doesn't matter if you have Linux, OSX, or Windows. What matters is that, right now, you want to learn to code, so you should go learn to code, not learn to setup a new OS. 2. Just use gedit. Don't use vim, vi, emacs, or any "hardcore" editor. On a Mac if you're using a non-English keyboard, use Textwrangler. Lear…

Zed, thanks for the book, I just got started with it. I have heard that when done with the book, I still won't be able to program in Python. Can you elaborate on that? Also, what do you recommend after completing your book? I'm interested in building web apps.

"I have heard that when done with the book, I still won't be able to program in Python."

Be careful about whose advice you take. There are a lot of programmers out there who are so far down the road to perfecting their craft that they can't see where they started.

For a mature programmer, using powerful tools will aid them in expressing their complex ideas quickly. As a beginner, you'll experience a ton of "ah ha!" moments where an idea will come to you in code, rather than in abstract. It will start simple with data structures like dicts and will progress toward object-oriented structures.

To say you won't be able to program when you finish LPTHW is to say that a 5th grader can't write. They're not going to write "The Great Gatsby", but they can write.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#55
My advice, start with javascript:

1. Learning C-like syntax provides a basis for reading a lot of other code.

2. Javascript examples can be seen on any webpage simply by switching to developer mode.

3. The javascript console allows experimenting with code while you read about programming on a webpage without leaving your browser.

4. It is perhaps the most widely used programming language currently.

5. Even if you are not interested in the DOM and webpages, there are still interesting exercises you can do in Javascript - I recommend project euler.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#57
post #40

I wrote this: http://learnpythonthehardway.org/book/ It's free. Do this: 1. Use your current computer. It doesn't matter if you have Linux, OSX, or Windows. What matters is that, right now, you want to learn to code, so you should go learn to code, not learn to setup a new OS. 2. Just use gedit. Don't use vim, vi, emacs, or any "hardcore" editor. On a Mac if you're using a non-English keyboard, use Textwrangler. Lear…

A quote from Learn Python the Hard Way: "Warning Windows is a big problem for Python. Sometimes you install Python and one computer will have no problems, and another computer will be missing important features. If you have problems, please visit: http://docs.python.org/faq/windows.html (http://learnpythonthehardway.org/book/ex0.html).

Why waste time messing with it? In the time you spend fucking around with Windows, you could have set up a Linux system. And Linux is the OS more commonly used by startups and physics labs (which is why the OP wants to learn how to program).

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#58
post #47

Earlier quoted context omitted.

Zed, thanks for the book, I just got started with it. I have heard that when done with the book, I still won't be able to program in Python. Can you elaborate on that? Also, what do you recommend after completing your book? I'm interested in building web apps.

Zed's right start with a non-IDE solution such as using a basic editor..as it forces you to think and get at the object-oriented abstraction of the programming language you are attempting to learn.

Zed thank you, someone posted a link to your site last night and I think it is very right for me. I will use it.

As per the Windows vs Linux debate - I have found most physics labs use either various Linux distros (Red Hat is super popular) or OSX. I myself have a MacBook Pro running OSX and so I just downloaded and will be using TextWranger as an editor to complete the lessons.

Re: Ask HN: I want to learn how to code. Can anyone tell me how to start learning?

#59
post #49
post #19

Hi. Most of the advice in the comments already posted is sound, but none of them seemed to address HPC. Working on a cluster invites an entirely different bundle of conceptual and practical hurdles (e.g. parallelism, working remotely, industrial-strength shell scripting &c.) Even though I had been programming since I was a kid, I found my crash-course in HPC to be quite challenging; confronted with a new programming…

Do you think that learning about parallelism would help a beginner to learn how to program, or to understand code better? I consider myself an intermediate programmer, with about five years of experience, but have never explored HPC. Not sure it would have helped me more to have done so as a beginner.

I'm not sure, really. In Saeed Dehnadi's article "The camel has two humps", it's mentioned that there are three great filters in programming pedagogy:

* assignment/sequence

* recursion

* concurrency.

Most students never master the first, and most of those never master the second, and so on. In that spirit, I would recommend that the OP firmly grasp the first two with both hands before reaching for the third. Of the languages the OP could study that treat concurrency or parallelism as a kind of conceptual primitive (e.g. Scala or Erlang), none are likely to appear as working languages in an HPC milieu. Almost always, the libraries are bolted on as an afterthought to traditionally popular languages for scientific computing.

I think this is a regrettable pattern, but a pattern which will shape the OP's daily work if they wish to begin (and remain in) a program in computational chemistry.

All I meant to suggest is that when the OP begins to learn parallel computing, they want to be thinking about parallel algorithms, not segfaults or pointer purgatory or the finer points of scp or vi. The sooner the former can be mentally sublimed, the better the OP will feel about HPC.

Post reply on HN