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?
Ada programming language. Check alire
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
Python
It’s an amazing scripting language, and my goto for writing automation scripts.
It’s the most lenient of the 3 with dynamic typing and managed memory. It’ll let you learn the basics of reading / writing / running code as well as basic control flow and logic
C is also great to learn, as it teaches you how computers work at a fundamental level, but it’s more stuff to learn up front, and can lead to some very difficult to fix bugs
Java is good as an “application” language. Being memory managed like Python, but statically typed like C. Static typing makes it easier to manage larger code bases
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.
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
gcccommand is a wrapper forclang, and theclangcommand 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.
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.
I mean yeah but I don’t want to sit through instructing people how to set up WSL. I’ve only done it once years ago so maybe it’s simpler now—I don’t remember it being hard for me but for the average person I can imagine them getting confused at some point.
I suppose my setup already has “Xcode command line tools” installed, so gcc works as expected. It’s been a while but IIRC the process for installing the command line tools is pretty self explanatory.
I remember WSL being a whole process to setup, but it’s been a while, and as you might guess, I’m a lot more familiar with Mac than Windows.
What I do know is I had to support a Python project on all 3 OSes and Windows was by far the hardest to get working. We were deliberately not using WSL for that scenario.
Rust
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.
Tbh I think one of the main difficulties of Rust is that it works in ways that are quite unusual if you’re used to other programming languages. So maybe that particular difficulty is eliminated for people who’ve never programmed before, but yeah, I imagine it probably is still not an ideal first language.
Consider providing students with vm. Then you can set up distro however you want, and write short instruction on how to run it and you know that they going to get whatever you want them to have for the course. That’s what i did several times. It helped a lot, because everyone’s pc going to be slightly different, packages, libraries etc.
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)
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.
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.
That’s a really interesting suggestion. I’ve not used either. I had the impression that those languages are kinda esoteric, but maybe I’ll have a look.
While they’re far from mainstream, they’re definitely languages worth learning. And I’d argue that learning functional style first gives you a much better intuition regarding state management which makes you a better imperative programmer as a result. It’s much easier to go from functional to imperative than the other way around.
I mostly work with Clojure myself, and it’s pretty easy to set up with VSCode and Calva plugin. There’s also a lightweight runtime for it that doesn’t require the JVM which is great for a learning set up. You just run
bb --nrepl-serverand then connect the editor to it as shown here. From there on you can run code and see results right in the editor. This is a good overview of what the workflow looks like in practice.Also have some beginner resources I’ve used to train new hires on Clojure.
Introductory resources
- High level overview https://yogthos.github.io/ClojureDistilled.html
- core functions explained visually http://blog.josephwilk.net/clojure/functions-explained-through-patterns.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- Interactive book https://www.maria.cloud/
- Clojure style guide https://github.com/bbatsov/clojure-style-guide
- Clojure macros https://clojure-doc.github.io/articles/language/macros
- Puzzle Based Introduction to Functional Programming https://egri-nagy.github.io/popbook
A deeper dive
Speaking of Scheme, I would suggest Racket, which comes battery included and ready to go in ONE installer. Easy to install on any system, and has a decent text editor/IDE provided. Also, the documentation is great, but can be daunting at first.
Seconded, I should’ve just said Racket really.
My university chose to teach a pure functional lisp-like language without for loops as they very first programming course in the computer science program lol. Everyone who “already knew” how to program in Python/Java/JS/etc hated it (including me at the time) because it knocked us from the peak of the Dunning-Kruger curve into the valley of despair like everyone else.
Took me years to understand the method to the madness and appreciate learning it.
It’s very frustrating to be in a situation where you know how to do something one way, but you can’t do it like that and you have to learn a completely different way to do it. Feeling like a beginner again makes people feel stupid, and most people don’t like that. But it really just means you’re learning a new way to approach problems.
Use Google Collab or another web hosted platform. If you’re unfamiliar Google Collab is a part of Google docs that you can run Jupyter Notebooks on (and it’s free). This avoids the need for anyone to install anything and means you can test materials in the same environment everyone will run against.
Additionally, Jupyter notebooks makes it easy to add markdown, so instructions can be in stylized format and the students can run the cells over and over again to see how the output changes in real time.
Lastly, I would lean towards python, but there are many different languages supported in Google Collab and similar web hosted tools.
I’m currently a college student studying software engineering, so by no means am I a professional (yet at least, lol). Nevertheless, I’ll try to give what input I can.
Afaik and based on my own experiences, windows does not come with a pre-installed C compiler. (Win 11 Home at least) Also, I just honestly wouldn’t recommend C anyways especially if it’s for a non-technical crowd. It’s great once you get the hang of it, don’t get me wrong, but it’s definitely not beginner friendly.
As for a “best choice” it’s of course up to preference, what you’re already familiar with, and what kind of programs you and your class plan on writing. If you want to use a language that can directly translate into a working environment, Python is a very beginner friendly option. If you want something slightly less forgiving, I think Java provides a good balance between having a lot of useful built in functions/methods and having some of the more “strict” (for lack of a better term) rules about syntax (semicolons, brackets, static variables) that you’ll find in other languages. If you’re just looking to teach programming concepts on a surface/conceptual level then honestly something like code.org or scratch is a great option (and it’s where I got my start growing up lol)
As for setting up an environment, again, everyone has their own idea of the absolute best setup, and it’s also probably going to differ at least somewhat depending on what operating system you’re using. For my personal use I’ve mostly been using VSCode just because it’s pretty easy to set up. Definitely worth mentioning though that VSCode comes with plenty of Microsoft Telemetry built in by default so if you want an alternative without that I recommend Code OSS (vscode built directly from source) or VSCodium (vscode but with MS Telemetry disabled and a different default extension marketplace)
The intro to computer science class I took (and am currently an aid for) at university (we used C) did all of their demonstrations using CS50.dev, which is an online environment maintained by Harvard. For the Object Oriented Programming course I took (Java) we used Eclipse.
Again, I’m still a student, so take everything here with a grain of salt. And if anyone sees anything they think deserves clarification/correction please let me know. I’m still learning lol.
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).
Python’s installation part is now improved if you previously install uv.
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.
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/
For a basic setup to learn hello world and basic if/then logic, it’s extremely simple to setup Python on Windows or Linux. For Windows, which I’m guessing every non technical viewer will be using, download the installer and hit next taking the default values. Open idle, type the very human readable, print(“hello world”). Save and press f5. That’s it no complicated setup.
OP isn’t talking about teaching a lesson where any confusing syntax will come into play. They are giving an intro to programming class. That’s all about learning basic programming concepts which is done very easily in Python. You wouldn’t teach a non technical first time programmer a ternary operator or a list comprehension. You’d teach them:
if a == 10: print("a = 10") else: print("a is not 10")and simple for loops
for x in range(10): print(x)I don’t know about you, but to me that’s about as human readable as it gets. No imports required. No extra packages. Just default python install and copy paste and this will work.
There are other languages with minimal setup that can be used. OP could go as far as basic JavaScript in JS fiddle so no setup would be required. The basics of JavaScript are also very easy to read compared to a language like C where explicit typing is required. That can be a difficult concept for people that have never even seen code before. Python and JavaScript soften that blow. Once the concepts of if/then, loops, and functions are grasped it’s much easier to pivot to other languages with more verbose syntax.
I’m not here suggesting that Python is by any means the superior language of the universe, just that it’s a very good option to learn with for it’s entry level simplicity and syntax readability, which I’ve demonstrated.
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”.
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.












