Slashdot Mirror


User: KDan

KDan's activity in the archive.

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

Comments · 1,076

  1. Re:Double-Checked Locking on Java Performance Urban Legends · · Score: 1

    Wow, ok. Fair enough... thanks for the informative article. That's pretty shitty of sun to have screwed around with the definition of synchronized like that. Surely such an important point should be well highlighted in the courses for the Sun Certification (the SCJP anyway). Instead, there, they basically say that synchronized makes the instructions it surrounds atomic with respect to any other threads that are synchronized to the same object. If there are these reordering issues it means that probably about 2/3rds of the 'thread-safe' programming out there is actually thread-unsafe on hyperthreading cpus, multi-cpus and optimizing compilers... Pretty bad shit.

    Daniel

  2. Re:Double-Checked Locking on Java Performance Urban Legends · · Score: 1

    The assignment is synchronized. So in the context of this class and this method, it is guaranteed to be atomic as far as all other threads running this method can see. No two threads will be able to synchronize on this method at the same time. By the time the first thread is finished, the object is allocated. So by the time the second thread gets to the second check (hence double-checked locking) the object is already assigned so the check fails and the existing instance is returned. It is fully thread-safe.

    Daniel

  3. Double-Checked Locking on Java Performance Urban Legends · · Score: 1
    It was the fear of this very myth that inspired developers and writers to promote the clever-seeming, but fatally flawed "double-checked locking" idiom, which appears to eliminate synchronization from a common code path, but in fact compromises the thread-safety of your code.

    How does double-checked locking compromise the thread safety? It doesn't at all. That's bullshit. Double checked locking is perfectly safe. Example:

    public MyClass getInstance() {
    if (this.instance == null) {
    synchronized (this.getClass()) {
    if (this.instance == null) {
    this.instance = new MyClass();
    return this.instance;
    }
    }
    }
    return this.instance;
    }
    The above code is perfectly thread safe, but avoids having to run synchronized code at all once the object has been created. Whether the overhead is noticeable is debatable, but the double-checked-locking pattern is thread-safe.

    Daniel
  4. Selling tickets on Summer on Neptune · · Score: 3, Funny

    Selling tickets for a 40-year holiday with guaranteed permanent sun-tan!!!

    Daniel

  5. Re:Best layman's guide to QT on Books on Quantum Mechanics? · · Score: 0, Troll

    Shame he didn't ask for layman's guides.

    Daniel

  6. Here's a few I used during my degree on Books on Quantum Mechanics? · · Score: 4, Informative

    And which are absolutely excellent to give you a very solid grounding in quantum mechanics and quantum physics.

    Mandl's Quantum Mechanics in the Manchester Physics Series
    Gasiorowicz's Quantum Physics is absolutely excellent. It goes from simple stuff to pretty complicated stuff and tends to cover things in a thorough, 'no-fudge' way so that you have a solid perspective of how it should be done
    Eisberg and Resnick's "Quantum Physics of Atoms, Molecules, Solids, Nuclei, and Particles" is good for bringing it all together with atomic physics, nuclear physics and particle physics
    Bransden and Joachain's "Quantum Mechanics" Absolutely excellent. Goes into a LOT of details on everything. If there's anything you don't understand, you're likely to find it here in an understandable form (where other books just mention it in passing, this one will actually spell it out in full, which is well nice when you're in trouble with a concept)

    That should get you started pretty well. After that you might want to get Dirac's very own book to seriously absorb the dirac notation (I've found that his book was very clear even so many years after it's been written), then you'll need to get into the subject referred to during my degree as "quantum theory" - basically it is to "normal" quantum mechanics as lagrangian mechanics is to classical mechanics... just much nicer!

    Good luck,

    Daniel

  7. Get him first! on Security Plans for When Your Senior Developer Leaves? · · Score: 1

    Kidnap him and lock him in the basement, then torture him until he tells you where he put the backdoors. If he dies before he tells you, he probably was innocent.

    You live in Iraq, right?

    Daniel

  8. Re:Hmmm on New US $20 bills Released, Colors & Layout Change · · Score: 2, Funny

    Ok then, here's a five dollar bill that should be appropriate for a slashdot poster :-)

    Daniel

  9. Re:Yep buy Microsoft! on Any Reason To Buy Microsoft? · · Score: 1

    I've learnt hand-eye coordination a while ago ;-)

    Daniel

  10. Re:Yep buy Microsoft! on Any Reason To Buy Microsoft? · · Score: 1, Insightful

    Hey, the logitech MX700 just kicks the ass of my old Intellieye explorer. It's really good looking, rechargeable, wireless, optical, high-frequency (good for games), works fine under both windows and linux (linux with a couple of buttons missing but I've got a mail logitech support sent me which explains how to get them working under linux - not something I'd expect from M$ - but haven't had time to go through it yet), etc. It's just perfect in every respect.

    Daniel

  11. Re:The Building Size on World's Most Powerful Laser · · Score: 1

    You can always strap a shark to some part of it just for the heck of it.

    Daniel

  12. Do the ghosts have guns? on Pac-Man Back At E3, Courtesy Miyamoto? · · Score: 2, Funny

    Big guns? Realistic guns? Ghost Recon guns? >:-D

    Daniel

  13. Re:Linux? on Half-Life 2 NDA Lifted - Online Previews Available · · Score: 1

    Sure, that's definitely one very addictive factor in MUDs. However, communities can be built with forums and irc and such, which at least have the advantage that you don't sit and play for hours on end because there's a game as well...

    Daniel

  14. Re:Generics on Summary of JDK1.5 Language Changes · · Score: 1

    Better than that. Because it can do this at compile-time, it will be able to check for illegal casts at compile time. No more ClassCastException's.

    Daniel

  15. Re:Looking to Get Back into Java on Summary of JDK1.5 Language Changes · · Score: 1

    In the non-affordable range, try JBuilder 8 Enterprise Edition. But Eclipse is pretty sweet.

    Daniel

  16. Re:Counterstrike 2? on Half-Life 2 NDA Lifted - Online Previews Available · · Score: 1

    I doubt that they will miss out on the opportunity to make HL2 just as moddable as was HL1. Off the top of my head I would guess mods got HL more than half its sales (probably a lot more). Valve would have to have a gun to their head not to make mods even easier to make in HL2 (while still keeping that CD key monopoly!). They will make insane amounts of money all over again that way. If CS has decided to spin off in its own direction rather than remain a free mod, then too bad for them. Someone else will make "Uberstrike" which will be a free mod for HL2 and kick some ass (and maybe all the CS lamers will stick with CS!)

    Daniel

  17. Re:Linux? on Half-Life 2 NDA Lifted - Online Previews Available · · Score: 1

    With any luck it will be supported by WineX. HL is.

    Btw, re: MUDs, get away from those. They're the worst time sink ever invented (whether graphical or not). Here's a trick: MUDs really get you because they're an 'infinite' game (as opposed to a finite game that you play to win). That's how they get you addicted for such long times. To get out of it, my method was to change them (in my head) from an infinite game to a finite game. Once in the mindset of playing to win rather than playing to play, I played really intensively for a few weeks, and figured out how I could completely beat the one MUD I had found was really worth playing (Arctic). At that point, there was no point in playing anymore, as that would have been just a mechanical application of what I had figured out, with no 'new stuff' anymore, and at that point I stopped playing and never got back to those again.

    Daniel

  18. Re:Good Lord on Half-Life 2 NDA Lifted - Online Previews Available · · Score: 1

    What's the point of having another fps that plays on low-end computers? Progression for fps is to more realism. If computing power is what it takes, then so be it. Or are you going to start blaming Origin for making all those Wing Commander games that required beastly hardware? Or blame quake for making 3d cards a must have? It's a game, not a lifestyle, and it should be affordable. My arse. That's for Valve to decide. If you don't have a good machine this game's not for you, that's all. There's plenty of other games you can play that don't have such high requirements. Go play them and leave those of us with good machines to our better games.

    Daniel

  19. Re:Hmm on Half-Life 2 NDA Lifted - Online Previews Available · · Score: 1

    Yes, they even say they'll have seminars in the summer before the release, for modders to get acquainted with the engine. It would be ridiculous for them not to support mods. Off the top of my head I wouldn't be surprised if over half of the sales of half-life licences are to people who bought it to play online mods like CS, TFC, DoD, etc.

    Daniel

  20. Re:Right back at ya on Dr. Dre to pay $1.5 mil for "Illegal Sample" · · Score: 4, Insightful

    You're being a bit unfair by saying that rap can't be art. It can be art in the same sense as any poetry is art. We can dispute all day long about whether it is music, but art, it most definitely is (some of it anyway).

    Daniel

  21. Re:MUDs to Everquest? on A New Generation Of MOOs · · Score: 1

    She was pasting bits of text from Everquest and saying "see, you can't tell everything from the text! It's not a mud!" She was not making much sense, to be honest. Her main argument was "have you played it?" To which of course I truthfully replied "no" and then she tried to imply that I could not have an opinion on the origins of Everquest because I had never played it. Just shows how some people become seriously deranged after playing such games too much. However, as it was on irc and she was a she and I was a he, everyone else of course sided up with her. Typical lameness :-P

    Daniel

  22. Re:So I guess this is for boys only? on MIT Creates Urine-Controlled Video Game · · Score: 1

    Wow... But surely they'll be at a disadvantage using such a crude instrument. I mean, can they even aim with that?

    Daniel

  23. Re:Was I misled? on Apple Sells A Million Songs in Debut Week · · Score: 1

    Hmm... that sucks... so you couldn't make a CD compilation out of songs you've bought on iTunes?

    Daniel

  24. Now... on MIT Creates Urine-Controlled Video Game · · Score: 4, Funny

    I seriously think this game is just taking the piss...

    Daniel

  25. MUDs to Everquest? on A New Generation Of MOOs · · Score: 1

    MUDs (Multi-User Dimensions) are to Ultima and Everquest as MOOs (Mud, Object Orientated) are to... The Game Neverending?

    Man, it's a shame a certain kat from a #td channel isn't around, she spent about 3 hours insulting me because I claimed that Everquest was a natural evolution of MUDs. That psycho spent her entire life on ECrack, so I wasn't that surprised that she had gone a bit soft, but the rabid energy and complete narrow-mindedness with which she defended her point of view was seriously disturbing. Makes you wonder whether we need more of these games. When will they turn into BTL (Better-Than-Life, for the red-dwarf-unacquainted amongst you)?

    Daniel