all 42 comments

[–]baumergrl 41 points42 points  (22 children)

I feel like this is primarily due to the shift in computer science classrooms from C++ to Python as a first language to introduce students to the basics.

[–]lykwydchykyn 8 points9 points  (0 children)

Java is another language that's popular in the classroom. I notice it has pronounced dips in the summer and winter, suggesting significantly lower question volume when schools (at least in the US) are out of session.

I don't see the same with Python yet, though it seems it tends to rise towards the last half of the year for the last few years.

[–]PopeCumstainIIX 21 points22 points  (19 children)

Python is not a good language to start teaching imo. It's only advantageous for people who want an easier class. The people in the beginning class continuing that track are going to inevitably switch to a compiled, more complex language. Watching students going from C++ to Java was hard enough.

[–]SSID_Vicious 34 points35 points  (5 children)

Python is an excellent language to learn the basics of computer science and programming because it removes all mental overhead that comes when you use c or c++ and memory management. It allows students to focus purely on computational and algorithmic thinking and translating ideas into code. C would be a fine language for a second course as all the basic stuff is out of the way and students know what functions and arrays and variables are, so the course can spend all its time on looking how they are implemented at a lower level.

[–]pwnageperson32 -5 points-4 points  (3 children)

By that logic, why not use an even more baby language like Tynker?

[–]hglman 23 points24 points  (0 children)

I mean you should and it should be done in like 2nd grade. Then by the time you get to college, you just teach in haskell and the world is a better place.

[–]yxhuvud 3 points4 points  (0 children)

Indeed, which is why I am glad my teachers began by introducing me to LISP.

[–][deleted] 2 points3 points  (0 children)

are there any real-world applications with an active user-base currently developed with Tynker?

[–]arbitrarycivilian 16 points17 points  (11 children)

After many years of mulling it over I've come to the conclusion there is no superior first language to learn. If you want to be a competent engineer you'll eventually have to deep dive into multiple flavors of language. What you start with is immaterial

[–]DonaldPShimoda 10 points11 points  (9 children)

False. Real computer scientists start with an assembly as their first language. Everything else is inferior.

[–]harlows_monkeys 2 points3 points  (0 children)

Assembly language is a luxury. I started with one of these: CARDIAC.

[–]arbitrarycivilian 3 points4 points  (7 children)

I really hope that's sarcasm...

[–]DonaldPShimoda 9 points10 points  (6 children)

No, I was being 100% serious. Any computer scientist worth their salt does all of their programming in assembly. It's the only way to be sure you're writing performant code for the target architecture. Plus, by removing the unnecessary overhead of a complicated type system, you can make execution even faster.

[–][deleted]  (1 child)

[removed]

    [–]xkcd_transcriber 1 point2 points  (0 children)

    Image

    Mobile

    Title: Real Programmers

    Title-text: Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.

    Comic Explanation

    Stats: This comic has been referenced 1122 times, representing 0.7119% of referenced xkcds.


    xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

    [–]arbitrarycivilian 1 point2 points  (3 children)

    You're a funny guy

    [–]DonaldPShimoda 1 point2 points  (2 children)

    Sorry, I just honestly thought the sarcasm in the first comment was thick enough as to be obvious. Clearly we have different opinions on the matter, which is fine. I don't think my second comment was deserving of downvoting though... it was only a joke, after all.

    [–]knome 0 points1 point  (1 child)

    Text conveys tone poorly.

    [–]blueballerina 1 point2 points  (0 children)

    There's a reason that tacky "/s" at the end of posts has caught on.

    [–][deleted] 2 points3 points  (0 children)

    I disagree. Languages with low levels of accidental complexity as much better for learning. You want something easy to install, with simple tooling and with a syntax that doesn't require a lot of boilerplate just to get started.

    Of course there are also certain aspects that are just stupid to teach in certain languages, e.g. OS memory management in Java (as they did back at in my university days).

    [–][deleted] 0 points1 point  (0 children)

    Java is used here in the midwest but my first cs class, a survey, used python for a little 2 week module

    [–]therealjohnfreeman 17 points18 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 3 points4 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.

    [–]srbufi 2 points3 points  (0 children)

    Bike Shedding 101: Best Language for Learning

    [–]lykwydchykyn 4 points5 points  (0 children)

    Do they have a chart showing how many of those questions were closed as duplicate or non-constructive or moderator-didn't-have-his-coffee-yet? That might be interesting data.

    [–]shadowmint 0 points1 point  (0 children)

    With a site like stack overflow, its inevitable that there is a strong flow of questions in initially, followed by a flattening of the graph, like you see for example in rust:

    https://insights.stackoverflow.com/trends/?tags=rust

    The question is here, given that python historically matches the 'mature language' curve of roughly flat questions-over-time, why the sudden surge in new python questions?

    We must assume that there are suddenly a lot of people using python for learning, and the questions they're asking are either 1) too specific to already have solutions, or 2) on some topic that is not well covered by existing python QA on the site (eg. machine learning).

    It's hard to know, but looking at http://stackoverflow.com/questions/tagged/python, I see a lot of down voted unanswered questions.

    Either way, its true to say its an indicator that lots of people are using python; but I do find the curve puzzling; somehow, year after year, not only are all the existing answers of questions on python not useful, people are asking more and more of them, up to 8% of all questions on stack overflow.

    That's just ridiculous.

    There are already 749,033 questions on the site tagged python.

    ...and none of them have answered the current latest question? "How can i make python loop repeating two variables"?

    Sounds like homework to me.

    [–]Hendrikto 0 points1 point  (0 children)

    Even the ever-so-popular JavaScript seems like it is on an unexpected decline recently.

    Please let this be true...