Should I teach students who doesn't know computer science C or JavaScript first?
Should I teach students who doesn't know computer science C or JavaScript first?
The main reason to not including python is that students aren’t particularly in the CS field, they are learning it as their “augmented skill” (I don’t know what it’s called bad English). That’s why I don’t want to force them to learn CS concept which they might not even need.
I was thinking about C so that their fundamentals gets cleared but I think it will be too much for students who aren’t into CS. What do you think ?
If they’re not in the CS field, and you don’t want to teach them CS concepts that they don’t need, then you have eliminated C as an option by your own criteria.
With C, they’ll have to learn about compilers, build systems, memory management, and pointers at the very least.
Python allows you to focus on a single concept in isolation (building on what you’ve already learned, of course). JS has a bunch of other stuff mixed in. Like the DOM. Interacting with the DOM is necessary for any browser code. You can hide it with abstractions and boilerplate, but it’s always going to surface in error messages. Debugging JS can be quite a bit harder than other languages.
Caveat: beginner JS is many years behind me. It may not be as bad as corporate code full of react and angular and all kinds of requirements.
The main reason to not including python is that students aren’t particularly in the CS field, they are learning it as their “augmented skill” (I don’t know what it’s called bad English). That’s why I don’t want to force them to learn CS concept which they might not even need.
That’s an even better reason to pick Python, then.
That makes sense, I am also teaching html amd css first so I think JavaScript makes sense to teach next.
I was thinking about C because that’s the first thing I learned in the college and that’s my favorite language till this day.
The problem with C as a language for learning is that the error messages are not very specific or descriptive and often you need extra context to understand what is happening. Messing up memory management can result in inconsistent gremlin-like behavior from your programs, it can get very tricky. I had a pretty difficult time when I got to classes that taught C compared to other languages, but the main thing was just that I needed someone to look over my work and explain things to me because unlike with other languages, the self-service ways of figuring it out were much more difficult and it’s easier to get stuck with no idea what to look into next. I ended up begging people online for help with understanding what was going wrong with my programs to supplement the limited amount of time the professor and TAs were available, really grateful to those guys as I probably would have failed it otherwise.
Anyway I would just say that if you do really want to go with C, I think you should be willing to put in more time to explain things to students one on one because many of them may need it.
I would say C first. You need to learn the fundamentals:
Many devs don’t know it and they are honestly just clueless about anything they are doing. They just want to make it work.
JavaScript is just too high level, and makes you think you are immune to these low level concepts, but you are not.
And not only that, but also good practices, like:
I’ve been working as a software engineer for years and not once have those “fundamentals” been relevant to the work I do.
If I question their usefulness then I don’t think it’ll sit well with no experience at all.
Hah! You picked the two of your list that I actually do care about.
I don’t know what pointers are. I don’t care about memory allocation. Recursion rarely comes up.
I guess I’m not a proper big-boy programmer 😢
First of all, it’s not my list. Check the usernames of the comments you’re replying to.
Second, you didn’t make any sort of distinction limiting which ones you were talking about before, which means that you expressed that none of them were relevant. You don’t get to move the goalposts and then pretend it doesn’t address your point because of that.
Third, that sloppiness and failure to pay attention is only reinforcing my initial impression.
Calling me out on a clarification when you’re banging on with ad hominem rubbish?
Respond to the point or bugger off.
Respond to the point or bugger off.
Your continuing inability to engage in an even remotely constructive way is really tragic.
Instead of seeing my response as “He takes my point and sees that his initial comment was too broad. We could have a conversation” it just ends up as an opportunity for you to make this community more hostile. That’s so sad.
Hopefully you’re just having a bad day.
Yeah, we could have had a nice conversation, if you had ended your initial reply to me a sentence earlier. But you didn’t, did you? No, instead, you tried to turn your failure to say what you meant around on me as if it were my fault, in an attempt to save face at my expense. Did you really think you weren’t going to get called out on it?
There is only one person “failing to engage in an even remotely constructive way,” and that’s you, not me.
What level are your students (primary school, high school, technical college, university)?
You said it’s not a core skill, so what is their core skill? IT? Machinist? Electronics engineer?
C is an excellent “fundamentals” language that anyone with a software engineering and maybe computer science should have exposure too, but if their programming is purely practical (e.g. scripting for IT?) C is essentially irrelevant.
Javascript is very narrow in scope but if they’re web designers then it’s essential.
I’ll back the other commenters that if they need a language they can do useful things in (e.g. simple automations, calculations), Python is hard to pass over.
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:
I was taught a bit of C and still don’t understand why. I see the use of C but it feels much too low level to be useful for the kinds of things I might want to do.
Python and JS are much more relatable.
Ill counter that by saying that because you started with something more low level, the other stuff was easy (my belief).
Also, depending on what the students are actually studying, I think you need to give an introduction to low level stuff because while some will want to do web dev for example, others might want to do low level stuff. Obviously if its a web dev course you dont want to do that, but if its something like CompSci or Software Engineering then i think having a grasp of the fundamentals of low level stuff is necessary.
Lastly, if its a general introduction to programming course I think C has advantages over other languages since almost everything is done by you, instead of the compiler (for example iterating over an array - C: you need to do the for loop to manually handle the data depending on whatever type is stored in the array - Python: for x in y is sufficient). Im tutoring my little sister in programming because they have it in school, and they use python. Sure its easier to get things done, but its harder to learn/teach general programming with python in my opinion. C would have been my choice, especially since at that level its not like you need to teach/learn memory management, or complex data structures. Its the same concepts as with python (input, output, variables, conditionals, loops, functions) but the syntax just doesnt hide too much frlm you, unlike python
I didn’t find the difference in fundamentals between Python and C to be substantial. C felt similar but more unintuitive and more annoying to work with due to having to compile.
Understanding exactly how the sausage is made didn’t help me in the slightest. It was needless complexity when I already had a lot to digest.
I understand your perspective but for me it was like throwing up countless roadblocks to the point where I lost all enthusiasm for the subject.
It was many years before I tried again, this time with JS and Python.
These days I’m a professional software engineer.
After reading through some of the comments, here is my opinion.
C would be a good language IF you know your students plan to get into IT, specifically a sector where the low level knowledge is useful. Beyond that, I assume your students probably use windows and I personally always find it a pain to work with C on windows outside of full IDEs like jetbrains and Visual Studio. It’s also a lot more work till you get some results that you are happy about. Unless you start with an Arduino, which I find pretty nice to get students interested in embedded stuff.
I don’t like JavaScript because I find it a mess although it is very useful for anything web related.
Given you said in another comment that this is meant to be a general purpose skill for your students I would strongly recommend python. While I dislike the dynamic type system, it is a very powerful language to get stuff done. Also very useful outside of IT as a scripting language for analyzing data in basically any field or for generating nice plots for some document
C on windows outside of full IDEs like jetbrains and Visual Studio
My university used gcc on WSL and it worked fine. VS Code integrates well with it so you can use your VS Code installation on Windows to your code editing.
Probably JS as the fact that every computer has by default everything you need to execute JS. But there is a bunch of browser stuff you have to worry about before you can do anything with it. I’m not sure how you learn JS before html.
With Python you can do simple command line stuff without having to really know anything else. You can learn one concept at a time.
That being said, people have a lot of familiarity with browsers and it might feel less abstract. JS might a better choice for demystifying coding. Python is probably a better choice for accomplishing anything useful.
I don’t know how old your students are, but there is also MIT Scratch.
No way it’s C. The average student will go home and find that they can’t do much of anything they like, with the level of C they know. Even printing a string is famously hard in C, they’ll hate it.
The average students wants to build games, websites, discord bots etc. Javascript makes it easy, none are easy in C.
printf(“hello world!”);
If this is famously difficult to you, I don’t think computer science is your bag.
Yeah it’s not for the students! OP even specifically said they aren’t CS students.
Now start doing concatenation, splitting, replacements, char/string/integer conversions etc. Students will start banging their heads against a wall, a wall that can only be overcome by studying the intricacies of pointers and memory addresses.
I have no reason to believe this is remotely interesting to non-CS students.
I’m glad someone is saying it. I’m a software engineer and someone elsewhere in this thread is giving me shit for not having much use for the low level stuff.
I was teaching a junior about character encoding a couple of months ago (I suspect his CS degree came free in a box of cereal) but most of what we do is build tooling on top of other tooling. I’m not working on bare metal here!
Without knowing anything about your students, it’s hard to say. If I were the student I’d much prefer to be taught C, but that’s because I have an existing interest in computers and a desire to develop systems programming skills. I wouldn’t like to teach JS to anyone because it’s a bad language and I don’t want students to go away making more web 3 slop but if they actively are interested in making web 3 slop that’d be a case for teaching JS. I’m of the pedagogical school of teaching students what they are actually interested in learning. They might not know enough about programming to know which language they want to learn off the bat, but maybe ask them what sort of software they’re interested in making. If they want to make websites, you might want to teach them something like Python with Flask, as something less bad than JS as well as easy enough to learn.
Imo C is a good teaching language as it teaches you a lot about how computers work, as well as the fact that nearly everything runs on C. It is “harder” though, and imo is also for students who are actually interested.