5 ms·
I have always found it intriguing how Java has been the language of choice to teach Algorithms and Data Structures in many universities. I thought it was impor
by anuragramdasan 13y ago
I have always found it intriguing how Java has been the language of choice to teach Algorithms and Data Structures in many universities.
I thought it was important to understand how the computer perceives these algorithms and data structures, thus making C a much better language to learn these topics. I've found learning that way much more enlightening.
- kasey_junk 13y agoConversely, I did my algorithms & data structures work in a combination of Scheme and MIX.
- anuragramdasan 13y agoMIX again is cool. The more lower level the language is, the better you understand the algorithm. Scheme maybe not so much. DS&Algo is one of the important things that need to be taught in low level languages.
- kasey_junk 13y agoI don't think that is what my experience taught me. Writing in Scheme got to the heart of the algorithms part much faster than MIX. With MIX I spent much more time trying to get syntax correctness than understanding what I was doing. Further doing these things in Scheme has had long lasting benefits when I need to work in a functional programming space. In my experience, going from functional to imperative was easy, my colleagues that had to go the other way seem to struggle more. That said, some data structures & some algos need to be written at a very low level to understand why standard Big O algo analysis can occasionally lead you astray. But I don't think they all need to be.
- a_c_s 13y agoI disagree: the higher level the language, the better one can focus on the algorithm itself rather than getting bogged down in irrelevant details or language-specific details. For example, being able to swap by doing "a, b = b, a" in python allows one to focus on the rest of the algorithm rather than getting bogged down in: "temp = a; a = b; b = temp". Generally speaking, the more lines of code the harder it is to see what the code is doing.
- mathattack 13y agoMy intro course used Modula/2. (Many years ago) We were less focused on the computer interaction (memory) than algorithmic complexity (Big O notation). This doesn't mean one method is better or worse, just what we used. The advanced algorithm coursework was all about proofs, and and had no programming.
- anuragramdasan 13y agoWell usually its either Algorithms course or Analysis of algorithms course. The latter, I presume is the one that you had to take, thus giving more importance to the computations over the implementation, I suppose.
- smackfu 13y agoI took Data Structures in C, before Java became popular in colleges, and I personally felt like we got bogged down in the implementation. Most of the time was spent chasing down missing asterisks and debugging seg faults.
- snorkel 13y agoJava, for better or worse, is also the language of choice for most developer jobs outside of the valley. Learning C is great for understanding how software operates, but doesn't add much value to your resume.
- rdtsc 13y ago> I thought it was important to understand how the computer perceives these algorithms and data structures, thus making C a much better language As for algorithms wouldn't Python, Ruby or Scheme be better? I found that frustrating in my CS algorithms classes. I spent more time fighting with templates, pointers and segfaults than actually learning the algorithms. And no it didn't teach me to be a better C++ and Java programmers, as they didn't bother teaching design principles in those courses. All that was learnt in a separate course or an in labs.
- jlarocco 13y agoI think using C for everything is overkill. At some point keeping track of low level details stops being enlightening and just becomes a PITA. I'm biased, but I think my university took a good approach. In one class sophomore year we had to implement Quicksort and some other algorithms in MIPS assembly language. The rest of our classes used Java or whatever else was installed on the Linux machines in the computer lab. It let us see what was going on under the hood without the tedium of having to do it for everything.