Playing stupid games with someone's ego and the ability to self-assess is a sort of insidious evil. Just to give you as an example, a story of one Polish naive artist who was led to believe he was a big deal by some newspaper publishing an article about him. It was in the 80s, I think, when the world went through an infatuation with naive art phase (again). Excited about the newly-earned fame, the guy applied to Krakow's art academy, and... was basically laughed out of it for not being a "conventional" good craftsman. He committed suicide short afterwards.
In a less dramatic way, the other thing that comes to mind is the scene from Kung Pow! Enter The Fist, where the protagonist was "taught wrong, on purpose, as a joke". I cannot imagine telling someone who knows nothing about programming that Python is a good way to do anything or to learn anything. It's just a pile of trash made popular by the network effect. If anything, anyone with a drop of common sense should work hard to prevent the next generation from using it.
Agreed. If you start in any other language, you'll be spending less time teaching programming and more time teaching the language.
Java in particular, because the fact that it's so verbose and has so much boiler plate, I think, is actually good for a new programmer.
There are also different ways things can be hard. Some things are hard to understand once -- and then once you understand, no extra effort is required. You just go around knowing it. Some things could be hard because nobody can explain them to you, and you will be running up against the wall trying to figure them out. Some other things are hard because they are always in flux. You think you've understood them, but the next moment someone is pulling the carpet from under you, and you have to start understanding them all over again.
I still remember my disappointment, for example, when after second semester of automata theory, we ended up constructing "mini machines" -- short sequences of instructions that could be combined to build bigger programs. And then we went straight to Java. There was no continuity. Nobody cared or even could explain how, if you wanted to build from the first principles could you get Java. The step between "mini machines" and Java was never explained. There was no explanation for why should Java have such and such feature, or what would have happened if it hadn't etc.
People are masters of reconciling inconsistencies, and not in a good way. When something doesn't make sense, people will masterfully invent some cooked-up nonsense to replace the real explanation. And this is the case for most CS majors. When you ask them questions about basic things about their trade, what you hear back is some laughable excuse of an answer. We have several generations of programmers today who grew up with this nonsense, internalized it, made it into a cult. Python owes its popularity, in great part, to these generations of programmers with missing foundations, lacking ability of critical thinking which led to bizarrely distorted view of the world.
None of those things matter to a beginner, what's important is minimizing friction, so they can actually learn programming without having their curiosity rewarded with a flood of compiler errors. Python is fantastic in that regard. No need to define a main function, no need to care about signed/unsigned int, printing out the contents of an array or dictinary directly is a single statement that won't just output a heap address, etc.
And when they learn about more advanced stuff they will understand why many languages do things differently, and Python will still be very useful for small scripts and prototypes.
That's where you are wrong. Beginners don't know that these things matter to them. But they very much matter.
> so they can actually learn programming
But they won't. They will become the "water from the toilet" idiots. Whatever they learn how to do will have no value, if they don't know how to do it well. Accidentally I saw this article today about how US military lowered IQ requirements for draftees during the Vietnam war, and how people with low IQ were five times as likely to die. You are suggesting to do thing wrong in hopes that it's somehow if you do it fast, nobody will notice? -- hell no. We already have armies of programmers who believe in strict static typing or in object-oriented programming. This will just add more idiots to their ranks.
Could you specify why they matter for a beginner? Because I've been using Python for quite a while and I can't answer your previous question about what specific Python version did that subclass attribute change. I think by the time such a detail comes up a "beginner" is already comfortable enough with the basics to learn about it. But in Python those basics tend to be more straightforward and riddled with less boilerplate and redundant syntax than in many other languages, which is nice because getting slowed down by those things when learning is frustrating.
> You are suggesting to do thing wrong in hopes that it's somehow if you do it fast, nobody will notice?
I'm suggesting that reducing friction in the first phases of learning programming is a worthwhile improvement and that the choice of language matters in this regard, nothing else. I didn't say a word about learning an entire language or learning programming up to the point which you call "knowing how to do it well".
> We already have armies of programmers who believe in strict static typing or in object-oriented programming. This will just add more idiots to their ranks.
Am I reading this correctly that you think relying on strict static typing is for idiots? Because I made the experience it's very helpful for maintaining code, in addition to other best practices of course.
This is, IME, not a function of what language people learn with first (ot second or...) but of their personality and desires. Most people who learn programming learn it as a means to an ends (often the latter is a paycheck) and will learn only as much as feels like a good payoff for the effort in that context. This isn't the fault of the language they start with, its just human nature.
You can't fix that things you thibk everyone should know about programming, and should want to know, actually don’t make sense to bother learning given most people’s actual utility function by using a different first language.
I think that for teaching, you can go too far and eliminated too much friction. In python in particular, there's all this type stuff going on under the hood that's absolutely critical in understanding what the output of your program is going to be, but nowhere in that program is it explicit what that type information is.
It's easy enough to keep track of that in your head once you've mastered the concept, but for a true beginner, I think
int x = console.nextInt(); String operation = console.next(); int y = console.nextInt();
is probably better suited for helping you get your bearings than having to figure out why you have to cast x and y after doing
x, operation, y = input().split()
As someone who's day job is mostly Python, not off the top of my head, but I could probably find out if it was ever relevant to my work (finding information about Python is quite easy, which is one of its social strengths), which it would almost certainly not be, because in normal use of Python modules, it doesn't matter.
> How many facts like this one do you think exist?
Trivia that's irrelevant to most use of the language? Lots. So what? That doesn't make actual use hard.
> I still remember my disappointment, for example, when after second semester of automata theory, we ended up constructing "mini machines" -- short sequences of instructions that could be combined to build bigger programs. And then we went straight to Java. There was no continuity. Nobody cared or even could explain how, if you wanted to build from the first principles could you get Java. The step between "mini machines" and Java was never explained.
I can see why that might, to some tastes, make that course of study intellectually unsatisfying, especially if one both had an obsesssive need to see the whole picture but not the drive to do the obvious work laid out, implicitly, fior the student, but it seems like a non-sequitur when discussing whether or not Python is hard.
If you're trying to train somebody to be a software engineer, rather than just automating a particular data entry task as quickly as possible, I think boiler plate is good. It's better to force the details on the person at first than to have them be hidden, automatic, and mysterious forever.
class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
to start a nice journey into programming, right?
But I had to look after your comment and Java can cope with no package declaration! https://stackoverflow.com/questions/2335211/what-is-the-defa...
https://medium.com/@shwetha.hey/java-21-no-more-public-stati...
Also you can do
new {
System.out.println("Hello, world!");
}I actually returned to JS scripting after a long hiatus thanks to Deno. And now like the language a lot more.
Lua also integrates with C extremely well, so it can help with that transition.
The reason not to teach Python is the same reason you'd use for preferring home-cooked meal to McDonald's take-out. And I'm saying it as a parent who has to compete with this food enterprise... I think, I'd be a horrible parent if I didn't allow any McDonald's food ever, but I certainly don't encourage it.
Similarly with Python: if you want to give your child something good: there are plenty of options that are better than Python. But, Python will be the inevitable garbage they will have to face due to its popularity. It would be counter-productive not to prepare the next generation to deal with it.
I remember when I was a TA teaching CS 101 with C++. People constantly stumbled with types and compilation. Just the concept of storing a value in a variable and retrieving it again was too much for some people.
That is where Python will shine for youngsters. Variables, control structures, functions. I bet they will get to the point on their own when they’re like “what’s the deal with numbers and letters being different”? and then you can take their hand and say “grasshopper, you are ready to learn about C/integers/ASCII/floating point”.
I like JS for it’s node_modules solution. In python you end up with libs conflicits and segfaults that you cannot debug unless you are deliberate about deps management.
Python being described as a jack-of-all-trades and master of some is a really succinct way of explaining it's dominance. One of my kids is about old enough to start learning to program. At this point, I can't see a reason to teach her anything but Python.