Slashdot Mirror


The Python Paradox, by Paul Graham

GnuVince writes "Paul Graham has posted a new article to his website that he called "The Python Paradox" which refines the statements he made in "Great Hackers" about Python programmers being better hackers than Java programmers. He basically says that since Python is not the kind of language that lands you a job like Java, those who learn it seek more than simply financial benefits, they seek better tools. Very interesting read."

121 of 726 comments (clear)

  1. Shame. by Draconix · · Score: 2, Funny

    Python is not the kind of language that lands you a job like Java

    Because otherwise, the business world would be that much less bass-ackwards.

    --
    By reading this you acknowledge that you have read it.
  2. I am positive... by That's+Unpossible! · · Score: 4, Funny

    ...a civil discussion will ensue.

    --
    Ironically, the word ironically is often used incorrectly.
    1. Re:I am positive... by dasmegabyte · · Score: 4, Funny
      Well, sure. What do you expect when we have a guy claiming not only that one language is better than another but also that it is better because the others because the users aren't greedy?I wonder how else we can pad programmer's egos based on completely subjective hypothesis on language choice?
      • Perl users have more dense social lives.
      • Ruby users have big, full beards chicks love to run their hands through.
      • VB users have sensible shoes and drive Toyotas.
      • C++ users enjoy a good mystery now and then.
      • PHP users probably own one or more Dremel multitools.
      • Javascripters are full of little trivia snippets and are great fun at parties.
      • Cold Fusion users are kind of quiet but have very deep thoughts.
      • SQL programmers have annoying laughs but are otherwise okay guys

      Oh, and C# users have bigger dicks. But that can be proven empirically.
      --
      Hey freaks: now you're ju
    2. Re:I am positive... by amightywind · · Score: 2, Insightful

      Python is for troglodytes who can't wrap their minds around Lisp.

      --
      an ill wind that blows no good
  3. Yea by jellomizer · · Score: 4, Insightful

    Right on. I wish employers/customers would take a look at the verity of your programming skills and not the number of years programming in one language. So what if you have 10 years of programming VB. Even if you have to program a VB app if you see a person with 3 years experience in VB and 7 Years in a buch of other languages it shows that this guy know how to program and is flexible to work around problems. Unlike possibly the 10 year VB guy who knows all the prebuilt widgets but something outside those widgets becomes impossible for him. I can't even count the number of times I helped people program on languages that I never used before (and they were soposed to be the experts) (I even helped out the Microsoft Guy in the 2003 Linux world expo in .Net) It is because I know a lot of languages and I can use concepts from the different ones and relate it to different languages. I also hate it when a customer tells you that they need an application written in this language to do this. My view is use the correct language for the job and I hate being forced to use a language that is not well optimized for the job. It is like someone telling someone when they build a house that they have to use this screwdriver and only this screwdriver to build a house. Someone who is truly a professional knows the different tools available and will use them when needed.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:Yea by lukewarmfusion · · Score: 4, Insightful

      Along those same lines, there are usually many different ways to get the same job done. That's part of what I like about programming - finding the best (cheapest? most challenging? quickest? most efficient?) way to get something done. There's a challenge in it. A lot of employers don't look at it like that; they think programmers could be replaced by robots (or monkeys).

    2. Re:Yea by stratjakt · · Score: 5, Insightful

      Good programmers are good programmers period, and the best programmers dont crusade for their "favorite language". If routine/application X is best accomplished in ASM, C, Java, Snobol, Python, or brainfuck, then so be it.

      --
      I don't need no instructions to know how to rock!!!!
    3. Re:Yea by Anonymous Coward · · Score: 5, Funny

      I strongly suspect no routine/application exists which is "best" accomplished in brainfuck.

    4. Re:Yea by stratjakt · · Score: 2, Funny

      If a design goal was "any attempt to reverse engineer the source will drive the person attempting to do so completely insane", then perhaps.

      --
      I don't need no instructions to know how to rock!!!!
    5. Re:Yea by Mateito · · Score: 4, Funny

      Except, when I call you into a "meet the client and wear a suit... okay, a tie then? Ok.. but at least put some shoes on" meeting, please please please don't tell them you've written their application in "brainfuck".

      (No, haven't had the experience, but I'm waiting for it)

    6. Re:Yea by brunson · · Score: 3, Funny

      Perl is the vice grips of the programming world. Sure it'll do the job, but there's usually a better tool for it.

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
    7. Re:Yea by JPelorat · · Score: 5, Funny

      Nearly all female subroutines appear to be written in it.

      --
      Hokey statistics and ancient misconceptions are no match for a good thought in your head, kid!
    8. Re:Yea by Inf0phreak · · Score: 2, Informative
      Then I think Unlambda or Whitespace would be better choices.

      Brainf**k is a relatively simple stack based language. The only thing about it that makes it hard to understand is its very terse syntax. Unlambda and Whitespace has this as well, and in addition to this they are completely unreadable. The reasons are quite different though: Unlambda because there is absolutely nothing like it (wrapping your mind around a myriad of s's, k's, i's and `'s == pain. I've tried) and Whitespace is just impossible to read (and program for that matter) without the aid of a program that can convert it to something where you can actually tell the instructions apart.)

      --
      ________
      Entranced by anime since late summer 2001 and loving it ^_^
  4. Learning by Klar · · Score: 3, Interesting
    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.
    Well, not 100% true in all cases. For our major programming assignment in 2nd year, we were required to create a library in C, then impliment it and add some more functionality by using Python. This forced us to learn the language on our own. Which was a really good experience, and I really liked the language. I think more people who are java programmers should be trying Python for smaller programs, cause I was able to pump small programs out much faster than with Java..
  5. Implementation is important by gtrubetskoy · · Score: 5, Interesting

    I like Python because I can figure out what's going on. If you know C, then it is not hard to trace what happens at the lowest levels since the C-Python is written in a remarkably clean C and very well documented. So it's a simple, powerful, easy to read language where you have some assurance of being able to track down most problems. My experience with Java was quite the opposite - every Java book I read always had mysterious claims about threads, JVM, synchronization, garbage collection that seemed like some sort of "insider knowledge" and I was expected to just believe it. So I think it's not just about the language itself as much as it is about the implementation; for me at least.

    1. Re:Implementation is important by YetAnotherAnonymousC · · Score: 2, Interesting

      Re Java being "mysterious" (?!). You're reading the wrong books. Not that you need a book at all. All you need is:
      The Java Language specification
      and if you are interested in more depth, The VM spec
      The specified behavior for synchronization, the memory model & threading are all there in fairly simple terms.

    2. Re:Implementation is important by crazyphilman · · Score: 5, Insightful

      Don't rely on Java books when you're judging it. Most (almost all) Java books are completely worthless. Before you think I'm a nut, let me explain.

      There's a mindset in corporate/professional comp sci I like to call "fat book syndrome". It works like this: a developer, usually a consultant, wants to be successful. So he spends time in Borders on a regular basis, buying new books with which he can expand his skills. Does he look at the thin, little books? No. He looks at the fat, weighty books. He reasons, "if I read that whole, big, fat book, I'll know everything and I'll be an alpha geek". Hence the increasing weight/volume of textbooks these days -- authors want their book to be the big, fat book the ambitious developer selects.

      Now, you've got two related effects here.

      First, the developer is adopting protective camoflage in the office, by building up a huge stockpile of big, fat books to match his fellow developer's stockpile of big, fat books. This is very similar to the United States and Russia building up their nuke stockpiles. Periodically, there's a crisis: "OH MY GOD" our hero will cry, "Dave just bought Design Patterns!" and he'll go to Borders after work and buy the latest boat anchor from the Gang of Four.

      The matching effect on the Author's side is, authors want to sell books. Developers are buying fatter and fatter books, so the authors want their latest books to be even fatter than the last set. So, the books are growing, and it's mostly protective camoflage just like the fat book collection on the developer's bookcase. There's a sort of symbiosis going on, if you think about it. Everyone's yelling "FATTER! FATTER!" so that soon, you'll need luggage to bring your newest books to work.

      Having said all that, what makes all this extra funny is, to learn any language, all you really need is a little review book (to master the syntax) and AN INTERNET CONNECTION. Wanna learn Java? Go to Barnes and Noble (those bookstores again) and get a lovely little book called "Java: Practical Guide for Programmers" by Zbigniew Sikora (it's 171 pages long, you can finish it in a couple of nights). Then, go online and read the Java tutorial, and any FAQs you can find on the various tools. Then start doing a project and consult the API reference.

      There's no need for all those big, dumb books. Most of them are crammed with nonsense filler, and the samples are only as good as the author is skilled as a programmer.

      Anyway, sorry to ramble for so long, but don't sell Java short just because all the books suck. The language itself is pretty nice. Get a SMALL book to get up to speed, dig around on the internet, and you'll find things a lot more friendly.

      --
      Farewell! It's been a fine buncha years!
  6. Re:FP by nyssa · · Score: 2, Informative
    print "First Post" # is more appropriate
  7. Re:nonsense... by NSash · · Score: 3, Funny

    I will bask in the irrelevance of your glorious, insightful comment.

    (Come back when you RTFA, or even RTF-summary, ya hear?)

  8. Python made my collegues start writing scripts... by wallclimber21 · · Score: 5, Interesting

    We used to script most of our processes (digital chip design) with Perl. In reality, only a few people really bothered automating boring tasks. At one point I started writing everything in Python because of all the good reasons (readability, easy to learn and MUCH easier to maintain later on) and gradually spread the gospel. As very nice side effect is that my collegues are much more likely to get their hands dirty themselves and write scripts with it's useful. Anyway, as for the article: I think a language shouldn't only be beautiful in the way it allows one to express intent, but also or even much more so in the way it looks esthetically. This is one of the biggest problems I have with Lisp (after reading Paul Graham's other articles, I bought this ANSI Common Lisp Book and printed out out 'On Lisp'). It's a fascinating language, but it looks to incredibly dense. Sigh.

  9. That's all well and good... by lobsterGun · · Score: 4, Funny


    I''ll be willing to buy his theory that python hackers are better than java hackers... ..so long as he buys my theory that lisp hackers are better than python hackers.

    1. Re:That's all well and good... by Theatetus · · Score: 2, Informative
      so long as he buys my theory that lisp hackers are better than python hackers.

      Ummm.... something tells me Paul Graham would agree with that. Read his Lisp books some time.

      --
      All's true that is mistrusted
    2. Re:That's all well and good... by bugbear · · Score: 2, Interesting

      Actually I advocate Python because I consider it a gateway drug.

  10. Python vs Java by Dimwit · · Score: 4, Interesting

    I think the main reason I write so much stuff in Python and pretty much nothing in Java is simple: Open source and comprehensive standard library.

    When I did have to write something in Java - well, better hope you have the right API. Oh, and what's the difference between the 3587324 different XML parsing packages? Oh and download Java Super Micro PDA Library! Only available for Solaris and Windows!

    The promise of "write-once-run-anywhere" was pretty much dead. Not that I was even going for portability - I just wanted it to run on Linux. And I wanted to do it without having to download Beans, Java DynamicManagement, Java Metadata, ad nauseum.

    Python, on the other hand, simply works. Sure, it doesn't have a standard GUI toolkit (although wxPython is pretty much the de facto standard now...), but it does everything I need it to do. With a clean, nice syntax, no less.

    Oh, and I still don't get how Java doesn't let you write a freakin routine to get the permissions on a file without resorting to writing a C function. Sure, it's not "portable", but just do what Perl and Python have done - on platforms with no permissions, return a sane default value. Don't just NOT include the function at all...

    Anyway, forgive my rant. Python - good standard library. Java - tons of confusing frameworks and platforms, etc, etc.

    --
    ...but it's being eaten...by some...Linux or something...
    1. Re:Python vs Java by Svennig · · Score: 5, Insightful
      To me, thats a very strange statement. The standard library of Java is, IMHO, one of the strongest around.

      If you combine the java Collections with the Jakarta Collections library then you have an almost unbeatable combination (beaten perhaps only by Lisp and its treatement of collections, lists etc).

      I admit that there are a myriad of redundant and (mostly) confusing and unnecessary standards. But you shouldn't complain that so many XML parsing toolkits exist, that gives you the freedom to choose the one thats right for a given application.

      And after all, isnt that what this is all about? Categorising one programmer as better than another because of their programming language is like saying that surgeons are better than barbarians. Both use blades, but you dont want to perform heart operations with a longsword!

    2. Re:Python vs Java by abigor · · Score: 4, Interesting

      Also, take a look at PyQt for very nice Python bindings to the Qt library, and PyKDE for bindings to KDE. The latter is amazing: the excellence of Qt and the KDE libraries together with Python is quite a combination.

      In defence of Java, much of its library support is for use with big systems, like enterprise apps that run under J2EE servers. Python is nowhere near this level.

      Put simply, Java scales up; Python scales down. I think, however, that in the future, Python could pose a serious challenge to Java if an enterprise-level app framework is ever created for it. But Java has such huge momentum I doubt it will be toppled from the enterprise server throne anytime soon.

    3. Re:Python vs Java by chez69 · · Score: 2, Informative

      I don't have to install anything in my classpath to use standard java classes.

      --
      PHP is the solution of choice for relaying mysql errors to web users.
    4. Re:Python vs Java by mad.frog · · Score: 3, Interesting
      I think the main reason I write so much stuff in Python and pretty much nothing in Java is simple: Open source and comprehensive standard library.

      Interestingly, I just started trying to learn Python recently, for just these reasons... but soon gave up in frustration.

      My issue is that I live for static typing. Yes, yes, yes, I know it's (apparently) very unfashionable to want the compiler to check for trivial mistakes, but I'm funny that way.

      Don't get me wrong: dynamic typing is great. It's a wonderful tool to have available. But more often than not, I know the type that I need, and can make my app more reliable by enforcing those constraints at compile time rather than at runtime.

      But the final straw has to be the deliberate omission of variable-declaration statements -- this is like some nightmare out of circa-1982-BASIC. What, it's too hard to declare variables? C'mon, that's not flexibility -- that's laziness.

      The idea of an interpreted, dynamically-typed language with a huge standard library is verrry appealing to me, but I refuse to switch unless I can have static type checking built in to the language.

      (For that reason, ECMAScript 4, aka JavaScript 2.0, aka ActionScript 2.0, is looking more and more interesting to me: I get all of the dynamically-typed goodness I want, along with flexible compile-time type checking that is "on" by default, but trivially easy to work around. If only there was a way for me to use all the existing Python libraries from there...)

  11. cover all the bases! by MarkEst1973 · · Score: 2, Interesting
    and learn to use Jython!

    You can put Java on your resume to get the job, and then use Python to glue components together!

    All kidding aside, I am currently working on a pretty complex java project. I've written various small programs as utilities, and these programs would have been better off as scripts accessing some of the java classes I had already written.

    The downside of java -- in this circumstance --- was having to deal with classpath and compiling cycles and whatnot. What I really wanted was to write the program/script easily, have it leverage what I had already done, and not bloat the resulting .jar files with little utility programs that would be better off as scripts.

    I learned Python a little too late for this project, but you can bet your ass Jython will be embedded in my next.

    1. Re:cover all the bases! by abigor · · Score: 3, Insightful

      Also, Python has an interactive prompt. This sounds like no big deal, but it is amazingly helpful when writing code to run little bits or even entire methods just to make sure things are correct. This makes the language even more Lisp-like.

  12. The way source code looks by tcopeland · · Score: 5, Interesting
    Nicely put. Ruby:
    collection.each {|x| do_something(x) }
    or Java?
    for (Iterator i = collection.iterator(); i.hasNext();) {
    do_something((SomeType)i.next());
    }
    Given the choice, I'll go with Ruby...
    1. Re:The way source code looks by r.jimenezz · · Score: 5, Informative
      Mmm...

      for( SomeType s : collection )
      doSomething( s );

      I think something along those lines is already possible in Java :)

      --
      The revolution will not be televised.
    2. Re:The way source code looks by geniusj · · Score: 3, Funny

      I love you, Ruby!

    3. Re:The way source code looks by stratjakt · · Score: 2, Insightful

      Well if pretty source code is what matters, why dont you just use VB?

      For each Object in Collection
      Object.DoSomething
      Next Object

      That's more "readable" than either of your examples, even readable by someone who's never coded anything in their lives.

      Frankly, I wouldn't call it a better tool than either, though that might depend on the requirements of the project.

      You have to assume your code is going to be read by someone with an understanding of the language. If you don't know that a C program starts at int main(int argc, char **argv) then it's not the coders fault, for example.

      --
      I don't need no instructions to know how to rock!!!!
    4. Re:The way source code looks by Evangelion · · Score: 4, Funny

      Hey if you want readability, Perl has 'em all beat:

      for(keys %{$hr}){$hr{$_}->s($x);}

    5. Re:The way source code looks by tcopeland · · Score: 2, Informative

      > for( SomeType s : collection )
      > doSomething( s );

      Yup, JDK 1.5 (or 5.0?) will introduce generics, enumerations, and a for-each construct - as soon as it gets out of beta.

      But it'll be about four years you'll be able to actually use them because it'll take that long for folks to move off of JDK 1.4 :-)

    6. Re:The way source code looks by Waffle+Iron · · Score: 2, Insightful
      That's more "readable" than either of your examples, even readable by someone who's never coded anything in their lives.

      I'm familiar well over a dozen languages, but I've never used VB. It's not clear at all to me what the "Next Object" line us supposed to do; it's a rather unusual looking construct. I assume it advances the iterator, but in most languages that's handled by the "for each" loop itself.

      It really is pretty hard to beat Python's version for clarity and simplicty:

      for x in collection: x.foo()
    7. Re:The way source code looks by Anonymous Coward · · Score: 3, Informative

      Sure, with these toy examples...

      But the thing to keep in mind is, the Ruby version is just a method on the collection, it is NOT a language construct. You can write your own like this:

      # do it in a random order
      collection.each_random { |x| x.do_something }

      # do it to every other item
      collection.each_even { |x| ... }

      # show a busy cursor during the operation
      collection.each_with_busy_cursor { |x| ... }

      You really don't realize the power of Ruby until you start coding BEYOND what you can already do in other languages.

      And if you play with Lisp, the *whole language* is fluid like this. For instance in a lisp program I needed to slow down a sequence of operations by sleeping in between. I wrote a macro that took a block of code and inserted (sleep 1) between every operation:

      (sleep-between 1
      (foo)
      (bar)
      (baz))

      How do you even begin to do this kind of stuff in, e.g., VB?

    8. Re:The way source code looks by LnxAddct · · Score: 2, Interesting

      There are much cleaner ways to do such a a thing in java then what you noted, even prior to the 1.5 jvm, but regardless, that Ruby code does not look cleaner to me. Smaller yes, but if we are going for small then use perl or something. For instance, what the hell is the x for in the ruby statement? Is it some magical variable that popped out of nowhere and was never declared (I know you don't need to declare variables but its good to do so)? I have not a clue. I only briefly used Ruby a while back, i found it nice that it told you that a number was near infinity rather then keep going like python, although both have their uses. I use python for arbitrary integer calculations and for scripting little things, and java for everything else. Java fixed everything bad about C++ and it is still superior to C#. It is also extremely fast, if you need something faster then java then you should be using assembly. Python on the other hand is slow as hell, it has its place, but I am much more proficient in java. Also, as far as deployment goes, you can't beat Java WebStart, it is essential to me now a days. In conclusion, I find that Java is my first choice for any real programming that is done on a large scale or is "critical" in one sense or another. Python for little things that can be scripted. I don't see a need for Ruby, it is neat as an educational device but nothing more.
      Regards,
      Steve

    9. Re:The way source code looks by ArsonSmith · · Score: 2, Informative


      foreach ( @collection ) {
      $_->DoSomething();
      }

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    10. Re:The way source code looks by hobo2k · · Score: 2

      Lets not forget VB! LOL

      For Each Thing As SomeType in SomeCollection
      If Not DoSomething(Thing) Then Exit For
      Next

      W00t!

    11. Re:The way source code looks by cliveholloway · · Score: 3, Informative
      Err, two things:
      1. You're not dereferencing the hashref ( $hr->{$_} )
      2. You're not doing what was asked - you're iterating through keys of a hash rather than an array.

      Damn Perl trolls ;-)

      for (@x) { do_something($_); }

      # or even simpler
      do_something($_) for @x;

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    12. Re:The way source code looks by Fnord · · Score: 2, Insightful

      See, this is what I love (and admittedly alot of people hate) about Perl. I remembered reading that use of the for keyword, back when I was reading the camel book, but
      foreach (@x){ do_something($_); }
      was simple enough so I promptly forgot about it. But
      do_something($_) for @x;
      is so obvious in its syntax that I immediately know what it's saying, at least if I understand other simpler statements like:
      print if something_bad();

      I just don't get the recent animosity towards perl. It's honestly one of the most powerful languages I've used. The unreadable code argument falls apart when you've seen some of the COMPLEATLY unreadable Java, Python, Lisp (although I personally think that language is unreadable by design) code I've seen. Any language can and will be abused. Strict languages like Java just punish the creative programmer for the failings of his incompetant coworkers.

  13. Python in the workplace by jobeus · · Score: 3, Informative

    Interestingly enough, knowing Python did get me a job... My company works a lot with Java too, but my job specifically deals with about 90% Python, and 10% Java... I never thought there was a use for it when I learned it in University...

    Too bad I'm maintaining code with two letter variable names all the time though, and now it's soured the language for me as well... heh.

  14. Re:nonsense... by Tlosk · · Score: 3, Insightful

    But to motivate you to do what? Look at what people do for money. Look at the things people do never receiving a dime for it.

    There are some serious qualitative differences between those two global groups of actions. It seems more often the case that great art comes from subsistence funding, just enough to allow the creator to live while he/she creates. Additional funds don't have any where near the impact they do in so many other endeavors. In fact, if you look through large grant artwork, one might even conclude there is a negative impact.

  15. Re:nonsense... by jellomizer · · Score: 3, Insightful

    Well this is kinda the point of the article.
    A person who is apathetic to programming will learn whatever pays the most. While a person who loves to program will study and learn different tools and explore them to advance themselfs.

    It is like a person who brushes his teath to avoid the pain of cavities. VS. a person who brushes their teeth because the like the clean taist in their mouth. Who will have better oral health, the later because brushing teeth is a joy for him while the first guy will just do it enough.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  16. Using that logic, REXX coders are God-like by spookymonster · · Score: 3, Insightful

    We're both obscure AND poorly-paid!

    --
    - Despite popular opinion, I am not perfect.
  17. Python jobs - got resumes? by otisg · · Score: 3, Informative

    Who says Python is not good for getting jobs? I know at least 2 places in New York City where you should send your resume, if you are a good Python hacker: http://www.wirelessgeneration.com/ and http://www.divmod.org/ (also .com).

    --
    Simpy
  18. hhhh by farmer11 · · Score: 2
    He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend far more time reading code than writing it
  19. Java programmer's viewpoint by MSBob · · Score: 4, Interesting
    Well, all I can say to Paul is "you're wrong". Java developers tend to stick with Java not because they are in mad love with Java the language but because they recognize that Java is bigger than the sum of its parts.

    The immense number of system and third party libraries is what keeps most Java developers coding Java. The close second is Java developer's tools. Until there is an IDE for Python that's as extensive, capable and sophisticated as Eclipse I'm going to stay with Java. Most Java development is in the enterprise server side space and the sheer amount of tools that Java offers is just mind boggling.

    Also us, enterprise developers tend to work in environments that are much more conservative from the technology standpoint (banking, insurance, brokerage). As far as I'm concerned it's a big win for us that we got Cobol elbowed out with Java. Trying to push the language of the month at those executives will cause us more harm than good.

    I know that Python has some very nice features (I read the tutorial) but it's hardly the sort of paradigm shift that merits ditching Java and rewriting everything because of some neat syntax flavoring. Besides Java is hardly a frozen language and we have some exciting stuff coming down the pipe here. JDK 1.5 will introduce shared VM model which may make java compeling on the desktop, more elaborate iterators, annotations (my favourie in 1.5), and generics (although without primitive types support they are kinda lame).

    Java is now frequently used in CS research as well. It looks almost certain that the next milestone in CS evolution will come in the form of Aspect Oriented Programming and AspectJ has been the leading implementation.

    Sometimes it feels that Paul G. just has an ax to grind into the collective Java community but I wonder how closely did he actually look at Java before dismissing it?

    --
    Your pizza just the way you ought to have it.
    1. Re:Java programmer's viewpoint by Yaztromo · · Score: 2, Insightful
      Well, all I can say to Paul is "you're wrong".

      I agree. Paul is trying to justify an untenable position. My favorite quote:

      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.

      Yeah, well it was quite a lot of work for those Java developers to learn Java as well. People aren't born knowing Java anymore than they're born knowing Python. It takes a lot of work to learn how to program in Java correctly -- even more effort than would be required to learn Python I'd venture (based on my extensive experience...).

      A good Java programmer has to be smart. If they're writing anything non-trivial, they need to be aware of classloaders, how the garbage collection system works, multithreaded software design, optimization, etc.

      I can agree that I've encountered a whole lot of Java developers out there who write bad code. But I don't think the ratio is any different than in any other popular language.

      Yaz.

    2. Re:Java programmer's viewpoint by SkeptiNerd75 · · Score: 2, Informative
      Until there is an IDE for Python that's as extensive, capable and sophisticated as Eclipse I'm going to stay with Java.


      Actually, you can use Eclipse as an IDE for Python: http://www.python.org/cgi-bin/moinmoin/EclipsePyth onIntegration.

      And why choose between Java and Python when you can have both?

    3. Re:Java programmer's viewpoint by MSBob · · Score: 2, Interesting

      The Python integration within eclipse is nowhere near the level of java integration. I also don't get the sense that it is a project with the same amount of focus and dedication as say, AspectJ which is beginning to look just awesome!

      --
      Your pizza just the way you ought to have it.
    4. Re:Java programmer's viewpoint by MSBob · · Score: 4, Interesting
      You're exactly the enterprise developer he's talking about. Enterprise developers don't do it because they love enterprise programming. You have to be really sick to love enterprise programming.

      Nothing like starting your reply with a good ad-hominem attack, eh?

      lot of people choose Java, but only a very small number for open source projects

      Tell that to the Apache consortium. Most of their new projects are all java. The whole Jakarta, Geronimo all very prominent java efforts. Besides Freshmeat returns 2381 java projects and 956 python projects... hardly the ultimate in testing languages' popularity but it dispells your stupid assertion that only a small fraction of OSS projects are written in Java.

      Changing topics: aspects. Aspects are stupid. They make sense in a language like Java that has no metaprogramming capabilities. They are absurd in other languages like Python or Lisp.

      Aspects are not macros and macros cannot do everythin that aspects can. Go back and read more on aspects.

      Finally, stop acting like an arrogrant asshole. It makes you look very infantile.

      --
      Your pizza just the way you ought to have it.
    5. Re:Java programmer's viewpoint by haystor · · Score: 2, Interesting

      The ratio is vastly different for different languages. Python programmers are a self-selected group of people who opt to use Python often for the joy of programming. Java is the default corporate language now that people learn to get a job or make money.

      Saying the two groups are equally intelligent is somewhere on the order of saying business majors and math majors are equally intelligent. Both attending college, but typically one group is after just a degree and the other is pursuing knowledge. The numbers are 100% either way, but there is a much higher percentage of geniuses in math than in business classes. Nobody flunks out of business into math.

      Argument, short form:
      Java is the choice of consultants, not the choice of scientists.

      Ok, for pure brainpower here is the competition I propose: Take a Python programmer and a Java programmer. They tackle the same problem in both Python and Java. I'm betting on the Python guy to present better solutions in both languages.

      Most of the complaints about Graham are likely from people who are just barely programmers. Their real skills aren't as programmers but that they happen to know enough of the libraries to get things done. This makes them useful when combined with a certain industry experience, but it doesn't make them good programmers. One of the most common arguments for Java replacing other languages I've seen is that it's easier to find Java programmers and that they are pretty much replaceable. Personally, I no longer aspire to being easily replaceable. I'm now accepting positions that expect me to perform well enough that I would be difficult to replace.

      -- Former consultant

      --
      t
    6. Re:Java programmer's viewpoint by mschaef · · Score: 2, Informative

      "Java is now frequently used in CS research as well. It looks almost certain that the next milestone in CS evolution will come in the form of Aspect Oriented Programming and AspectJ has been the leading implementation. "

      Ironically enough, AspectJ is heavily based on the Lisp/CLOS Metaobject protocol that dates back to the late 80's and early 90's. Not that this should suprise anyone, the same folks developed both tools. I'd characterize AspectJ as more an "industrial response" to CLOS/MOP than new research.

    7. Re:Java programmer's viewpoint by Yaztromo · · Score: 2, Insightful
      Most of the complaints about Graham are likely from people who are just barely programmers.

      I call bullshit on you.

      I'm complaining about Graham and other language-bigots, and over the last 20 years I've coded in:

      • Java
      • C
      • C++
      • REXX
      • ObjectREXX
      • Ada 83
      • Ada 95
      • Modula-2
      • Pascal
      • Basic
      • x86 Assmebly
      • VAX-VMS Assembly

      ...and have dabbled in many others (and I'm exccluding a whole slew of scripting languages from the above list). And I've written that code on and for the following platforms:

      • Mac OS X
      • Mac OS 7
      • VMS
      • OS/2
      • AIX
      • HP-UX
      • Solaris
      • Linux
      • *BSD
      • Dynix
      • Windows (3.0 to 2000)
      • DOS
      • CP/M
      • PalmOS
      • S/390
      • PlayStation 2

      ... and that list excludes older systems I started on like the Commodore 64 that didn't have an Operating System (per-se).

      And much of this development hasn't been on small projects either. Indeed, a good portion of my platform development experience came about when I worked at the IBM Toronto Softwre Development Lab, doing DB2 development.

      And I'm a Java developer. And not because I have to for job purposes (indeed, I generally refuse to work at jobs using Java, because most Java-related jobs suck), but because it's a language and environment with strengths not sufficiently matched elsewhere. I've programmed AI solutions in Java, protocol handlers in Java, and various other complex tasks beyond your usual "call a bunch of APIs" crap you seem to paint Java developers as doing.

      Ok, for pure brainpower here is the competition I propose: Take a Python programmer and a Java programmer. They tackle the same problem in both Python and Java. I'm betting on the Python guy to present better solutions in both languages.

      I'd take that bet, and then completely wipe the floor with whomever you pitted me against :).

      Sorry, but this sort of language bigotism really gets to me. Yes, there are crappy Java developers out there. Yes, many organizations doing Java development are targeting mundane tasks. But same goes for every other language out there -- the only difference is in degree.

      In my years of speaking at conferences and chairing workshops on topics in computer science research, I've met a whole pile of brilliant people working in Java to solve complex problems. I've seen it used for artificial intelligence, robotics, research operating systems, protocol stacks, and game development -- more compilcated projects than your typical Python developer is ever going to tackle (nevermind all of the VM research I've seen surrounding Java).

      Brad BARCLAY
      Lead Developer & Project Administrator,
      The jSyncManager Project (Open Source Java at that).

    8. Re:Java programmer's viewpoint by julesh · · Score: 2, Interesting

      I would be much happier with java if it had a few things--first off, a dynamic typing construct a la 'id' in objective C. 'object' just isn't powerful enough.

      I'm afraid I don't know objective C. Could you elucidate on what this provides that Java lacks?

      Secondly, callables a la python. This includes class methods and statics (not merely function pointers like C).

      This can be achieved using the java.lang.reflect.Method class. It's ugly, but workable, and a number of my software projects have used it.

      The fact that you have to jump through hoops to attach an event handler using a callback model (a la Swing) is inexcusable.

      This is an API issue, rather than a language issue. Swing and AWT aren't the only GUI toolkits that are usable with Java, and you are free to write your own, as I have done. I don't have to jump through any hoops to handle events.

      Are anonymous classes really a solution? How about in an application with hundreds of event handlers?

      Anonymous classes work for me. They're managable because you put them in the code where you want them. I've never written an application with hundreds of them, though.

      A programming language should enable the use of different techniques, not restrict them.

      Agreed, and I for one would like to see a nicer syntax provided for reflected methods -- at the moment to get one you have to write 'object.getClass().getMethod("methodName",new Class[]{ ParameterType.class })' and handle the exceptions that can be thrown, where the compiler can easily determine that there are no possible exceptions and provide a much simpler way of doing the same thing. This would make the use of this kind of technique much easier.

      Additionally, the overhead of object allocation in Java is awful. Simple objects whose only attributes are primitive types should be stack allocated under a certain size.

      Stack allocated objects are hard to manage -- the compiler would have to perform checks to ensure that no reference to the object can exist outside of the scope of the function call before allocating it on the stack. An interesting point is that there is nothing stopping VM implementors from doing this anyway, it wouldn't violate the specification. The difficulty of making it work correctly is the only issue.

  20. The Java Problem by Ridgelift · · Score: 2, Interesting

    I'm a Python programmer. I never learned Java because I heard so many people complain about how many books and reference materials they need just to get things done.

    What I don't understand is why I even need Java? Jython let's me do pretty much everything Java can do, in a language that is a lot simpler that "fits in my head", not fits in a huge bookshelf. Sure I still need to know a bit about Java classes and such, but it's a lot less work than my friends who program in Java have to do. I feel sometimes like I'm watching people hike up to the top of a mountain every day, while I just take a 4x4 and get to the same place, but get there faster and with a lot less sweat and effort.

    Can anyone who codes both in Python and Java educate me?

    1. Re:The Java Problem by brunson · · Score: 3, Interesting

      I'm a Python programmer, and I do know Java and I have developed in a J2EE environment and I have written EJBs and I have also been writing Perl for the last 15 years. And I have been a professional C developer and I know C++, Objective C, Fortran, Cobol, Ruby, Haskell, sed, awk, Korn shell, Bourne shell, DTKsh, C shell. I've written in just about every language you can name.

      And you know what? I think Python is the best.

      I'm more productive, it's more intuitive, it took three months of writing Python for me to dump Perl completely after using it for 12 years.

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
  21. Re:Apples and oranges by tcopeland · · Score: 2, Insightful

    > Don't really see how you can compare
    > a scripting language with an OO
    > development language.

    Hm. I think the line between the two is getting pretty blurry. I mean... Ruby and Python are both "scripting languages", but folks have done some pretty impressive object-oriented apps with both of them. Also, the larger a Java app gets, the more it seems that it uses Class.forName and dynamic this-and-thats to work around static typing and such.

    I think that "scripting" vs "OO development" language may still be a useful distinction, but it might be more clear when comparing, say, AWK to Java, not Ruby to Java.

  22. Not true! by notany · · Score: 4, Insightful

    n 1960, a researcher interviewed 1500 business-school students and
    classified them in two categories: those who were in it for the
    money - 1245 of them - and those who were going to use the degree to do
    something they cared deeply about - the other 255 people. Twenty years
    later, the researcher checked on the graduates and found that 101 of
    them were millionaires?and all but one of those millionaires came from
    the 255 people who had pursued what they loved to do!

    Research on more than 400,000 Americans over the past 40 years
    indicates that pursuing your passions - even in small doses, here and
    there each day - helps you make the most of your current capabilities
    and encourages you to develop new ones.

    --
    Dyslexics have more fnu.
    1. Re:Not true! by orasio · · Score: 2, Insightful

      That could also mean that lying about your motivations helps becoming a millionaire.

  23. Re:Paul Graham is a language bigot by Tlosk · · Score: 2

    It's a fine line semantically between discrimination and bigotry. But it's a necessary part of life to discriminate, you can hardly avoid it on one level or another. But if you ask someone why they made a discrimination between various options, they can give you their reasons. Bigots for the most part will reply with that's juat the way it is, and will be unable to ellucidate the path their reasoning took to the discrimination. Why don't you want your daugther to marry person of race X? I just don't, it's wrong. Etc., etc. Graham gives some decent reasons, so I would hardly call him a language bigot.

  24. Why I like Python by brunson · · Score: 2, Interesting


    I like python because it allows you to modify the behavior of the language constructs. It gives you hooks into what happens when you say 'print myvariable' or what goes on when you retrieve 'mydict[ "something" ]'.

    Much like operator overloading in C++, this allows you to write in the language of the problem, rather than the language of the language. So, if you're dealing with dates you can overload the minus operator to calculate the time between two dates when they are subtracted. Or if you are dealing with complex numbers your operators do the right thing when you add a complex and a real.

    Similarly, in Python you can create a database search object that behaves like an associative array. So, customer_id_search[ 10 ] goes to the database, retrieves the record for customer_id 10 and returns a DAO to be manipulated.

    Iterators and many other constructs help you in writing clear, concise, MAINTAINABLE, extensible and reusable code by allowing you to code clearly in the language of the problem you are trying to solve.

    Python Rules, Perl Sucks. ;-)

    --
    09F911029D74E35BD84156C5635688C0
    Jesus loves you, I think you suck
    1. Re:Why I like Python by Khazunga · · Score: 4, Insightful
      Much like operator overloading in C++, this allows you to write in the language of the problem, rather than the language of the language.
      Unknowingly, you just summarized beautifuly why I absolutely hate operator overloading. It makes the entering curve on a running project (or new maintenance project) absurdly steep. All of a sudden, you not only have to learn the architecture of the solution, but the goddamn language of the solution.

      It's a really nice idea, with great direct effects and horrible side-effects.

      --
      If at first you don't succeed, skydiving is not for you
    2. Re:Why I like Python by torpor · · Score: 2, Insightful

      It's a really nice idea, with great direct effects and horrible side-effects.

      You seem to have missed the point of the article intro-text entirely.

      If you come at Python like you're studying it, for fun, and not "entering curve on a running project" (whatever that means), then you don't actually trip up on the language/problem domain issue. Instead, you have fun with it, and it makes programming fun again ...

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    3. Re:Why I like Python by razeh · · Score: 2, Informative
      I disagree. Operator overloading is nothing more then syntactic sugar. Code that uses it is no more difficult to read then code that makes ordinary function callls.

      When you see:

      Foo a, b(3), c(5.3);
      a = b + c;

      You will be tempted to assume that addition is occurring. Do not! Treat the above code exactly as if it had been written:

      Foo a, b(3), c(5.3);
      a = b.add(c);

      Or better yet:

      Foo a, b(3), c(5.3);
      a.assign(b.add(c));
      Once you've realized that it's all function calls your frustrations will vanish.
    4. Re:Why I like Python by chromatic · · Score: 2, Insightful

      I can understand your quibble with learning what certain symbols mean in a specific context, but what part of learning a new codebase isn't learning the language of the solution? Class names, method names, function names, variable names, and metaphors -- they're all part of that new language.

    5. Re:Why I like Python by Just+Some+Guy · · Score: 3, Insightful
      subdate()

      Do you have one of those narrow screens talked about in a previous Slashdot story? I used to laugh at people who wrote out subtractDate() - until I had to revisit my own code after not seeing it for months and figure out that procntr() meant "process the entry".

      You have a lot of keys on your keyboard; might as well use 'em.

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:Why I like Python by mvpll · · Score: 2, Informative

      I have objects of type A and B. Both handling strings, A as a single string and B as an array of strings.

      You seem to think that

      A3 = A1+A2
      B3 = B1+B2

      is just as easy for a human to parse as

      A3 = A1.concat(A2)
      B3 = B1.add_element(B2)

      I disagree.

    7. Re:Why I like Python by chenwah · · Score: 2, Interesting

      While in the real world I have used this in python a great deal, in my little hobbyist/pretend-academic world this is one of the things about python that really leaves a bad taste in my mouth. I'm all for meta-programming, I think it is a great tool to let you modify the language to create something more suited to your problem, but I just can't stand the way that python does it.

      Instead of a well defined meta-protocol python just exposes a few pieces of its intenals, a few hooks that let you override the default behaviour. It all seems a bit ad-hoc to me. It seems to make optimisation difficult too. Ref. the creation of the += operator to bypass the (possibly mutating) hooks involved in a = a + b.

      Languages like Smalltalk and Common Lisp (with CLOS) properly formalise this and make things more predictable and flexible. Of course, I have written a heap of useful python code but noone has ever paid me to write something useful in CLOS. It's fun to think about stuff like this but python get jobs done :-)

    8. Re:Why I like Python by brunson · · Score: 2, Interesting


      My last large project was a provisioning system for the 3rd largest internet carrier in the world. It provisioned and maintained managed modem service for over 23 million users in the US and overseas. It consisted of about 150,000 lines of python code and is now being quite happily supported by 2 of my friends that are still working there.

      Get over yourself.

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
  25. Confused by Ranx · · Score: 3, Funny

    First we hear is't a huge disadvantage when a programmer doesn't know the business-side of software development. And now it's the other way around.

    I'm confused.

    --

    Me
  26. what is PG's fascination with Python? by Anonymous Coward · · Score: 5, Insightful

    I use Perl, Python, Ruby, Lisp, Scheme...

    Out of those, Python is probably the least Lisp-like, and the worst designed (well, okay, yes, Perl's design is *much* worst, but it can be massaged into doing lots of cool stuff).

    Yet PG brings it up all the time when he talks about Lisp. To me Lisp and Python are like night and day. How do you create anonymous functions and pass them as variables in Python? You can't, only "lambda *expressions*" which is a strange and arbitrary distinction. In Lisp, creating functions on the fly is the norm. Python doesn't have macros, or even blocks like smalltalk or Ruby, which again is one of the best things about Lisp, allowing you abstract and refactor the flow of code itself. In Python, you have arbitrary but fixed structures bolted on, like comprehensions, or tuples. In Lisp, you can create new constructs on the fly, using the same syntax as everything else.

    In my opinion Python is like the Java of the open source world: tons of people use it, they think it's great because it's a lot better than whatever they used last year (C++, Perl, etc), and they don't realize (or care) there are better languages that can help them work faster.

    Maybe Paul should adjust his spiel to simply say: the more obscure a language a person has mastered, the more likely he is a smart self-motivated programmer.

    But even that isn't true all the time...

    1. Re:what is PG's fascination with Python? by Piquan · · Score: 2, Informative

      I think that he was griping about the distinction between what you can do with a function, and what you can do with a lambda. In Lisp, you can put whatever you want in a lambda. In Python, you can only have a single expression.

      Example, with _s added to deal with ECODE's idiocy about leading spaces:

      _;; v1, in Lisp:
      _(defun make-spammer (n)
      ___#'(lambda (stream)
      _______(format stream "~A tons of spam!~%" n)))
      _# v1, in Python:
      _def make_spammer (n):
      _____return lambda stream: stream.write('%d tons of spam!\n' % n)
      _;; v2, in Lisp:
      _(defun make-spammer (n)
      ___#'(lambda (stream)
      _______(dotimes (i n)
      _________(format stream "A ton of spam!~%"))))

      As far as I know, you can't write v2 in Python using a lambda.

      Of course, somebody else pointed out that you can create a named function and use it, as in the following example. But that can sometimes be rather inconvenient.

      _# v2, in Python:
      _def make_spammer (n):
      _____def fn (stream):
      _________for i in range(n):
      _____________print "A ton of spam!"
      _____return fn
  27. Re:haha (repeated less times due to lameness filte by adawgnow · · Score: 2, Insightful

    This article had no basis for its argument other than the opinion that Python programmers are smarter because they seek the language out (and the language rocks!). This whole argument belittles the fact that there are some amazingly talented Java programmers out there. There are great things going on in the world of Jakarta.apache.org and things like Hibernate and Spring rock! Hey aspect oriented programming was formalized by Java people. Java is heavy handed, and for projects that don't require a week or more of design and analysis prep, Java is usually a dumb idea. It is weak in the thick client area, as well. But hey, Java is cool with me. Let the language meet the need, and if you think something is cumbersome, I bet youre using it for the wrong purpose.

  28. Re:Python doesn't land you a better job by brunson · · Score: 2, Insightful

    "Because it is not as strong a language or development platform as Java"

    Oh, bullshit.

    --
    09F911029D74E35BD84156C5635688C0
    Jesus loves you, I think you suck
  29. Excellent article by Chuck+Bucket · · Score: 2, Interesting

    Paul's Python summation is brilliant. As a Perl programmer who is embracing Python programming (for interest in *learning a better tool*...), I found his article to be the single most useful document on the internet about getting started with Python. Comparing structures to other languages helped greatly.

    By looking at the article I was able to quickly gauge the amount that I need to learn to learn basic Python... needless to say, it will not be a very far stretch. I am sure that I have a lot to learn, but this easily cut weeks of trial and error off of my learning curve. I can't thank him enough. I am excited.

    CVB(Neil P. Davis)

  30. Python is great for guys like me.... by StressGuy · · Score: 5, Interesting

    I'm not a programmer, I'm just an engineer who can do impressions when he has to. This language is relatively simple and organized and, with the growing number of math and scientific libraries available, it's becoming more and more a regular tool in my arsenal.

    I guess the point I'm making is that this language has a strong appeal to people like myself who are just looking to use it to solve problems and/or make problem solving tools. I don't know anything about Java, but maybe the reason that the author feels that Python has the better hackers is because Python, by virtue of it's simplicity and no-nonsense syntax, tends to attract your more "problem solver" type person.

    Just a thought.

    --
    A goal is a dream with a deadline
    1. Re:Python is great for guys like me.... by perdu · · Score: 2, Informative
      I guess the point I'm making is that this language has a strong appeal to people like myself who are just looking to use it to solve problems and/or make problem solving tools
      Thanks for the thought!

      We have a bioinformatics group where I work and Python is the language of choice when they need to crunch alot of numbers. I understand there is a nice interface to the R statistical engine and many other useful facilities. I've never gotten any of them interested in Java which we use for our systems in IT...

      --
      You only use 2% of your DNA
    2. Re:Python is great for guys like me.... by kndyer · · Score: 2, Informative
      I agree completely, With its support for numerical analysis (and similarities with Matlab-y constructs) it is ideal for algorithm prototyping and in some cases even algorithm deployment.

      I certainly turn to Python first, rather than coding up new ideas in c++.

  31. Mr. Graham's next article should be... by dot+niet · · Score: 4, Insightful
    about why Python hasn't gained acceptance in commercial software development circles. I find these last two articles nothing more than glorified flame bait. If some of the development community's best and brightest think this language is superior, why not drive an effort to help it put food on the table rather than relegate it to a tool that helps you write scripts to rotate witty quotes in your .plan file?

    Pardon me while I go build a better mouse trap, pontificate on how much better it is and what a great mouse catcher I am, and then put it in my hamster's cage to prove it.

  32. Paradox? by Svennig · · Score: 2, Insightful
    "Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those who cared enough to learn it."

    And there in lies the greatest paradox. If companies employed people who knew python, everyone would learn it!!

    What he's really advocating is use of unknown programming languages. Thats fine, but maitainability might become an issue simply because it is hard to find the people that code in it.

    No-ones been hurt by sticking with the mainstream.

    1. Re:Paradox? by stratjakt · · Score: 2, Insightful

      If a company hired good programmers, then they'd realize that the difference between languages is mostly syntactical, and a fairly shallow learning curve. That is, to a good (experienced) programmer.

      I've never learned python, but I can read through some of the tutorials and nothing about it scares me or seems radically new. Just some new syntax and keywords, ho-hum. Such a silly thing to argue about.

      Though computer geeks argue about much sillier things. Ie; the flamewars on "hardcore techie" websites about whether Panaflo or Vantec makes the quieter 80mm case fan are fun to read when you're bored.

      --
      I don't need no instructions to know how to rock!!!!
    2. Re:Paradox? by dekeji · · Score: 3, Insightful

      Thats fine, but maitainability might become an issue simply because it is hard to find the people that code in it.

      Maintainability becomes a problem when you hire the first guy off the street who only knows the fad-du-jour, Java or VB, for example. Using off-beat languages gives you a great deal of inherent quality control: people who interview for Python, Lisp, or ML jobs generally are of higher quality.

      No-ones been hurt by sticking with the mainstream.

      You can't have been on this planet very long: large groups of people behave in stupid and dangerous ways, whether it comes to politics or choice of programming languages.

  33. Apples and apples by Dan+Ost · · Score: 4, Interesting

    Hmm...let's see.
    Both languages have a virtual machine.
    Both languages can use JIT compilers for improved efficiency.
    Both languages support OO development.
    Both languages have large standard libraries.
    Both are turing complete.

    Even their performance is similar.

    Please explain how this is an inappropriate comparison.

    --

    *sigh* back to work...
  34. Re:haha (repeated less times due to lameness filte by kndyer · · Score: 2, Insightful
    This argument just doesn't seem constructive to me.
    When I'm looking to hire a programmer, I'm looking for one thing. Adaptability.

    In my job, I've used C++, Objective-C, COM, C#, Lisp and Python. The theme here is utility. I try to use the best, most natural language for the task at hand. I don't need to work beside evangalists, I want people who see programming languages as what they are ... components in a toolbox. You choose the one appropriate for the job.

  35. Total nitpick by nine-times · · Score: 4, Insightful
    I'm nitpicking, but it's not a paradox. A paradox is something that must be untrue in order to be true, or something which can neither be true nor untrue at the same time, or must be true and untrue at the same time....

    Anyway, something like that. Here is the closest he comes to a paradox:

    ...the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job.

    First, employers are always looking for people who go above and beyond the bare-minimum, including people who like what they're doing enough to do it even when they aren't paid. That doesn't constitute a paradox. Second, as soon as people widely believe that it is a good standard for hiring programmers (meaning it really is the language to learn to get a job), people will start learning it merely to get a job, so I'm not sure his statement really even makes sense.

    So, while I'm not saying anything about his statement that python programmers are better (since I'm not a very good programmer in any sense, and wouldn't know to argue), describing it as a "paradox" seems like pseudo-intellectual camouflage for a "Python RULES!" article.

  36. Why I like Python by brunson · · Score: 2, Interesting

    [reposted because my original parent got modded into oblivion]

    I like python because it allows you to modify the behavior of the language constructs. It gives you hooks into what happens when you say 'print myvariable' or what goes on when you retrieve 'mydict[ "something" ]'.

    Much like operator overloading in C++, this allows you to write in the language of the problem, rather than the language of the language. So, if you're dealing with dates you can overload the minus operator to calculate the time between two dates when they are subtracted. Or if you are dealing with complex numbers your operators do the right thing when you add a complex and a real.

    Similarly, in Python you can create a database search object that behaves like an associative array. So, customer_id_search[ 10 ] goes to the database, retrieves the record for customer_id 10 and returns a DAO to be manipulated.

    Iterators and many other constructs help you in writing clear, concise, MAINTAINABLE, extensible and reusable code by allowing you to code clearly in the language of the problem you are trying to solve.

    Python Rules, Perl Sucks. ;-)

    tcA thgirypoC muinnelliM latigiD eht detaloiv tsuj evah uoY

    --
    09F911029D74E35BD84156C5635688C0
    Jesus loves you, I think you suck
  37. WHat turns me off Python by SuperKendall · · Score: 3, Interesting

    I personally find the main claim, that Python programmers are just naturally the smartest people on earth, to be rather offensive.

    I consider myself a pretty good programmer. I otherwise fit the criteria he lists in that I do a lot of programming for fun, and like to explore new languages...

    but not Python. And you know why? It sounds petty and stupid, but I just hate the whitespace indenting. I have always thought that perfect code readability relied on the felxibility to format certain sections of code differently than others, and the need to have indenting control grouping of statements has always been way too rigid for my tastes.

    So there you go, that's why one Java programmer is not into Python at all (not even Jython).

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  38. Re:Python doesn't land you a better job by osobear · · Score: 2, Funny

    ahhh, Slashdot, the place where "Oh, bullshit" is an insightful comment.

  39. Dumbest thing I've read in a while by GreenCrackBaby · · Score: 5, Insightful
    A couple years ago a venture capitalist friend told me about a new startup he was involved with. It sounded promising. But the next time I talked to him, he said they'd decided to build their software on Windows NT, and had just hired a very experienced NT developer to be their chief technical officer. When I heard this, I thought, these guys are doomed. One, the CTO couldn't be a first rate hacker, because to become an eminent NT developer he would have had to use NT voluntarily, multiple times, and I couldn't imagine a great hacker doing that; and two, even if he was good, he'd have a hard time hiring anyone good to work for him if the project had to be built on NT.


    Not trolling here, but this opinion piece is stupid. Hell, just look at that quote above. "He couldn't be a first rate hacker since he obviously chose NT voluntarily." According to the author, there's no way to succeed if you choose to build on NT.


    Knowing Python doesn't make you a "first rate hacker". Any decent programmer can pick up a language like python in a day or two. A good hacker (i.e. a programmer that a company would want to hire) is someone who can take their previous experience and apply that to the problem at hand, using the tools available. Saying "...but I know Python" is the same as saying "...but I know Assembly" when you have a bunch of C++ code to write.

    --

    "The market alone cannot provide sufficient constraints on corporation's penchant to cause harm." -- Joel Bakan
    1. Re:Dumbest thing I've read in a while by mav[LAG] · · Score: 3, Insightful

      Hell, just look at that quote above. "He couldn't be a first rate hacker since he obviously chose NT voluntarily." According to the author, there's no way to succeed if you choose to build on NT.

      That's not what he said. He said he couldn't be a first rate hacker. He's carefully defined what he thinks makes a first rate hacker leading up to this paragraph and then gives it as a counter-example.

      Knowing Python doesn't make you a "first rate hacker". Any decent programmer can pick up a language like python in a day or two.

      RTOFA. He says:
      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.
      Which makes them exactly the kind of programmers companies should want to hire.


      You claim:
      A good hacker (i.e. a programmer that a company would want to hire) is someone who can take their previous experience and apply that to the problem at hand, using the tools available.

      Graham says a first rate hacker would not be satisfied with just any tools and would probably think that their previous experience isn't worth a whole lot - even though in the eyes of other hackers it might be godlike stuff. I agree that what he says is contraversial and pushes a lot of people's buttons but be fair in your criticism.

      --
      --- Hot Shot City is particularly good.
  40. Hm. by cbiffle · · Score: 2, Funny

    So, following this hypothesis, the tools for the Brainfuck programming language should be best of all? I've -never- seen a BF job posting.

  41. Re:Apples and oranges by pthisis · · Score: 2, Insightful

    Don't really see how you can compare a scripting language with an OO development language

    Which is which? Python is at least as OO as java. Even ints are objects.

    >>> a=2
    >>> a+1
    3
    >>> a.__add__(1) # used by + operator
    3
    >>> class my_int(int): ... def __add__(self, b): ... if self==2: ... return self ... return int.__add__(self, b) ...
    >>> a=my_int(2)
    >>> a+1
    2
    >>> a+2
    2
    >>> a=my_int(1)
    >>> a+1
    2
    >>> a+2
    3

    --
    rage, rage against the dying of the light
  42. Re:Apples and oranges by dekeji · · Score: 4, Insightful

    Don't really see how you can compare a scripting language with an OO development language.

    Python clearly is an object-oriented development language; it even has multiple inheritance. Python is pretty close in its semantics to Smalltalk, and there are several native compilers and environments for Python. So, Python really is much more than a "scripting language".

    It's not clear that Java should even be called "object oriented". Alan Kay said "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Well, Java's object system is even more restrictive than C++'s.

    So, yes, it does make sense to talk about Java and Python and compare them.

  43. Re:Python doesn't land you a better job by Anonymous Coward · · Score: 2, Insightful

    " ahhh, Slashdot, the place where "Oh, bullshit" is an insightful comment."

    Oh, bullshit.

  44. It's about innovation, not language by ip · · Score: 2, Insightful

    The value added to an organization from a good hacker, doesn't come from the number of lines of code per day, of number of functions implemented per day, but from the design and programming leaps he or she can add .

    If you know Python, it's either because you had time to learn it out of curiousity, or because you needed to learn it for work or school. In either case, your value in terms of innovation has not changed. Maybe your ability to deliver those innovations quickly has, but that still doesn't make or break your value to a business. Is the fact that you learned it for fun a difference? Sure it is, but the same applies to people who learned Java for fun.

    If your like me, and you do know Python, and it makes you smile every time you write something, and your employer accepts it because things are getting done, then great. But a number of people feel the same way about Java.

    Is the average Pythoneer better than the average Java hacker? It's a meaningless question.

  45. Now he has pissed off *everybody* by Sloppy · · Score: 2, Funny
    First, Java programmers weren't as smart as Python programmers.

    Now, Python is "esoteric." Esoteric?!? Them's fightin' words! Python is for everybody, and one of the easiest languages to learn.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  46. Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 3, Insightful

    I know religious wars are traditional here on Slashdot, but saying that Python is better than Java, or that Java is better than Python, well, it's like saying Audis are better than BMW's. It's a matter of personal taste, and no more than that.

    Name me ONE TASK that Python (or Java) can do that the other can't. There isn't one. Tell me which one is faster! On modern equipment, you won't notice any difference for most tasks. You'd have to find something massively computationally intensive to get any sort of reasonable comparison, and even then it would be tough.

    In the end, it comes down to this: what is your personal coding style? What sort of syntax are you most comfortable with? If you come from a scripting background, you'll probably like Python better. If you're coming from a C background and love those curly brackets and semicolons, you'll dig Java (that's my personal preference, by the way, I'm uncomfortable with using indentation to manage blocks, for example). Maybe something in one library or the other is attractive to you. Maybe you just want to use Open Source.

    It's all just a matter of taste.

    Having said that, the original article was dead wrong about one other thing. The idea that Python attracts "smarter coders" because they're doing it for the love of it is misguided. The reason is, there are smart coders writing for the love of both languages; Java only gets more idiots because there's money in it. So the author SHOULD have said "If you use Python, you'll get far fewer applicants, so it'll be easier to filter out the hacks".

    --
    Farewell! It's been a fine buncha years!
    1. Re:Horsefeathers! Horsefeathers I say! by pthisis · · Score: 2, Insightful

      Name me ONE TASK that Python (or Java) can do that the other can't.
      Both are turing complete, and you could implement a Python interpreter in Java or vice-versa. If "it's possible somehow" is your measure, then there's no reason to choose Java over assembly.

      In the end, it comes down to this: what is your personal coding style? What sort of syntax are you most comfortable with?

      Syntax is largely irrelevant, people learn it quickly. Much more important are things like:

      * Do I have strong typing or not? (Python, Java, ML, Ada vs C, C++, Tcl)
      * Do I have dynamic typing or static (Python, Lisp, Tcl vs. Ada, C, Java, ML)
      * How good is the language I'm using at modelling the problem I'm trying to solve?
      * How good is the language at expressing things clearly and concisely
      * How easy is it to reuse code/read code written by others/maintain large systems

      Things like functional programming, pattern matching (NOT regex matching of strings, but real ML-style pattern matching), object orientation, metaprogramming, dynamic code generation, hygienic macros, the type model, etc all have REAL affects on how easily and elegantly you can solve a problem.

      Less sexy but equally useful are details like "are flexible mappings a language feature or a library add-on", which seems trivial but makes a huge difference in practice.

      Some of those features are very important when doing certain things and nearly useless when doing other things.

      But programming languages definitely CAN be "better" than each other with respect to certain problem domains, and Python and Java differ in one of the most fundamental ways there is (more fundamental than e.g language-level support for object oriented programming, in my opinion) in that Java is statically typed and Python is dynamically typed.

      --
      rage, rage against the dying of the light
  47. He likes Small Is Better, which isn't Java by ErikInterlude · · Score: 5, Interesting

    I think more people who are java programmers should be trying Python for smaller programs, cause I was able to pump small programs out much faster than with Java.

    I think this point is interesting. Paul Graham makes a big deal about why he doesn't think much of Java, and it all seems to go back to the big/small issue. For example, in his essay on how he put together the Yahoo stores using Lisp, he mentioned that interpreted languages (or at least languages that can be both interpreted and compiled like Lisp) are better because they let you do things incrementally, as opposed to languages such as C/Java/etc, which force you to do the whole project all at once(I'm generalizing his statements here, but that seemed to be the gist of it).

    My point is this: Graham seems to really like the "small is better" approach, for which interpreted languages really shine. For larger projects, Java/C++/etc. would (might?) be more appropriate, but for Graham's projects and ideas, not really relevant.

    Every once in a while, Graham comes out with something that seems to get Java users up in arms, but it's entirely possible he's operating from point-of-view that involves projects that Java wasn't really designed for to begin with.

    Just a curiousity I thought I'd note.

    --

    --Erik
    1. Re:He likes Small Is Better, which isn't Java by KC0A · · Score: 2, Insightful

      Good programmers with powerful languages can turn large projects into small projects. Average programmers tend to write about twice as much code as a good programmer would use for the same problem. Give that good programmer a good language, and you can reduce the line count in half again.
      Suddenly your half-million line program is only 125,000 lines, and can be done in half as much time by one-fourth as many people.

    2. Re:He likes Small Is Better, which isn't Java by Frater+219 · · Score: 3, Informative
      My point is this: Graham seems to really like the "small is better" approach, for which interpreted languages really shine.

      Actually, the language that Graham is most associated with is Common Lisp, which is neither a small nor an interpreted language. It is relatively large for a Lisp dialect (much larger than Scheme), and a compiler is part of the specification.

      (I'm not counting Arc, since it doesn't exist yet.)

    3. Re:He likes Small Is Better, which isn't Java by Baki · · Score: 2, Informative

      With IDE's like eclipse, that compile any file on the fly as you save it, there is no more lengthly build process and even with a fast compiled language such as Java you don't have to suffer.

      You save and run the program right away, or in the case of an automatically reloading servlet such as tomcat you don't even run the program: your changed class file is detected and tomcat reloads the class in the running program. IBM websphere takes that concept even further.

      It feels like smalltalk, where you are also changing the program aka image in place without restarting it.

    4. Re:He likes Small Is Better, which isn't Java by indigeek · · Score: 3, Funny

      You missed the fact that Richard Stallman has proven that a full operating system can be written in lisp. He even attained sainthood for it.
      Too bad he never managed to write a good editor for it.

  48. Re:nonsense... by js3 · · Score: 2, Insightful

    A person who is apathetic to programming will learn whatever pays the most. While a person who loves to program will study and learn different tools and explore them to advance themselfs

    that statement is bullshit in the purest sense. Could it be that nobody is learning python because they can already do whatever needs to be done in other languages? Programmers are king when it comes to inefficiency. Go to sourceforge and you will find 10-20 programs doing basically the same thing. Every year someone creates a new language, that does that same thing as the 50 other languages that already exist, and when they are asked why nobody uses it they give you that quote above. bullspit indeed.

    --
    did you forget to take your meds?
  49. This is related to the fewer CS majors story... by danielrm26 · · Score: 3, Insightful

    Quite simply, those who do things becasue they love them tend to do them better than those who do them because they have to. So yes, this would seem to imply that those who use Python (a language that's just now gaining ground) tend to be more skilled than those who use Java (a language that can make you money). ...not a rule, per say, but I can see the potential for truth in it.

    --
    dmiessler.com -- grep understanding knowledge
  50. Re:Source? by kjd · · Score: 4, Informative

    Google turned this up, which cites a source: http://www.mindview.net/WebLog/log-0037

  51. Consistency is another great thing about Ruby by jesterzog · · Score: 2, Informative

    That example seems a bit selective to me. Code blocks are nice given the rest of the way that Ruby is designed to make them useful and handy, but I don't think it's necessarily superior. Personally I'm a great fan of Ruby for it's consistency, which I suppose it inherited from Smalltalk. I really like being able to deal with anything in the same way, without having to worry that there might be exceptions.

    I've been using Python as my favourite scripting language for several years -- it's a neat language to code in. Recently though, I had a situation where I wanted to make adjustments to the String metaclass, and I hit a brick wall. Python's consistent in most places, and getting even moreso over time, but there are some bits of it that completely conflict with everything else. If you hit one of them it can be quite frustrating.

    Switching to try the same thing in Ruby, I found that the consistency between standard library classes and everything else made it so much easier. In my Python version, I had to design a wrapper around a string, which is very yucky because I really want all strings to act a certain way - not just those that I remember to put a wrapper around. With Ruby it was just a matter of re-declaring the String and adding the methods I wanted.

  52. Don't pick on Design Patterns by GoF! by lordpixel · · Score: 2, Informative

    I agree with most everything you say, but I don't think Design Patterns is a good example.

    It weighs in at 395 pages, which isn't the thinnest but way short of the 1000 page plus behemoths you're talking about.

    Most of that page count is actually showing you example implementations (in C++ and SmallTalk). Sure, you could leave those out, but examples are useful when your book is about abstract concepts.

    This book is worth its (light) weight in gold.

    --

    Lord Pixel - The cat who walks through walls
    A little bigger on the inside than out

    1. Re:Don't pick on Design Patterns by GoF! by Rob+Riggs · · Score: 2, Interesting
      I attended a talk on Design Patterns by John Vlissides at OOPSLA a few years back and many of the problems he presented in his examples just don't occur in Python (or are trivial to solve). His talk reminded me more why I don't like to program in C++ and Java. I couldn't fathom running into the issues he was using in his examples with a dynamic language like Python. I asked him about this after the talk, but it did not go very far due to his lack of experience with dynamic languages in general (surprising) and Python in particular. And I was new to patterns and was likely not communicating my questions as clearly as one could.

      I recently ran by a paper by Alex Martelli called Five Easy Pieces: Simple Python Non-Patterns" that goes into more detail on this topic. In it he says, "Python has a knack for making many issues simpler. This, in turn, enables use of simpler conceptual tools, such as an idiom in lieu of a Design Pattern."

      I'm sure the same likely holds true for Lisp.

      --
      the growth in cynicism and rebellion has not been without cause
  53. Obviously, he knows a LOT about Java ... by arhar · · Score: 4, Insightful

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

    I've never written a Java program, never more than glanced over reference books about it ...

    Do I need to add more?

  54. Eric Sink's reply by GeorgeMcBay · · Score: 2, Informative
    Eric Sink wrote a reply to the original Graham article that mentioned Python and Java that is worth reading....the gist being that for many companies, the best and brightest hackers might not be the best actual employees.

    From my own work experience, I think he is right (in some situations). There certainly are many great hackers I've worked with whose technical skills I respect but I would never want to work with again. Of course, I've also worked with a lot of great hackers who were also great employees, so it can go either way. But any hiring manager (or any employee for that matter) would be wise to remember that the person's technical skills are only part of a bigger picture.

  55. Maybe, but I'm not sure... by Paradox · · Score: 2, Informative

    Consider that Graham's premiere hack was Yahoo! Stores. It wasn't a huge project in LOC count (PG says this is because it was in Lisp). However, it was big enough that Yahoo! had trouble reimplementing it in more conventional languages (and in the end, actually wrote a simple lisp interpreter to handle part of it).

    Yahoo! Stores wasn't a "small" project by any sense of the word. Maybe the upper boundries of "medium."

    --
    Slashdot. It's Not For Common Sense
  56. Re:Apples and oranges by eli173 · · Score: 2, Informative
    We use a fair amount of reflection, too (which makes debugging all kinds of fun). I'm fairly ignorant of Python, so if it doesn't do a lot of that, it sounds pretty neat. My only complaint is I'd prefer a compiled language, because watching production crash because of a typo is not fun.

    One approach to "compile-time" problems with python is to treat pychecker as your compiler. Basically, it looks for all those typos that C etc catch due to requiring variable declarations, and a whole lot more. Unused local variables included.
    Python doesn't really have private members like C++ does, so a lack of accessor functions doesn't have the same meaning.

    (I can't address the reflection thing; never really learned Java. My thinking went from C to Python... from what I saw, C++ was an incremental improvement (long story there...), Java was another, but Python was a leap from C, much the same way C was a leap from ASM.)

    HTH,

    Eli
  57. Re:aiiii get them off my back!#@$#! by aled · · Score: 2, Insightful

    Seems offensive to me. What if the article would be the other way around, would you say the same?
    I don't know who the writer is but if his experience is that then he doesn't know that much programmers.

    --

    "I think this line is mostly filler"
  58. Bigotry by Anonymous Coward · · Score: 3, Interesting

    The reasons I moved to Java are the very same reasons that Paul Graham describes as reasons that people use HIS favorite languages. I had had an early foray in Smalltalk, was heavily influenced by it and embraced Java as a chance to get away awful C++ (which I had studied heavily and worked with)..

    I embraced Java because I could finally program the OO way in it. C++ was supposedly OO, but didn't work quite right, and Java was an ok (not perfect) mainstream Smalltalk based language. The original team was fairly strict in the sense that it would not allow brain damaged C++ programmers to ruin the language (there was definitely a "purist" language design philosophy involved). Of course, in recent years they seem to have dropped that (see Java 1.5 generics, etc..)

    Now Python comes along... and Ruby too... they are nice, because among other things they bring us the Smalltalk philosophy of simplicity with Java lacked for marketing and acceptability reasons.

    I say.. what about Smalltalk itself??

    The reason I still stick with Java is:
    - Huge huge number of libraries
    - Good acceptability
    - Easier to convince my boss
    - etc..

    Pragmatic reasons.. not purist ones.

    I think a lot of Java programmers are the same.. Python is nice.. hope it catches on, but look we have this very mature platform in the meantime.

    Now P. Graham arguing about Perl as a good design vs. Java is just laughable. Sure, Perl is fast, Perl has regular expressions. But Perl has NO orthogonality, Perl is a write only language... it is not a language for people who like to read code.

    To me it just seems like Paul Graham is used to using Lisp, to running his code on Unix. Paul Graham probably runs emacs and has the Unix culture in him. He shouldn't confuse his Unix culture preference for scripting and languages similar to scripting, his preference for dynamic typing, his preference for the command line, his preference of being with a rebel as a real reason to bash the mainstream. It's just an illusive preference of his own.

    It's laughable for a Perl or C++ programmer to diss a designed language and say theirs is superior.. the only reason we listen to Graham is because of his Lisp background.

  59. Re:Yea - Ah man! by bstarrfield · · Score: 3, Insightful

    Well, uh, generally I agree with that... but, earlier today there was a posting about why the number of female Comp Sci majors was dropping.

    Hope they don't read Slashdot...

    --
    /* Dang, I can't type that well. */
  60. Python will go the way of Perl by ajs · · Score: 4, Interesting

    First off, let me be clear: I like Python. I think the throw-back to the yesteryear of line-oriented programming with enforced indentation style is quaint, bordering on painful and that the ultra-dynamic typing without dynamic conversion is kind of a strange choice, but I like Python, and I intend to use it quite a bit.

    However, back in the "old days" (late 80s, early 90s), Perl too was a bastion of those who wanted to throw off the shackles of scripting (I hate when that word is mis-used to refer to interpreted languages). Perl was the way to start giving some real structure to all of those tasks like report printing and systems toolsmithing that had traditionally involved totally unmaintainable "scripts" which eventually had to be re-written in a low-level language.

    So what happened? Nothing really. Perl developed some nice features, but ultimately LOTS of bad programmers learned it and in a language that makes it easy for people to write programs, you quickly develop a robust collection of REALLY bad code (along with the really good). Just look at C for confirmation of that.

    Python is where Perl was in the early 90s now. Lots of folks who know bad code from good are using it, and it looks like the next great island to swim to. It's easy to look back at Perl and say "it was the dollar-signs that FORCED people to be bad coders," or to look at Java and say, "the low-level types are what SEDUCED people into writing crappy code."

    In reality it was the popularity and subsequent influx of bad programmers. Python is becoming popular and I guarantee that in about 5 years Python programmers will be listening to, "[Span, Ruby, something else] is so much better than Python... just look at how much cleaner the code is."

    I wonder if we'll ever figure out that joe blow who barely understands what programming is will always produce unmaintainable shlock, no matter what language he writes in and no matter what book on abstract modeling he's just read.