Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

scrottie (4167)

scrottie
  scott@slowass.net
http://slowass.net/

My email address is scott@slowass.net. Spam me harder! *moan*

Journal of scrottie (4167)

Friday July 27, 2007
03:19 AM

I'm a Java lover! Look at me! Go Java!

[ #33894 ]

Beppu commented, "I sense that you like Java on some level, but I'm not sure why. It seems to stand for everything you stand against."

Here's why I like Java.

* Applets -- I wanted to write stupid little Web games. Same for Midlets; I want to write stupid little Web games for phones.

* C sucks for application development -- Java is a more tolerable alternative to the extremely tedious C approach to writing applications (C's power and speed are nice for writing language interpreters, kernels, database engines, TCP/IP stacks, etc). It's almost impossible to get security alone in C right. Any attempt is a massive undertaking that's ultimately doomed to repeated failures. Java's standard library is better too.

* Strong typing -- I've worked on large projects and I know the value of a good typing system. Of course, ML and Haskell have an even better one. Yes, it can get in the way in Java, but it's just one of those things where a little more work has to go into the code when you're on a large project to avoid much, much more work later on. The vast majority of people whining about the undesirability of a strong typing system are just zealots who are trying to prop up their favorite language which just happens to lack the feature -- the "my language doesn't have it and it works just fine so therefore I/it doesn't need it". The PHP weenies use this flawed argument all the time. I frequently post on this topic, so I'll keep this one short. Go read somewhere else if you want to know exactly what a good type system buys you.

* Java is a static language -- it has the advantage that static languages have: it can easily be compiled down to machine code for really fast apps, such as by gcj. This isn't to say that I like static languages better than dynamic ones, or that I like Java better than Perl because Perl isn't static. That would be dumb. But staticness can be useful sometimes, and when I want it, I consider Java. With Chicken of Scheme and good optimizing compilers for functional languages, this becomes more and more moot each year.

* Perl people hate Java -- I guess it's like handling a poisonous snake -- your fear and revolution is my delight. Java needs to be looked at as just another of God's creatures, not some threat or demonic manifestation, or else we can't relate it to in a healthy, Perl-ish way, and do what we Perl people do: steal all of the best ideas from it and leave the soulless corpse to be devoured by worms. Muahahahaah!!

-scott

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • When I think of scrottie code, these are the characteristics that come to mind:

    • minimal (so that it can run on your old hardware)
    • concise (for its own sake)
    • unusual (...your penchant for coroutines and byte code manipulation comes to mind)

    When I think of Java code, I think it's:

    • bloated
    • wordy
    • normal (in the worst way possible)

    That's why I find it unusual that someone like you would find reasons to like Java. But if you like it, whatever.

    I know that you don't actually code in it that much

    • "I know that you don't actually code in it that much. ;-)"

      That's key. I can take lots of stuff in small doses, and enjoy it. Just not PHP.

      When writing Java, I used to use kaffe and jikes. Both are pretty small, and both are open source and support my old, slow hardware. jikes is extremely fast. kaffe only does 1.1ish or 1.2ish, but at the time you had to program down to that version anyway to support MS's fuxored Java version they distributed with IE. And then compared to Flash, which was barely progr
      • It’s not the least bit out of place to worry about which classes can see which other classes and what kind of interfaces they’re presenting for each other.

        Yah [canonical.org].


        • No, actually... I intentionally avoided discussion of private, protected, public etc because of this essay. I said "interfaces" and "which classes can see each other", which is in reference not to hiding bits of themselves but simply who has references to who and what the basic topology of the application is. You can hardly invoke the "stay out of my livingroom not because I have a shotgun" argument to justify writing a God Object. Sometimes strong typing makes sense; aside from that, large projects need
          • You can hardly invoke the “stay out of my livingroom not because I have a shotgun” argument to justify writing a God Object.

            But you don’t need mandatory controls if you’re writing a God object either. You won’t understand the need for them until you try to do good OO design, just like a ten-liner can be written without strictures too. Access controls are just another aspect of the sort of design you are talking about.

            It makes me sick to be associated with a language where


            • Quick recap.

              1. I argued that Perl programmers could benefit from some time spent on OO design, and give thought to things like interfaces and which objects can see which other objects.

              2. You object on the grounds that Perl doesn't need forced encapsulation.

              3. I clarify that at no point in that point did I argue for forced encapsulation (though I did at another point, but at that point, I was talking about something else). I restate that, ignoring enforced encapsulation, Perl programmers don't do nearly as

              • Every now and then, I post a disclaimer on my blog, saying that I will be extremely mean to anyone who doesn't follow the house rules. I know I can't impose them, but I can be quite mean. So, please don't do certain things on my blog. But first I ask people to go away. Aristotle [sic] made it to this point and continued on, all the while acting oblivious.

                This isn't a discussion of whether Perl programmers could benefit from learning more about OO design as it was traditionally taught in the late 80's an
              • What? Where have I been saying that Perl does not need forced encapsulation? First I agreed with you, then I argued twice that Perl does need mandatory controls, and now you tell me I said the opposite. Did you even read what I was saying? Or did you immediately go crosseyed and started looking for a misinterpretation of what you said so you had some grounds to get pissed off again?

                I agree that we have a case of someone being a twit here, but it ain’t me.


                • Crossed eyes? Perhaps. Let me re-read, in that case.

                  "Access controls are just another aspect of the sort of design you are talking about."

                  Okay, they're another aspect of it -- does this mean that good design is pointless because access controls are pointless (which is how I took it) or does it mean that, being a seperate aspect, they're simply related in some ways but not others, and if that's the case, what did I fail to read between the lines?

                  "I’m equally sick of the “no infatuation with enf
          • Since you often complain about people failing to address the actual argument, I opted to moved all the incidental but off-topic quibbles to a second reply so they don’t get in the way of my real response.

            Anyway, I wanted to nitpick the following statements:

            Interfaces are a way of keeping straight

            I don’t like interfaces in particular. As seen in Java, they fall out of a confusion and conflation of language design goals. Traits/roles are a much superior concept.

            But even as far as interfac


            • Alright, that was slightly better than I had hoped for but I'm unswayed with regards to whether I want to talk to you.

              My comment was that Perl programmers should spend more time worrying about interfaces and the structure of the code; your retort was that interfaces are poorly implemented and Perl 6's traits and roles are better. That's great... but it's also completely off topic. The point wasn't "Java is better than Perl". That wasn't even the title of the essay. It seems to be a conclusion you slippe
              • My comment was that Perl programmers should spend more time worrying about interfaces and the structure of the code

                Which I agreed with. And in the same breath I pointed to one of my posts in another place where I say that Perl programmers chanting “we prefer politeness not shotguns” is misguided, which I think of as being a sign of the same immaturity.

                That’s great… but it’s also completely off topic.

                Wow, you found the start of my post (where I said all therein was just

      • most Perl programmers would do well to spend some time ignoring the language itself and just concentrate on design.

        Hmm, I think of Perl programmers as actually focusing more on design than the Java I've seen. For a community that values TMTOWTDI, there sure is a lot of emphasis at times on making sure you do things the One True Best Way, which can be good for design. That's one reason I ask Perl programmers questions involving other languages.

        I, too, really like interfaces. :) Unfortunately the Java programmers I've dealt with never use them. :(

        --
        J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
        • Hi jdavidb,

          You make some good points.

          There is a movement in the Perl community towards clean code (Perl::Critic). We collectively seem to have fallen in love with MVC frameworks. In trying to do things the right way, we obsess over decisions like Mason or Template::Toolkit.

          But, compared to the Java camp, we don't read about OODA. (We also don't read about project management methodologies, which is a good thing, IMO.) Rather than going out and buying _Design Patterns_ and _Refactoring: The Art of Improvi
  • Michael Vanier [paulgraham.com] :

    Writing Java code, though not particulary painful in the sense that C is painful (core dumps etc.), puts me to sleep.

  • ... at least kinda anyways.

    I like it's approach to problems, even if it does get a bit wordy at times, and highly likely to give me RSI.

    With a good tool like IDEA that does tons of auto-completion and magic, it's fairly tolerable though.
    • I've done more Java than Perl in recent times, and it's a lot more bearable with a decent IDE. I use Eclipse [eclipse.org], though IDEA [jetbrains.com] is supposed to be better. I've never figured out NetBeans [netbeans.org] (though the Ruby support in 6.0 means I'll have to take another look).

      I'd also say that I find the new language features in Java 5 make a huge difference. I find having a proper foreach loop, enums, etc make it a much more pleasant programming experience.

  • I guess I swing both ways in this case. : )
  • Perl people hate Java -- I guess it's like handling a poisonous snake -- your fear and revolution is my delight.

    Got a good snicker out of me for that. :) Nothing says "I'm a Perl programmer" like "I made this technical decision simply because it pisses people off."

    I don't refuse to use anything. I'm about to have to do something in Java, and in fact I've embarked on a program of going through some Java books to shore up my understanding of the language for the future. I still don't have to like it. :)

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers