My CS degree was 100% C based; Java shows up in a class about OOP, and our class on Programming Language theory exposes us to Lisp, Java, and Prolog. They used to be Java based and chose to switch back to a C based curriculum around 2007, as well as focusing more heavily on algorithms and data structures while pushing the more "software engineering" type courses in to elective and offering Software Engineering as a specialization on a CS degree.
Joel Spolsky wrote a great article[1] in 2005 that basically says using a massively high level language like Python or Java as the core of a CS curriculum is damaging because the languages aren't "hard" enough. As curmudgeonly as it might sound, I'd be inclined to agree. Even though I rarely write C code anymore (we do everything in Java in our lab), the underlying understanding of memory management that is acquired from having to learn to handle it manually has been invaluable to me as a programmer.
Additionally, C/C++ is the language of UNIX and still the lingua franca of high-performance. Most high-level languages worth their salt will have a foreign interface to dynamically load C libraries; we're in robotics and have to work heavily with ROS/Gazebo as participants in the DARPA Robotics Challenge, and even outside of this a lot of really great tools for mathematical optimization and high-performance numerical analysis are all written in C. I'm one of only two or three people in our lab with the requisite knowledge to be able to effectively hand-roll JNI wrappers, and I don't consider this to be a good thing at all.
It's pretty clear to me that C/C++ aren't going anywhere any time soon, and it's always good to see a CS curriculum that still focuses on C/C++.
>Joel Spolsky wrote a great article[1] in 2005 that basically says using a massively high level language like Python or Java as the core of a CS curriculum is damaging because the languages aren't "hard" enough. As curmudgeonly as it might sound, I'd be inclined to agree. Even though I rarely write C code anymore (we do everything in Java in our lab), the underlying understanding of memory management that is acquired from having to learn to handle it manually has been invaluable to me as a programmer.
Python and Java are great starting languages, especially for the first introductory course. You're really only learning the high level concepts like basic language syntax(Why are there so many semicolons???), program flow control(functions, if, for, while statements), working with computer memory structures, and basic boolean logic. At that point, an easy to understand language actually makes more sense, because the students are working more with the concepts than with the language.
After that, when you're teaching data structures, it's important to know how the memory is allocated and how that can effect your implementation of the structure. C/C++ are good languages because they force students to deal with memory allocation and pointers. They also don't have pre-rolled data structures like python or java, which is important because the goal is to learn how the structures work, not how to use the standard language libraries.
I studied Computer Science at USC and was a student in 2 of Professor Redekopp's classes. Suffice to say that he was a top notch educator and the favorite professor of most students in the Engineering school.
At USC, at least while I was there, 101 and 102 (the class from which these slides are linked) were taught in C++. The Algorithms class used prolog, and the majority of the remaining core CS classes were in Java. All in all, I'm very grateful for the diverse foundation we were provided, it has helped me immensely in my career as a developer.
> Joel Spolsky wrote a great article[1] in 2005 that basically says using a massively high level language like Python or Java as the core of a CS curriculum is damaging because the languages aren't "hard" enough.
There's certainly a value in getting closer to the machine (as C does), OTOH, there's a value in not having a lot of boilerplate cruft between you and the algorithm, which makes something like Python valuable. Really, I think a CS program that exclusively uses any one language is probably robbing students of valuable insight that comes from the different perspectives that working through different languages (particularly, languages from different design paradigms) provides.
My CS class in HS was in C++ (Turbo C++ in DOS mode with the Borland graphics). I'm undecided as to whether it was the best approach. On one hand I appreciate learning it. On the other hand, it makes you think too much about the computer to appreciate the algorithm.
Most C++ implementations of linked lists are bad, including std::list and apparently, this course's.
People misunderstand linked lists so badly, that they actually list the motivation for linked lists as fine-grained growth, as opposed to an array-based list.
The main benefits of linked lists over array-lists are:
* Can put data structures in lists even if they are already in some other data structure. For example, have some ordering between array elements.
* In intrusive style (can find the list links based on the item), can add after that position in O(1).
* In intrusive style with doubly-linked list, can also delete an item in that position in O(1).
Non-intrusive lists are incompatible with having the same O() while also allowing an item to be in multiple data structures simultaneously.
std::list indeed does not allow this, and is almost useless.
It's sad to see this taught incorrectly in courses, too, perpetuating the uselessness of std::list.
Understanding the C++ std containers is almost a complete lesson in data structures. std::set is typically a red black tree, std::unordered_set is a hash table, etc. Looking at how these containers are implemented and understanding how/when to use which really separates the men from the boys when it comes to scaling and efficiency.
You can probably learn the concepts from other languages, but it's been my experience that C++ devs typically understand these concepts more so than most.
Actually, I'm glad that C++ has been my first programming language. Its syntax is pretty straightforward, and it's even better to work with when you've got extremely clear guidelines set up – at my university (UPC BarcelonaTech) we had a course PRO1, where you got seriously punished if you used spaces instead of tabs, or if you set 2 as your tabstop, or if you used goto, to name a few. Now I cannot say that I share all those guideline rules, but at least I understand what a good C++ code style is.
I attend Texas A&M University, and maybe it' just because Stroustrup works here, but all of my programming classes are C++ based. I have to learn Haskell this upcoming semester, I'm slightly worried about that!
Michael Crowley's a great professor and a swell dude. His Operating Systems class is also a great crash course that forces you into C programming competence.
I don't know what the fuss is about with java and python.
It was really beneficial in school to work on large java projects where we were exposed to eclipse, svn, log4j, junit, jdbc, etc. It was unbelievably useful going into my job. On the other hand, we used C when we were studying something low-level like thread communication or operating systems. C/C++ absolutely has its place in the college cs curriculum as do java and python.
Just for some context, USC starts intro to CS with C++ and then does Data Structures in C++, then switches to Java for more advanced OOP. Upper division classes are usually in Java or C++.
I'm taking C++ (almost through with the beginning semester) after basically being self-taught in python, js and php. It's interesting, and I can definitely appreciate how it teaches you fundamentals in a way higher languages don't necessarily. Sort of like learning to drive stick when all you've known is an automatic.
I once tried to code an assignment involving TF-IDF on a corpus of docs. It ran blazingly fast compared to python.
But was debugging segmentation faults until the last minute.
Learning C++ was the best. That course is just missing the Algorithm Analysis which mine had along with Data Structures, all C++ and no #includes allowed.
[+] [-] dljsjr|12 years ago|reply
Joel Spolsky wrote a great article[1] in 2005 that basically says using a massively high level language like Python or Java as the core of a CS curriculum is damaging because the languages aren't "hard" enough. As curmudgeonly as it might sound, I'd be inclined to agree. Even though I rarely write C code anymore (we do everything in Java in our lab), the underlying understanding of memory management that is acquired from having to learn to handle it manually has been invaluable to me as a programmer.
Additionally, C/C++ is the language of UNIX and still the lingua franca of high-performance. Most high-level languages worth their salt will have a foreign interface to dynamically load C libraries; we're in robotics and have to work heavily with ROS/Gazebo as participants in the DARPA Robotics Challenge, and even outside of this a lot of really great tools for mathematical optimization and high-performance numerical analysis are all written in C. I'm one of only two or three people in our lab with the requisite knowledge to be able to effectively hand-roll JNI wrappers, and I don't consider this to be a good thing at all.
It's pretty clear to me that C/C++ aren't going anywhere any time soon, and it's always good to see a CS curriculum that still focuses on C/C++.
1: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...
[+] [-] cube13|12 years ago|reply
Python and Java are great starting languages, especially for the first introductory course. You're really only learning the high level concepts like basic language syntax(Why are there so many semicolons???), program flow control(functions, if, for, while statements), working with computer memory structures, and basic boolean logic. At that point, an easy to understand language actually makes more sense, because the students are working more with the concepts than with the language.
After that, when you're teaching data structures, it's important to know how the memory is allocated and how that can effect your implementation of the structure. C/C++ are good languages because they force students to deal with memory allocation and pointers. They also don't have pre-rolled data structures like python or java, which is important because the goal is to learn how the structures work, not how to use the standard language libraries.
[+] [-] twrkit|12 years ago|reply
At USC, at least while I was there, 101 and 102 (the class from which these slides are linked) were taught in C++. The Algorithms class used prolog, and the majority of the remaining core CS classes were in Java. All in all, I'm very grateful for the diverse foundation we were provided, it has helped me immensely in my career as a developer.
[+] [-] dragonwriter|12 years ago|reply
There's certainly a value in getting closer to the machine (as C does), OTOH, there's a value in not having a lot of boilerplate cruft between you and the algorithm, which makes something like Python valuable. Really, I think a CS program that exclusively uses any one language is probably robbing students of valuable insight that comes from the different perspectives that working through different languages (particularly, languages from different design paradigms) provides.
[+] [-] rayiner|12 years ago|reply
[+] [-] Peaker|12 years ago|reply
People misunderstand linked lists so badly, that they actually list the motivation for linked lists as fine-grained growth, as opposed to an array-based list.
The main benefits of linked lists over array-lists are:
* Can put data structures in lists even if they are already in some other data structure. For example, have some ordering between array elements.
* In intrusive style (can find the list links based on the item), can add after that position in O(1).
* In intrusive style with doubly-linked list, can also delete an item in that position in O(1).
Non-intrusive lists are incompatible with having the same O() while also allowing an item to be in multiple data structures simultaneously.
std::list indeed does not allow this, and is almost useless.
It's sad to see this taught incorrectly in courses, too, perpetuating the uselessness of std::list.
[+] [-] zerohp|12 years ago|reply
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] dnautics|12 years ago|reply
[+] [-] 16s|12 years ago|reply
You can probably learn the concepts from other languages, but it's been my experience that C++ devs typically understand these concepts more so than most.
[+] [-] appplemac|12 years ago|reply
//
Actually, I'm glad that C++ has been my first programming language. Its syntax is pretty straightforward, and it's even better to work with when you've got extremely clear guidelines set up – at my university (UPC BarcelonaTech) we had a course PRO1, where you got seriously punished if you used spaces instead of tabs, or if you set 2 as your tabstop, or if you used goto, to name a few. Now I cannot say that I share all those guideline rules, but at least I understand what a good C++ code style is.
[+] [-] deadfall|12 years ago|reply
Stanford - Abstractions and data structures C++
http://see.stanford.edu/see/lecturelist.aspx?coll=11f4f422-5...
Edit:
The only thing that takes a little research is tracking down the C++ libraries that coincide with the class.
[+] [-] elteto|12 years ago|reply
[+] [-] mhaymo|12 years ago|reply
[+] [-] minimax|12 years ago|reply
[+] [-] fsck--off|12 years ago|reply
[+] [-] bowmessage|12 years ago|reply
[+] [-] davvid|12 years ago|reply
[+] [-] capkutay|12 years ago|reply
It was really beneficial in school to work on large java projects where we were exposed to eclipse, svn, log4j, junit, jdbc, etc. It was unbelievably useful going into my job. On the other hand, we used C when we were studying something low-level like thread communication or operating systems. C/C++ absolutely has its place in the college cs curriculum as do java and python.
[+] [-] 1O0101ll100O|12 years ago|reply
It's gotta be easier to just start with c++ and run with it.
[+] [-] michaelrbock|12 years ago|reply
[+] [-] krapp|12 years ago|reply
[+] [-] mhaymo|12 years ago|reply
[+] [-] zenbowman|12 years ago|reply
[+] [-] shreeshga|12 years ago|reply
[+] [-] jmt7les|12 years ago|reply
[+] [-] HNLogInShit|12 years ago|reply
[deleted]