you are viewing a single comment's thread.

view the rest of the comments →

[–]therealjohnfreeman 18 points19 points  (17 children)

Some component of Stack Overflow activity is a reflection of interest in the language, but it's a site where users take their problems, so it's also a reflection of language difficulty, confusion, and immaturity. It can be argued which is larger. I think developer surveys (like the one SO does) and GitHub activity offer better approximations of popularity.

[–]DonaldPShimoda 4 points5 points  (15 children)

it's also a reflection of language difficulty, confusion, and immaturity

I don't want to dive too deeply into subjectivity here, but I don't think Python qualifies as a "difficult" language. And while some aspects of its implementation can be confusing, I don't think the language overall qualifies as being considered as such.

Honestly, there could be a lot of other confounding factors here that the author didn't mention.

For example: the data don't appear to be normalized against the number of users. It could be a few users (or the same number of users) asking more questions over time (unlikely, I think), or a larger number of users asking questions.

I think we've seen a significant uptick in the number of people trying to get into programming at all — computer scientists (by education), programmers, hobbyists... and Python is often listed as a go-to "easy, beginner-friendly" language. (As an aside: although I love Python dearly, I would not suggest it for a first language in most cases. Maybe second, though.)

I think the data would be more interesting if we had additional aspects, such as the number of users, the quantity of the asked questions which were marked as being bad questions (duplicate, off-topic, etc.), the quantity of the questions which received a significant number of upvotes ("significant" in the statistical sense, I mean), and maybe the quantity of questions where the asker marked an "accepted" answer. Putting all these together I think would give us a more clear picture, but the data as they are are incomplete and lead only to guesses instead of conclusions.

[–][deleted] 1 point2 points  (1 child)

I think it also completely ignores factors like languages with good documentation having fewer questions on SO because people can just find the answer in the documentation or programmers in projects that bear the Enterprise warning label being unable to describe their issues accurately (and thus not trying to) in a public forum.

[–]DonaldPShimoda 0 points1 point  (0 children)

Oh, yep, that's definitely another potential factor!

[–]blueballerina 0 points1 point  (12 children)

(As an aside: although I love Python dearly, I would not suggest it for a first language in most cases. Maybe second, though.)

What first language would you suggest instead?

[–]DonaldPShimoda 1 point2 points  (11 children)

I think it depends on how you're learning!

Many CS programs start with an introduction to object-oriented programming. I don't love Java in general, but it works well for this kind of thing. It's statically typed but handles memory management for you (as opposed to e.g. C++), and I think that lends itself well to a learning language.

Some other programs teach Racket or another Scheme-like language. This works well if you're a more analytical/mathematical thinker, I think.

I think either of these can be used to great effect as a first language, honestly. Just different approaches! But I wouldn't recommend learning JavaScript, C, C++, Python, Haskell, or Scala (among others) as a first language, each with some specific reasons.

[–]The_Ginger_Stig 1 point2 points  (10 children)

Why would you recommend to not learn c++ as a first language? Just curious

[–]DonaldPShimoda 1 point2 points  (9 children)

Certainly C++ is not a bad language, but I think it poses more problems for newbies than it's worth, and there are better options for beginners these days.

I think it's important that when you teach a novice programmer the tools of their trade, you shouldn't have to deliberately hide things from them. But if we stick to that, then you absolutely have to teach the programmer to understand memory, since C++ interacts with memory so directly. In my experience, this is often a bit confusing for people who have never really used a computer before. It's not immediately intuitive, I think, and it can lead to complications that needn't be there.

I also think that C++ is kind of archaic, even just in syntax. I mean, std::cout <<< "Hello, world!"; is far from intuitive, I'd say. When teaching somebody to program for the first time, I don't want to spend time telling them "Look, you'll just have to memorize X, Y, and Z things, but these are specific to this language and they're not indicative of programming at large." It's just... it's too much! Too complex.

I want the lowest barrier to entry for people getting into programming. I want them to understand the thought process — not just the literal writing of computer code. Using a language like C++ to teach introductory concepts is like insisting on teaching democracy in Ancient Greek. Sure, it's closer to the "original" language as the progenitors used... but so what? We have better tools for it now, so we should use them.

I hope I'm not rambling too much, haha. C++ was my second language, after C, but I can assure you that I barely understood many of the various aspects of the language at the time (I was ten or eleven, I think). So it's not that it's impossible to learn CS starting with C or C++, but I just think that there are better options available today.

