Hello,

I am thinking about teaching my students JavaScript first so that they can start creating websites and make their career, what are your thoughts?

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I would teach Typescript. Being able to write the types down and hover things to see what types they are will definitely help them.

    I think C would put them off. I also wouldn’t go with Python, in case they want to do things like write games or make websites, which are common tasks you can do with Typescript but not very well with Python.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Python’s performance is too poor to do anything serious. Go and look at the screenshots from Pygame. They look like ZX Spectrum era games.

        Compare that to something like PixiJS.

  • Cryxtalix@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    No way it’s C. The average student will go home and find that they can’t do much of anything they like, with the level of C they know. Even printing a string is famously hard in C, they’ll hate it.

    The average students wants to build games, websites, discord bots etc. Javascript makes it easy, none are easy in C.

      • Cryxtalix@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        3 months ago

        Yeah it’s not for the students! OP even specifically said they aren’t CS students.

        Now start doing concatenation, splitting, replacements, char/string/integer conversions, something as simple as returning a string from a function etc. Students will start banging their heads against a wall, a wall that can only be overcome by studying the intricacies of memory management, pointers and char encodings. They will not be producing results for a very long time.

        I have no reason to believe this is remotely interesting to non-CS students. Even for CS students, most opt to work in higher abstraction levels given the option.

        • Flamekebab@piefed.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          I’m glad someone is saying it. I’m a software engineer and someone elsewhere in this thread is giving me shit for not having much use for the low level stuff.

          I was teaching a junior about character encoding a couple of months ago (I suspect his CS degree came free in a box of cereal) but most of what we do is build tooling on top of other tooling. I’m not working on bare metal here!

    • thehairguy@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      +1 to scratch, I’ve used it to both teach kids at one of those “stem summer camps” and adults who do recruiting for tech firms. Both groups were able to pick it up pretty quickly

  • MyNameIsRichard@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I would start with Python. It’s a fun language to learn, and generally recommended for beginners. Towards the end, I would spend a few sessions on c, not to teach them c but to give them an appreciation for what they get for free in higher level languages.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Python. They’ll only learn bad patterns from JS. Please teach bottom-up knowledge, not top-down narrow scope.

  • Flamekebab@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    I was taught a bit of C and still don’t understand why. I see the use of C but it feels much too low level to be useful for the kinds of things I might want to do.

    Python and JS are much more relatable.

    • promitheas@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Ill counter that by saying that because you started with something more low level, the other stuff was easy (my belief).

      Also, depending on what the students are actually studying, I think you need to give an introduction to low level stuff because while some will want to do web dev for example, others might want to do low level stuff. Obviously if its a web dev course you dont want to do that, but if its something like CompSci or Software Engineering then i think having a grasp of the fundamentals of low level stuff is necessary.

      Lastly, if its a general introduction to programming course I think C has advantages over other languages since almost everything is done by you, instead of the compiler (for example iterating over an array - C: you need to do the for loop to manually handle the data depending on whatever type is stored in the array - Python: for x in y is sufficient). Im tutoring my little sister in programming because they have it in school, and they use python. Sure its easier to get things done, but its harder to learn/teach general programming with python in my opinion. C would have been my choice, especially since at that level its not like you need to teach/learn memory management, or complex data structures. Its the same concepts as with python (input, output, variables, conditionals, loops, functions) but the syntax just doesnt hide too much from you, unlike python, making it easier to understand whats actually going on

      • Flamekebab@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        I didn’t find the difference in fundamentals between Python and C to be substantial. C felt similar but more unintuitive and more annoying to work with due to having to compile.

        Understanding exactly how the sausage is made didn’t help me in the slightest. It was needless complexity when I already had a lot to digest.

        I understand your perspective but for me it was like throwing up countless roadblocks to the point where I lost all enthusiasm for the subject.

        It was many years before I tried again, this time with JS and Python.

        These days I’m a professional software engineer.

  • greenashura@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Why not python? C needs constant memory management and JavaScript is too chaotic. Both seem to me a bit too complicated for someone just starting

    • ☭可爱小猫☭@programming.devOP
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      The main reason to not including python is that students aren’t particularly in the CS field, they are learning it as their “augmented skill” (I don’t know what it’s called bad English). That’s why I don’t want to force them to learn CS concept which they might not even need.

      I was thinking about C so that their fundamentals gets cleared but I think it will be too much for students who aren’t into CS. What do you think ?

      • VeryFrugal@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        The main reason to not including python is that students aren’t particularly in the CS field

        If that’s the case C is the very first thing they should avoid spending time on.

      • BillyClark@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        If they’re not in the CS field, and you don’t want to teach them CS concepts that they don’t need, then you have eliminated C as an option by your own criteria.

        With C, they’ll have to learn about compilers, build systems, memory management, and pointers at the very least.

      • MagicShel@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Python allows you to focus on a single concept in isolation (building on what you’ve already learned, of course). JS has a bunch of other stuff mixed in. Like the DOM. Interacting with the DOM is necessary for any browser code. You can hide it with abstractions and boilerplate, but it’s always going to surface in error messages. Debugging JS can be quite a bit harder than other languages.

        Caveat: beginner JS is many years behind me. It may not be as bad as corporate code full of react and angular and all kinds of requirements.

      • who@feddit.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        The main reason to not including python is that students aren’t particularly in the CS field,

        In that case, I think Python is a better choice for teaching programming. Just skip the fancy features that have been bolted onto Python over the past 15 years or so.

        I might argue in favour of JavaScript if web application programming is specifically the goal. But for programming in general, I consider it a troublesome language.

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Idk why you are discarding python for the reason that makes python the best option. If there is a programming language that a non-programmer should know, it’s python.

      • grue@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        The main reason to not including python is that students aren’t particularly in the CS field, they are learning it as their “augmented skill” (I don’t know what it’s called bad English). That’s why I don’t want to force them to learn CS concept which they might not even need.

        That’s an even better reason to pick Python, then.

  • abbadon420@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    If you also plan on teaching html and css, than I’d go for js first. Having your code instantly response in a visual way, is super motivating for most students.
    If you just want to tech programming concepts, i’d go for python.
    If you want this to be the start of a complete cs study, than you can start with C

    • ☭可爱小猫☭@programming.devOP
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      That makes sense, I am also teaching html amd css first so I think JavaScript makes sense to teach next.

      I was thinking about C because that’s the first thing I learned in the college and that’s my favorite language till this day.

      • chicken@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        The problem with C as a language for learning is that the error messages are not very specific or descriptive and often you need extra context to understand what is happening. Messing up memory management can result in inconsistent gremlin-like behavior from your programs, it can get very tricky. I had a pretty difficult time when I got to classes that taught C compared to other languages, but the main thing was just that I needed someone to look over my work and explain things to me because unlike with other languages, the self-service ways of figuring it out were much more difficult and it’s easier to get stuck with no idea what to look into next. I ended up begging people online for help with understanding what was going wrong with my programs to supplement the limited amount of time the professor and TAs were available, really grateful to those guys as I probably would have failed it otherwise.

        Anyway I would just say that if you do really want to go with C, I think you should be willing to put in more time to explain things to students one on one because many of them may need it.

      • Mirror Giraffe@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Good call. At this point the jankyness of js doesn’t pose a problem and the ones that get enticed will learn about type safety, classes etc down the line.

  • raicon@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I would say C first. You need to learn the fundamentals:

    • pointers
    • allocation
    • reference vs value
    • recursion
    • stack
    • panics, errors, error propagation
    • data structures

    Many devs don’t know it and they are honestly just clueless about anything they are doing. They just want to make it work.

    JavaScript is just too high level, and makes you think you are immune to these low level concepts, but you are not.

    And not only that, but also good practices, like:

    • git
    • linting
    • types of tests and how to implement them
    • working with third party dependencies
    • Flamekebab@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      I’ve been working as a software engineer for years and not once have those “fundamentals” been relevant to the work I do.

      If I question their usefulness then I don’t think it’ll sit well with no experience at all.

      • grue@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        If you’ve been working as a software engineer for years and things like error handling and data structures (let alone git and testing!) are not relevant to you, I fear for your employer’s codebase.

        • Flamekebab@piefed.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          3 months ago

          Hah! You picked the two of your list that I actually do care about.

          • pointers * allocation * reference vs value * recursion * stack * panics, errors, error propagation * data structures

          I don’t know what pointers are. I don’t care about memory allocation. Recursion rarely comes up.
          That’s not the kind of codebase I work with. I guess I’m not a proper big-boy programmer 😢

          Anyway, your snide remarks about my abilities aside, that doesn’t address my point at all.

          • grue@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            3 months ago

            First of all, it’s not my list. Check the usernames of the comments you’re replying to.

            Second, you didn’t make any sort of distinction limiting which ones you were talking about before, which means that you expressed that none of them were relevant. You don’t get to move the goalposts and then pretend it doesn’t address your point because of that.

            Third, that sloppiness and failure to pay attention is only reinforcing my initial impression.

            • Flamekebab@piefed.social
              link
              fedilink
              English
              arrow-up
              0
              ·
              3 months ago

              Calling me out on a clarification when you’re banging on with ad hominem rubbish?

              Respond to the point or bugger off. I’m not here to impress you, you’re not my dad.

              Third, that sloppiness and failure to pay attention is only reinforcing my initial impression.

              A good engineer knows when the details matter and when it’s just wasting everyone’s time. Would you classify responding to someone being needlessly hostile as something other than a waste of time?

              If anything you should be criticising me for choosing to spaff more time on this conversation.

    • mimavox@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      I wouldn’t say that pointers and memory allocation is a good thing to start with. I teach programming to students with no prior experience, and sometimes it’s hard to even get them to grasp basic programming in Python. At least in the beginning. You have to start slow.

  • who@feddit.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    I think JavaScript and web app development will be among the first programming jobs to be eaten by LLMs, and it’s already a crowded field. I’m skeptical of that being a wise career move for newcomers today.

  • Diplomjodler@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    If you want to help people develop a fundamental understanding of IT concepts, teach them Python. C is very hard for beginners and will discourage most people. JavaScript is too inconsistent. Python will let people get results quickly and that way encourage them to carry on. Plus, it’s one of the most popular languages out there so Python skills are definitely useful in the labour market.

    • ☭可爱小猫☭@programming.devOP
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Yes, python is very easy language for begginers and they might need it to create backend however most students don’t even know the difference between frontend and backend. They just want to create few simple website. And even if I teach them python first to write APIs, I eventually have to teach them about html, css and js

      • Diplomjodler@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        You can use Flask. With that you’ll have your first website up and running in minutes. Then you can move on to templating in HTML and CSS.

      • tortiscu@discuss.tchncs.de
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        You want them to create websites and consider C, but python is too much “back end”? My mate, you already decided what you want, no need for discussion (:

  • MagicShel@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    Probably JS as the fact that every computer has by default everything you need to execute JS. But there is a bunch of browser stuff you have to worry about before you can do anything with it. I’m not sure how you learn JS before html.

    With Python you can do simple command line stuff without having to really know anything else. You can learn one concept at a time.

    That being said, people have a lot of familiarity with browsers and it might feel less abstract. JS might a better choice for demystifying coding. Python is probably a better choice for accomplishing anything useful.

  • brisk@aussie.zone
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    What level are your students (primary school, high school, technical college, university)?

    You said it’s not a core skill, so what is their core skill? IT? Machinist? Electronics engineer?

    C is an excellent “fundamentals” language that anyone with a software engineering and maybe computer science should have exposure too, but if their programming is purely practical (e.g. scripting for IT?) C is essentially irrelevant.

    Javascript is very narrow in scope but if they’re web designers then it’s essential.

    I’ll back the other commenters that if they need a language they can do useful things in (e.g. simple automations, calculations), Python is hard to pass over.