Live data from Hacker News

Ask HN: What language should beginning programmers learn first?

news.ycombinator.com

11–20 of 23 posts

Re: Ask HN: What language should beginning programmers learn first?

#11
I think Harvard's CS50 course has got it right - some C for the first few weeks, then move on to Python. They also expand things in a way that exposes the students to a bunch of of other concepts - some JavaScript, some SQL, a bit of web programming, machine learning, games etc. I think for beginners getting a good idea of the landscape is more important that the specific language.

Re: Ask HN: What language should beginning programmers learn first?

#12

On one hand, I think that learning an easily-readable language like Python makes it easy to not worry about syntax and focus on actual CS concepts. On the other hand, there are a lot of CS concepts that go beyond algorithms, and I think understanding how e.g. C++ is written, precompiled, assembled, etc. is really valuable information. It is sort of like the argument for or against starting with an IDE - training whee…

Not sure C++ knowledge is especially valuable compared to contemporary applications languages, a lot of people who used to do C++ in its heyday seem to have switched. There are various niches where it's still in demand of course.

Re: Ask HN: What language should beginning programmers learn first?

#13

On one hand, I think that learning an easily-readable language like Python makes it easy to not worry about syntax and focus on actual CS concepts. On the other hand, there are a lot of CS concepts that go beyond algorithms, and I think understanding how e.g. C++ is written, precompiled, assembled, etc. is really valuable information. It is sort of like the argument for or against starting with an IDE - training whee…

I think there's a better argument for C than for C++. There's probably some value in having to do something by hand and then seeing how much of that work isn't necessary when you move on to a higher-level language. The C++ specific stuff like the STL will probably be distracting for beginners.

Re: Ask HN: What language should beginning programmers learn first?

#15
If you're anything like me I learn best by doing.

I really learned how to program when I had problems to solve, at the time I wanted to automate unrelated programs on Windows that needed the same data entered into them; I used autohotkey, but probably wouldn't recommend this unless you want to automate other software.

I moved onto python after that. Python seems to have everything needed to easily learn what you need to know, with libraries for everything. This is beneficial when you start out, at least for me.

Re: Ask HN: What language should beginning programmers learn first?

#16
I would say learn Scratch programming first.

Hear me out. It runs in the browser so there is no setup.

You can see all of the blocks so there is less cognitive overhead trying to remember syntax.

There is a huge community, they had 30 million active users last year.

There are tons of books, courses, videos, and a forum to ask questions.

Re: Ask HN: What language should beginning programmers learn first?

#17
I was going to suggest a functional language, but then realized that these days it's not the language choice but rather how it's used. I can't think of a beginner-friendly functional language--F# is close but doesn't lead to many jobs. Maybe Elixir.

Regardless of what language is first learned, I wish that more attention was paid to how the language is introduced and used. Specifically, rather than going bottom up mutating things willy-nilly to get the job done, express solutions decomposed in a functional style with localized side-effects. Keep using this pattern until it's the first/second nature.

So much of becoming a good developer is unlearning bad habits picked up starting day 1.

Re: Ask HN: What language should beginning programmers learn first?

#18

On one hand, I think that learning an easily-readable language like Python makes it easy to not worry about syntax and focus on actual CS concepts. On the other hand, there are a lot of CS concepts that go beyond algorithms, and I think understanding how e.g. C++ is written, precompiled, assembled, etc. is really valuable information. It is sort of like the argument for or against starting with an IDE - training whee…

From watching my son learn, basic concepts of programming have enough frustration built in, that I feel you really need to optimize the rewarding feedback loop aspects. Jumping to CS concepts is a bridge too far, and TBH, there's a lot of programming-literate jobs that don't need it.

I think I agree, but... I also halfway agree[1] with the point about "having to unlearn bad habits".

Is there a language that gives beginners a fast reward feedback loop, and also guides them toward good programming habits (or at least does not teach them too much that they're later going to have to unlearn)?

-----

[1] Only halfway, for a couple of reasons.

First, there are different kinds of programming. If you learn imperative programming, with good habits, and then you switch to functional programming, you now probably have some bad habits - habits that are bad in the functional world, but were fine - even correct - in the imperative world. I don't think it's fair to call that "learning bad habits".

At the same time, beginner languages can teach approaches that are bad habits in any non-beginner setting. (This criticism was often applied to BASIC. I'm not sure it's entirely true, but I suspect it's also not entirely false.)

Second, learning good habits took me a decade or three. It took finding out why the simple things weren't good enough, by running into situations where they weren't good enough. But for a beginner, the simple things are good enough, because they aren't yet running into situations that expose the problems. (You don't tell a toddler that they need to fix their method of walking because it won't cut it at a basic training obstacle course.)

All that said, I think there still is a place for not pushing them into blatantly broken approaches.

Re: Ask HN: What language should beginning programmers learn first?

#19

On one hand, I think that learning an easily-readable language like Python makes it easy to not worry about syntax and focus on actual CS concepts. On the other hand, there are a lot of CS concepts that go beyond algorithms, and I think understanding how e.g. C++ is written, precompiled, assembled, etc. is really valuable information. It is sort of like the argument for or against starting with an IDE - training whee…

> understanding how e.g. C++ is written True, but why should you learn about this first? Better to get the fundamentals down first. Once you have that down, you can engage with accidental complexity like C++ compilation and linking details if and when needed.

This kind of depends on your definition of "the fundamentals", though. Is that assembly, or lambda calculus? You could make a case for either one, but they give you very different ideas of where to start.

C/C++ could be argued to be a compromise that kind of lets you look both ways. (That could be argued to be a virtue, or a fatal flaw...)

Re: Ask HN: What language should beginning programmers learn first?

#20
post #16

I would say learn Scratch programming first. Hear me out. It runs in the browser so there is no setup. You can see all of the blocks so there is less cognitive overhead trying to remember syntax. There is a huge community, they had 30 million active users last year. There are tons of books, courses, videos, and a forum to ask questions.

Setup. That's huge. What is the minimum amount of setup that a beginner can do before they can write and run something? If it's "download this thing off the net, install it, then use it to download several other things..." you've lost half your would-be beginners.
Post reply on HN