I think JavaScript and web app development will be among the first programming jobs to be eaten by LLMs, and it's already a crowded field. I'm skeptical of that being a wise career move for newcomers today.
I've studied with (now) engineers and there is large portion of people having a hard time with even the concept of a function. We learned C(++) at the time. I guess being forced to learn about what the hardware does kinda messed with people being able to just think about algorithms. As a first programmig language to just write some basic functions I like Python, but to be honest I don't understand what's going really going on behind the scenes either. But C is a really solid choice, as what's really happening is easy to reason about (at least unoptimized) and every other language will have to abstract these same concepts.
JS for sure.
It has a reputation among programmers as being a bit of a mess, but I think the reasons behind that reputation are largely irrelevant to your use case.
Basically:
- It has some bad decisions about basic stuff, like truthiness, equality, coercion. But those aren’t major stumbling blocks, really. When they run into those situations, they’ll probably already be aware that they’re trying something weird and won’t have the same already-developed intuition about “how it should work” that many of us are bringing to the table.
- Production deployment can easily turn into a Rube Goldberg machine. I think this is mostly what the kneejerk “really? JS?” response is about. Different ES versions, module systems, WASM, dependency hell, transpilers on top of transpilers, and a billion different runtimes. And the fact that everyone and their grandma apparently wants to build a custom DSL on top of JS that requires additional transpiler plugins or codegen steps. But your students won’t have to worry about that shit. Just pick one environment and do that. Maybe warn them that stackoverflow might use different syntax (require vs import) or try to import stuff that doesn’t exist in their environment though.
My high school AP computer science course in the ealry aughts taught C first.
My school didn't have a course, but the test was entirely in Java.
C would have been a lot more useful.
So, of the two JavaScript, because motivating them to program is more important than anything else if they have no prior knowledge. javascript has great tooling and faaar less hurdles to get something going then C. Personally i'd go with TypeScript if it has to be anything in this family of languages, because making them think of types early on is helpful when moving to anything more than little web apps. If any other languages are considered, i'd go with python with type hints because it forces you to format your code somewhat readably (believe me, i know that it's possible to write unreadable python code) but is really low on boilerplate, has great tooling (at least third-party, use uv) as well as stellar IDE support and allows for multiple different paradigms to be explored.
I'd start with logic, infrastructure and design first. Once that is locked in they can use any language to move forward as it's only syntax you need to learn once your logic and design is solid. I'd offer them a choice of three different languages to achieve the same end result of the assignment. This shows them the importance of logic and design and the transference of skills.
Let them learn what they’re interested in so long as it passes muster as capable of sufficiently handling the concepts you wish to convey. Some will want low level, some will want an app, some will want to make games. The cross pollination of concepts will demonstrate that while languages may have individual benefits they should not stop at one.
TypeScript > JavaScript all day
Maybe a middle ground like Go.
Why not SmallBasic then? You could even point them to old computer magazines and see which codes they can get running without much workaround.
If you're wanting to teach programming concepts, I would start with scratch instead. This can be taught to little kids or older students. It's what the free comp science class from Harvard starts with
I would go for something like Processing for students who are just trying to learn a bit of programming as an extra credit. The JS implementation is called p5.js. I would introduce a little bit of C later in the course once the students are familiar with basic programming concepts. That way you can show them what is happening behind the scenes without overwhelming them from the start.
Go(lang)
C and python simultaneously.
Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev