Why are all WTFs about Java?



  • I've been reading for some months, but I only see Java, C#, Javascript, and occasionally C++ and VB.  Why don't we see any WTFs or CodeSODs about Perl, Python, Obj-C, Lisp, or PHP?  Certainly there are plenty of readers here who write with less common languages.  I guess maybe you never see any Perl because you don't really share Perl code with other users...

    Do you think this might be because all the halfassed programmers end up writing more popular languages for their jobs?    Does this mean that, in order to find a job with little or no dead weight, a good heuristic is the language they write in?

    Personally I would love to see a Python CodeSOD where somebody is using map(), filter(), reduce(), zip(), and lambda in completely retarded ways.  I caught myself doing it just because I got to like those features so much when learning Python, but has anybody inherited some code like that?



  • Didn't I recently post a WTF about PL/I?



  • It's probably because languages like Python are not used that often, and the people who use them are geek enough not to produce WTFs.

    Regarding Perl, it seems unlikely that anyone could spot the WTF in a Perl CodeSOD, because Perl code is unreadable by default.



  • Some languages are easier to work in than others - and that's not at all the same thing as saying that they're better. Such languages are far more forgiving of programmer mistakes, so a less-than-skilled programmer will have a much higher chance of writing something that's "good enough". Note that often, "good enough" is the same thing as "only just marginally functional and fundamentally brain-damaged".

    If you're a skilled programmer, it doesn't matter a damn what you use. You'll get the thing working. You'll curse at the inane behaviour of javascript and the just plain stupid nature of VB and PHP - but regardless of whether it's java or cobol or freaking INTERCAL, you'll come up with a solution that isn't completely retarded.

    If you're a worthless programmer, and you're working in C++, your program will crash and you won't know why, but only on the days when you can get it to compile at all. It will never be posted as a WTF because it will never see the light of day - because it just isn't worth the disk space it occupies. If you're working in perl - well, not for nothing is it known as "the UNIX swiss army chainsaw". Just like when you give a chainsaw to a small child or a moron, you'll cut your own damn leg off and never get to the stage of actually saving the file before the paramedics arrive. Lisp, python, and objective C are all too obscure for such people to even know they exist.

    As a curious coincidence, the 'easy' languages are also often popular, for a related but distinct reason. Consider the borderline programmers - they're not brillant human trash, but neither are they going to write any C++ code that doesn't mangle its own memory and crash a couple of times a day. If you give them java instead, their output will still suck, but it'll be just barely "good enough" for the company to flog it to their usual unsuspecting ignorant consumers. So, software houses tend to drift towards languages like these because they generate marginally more saleable product.

    For the same reason, when looking across the entire industry (and not at any specific project), the 'easy' languages will more often produce software that sucks. Not because the language itself is worse, but because the worst projects which try to use 'harder' languages tend to die more often.

    In trite summary: a bad project tends to die because of a language, a good project tends to succeed despite a language.

    As to the question of whether language choices are a good predictor of whether a company is a good job or not - yes, with provisos. If the company is using java or C++, that tells you very little. If they're doing all their work in PHP or javascript - think twice. They might not be a pack of morons, but they most likely are. Check carefully before accepting a job like that - you want to prove to yourself that these people really do know what they're doing. If the company is doing all their work in perl and shell, and they've been in business for more than a couple of years, you're looking at a place that's probably filled with unix wizards - nobody else could stay afloat like that. Nice work if you can handle it. There are exceptions in every case, so always follow up with a more detailed investigation - but it's a really good opening question that tells you what to investigate (the next question is "why?" - or "has anybody here met Gloria?").



  • From http://www.paulgraham.com/pypar.html

    In a recent talk I said something that upset a lot of people: that you could get smarter programmers to work on a Python project than you could to work on a Java project.

    I didn't mean by this that Java programmers are dumb. I meant that Python programmers are smart. It's a lot of work to learn a new programming language. And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.

    Oooh... generalizations! But, alas, it's true. People who write in the non-status-quo languages care about what they do. Period.



  • Assembly-line JavaSchools.  Become a programmer in only two years and have all sorts of buzzwords for your résumé but no actual skills!



  • Speaking as a systems architect/engineer type, and not a programmer, I see Java used almost all the time when part or all of the project is outsourced. Remember, I get to see all this stuff at the integration stage, once all the mess is back onshore and ready to be reassembled from its various pieces. Fun, huh? 🙂

     From what I do know, Java's (and especially J2EE's) structure appears to make it really easy to break up a project into discrete chunks that coders all over can work on. Maybe that's why it's used so often. I've worked on projects where all of the big Indian outsourcing firms have been involved, and we've always used some Java. The problems we see (except for poor code quality in some cases) are mainly with interfaces between chunks of code. Either they're not passing the right return values from functions, or the black-box code just doesn't do what the interface documentation says it does.

    There's also the fact that everyone's learning Java as the primary "language of business."
     



  • I seem to remember there being quite a few php wtfs, but if you want more, just search for php on the net. I believe php.net has quite a few wtfs and also #php on any large irc server will flood you with wtfs.
    Also, like others say, java et such are easier to write so idiots pick them up, or don't, in the case of the wtfs, so we get more wtfs from them.
    I don't agree that people who write obscure languages care more, it's just people who write Java don't need to care as much about certain things because the virtual machine does it all for you, etc.



  • @djork said:

    From http://www.paulgraham.com/pypar.html

    In a recent talk I said something that upset a lot of people: that you could get smarter programmers to work on a Python project than you could to work on a Java project.

    I didn't mean by this that Java programmers are dumb. I meant that Python programmers are smart. It's a lot of work to learn a new programming language. And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.

    Oooh... generalizations! But, alas, it's true. People who write in the non-status-quo languages care about what they do. Period.

    You hit the nail on the head.  I started off in the '80s using Basic and Fortran; then had a 12 year hiatus, after which I went full bore into assembler (8086 and Motorola), C, C++, Pascal, Java, lisp and ada (of all things) on my own and in school.  I was a sh, sed, awk, perl acolyte for the longest time.  Then I found python about 3 years ago, and it all came together (I really, really, really got tired of debugging perl curly brace bugs - and didn't like perl's OO side-car).

    I am very lucky because I get to drive standards development in my work unit.  We agregate data from various sources, filter, generate reports and pass the data either into a CRM or on to other external systems for further integration with their datasets.  We take configuration data from various sources, and integrate it for automated platform provisioning.  We also build tools for use by our operations group (integrated into openview).  We have already migrated most of these applications to python with great success (better maintainability, extensibility, testing and quicker development time).
     

Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.