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."

13 of 726 comments (clear)

  1. 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 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!
  2. 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.

  3. 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.
  4. 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!!!!
  5. Re:Yea by Anonymous Coward · · Score: 5, Funny

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

  6. 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...

  7. 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!

  8. 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
  9. 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!
  10. 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
  11. 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