Slashdot Mirror


User: ron_ivi

ron_ivi's activity in the archive.

Stories
0
Comments
1,041
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,041

  1. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Adopted? Of course it was adopted into the standard when the standard was adopted.

    A more fair question would be "when was it incorporated in the language"? 1993 is when it was debated by the standards committee, so about 11 years.:

    Date: 1993-05-24 09:34:31 PST
    Newsgroups: comp.std.c++, comp.lang.c++

    The "using" keyword is primarily intended to...

    Oh, and did you know that C has this new feature where it can check the types of arguments? :-)

  2. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    That's actually a decent (not good but not bad) answer in an interview. Especially if you can describe what's ugly about it (depending on whether or not implicit conversions can take place).

    The problem is that even if someone doesn't _write_ ugly code like that, it may be the case that they'd have to _maintain_ something this ugly. If they can't read it, they might spend a lot of time rewriting it (which arguably may ultimatelly be a good thing anyway - but it's good to find out in the interview if you have close deadlines).

  3. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    "C++ will never have these capabilities."

    You might be interested in reading the papers on Visual-C++dotnet. It (through wierd thingies similar to pointers but different) will be able to run under a VM. Since it has guys from the C++ standardization body architecting it (Herb Sutter, from the infamous gotw question that started this thread), it would be interesting to see how it evolves and if these extentions get brought back into the standard.

    I think it's premature to say it'll never get in there.

    Oh, and regarding garbage collection, C++ has that too, through Boehm's garbage collector that works with C and C++

  4. Debian can just call it... on Mozilla Cracks Down On Merchandise Sellers · · Score: 4, Informative
    Following the link to the Debian debate, Andrew Suffield from debian.org wrote: " think so, but I'm not so sure about modified versions of Firefox. Clause 7 is the relevant one here. You can always construct something that is distributable under the GPL by modifying it to change the name and artwork, though.

    So the Debian guys could just change one letter and change the "o" to a "u" in FireFox, pronounced firefu.. :-)

  5. Alternative Debian installers. on Debian Installer Beta 3 Usability Review · · Score: 3, Informative

    Rick Moen has a great page of alternative Debian installers if you don't like this one.

  6. Do we need a TGPL on Mozilla Cracks Down On Merchandise Sellers · · Score: 2, Interesting
    Sounds like we need a Gnu Trademark General Public License.

    Perhaps something that lets other people use the a trademark in most cases, so long as the guy using it doesn't use it in ways that invalidate the trademark..

  7. Unreasonable expectations. on Exploiting Software · · Score: 2, Insightful
    From the article: " early computers were not designed to work in the network environment, and even most software written later was designed to work on benevolent networks "

    Ugh that's like saying "most office desks aren't secure since their locks are weak and can be drilled easily".

    Part of the problem is one of expectations. When people use insecure components and have unreasonable expectations that the'll magically be safe because one piece asked for a password.

    There's nothing wrong with components (desk locks or computers) that expect to be kept in benevolent environments.

    Next they'll be telling us Wikipedia's not secure because their password-checker is weak.

  8. Re:Wow! on C Alive and Well Thanks to Portable.NET · · Score: 1
    "Can I get them to compile asm to java bytecode next?"

    I've actually had a job doing this by hand. Worked a bit on a chip with a hardware java core and was porting DSP algorithms to Java Bytecodes.

  9. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    "How can I show you a section that doesn't exist?"

    You claimed that there exceptions to the clause in the standard that I quoted. If the clause doesn't exist, then where do these exceptions that you're claiming come from?

    Let's take this part of the conversation over to comp.std.c++ where we'll find people interested in this point (and who have access to the ratified spec and will help research it).

    " I know the answer without looking. Do you?"
    Yes, I do. In my case it comes from spending too much time on a platform where sizeof(long)==5.

    " Instead, ask them to write code, even if breaks down into pseudocode, to determine how smart they are, and how they think. Ask them to write a quick text encryption tool...."
    Better to ask both types of questions. Reading and understanding other's people's code is just as important a skill as creating original code. This is what the example being debated tests - it simply asks which function gets called.

  10. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Cranx wrote:

    "You're mis-reading that description (5.3.5). [...] The behavior is undefined ONLY if the dynamic type has a destructor. "
    Then please enlighten us. Tell me what section says "oh, but if you didn't have a user-defined destructor, don't worry about 5.3.5". The parts of the spec I quoted were clear, and made no exceptions like the one you claim about the clause only applying under specific circumstances.

    "For starters, structs all have vtables."
    No they don't. Structs without any virtual methods are just like old C structs in many (most? all?) implementations.
    http://www-cs-students.stanford.edu/~sjac/c-to-cpp -info/virt-funct
    "Note that any object which has no virtual methods has no vtable."

    "Don't insinuate I'm a bad programmer. "
    I never tried to suggest you're a bad programmer. Just that your understanding of C++ is quite incomplete. So far you made very strong statements about what keywords you didn't think C++ has, and implementation dependant assumptions about the existance of vtables.

    These don't say anything about your programming skills - but certainly reveal that you think you know more about C++ than you actually do. Note that if you just rephrased things (like "I'm unaware of this keyword, but here's another way to make the base classes methos visible" or "in my compiler most structs have vtables") you would be more convincing, instead of trying to generalize your experience and claiming it applies to all of C++.

  11. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Sure it does no harm. And in some implementations I bet you could even combine "new" with "free()" and "malloc()" and "delete" and get away with it. Just like writing past the end of the array is harmless much of the time.

    However the fact of the matter is that the language definition for C++ states that deleting an object without the virtual destructor through a pointer to it's base class is "undefined behavior".

    From a recent draft (the ratified standard costs $$$, but near-complete drafts are freely available): 5.3.5 "Delete", paragraph 3: "...if the static type of the operand is different from its dynamic type, the static type shall be a base class of the operand's dynamic type and the static type shall have a virtual destructor or the behavior is undefined."

    If you enjoy writing code whose behavior is undefined, and your compiler often does what you want it to -- great. But don't try to claim this is valid C++.

    Consider this hypothetical case: If an implementation wants to allocate small structs (things with no vtable) in one memory area (say, on-chip) and large ones in another (say, an external dram); in my understanding it is possible to have a valid compiler that does so. In your case you might be deleting from the wrong pool of memeory.

  12. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Partent wrote: "That this guy chaired on the C++ committee means nothing...he's perfectly capable of spewing utter nonsense as much as anyone else."

    Before calling people clueless, you should check their credentials.

    Herb Sutter is also:

    • Currently Visual C++ architect for Microsoft
    • former editor-in-chief of C++ Report
    More than anyone else in the world, this guy not only knows C++, he defines what it will become. Before dismissing what he has to say, it's worth reading his papers about C++ and .net to see the future of this languages.

    I really thought you were being sarcastic and shooting for funny on your first posting to this thread when you wrote "The guy that wrote that doesn't know squat about C++, and you ought to NOT quiz your programmers based on THAT garbage" and "There's no such keyword in C++." (And finally, yes, in your first post you were wrong about thinking it's safe to use destructors the way you described. Like a stack overflow, just because you haven't run into a problem yet doesn't mean it's safe to be sloppy programming in C++.)

  13. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Excellent advice.

    Much like 'lint' in pre-ANSI-C, I agree with you that additional tools (-pedantic, -Wall...) can make C++ far far safer.

    PS: for all those guys flaming me about asking this as an interview question; scrytch's response ranks among the very best answers I would hope to see in an interview. The point of the interview question isn't to get every piece of trivia right, but to hear the person think outloud about topics like "overloading", "hiding", standard library ("complex<double>), and see how they approach the problem.

  14. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    "#3: What the hell is "using!?" There's no such keyword in C++. To make base functions visible, first mark them as virtual in the base, then to call them, use the syntax BaseClass::function. "

    Cute. That's exactly the kind of response I get in the interview.

    That and "what does complex 'less than double' mean, and why's there a greater-than at the end" when they see "complex<double&gt";

    "The guy that wrote that doesn't know squat about C++

    LOL :-)
    For those that don't know, "the guy who wrote that" example chaired the ISO C++ standards committee.

  15. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    We don't disagree.

    That's why I said I expect C + (one of python, Java, C#) to survive.

    However when I'm hiring programmers for an existing C++ project, I'd at least like them to know which functions will be called when they read the code.

    Ron
    "Programming ... in a high level language is like playing a piano with boxing gloves." -O. Bunemann

  16. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 1
    Yeah, it's not really a straightforward question.

    But try to construct a similar question in Java or VB or C# or C or Python and 90% of programmers _will_ figure out which function gets called.

    Tripped me up the first time too - forgot about when the default parameter's value was selected. And I read that question back during a phase of my career when I enjoyed reading standards and drafts of standards.

    I find it scary that in C++ it's possible to write a program where most people guess incorrectly which function gets called. (yes, I know about the obfuscated C contests, and those trip up people too - but at least there you don't think you know what'll happen)

    The saddest part is that when I ask the question most people don't know what "complex" means. These days if someone gets past that part I'm happy.

  17. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 2, Insightful
    Parent wrote: "usage of c and it's derivatives (c++, objective-c) is more likely create buggy and insecure software."

    However note that you can write insecure code even with MSWord or Excel macros.

    (but yeah, I agree with you in general - high level applications shouldn't be worrying about the stuff you mentioned)

  18. Re:Miguel is dead! on Mono Poises to Take Over the Linux Desktop · · Score: 4, Interesting
    Parent wrote: "I'm not a C++-hating C bigot "

    The more I try to hire good C++ programmers, the more I become a c++hating bigot.

    When over 95% of "C++ programmers" that I interview can't even answer this: straightforward question about virtual methods, I see no hope for the language. It seems most people who claim to be C++ programmers just say that because they use a C++ compiler and stick their functions in objects.

    The future I expect is a mix of a higher-level language (Java, C#, perhaps even Python) and C. I can think of cases where C is the right tool for the job (small memory embedded systems), and I can think of cases where Java/C# is (large scale enterprise software); but I don't see C++ as the right tool for either job.

  19. Re:Spam is very simple to fix. on Peer to Peer and Spam in the Internet · · Score: 4, Interesting
    Or use a "sender pays but only if the recipient wants to charge" scheme.

    For example, every email has a button saying "charge the sender $0.10". It's at the recipient's option whether or not to charge the guy.

    For emails from friends I'd never hit the button. For spams I would.

  20. Re:Computers are much better for looking things up on How The Web Ruined The Encyclopedia Business · · Score: 2, Informative
    Parent wrote: "results from the venerable Wikipedia (generally) excepted, I'd trust an encyclopedia"

    Regarding Wikipedia and trust, the "page history" feature on the left can help. Not only will the page history protect you against recent vandalism (i.e. in case you see a damaged page before someone has a chance to correct it); a frequently edited page with many contributors may be more reliable than a page that had less peer review.

  21. Doesn't this scream DMCA violation? on Getting Around Printer-Manufacturer Abuse · · Score: 4, Funny

    It seems it's defeating a security feature...

  22. AskJeeves Denounces Paid Inclusion. on Yahoo To Charge For Search Listings · · Score: 4, Informative
    CNet's reporting that AskJeeves denounces paid inclusion

    " AskJeeves will stop accepting advertiser payments for inclusion in its searchable Web database, a move to draw competitive lines between it and Yahoo's new search engine."

  23. Re:Didn't Yahoo learn the first time? on Yahoo To Charge For Search Listings · · Score: 5, Interesting
    Remember way back when Yahoo had a simple interface with only two images on the very-quickly loading home page.

    That was back when they cared about user experience and their stock was at an all time high.

    PS: Note that the Y2000 problem was real!!! Within one week of Jan 1 Y2000 both Yahoo and Microsoft were at their all-time high; and have never recovered since.

  24. It _can't_ know which pr0n I think is spam vs good on Two Spam Filters 10 Times As Accurate As Humans · · Score: 4, Funny
    I signed up for lots of junk mail lists; some solicited, some not -- sometimes from the same organizations.

    How would it know if I consider brunettes non-spam but blondes spam? I did opt-in for one of those email categories, but not the other.

  25. They could work with Creative Commons. on NASA Open Source License Still Up For Discussion · · Score: 4, Interesting
    I hope they take a look at what rights they want to protect, and if it fits one of the existing Creative Commons licenses, use it.

    More importantly, if it doesn't fit one, it does identify a need for another license, and they could work with creative commons to create a new license that fits that need that everyone can use.