5 ms·
I do not know any Python (yet) - and my comment is probably off-topic. I spent a fall semester at Northeastern U, Boston in '97 and took a graduate course in Da
by hans0l074 12y ago
I do not know any Python (yet) - and my comment is probably off-topic. I spent a fall semester at Northeastern U, Boston in '97 and took a graduate course in Data Structures which was taught in C. I loved this course and finished top of the class (It helped that I was already familiar with C from an undergrad engg course). I fell in love with C. Implementing dequeues, linked lists, trees etc. with C was a pleasure - I learnt a lot about memory management responsibilities, smart error handling and began to understand how programming can be beautiful. Many years later when I started learning and working with Java, I felt that if this course had been taught with Java, I would not have gained as much (I could be wrong). The simple steps of typing your code in the standed editor supported by the environment (we were using a flavour of Unix in school), saving your work, compiling on the CLI and seeing the results - we just had to focus on our algorithm and nothing else. Your sentence "Many of our students have never programmed with a text editor before our unit, and dropping them into the big boilerplate world of Java micro-management was not good for them or for the course" stands out for me in this context. Since I know zero Python, I wonder how it compares. This reminds of Joel Spolsky's essay : http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...
- candeira 12y agoOur unit is a first year unit, and runs for twelve weeks. This means that we have ten weeks to take people who may have never programmed by typing text into an editor and teach them enough CS and programming that they can implement their own hashmap in Python and reason about its big O performance in one week, start programming in MIPS assembly the next week, and implement function calls in assembly and reason about stack frames the following week. Anything we can do to make their learning curve less steep is good. You say that your Data Structures course was graduate level, and that you were already familiar with C from a lower course. These are two big differences between you and our first year intake. Now, like Spolsky, I too have a bit of the Yorkshireman in me, and I wish our students would be forced to work with simple text editors and the command line, instead of having the IDE to do some of their lifting for them. I wish they were taught more maths too. And spelling, now that we are at it. And C, why not. But when you say that in your course you "just had to focus on our algorithm and nothing else", it echoes exactly our intention when we picked Python for this unit. We wanted the language that would allow our students to focus on the fundamentals, and spend the least time and effort on the incidentals. We were already running the unit in Java, which was an inherited decision. I think Python was the best of our available choices.
- Goladus 12y agoI've commented before in a variety of places that if I were to design a first-year curriculum that would have suited me best, it would start with python in much the way that is discussed in this thread, focusing on the concepts and algorithms and general concepts of coding. But the next course would be a hardcore introduction to C, embracing the language peculiarities instead of shunning them and trying to stick to concepts. I think at least once in an undergrad's career, preferably sooner than later, they should go through the process of learning the nuts and bolts of C. I've probably been doing my own thing for too long to know for sure whether C is still the best choice, all I know is that NOT having the sort of class I describe, early in my college career, made things far more difficult later on.
- aninhumer 12y agoIndeed, I'm surprised by how often people make arguments that seem to assume the only options are C from the start, or no C at all. When you're teaching systems programming, all the things that have to be done by hand in C are precisely the things the students are supposed to be learning. But for almost everything else, they're pointless details that obscure what you're actually trying to teach. Teaching multiple languages also has the advantage of showing people how they're mostly not that different.
- candeira 12y ago> When you're teaching systems programming, all the things that have to be done by hand in C are precisely the things the students are supposed to be learning. But for almost everything else, they're pointless details that obscure what you're actually trying to teach. Exactly.
- aganders3 12y agoI had a course kind of like this. My intro CS class was taught in Java, and the following summer or semester I took a 1-credit course called something like "C (and C++) for Java Programmers".
- sand500 12y ago
- zo1 12y agoMost of that article is rendered moot with this section: "Now, I freely admit that programming with pointers is not needed in 90% of the code written today, and in fact, it's downright dangerous in production code. OK. That's fine. And functional programming is just not used much in practice. Agreed. But it's still important for some of the most exciting programming jobs." Pretty much saying that everything he just spoke to us is purely for the "exciting programming jobs". And let's face it, most of us do not have that unless we go out of our way to pigeon hole business problems into being fun and exciting.
- gaius 12y agoYes it's funny, these places are teaching Python for the same reason they taught Java: it's "easy" and will get you a job. Yet we slate Java-schools, and cheer Python because it's trendy. The truth is, universities shouldn't care what industry does, because "real-world" computing is more about fashion than it is about any sort of science. And if you do it right people can learn any language they need (case in point, I learnt FORTRAN at college, now I do Python for a living and OCaml as a hobbyist).
- deleted 12y ago[deleted]
- Goladus 12y agoYes it's funny, these places are teaching Python for the same reason they taught Java That's not what I'm seeing at all. What I'm seeing is discussion of specific traits about Python that make it especially suited for a beginner language. And I'm seeing these arguments made over and over and over again, convincingly, in a way that was NEVER done for Java.
- sourc3 12y agoIf these Python classes were given to an industrial engineer or a chemistry major who just needs enough programming knowledge to crunch numbers/create scripts I would definitely get the approach and agree with it. However, if you want your Computer Science majors to be able to create the next runtime like the JVMs, .NETs etc. or be able to do some device programming they need to learn C/C++. A decade after going through a top-tier CS undergraduate program what saddens me is that a lot of university students today, think that Computer Science is cobbling github sourced code with their choice of scripting language. Yes, the startup market is hot and sometimes that's all you need but CS is much more than that. CS is about understanding the underlying models and concepts rather than a language. If you are totally missing how memory management is done, how data structures are laid out in memory, how typing works you are missing a big chunk of code-base out there in the world today. I think the new wave of CS students, who are expected to solve larger problems, need to understand how billions of devices/apps are running in today's technology so they can create something better in the future.
- hnriot 12y ago"we have ten weeks to take people who may have never programmed by typing text into an editor and teach them enough CS and programming that they can implement their own hashmap in Python" that seems utterly pointless to me.
- Goladus 12y agoMaybe, I'd have to see the actual class. Remember that if this is a 4-year curriculum, they may eventually be expected to write code for a hashmap in C or some other low-level language as part of a data structures or algorithms class. And often, a class like that will spend time on analysis and algorithm design tradeoffs. The best way to understand why accessing a hashmap can be done in O(1) time is to actually code one for yourself. This may simply be a preview.
- candeira 12y ago> they may eventually be expected to write code for a hashmap in C or some other low-level language as part of a data structures or algorithms class (...) > This may simply be a preview. No, this is it as far as the core units go. This is the first course on data structures and algorithms. There is a second year course that deals with further data structures and algorithms: we teach amortized performance, proofs by induction, some randomized data structures (skip lists and maybe another), different tree-based structures (I remember red-black trees and patricia trees), some graph search algorithms and a bit more than I forget now. And currently we are doing it in Python for the first unit, and in any language that the student and their tutor can agree on for the second unit. Remember: these are just class exercises, not real implementations. Of course nobody is going to write actual functioning data structures in Python[1] and expect them to be usable for general purpose programming[2]. That would be daft! [1] https://bitbucket.org/pypy/pypy/src/8920909d084ec0d42535b955350de5ad32aa01d3/pypy/objspace/std/dictmultiobject.py?at=default https://bitbucket.org/pypy/pypy/src/8920909d084ec0d42535b955... [2] http://pypy.readthedocs.org/en/latest/ http://pypy.readthedocs.org/en/latest/
- pwang 12y ago