Slashdot Mirror


User: Tattva

Tattva's activity in the archive.

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

Comments · 210

  1. Re:Like to see this replicated on German Doctor Cures an HIV Patient With a Bone Marrow Transplant · · Score: 1

    Awesome post, this is what I wish Slashdot would consistently deliver.

  2. Design patterns to the rescue on Ultra-Stable Software Design in C++? · · Score: 1

    There are some simple design patterns that can really help you. The Null Object and the RAII (Resource Acquisition Is Initialization) patterns are essential to stable C++ code. The STL or an equivalent library is the last piece to the puzzle.

    The Null Object pattern removes the defect-prone NULL value checks throughout your code by creating an object that represents null behavior for any situation where the existence of a real object is illogical.

    The RAII pattern prevents resource leaks by tying resources to object lifetimes. By using stack allocation through the STL container and smart pointer (if needed) classes you can pretty much never use the "new" keyword in your application. You will have to create a copy constructor and an "operator =" deep copy method for STL to be able to handle your classes as value classes, otherwise you will need to use smart pointers.

    I've heard people criticize STL and especially its smart pointer feature, but after extensive use I have no complaints other than the god-awful error messages compilers give you when things don't go right and the poor debugging support for visualizing such containers.

  3. Re:Code cleanly and remove comment on What Workplace Coding Practices Do You Use? · · Score: 1

    Hmmm, why not refactor to a class?

    class MessageListener
    {
    private:
        int m_totalMessages;
    public:
        void ReceiveMessage()
        {
              m_totalMessages += 1;
        }
    };

  4. Re:Code cleanly and remove comment on What Workplace Coding Practices Do You Use? · · Score: 1

    Or refactor to a method: ...
    MessageReceived() ...
    }

    void MessageRecieved()
    {
        m_totalMessages += 1;
    }

  5. Re:This is very cool on DARPA Grand Challenge 2005 · · Score: 2, Interesting
    Yeah, Anthony Levandowski and the GhostRider Robot team from UC Berkley entered the motorcycle. Anthony won Test and Measurement World's Engineer of the Year 2004 award.

    You can see interviews and a video here. The team's website is here.

  6. I can't believe on Nerds Make Better Lovers · · Score: 1

    No one's mentioned A Girl's Guide to Geek Guys!

  7. Fun with old AP Hardware - Wireless Graffiti on Best Wireless SSIDs You Have Seen? · · Score: 1
    With the rate of change of wireless technologies, there are probably a lot of people like me who have old 802.11b AP's they no longer need.

    Has anyone ever considered configuring an old AP with an SSID like "Starbucks SUX0RS" and plugging it in and hiding it in said establishment? I have not done it personally and I am not advocating doing this, just curious.

  8. I've quit cold turkey on Too Much Gaming, Anyone? · · Score: 1
    Hi,

    I'm not Tony Robbins, but I would like to offer up my personal experience as an encouragement for anyone inclined to listen. I played computer games (1st person, strategy, etc) all through college and into my 20's. I guess I was lucky enough to have a natural gift for learning because I managed to keep my grades up in college, but I think I had a real problem.

    I would stay up 'till 3 in the morning and be tired at work. I didn't have as much of a social life as I could, and I'm certain I missed many enriching opportunities. I never exercised and weighed upwards of 285 lbs. at 6'2".

    Eventually I realized that I didn't like the direction my life was taking and I just quit playing about 4-5 years ago. I have a serious girlfriend, friends that I see regularly, I weigh 215 lbs. and I think I'm finally on the right track.

    At the time I was playing I seriously considered and decided that I did not have an addition. I didn't get particularly jumpy or anxious if I didn't play for a few days and I don't think I had many of the classical signs of addiction.

    Nevertheless, gaming is so enthralling that I don't think one needs to be addicted to be negatively affected. Modern games are compelling, surrounding universes that can serve as substitutes for real life. I had an immense sense of pride when I created a winning society in one of the turn-based strategy games or when I racked up the most frag's in Counterstrike. But it isn't real and it doesn't last.

    I hope anyone who is currently going through what I did, depressed and isolated, can take some encouragement from my words that there are plenty of good choices and positive paths a person can take. If you think it's a problem, it probably is, even if it isn't classical addiction.

    Sinerely,

    Dave

  9. Re:Good on Heat Insulators for Laptops · · Score: 3, Informative
    Exactly. The heat will escape from other surfaces and the internal temperature of the machine will rise. The keyboard will definitely get warmer as a result of this and laptime lifetime will decrease.

  10. Re:Which? on The Physics of Baseball · · Score: 1
    Well, I'm also not interested in going down a bunch of ratholes, he links to mlb, for heavens sake.

  11. Re:How Ironic on MIT Studies Software Development Processes · · Score: 1
    Check out "IEEE Recommended Practice for Software Requirements Specifications," IEEE Std 830, 1998. Requirements are supposed to be only about the external, observable aspects of the software. You should not put in arbitrary design constraints, only constraints externally imposed on the design (say, if management says all development must be in Java.)

    Your design is a result of your requirements, your design isn't your requirements.

    Dave

  12. Re:Sweet on Calculating A Theoretical Boundary To Computation · · Score: 1
    Yeah,

    I really don't like getting razzed by my CMU alumni friends since that school always seems to get the good press...

  13. Re:Those blinders cost $3000!?!? on Technology Makes New Cars Too Expensive to Fix · · Score: 1
    Hi,

    I got a new Prius another customer had configured but failed to close on late last year, and it was configured with HID lights. At the time I thought the same as you about HID, but the dealer says they only start out that really annoying color and quickly warm up to a white. Is that true? I haven't had an opportunity to compare my lights to someone else's after they had warmed up.

  14. Re:Complete Care on Obtaining Replacement Parts for Your Laptop? · · Score: 0, Flamebait
    What's the matter, do you think Best Buy's prices are too high? Could their prices be reasonably explained by the fact that if you ask a salesperson a question he/she responds immediately rather than a couple days later as at Internet stores? That you can walk in and out with your purchase in a matter of minutes? That you can try everything out before buying? That you can take back anything except software it turns out you didn't like it for some reason?

    If none of those reasons fly with you, consider that maybe their prices are higher because of dishonest, predatory behavior by people like you.

  15. Books on FCC Adopts Broadcast Flag Scheme · · Score: 4, Funny

    It looks like literature is the last refuge of the free these days. When they take that away, I'll memorize a few books and live down by the train tracks.

  16. Re:What does this matter if... on Star Trek Enterprise Tested to Mach 5 · · Score: 4, Funny
    In space no one can hear you squeal with geekish delight...

  17. Re:HP 48GX on Recommendations for RPN Calculators? · · Score: 1
    Agilent. They're the ones who decided it would be a good idea if all HP scopes ran Windows 95 as their embedded OS. I always wanted a scope that would BSOD.

    Funny, but lacking in veracity. Some scopes are the Infiniium line, and some are more traditional. The user feedback on the Infiniiums is insanely positive, btw.

  18. Re:HP 48GX on Recommendations for RPN Calculators? · · Score: 1
    That's a little more processor power as a Palm III (except no FPU). Display, UI and storage are another matter, but there's still no reason why a 400Mhz

    They have plenty of processor, true, but memory is an issue. I used to run Mathematica on an (4,8?)mb 66mhz 486dx/2, and it took minutes to load due to virtual memory swapping. You would have to occupy a good portion of a PDA's memory to run even a very old version of Mathematica, I'm afraid.

  19. Re:I like the rotational kinetic battery on Rechargeable Batteries - Yes or No? · · Score: 1

    Not to mention the catastrophic effects of the flywheel if it gets hit to hard and touches the edge :-P. Its a battery that doubles as a bomb!

    Not in some prototypes. The flywheel is made of carbon fiber and generates a carbon cloud that stays in the containment vessel. The vessel will get pretty hot, but not so hot as to cause fires.

  20. Re:OutDated? on A New Bible For Programmers? · · Score: 1
    I don't know about you embedded and systems folks, but we use a database to do that stuff now. Lacking are teaching guides that tell how to use a database properly and effectly within an application. I am not saying that building sorts is useless knowledge, but its priority is dropping IMO.

    I understand where you are coming from and if you catch me in the right mood I might agree (almost) without reservation, but I have some doubts. There are certain programming tasks that just can't be solved with a predefined (even configurable, templated) data structure and a set of predefined and configurable algorithms associated with that structure.

    Dynamic programming is an example (see "Introduction to Algorithms," Cormen et al, chapter 6.) Dynamic programming is a method of solving problems that have numerous subproblems that can be solved optimally on their own terms, but in the recursive definition of an ideal solution are consulted multiple times, usually leading to exponential behavior based on the number of the smallest subproblems. Dynamic programming is defining a recursive definition of the ideal solution and then finding the optimum subproblems in a bottoms-up manner to avoid the duplication of effort a recursive solution entails. Maybe I'm dumb but I can't imagine a way to encode a general solution to the analysis that is necessary to recursively characterize the optimal solution. The table containing the optimal values can be standard storage type, of course.

    But the algorithms not included in helper libraries are used less than those that are. Some concepts, such as just about everything in AI, have a very limited applicability, but I think if you sum up the problem sets that can be addressed by advanced techniques, the teaching of these techniques is still a necessary part of a computer science education.

    Like I said, I waver on this, partly because I wonder if my analysis isn't influenced by an emotional prediliction for a deep understanding of the fundamental math of computer programming. I am an intuitive thinker and like to understand the whole forest before I prune a single limb.

    Many people successfully maintain and develop websites, databases, and enterprise application software where their only real skills are GUI design, project management and software design process practices, and some factoring ability. These software systems may be brittle and not very scalable, but they satisfy customer needs and they were developed relatively quickly.

  21. Re:C# vs C, DirectX samples on Is .NET Relevant to Game Developers? · · Score: 4, Informative
    .NET should be excellent at heavy calculation. Things like math compile down to native code and don't really incur any overhead. The overhead of managed languages like .NET are in method invocation, accessing advanced features like runtime types that aren't available in other languages anyway, exception handling, and a larger memory footprint. Arguably, the last two are the only "real" significant disadvantages.

    Some argue garbage collection is expensive, but try calling C++'s "new()" a few million times and see how much you like it then. Memory ALLOCATION in .NET is almost a no-op relatively, and deallocation's only real downside other than non-determinism is that a poor GC (garbage collector) can cause "burps" in performance if it falls behind due to too many objects being created and unreferenced too quickly. Generational GC's like .NET's tend to mitigate this to a large degree.

    I suppose if you consistently use 100% of the processor and are allocating objects, eventually the processing overhead of the GC will become apparent, but most programs use the procecessor unevenly, leaving spare cycles for the GC to consume.

  22. Re:Dotnet won't rule the world. on Is .NET Relevant to Game Developers? · · Score: 1
    attribute based programming

    <shudder>

    I hope you don't really mean that. If you based your programming on attributes you'd make yourself an unreadable mess. IMO, attributes are a spice, not the main course.

  23. Re:That Giant Sucking Sound... on Is .NET Relevant to Game Developers? · · Score: 3, Informative
    The Finalize method, or destructor, will execute in most situations. MS in the .NET beta said finalizer methods of remaining objects would not necessarily execute upon process shutdown. They have ammended this in the release to say that if the finalize process (of every leftover object) upon process shutdown takes longer than 40 seconds, finalization will be terminated and any remaining objects will not be finalized.

    That said, "Finalize" in Java and destructors in C# aren't particularly useful. You can't be sure that any managed objects you reference are available during this period, and if you have any unmanaged resources left over, the destructor is a suboptimal place to clean them up, for the 40 second rule and due to the unpredictable time the garbage collector will call these methods. Better to implement IDisposable interface with its "Dispose" method, and provide a "Close" method that calls "Dispose". This give the user more control of cleanup of system resources, but still provides a minimum level of protection for users who fail to protect themselves, since you can fall back on the finalizer if "Dispose" is never called.

  24. Re:Damning with a faint praise on New Trailer for The Hulk · · Score: 1
    I was actually being sarcastic and I agree with your critique of the (presumed) tendencies of Americans to toe the line during times of perceived threats. It's important to note that this tendency has its basis in group pyschology and Canadians might find themselves a bit more miltaristic and nationalistic if they felt the umbrella of American strategic security they enjoy were collapsing.

    I don't like to put the winky smiley-face in my comments because I like to think I'm a good enough writer to get my point across, oh well.

  25. Re:Damning with a faint praise on New Trailer for The Hulk · · Score: 1
    Thank god I'm Canadian, and we don't all follow our government like a soupline

    No, but your government follows our government like a soup line. Honestly, didn't we "accidentally" kill more canadians in Iraq than the Republican Guard did? Since it seems the acid rain and DDT sterilization program didn't pan out, we're going to have to take more direct measures with you guys.

    p.s.

    Go Avalanche!