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 wheels on vs. training wheels off.
I supposed ultimately it comes down to your goals, but I'd love to hear everyone's thoughts!
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.
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...)
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.
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.
Anything with a fast and rewarding feedback loop, with a community of amateurs that value learning and hacking.
An ideal to me might be Javascript in a sandbox like Khan Academy's Javascript courses[1]. It feels like when I learned programming in AppleBasic or Borland's QuickBasic. My son does these occasionally - there's many games people have created you can explore and hack on. Reminds me of trying to figure out how Snake worked in MS DOS back in the day.
That's a really good point - I was thinking purely about the language itself, but having a community to interact with, learn from, share with, and get excited with really makes a huge difference.
Being able to help people reach that "Ah, I get it!" point, or experiencing it yourself after hours of struggling, is a great way to maintain interest and not get frustrated
IMO a big part of the choice ought to be subjective, a.k.a. personalized. Important subjective aspects:
1) Rank what you've seen in list order, most-interesting first. It doesn't matter if you just like the logo, or mascot, or other irrational things. That's still free emotional energy you can tap into.
2) Rank based on how they fit your technical and logical needs. Platforms you want to develop for, libraries you may need, tooling or editors or OSes you want to use. Support for your native written language.
3) Look at the project's subjective past. Why did it start, why did the dev team last change, what's the overall story they are writing. Does it match well with your story?
5) Look at your probable future. Are there any future needs you'll need to meet with this education? Does the language help you toward those ends? Again you'll probably want to rank them.
5) Look at the probable future of the project. When was the last release? Are modern libraries or tools supporting it? Is the website up to date? Is the forum covered with posts asking when there will next be a release, or is the core team still energetic or stable?
Upon answering these personalization questions, that's when I'd look at more objective factors, like what other people say about it based on their personal circumstances.
Good luck to you, there are tons of amazing choices out there, and some beginning programmers can even start with more than one language...
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.
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.
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.
You can literally start coding in Scratch as soon as you open the window. Of course you want to create an account if you want to save anything without having to download your file.
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.
It depends on how far they want to go.
If you want to become a world class expert you should learn C++.
Human expectations grow faster than hardware,
and C++ is often the only viable choice for bridging that gap.
However if your aims are more modest you may find another language that better matches your needs.
22 comments
[ 5.2 ms ] story [ 64.4 ms ] threadOn 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 wheels on vs. training wheels off.
I supposed ultimately it comes down to your goals, but I'd love to hear everyone's thoughts!
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.
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.
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...)
An ideal to me might be Javascript in a sandbox like Khan Academy's Javascript courses[1]. It feels like when I learned programming in AppleBasic or Borland's QuickBasic. My son does these occasionally - there's many games people have created you can explore and hack on. Reminds me of trying to figure out how Snake worked in MS DOS back in the day.
1 - https://www.khanacademy.org/computing/computer-programming
Being able to help people reach that "Ah, I get it!" point, or experiencing it yourself after hours of struggling, is a great way to maintain interest and not get frustrated
1) Rank what you've seen in list order, most-interesting first. It doesn't matter if you just like the logo, or mascot, or other irrational things. That's still free emotional energy you can tap into.
2) Rank based on how they fit your technical and logical needs. Platforms you want to develop for, libraries you may need, tooling or editors or OSes you want to use. Support for your native written language.
3) Look at the project's subjective past. Why did it start, why did the dev team last change, what's the overall story they are writing. Does it match well with your story?
5) Look at your probable future. Are there any future needs you'll need to meet with this education? Does the language help you toward those ends? Again you'll probably want to rank them.
5) Look at the probable future of the project. When was the last release? Are modern libraries or tools supporting it? Is the website up to date? Is the forum covered with posts asking when there will next be a release, or is the core team still energetic or stable?
Upon answering these personalization questions, that's when I'd look at more objective factors, like what other people say about it based on their personal circumstances.
Good luck to you, there are tons of amazing choices out there, and some beginning programmers can even start with more than one language...
[0] https://racket-lang.org
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.
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.
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.
Javascript: run anywhere
Python: utilities
Java/C#/C++: prepare for enterprise jobs
However if your aims are more modest you may find another language that better matches your needs.