Slashdot Mirror


CMU Eliminates Object Oriented Programming For Freshman

fatherjoecode writes "According to this blog post from professor Robert Harper, the Carnegie Mellon University Computer Science department is removing the required study of O-O from the Freshman curriculum: 'Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti-parallel by its very nature, and hence unsuitable for a modern CS curriculum.' It goes on to say that 'a proposed new course on object-oriented design methodology will be offered at the sophomore level for those students who wish to study this topic.'"

89 of 755 comments (clear)

  1. so the wheels are coming of the OO band wagon then by mjwalshe · · Score: 4, Interesting

    I always thought the obsession with making everything OO when it doesn't suit every type of programming problem was a bad thing - glad to see some one agrees with me.

  2. Re:Hmmm ... by mellon · · Score: 4, Insightful

    I don't know about *starting* in assembler, but a programmer who isn't somewhat proficient in assembler is going to have a very weird mental model of how programs work. OOP has the same problem--it's not that OOP is bad; it's that if you start out with an OOP language, you don't learn a lot of things that are important to understand. Once you know how the machine works, then you can start studying abstraction. Treating OOP as the only way, or even the best way, to solve any computing problem is going to tend to produce programmers who think everything is a nail. It doesn't mean that there are no nails, nor that students shouldn't learn to swing a hammer.

  3. Computer scientists? by DNS-and-BIND · · Score: 5, Funny

    Why are computer scientists even learning programming? When did this happen? Programming sounds like one of those get-your-hands-dirty jobs in flyover territory, where you would show a lot of ass crack on the job and live in a trailer park. Educated people don't do that.

    --
    Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    1. Re:Computer scientists? by Haedrian · · Score: 2

      Not sure whether you're being sarcastic or not, assuming you're not...

      Programming lets you put your mind in a certain 'mindset' which can help you analyse and solve problems, even if you don't actually get your hands dirty in the end.

    2. Re:Computer scientists? by multipartmixed · · Score: 2

      Chem majors do work in chem labs.
      Physics majors do work in physics labs.

      Why shouldn't CS students do lab work?

      --

      Do daemons dream of electric sleep()?
    3. Re:Computer scientists? by WrongSizeGlass · · Score: 5, Insightful

      Why are computer scientists even learning programming? When did this happen? Programming sounds like one of those get-your-hands-dirty jobs in flyover territory, where you would show a lot of ass crack on the job and live in a trailer park. Educated people don't do that.

      They need to be able to program for the same reasons management and engineers need to spend some time on the assembly line: so they can learn how things actually work. There's often a wide chasm between "on paper" and "in practice" and ideas need to be able to traverse it.

    4. Re:Computer scientists? by Platinum+Dragon · · Score: 2

      Goodness forbid an "educated" person get their hands dirty. It is useful to put theory into practice through direct effort, and it demonstrates a proficiency with the practical tools and results that can only lead to better theory.

      --

      Someday, you're going to die. Get over it.
  4. Why remove it? by Haedrian · · Score: 3, Insightful

    I don't see why it should be removed, it should be 'complimented' instead with other programming methodologies in order to let users compare and contrast. But most CS in the end will end up being done with OOP so there's no reason not to start in the beginning - at least that's my personal experience.

    In my first year we had a mixture of different programming types, including functional programming. I never really used any of those, I'm sure there are certain places where Prolog or Haskel is used, but its not as common as an OOP.

  5. Interesting move by bradley13 · · Score: 4, Interesting

    OO is practical for lots of problems, because it makes modelling real-world data easy. However, it is not useful if you want to give students a solid understanding of the theoretical computer science. OO is fundamentally data-centric, which gets in the way of algorithmic analysis.

    To give a pure view of programming, it would make sense to teach pure functional and pure logic programming. If CMU really wanted to concentrate on the theory, they would have eliminated imperative programming from the introductory semesters, because it is very difficult to model mathematically. Apparently that was too big of a step.

    --
    Enjoy life! This is not a dress rehearsal.
    1. Re:Interesting move by Pinky's+Brain · · Score: 2

      Functional and logic programming get in the way of some aspects of algorithmic analysis too ... the hardware is imperative after all.

    2. Re:Interesting move by digitig · · Score: 4, Interesting

      OO is fundamentally data-centric

      Maybe the way that you do it. Personally I find that quite a lot of my classes have methods.

      If CMU really wanted to concentrate on the theory, they would have eliminated imperative programming from the introductory semesters, because it is very difficult to model mathematically.

      Imperative programming isn't really any more difficult to model mathematically than functional programming. They just use different branches of mathematics. Check out David Gries's The Science of Computer Programming for example, which shows how to do it, and Object-Z which actually does it. The main difficulty is with side effects, but functional programming has the same issues as soon as you try to interact with the external world.

      --
      Quidnam Latine loqui modo coepi?
    3. Re:Interesting move by maxwell+demon · · Score: 2

      This is about freshman courses. You are not expected to be finished after the first semester. You are expected to learn the basics you need to know in order to get the most of the courses in the later semesters. For example, in my first semester physics courses, the majority of courses weren't actually physics, and the physics course wasn't very deep. Actually it was more of a math study with a bit of low-level physics added on top. The actual physics came later. After the first semester, I didn't know too much about physics which I didn't already know before; I did, however, know a lot more about the math I needed to understand the physics in the later semesters.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:Interesting move by meburke · · Score: 2

      Most of the imperative languages I have used in the last 45 years have been easy to model, but not easy to prove mathematically at the same level of logic. They invariably needed to be proved in some customized Higher-Order-Language, and many times this was LISP or PROLOG.

      Object-Oriented programming has the drawback of distributing data all over the system, and it tends to obscure the underlying structure of the problem space and the matching solutions. OOP is convenient for plugging completed subsystems into a larger system, and so it can be a boon to good application development. However, a program is simply a set of instructions that work on some data. (An object is still a set of instructions that works on data, but usually the object carries the data or an abstraction of the data within the scope of the object code.) It seems appropriate to me that beginning CS students should be concerned with controlling instructions against different data to learn the effective rules and processes. I would favor assembly and some imperative languages such as Pascal, FORTRAN or C to demonstrate the underlying principles, and then probably a functional programming language like Haskell for advanced concepts. While I wouldn't bother to teach a Pascal or FORTRAN class as an introduction to programming, I would certainly teach them as a requirement to a numerical methods class.

      --
      "The mind works quicker than you think!"
    5. Re:Interesting move by bradley13 · · Score: 2

      Sure your classes have methods. But good OO design says that your classes correspond to groups of real-world objects: bank accounts, people, widgets, whatever. Why? Because that is the data that needs to be processed. The methods are tied to the classes, meaning that their very definitions depend on the data modelling you have done.

      Working this way is suitable when you are dealing with complex data and comparatively simple algorithms; get the data model right, and your problem is half solved. Moreover, basing the data model on the real world is natural and intuitive, and mostly yields good results. This is the OO world - and it works well for many (even most) real-world problems.

      The other situation is where you have complex algorithms, but simple data. Signal processing, control software, scientific programming, etc.. Take a radar as an example: the data is just a continuous stream of numbers coming in off the radar dish; but the algorithms that extract meaning from those numbers are very sophisticated. Using an OO language for problems like this is like trying to loosen a screw using a wrench - maybe you can make it work, but it's basically a really bad fit for the problem.

      --
      Enjoy life! This is not a dress rehearsal.
    6. Re:Interesting move by digitig · · Score: 4, Insightful

      Sure your classes have methods. But good OO design says that your classes correspond to groups of real-world objects: bank accounts, people, widgets, whatever. Why? Because that is the data that needs to be processed.

      That seems to be a fundamental misunderstanding of OO. The focus on real-world objects is because they have self-contained properties and behaviour. "Because that is the data that needs to be processed" is no more (and no less the case) than Because that is the behaviour that needs to be produced.

      The methods are tied to the classes, meaning that their very definitions depend on the data modelling you have done.

      Or (and just as valid), the members are tied to the classes, meaning that their very definitions depend on the use cases (ie, actions) you have identified.

      Working this way is suitable when you are dealing with complex data and comparatively simple algorithms; get the data model right, and your problem is half solved.

      You do realise that data model != object model, don't you?

      The other situation is where you have complex algorithms, but simple data. Signal processing, control software, scientific programming, etc.. Take a radar as an example: the data is just a continuous stream of numbers coming in off the radar dish; but the algorithms that extract meaning from those numbers are very sophisticated. Using an OO language for problems like this is like trying to loosen a screw using a wrench - maybe you can make it work, but it's basically a really bad fit for the problem.

      Radar data was a bad example. A modern radar processing system takes data from many sources such as primary radar heads, secondary radar heads, ADS-B, ADS-C, WAM, neighbouring radar processing systems and so on. These behave the same in most ways but differently in some, and OO turns out to be an excellent way of dealing with that.

      Yes, in some applications OO doesn't offer you anything significant. They are typically the cases in which you end up effectively with one class because the data and the processing are so simple. But in this context "simple" processing doesn't mean mathematically or computationally simple, it means that you only do one thing with the data (in the case of the radar front-end, for instance, the one thing will be extracting distinct decluttered returns into distinct objects for passing to the next processing stage). OO design still doesn't get in the way, though: if that's the only thing going on in that process you simply end up with a design with only one class having only one significant method (so if your language supports it you might just as well write the lot as a single routine with no class packaging).

      For what it's worth, I have no problem with OO not being taught from the outset on a computer science course. It's a decompositional/compositional approach and is not a lot of use until you understand what you are decomposing and composing.

      --
      Quidnam Latine loqui modo coepi?
    7. Re:Interesting move by khallow · · Score: 4, Interesting

      The other situation is where you have complex algorithms, but simple data. Signal processing, control software, scientific programming, etc.. Take a radar as an example: the data is just a continuous stream of numbers coming in off the radar dish; but the algorithms that extract meaning from those numbers are very sophisticated. Using an OO language for problems like this is like trying to loosen a screw using a wrench - maybe you can make it work, but it's basically a really bad fit for the problem.

      I nodded at first when I read this, then I realized, the complex algorithms are objects in themselves. And the "simple data" usually has structure and meaning to it. I have some experience trying OO approaches to scientific computing. A naive approach can result in some awful problems that add little to the fundamental work.

      My personal experience has been with writing matrix algorithms. The conditions of the matrices were that they were "large" and usually had nice internal structure (for example, a class structure might be rectangular matrix, upper/lower triangular matrives, diagonal matrix, and constant matrices, constant diagonal and the zero matrix). They are "simple" data sets, but a little insight into their structure can result in significant savings in data stored and the cost of common matrix operations (like matrix multiplication).

      For me, I ran into some deep problems when I attempted to operate on multiple matrices with structure. For example, suppose in addition to the list mentioned above, I create a new class type for block diagonal matrices. There were already six matrix classes. So if I want to do matrix multiplication, I have potentially 13 new pairings of classes (left or right multiplication by block diagonal matrix on the six existing classes plus multiplying two block diagonal matrices together).

      For my language choice, C++ (and later Java), I couldn't just implement matrix multiplication as a method. I know there's some stuff with better OO implementation out there, but that's what I was using. So I ended up representing matrix multiplication as its own object, and registering specialized multiplication algorithms in a poset structure. When two matrices need to be multiplied, the matrix multiplication class looks up all the specific algorithms that would work and picks one with the best heuristics.

      Whether the complexity of that overhead is justified, well, eh... never did finish it. All I can say is that what I implemented, allowed me to throw stuff together without thinking too much about the internal structure or taking a huge hit on computation (given what I was doing, PDE difference method modeling and least squares stuff on large piles of data).

      But this example steers my intuition here. You may have several competing complex algorithms. You may end up changing the structure of the simple data you operate with. The places where your scheme can change are places which you can and maybe should objectify. Also you have processes which you can abstract through objects, for example, if you are piping data through a DSP system, then a stream structure with filters applied to the stream in sequence might be a suitable abstraction for what you're doing.

    8. Re:Interesting move by Brian+Feldman · · Score: 2

      That's a very good point. I have gained a much greater appreciation of C++ over time for how well it supports many different programming methodologies, including even functional.

      --
      Brian Fundakowski Feldman
  6. OO a tool for craftsmen, not comp sci by shoppa · · Score: 5, Insightful

    Focusing on the basics, and not on the tools of the trade, is very important at something that is not a "trade school", and CMU's computer science department certainly lives above the trade school level. (Just to contrast: when I was a freshman, the "trade school" argument was whether new students should be taught Fortran or Pascal ! Thank heaven I didn't devote my career to being a programmer.)

    It seems to me that CMU's made the very obvious decision that today, OO is a tool for craftsmen, not for freshman computer scientists. And they probably are right. It's important to not confuse the tools of the trade, with the basics of the science, and this is especially true at the freshman level. For a good while (going back decades) OO was enough on the leading edge that its very existence was an academic and research subject but that hardly seems necessary today.

    In the electrical engineering realm, the analogy is deciding that they're gonna teach electronics to freshmen, and not teach them whatever the latest-and-greatest-VLSI-design-software tool is. And that's a fine decision too. I saw a lot of formerly good EE programs in the 80's and 90's become totally dominated and trashed by whatever the latest VLSI toolset was.

    1. Re:OO a tool for craftsmen, not comp sci by obarel · · Score: 2

      We teach music *theory*, not how to play an instrument. Nothing to do with us.

      Computers are tools. You program them to get them to do something useful. They're not an abstraction, they're real. Computer science is about the theory behind computers. It's not about some "higher dimension" of thought that is unrelated to programming machines, it's all about what you can achieve by programming those complex machines.

      Otherwise, why study functional or logical programming? That's "dirty" as well, isn't it? Why have a computer lab? Why call it "computer science" when we hate computers and programming so much?

      Some computer scientists wish they were mathematicians - sit in an office, use a pen and a paper, and come up with ideas. That's not what computer science is about - that's what mathematics is about. Computer science is about understanding what can and cannot be done with a computer - it's a tool, and people use it. The actual use of computers is a subject of huge (practical!) amount of research - human interaction, programming languages, computer graphics, artificial vision. If your idea of a computer is an abstraction, why would you ever care about programming languages? They're all equivalent to a Turing machine, and the details are only of interest to "peasants" - the programmers.

      In that case, why worry about parallel computation? It's all just "dirty" details - you have more than one processor or more than one machine - it's just details. Who cares which programming language or paradigm is suitable - maybe "craftsmen" care, but they're peasants - worrying about whether to use a shovel or a hoe. This is so far removed from the work of a true computer scientists, why even worry about such details?

      So universities should not teach "computer science" because it's a contradiction of terms. Computers are machines, tools, and science, well, science is elevated. It's not about experimenting with reality, about the interaction between time, space, cost, humans and machines. It's about mathematics and P=NP.

      Well, it just isn't. It's the same old story: Chemists say to biologists "everything is chemistry". Physicists say to chemists "everything is physics", mathematicians say to physicists "everything is mathematics". But a mathematician who doesn't grow yeast in a lab is not a biologist. And a computer scientist who never writes a program or touches a computer, is not a computer scientists but a mathematician.

    2. Re:OO a tool for craftsmen, not comp sci by hey! · · Score: 4, Insightful

      Well, I'd agree with you if you this were a class in an O-O language, but it's a class in a major programming *paradigm*. And even theoreticians have to express themselves in code. If the summary is to be believed, the department is taking a stand against O-O programming based on what it sees as the paradigm's shortcomings. Let me tell you, thirty years ago you'd hear the same kinds of arguments in a computer science department about how bad virtual machines were. Virtual machines were an early, failed attempt at getting around the limitations of early compiler technology. C showed you could have a language which was nearly as fast as assembler (faster for most programmers), and easily portable across architectures. There was no reason to study virtual machines, they had no practical application. Well, it probably would have been a good idea to have them in the curriculum somewhere to study on a theoretical basis, because ideas in computer science have a way of re-emerging.

      Computer science as a discipline embraces topics other than the theory of computability and complexity theory, which might as well be taught in the mathematics department. For example there is computer language design, hardware architecture, data communication theory, database theory, AI etc. Some of these could be put into other departments, I suppose, but an understanding of the core intellectual discipline *is* widely applicable to all the topics that commonly fall under the "computer science" rubric.

      I think an empirical case for separating computer science from software engineering might have sounded convincing fifteen years ago, but Google, and the Internet in general, are strong disproofs of this. Google isn't a search company. It's an algorithm company. It's about doing things on a scale so massive it requires serious computer science ability, well above the "tradesman" level of expertise. Which is not to say that what it does is as "pure" as the work an academic interested in computability per se and defining new kinds of complexity classes, but that kind of work, isolated from its applications, is of such narrow interest it hardly justifies the existence of a department separate from the Mathematics department.

      I do see the need for separate concentration areas or departments for computer science per se, software engineering and information science, although having employed a number of people with Masters' degrees in information science I have grave doubts about the academic quality of degree programs in that field. An academic degree should give you the intellectual tools to think about a problem, not necessarily the practical tools to work on it, which can be picked up other ways. The O-O paradigm fits into this framework. The requirement to learn a specific O-O language like C++ or Java is a different matter; somebody with a degree in C.S. should be able to pick any such language up because he should understand the *design* of the language.

      I suspect we're seeing departmental politics here.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    3. Re:OO a tool for craftsmen, not comp sci by russotto · · Score: 2

      Virtual machines were an early, failed attempt at getting around the limitations of early compiler technology.

      Say what? Virtual machines were an early, successful attempt at allowing multiple users to use the same machine at the same time for different purposes.

    4. Re:OO a tool for craftsmen, not comp sci by russotto · · Score: 2

      You're talking about time-sharing systems.

      I'm talking about VM/CMS. Yes, it's time sharing. It's also based on virtual machines (hence "VM").

  7. A larger problem by wootest · · Score: 4, Insightful

    The big problem with OO courses has always been that there's far more focus on the mechanism (and, lately, on design patterns) than on actually structuring your program to take advantage of objects. The word "polymorphism" isn't as important as getting across the concept that you can coordinate a few things as if they were the same thing, and have them act in different ways. Knowing a bunch of design patterns by name isn't as important as figuring out once and for all that you can structure your program in such a way that you can create interfaces (not necessarily actual interfaces/protocols) between different parts of your program and essentially replace them, or at least rework them entirely without having the whole house of cards collapsing.

    There's no focus on making it click. There's no course that teaches you explicitly just about formulating problems in code, and that makes me sad.

  8. Re:Hmmm ... by WrongSizeGlass · · Score: 3, Interesting

    Agreed ... but aren't most modern OS's OO based? In most cases students need OO programming in order to become employable. OO certainly isn't the holly grail of computing but it is entrenched in business and needs to be taught just like COBOL was all those years ago (when I had to learn it even though it was like writing a book every time I wanted to write a small program).

  9. Really? by vmfedor · · Score: 2

    Perhaps I'm misunderstanding the post... it sounds to me like OO techniques are only going to be taught in elective courses from now on. If that's the case, I think CMU is missing the fact that the majority of development work in the "real world" is done on already-existing platforms. Parallel/cloud computing and modular design may be the "next big thing", but what happens when the student gets their first job working with an application built with Java or .NET? Maybe in their ivory tower they can say "OO is dead" but in the real world, OO is very real.

    --

    I like my women how I like my sugar.. granulated.

    1. Re:Really? by Fnord666 · · Score: 5, Funny

      Perhaps I'm misunderstanding the post... it sounds to me like OO techniques are only going to be taught in elective courses from now on. If that's the case, I think CMU is missing the fact that the majority of development work in the "real world" is done on already-existing platforms. Parallel/cloud computing and modular design may be the "next big thing", but what happens when the student gets their first job working with an application built with Java or .NET? Maybe in their ivory tower they can say "OO is dead" but in the real world, OO is very real.

      This is a CS program we are talking about. Much like economics, in these disciplines the real world is often considered a special case.

      --
      'The tyrant will always find pretext for his tyranny.' - Aesop's Fables
  10. Anti-Modular? by msobkow · · Score: 5, Interesting

    Apparently the meaning of "Modular" has changed since I was in University back in '82. OO used to be the epitome of modularity.

    But I do agree that making it an introductory first-level course does warp the mind of the young programmer. There are a lot of languages that don't enable OO programming at all (e.g. Erlang), which become much more difficult for them to grasp because OO is so engrained in their thinking.

    I can't think of anything specific about OO that makes it poorly suited to parallel programming. There are languages whose nature is parallelism (again, Erlang), but that's usually accomplished by adding parallelism operators and messaging operators to a relatively "traditional" language. I don't see why you couldn't add and implement those constructs in a non-parallel language.

    I also shudder to think how a CS student is going to deal with parallelism using languages that don't make it a natural extension if they're learning to rely on those extensions in their first year.

    I gotta tell you, though, I really object to the use of Java as an introduction language for programming. Java is far from a shining example of any particular style of programming. It's not real OO because it's only single inheritance. It's not designed for parallelism. It doesn't have messaging built in. In short, Java is actually a pretty archaic and restricted language.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:Anti-Modular? by jameson · · Score: 5, Interesting

      Yes, there has been much progress in module systems. The very Bob Harper mentioned there was involved in the design of the SML module system, which is often cited in the CS literature as `the' reference module system. SML achieves a level of isolation that is simply impossible to achieve in a language like Java or Smalltalk. in Java, any object you can still call `hashcode()' and `toString()' etc. on, and it's often possible for someone to subclass one of your internal classes and thereby break your intended module structure.

      In SML, you can confine types through (e.g.) the following signature:

      (* this is imperative code; a typical SML program focuses on functional code, but it's good enough for illustration purposes. *)
      signature STACK =
      sig
          type 'a stack (* 'a is a type parameter, so "'a stack" is what OO-land calls a `generic type' *)
          empty : unit -> 'a stack (* create fresh stack *)
          push : 'a stack -> 'a -> unit (* take a stack of 'a elements, take an element of type 'a, and plug them together *)
          pop : 'a stack -> 'a option (* "'a option" means that the operation may fail *)
      end

      You can then implement this stack in various structures that match this signature, and confine it in such a way that only the operations listed above are available. That is, you can't stringify stacks (there is no such operation listed there, though you can choose to add one), you can't compare them (again, no such operation), you can't `reflect' on them and you can't access their `protected' functionality by subclassing them, unless the stack implementer put a separate view of the structure into place for that particular purpose.

      Why is this good? Client code won't end up using features that you didn't want to expose. Why is it bad? If you forgot to expose something important, someone else will have to re-implement it. But that's your fault, then, not the language's fault.

      SML also allows you to build modules from other modules through something called `functors', but let's leave that for another time.

      Now, SML's modules have issues-- you can't have mutual dependencies between them (which does have advantages, too, though), and the question of how to integrate type classes (something you may know as `C++ concepts') is unresolved. But the concepts behind the module system are clear and powerful. So if you want to teach the concepts underlying modular software design, this is a vastly better choice than most other options out there. (I remember the Modula-3 module system being fairly good, too, but not quite at this level.)

      So, for teaching purposes I'd say Bob Harper is closely connected to the best system out there that has actual working implementations tied to it.

    2. Re:Anti-Modular? by ayvee · · Score: 2

      I can't think of anything specific about OO that makes it poorly suited to parallel programming.

      Search for the "inheritance anomaly". The academic CS community has known about it since the 80s, but no-one's yet found a satisfactory fix.

  11. Re:Hmmm ... by immaterial · · Score: 4, Funny

    Given its toxicity to humans, I recommend avoiding drinking from the holly grail altogether.

  12. OOP in freshman year by janoc · · Score: 5, Interesting
    From the position of someone who used to teach basic programming courses to freshmen, I can only applaud the decision.

    Many kids coming to colleges these days do not have any programming experience or a very shaky one at best. Picking up concepts like classes, inheritance, the entire idea behind OO modelling is difficult if you are lacking basics such as how memory is managed, what is a pointer, how to make your program modular properly, etc. From the course description they are going to use a subset of C, I think that is a good starting basis for transitioning to something else (C/C++/C#/Java/... ) later on.

    What is worse, many of these introductory courses were given in Java - producing students who were completely lost when the black box of the Java runtime and libraries was taken away - e.g. when having to transition to C/C++. We are talking engineering students here who could be expected to work on some embedded systems later on or perhaps do some high performance work. Even things like Java and C# still need C/C++ skills for interfacing the runtime with external environment.

    I think it is a good move, indeed.

    1. Re:OOP in freshman year by DCheesi · · Score: 4, Interesting

      I agree that OO in the 101 course is a little much. You should really be focusing on simple programming techniques that a non-major might encounter when, say, writing a batch script or macro. I'm not sure about the second semester courses, though, since those are more for potential majors. Certainly at some point a CS major needs to be exposed to OO, but I don't think it needs to come first.

      As for understanding the infrastructure, I do think C/C++ get you closer, but in my experience it doesn't really click until you take some kind of computer architecture course or similar. For instance, I didn't *really* understand pointers until I understood how values and addresses are stored in memory.

    2. Re:OOP in freshman year by stefski66 · · Score: 3, Interesting

      What is worse, many of these introductory courses were given in Java - producing students who were completely lost when the black box of the Java runtime and libraries was taken away - e.g. when having to transition to C/C++.

      What is worse, many of these introductory courses were given in C/C++ - producing students who were completely lost when the black box of the C/C++ runtime and libraries was taken away (stl, libstdc++, libc, stdlib/malloc) - e.g. when having to transition to Assembly.

      What is worse, many of these introductory courses were given in Assembly - producing students who were completely lost when the black box of the Assembly runtime and libraries was taken away (OS virtual mem) - e.g. when having to transition to an OS-less embedded machine.

      What is worse, many of these introductory courses were given in Assembly on powerful CPU - producing students who were completely lost when the black box of the runtime support was taken away (CPU mem protecion, FPU) - e.g. when having to transition to a simpler CPU.

      Point is: whatever the language, it always come with support that you don't want to cope with in 95% of the case. Garbage collection (a la java) is one of these. Mem Protection, FPU, virtual memory (remember handles in MacOS before X ?) etc. I don't want to re-implement them, thanks.

  13. Comment removed by account_deleted · · Score: 5, Funny

    Comment removed based on user account deletion

  14. Re:so the wheels are coming of the OO band wagon t by oliverthered · · Score: 2

    I've found the same problem with SQL and prolog (of that was object prolog, scrub that)

    --
    thank God the internet isn't a human right.
  15. Re:What? by Anonymous Coward · · Score: 3, Insightful

    The point of a university Computer Science course is not to train students in iPhone development.

  16. Re:Hmmm ... by salesgeek · · Score: 4, Informative

    Um. No. Many modern libraries or "frameworks" (newfangled word for library) are OO. Most OSes remain written in classic system programming languages like C and assembly language. In fact, most frameworks start as object oriented wrappers for certain OS calls and cruft up from there.

    --
    -- $G
  17. Re:What? by osu-neko · · Score: 3, Insightful

    Perhaps by not quitting after their freshman year, and learning some OOP?

    --
    "Convictions are more dangerous enemies of truth than lies."
  18. This is a gOOd thing. by v(*_*)vvvv · · Score: 2

    Programming is about utilizing paradigms. Not being stuck in one. OO is just another layer on top of anything else. It is a set of rules that one can follow in any language. Some languages have it built in for convenience, but it is also an inconvenience for implementations where it is not so optimal.

    There was definitely a moment when OO seemed to be some new paradigm in programming, but no, it is merely a tool, and CMU put it in its rightful place.

  19. Re:What? by multipartmixed · · Score: 2

    Geez, I don't know.

    Most kids go to school for four years. Maybe they'll learn OOP in one of the other three?

    --

    Do daemons dream of electric sleep()?
  20. Re:Hmmm ... by osu-neko · · Score: 5, Insightful

    Agreed ... but aren't most modern OS's OO based? In most cases students need OO programming in order to become employable. OO certainly isn't the holly grail of computing but it is entrenched in business and needs to be taught just like COBOL was all those years ago (when I had to learn it even though it was like writing a book every time I wanted to write a small program).

    And how is this an argument for including in the introductory, freshman curriculum? I put forward the possibility that some topics may be more appropriate to be taught to students only after they've learned the basics.

    --
    "Convictions are more dangerous enemies of truth than lies."
  21. Victory for Tablizer? by Compaqt · · Score: 2

    Longtime Slashdot readers know and either love or hate user "Tablizer" .

    He has a website detailing his objections to object-oriented programming, while arguing for "table-oriented programming". It has been a fruitful source of flamewars over the years.

    So, is this a vindication for Tablizer? Tablizer, what say you?

    --
    I'm not a lawyer, but I play one on the Internet. Blog
  22. Re:Hmmm ... by Assmasher · · Score: 4, Interesting

    If it means they stop doing everything in Java throughout their education, I'm all for it. There's nothing wrong with Java, and I use it often in my current company, but kids in school need to learn from the get go that languages are tools in a toolbox - use the right tool for the right job when you can. I can't remember the last time I interviewed a graduate who had used C++ or C outside of a single survey course on the language! Hell, I can't remember the last time I interviewed a post 2000 graduate who had built their own processor or had even taken an assembly class. The kids are just as smart, just as eager, but woefully unprepared. The one thing they are getting a little better at is included some 'software engineering' into the curriculum - but only a little bit better in that they do 'projects together' which in my experience means that the alpha nerd does 90% of the work and the other 4 team members offer worship and keep the ramen coming.

    --
    Loading...
  23. Law of Demeter the problem? by Latent+Heat · · Score: 2
    Maybe the anti-parallism is not in OOP as such but in programming style such as this Law of Demeter business.

    Demeter, they tell me, was some manner of software project and the Law of Demeter is a style of OOP programming that is supposed to have come out of the experience on that project. In the strict sense, you are supposed to never invoke methods on objects embedded inside other object. Instead, the containing object is supposed to have a method that in turn invokes the method on the embedded object.

    This manner of strict enforcement of encapsulation has the effect that most of your methods are mainly invocations of other methods. This may have the effect that any typical method invocation results in a long chain of method invocations.

    This is kind of like I ask Phil for the monthly report and Phil tells me "you gotta get that from Sally." So I shoot Sally an e-mail and she gives me the monthly report? No, that is bad in some sense because if my contact is Phil I am not supposed to know about Sally. So I e-mail Phil with the request, who e-mails Sue, who e-mails Tom, who in turn e-mails Jason, who finally e-mails Sally. And when Sally generates the monthly report, she passes it back through that chain. So am I correct in thinking that OOP leads to such high levels of indirection, and programming styles such as Law of Demeter make this worse?

    This style of programming probably helps coarse-grained parallelism of breaking programs up into elements that can run on separate threads or even processes. It helps by the rigorous enforcement of encapsulation. But this high level of indirection may break fine-grained parallelism -- every memory access chases long sequences of references.

  24. Re:strange progress by Assmasher · · Score: 2

    Ironically, I find it vastly easier to encapsulate my mechanisms for parallelization in objects :).

    --
    Loading...
  25. Re:Please enlighten me... by Shinobi · · Score: 2

    Major parts of the worlds telecom networks, for example the software in any of Ericssons equipment made in the last 15 years is written in Erlang. Nokia also uses a fair chunk of Erlang IIRC.

    Software upgrades for some equipment used by the Swedish Defense Force, to accomodate the Network-Centric Warfare model used functional programming to.

    I've used Erlang myself for semi-embedded networks that need to work in parallell.

  26. Good strategy. by davidbrit2 · · Score: 2

    I guess they want to build a nice moat to go with their ivory tower.

  27. Re:Hmmm ... by narcc · · Score: 2

    far better to hand wire logic gates and address decoders to have a real feel for what's going on.

    Laugh all you want, but this was a big part of my intro to CS class way back before "CS" turned in to "using Visual Studio".

    Programming is a useful skill and should be taught to CS students, that isn't in question. However, college isn't (or shouldn't be) a trade school. Programming is a bit of an art, and consequently shouldn't be a major part of any CS curriculum, certainly not the dominant part as it seems is the case at far too many institutions.

    That said, first year students should learn to program, I'd recommend BASIC for learning basic concepts like iteration, flow control, etc. followed by an assembly language where they can get close to the machine while learning what's really going on as they implement common algorithms and data structures.

    After that, it really doesn't matter what language they use in the rest of their core courses, as there shouldn't be a need to spend any time on even a new language in the rest of their core courses. Any class time spend on "how-to do blank in language x" is a huge waste.

    On OOP specifically, I agree with CMU -- it's both anti-modular and anti-parallel. In short, it's a failed paradigm. Look at the hideous mess modern languages have become as a result of the nearly religious devotion to this astonishingly over-hyped and ill-defined concept! (Before the terminally incompetent chime in: objects are great, OOP is not.)

    I applaud CMU for taking action here -- let's hope other colleges and universities follow.

  28. Right for the wrong reasons by MoNsTeR · · Score: 2

    OOP should absolutely not be taught at the freshman level, because it gets in the way of understanding more basic concepts like, oh I dunno, variables, branching, looping, subroutines, I/O, etc. Their claim that OOP is "anti-modular" is of course absurd. "Anti-parallel" is probably arguable, but how that's relevant at an undergraduate level of instruction is highly questionable.

    At any rate the real problem is that colleges offer degrees in "computer science" but not "software engineering". How many of these students will finish their degrees without ever having committed to source control? Without coding to a 3rd-party API? Connecting to a database? Performing maintenance programming? Working in an honest-to-god team?

  29. Re:Hmmm ... by CptPicard · · Score: 3, Insightful

    I actually have never believed that assembly is in any sense informative or educational because "it is how the computer works". It's actually a remarkably hard to decipher representation of a program, and what the program is and does is the important part.

    I consider myself quite a strong programmer, and I never think in terms of assembly when writing programs. Higher-level languages, in particular functional programming languages, are far closer to my mental model of things. Why not work in a language that represents or helps formulate the problem-space abstractions better?

    --
    I want to play Free Market with a drowning Libertarian.
  30. Re:Hmmm ... by TheRaven64 · · Score: 2

    Ya I am not really sure I believe this article either, sure OO is not great for parallel but it seems a lot better then any alternative to OO I have ever heard of.

    OO is great for parallel programming. The actor model of concurrency comes from object orientation! A number of OOP concepts come from Simula, which was designed for writing concurrent systems. It is a bit less good for implicit concurrency, but it's still pretty good if you have some profiling data to determine when it's sensible to insert the concurrency.

    I read TFA when it was published a few days ago and it sounded like a theoretician trying to push the functional programming agenda by spreading FUD. There are some things that work really nicely in functional programming (e.g. software transactional memory via monads), but most highly scalable code uses a model where you have simple sub-programs that communicate via message passing, which (according to Alan Kay, who coined the term) is the definition of object oriented programming.

    --
    I am TheRaven on Soylent News
  31. Re:What? by Svartalf · · Score: 4, Interesting

    Ah, but in the same vein... CS classes aren't supposed to train them for the "real world" their first semesters. SERIOUSLY. Do keep in mind that CS is really a branch of theoretical mathematics (I should know...I studied CS and made the leap to Software Engineering...) and in order to grasp the actual study, you need more than just being trained for the "real world" (If you're wondering why I'm putting that in quotes, there's a substantive (dare I say a small majority...) of development work that just simply can't use Java or "pure" C++ and there's a nearly as large subset of programming that cause more problems than they're worth because it requires REAL skill doing the task in Java or "pure" C++ and many, many of the train wrecks are caused by someone using the wrong tool because they don't understand how the tool actually works- they were trained for the "real world" by their college in a CS or Software Engineering degree and they were ill prepared to make the right decisions.). Quite simply, you teach fundamentals first, then you branch off into functional and OO programming after the fact so they understand all the tradeoffs and actually can be theoretical mathemeticians or software engineers at their discretion.

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  32. Re:Please enlighten me... by Svartalf · · Score: 2

    How about the Ericcson AXD301 ATM switching system, with over a million lines of Erlang?

    Or...how about RabbitMQ?

    Or...how about Facebook's Chat backend?

    There's quite a bit more than you think and the three I referred to were using Erlang- there's loads more with some of the other functional languages.

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  33. Re:Hmmm ... by mikael_j · · Score: 2

    I actually agree with that.

    Or rather, it makes sense that students get a chance to sort of "climb up" to the current level of abstraction. Start out with basic electronics, digital gates, registers and ALUs, machine code/asm, C, OO...

    Maybe I'm biased because I sort of followed that path on my own and I'm annoyed by all the developers out there who started out with VB using Visual Studio and then went on to VB.NET or Java using Visual Studio or some other IDE. I mean, I've worked with guys who think that something is wrong if they can't write entire GUI apps just by dragging and dropping with a few clicks in dropdowns. Sure, they may have a decent grasp of the larger systemic view and the concepts used in systems science but it just seems like they keep running into problems because anything more bare-bones than "click 'add data source', click 'auto-discover', pick your database and click 'ok'" is puzzling and black magic to them.

    --
    Greylisting is to SMTP as NAT is to IPv4
  34. Re:Hmmm ... by CptPicard · · Score: 2

    I sort-of agree with you; I am not making an argument that one "should not" know assemby, or at least the principles of it so you can read output even if you did not actually write it yourself. It's about being a well-rounded programmer.

    My issues are more about this (mythical, to me) attitude that some people display that assembly is "the real thing" that is just hidden by abstraction in higher-level languages and that this is some kind of a mental crutch and that the assembly is what somehow actually "tells you what is going on". It leaves me with the impression that their thinking about programs and computation is not on a particularly abstract level, and I generally use "abstract" as a positive word here... think "abstract" in the sense of mathematics.

    Of course, with a lot of modern programming languages, you don't even have a compiler that outputs anything, so understanding assembly is not going to give you any idea of what actually happens on the machine when you run, say, Ruby code.

    --
    I want to play Free Market with a drowning Libertarian.
  35. Come back to reality.. by segfault_0 · · Score: 2

    Of course you don't want to teach algorithm development on a high level language that already has all of the algorithms (that these teachers are capable of teaching) built in. What would be the point of that? And I think when they said anti-parallel and anti-modular, they meant in the attitudes it instills in students.

    --- start off topic rant ----

    For the record, these degree programs provide you with skills tuned for different jobs. The CompSci folks are algorithm based - down in the details making things fast and efficient. The SoftEng folks are architecture/technology based - up at the top making things that WORK and that people can actually use; you know - products. They are COOPERATIVE jobs with a very large overlap.

    Any CompSci should be grateful to have talented SoftEng helping them provide a cogent, fast, and polished view of their algorithmic efforts; your work means nothing if it never gets in the hands of the users or if it's spoiled by a bad implementation.

    Any SoftEng should be pleased to have hard working CompSci making fast algorithms to help them to create their next product. You couldn't make these fancy architectures of you didn't have well thought out underpinnings backing you up.

    I see some piss-poor attitudes on this thread and some of you snobs and dorks are in for a rude awakening.

    --

    I was crazy back when being crazy really meant something. (Charles Manson)
  36. Re:Hmmm ... by Dails · · Score: 5, Insightful

    I outright laugh at people in an Interview when they ask me if I'll write OO code.

    Good advice for those seeking work.

    If you can't read straight up C code and understand what the fuck is going on, stop calling yourself a programmer.

    They used to say that about assembly. Try writing a modern game or GUI in assembly. You might well be able to do it, but by the time your'e done I'll have finished several projects and be moving on to the next one.

    If you can't code directly for the hardware you're interfacing with, stop calling yourself a programmer.

    Right. Abstraction has no place in computer science education or in programming. As a matter of fact, if you're using anything other than a magnetized needle to right to your hard drive, quit calling yourself a computer user.

    If you depend on .NET, any library, framework, or something written by someone else, you're not a programmer. You're a script kiddy.

    Right. Code reuse is so lame. Anything that reducing development time and improves efficiency has no place in computer science. Everything should be written directly in binary on a computer you, the programmer, built from latches, switches, and flip-flops. Otherwise, you're just a bum.

    OO should never be taught lest we end up with a generation of useless tools who think they're "programmers" that can't actually accomplish fuck all

    Right. After all, every program written using OO is useless and nonfunctional. Except for the hundreds of thousands of programs that work just fine.

    Go back to your garage with your unflinching dedication to The Old Ways and leave the rest of us to be productive.

  37. Re:Hmmm ... by Assmasher · · Score: 2

    An applicant for what though?

    If I wanted a guy/gal as a back end systems and server engineer, I would want somebody with a well rounded CSCI education including assembler, kernel space programming, long running process experience, et cetera.

    If I wanted someone who had to rapidly iterate client software because I was running a consulting firm, I'd prefer the person with the tech writing skills.

    I've never seen a single job post 2000 that required students to know calculus either, but I'd still prefer to hire engineers who have had it.

    --
    Loading...
  38. Re:Hmmm ... by Brian+Feldman · · Score: 2

    You're truly not giving Java enough credit. It is never good to learn from only one example but it can be used to teach compiler theory and assembly, as it is a bytecode VM, and DOES expose very low-level language details: you can freely use native types, even though they are awkward compared to objects. One of the best features is all of the threading and synchronization primitives you need at a low level are part of the language itself. So what if it doesn't compile to machine code?

    --
    Brian Fundakowski Feldman
  39. Re:Hmmm ... by Duradin · · Score: 4, Funny

    So you can't call yourself an english major if you can't read Sumerian cuneiform?

  40. Re:Hmmm ... by chthon · · Score: 3, Informative

    While I also disagree with the tone of the parent, I hope you understand that abstraction and code reuse are not features that originate solely from OO programming? It is enough to have a module or package mechanism.

  41. Re:Hmmm ... by wmbetts · · Score: 3, Funny

    Yes it produces more powerful methodologies, because of the synergistic effects that objects have with modern cloud environments.

    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
  42. Re:Hmmm ... by chrysrobyn · · Score: 4, Insightful

    I consider myself quite a strong programmer, and I never think in terms of assembly when writing programs. Higher-level languages, in particular functional programming languages, are far closer to my mental model of things. Why not work in a language that represents or helps formulate the problem-space abstractions better?

    In a word, performance. In your particular field of expertise, performance and memory footprint may not matter (99% of desktop applications I suspect), but a strong programmer is fully aware of what goes on under the covers when [his|her] program is compiled to the degree that it impacts the product. Until recently, I never thought there was a functional difference between a lone line containing "i++;" "++i;". Of course, for variable assignment it matters, but what's going on under the covers? If you stop and think about it, i++ actually has to return the old value. ++i can destroy that old value and never needs to worry about returning the old value (you can avoid an extra copy). If you're in a high performance loop, either with not much body or with a lot of increments, such things matter. Understanding the impact of caching, the scarcity of registers, the high cost of flushing the cache, all of these can matter, and it's hard to teach these concepts without using at least a pseudocode that looks suspiciously like assembly. If you're paying for compute cycles, or if you're selling something in a market where performance matters, you're going to see a strong advantage in a computer scientist who understands assembly and compiling.

    Now, if your main concern is code readability, maintenance and/or moving onto the next product as soon as this one compiles with no errors, higher level languages are undoubtedly far more appropriate.

  43. Re:Hmmm ... by Just+Some+Guy · · Score: 3, Insightful

    but only a little bit better in that they do 'projects together' which in my experience means that the alpha nerd does 90% of the work and the other 4 team members offer worship and keep the ramen coming.

    That's called "managing expectations", and is a wonderful introduction to their future careers for a lot of CS grads. Now go fetch me some coffee while this build finishes, would you? Thanks.

    --
    Dewey, what part of this looks like authorities should be involved?
  44. Re:Hmmm ... by iMadeGhostzilla · · Score: 2

    It's a "library" if you call it from main(). It's a "framework" if main() calls you.

    I hate frameworks.

  45. Re:Hmmm ... by Kenneth+Stephen · · Score: 2

    I think you have a very limited view of what kind of programming folks do. Only a small percentage of folks do programming at the level where they need to know how a processor works. The vast majority of programmers out there work in high level languages like Java or SQL or XSLT where the nature of the processors capabilities, whether it is RISC or CISC or whether it is a multi-processor or uni-processor systerm doesn't matter a bit to what they are delivering. A lot of times you have assembler bigots on /. spouting things like "...you can write fast / efficient code if you don't understand how the processor works" or if you haven't programmed in assembler. I don't believe this. In the real world out there, what matters most in a huge percentage of projects speed of delivery of function points. If one has to compromise between a 30% efficiency improvement by using a lower level language, vs a 50% improvement delivery time by using a higher level programming language, then that 50% improvement will be the deciding factor in your company making a profit and therefore keeping you employed.

    I have done programming in assembler. I have done programming C, C++, COBOL, VisualBasic, Lisp, and a whole bunch more languages for over 20 years. And my experience is that knowing how the processor works or a stack works, isn't helpful in 99% of cases..

    I don't deny that in the embedded space, or to system programmers, that these details aren't important. But those programming spaces are a small portion of the programming market.

    --

    There is no such thing as luck. Luck is nothing but an absence of bad luck.

  46. Re:Hmmm ... by siride · · Score: 3, Insightful

    You are still probably doing OO on some level even in C. OO is not a whole different paradigm, but is rather an institutionalization, so to speak, of a variety of patterns that are already used in procedural programming, with its own additional "enhancements" (for better or for worse).

    I don't think the difference in job markets between C and Java really has a lot to do with OO as a methodology. It probably has more to do with what's available on what platform and what companies are using those platforms (more importantly, what *kind* of companies are using those platforms).

  47. Re:Hmmm ... by rgbatduke · · Score: 2

    I agree, actually. Duke has run the gamut of teaching OO languages in their first year classes for decades now, from C++ through java to who knows what now. As a consequence, I end up teaching independent study students who want to actually learn C before they take the required course in operating systems. Most of e.g. C++ relative to C is bloat, in my opinion (although of course, sigh, stating this out loud in Modern Times simply invites the compiler flamewar to begin).

    Personally, I think the best way to teach programming to future computer scientists is indeed to start with a course that mixes a foray (at least) into assembler followed by C. The best description of C that I've heard in numerous discussions on the subject (many of them heated, of course:-) is that C is a thin veneer of upper-level language sensibility on top of naked assembler (sometimes with the assembler literally shining through with inlined code). If your goal is to teach somebody computer science as opposed to train them for a job as a poorly educated web programmer, starting from the ground up in this way teaches them about the processor, memory, registers, basic operations, devices and interfaces, and much more as they learn to program, and in the end will make them far more effective programmers who write far more efficient code. Working without the "safety net" associated with higher level compilers also teaches them (sometimes painfully) to be careful.

    Naturally, I expect nothing but flames from those who have focused one OO languages for their professional careers or who have drunk the kool-ade, but I cannot help but finish by posting a link to a bit of humor:

    http://www.phy.duke.edu/~rgb/Beowulf/c++_interview.php

    More than a bit of wisdom in this rather biting satire... I truly hope that Duke one day pays heed and returns to teaching its majors solid computer science starting at the very beginning and only later explores OO languages and concepts (and list oriented languages and concepts, and specialty languages and concepts and so on). And it is rather difficult to get more fundamental than C and still be considered a compiler.

    rgb

    --
    Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
  48. Re:Hmmm ... by Bozzio · · Score: 2

    Programming is very easy, but requires math and logic skills.

    I agree that learning the basics of programming is easy. But, like with any other trade, becoming a good programmer requires the right kind of motivation, curiosity, attention to detail, and desire to improve one's craft.

    In my experience people who say "Programming is easy" are usually the ones you don't want to having working with you on a project.

    Programming is a craft. You have to love doing it to be good at it.

    Anyone can saw wood or swing a hammer. It takes a passionate person to properly build a staircase..

    --
    I just pooped your party.
  49. Re:Hmmm ... by pthisis · · Score: 2

    I went to CMU. The curriculum is designed so that if you work hard, you can make it through the freshman courses without an incoming knowledge of programming; it's much, much easier if you know some basics coming in, but if you're motivated it's not necessary.

    --
    rage, rage against the dying of the light
  50. First math and now OO... by Dcnjoe60 · · Score: 2

    A few weeks ago, there was a lot of discussion about how many universities are wanting to drop the math requirements from their CS degrees. Now we have dropping OO, too. I seem to recall that CS stands for Computer Science. Should not somebody with a Computer Science degree be able to handle things like OO and math? I could see dropping these requirements if the degree were something like Computer Technician or Computer programming (although even that last one, would indicate that a graduate would be verse in multiple programming paradigms).

    Is all of this a continued dumbing down of college so that the masses can get a degree? If so, it appears more and more technical jobs will go offshore as the next generation of true computer scientists won't receive their training in this country.

    On the other hand, if the goal is to pay a university a $100K to teach you how to do web pages and the like, then go for it. But, if the US wants to return to being a technology leader, then they need to focus on more than just the currently hot marketing skills and focus instead on the whole big picture.

  51. Re:Hmmm ... by ADRA · · Score: 2

    By your logic, Universities should be teaching Cobol again. They STILL to this day 40 years after the language's hay day make massive amounts of money to basically maintain the ugly code of Cobol because nobody else wants to. Do you respect Cobol programming more than C? Then I suggest you detach the salary proposition from the equation.

    I learned C in school and for years worked in companies where my job was in C. I was in a tight spot in 2001 when the bubble broke and I dove into a Java shop. I had done a Java course in school, but I would never consider myself competent in it at that point. The first thing I realized was "Damn, I can be so much more effective at coding in this language. I don't have to do any of the crap I had to deal with in the C world. It just works". I quickly fell in love with the language, and now years later I'm still a fan of the language even now that the sick plague of dynamically typed languages are flooding into popular use (again).

    --
    Bye!
  52. Re:Hmmm ... by pavera · · Score: 2

    its not compiler optimizations you're missing when you only learn java. Sure java does lots of stuff for you and does the "right thing" most of the time... But it doesn't teach you how things work at a low level. Learning only java doesn't teach you how indexes in a database work, because you just use Java's built in data structures that "just work" and you never have to learn how to manually build a b-tree. Which then teaches you how indexes work, and by deduction why its a bad idea to index every column in a database table. Yes, I once worked in a place full of java only programmers, they had indexed everything in the database to "make it faster" and were then completely confused as to why it wasn't faster. When I explained to them how b-trees (the database indexes were b-trees) worked, and how indexing in a database works in relation to that, they were actually pretty upset that in all the schooling they received no one ever explained this to them. They weren't "dumb" or "bad programmers", they just didn't know what they didn't know, once I explained it, they were very happy, willing to learn, and understand. For a couple of them it really opened their eyes and they'd come ask me questions regularly for the rest of the time I worked there... things like "I've always used java's built in sort functions, but why are they fast?".

    Repeat above story for any sufficiently advanced data structure (linked lists, doubly linked lists, trees, queues, graphs, etc). Having a fundamental understanding of how the data structure works is imperative to being able to understand when its a good idea to use one, and when it will be an epically bad idea to use one. I learned these things in AP CS in high school which when I took it was c++. I "relearned" them again in c++ my freshman year of college, then the college changed to all java.... and I never heard mention of a data structure again, or for that matter an algorithm "Just use javas sort, its faster than anything you'll write"... Data structures and algorithms are still very important in web programming. Just cause you can get those 1.5 million rows out of a database doesn't mean you can effectively deal with that scale in code (much less 100 million or a billion records). I'm sure you can teach data structures and algorithms in java, my experience at a large state university though argues that java makes it too easy to gloss over the details... and so lots of professors will.

  53. Re:I have an idea by roman_mir · · Score: 2

    These single focusfunctional/imperative/O-O programming classes are teaching tools (techniques), not tool selection.

    - that's where it all goes wrong. Teaching people in colleges about specific tools rather than about helping them to adequately approach a problem and to come up with a solution that is generic enough mathematically, so that it could be expressed in any language. The tools they will learn on the job.

    Of-course if that's a technical school, then there is more merit in that sort of an approach, still I'd rather have somebody who can think his way out of a box than somebody who has a hammer.

  54. Re:Hmmm ... by fph+il+quozientatore · · Score: 2

    I never thought there was a functional difference between a lone line containing "i++;" "++i;". Of course, for variable assignment it matters, but what's going on under the covers? If you stop and think about it, i++ actually has to return the old value. ++i can destroy that old value and never needs to worry about returning the old value (you can avoid an extra copy).

    You need not worry about that anymore nowadays, at least in C and C++. Recent compilers optimize the useless instructions out automatically.

    --
    My first program:

    Hell Segmentation fault

  55. Re:Hmmm ... by dave562 · · Score: 2

    If you come out with solid math and science skills you do fine. Programming is very easy, but requires math and logic skills.

    That is certainly one (popular) route to take into programming. A strong background in linguistics also provides a solid mental foundation for programming. The important ability to cultivate is structured, organized thinking.

  56. Re:Hmmm ... by stabiesoft · · Score: 2

    Man HS has gone downhill. In the 70's I had 6 years of math, 3 years of chemistry 1 semester of physics and 1 semester of programming in fortran. The card decks had to be sent to the main downtown facility to be run and they would send back thee printouts the next day. Now with computers all but free, your school could not come up with a VB course? Sad indeed.

  57. Re:Hmmm ... by Homburg · · Score: 2

    Seriously, TeX is a great example of how being a great computer scientist doesn't make you a good programmer. From the concept ("instead of a typesetting program, I'll create a programming language which typesets as a side effect") to the implementation of that concept, TeX is evidence that they had some good weed in the South Bay in the 70s (BibTex, on the other hand, is a tragic illustration of the effects of the crack epidemic in the 1980s).

  58. Re:Hmmm ... by Homburg · · Score: 2

    If you stop and think about it, i++ actually has to return the old value. ++i can destroy that old value and never needs to worry about returning the old value (you can avoid an extra copy). If you're in a high performance loop, either with not much body or with a lot of increments, such things matter.

    Note that this only matters with overloaded ++ operators in C++. For the basic types, the compiler will optimize out an unused copy.

  59. Re:Hmmm ... by mikael · · Score: 2

    C++ and parallelization don't seem to be mutually exclusive. It's fairly easy to write a C++ wrapper around pthreads, so you have a class container for all the data, one or more functions to process a single thread task, and a single function call to scatter the data, assign and supervise so-many threads to the task and gather the data afterwards.

    --
    Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  60. Re:Hmmm ... by CptPicard · · Score: 2

    Sure, they may be "good" inside their specific niche, but they have no versatility in their problem solving.

    Actually it sounds like you are the one coming from a specific niche -- probably some kind of embedded development. It is exactly the versatility in problem solving that is, in my view, not tied to any kind of processor architectures or anything of the sort -- it comes from exposure to both problems (in their abstract form, as the same stuff shows up in various real-life incarnations) and various kinds of solution styles. As my argument goes, assembly just simply doesn't provide the latter -- you still need to know what to actually do with it, even if you had to implement something strictly in terms of a processor architecture.

    By the way, the most gifted programmers I have met -- really, "thinkers about programs" -- have been avid Lispers. Interacting with one years ago made me a Lisper, too... best investment in a programming language I ever made.

    Just because something is modular does not explicitly make it good code, nor does it being non-modular make it explicitly bad code.

    Modularity usually is a sign that the problem's components have been recognized correctly. In 99% of the cases a well written piece of code where the programmer has understood the problem, is decomposed sensibly into some kind of units. In the remaining 1% the programmer really better be a programming god, and even if he were, he still should have been able to do provide a better decomposition.

    --
    I want to play Free Market with a drowning Libertarian.
  61. Re:Hmmm ... by NoOneInParticular · · Score: 3, Interesting

    I think that CMU's point is that in a world where serial speed is stagnant, but where computers will become increasingly parallel (thousands of cores), a methodology that tightly links state and function, and which main mode of operation is to mutate state (i.e., OO) is not a likely candidate to stay dominant.

  62. Re:Hmmm ... by Daniel+Phillips · · Score: 2

    That certainly depends on what OO means to you. From what I can see, Linux is quite OO code - everything is quite modular and it's a very nice state machine. From where I sit, Linux itself can be considered OO code - just that it doesn't use classes or OO language doesn't mean anything.

    non-OO code is like libc

    Actually, not using classes does mean something: the code is more ugly, inflexible and hard to maintain than necessary. Speaking as someone who lives and breathes the stuff.

    Linux kernel would be far better off actually compiling its class-oriented portions with a proper object oriented compiler. Likely as not, the code would be more efficient due to optimizations that can be done on virtual functions. Look at the hundreds of places where you have "if (obj->fn) opj->fn". In many cases that extra test is just pure overhead and can introduce pipeline stalls.

    Still scratching my head about the linked article's claim that OOP is anti-modular. On the face of it, that claim is bold and counter to my experience.

    --
    Have you got your LWN subscription yet?
  63. Re:Hmmm ... by cowboy76Spain · · Score: 2

    Yes, learning Basic at home helped me a lot with Java.

    I had a little trouble at the beginning compiling with the line numbers, but I solved it quickly. Now my code is as efficient and good looking as everyone's else.

    /* 10 */ public static in main(String args[]) { // This line does nothing. Brackets are empty and they did not even 'DIM' args
    /* 20 */ System.out.println("Hello world!"); // semi-colon because the guys at Sun / Oracle didn't figure out that the line ends at CRLF
    /* 30 */ } // Maybe this has something to do with the opening symbol at 10

    Still working it with GOTOs, yet.

    --
    Why can't /. have a rich-text editor? Editing your own HTML is so XXth century.
  64. Re:Hmmm ... by Daniel+Phillips · · Score: 2

    Which is why a certain CS professor, you may have heard of him, he's called Knuth, uses Assembler in his somewhat reasonably well-known(some would call them the bible of CS) books.

    I have a great deal of respect for Knuth and have implemented a number of algorithms from his texts. Particularly in the case of high precision arithmetic, it was necessary from time to time to actually read his horrible assembly language. The end result was good and tight, however I can say with confidence that his exclusive use of assembler for detailing algorithms is a blemish that weakens his monumental work. There are some cases where only a description of the algorithm in machine instructions will do, for example where a carry flag is an integral part of an algorithm, however the vast majority of his algorithms would have been better expressed in an algorithmic language.

    That said, I will still continue to collect everything he publishes, and aspire to understanding more of his deep mathematical presentation.

    --
    Have you got your LWN subscription yet?
  65. Re:Hmmm ... by Daniel+Phillips · · Score: 2

    my experience is that knowing how the processor works or a stack works, isn't helpful in 99% of cases..

    However, it is helpful in 100% of cases where efficiency matters.

    --
    Have you got your LWN subscription yet?
  66. Re:Hmmm ... by IICV · · Score: 3, Informative

    Until recently, I never thought there was a functional difference between a lone line containing "i++;" "++i;". Of course, for variable assignment it matters, but what's going on under the covers? If you stop and think about it, i++ actually has to return the old value. ++i can destroy that old value and never needs to worry about returning the old value (you can avoid an extra copy).

    Isn't it great that we have optimizing compilers that'll take care of considerations like that for us?

    A.. code should be written for clarity first, and if it turns out that it's not quite fast enough only then should you start worrying about whetehr or not it should be i++ or ++i.

  67. Another CMU Perspective by JonathanAldrich · · Score: 4, Insightful

    As some readers may have guessed, "anti-modular," "anti-parallel," and "unsuitable for a modern CS curriculum" are one person's opinions, and do not represent the majority view of the CMU faculty. The introductory curriculum was changed away from Java for different reasons: primarily to focus on a language (Python) with simpler syntax and dynamic types, and to supplement with material on C that is closer to the machine. For more details, see a report by the SCS Deans:

    http://reports-archive.adm.cs.cmu.edu/anon/2010/CMU-CS-10-140.pdf

    Whatever you may think about delaying OO--and opinions are mixed at CMU as everywhere--one advantage of the new curriculum is that the sophomore-level course can do OO design more justice than we were ever able to do in the prior intro sequence, since the students already know how to program. Modularity and parallelism are in fact major emphases of that course, which I and other CMU faculty are currently developing.

  68. Re:Hmmm ... by Digital+Vomit · · Score: 2

    Good god -- is there any human endeavor that doesn't turn people into raging douchebags?

    --
    Modern copyright is theft of culture from everyone and it retards the progress of the useful arts and sciences.