Slashdot Mirror


User: e-Motion

e-Motion's activity in the archive.

Stories
0
Comments
178
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 178

  1. Re:I never contradict myself ... well sometimes I on Spolsky Stands Firm on Linux on the Desktop · · Score: 3, Insightful

    Sounds like he could save quite a bit of time and maintanence nightmare if he just invested the effort to write it well the first time.

    Yes, software development would be a breeze if we could write perfect code the first time.

  2. Re:This is why you clear pointers after freeing th on Bug in zlib Affects Many Linux Programs · · Score: 1

    This doesn't prevent attempts to free the previously freed pointer, but that will generally do a lot less damage than freeing a real malloc'd address. And during development it's trivial to add an assertion checking for a NULL pointer before any free().

    Calling free() on a NULL pointer is a no-op. No check or assertion is needed. Setting the pointer to NULL after freeing the memory is enough to protect yourself from this mistake, assuming that the pointer that you are setting is the only pointer that points to the allocated memory.

  3. Re:Get rid of C! on C · · Score: 1

    I'll start my argument with an anecdote. There is one particular C++ program I was writing, not atypical, and not a particularly difficult problem computationally. I was programming on my AMD Athlon 1400MHz, a fast computer by any reasonable standards, and found that it wasn't running as fast as I'd like. I profiled it, and found the functions to blame were operator overloads (called very frequently) on a class coord, which looked something like this:
    friend coord operator+ (coord a, coord b) { return coord(a.x+b.x, a.y+b.y); }
    Spot the error on that line. Now, ask someone who's never programmed in C before to spot the error. Give up? It's the passing by value, which prevents the compiler from inlining the function; the correct way to write that function is:
    friend coord& operator+ (const coord& a, const coord& b) { return coord(a.x+b.x, a.y+b.y); }
    If not for my experience programming in C, I never would've realized that.


    As someone else pointed out, the function should return by value.

    Your experience with C has nothing to do with your ability to eliminate the bottleneck. C doesn't even have references. Not only that, but any C++ programmer worth a damn understands what copy constructors are, and what passing by reference means. If he can't understand the difference between the two functions above, and why one is more likely to be more efficient than the other, then he doesn't understand _C++_, not C.

  4. Re:Spot ad on Rep. Bill Jones Thinks Spam is "Innovative" · · Score: 1
    What if this kind of behaviour wasn't just immoral, but probably illegal too in this country, and so the candidate had evaded American law by using a school in a third world country to send out his publicity?

    I sincerely hope that you are not referring to South Korea.

  5. Re:Inexperienced programmers and C/C++ on Why Coding Is Insecure · · Score: 1

    I went into a big Visual C++ project this year, after an education mostly on Solaris and BSD, and found the answer to that question: because anything that comes after std:: in the Microsoft libraries, such as the STL, is likely to be riddled with bugs to the point where it becomes unusable in anything but a trivial sample program.
    Of course, in retrospect, this is to be expected, because after all things like the STL are supposed to be cross platform, whereas Microsoft provides plenty of Windows-only alternatives. (Not std::string! CString!)


    What on earth are you talking about? While I recognize that MSVC++ doesn't have the best template support, you seem to be attacking the libraries themselves. The company that produces those libraries is Dinkumware, not Microsoft. And if you were having problems with the library that you couldn't work around with still-legal code (which I find hard to believe), then you can upgrade those libraries for a small fee (for a company) at http://www.dinkumware.com/libcppvc.html.

    Also, STLPort offers a free STL implementation.

    I know it's really cool to bash MS, but you just bashed the wrong company.

  6. Re:It's about time! on Java Native Compilation Examined · · Score: 1

    The point is that an operator overload might make complete sense to the person that programmed it. The next person who looked at it may have used a different convention and interprets it differently.

    Named member functions are not saved from abuse.

    As an example, I overload (file--) to delete the file.

    In a nutshell, this reads "decrement file". If you were to write a member function that did this and meant the same thing when read, you might call it decrement(). Both are equally absurd.

    "WTF does file-- mean?"
    "WTF does file.decrement() mean?"

    It's all about convention. Operator overloading is not something that you play with "just because". You're not going to make the -- operator delete a file, because nobody in their right mind associates it with deleting files. You use operator overloading to improve readability by allowing the programmer to use an operator to express the generally understood meaning for that class. Anyone who ventures from the beaten path and changes the meaning of the operator dramatically is only obfuscating his source. Does that mean that nobody should be allowed to do it? IMHO, no. It has its advantages, when used properly. We can ignore the fools.

  7. Re:C Advocacy on Free Software Magazine · · Score: 2, Interesting

    C++, on the other hand, I hate, becuase it doesn't give you this fine-grained control (for example, the in-memory layout of a class containing virtual methods is largely implementation-defined, I believe).

    I've never understood this version of the "C versus C++" argument. C++ was based on C. A few things were changed, but an attempt was made to maintain backwards compatibility with C when it didn't compromise safety and design.

    From "The Design and Evolution of C++", page 120:
    "C++ doesn't aim at 100% compatibility with C because that would have compromised the aims of type safety and support for design. However, where these aims are not interfered with incompatibilities are avoided - even at the cost of inelegance."

    C++ generally added new features to the language to support design. If you want to write a program as you would in C, you can do that. If you want to access a struct directly based on its memory layout, then go ahead. You still have access to the lower-level constructs that C provides. If a new feature of the language causes problems with this, then simply don't use the feature in that situation. For example, in your vtable situation, you could have the raw data contained in its own struct, and the class with virtual functions could contain that struct.

    In short, C++ has extra "stuff". Usually, this "stuff" doesn't interfere with the old "stuff" in C. I don't understand why "anti-C++" C programmers feel that C++ is less powerful than C, when C++ was intended to maintain a high degree of backwards compatibility with C, and still supports most of the features of the language.

  8. Re:Repeat post on Interview with Stanley Lippman, Mr. Visual C++ · · Score: 1

    Second, I develop in VC++ but I don't care if it is standard compliant or not. It is a windows only development solution and will probably remain so. There several others compilers which would let me write STL or Loki compliant code if need be. The only part I hate is some of the junk code generated by the wizards.

    Why do you separate standards compliance and windows programming? Standards compliance affects all of us. It is unfortunate that MSVC++ is both popular and non-conforming, because programmers are both limited and frustrated by it.

    What I want to happen to others and myself:
    They try to write good, re-usable code and, more importantly, use the C++ language to its fullest extent. It works because the programmer knows how to write C++ code (which isn't asking too much).

    What I don't want to happen:
    After a few hours spent arguing with the compiler, the programmer says "screw it" and uses some sort of half-assed, possibly VC++-specific approach.

    I don't know about you, but I like being able to use the standard library to its fullest extent, and I don't like being held back by a poor implementation. It simply wastes your time. You end up saying "well, it should have worked, but now I have to spend some time figuring out why it didn't work and what I have to do to make it work on this implementation."

    Compliance to the standard isn't a cross-platform code issue with me. It is about frustration. I don't want excuses, I want it to work. Granted, I can accept some deficiencies, but it's clear to me that MSVC++ needs to get its act together to make it less of a pain to use.

  9. I'm not holding my breath on Interview with Stanley Lippman, Mr. Visual C++ · · Score: 1

    To me, the export keyword is a "nice to have", and not a "must have". Personally, I'll consider export a viable alternative to defining templates in the header when a broad range of compilers support it. Unfortunately, it seems that most implementations will be lacking it for a while longer. The compiler that is closest to supporting it, AFAIK, is Comeau.

  10. System requirements on Beta Sign-Ups for WarCraft III · · Score: 3, Informative

    "However, now that they have added 3D chip features, Warcraft III will probably need either a decent video card (Geforce or greater) and/or a relatively fast processor (600-700 Mhz+). Of course, these are guesses."

    The system requirements are listed in the FAQ (http://www.blizzard.com/war3/faq/faq-features.sht ml):

    "What will the system requirements be?
    It is important to us to make our games playable on as broad a range of machines as possible, and we do not see WarCraft III as an exception. We are planning on having a requirement of a PIII 400 system with a 3D accelerator card and 64megs of RAM. Currently, we are working on game performance and should be able to give more concrete information soon."

    Since they are requiring only 400 Mhz and 64 MB of RAM, they most likely will not require a Geforce+ card to run this. That's a relief for me! Whew!

  11. Re:seriously? on Nintendo Declares GCN Most Popular Console Ever · · Score: 0, Offtopic

    Upon entering the conference room I was greeted by two secret service special agents who then proceded to interview me regarding what was going through my mind when I wrote said comment. The interview concluded with a ride in a SS issue sedan to my residence and a guided tour of my house for the special agents.

    Well, you _were_ discussing killing the VP. While I can understand that, in context, it's not as bad as it first seems, the agents were definitely doing the right thing.

    Suppose you were participating in a conversation going on in a public place with some random individuals, which happened to be about murder. Perhaps it concerned horrific murders, and somehow drifted to a hypothetical situation where someone might want to kill you. You eventually agree that there might be a reason that someone would want to kill you.

    Now, think about how you'd react if some random guy you'd never met before just walked up and said:

    "You know, if I were going to kill you, I'd probably sneak up behind you, kinda like this. Then, I'd take my gun..." (holds out his hand like a gun) "...and pistol whip you to knock you out." (acts like he's striking you) "Then, I'd bend over you and...BLAM! BLAM! BLAM!...you know?"

    He then smiles, winks, and walks away.

    I think that would be pretty unsettling.

    I also think that, with the way things are currently going in the US, talks about killing officials, even hypothetically, need to be investigated. Granted, my analogy was exaggerated, but one should consider the current tension in the US before dismissing the situation proposed as completely different and misleading.

    And, to be fair, I didn't hear any mention of harm done to you, as some slashdotters seemed to imply. Perhaps you were inconvenienced, but, considering the situation, that's to be expected.

  12. Re:Patent & Copyright are irrelevant on U.S. Court Ruling Nixes EULA Sales Restrictions · · Score: 1

    Patent & Copyright are irrelevant to reverse engineering issues. Patent prevents you from using the idea, copyright prevents duplication (except for fair use.) Neither prevent you from playing with a thing you've bought to determine how it's made, they just restrict what you can do with that knowledge.

    But that's what is being discussed. The people who were prosecuted under the DMCA were distributing information that could be used to circumvent copy protection (or "a mechanism for protecting copyright", or whatever you want to call it).

  13. Re:Anyone heard about Comcast's backup plan? on Excite Could Go Dark On Friday · · Score: 1

    You should have gotten an email (although it is not heavy on the details). Here is what I received:


    Dear Comcast @Home Customer,

    On Friday, September 28, Excite@Home, the Internet service provider for
    Comcast @Home, filed for Chapter 11 bankruptcy protection to allow them
    the opportunity to restructure their financial situation with their creditors.
    As you may know, financial restructuring allows companies that have declared
    bankruptcy to continue to operate their business successfully.

    More than five years ago, Comcast committed to the high-speed Internet
    business by partnering with Excite@Home, and we continue to be committed
    to providing high quality, reliable service. We are confident that Excite@Home,
    whose major shareholders include AT&T, Cox and Comcast, will maintain all
    e-mail and web space services for our customers.

    Comcast will continue providing its customers with the best high-speed
    Internet service both now and in the future. We are doing everything possible
    to ensure that the 950,000 customers we will serve by year-end will continue
    to be served well while Excite@Home restructures its financial situation.

    Comcast views high-speed Internet as one of the most important products
    in our portfolio and we remain committed to this business and to our customers.
    We thank you for choosing Comcast and look forward to continuing to provide
    you with the best high-speed Internet service available.


    Mostly fluff, unfortunately, but it does seem that Comcast intends to maintain service to its users. Note that the email is from a while ago (received september 30th).

  14. Re:Static verification vs. type-safe languages on C with Safety - Cyclone · · Score: 1

    In 1999, the Ariane 5 launcher exploded a few seconds after leaving the ground. The faulty program, written in type-safe Ada, has been submited to a static program analyzer developped by Alain Deutsch at INRIA in France. The analyzer spotted the error right away! It was a number going out of range after too many iterations and wrapping back to 0.

    Google is your friend:
    Ariane 5 link one
    Ariane 5 link two

    Both of those indicate a conversion problem from a larger value type to a smaller value type. If that is what happened, then a "type checking engine" should find that. Perhaps indications of the problem were ignored (one of those links suggests that it was possible).

    I doubt anyone would suggest that static typing is a panacea. It is not the answer to everyone's problems, but it does help every now and then.

  15. Re:REDUNDANT AND MISINTERPRETATION! on Poll Says Most Americans Favor Crypto Backdoors · · Score: 1

    I hadn't seen it posted on slashdot before. Why were you modded redundant?

    The horse is not only dead, but it has been sent to the glue factory. Time to find something else to say about the matter.

  16. Re:Public vs. private school funding on Scientific Elites vs. Illiterates · · Score: 1

    In other words, Rush Limbaugh is a big fat liar. But you already knew that, right?



    No, but I did know that Rush Limbaugh is a big fat idiot.

  17. Re:Here in .BE, it was DOS software :-( on Debian GNU/Linux Used in Electronic Voting Trials · · Score: 1

    Hmmm..well, of course it's not about the US being introduced to it (it's about AU). I should say that electronic voting has already been implemented in the US.

  18. Re:Here in .BE, it was DOS software :-( on Debian GNU/Linux Used in Electronic Voting Trials · · Score: 1

    I don't quite get it: al you .AU and .US people are so wrapped up about the NEW idea of electronic voting? Here in Belgium, 90% of the people voted electronicly the last elections, and some villages (eg where I live) started with electronic voting some 8 years ago or so.

    No, this is not an article about how the US is being introduced to electronic voting. Different parts of the US have different voting methods, and those methods include electronic voting. This article is about linux being used for electronic voting. "Stuff that matters"? I'm not sure.

  19. Re:I thought it was Charlie Pride... on CD Copy "Protection" in California · · Score: 1

    I was going to buy it just to play around with it. It's totally ludacris to say it can't be copied.

    I'm not really sure what Ludacris would say about this protection, but I bet he'd think that it couldn't be copied, and would jump on the bandwagon as well. Oh, wait, you meant ludicrous.

  20. Re:Despite Cmdr Taco's *sigh*... on New Mexico Drops out of Microsoft Case · · Score: 1

    Hehehe, most of us wouldnt *know* enough about the Backstreet Boys or Briteny Spears to know the lyrics to a song or tell the difference.

    I have an hour-long drive to and from work, and I listen to the radio. 'Nuff said.

  21. Re:Despite Cmdr Taco's *sigh*... on New Mexico Drops out of Microsoft Case · · Score: 1

    I'm just saying that as the lame Backstreet boys say Microsoft "is stronger than yesterday...."

    I think you have confused the Backstreet Boys with Britney Spears. Easy way to distinguish them: one is a good example of how looks can land you a singing career; the other is an example of how adding a pair of breasts can land you a pepsi commercial as well.

  22. Re:How you code the algorithm really does matter on The Great Computer Language Shootout · · Score: 1

    This code potentialy has a O(n^2) complexity if the size of vector is calculated dynamically each time size() is called versus...

    Given the requirements placed on a vector, I'd be incredibly surprised if it calculated its size on the fly. That would be one incredibly strange vector implementation. I could see this being potentially true for a list, but a vector? Let's be serious here.

    Of course, we should be using for_each() anyways, eh?

  23. Re:Make a decision, folks on ORBS Forks · · Score: 1

    Censorship is either good or bad. Pick one.

    Since you were so curt, I'll try to be curt, too. Absolutely not. People do not make black-and-white decisions and blindly apply them everywhere; they use judgement based on circumstances. I don't even think the word censorship applies here.

  24. Re:Missed Naming Opportunity on Making Last-Mile Ethernet A Reality · · Score: 1

    In light of the new SOAP protocol, I think calling it "Network of Optical Passive Ethernet" would have been even better. Then we could have fun saying that we can do SOAP over NOPE (via ROPE, too!).

  25. Re:This isn't at all redundant. on Speak Up On Software Patents And WIPO Rules · · Score: 1

    I can't wait until that really funny guy posts...And then there's his friend, the one who laments the idiocy of the patent office and cites the Amazon 1-Click patent.

    The funniest thing about this comment is the very next comment jokes about one-click. Man, we are geting too predictable! =)