I’m going to be delivering an online intro to programming session to a non-technical crowd who will be “following along at home”. Because it’s online, I can’t provide them with machines that are already set up with an appropriate development environment.

I’m familiar with Linuxes and BSDs but honestly have no idea how to get set up with programming stuff on Windows or macOS which presumably most of these people will use, so I need something I can easily instruct them on how to install, and has good cross-platform support so that a basic programming lesson will work on whatever OS the attendees are running. Remember they are non-technical so may need more guidance on installation, so it should be something that is easy to explain.

My ideas:

  • C: surely every OS comes with a C compiler pre-installed? I know C code is more platform-specific, but for basic “intro to programming” programs it should be pretty much the same. I think it’s a better language for teaching as you can teach them more about how the computer actually works, and can introduce them to concepts about memory and types that can be obscured by more high-level languages.

  • Python: popular for teaching programming, for the reasons above I’d prefer not to use Python because using e.g. C allows me to teach them more about how the computer works. You could code in Python and never mention types for instance. Rmemeber this is only an intro session so we’re not doing a full course. But Python is probably easy to install on a lot of OSes? And of course easy to program in too.

  • Java: good cross-platform support, allows for teaching about types. Maybe a good compromise between the benefits outlined above for C and Python?

Any opinions?

    • flubba86@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Clearly OP has never used PC-DOS, MS-DOS, Windows 3.1, Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, Windows 11, MacOS, OSX, or AmigaOS, all of which do not come with a C compiler installed out of the box. Even Ubuntu does not have gcc or build headers installed in a default install (must install build-essentials package first).

    • Machinist@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Second on Scratch. Then Python or Java.

      (Pretty sure windows doesn’t come with any compilers anymore. Even if it did, it lacks an ide.)

    • Destide@feddit.uk
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Yup thinking it’s for kids is a misnomer one of the most powerful tools to understand concepts in real time.

      Thonny and Python are a pretty good successsion.

  • Bobo The Great@startrek.website
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    C is full of complex paradigms and low level details that are great if you’re learning computer architectures, but pretty bad if it’s your first languages.

    Python in the other hand is great to learn programming practices and for quick, non-optimized, easy scripts. I think it’s less suited for more complex projects, but that’s another thing. I honestly fon’t think it’s a great language, but it’s easy to use and has pretty much a library for everything, that’s why I think it’s good to start and for simple things.

    Java is also quite high level, so also good for beginners, but I’ve never used it so I don’t know how easy is to setup (python is) and how easy it is to download dependencies (on python it is).

    For your case I would say Python is best.

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Java is much easier to set up than Python is. For one Java works with mise, asdf, sdkman and numerous other automatic tool managers. Python on the other hand works with none of those. I wouldn’t recommend either for being easy to set up. Ruby is much easier than both (including my favorite language, Kotlin) and has just as many nice features and is much easier to read than Python.

      • Bobo The Great@startrek.website
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        I don’t know, my experience with python is “sudo apt install python3” on linux and “download the installer on windows and run it”, I see many comments mentionting python difficilt to install but I really can’t see why

    • fnrir@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      As a fan of Rust, NO. I think it would only discourage them, but I never tried teaching, so I might be wrong.

      Case in point - users that started out with Linux get used to Linux and its paradigms. Maybe it’s the same??? Or maybe not.

  • Ziggurat@jlai.lu
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    What’s your target audience ? An what’s the goal ?

    There is a difference between Giving a programming training to scientist/engineer who may need more than just Excel for data-processing/visualisation, and giving a discovery what programming looks-like for a general public, or people who want to do their own website.

    For general public, the good-old “Logo” that kids learned programming with in the 70-90’s is still great

    for scientists engineer, I would go for python which is the de-facto standard for data visualisation/processing when performance doesn’t matter

    For a more foundation course, I think the everything is object approach in java can be pretty great

    • communism@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      What’s your target audience ? An what’s the goal ?

      Good questions. The goal is not to make new programmers but mostly to satisfy curiosity and help people learn about how the world works, specifically how computers work, and to feel more confident around tech. It’s for a non-technical crowd. Mostly just to give them a taster/peek “under the hood”.

      • halfdane@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        If it’s a nontechnical crowd with no intention of using this knowledge in the workplace for actual programming, I’d agree with the other poster who recommended scratch: it’s a visual, object oriented language, so there are hardly chances for typos, it’s designed for learning, it runs in the browser. It’s a great language for kids and older “first contacts”

  • tyler@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Absolutely do not use Python. It’s a nightmare to install on random computers and the majority of your time spent will be trying to get it working on everyone’s computer (that was my job at one point). As far as I remember, there isn’t a “good” C compiler that comes on windows and the one on Mac is missing some stuff.

    I’d go with Ruby, it’s dead simple to install on every OS, easy to teach and learn, and doesn’t work differently across OSes. There’s an installer for it for windows and it comes installed by default on Mac (or it did? Maybe they stopped that).

    • bob_lemon@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      What?

      Linux: Install with whatever package manager you use

      Windows: download installer, run installer

      Mac: Idk, same as Windows I’d guess

      Then type python or python3 into your command line to check of it works. Run scripts from command line, too (to prevent stuff like file associations or shebangs)

      Any version >=3.10 is fine, the differences don’t matter for a basic course. Venv or even pip is not needed either (again, basic course).

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        If only it were that easy. Like i said, my job for years was literally deploying scripts and software to a fleet of machines including Macs and windows laptops. Every single install would have something go wrong, every single time.

  • Arcanoloth@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    I’d be surprised if MS Windows came with a C compiler, tbh. But it’d be a bad choice for non-technical people anyway; it’s not exactly a user-friendly language…

    Python would’ve been my choice, but maybe also consider Lua (a lot of games include it as their scripting language, which might be an easy selling point for people)

    • communism@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      The problem with Scratch is that you don’t learn very much about computers with it. When I expressed I wanted to learn programming as a kid, I was directed to Scratch, and the whole time I was like “ok this is fun and cool, but when do I get to the real programming. I want to make an ‘actual program’.” You’d learn about how programming works on a very high level but you don’t learn much about how things work “under the hood” which imo is the fun thing about learning to program.

      The best way I can articulate my goal is like how it feels to watch an edutainment video (think VSauce/Veritasium/Numberphile/etc)—you get a peek at some topic you didn’t know about before and feel you understand how the world works a bit better. It’s not the same thing as training someone up to be an expert, i.e. I’m not trying to turn these people into programmers (though if they’re interested enough they can of course go away and pursue that in their own time).

      • a_jackal@pawb.social
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        I’d also recommend something like scratch. If these people are non-technical as you say, they might not understand the concepts of directories on a computer, zipped files and so on. You’d be risking spending your teaching time troubleshooting the setup process and losing their interest before they ever get to write a line.

        Of course that’s just based on how I interpreted your post, you know best their potential skill level.

  • BassTurd@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Python 100%. It’s the most human readable and easiest to pick up, especially for a non tech person. It’s easy to setup contrary to what I’ve read in the comments. Go to python.org install the latest version and that’s it. The downloader includes Idle so no other ide is required, but I’d consider vscode as well. Either watch an install video or better yet do it yourself before going to class.

    I think you need to highlight the differences between OSs when it comes to setup if you plan on having a mixed environment of systems. It will also affect the code you write, so to be thorough, you’ll need to cover those differences as well.

    Don’t go low level like C. These people will die the first time they have to compile in terminal.

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      You should read the Python documentation for how many ways there are to set it up. It’s not easy. It might be easy for a pro, but for a beginner it will be a nightmare. Python’s own documentation is thousands of words long for how to get it running correctly, it’s the exact opposite of what you want for beginners. And no it’s most definitely not the most human readable. They call it Ruby Prose for a reason.

      I’m not here to have a flame war over Python vs other stuff, but I’ve used both professionally for over a decade. Python is good at stuff, but being human readable by beginners and having good tooling are not even in its ballpark. It has syntax unlike any other modern language and its tooling is shite. https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/

  • WolfLink@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Mac is very similar to Linux in that it comes with bash (these days zsh) and a lot of the command line tools you’d expect on Linux, including gcc and python3 installed by default. You’ll want them to have a decent text editor with code coloring. Sublime is what I was taught to use in university.

    Windows is more difficult. The command line is very different (it inherits from DOS instead of Unix like both Mac and Linux). It doesn’t come with Python pre-installed. I’ve generally installed git-bash when working on Windows. There are some Python libraries that work fine on both Mac and Linux but have issues on Windows.

    You could look into VSCode which is a decent IDE that works on all platforms. Of course, an IDE can be a bit of an information overload for a beginner, especially something like VSCode that’s constantly pushing AI features and plug-ins.

    • pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Mac is very similar to Linux in that it comes with bash (these days zsh) and a lot of the command line tools you’d expect on Linux, including gcc

      No it doesn’t.

      The gcc command is a wrapper for clang, and the clang command is a stub that runs an executable used to install the “Xcode Command-Line Tools”

      It also uses the BSD coreutils, rather than the GNU coreutils present on most Linux distros. The two are only compatible up to functionality defined by the POSIX standard, and anything beyond that is an inconsistent mess.

      Windows is more difficult. The command line is very different (it inherits from DOS instead of Unix like both Mac and Linux). It doesn’t come with Python pre-installed

      If you limit yourself to not using WSL, sure. WSL 2 runs an actual Linux kernel with the same Linux executables you would find on any other distro.

      It’s still Windows and full of telemetry and AI garbage nobody wants, but it somehow manages to have better Linux compatibility than macOS.

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Python.

    • It’s pretty easy to get going.
    • the debugger is very good. Being able to put a breakpoint and interactively fuss with it is so much better than print statements and crying
    • you can (and should) use type annotations, but they are optional
    • it’s on most machines already, but you don’t want to fuck with the system install of it. On Linux and Mac you can use pyenv or similar if the system came with a version you can’t use. (Don’t teach anyone python 2.)
    • the standard library is very good.

    You could also do JavaScript, as that’ll work on any modern browser. However, JavaScript is a deeply cursed language. It’s really bad at like every level.

    I don’t recommend it unless your top priority is “it is definitely available everywhere” and “these are future web developers”.

  • ☆ Yσɠƚԋσʂ ☆@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    I would suggest taking a look at Scheme or Clojure for somebody who has no development experience. The big reasons being that these are high level languages so you can focus on learning the actual concepts without all the incidental complexity of imperative languages. Scheme in particular was designed as a teaching language. The other aspect is interactivity, Lisps have a tight integration between the editor and the REPL and you can evaluate functions as you write them. This is incredibly helpful for learning as you can write a function, send it for evaluation, and see the result immediately. So you can play with code and get an intuition for how things work.

  • bradboimler@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    I suggest having your students install IntelliJ IDEA and using Java. A full blown IDE might be much but I can’t think of an easier way to install a JDK and an editor suited for it.

    • communism@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      That might be a good idea actually. I think Java’s a good balance of demonstrating a variety of programming concepts (I think Python obscures too much that would be good to learn about for a beginner), and telling them to install IntelliJ should be straightforward enough without needing to babysit too much the install/setup process.