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."
"aiiii get them off my back!#@$#!"
;)
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
anime+manga together at last.. in real time.
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.
Don't really see how you can compare a scripting language with an OO development language. The choice between the two would seem to be driven by what it is your trying to do. Seems strange that Java is touted as a scripting language when this was never really intended to this. M
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.
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.
We're both obscure AND poorly-paid!
- Despite popular opinion, I am not perfect.
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!!!!
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.
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...
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.
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!
"Because it is not as strong a language or development platform as Java"
Oh, bullshit.
09F911029D74E35BD84156C5635688C0
Jesus loves you, I think you suck
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.
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.
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.
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.
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.
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:
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!
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
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 :-)
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.
" ahhh, Slashdot, the place where "Oh, bullshit" is an insightful comment."
Oh, bullshit.
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.
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!
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?
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
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.
OK, so let me see if I understand. Better programmers select Python over Java because Python is the better language. Java is "a language that makes source code ugly". But "real ugliness" is "having to build programs out of the wrong concepts".
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.
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
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. --
Python is for troglodytes who can't wrap their minds around Lisp.
an ill wind that blows no good
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?
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.
how to invest, a novice's guide
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.
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?
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.
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 (Open Source Java at that).
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. */
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.
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.
If that is your concern, Python is exactly the opposite. Python is definitely the easiest language to enter a running project.
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.