Slashdot Mirror


User: Joce640k

Joce640k's activity in the archive.

Stories
0
Comments
11,688
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 11,688

  1. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 3, Insightful

    Complete rubbish. Compiler writers aren't stupid, they know how to optimize std::vector. Go and disassemble some std::vector code before posting stuff like this.

  2. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    So ... no actual desktop apps then?

  3. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 2, Insightful

    Code is complex, sure, but where does the RAM usage come from? At the end of the day the data being processed is a few kb of text and some bitmaps.

  4. Doing it wrong. on The Rocky Road To Wind Power · · Score: 5, Funny

    FTS: " In Idaho trucks laden with tall turbine parts have slammed into interstate overpasses requiring hundreds of thousands of dollars in repairs"

    You're supposed to put them on the truck parallel to the ground.

    Just saying.

  5. Re:Forty acres and a flying car... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    OK, wise guy, let's have some examples! Put your money where your mouth is!

    What features could you remove from C++ without hurting it? I'll even let you start over and not keep backwards compatibility with old code.

    FWIW: Yes, I can think of one such feature but you seem to have lots ... let's hear 'em!

  6. Re:And nothing of value was lost on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 3, Insightful

    The big problems with GC are:

    a) Resources are more than just RAM. All files, network connections, etc., have to be manually closed in Java. There's no way to automate this (no equivalent to C++ stack unwinding) and it ends up being more work than managing RAM in C++ (where the compiler does 99.99% of the work for you).

    b) Even if you're only managing RAM, a garbage collector will totally destroy your performance if you run out of it and start paging to disk. To me, anything which continually scans the entire heap when you're out of RAM is a showstopping problem and makes GC useless for real applications.

  7. Re:And nothing of value was lost on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    If you have cyclic graphs then you're using the wrong sort of pointer.

    Smart pointers should only be used where a resource is being managed, not for creating links between objects - use a weak pointer for that (or even a plain old C pointer).

  8. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    The "elephant in the room" problem with GC is that computer resources are more then just "RAM".

    As soon as you start adding files, network connections, etc. into the mix then you start having to do manual memory management in Java - where it's really verbose (you have to do it manually, *every time* you use a file) and easy to forget (you have to do it manually, *every time* you use a file).

    In C++ the compiler writes the calls to finalize() for you automatically. You can't forget, because you never have to remember to do it.

    Garbage collection seems like a good idea but in practice it fails miserably and ends up being more work and more error prone than managing RAM in C++ ever was.

  9. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 2, Insightful

    "Could that be because Bjarne first named it "C with classes"?"

    It's because writing good C++ requires a lot of patience and self-discipline, something that most "programmers" simply don't have (or they're always up against a deadline or some other excuse for "just get it working, we can tidy it up later",- which never happens and you go into a downward spiral).

  10. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    auto_ptr is awful, absolutely useless for actual memory management (eg. can't be used in std::vector) and not really very "smart" at all.

  11. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 2, Informative

    Um, yes. And they do.

     

    Take a look at something like Acronis TrueImage (or any Norton program) before/after their transition from C++ to C++-with-C#-user-interface.

    Installer before: 29Mb

    Installer after: 290Mb

    Memory usage: Completely unusable on a 512Mb machine

     

    nb. I use these as an example because they're the only commercial apps I can think of that use .Net.

  12. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    Have garbage collectors got to the point where they can avoid scanning the entire heap when the going gets rough? Scanning the entire heap when you're low on RAM and paging to disk isn't too smart - performance will drop by six or seven orders of magnitude.

     

    Last time I checked, the 200,000 lines of C++ that I'm working on had exactly 19 "delete" statements in it, everything else is automatic. The is hardly "manual memory management".

  13. Templates can be abused on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 1

    The key word is "can". Nobody's forcing you to abuse them.

     

    I agree with the guy above though: C++ needs templates because it needs things like std::vector, std::string and smart pointers. The problems appear when "creative" people get hold of them.

  14. Re:And nothing of value was lost on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 2, Insightful

    Funnily enough, all the features you mention are ones which CAN be fixed with "a good support library".

     

    (Apart from the include files...)

  15. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 4, Interesting

    That's funny cause I've never seen a single C# or Java app.

     

    Where are they? If C# and Java are so great, where are the apps? It's been, what, twelve years since it was announced that they'd take over the world and make C and C++ obsolete but I've yet to see a C# or Java program that wasn't some simple sort of utility or the GUI layer over a C++ app (eg Norton products).

     

    What I have noticed is that all those "GUI layer over a C++ app" programs are enormous. 200Mb for a disk backup program (both Norton Ghost and Acronis TrueImage went from 20Mb to 300Mb during their transition-from-C phase and neither of them seems any better off for it.

     

    Firefox memory usage is a mystery to me. I can't conceive of how it uses so much memory just to show a few pages of text with embedded images. The other browsers aren't really far behind though so maybe I'm missing something.

  16. Re:How about a REAL C++ feature.... on Stroustrup Says New C++ Standard Delayed Until 2010 Or Later · · Score: 5, Insightful

    The problem is the amount of C programmers/thinkers who think they're writing C++ just because they type "class". It doesn't work that way, C++ is a totally different language.

     

    eg. If you're Doing It Right then it's impossible to get a "buffer overflow" in C++. Most of the exploits you see are down to buffer overflows so I leave you to draw your own conclusions about the programmers.

     

    Problems with C++ that will catch C programmers:

    • Lack of a standardized smart pointer. That would have made a huge difference.
    • Arrays. Arrays are evil. C++ should have skipped arrays and gone directly to std::vector.
  17. Re:I don't get it... on America's 10 Most-Wanted Botnets · · Score: 3, Informative

    Simple: There's always a window between a virus appearing in large numbers and an antivirus updating itself. Get a copy of Virtual PC and try it yourself - get a few viruses from your daily spam. I do it every once in a while and it can take two or three days for my antivirus to kick in. Today's Viruses can disable all the major antivirus programs and prevent you from rebooting in failsafe mode to delete them so once they're in, they're in. There's no way for the antivirus to get rid of them.

  18. Re:Halfway Competent on Undercover Cameras Catch PC Repair Scams, Privacy Violations · · Score: 4, Insightful

    If you mean "exceeds the cost of the hardware", then yes.

     

    OTOH there's still some people who believe a repair job doesn't automatically mean the loss of all the data in the machine.

  19. Statistics on Visualizing False Positives In Broad Screening · · Score: 1

    It's obvious that the person telling us about statistics doesn't understand statistics.

     

    On the subject of terrorism, why not simply arrest everybody, just to be sure...?

  20. Re:Just Takes One on First New Nuclear Reactor In a Decade On Track · · Score: 1

    a) Insurance companies do life insurance every single day, b) There is no "meltdown" with modern reactors.

  21. Re:Just Takes One on First New Nuclear Reactor In a Decade On Track · · Score: 1

    Let's not forget that the USA used to treat atomic bombs like firework shows. People would go down to Vegas for the weekend and drive out to watch the mushroom clouds rising.

     

    Where's the comic-book-like nuclear wasteland in the USA? Surely there must be one...

  22. Re:Just Takes One on First New Nuclear Reactor In a Decade On Track · · Score: 1

    Yes, let's not forget that a major design goal of the 1950's reactors was bomb production, ie.. they wanted filthy byproducts from the reactions, and lots of them. It was an arms race and the product of that race was reactors like Chernobyl.

  23. Re:Just Takes One on First New Nuclear Reactor In a Decade On Track · · Score: 4, Informative

    Ummm .... just how many deaths and how much radioactivity was released by 3MI? Approx: None.

     

    The ONLY lesson to be learned from Chernobyl is that a tin roof over a bad rector design isn't a good combination. Modern reactors have both failsafe designs AND better containment, so no, it can't happen here. Reactors like (eg.) the Pebble Bed reactor have no unstable state. Even if some lunatic director goes berserk in the reactor control room he can't cause a meltdown.

  24. Multi boot on Delete Data On Netbook If Stolen? · · Score: 1

    Set it up with multiple boot options, and the default one does something nasty.

     

    If you don't select the right boot option when you switch it on ... Zap! One wiped disk.

     

    If you can wipe the BIOS...even better.

  25. Movie in 3 minutes? No problem...! on Reasons To Hesitate On Zer01's Unlimited Mobile Offer · · Score: 5, Insightful

    You can have a two hour movie at 1080p resolution in 1Mb of data if you're not too fussy about image quality.

     

    Resolution is one thing, bitrate is something else.