Slashdot Mirror


User: TummyX

TummyX's activity in the archive.

Stories
0
Comments
2,237
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,237

  1. Re:"synchronized" vs. locks & semaphores on Summary of JDK1.5 Language Changes · · Score: 1

    Funny thing is the concurrency package uses monitors to implement the semantics of the locks, semaphores etc.

    Once it's in the API I'm sure Sun will integrate native support into the VM.

  2. Re:would like to see it go on Study: Visual Basic use on the decline · · Score: 1


    As much as I dislike VB and its ability to suck my will to live I would still use it to throw together something real quick that requires a gui of sorts


    Yeah. If you want the GUI to be static and only look good at the resolution you're running on :-|.

  3. Re:Agreed.. on Summary of JDK1.5 Language Changes · · Score: 1


    I'd say that "++x" is actually the "best" way because it puts things in verb-noun order, which I'm used to as an English speaker. "x++" is noun-verb, which feels strange to me. "++x" reads as "increment X", while "x++" reads as "x. increment it".


    That's a poor reason. Doing it that way makes the noun-verb ordering different from the rest of the language. After all, object.method() is noun-verb is it not?

    You should be used to noun-verb by now.

  4. Re:XDoclet on Summary of JDK1.5 Language Changes · · Score: 1

    It's a bit different. Log4J was a class library that could just be absorbed into the Java API. To fully implement C#-like custom metadata you need to change the reflection APIs *and* the compiler.

  5. Re:How this compares to C++ on Summary of JDK1.5 Language Changes · · Score: 1

    Perhaps it's just a lame example, but it looks to me like it's a fancy macro. Given the @Remote attribute, a method declaration is automagically transformed into a web service. This can be done in C/C++ with a #define, though Java's is probably much safer.

    Um. The code doesn't turn the class into a webservice anyway -- it looks like it makes it an RMI accessible object. And it's not just a fancy macro. You can reflect on the @remote tag at runtime. Just like you will be able to reflect on a @webservice tag at runtime and then generate the appropriate bindings to make the method a webservice.

    Attributes/metadata is not something you can do with macros!


    I guess the plus side is you have to type less, but the downside is you have less control over how your interface is declared. Where does CoffeeOrderIF get declared, for example? Tough cookies if CoffeeOrderIF has a parent interface. No @Remote for you!


    Huh? Not sure what you mean. Attributes don't remove any power.


    This sytax sugar is nicish, but lets face it, not a lot or time is spent actually keying in code compared to designing dataflow, schemas, policies, user roles, etc. Sure, I'll use the for_each et. al features, but the generics and the typesafe enums are the golden additions. They let you write _better_ code, not just key it in faster.


    Attributes (which is what we're talking about here) is not syntactic sugar. It, like I've said before, will do for source code what XML did for HTML. Attributes allow meta programming and is important for implementing AOP.

  6. Re:Properties on Summary of JDK1.5 Language Changes · · Score: 1

    Although, it could be argued that since noone uses public fields (except for static final fields) that syntax for accessing fields is never used, so it might be better to move get/set to use that syntax.

  7. Re:How this compares to C++ on Summary of JDK1.5 Language Changes · · Score: 5, Informative

    Metadata
    This is.. well.. strange. I didn't see the syntax for doing something like this. If it is just keyword/code replacing, then an #include directive would work just as well.


    IMO, metadata is the coolest thing. It's a feature of C# which has had little recognition despite its coolness.

    In both Java and C# you can use reflection to find out information about a class (class name, method names, etc). Attributes/metadata allow you to attach information to just about every element of a class/struct so that it can be queried dynamically using the reflection apis.

    Imagine them as JavaDoc tags that aren't discarded at compile time but are instead compiled into a class's meta data. They'll do for source code what XML did for HTML -- give more meaning to the code.

    Here's an example of using attributes/metadata to simplify XML serialization:
    [XmlRoot("cat")]
    public class Cat
    {
    [XmlAttribute("id")]
    public string Name;

    [XmlElement("color")]
    public string Color;

    public Cat()
    {
    }

    public Cat(string name, string color)
    {
    this.Name = name;
    this.Color = color;
    }

    public static void Main()
    {
    Cat cat = new Cat("felix", "yellow");

    XmlSerializer serializer = new XmlSerialzer(typeof(Cat));

    serializer.Serialize(cat, Console.Out);
    }
    }

    The code yields the following output:

    <cat id="felix">
    <color>yellow</color>
    </cat>
    The C# XmlSerializer class dynamically generates the IL that will do the serialization so it is *very fast*. It knows how to map the field names to element/attribute names by inspecting the attributes.

    Some other obvious uses include object/relational mapping (no need for external XML mapping files) and XMLRPC (just mark a method as Remotable!) etc. You can imagine infinite other uses for attributes/metadata.

    I'm not sure how it works in Java but in C#, attributes are simply classes (usually with a name ending in 'Attribute'). You can define your own custom attributes and your own classes that work with them. It's very cool.
  8. Re:ACLs are inane. on Michael Robertson of Lindows Responds · · Score: 1

    Well, on windows at least, it's about giving different applications different permissions. Files are still associated with a user -- it's just that they can be associated with multiple users and groups. So user A can have R/W access to file F but user B can only have R access F. You can't do that in Unix without making a whole new group.

  9. Re:Who needs a smart display? on Transmeta OK'd for Mira Displays · · Score: 1


    It sounds like a dumb idea and for 95% of the people out there it probably is


    I think it's the other way round. Most non-technie people (mums, grandmas etc) want to write their emails from their living rooms, beds etc and a Mira would be perfect. You could setup the PC in a spare room and access it through the Mira from anywhere in the house.

  10. Re:Respecting Canada on U.S. Says Canada Cares Too Much About Liberties · · Score: 1

    out problems, and the few percentage points that you found that didn't match the statistics *you* had do nothing to change any of the questions Moore's movie asks.


    The problem is if the questions Moore asks are so profound then why does he need to distort statistics. The questions themselves along with the truth should be enough.


    Yes, Bowling isn't really a documentary. More often than not, Moore doesn't document things, he creates them, but that doesn't change the fact that these things *did* and *do* happen.


    Didn't he just accept an award for best documentary?

    Things *do* happen, but you can't make up the reasons for why they happen and then try to back them up with misinformation.

    Sadly Moore's usually gets away with his poor research by saying that it's all satire and comedy.

  11. Re:MOD DOWN FLAMEBAIT on U.S. Says Canada Cares Too Much About Liberties · · Score: 2, Informative

    Moore is a guy who lives in a millionaire apartment in Manhatten. Whether he is nice is to be debated. He certainly tries to play on that "illusion" that people have that he's fighting the tough fight.

    He doesn't ask tough questions noone else hasn't asked. When the asks the "tough" questions he ruins it all by resorting to misinformation and fear. If his points were valid (and many are) he wouldn't need to lie about the facts. Just tell it like it is.

    Moore is no better than the fear mongering media he talks about. I find it rich that a guy who gets his agenda across by using the very tactics he despises. To me, the only name for Michael Moore is "hypocrite". He makes us left-ists look like idiots.

  12. Re:The submitter of the article was an idiot on Looking at Longhorn · · Score: 1

    Do you honestly believe that means that current applications won't be able to access WinFS without using "new" APIs? LOL

    The FileSystem is abstracted off by the Win32 IO layer. Changing the the file system isn't going to break any existing applications.

    I don't know who told you this conspiracy theory but they're tolling you and you bit.

  13. Re:The submitter of the article was an idiot on Looking at Longhorn · · Score: 1


    Well, that and the fact that WinFS will break EVERY SINGLE PROGRAM for Windows. I don't see MS being quite that stupid. However, it appears that they are. They have stated that backwards compatibility will not be a design feature.


    How moronic. Care to explain how WinFS will break EVERY SINGLE PROGRAM for Windows? Is it similar to how NTFS, XFS and EXT3 all broke existing programs as well?

  14. Re:Wait, what does MS innovate??? on Ballmer on Windows Server 2003, Linux · · Score: 1


    The "Show Desktop" button


    ROFL.

  15. Re:The Time Machine? on Bombing the Moon for Water · · Score: 1

    But the explosion fucked up the orbit.

  16. Re:Mod parent down on PDA/Radiation Detector · · Score: 1

    I didn't realise you read slashdot.

  17. Re:fear on PDA/Radiation Detector · · Score: 1, Informative

    Michael Moore is a loud mouth liar who is himself, the fear mongering media he encourages everyone to despise.

    Moore isn't a liberal. He's "moore" likely to be a republican mole. He should move out of his 1.2 million dollar Manhattan apartment and get out of the country and away from the people he hates so much. Ofcourse he won't because Moore really doesn't care about what he preaches. Moore only cares about getting attention to feed his ego. Guess who once said "My biggest failing is that I have absolutely no ego"?

    Truth about columbine:

    http://www.frontpagemag.com/Articles/ReadArticle.a sp?ID=6841

    http://www.atomiq.org/archives/000524.html

    http://www.opinionjournal.com/forms/printThis.html ?id=110003233

    http://www.spinsanity.org/columns/20021119.html

    http://www.time.com/time/columnist/printout/0,8816 ,436268,00.html

    http://www.hollywoodhalfwits.com/michaelmoore/inde x.shtm

    http://www.moorewatch.com/index.php

    http://www.coxandforkum.com/archives/000037.html

  18. Re:Not cost effective on Corporations Suffer Microsoft Activation Bug · · Score: 0, Redundant

    I wonder how much (in support costs) reactivating windows again and again and again and again would cost? hmmm!

  19. Re:Declarative languages on The Post-OOP Paradigm · · Score: 1


    But the point is that, when you're interacting with the world outside your program, you have to worry about ordering, timing, interfaces and protocols, etc.


    Can you give examples -- specifically examples where Java can do it but declarative langauges can't (or can't easily)?

    If you're talking about low level embedded systems then you should be using embedded C. We're talking about writing *applications* right?

  20. Re:Re:Declarative languages on The Post-OOP Paradigm · · Score: 1


    I have to explain declarative languages to VB guys and it's not easy


    Well there's your problem right there. I doubt many VB programmers have computer science degrees ;P.

    Seriously though, the only reason people find declartive languages hard to understand is because they're so used to the "set this, do this, set that" model of programming. Software Engineers who do design already think in high level abstractions.

  21. Re:Declarative languages on The Post-OOP Paradigm · · Score: 1


    Declarative languages are great for programming tasks that are primarily about computation, i.e. seeking information in order to produce an answer to a question. But not all programming tasks are about that.


    That may be somewhat true for Haskell but it isn't true for all delcarative languages. Prolog is more suited to AI and databases for example.


    Some programming tasks are about interacting with things or people. Like for instance, I just wrote a GUI widget that is somewhat like a scrollbar (b/c a regular scrollbar would be insufficient). The main difficulty of doing such a task well isn't in getting a correct implementation, because that's pretty easy to do. The main difficulty is in doing it so that it has a good feel. I need to be able to ensure that certain parts of the display are redrawn before others, that the pointing device's position is read at just the right time and frequency, etc


    You shouldn't be worrying about what the order of drawing. You should just declare "object a overlaps object b" and "object a doubles in size when the mouse is over it" etc etc.

    XSL is a declarative language and you can use it to generate some quite nice looking HTML UIs (even though its primary purpose is to transform XML not generate UIs).

    So, I guess my point is that declarative might be the future of computation, but not of programming in general.


    I think that's a common misunderstanding because (for now) declarative languages are mostly academic languages without much "commercial" use. OO progamming and design (UML!) coupled with certain design patterns (like the Model-View-Controller pattern) can be considered to be partially declarative.

  22. Re:Declarative languages on The Post-OOP Paradigm · · Score: 1

    It *wasn't* intended as a joke!

    I find delcaraive languages much easier to understand -- once you overcome that initial paradigm shift.

    Declarative languages not only mirror the way I think better, I find it models the problem better (much more directly) :).

    Things like OOP are formalisations which make imperative languages more declaractive. Design patterns like MVC are examples of this.

  23. Declarative languages on The Post-OOP Paradigm · · Score: 1

    The future will be in declarative languages such as haskell or prolog.

    The "flow chart model" of computing is and will always be error prone.

  24. Re:Intelligent Nanobots on Nanotechnology: Nanoscale Particles A Health Hazard? · · Score: 1


    As he become good as immortal it was implied that he lived forever.


    I think it was an episode of The Outer Limits. At the end it was implied that he died (they blew up the University lab) but his girlfriend inherited the nanobots.

  25. Re:Rubbish! on XML Support In Office 2003 Isn't For Everyone · · Score: 2, Insightful


    No it's not. XML is not supposed to store information such as 'font' and other presentational features. This is the job of the XSL stylesheets or CSS etc.


    Um. XML is for storing any kind of information -- including font styles. It's just a better idea to seperate those two concerns into seperate schemas.

    PS. XSL uses XML!