

The Python Paradox, by Paul Graham 726
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."
aiiii get them off my back!#@$#! (Score:2, Insightful)
was what PG was thinking when he wrote that article.
say "one" little thing about java and the "java duuudes" just go nuts..
he probably hates the language but obviously wrote that to stop the steady stream of hate mail from the rabid duuude-troops...
feel bad for him
Yea (Score:5, Insightful)
Re:Yea (Score:5, Insightful)
Re:Yea (Score:5, Insightful)
Apples and oranges (Score:1, Insightful)
Re:nonsense... (Score:4, Insightful)
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.
Re:nonsense... (Score:4, 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.
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.
Using that logic, REXX coders are God-like (Score:3, Insightful)
Re:The way source code looks (Score:2, Insightful)
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.
Re:Apples and oranges (Score:3, Insightful)
> 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 [ruby-lang.org] to Java.
Not true! (Score:4, Insightful)
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.
what is PG's fascination with Python? (Score:5, Insightful)
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...
Re:haha (repeated less times due to lameness filte (Score:2, Insightful)
Re:Python vs Java (Score:5, Insightful)
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!
Re:Python doesn't land you a better job (Score:3, Insightful)
Oh, bullshit.
Mr. Graham's next article should be... (Score:4, Insightful)
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.
Paradox? (Score:2, Insightful)
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.
Re:haha (repeated less times due to lameness filte (Score:2, Insightful)
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.
Re:Java programmer's viewpoint (Score:3, Insightful)
I agree. Paul is trying to justify an untenable position. My favorite quote:
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.
Re:Paradox? (Score:2, Insightful)
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.
Total nitpick (Score:5, Insightful)
Anyway, something like that. Here is the closest he comes to a paradox:
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.
Re:The way source code looks (Score:2, Insightful)
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:
Re:Implementation is important (Score:5, Insightful)
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.
Dumbest thing I've read in a while (Score:5, Insightful)
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.
Re:Apples and oranges (Score:3, Insightful)
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):
>>> a=my_int(2)
>>> a+1
2
>>> a+2
2
>>> a=my_int(1)
>>> a+1
2
>>> a+2
3
Re:Apples and oranges (Score:5, Insightful)
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.
Re:The way source code looks (Score:1, Insightful)
Well, by that standard, I guess you can't use *any* of Ruby. Most people, on Windows and Mac anyway, have a JVM. Who has a ruby interpreter? It doesn't even get installed automatically in any real Linux distry (ie, not counting "Rubyix" or other junk no one uses), like Perl and sometimes Python do.
So, if you shouldn't use 5.0 features in Java because no one has it installed, yopu shouldn't bother with Ruby at all.
Re:Python doesn't land you a better job (Score:2, Insightful)
Oh, bullshit.
It's about innovation, not language (Score:2, Insightful)
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.
Re:Paradox? (Score:4, Insightful)
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.
Horsefeathers! Horsefeathers I say! (Score:4, Insightful)
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".
Re:nonsense... (Score:3, Insightful)
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.
Re:Why I like Python (Score:5, Insightful)
It's a really nice idea, with great direct effects and horrible side-effects.
Re:cover all the bases! (Score:4, Insightful)
Very poor reasoning (Score:2, Insightful)
Are we talking about the concepts of the language, or the concepts of the application that the language is being used to express?
He probably doesn't mean the concepts of the language, because Java and Python have much in common. (And no, trivial syntactic differences don't count as conceptual differences.)
If he means the concepts of the application, then there goes his whole argument about Java forcing developers to build programs out of the wrong concepts.
Such nonsense. There are great, mediocre and horrible programmers in any language. The best programmers can create great software in any language.
This is related to the fewer CS majors story... (Score:4, Insightful)
Re:Why I like Python (Score:2, Insightful)
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
Re:I am positive... (Score:3, Insightful)
Python is for troglodytes who can't wrap their minds around Lisp.
Re:Not true! (Score:3, Insightful)
Obviously, he knows a LOT about Java ... (Score:4, Insightful)
I've never written a Java program, never more than glanced over reference books about it
Do I need to add more?
Re:what is PG's fascination with Python? (Score:1, Insightful)
Unfortunately, I think Guido is taking the (wrong) steps to make sure that Python never becomes Lisp...
Re:Why I like Python (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.
Re:Horsefeathers! Horsefeathers I say! (Score:3, Insightful)
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.
Re:He likes Small Is Better, which isn't Java (Score:2, Insightful)
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.
Re:Dumbest thing I've read in a while (Score:4, Insightful)
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.
Re:Why I like Python (Score:4, Insightful)
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.
Re:aiiii get them off my back!#@$#! (Score:3, Insightful)
I don't know who the writer is but if his experience is that then he doesn't know that much programmers.
Re:The way source code looks (Score:3, Insightful)
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.
Re:Java programmer's viewpoint (Score:3, Insightful)
I call bullshit on you.
I'm complaining about Graham and other language-bigots, and over the last 20 years I've coded in:
...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:
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.
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 [jsyncmanager.org] (Open Source Java at that).
Re:Yea - Ah man! (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...
Re:Yea (Score:1, Insightful)
As a journalist, I know how you feel. I hate it when a magazine says "and we want this article in English, please". I mean, I tell them, look, it's much easier to discuss this subject in Chinese, and it'll come in at half the length too - look at all that space you could save! Look, you'd free up two whole pages you could sell advertising on! You'd get a better article and make more profit too!
But they say no, we want it in English, none of our staff speak Chinese. Man, is that unreasonable or what?
Re:WHat turns me off Python (Score:1, Insightful)
That's OK. Most Python programmers would probably say that the main reason they use Python instead of Perl is because they find Perl's syntax ugly. I tried out Python for a little while and determined that Perl was easily more capable than Python, so I discarded Python. If you're being superficial, then so are the majority of Python programmers.
Re:Why I like Python (Score:1, Insightful)
Reasons:
1.) Pythonic code. This notion means Pythonic programmers strive to write code in one certain way that has been perceived as efficient in expressiveness. So code written by experienced Python programmers looks pretty much the same and is very easy to understand.
2.) White space as blocks. Many new comers hate this idea. But Python programmers think it is the best thing since sliced bread (once they learned to configure they editors not to confuse between tabs and spaces). This means Python code is always uniformly formatted.
3.) The community really debates a lot on making the language as easy to learn as possible as opposed to tossing everything but the kitchen sink approach that languages like Perl seem to take. Right now there is intense debate in the Python newsgroup on how best to introduce decorators without breaking the pythonic tradition.