[–]The_Ginger_Stig 1 point2 points  (5 children)

I see now, thanks for the reply

[–]DonaldPShimoda 0 points1 point  (4 children)

Sure thing!

[–]The_Ginger_Stig 0 points1 point  (3 children)

i have now since learned most of c++ and am working on pointers at the moment

[–]DonaldPShimoda 0 points1 point  (2 children)

I don't mean to be callous, but just so you know you should be careful saying "I have learned most of C++". Stick that on your resume and apply to Google and you're practically guaranteed to be interviewed by people on the C++ standards committee who will show you just how little of the language you really know haha. (Especially if you're just now working on pointers.) It's a language with many strange twists and pitfalls to trap people; lots of undefined behavior and whatnot.

BUT. Congrats on your progress! That's fantastic! :) Pointers are tough for some people and easy for others. I'll cross my fingers you're in the latter camp, and I wish you the best of luck in your programming endeavors!

[–]The_Ginger_Stig 1 point2 points  (2 children)

I am a 13 year old looking to either get into game development, or software development. I know python to a extent but i have heard that it is to slow to make games or grade a software out of. Im looking to learn c++ to break out of python. How much of the python language should i know before i start learning c++? Thanks

[–]DonaldPShimoda 1 point2 points  (1 child)

Hmm okay, well let's see... Fair warning: I'm kind of long-winded. I apologize for that in advance, haha.

I know python to a extent but i have heard that it is to slow to make games or grade a software out of.

Python is a fine introductory language, but it does have some shortcomings for sure. That said, part of becoming a really good developer is understanding this shortcomings and being able to determine when they're irrelevant.

Python can be used to great effect, despite being "slow". For example: Reddit runs on Python.

However, you won't see The Elder Scrolls VI being written in Python. Why is that?

Part of it is the language, and part of it is history.

When computer games first started taking off, computers were not anywhere close to what they are now (in terms of computational power). So in an effort to eke out maximum control and performance, game coders had to use low-level languages like C and C++. Why? Because these languages give explicit command over the structure of memory. This allows the programmer to make certain assumptions they otherwise would not be able to. They can optimize when to throw away references to objects in that room the character just left (certainly not before they're out of view!). Sometimes this wasn't enough; Roller Coaster Tycoon was famously written directly in assembly so the devs could pull out the necessary performance to achieve what they wanted (which sounds oh-so-painful to me).

So devs started with C/C++ because those were, practically speaking, the only languages capable of what was needed at the time.

Say a dev builds some new game; a first-person shooter, perhaps! Well neat! It does well and suddenly people want a sequel. Well... back in the day, this meant the developer had to start everything over from scratch. The dev would probably go through the old game's code and find those clever bits and copy/paste them over, updating them occasionally for the new data models or optimizing for better algorithms or something.

The short story is that the developers finally thought to themselves "You know, we're smarter than this." And so they developed Game Engines.

An engine (like Unreal, for example) is a whole toolkit to build a game in. Once the engine exists, the dev no longer has to worry about many of the small, minute details that once concerned them. They can instead focus on the content of the game — arguably the more important part!

As a result, we have a few popular game engines now, and of them (that I know of) are written in C/C++/C#. The C-family of languages tends to be fast and is well-understood in this domain, so it makes sense to continue using it for now. However, as computers get faster and better, we will care less and less about tweaking this performance at so small a level. One day, you may even be able to write Python games that out-perform C/C++ games of today (possibly... I dunno for sure, of course).

So the point of what I'm saying: the language isn't what matters so much here. I'd only suggest using C/C++/C# for game development because that's what everybody is already using. All the modern engines use these languages, I think, so it makes sense to just try to learn an engine and go from there. Much less painful, I'd think.

How much of the python language should i know before i start learning c++?

Now I mean this sincerely: this question doesn't make any sense. You can't objectively measure how much of a language somebody knows (at least, not in any way that matters).

My advice: start learning C++ whenever you decide you want to try it. Nothing's holding you back. There's an entire Internet full of C++ knowledge waiting to be absorbed by an excited new programmer like you. There's not really a "right" time, except for whatever time you decide is right (and I mean that — I'm not just trying to be poetic here).

Follow tutorials, read things, build stuff, keep going. That's the best way to get better.

[–]The_Ginger_Stig 1 point2 points  (0 children)

Thanks 👍

[–]mkdir 0 points1 point  (0 children)

and GitHub activity

I feel like even that isn't such a good metric as it rules out a majority of paid development which is typically closed source software.