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?

  • comfy@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    38 minutes ago

    If there’s no specific use-case (this is a general introduction, not Intro to Operating System Design) and this isn’t academic Computer Science teaching, then certainly a scripting language.

    Easy to learn, easy to use, and much more applicable for simple automation that benefits the people learning.

    C is dangerous if someone doesn’t take care. Java is verbose and personally I didn’t enjoy it one bit. You said this is a non-technical crowd and you expect them to follow at home.

  • GnuLinuxDude@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    2 hours ago

    Since you said non-technical I definitely recommend Python. It is easy to install and easy to get going with. It is feature ful. It is generous. You can do really interesting things without sweating details like pointers and segfaults.

    If this was a technically minded crowd, especially students like in high school and in person, I would have said C

  • jobbies@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    46 minutes ago

    JS. Not a programming language but it is widely used for teaching purposes.

    All you need to get started is Notepad and a browser and it was designed to be similar to C-based languages.

  • greenbelt@lemy.lol
    link
    fedilink
    arrow-up
    6
    ·
    2 hours ago

    python.

    Its standard library is way better than lua in getting things done on your system. Imho a programming language that does not need internet-connection to a package manager to be useful is a big win.

  • lefixxx@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    12 hours ago

    python or lua

    i loved learning on lua, it is a little better to learn than python (less keyword, “end” instead of }, 1-index, less types) but python is waaay more prominent

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    21 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.

    • flubba86@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      1 day 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).

  • Bobo The Great@startrek.website
    link
    fedilink
    arrow-up
    21
    ·
    edit-2
    1 day 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
      1
      ·
      6 hours 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.

    • communism@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day 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
        4
        ·
        24 hours 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.

  • presoak@lazysoci.al
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    1 day ago

    Python, definitely.

    It’s easy. Succinct. You can use any text editor. Has a huge community. Huge library.

  • Sunsofold@lemmings.world
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    Depends a bit on how much depth and which topics you want to hit. Scratch is easy to grasp and won’t require any real effort to set up, but may make adults feel like they’re being condescended to with its cartoony aesthetic, and might be a bit limited in how impressive you can make your demo. Python would require a bit of ‘teacher’s planning time’ to set up an easy workspace in Google’s collab tools and design a lesson, but could be used to show more depth if the students are the type to want/accept that depth, but don’t mistake interest for readiness.

    Time might also be important to consider as well. If you have only the one session to cram things into, it might not be a great idea to go deep, and definitely would be asking for trouble to try to install anything on all those machines. Non-technical people have a knack for finding the holes in your plan or taking far longer to do something that requires them to act individually, which leaves you scrambling to try to play remote tech support for the 5-50% who need it while the people who ‘did it in one’ get bored.

    And first things last, Murphy’s Law always applies to presentations. Just ask anyone at defcon. Even for people who are so tech-y they are teaching other tech people about tech, the demo might work 37 times the morning before your presentation, but it will fail on the 38th because that’s when you’re in front of the audience. Minimize your attack surface. When you are limited to one session, leaving them with a good, inspiring message that makes them want to keep learning is better than trying to info dump.

    Good luck.

  • Arcanoloth@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    1 day 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)

    • Destide@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day 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.

    • Machinist@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day 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.)

  • ☆ Yσɠƚԋσʂ ☆@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 day 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.