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?
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.
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
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)
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.
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.
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
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.
I’m also going to lean on javascript. It’s practical and if the student produces something interesting, it’s rather trivial to distribute (with minimal risk from sharing).
There are various web-based tools as well, or going old school with locally edited files, the browser is also your debugger.
Creating visual content is easy and there’s multiple options for output that don’t rely on extra code for a full app.
Javascript also has that C-like syntax if you want curly braces and the like.
Python, definitely.
It’s easy. Succinct. You can use any text editor. Has a huge community. Huge library.
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”.
Ada programming language. Check alire
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.
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).







