Slashdot Mirror


Stroustrup Says C++ Education Needs To Improve

simoniker writes "Over at Dr. Dobb's, C++ creator Bjarne Stroustrup has given an in-depth interview dealing with, among other things, the upcoming C++0x programming standard, as well as his views on the past and future of C++. He comments in particular on some of the difficulties in educating people on C++: 'In the early days of C++, I worried a lot about "not being able to teach teachers fast enough." I had reason to worry because much of the obvious poor use of C++ can be traced to fundamental misunderstandings among educators. I obviously failed to articulate my ideals and principles sufficiently.' Stroustrup also notes, 'Given that the problems are not restricted to C++, I'm not alone in that. As far as I can see, every large programming community suffers, so the problem is one of scale.' We've discussed Stroustrup's views on C++ in the past."

7 of 567 comments (clear)

  1. Re:more to it by JohnFluxx · · Score: 5, Informative

    Sometimes you need the more complicated parts of C++ - It would be a very bad idea to simplify c++ to the lowest common denominator.

    For example, most people don't use the SSE stuff or even know about it. You can, for example, make a vector with 4 numbers in it and multiply it with another vector with 4 numbers in it. The result is that the four multiplications are done simulatanously.
    Most people won't use this functionality and thus don't even need to learn it, but when you need an algorithm to run fast, it is essential.

  2. Re:I'm just glad they're teaching C++ actively aga by thetartanavenger · · Score: 5, Informative

    Where are they teaching it actively again? I'm a student on computer science at the moment and all they teach in any depth is Java. The only reason I know c++ is my desire to learn it, despite the fact that various parts of my course have recently required a fairly in depth knowledge of c++.

    My favorite lecturer quote, "Oh, I don't really do any coding at all".

    --
    Who need's speling and grammar?
  3. Re:more to it by smilindog2000 · · Score: 4, Informative

    I couldn't agree more! Much of the worst code I've ever had to deal with is C++ code written by smart guys who don't know what parts of C++ to use. How about mixing double inheritance from template classes, with smart pointers and garbage collection, when all you're writing is quicksort? Smart guys can take a 100 line problem and turn it into a 10,000 line C++ solution.

    I focus instead on restricting programmers to the tools they need, so they focus their creativity on algorithms instead of coding methodology. I've even codified it all, as an extension to C, rather than C++. Works great for team programming. I had a guy last week write two IC placers: simulated annealing, and quadratic placement, in 5600 lines of hand written code, debugged and working. He did it in 6 days while supporting a difficult client, without working weekends or evenings. I'd estimate his productivity at 10X to 100X higher than average.

    --
    Beer is proof that God loves us, and wants us to be happy.
  4. Re:I completely agree by bsane · · Score: 4, Informative

    The O'Reilly books are an example of the problem here.... their C++ books are the worst O'Reilly books I've ever read. It wasn't until I picked up 'The C++ Programming Language' by Strousup that I realized my mistakes and what C++ was really capable of.

    I agree with the premise that C++ is a great language, that is poorly understood, and often mis-used. Education would seem to be the answer to that.

  5. Re:I'm just glad they're teaching C++ actively aga by cbart387 · · Score: 3, Informative

    Where are they teaching it actively again? My school is. In fact, C++ is the primary language you learn on. There's some Java classes to expose you to it and even brief exposures to some other misc. languages (ADA/LISP/PROLOG). We also program in C for some of the classes geared towards UNIX system programming. It's a nice balance because with Java EVERYTHING is an object and it's likely to confuse freshman. Heck, it first confused me with these static mains coming from a C/C++ background. At least with C++ you can start with just functional programming to get the basis of what is variable/function/const etc and save objects till the second semester. From my experience that seems to work pretty well.
    --
    Lack of planning on your part does not constitute an emergency on mine.
  6. I've written some educational C++ articles by MichaelCrawford · · Score: 4, Informative
    They're at GoingWare's Bag of Programming Tricks, and are more in depth than most online tutorials.

    The articles are:

    • Sermon at the Soup Kitchen: On C++ Software Quality and Institutional Resistance to Change
    • Pointers, References and Values: Passing Parameters, Returning Results, and Storing Member Variables with Musings on Good C++ Style
    • On Refactoring C++ Code
    • Pointers to C++ Member Functions
    I'm no Stroustrup, but I've received quite a bit of praise for writing these.

    --
    Request your free CD of my piano music.
  7. Re:So long its not Matlab by William+Stein · · Score: 5, Informative

    > What the community needs right now is a Python distro with enough of a
    > numerics and graphics package rolled in to do 90 percent of what is in
    > Matlab.

    Good idea. This is what both Sage and the Enthought Python Distribution are
    shooting for.

    > (Are the Python people still hashing out that Numerics/Numpy divide?

    No that is done. And the lead developer of Numpy -- Travis Oliphant --
    now gets to work full time on Python scientific computing, as an
    employee of Enthought.

    > Is there an engineering graphics library that is Numerics/Numpy compatible?

    There is Matplotlib for
    matlab like numpy graphics, and Chaco for more dynamic 2d graphics. MayaVi and Sage both provide powerful 3d graphics.