Slashdot Mirror


User: alexo

alexo's activity in the archive.

Stories
0
Comments
3,441
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3,441

  1. Re:Then learn the language better, stupid on C++ 2011 and the Return of Native Code · · Score: 1

    I am curious, since my c++ is quite rusted, how do you acquire a resource that can throw upon initialization in c++ ?

    You use a try .. catch block. However, that is completely unrelated to specifying the life-time of the object and can be set at a higher level, possibly even in main().

    Or is checked exception usage is discouraged in c++ ?

    There are no checked exceptions in C++. There are exception specifications but they were a bad idea that got deprecated in C++11.

  2. Re:Then learn the language better, stupid on C++ 2011 and the Return of Native Code · · Score: 1

    it is not that backward look at http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

    RAII does not require the consumer of a class to wrap the object in a try block.

    what do you propose instead ?

    How should I know? I use C++ for my day job, not Java.

  3. Re:Then learn the language better, stupid on C++ 2011 and the Return of Native Code · · Score: 1

    and in java 7 with the try-with-resources it is handled for you.

    Sounds luke the C# using statement and the corresponding IDispose interface.

    Which is a bass akwards way of doing things, as it makes proper object cleanup the responsibility of the object's user.

  4. Re:Then learn the language better, stupid on C++ 2011 and the Return of Native Code · · Score: 1

    What you quoted doesn't contradict what I said.

    OK, let's spell it out then. You said: It's better to close your files and connections, but they'll be garbage-collected for you if you don't.

    Now, riddle me this: what guarantee do you have that the GC will run at all?
    If the GC decides that your program has enough available memory it may never run, it will just sit there waiting for some threshold while your program merrily consumes scarce resources that it knows nothing about.

  5. Re:Then learn the language better, stupid on C++ 2011 and the Return of Native Code · · Score: 2

    I can't speak for .net, but in Java you have very little need for it. It's better to close your files and connections, but they'll be garbage-collected for you if you don't.

    Not according to the Java documentation:

    Some applications interact with garbage collection by using finalization and weak/soft/phantom references. These features can create performance artifacts at the Java programming language level. An example of this is relying on finalization to close file descriptors, which makes an external resource (descriptors) dependent on garbage collection promptness. Relying on garbage collection to manage resources other than memory is almost always a bad idea.

    Also, for the fun of it, look at:
    http://stackoverflow.com/questions/6470651/creating-a-memory-leak-with-java

  6. Re:Bad c(r)op on Cop Seeks Wiretapping Charges For Woman Who Videotaped Beating · · Score: 1

    There are some realy good cops. My brother-in-law is an a copy in my hometown, a smallish city. [rest of story snipped for brevity]

    I beg to differ.

    A good cop is one that protects the populace against criminal elements, including his or her fellow cops. For example, a good cop will arrest a police officer that commits a crime.

    A good cop is one that upholds the laws, impartially, including cases when the laws are broken by his or her fellow cops. For example, a good cop will ticket a police officer that speeds.

    Unfortunately, there is no such thing. A "good cop" is as real as the tooth fairy, your belief in your brother in law's virtues notwithstanding. Some people say that "a good cop is a dead cop" and I agree, but not for the reason you think. Any cop who really tries to be a good cop will have an "accident" arranged by some of their "fellow" cops that will quickly persuade them to fall in line, leave the force and emigrate or permanently stop breathing.

    Good cops are like spider-man in two ways:
    1) They are ware that with great power there must also come great responsibility.
    2) They do not exist.

  7. Re:iiNet on BitTorrent Trial Makes Australia's High Court · · Score: 1

    wow, it's like a battle of wits between two unarmed opponents.

    Would that be a battle of twits?

  8. Deja vu on Dashboard Avatar To Replace Car Owner's Manuals · · Score: 1

    an on-screen avatar that will talk to drivers, and even understand their spoken questions

    Driver: What's the problem?
    Car: I think you know what the problem is just as well as I do.

  9. Re:More Distractions on Dashboard Avatar To Replace Car Owner's Manuals · · Score: 2

    my wife never understands what i'm saying.

    That's what you think. In reality she understands you perfectly well but finds it advantageous to pretend she didn't.

  10. Re:Um... on Anonymous Vows To Destroy Facebook · · Score: 1

    I think that you'll find the 5th of November more interesting than you suspected.

  11. Re:Anono-hypocrites on Anonymous Vows To Destroy Facebook · · Score: 1

    I simply cannot bring myself to take seriously a man who appears to type the word "Anonymouse" with a straight face.

    You could see his face while he typed it? I had no idea that our privacy eroded that much.

  12. Re:Now We Wait ... on Patent Troll Lawyer Sanctioned Over Extortion Tactics · · Score: 1

    > But it shouldn't.

    But why not? It seems quite reasonable for parties to be allowed to come to an agreement without having to be involved in a court case.

    In a perfect world, yes.

    In real life, however, justice became an expensive commodity which not everybody can afford. If settling is cheaper than winning then it should be outlawed as extortion.

  13. Re:How is that "politically correct"? on Spiderman's Politically Correct Replacement · · Score: 1

    A Spiderman with non-white ethnic background is just diverse. Anyone can get bitten by a radioactive spider.

    Wouldn't a Japanese Spiderman have been more likely.

    That's a racial stereotype!

    I think you meant a laciar steleotype.

  14. Re:Yeah, not buying it. on Facebook Exec: Online Anonymity Must Go Away · · Score: 1

    A friend of mine used to be pretty open about her online identity... until she got a box of sex toys mailed to her with no return address.

    It seems that somebody went to some trouble (not to mention monetary expense) just to tell her "have a nice day".

  15. The first thing we do, let's kill all the lawyers on Ask Slashdot: Dealing With the Business Software Alliance? · · Score: 1

    If you had hired a competent lawyer then the lawyer could have forced the company to produce the contract. (And forced the judge to play by the rules.)

    And that is exactly the reason why everybody(*) hates lawyers: they preserve and perpetuate a system where you cannot get justice, you must purchase it.

    (*) Possibly excluding lawyers

  16. Re:I am an HFT programmer on How and Why Wall Street Programmers Earn Top Salaries · · Score: 1

    I want to buy some stock and willing to pay, say up to $1/share.
    Somebody is willing to sell me that stock for, say as low as $0.99/share.
    Hey, I'd gladly pay $9.90 as it's less than my limit, but as soon as the order is sent, some HFT algorithm gets in before me, snatches the stock at $0.99 and resells it back to me at $1.00

  17. Re:I am an HFT programmer on How and Why Wall Street Programmers Earn Top Salaries · · Score: 1

    w-wow you're a pompous dick, Alex Belits

    He's also right.

  18. Re:I am an HFT programmer on How and Why Wall Street Programmers Earn Top Salaries · · Score: 1

    But what if you could buy the car and sell it back for pennies under what you just paid for it

    Where's the added value?

  19. Re:Prisoner 6 on Swede Arrested For Building Nuclear Reactor · · Score: 1

    P.S. There is a good ending to this story: follow the links to the blog of Neil Fraser, a Google engineer who bailed the guy out after he spent seven months in jail, accused of, since video recording police is not illegal... "attempted lynching"....

    This is not a good ending. In fact, it is a terrible ending: jackbooted thugs get to walk all over a person, hold him prisoner for eight months, violate his rights, harass his family and destroy/confiscate his property -- with impunity.

    A good ending would be if the policemen, the prosecutor(s), the DA and everybody else participating in this travesty of justice were actually lynched.

  20. Re:Boycott is the wrong answer... on Ubisoft Brings Back Always-Connected DRM For Driver: San Francisco · · Score: 1

    We're going about this the wrong way. We should all buy copies of the game and then return it the next day because it won't play without the internet. That will cost Ubisoft thousand of dollars handling returns / RMA's from their various vendors and send a clear message about the DRM.

    Thousands of dollars, huh?

    Ubisoft financial data for 2010:
    Revenue: Euro 971 million
    Operating income: Euro 260 million
    Net income: Euro 89.8 million

    Yup, that will show them!

  21. Re:So? The game will just repeat itself. on Ubisoft Brings Back Always-Connected DRM For Driver: San Francisco · · Score: 1

    They return to using the same harebrained DRM scheme, we return to boycotting it. Why does UBI think it will be different this time? That we somehow magically now accept that kind of crap?

    Who exactly is this mythical "we"?
    What percentage of their customers do you think will care enough to boycott?

    Face it, boycotts only work against small local companies.

  22. Re:Oh boy on First NetHack Cross-Variant Summer Tournament · · Score: 1

    Thanks for your post.

    Several things:

    1. I'd say that at this time, the Dev Team is more damaging than contributing to the continuing existence of Nethack.

    2. Why do you say that Sporkhack is no longer developed?

  23. Google *is* evil on Google+ Account Suspensions Over ToS Drawing Fire · · Score: 1

    There are several things you should be aware of:

    1. Google is evil, and will continue being evil because, contrary to what you think:
    2. For a mega-corporation, being evil makes good business sense.

  24. Re:Falsifying evidence? on NH Man Arrested For Videotaping Police.. Again · · Score: 1

    You doubt wrongly.

    Enlighten me. I'll apologize.

  25. Re:What a waste. on Police To Begin iPhone Iris Scans · · Score: 1

    How many tanks do you need to deter a possible attacker?
    Come to think of it, who would that attacker be?