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?

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    9 hours ago

    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.

    Honestly, as much as I personally despise it as a language and as much as you probably shouldn’t use it for large applications, JavaScript.

    If ease of setup and platform compatibility are your absolute top priorities, nothing beats it. Every mainstream OS runs JavaScript, and it’s already pre-installed in the form of a web browser. On any desktop system (and even mobile systems with some effort) you can use any text editor to write an HTML file with inline JavaScript and run it by just clicking it.

    Python, the next best option IMO, still requires knowledge of how to use the command line, and on Windows, requires installation that is slightly more involved than installing a regular program (adding it to your PATH, etc). Python for beginners are also limited mostly to console apps, and making a GUI is much more difficult especially for new programmers. Again, you’d first have to teach them what a console even is and how it’s actually still used by developers and is not a relic of the DOS days (something I’ve noticed non technical people tend to assume, they think GUIs made consoles obsolete). JS on the other hand is literally made to create GUIs on the web, meaning they will be able to create the kinds of software they’re already used to interacting with, which is both easier for them to wrap their minds around and also more enticing. Someone with no technical experience might wrongly assume that a text only interface is like “training wheels” and what they’re learning doesn’t apply to “real” software.

    More importantly, they will be able to show off what they built to their friends, without needing them to install anything or send source code or executables which can get blocked by social media filters. Services like Netlify will host your static pages for free, making sharing their work as simple as posting a link. Having a GUI is even more important in this regard, so they don’t have to walk their friends through how to use a console app when they barely understand it themselves.

    JS in the browser also has the benefit of being in a sandbox, meaning they can’t easily interact with other parts of their computer like files or system configurations. This may seem like a disadvantage but for someone just learning what programming is, it’s reassuring that they can’t accidentally kill their OS or delete their files.

    However, keep in mind that JS is pretty infamous for teaching bad habits that will have to be un-learned when switching to other programming languages (and so does Python TBH, though to a much lesser extent). It really depends on what kind of developers you want them to be by the end of this. For people just looking to casually make some interesting software they can show off to their friends, JS is probably the easiest way to do it. If this is meant to be the start of a path toward becoming actual professional developers, Yogthos’s suggestion of Clojure or Scheme is probably better because those languages will teach much more rigorous programming and software design practices from day one.