4 ms·
I agree with meatbundragon's comment "learn whatever you need first", but for a computer science degree program, I've held the opinion for a decade that student
by vortico 8y ago
I agree with meatbundragon's comment "learn whatever you need first", but for a computer science degree program, I've held the opinion for a decade that students should learn Python first to get a feel of how humans should think and then C in their second year to learn how computers think.
Assembly is too niche for all students to learn it, and Java/C# are each too isolated from other environments, whereas C is behind most everything we use and teaches you about linking/compiling more than any other environment. After students are comfortable with Python and C, they or their program can choose whatever they find fit for their goals.
- pjc50 8y agoAssembly is not that difficult if you pick a suitable target and environment - possibly a virtualised one for early learning. Make sure you can single-step cleanly. And this is really how computers "think", while C is full of traps that fall between the language abstraction and the compiled realisation. (The book "C traps and pitfalls" remains one of the most instructive programming books I've ever read, and more languages could do with one)
- vortico 8y agoC is a good enough approximation to the level students need. Many will never use or even think about assembly again, especially on the architecture they happen to be taught, but most will use some derivative of C syntax and semantics. For the 25-50% that will, sure, that'll be a good third language, but remember that most will develop web frontends or industrial logic for the rest of their life.
- bernardino 8y ago> Many will never use or even think about assembly again, especially on the architecture they happen to be taught, but most will use some derivative of C syntax and semantics. This is deems true in my case. At my community college, I took a lower division Computer Architecture course, also known as Computer Organization and Assembly Language, a year or two ago and I recall little from it unfortunately. Yet, I still go back to the practices I learned from taking a course in C.
- MarkMMullin 8y agoI like your reasoning - as an old Smalltalk hand I'd love to replace Python with Smalltalk, but Smalltalk's shrinking ecosystem is making it too niche
- vortico 8y agoI use and enjoy dozens of scripting languages including Smalltalk and Python, but colleges need objective reasons to teach a certain language, and the popularity and applications of Python can't be beat.
- Certhas 8y agoIs that really true though? Looking at performance optimizations that people do, understanding C is a minimal part of understanding how computers work. It's sort of a codified fiction masking a much more complex reality. C ignores the complexities of the cache hierarchy and register allocation and IPC extraction. If I code in a garbage collected language I can ignore one more complexity. But C is closer to Java than to the ALU. Maybe learning LLVM IR would be more useful than either, as it will me allow to debug/reason about the performance impact of the abstractions of many languages backed by LLVM.
- vortico 8y agoFor the 25-50% that need it, sure, those would make good third or fourth languages. My point is that Python and C should be the first two, not the only two languages they learn in college. My reason for recommending C is to get an overview of what "writing for the computer" feels like with complex data structures, not memorizing the Intel x86_64 manual. Would you expect 100% of CS students to be prepared to learn cache hierarchy and register allocation in their second year? I know a few CS graduates that somehow didn't manage to learn single a programming language (to fizz-buzz level), even in state universities, not talking about community colleges. I think we should step back and look at what all students need, not only the advanced ones.
- skate22 8y agoIm sorry but if someone graduated with a CS degree and can't write an if-else, the teaching was not the problem. I knew a few people like this, but they had to cheat their way through & do 0 work on team assignments. Students need curiosity & motivation to get to the fiz buzz level, not a specific intro language
- vortico 8y agoAnd then there are those that legitimately try really hard but still have difficulty with control flow logic and algorithms in their second year, so this is what they should be taught. You can't just ignore them. Skipping ahead to cache access, instructions, and registers in just their second year leaves them behind. There's tons to learn about programming in two years for even the best students that doesn't require intricate knowledge of the machine. Assembly is just not realistic for the majority of sophomores. Additionally, it would be a disservice to teach languages that don't align with industry attention. C is used perhaps 4 orders of magnitude more than LLVM IR.
- keithnz 8y agoI think a good exercise is to build a CPU/Micro simulator in a more modern language. Followed by writing a compiler (for an uncomplicated language) to target that CPU. Should teach you most of what you need to know. I remain reasonably agnostic to what language people should learn first, whether it be C / Java / C# / Python / <some other language>.
- bernardino 8y agoI definitely agree. I took C first then Python. Where I took the courses, the C course was an intermediate programming course while the Python course was an introductory to programming course (I think this the case for many colleges, not entirely certain). Python, personally, seems like such a good introduction to programming language because the syntax seems so English-like. But otherwise, at my community college, after one takes the C course they usually go on to take a C++ course then a Data Structures course where the majority, if not all, the students use C++. All these courses being lower division. I find it's a good skillset to have: Python for scripting, backend, and frontend with Django. C/C++ for other purposes I'm not entirely aware of, maybe if you like working with video games, browsers, operating systems, etc. Then a proficient understanding of HTML/CSS doesn't hurt, and anyways web development is pretty darn fun since designing and playing with things is cool. Those are my tools, or at least I like to think those are my tools: Python, C/C++, HTML/CSS. Given what I mentioned above and the courses I have taken, I still don't feel like a programmer though. I mean you could give me a basic problem and I can probably write a simple, elegant solution in five hours or so but I'm going to have to look at the documentation or Google how to do some specific task. It might be that I've only taken lower division courses or only built stuff following tutorials online (Treehouse, etc), but I still don't feel competent and because of this, I've been thinking about finishing my degree in computer science but moving into product management as a professional job. I'm definitely going to try to program daily though.
- pferde 8y ago> [...] I still don't feel like a programmer though. I mean you could give me a basic problem and I can probably write a simple, elegant solution in five hours or so but I'm going to have to look at the documentation or Google how to do some specific task. It might be that I've only taken lower division courses or only built stuff following tutorials online (Treehouse, etc), but I still don't feel competent [...] What's wrong with that? If you are able to develop working stuff by yourself, with help of documentation and WWW, it's perfectly alright - those are the tools you will usually have in the real world anyway. You can't keep all the details for various topics, or different library APIs in your head anyway.
- 8y ago