Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

The Python Paradox, by Paul Graham

CmdrTaco posted about 10 years ago | from the something-to-read dept.

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

cancel ×


Sorry! There are no comments related to the filter you selected.

FP (0, Funny)

Anonymous Coward | about 10 years ago | (#9951659)

System.out.println("First Post");

Re:FP (2, Informative)

nyssa (250538) | about 10 years ago | (#9951712)

print "First Post" # is more appropriate

Re:FP (1)

Rob Riggs (6418) | about 10 years ago | (#9951832)

Yeah, except your program will run. The OP's won't.

Re:FP (-1, Offtopic)

Anonymous Coward | about 10 years ago | (#9951845)

(format t "First Post")

Why I like Python (2, Interesting)

brunson (91995) | about 10 years ago | (#9951875)

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. ;-)

Re:Why I like Python (0, Redundant)

cmowire (254489) | about 10 years ago | (#9951992)


But then you should try Ruby [] , which is even more awesome than Python in many respects. ;)

Juses Chrust (-1, Offtopic)

Anonymous Coward | about 10 years ago | (#9951660)


Python doesn't land you a better job (-1, Troll)

Anonymous Coward | about 10 years ago | (#9951667)

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

haha (repeated less times due to lameness filter) (0, Flamebait)

Uber Banker (655221) | about 10 years ago | (#9951829)

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

And boy am I glad of that! I've seen it suggested Java is a bit like Playskool(TM) programming, and I agree. Java? No thanks. My trial of Java made me feel a bit like a destitute banging my head against a wall for hours... except banging my head against a wall would have been more productive

Python... a decent procedural language. TCL/TK my choice for getting [the front end of] a job done. VB: No way, although it barely gets the job done it is better than Java. I am an real programmer, I want to get something done in the minimum amount of time to get the job done to a high standard... something like TCL/TK for my GUI controls etc and a proper language/backend (some custom C++, some other languages regarded as 'obscure' because intelligence, rather than script-kiddieness, is needed to use them) that gets the job done quickly, something I can program quickly and easily (rather than obstuficating myself into some bizarre bastardisation, like spending tens of hours doing manipulating some _basic_ n-dimensional arrays through a series of loops, error checks, non-transparent processes).

Java is nothing to look up to, but in the end the script-kiddie language, the language which makes us think like a computer and work to the lowest common denominator, appears in dominance.

Re:haha (repeated less times due to lameness filte (2, Insightful)

adawgnow (793565) | about 10 years ago | (#9951900)

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

Re:haha (repeated less times due to lameness filte (0)

Anonymous Coward | about 10 years ago | (#9951975)

Hey aspect oriented programming was formalized by Java people.

I thought it was formalized (at least in the 'widescale' that was the 1960s) by Smalltalk [] people?


Re:haha (repeated less times due to lameness filte (2, Insightful)

kndyer (521626) | about 10 years ago | (#9951999)

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.

Re:Python doesn't land you a better job (2, Insightful)

brunson (91995) | about 10 years ago | (#9951914)

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

Oh, bullshit.

Seek the Python (0, Flamebait)

NoData (9132) | about 10 years ago | (#9951668)

I know that those who seek my python are indeed, seeking better tools..not merely financial benefits. And they are not disappointed.

Oh yeah. Feelin' 15 today.

Re:Seek the Python (0)

Anonymous Coward | about 10 years ago | (#9951871)

She's [] seeking your Python!

nonsense... (0, Offtopic)

mantera (685223) | about 10 years ago | (#9951673)

Naiive logic; you're forgetting the fact that financial incentive is one of the strongest motivators.

Re:nonsense... (3, Funny)

NSash (711724) | about 10 years ago | (#9951720)

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

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

Re:nonsense... (1)

Ploum (632141) | about 10 years ago | (#9951743)

nonsense for Python... it's normal ;-)

Why do you think it's called "Python" ?

Re:nonsense... (3, Insightful)

Tlosk (761023) | about 10 years ago | (#9951763)

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.

Re:nonsense... (3, Insightful)

jellomizer (103300) | about 10 years ago | (#9951764)

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.

Google agrees. (1, Interesting)

Anonymous Coward | about 10 years ago | (#9951766)

Paul's page Used to say

"[2] When Google advertises Java programming jobs, they cleverly require Python experience."

Even though Paul deleted it, you can still see lots of revfference to it, thanks to Google []

Not true! (4, Insightful)

notany (528696) | about 10 years ago | (#9951859)

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.

Definite Nonsense (0, Troll)

Arbogast_II (583768) | about 10 years ago | (#9951864)

What the user experiences is what makes great software. PHP and ActionScript smoke Python or Perl for writing beautiful software that human beings will enjoy!

Re:Definite Nonsense (1)

brunson (91995) | about 10 years ago | (#9951980)

Oh, what crap. You can implement a user interface in any language you like.

PHP is a horrible language that was obviously kludged together as a bad Perl ripoff, but without learning all the lessons that the Perl developers had already learned.

PHP is *finally* getting decent object support and *finally* with release 5 starting to look like a real language.

Shame. (2, Funny)

Draconix (653959) | about 10 years ago | (#9951677)

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.

I am positive... (4, Funny)

That's Unpossible! (722232) | about 10 years ago | (#9951683)

...a civil discussion will ensue.

Re:I am positive... (0)

Anonymous Coward | about 10 years ago | (#9951796)


Re:I am positive... (0)

Anonymous Coward | about 10 years ago | (#9951890)

I have a Python between my legs! I don't drink Java because it is said that Java cause my Python to shrink. I'm a leet hacker!

aiiii get them off my back!#@$#! (1, Insightful)

joeldg (518249) | about 10 years ago | (#9951689)

"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 ;)

Re:aiiii get them off my back!#@$#! (1)

tcopeland (32225) | about 10 years ago | (#9951771)

> the steady stream of hate mail

Heh, yup, as characterized by this BileBlog [] entry.

Re:aiiii get them off my back!#@$#! (1)

AKAImBatman (238306) | about 10 years ago | (#9951962)

say "one" little thing about java and the "java duuudes" just go nuts..

To be perfectly honest, if he had stated that a higher percentage of Python programmers are good programmers, I would have left it alone. After all, everyone's entitled to their opinion. But his statement explicitly said that he's "never met any GOOD Java programmers", and implied that there were none. Personally, I find that a rather offensive statement. It's like saying that "Fords suck because all the good mechanics I know work on Chevy's". There are a lot better ways of arguing for something than to berate something else.

Yea (4, Insightful)

jellomizer (103300) | about 10 years ago | (#9951690)

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.

Re:Yea (4, Insightful)

lukewarmfusion (726141) | about 10 years ago | (#9951746)

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

Re:Yea (5, Insightful)

stratjakt (596332) | about 10 years ago | (#9951747)

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.

Re:Yea (5, Funny)

Anonymous Coward | about 10 years ago | (#9951839)

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

Re:Yea (2, Funny)

stratjakt (596332) | about 10 years ago | (#9951906)

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

Re:Yea (5, Funny)

JPelorat (5320) | about 10 years ago | (#9952028)

Nearly all female subroutines appear to be written in it.

Re:Yea (4, Funny)

Mateito (746185) | about 10 years ago | (#9951929)

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)

Re:Yea (1)

JediTrainer (314273) | about 10 years ago | (#9951789)

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.

I only need one [] screwdriver.

Re:Yea (1)

jellomizer (103300) | about 10 years ago | (#9951811)

Sure you can do it with one screwdriver but using a screwdriver to chizzle a bord in half takes a lot more time and effort then using a saw.

Re:Yea (3, Funny)

brunson (91995) | about 10 years ago | (#9952015)

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

Re:Yea (0)

Anonymous Coward | about 10 years ago | (#9951907)

I would agree =) A wealth of different languages makes for a better programmer in general.

I first started scripting with mIRC, BitchX and TCL for eggdrops when I was 13. Then I discovered perl and sh. When I was 15 I started to teach myself C.
Around 17 I took courses for C++. I know a few other languages aswell but I mainly use C/C++ because I like how powerful they are.

Learning (3, Interesting)

Klar (522420) | about 10 years ago | (#9951693)

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

Implementation is important (5, Interesting)

gtrubetskoy (734033) | about 10 years ago | (#9951708)

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.

Re:Implementation is important (0)

Anonymous Coward | about 10 years ago | (#9951965)

well, since Java is run in a VM, it has tools that do things for you. Like threading, synchroniation, etc. So ya, you just believe that it happens, because it really does just happen like magic. If you really care about how it happens, write your own VM.

Who's Paul Graham? (-1, Troll)

stratjakt (596332) | about 10 years ago | (#9951716)

And what's so compelling about his "Java programmers are dum Python programmers are 1337" thesis?

Sounds like flamebait to me.

Besides, everyone knows .NET programmers are smarter, stronger, better looking, and more well groomed than Python or Java programmers anyways. Its obvious, because they aren't looking for only financial benefits and better tools, but also for sex with members of the opposite sex. Therefore they bathe, use deoderant, and are more likely to go to the gym once in a while.

Re: Check out his other essays too (1)

Alwin Henseler (640539) | about 10 years ago | (#9951953)

I don't know exactly who this Paul Graham is, or what he does for a living, but I ran into some very interesting essays written by him, on several occasions. They're listed on his homepage under "Essays" [] (duhhh..) - check those out

He writes the kind of insightful programmer's stuff, a la Joel on Software [] .

Python made my collegues start writing scripts... (5, Interesting)

wallclimber21 (563789) | about 10 years ago | (#9951724)

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.

Re:Python made my collegues start writing scripts. (1)

farmer11 (573883) | about 10 years ago | (#9951913)

What's the deal with this 'more readable' stuff? Python look just as readable as any language to me. We'll less readable actually - 'cause I never used it ;)

That's all well and good... (4, Funny)

lobsterGun (415085) | about 10 years ago | (#9951726)

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

Re:That's all well and good... (1)

despik (691728) | about 10 years ago | (#9951866)

Have you actually read "On Lisp" or any of his Lisp articles?

Re:That's all well and good... (1)

nyssa (250538) | about 10 years ago | (#9951917)

I would suspect that he would, since he is himself a Lisp hacker. I think he would agree that Lisp is to Python as Python is to Java.

Re:That's all well and good... (1, Troll)

CPlusPlusOwnsYou (749256) | about 10 years ago | (#9951932)

I'll be willing to buy your theory that lisp hackers are better then python hackers... long as you admit that perl hackers are the best of all! =)

Re:That's all well and good... (1, Interesting)

Anonymous Coward | about 10 years ago | (#9951954)

Ehm... he is a LISP hacker! he is writing a new version of LISP called Arc, if I remember rightly.

Re:That's all well and good... (2, Informative)

Theatetus (521747) | about 10 years ago | (#9952025)

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.

Python vs Java (4, Interesting)

Dimwit (36756) | about 10 years ago | (#9951730)

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.

Re:Python vs Java (5, Insightful)

Svennig (665498) | about 10 years ago | (#9951909)

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!

Standard class for file permissions... (1)

SuperKendall (25149) | about 10 years ago | (#9951988)

Java has a standard class [] for seing file permissions. I'm not sure what that whole thing about writing a C routine was about... was this several years ago?

I'm not sure why you would complain about the XMl choices. You have a lot of options but since when is that bad? If you need to keep it simple there is JDOM. What are you doing for XML work in Python that's so much easier to use?

The other poster already made the point of how extensive the Java API's are - currently the most comprehensive standard library around for any language.

I'm sorry but.... (0)

Anonymous Coward | about 10 years ago | (#9951734)

"...simply financial benefits..."

Are there people who still haven't noticed that there is and has been a huge financial crisis in this business for a long time now?

It's not exactly like most developers line up their ferraries. Bills needs to be paid, financial stuff is NOT secondary in any way.

Yes (1)

Arbogast_II (583768) | about 10 years ago | (#9951934)

And Heck yes

Paul Graham is a language bigot (1)

doinky (633328) | about 10 years ago | (#9951735)

and wrong, to boot.

Consider what happened around the year '00, when the supply of COBOL programmers was much lower than the demand for COBOL programmers. Did the quality per hired programmer go up? Are you kidding me?

When your favorite tool is LISP, every problem looks like a set of parentheses.

Re:Paul Graham is a language bigot (2)

Tlosk (761023) | about 10 years ago | (#9951870)

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.

cover all the bases! (2, Interesting)

MarkEst1973 (769601) | about 10 years ago | (#9951737)

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.

A nice, short article! (0, Redundant)

lpangelrob2 (721920) | about 10 years ago | (#9951742)

A short, interesting read that makes sense and yet is something I'd never thought about. It'll give me extra incentive to pick up Python... but I sorta knew that I should work on being more than a Java / school-taught C++ person in the first place.

As has been implied, this should be broadened to all sorts of concepts... databases (PostGRE in addition to mySQL in addition to oracle), OSes (Windows nnnn in addition to UNIX in addition to Macs), etc. Heaven knows when I'll find time for being a better rounded programmer, but it should be a goal for all programming professionals. I'm sure this isn't the first time someone's given such advice.

The way source code looks (5, Interesting)

tcopeland (32225) | about 10 years ago | (#9951744)

Nicely put. Ruby:
collection.each {|x| do_something(x) }
or Java?
for (Iterator i = collection.iterator(); i.hasNext();) {
Given the choice, I'll go with Ruby [] ...

Re:The way source code looks (5, Informative)

r.jimenezz (737542) | about 10 years ago | (#9951800)


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

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

Re:The way source code looks (2, Informative)

tcopeland (32225) | about 10 years ago | (#9951941)

> 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 :-)

Re:The way source code looks (3, Funny)

geniusj (140174) | about 10 years ago | (#9951814)

I love you, Ruby!

Re:The way source code looks (2, Insightful)

stratjakt (596332) | about 10 years ago | (#9951846)

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

For each Object in Collection
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:The way source code looks (4, Funny)

Evangelion (2145) | about 10 years ago | (#9951930)

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

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

Re:The way source code looks (1)

Kentamanos (320208) | about 10 years ago | (#9951937)

Just for comparison sake (and I PERSONALLY think C# looks better):

foreach (object o in array)
// Code here...

Where the "object" type can be replaced with the type you're getting out and "array" is an instance of any sort of collection (which implements a certain inteface, which all of the builtin ones do).

Also, my officemate claims Java now (1.5) has a cleaner syntax for that, but it's been a while since I did Java. He sent me this snippet of code:

for (String s : c)
// Code here...

c implements a certain inteface as well.

Re:The way source code looks (1)

Kentamanos (320208) | about 10 years ago | (#9951982)

Was slow to post, r.jimenezz (737542) covered my point about Java 1.5.

Re:The way source code looks (1)

gptelemann (801687) | about 10 years ago | (#9951989)

The Java code makes more sense to me. Does this mean I'm a bad person? ;( Has anyone had the experience of working with C or Scheme and finding Python or Ruby code not so clear? They said C# was the next big thing...and Python...and Ruby. After a while, does anyone else have a hard time remembering all the syntax? Of course, who am I to talk. I have to program with the Java API at the ready.

Re:The way source code looks (1)

foo23 (722487) | about 10 years ago | (#9952000)

Mod parent up! Ruby is one of the most easily readable languages around. And is by the way (sorry for being slightly OT) nicely integrated into developing environments like XCode for Mac OS X, even for access to Cocoa through RubyCocoa. Just have a look at []

Python in the workplace (3, Informative)

jobeus (639434) | about 10 years ago | (#9951751)

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.

By that logic... (0)

Anonymous Coward | about 10 years ago | (#9951753)

If somebody learns BASIC or FORTRAN - since there's no longer any job market for them - they're better programmers as well.

Apples and oranges (1, Insightful)

mysterious_mark (577643) | about 10 years ago | (#9951758)

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

Re:Apples and oranges (2, Insightful)

tcopeland (32225) | about 10 years ago | (#9951857)

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

Apples and apples (4, Interesting)

Dan Ost (415913) | about 10 years ago | (#9951990)

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.

Article Text (-1, Offtopic)

Anonymous Coward | about 10 years ago | (#9951791)

August 2004

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

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

Which makes them exactly the kind of programmers companies should want to hire. 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 for programmers the paradox is even more pronounced: 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.

Only a few companies have been smart enough to realize this so far. But there is a kind of selection going on here too: they're exactly the companies programmers would most like to work for. Google, for example. When they advertise Java programming jobs, they also want Python experience.

A friend of mine who knows nearly all the widely used languages uses Python for most of his projects. 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. You push blobs of source code around the way a sculptor does blobs of clay. So a language that makes source code ugly is maddening to an exacting programmer, as clay full of lumps would be to a sculptor.

When I talk about ugly source code, people will of course think of Perl. But the superficial ugliness of Perl is not the sort I mean. Real ugliness is not harsh-looking syntax, but having to build programs out of the wrong concepts. Perl may look like a cartoon character swearing, but there are cases where it surpasses Python conceptually.

About 20 to 25 species of pythons exist, found in the tropical and subtropical regions of Africa, Asia, Australia, and the Pacific islands. The reticulated python of Southeast Asia is among the largest snakes, reaching a length of 10 m (33 ft). Other well-known pythons are the 7.5-m (25-ft) Indian python, a favorite of snake handlers; the 6.5-m (23-ft) African rock python, and the 1.5-m (5-ft) ball, or royal, python of equatorial Africa, which coils into a ball when molested.

Scientific classification: Pythons make up the family Pythonidae. The reticulated python is classified as Python reticulatus, the Indian python as Python molurus, the African rock python as Python sebae, and the ball python as Python regius.

The Dutch planted the first Arabica trees in Java early in coffee's history. It's name has become synonymous with coffee in the U.S., and is often the standard for which all other coffees are measured. Java's finest golden beans are roasted to yield a piquant aroma. Java displays an exquisite acid balance, a medium body with hints of chocolate-like undertones and a quicker finish than Sumatran. A 1 lb. heat sealed valve bag will ensure the freshest coffee. Your coffee will be fresh roasted the day it ships. Enjoy!

So far, anyway. Both languages are of course moving targets. But they share, along with Ruby (and Icon, and Joy, and J, and Lisp, and Smalltalk) the fact that they're created by, and used by, people who really care about programming. And those tend to be the ones who do it well.

Re:Article Text (0)

Anonymous Coward | about 10 years ago | (#9951858)

Did whoever moderated this "interesting" bother to read the last 4 paragraphs?

Using that logic, REXX coders are God-like (3, Insightful)

spookymonster (238226) | about 10 years ago | (#9951795)

We're both obscure AND poorly-paid!

Best tools... nonsense (1)

l4m3z0r (799504) | about 10 years ago | (#9951797)

Seeking the best tool in the land does you absolutely no good if nobody will pay you to use it.

I personally think that flame wars concerning which programming language is better are pretty useless. Honestly, I think of all the different languages as a big tool box or set of wrenchs. I'd be stupid to argue that a 5mm allen key is better than a 1/2 inch wrench. I'd also be pretty foolish to think that an adjustable wrench is a valid replacement for many wrenchs of different sizes.

My advice to programmers: Use the right tool for the job, don't force the job to comply with what you consider to be the best tool.

Re:Best tools... nonsense (1)

notany (528696) | about 10 years ago | (#9951966)

Seeking the best tool in the land does you absolutely no good if nobody will pay you to use it.
Uh. The Good Programmer uses the best tool even if nobody is paying him/her to use it. That's the point of being artist. The 143 000 euros/year is just side effect of being good artist. It was absolutely no good for Van Gogh to be an artist.

Python jobs - got resumes? (3, Informative)

otisg (92803) | about 10 years ago | (#9951802)

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: and (also .com).

hhhh (2)

farmer11 (573883) | about 10 years ago | (#9951804)

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

Re:hhhh (1)

CPlusPlusOwnsYou (749256) | about 10 years ago | (#9951963)

I would agree. The "prettiness" of code is a major thing for me so it is easy to understand and read.

Who gives a fuck (0)

Anonymous Coward | about 10 years ago | (#9951806)

whether or not Java programmers are better than Python programmers. Anyone who labels themselves a programmer specifically of one type of language is likely to suck all around.

Java programmer's viewpoint (4, Interesting)

MSBob (307239) | about 10 years ago | (#9951818)

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?

The Java Problem (2, Interesting)

Ridgelift (228977) | about 10 years ago | (#9951837)

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?

Re:The Java Problem (1)

tuffy (10202) | about 10 years ago | (#9951951)

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.

Last I checked (Java 1.2), Java as a language was mostly small and simple - not much more complicated than C. But the volume of Java APIs and their complexity required a decent reference of some sort. Python is a larger and more powerful language, and tends to use less complex APIs to achieve the same tasks.

i used to think paul graham was cool (0)

Anonymous Coward | about 10 years ago | (#9951877)

i had the full text of 'hackers and painters' printed and taped around my cube. but now... what's this? has he really deteriorated into "language X programmers are BETTER than language Y programmers, and if you think otherwise you're obviously inferior"? sure, just like locke was better than hobbes, sarte kicks nietzche's ass, kesey is better than kerouac, bach is obviously superior to rachmaninov, nobunaga pales in comparison to tokugawa, and isaac brock is a better lyricist than john linnell.

which is to say: comparisons like that are insidiously pointless, and what the fuck?

of course, i'm an experienced java programmer and but a novice python programmer, so i must be wrong about all that.

Bigot (0)

Anonymous Coward | about 10 years ago | (#9951880)

You want people who choose to program on their own, because they love doing it. That much is correct. If he'd stopped there, and said "You want to look for people who love what they do, and didn't just learn a language to get a job", he'd have been fine.

Of course, that wouldn't be Graham. Applying the "My language is better than yours" line is pure language bigotry. Why is someone who chooses to program in their own time using Python smarter than someone who chooses C, or Java?

Graham is little more than an elitist nutball who feels the need to prop himself up by explaining why everyone else is so much dumber than he is. It's rather ironic that all of his "This is the smart group" proclamations seem to apply to himself, no?

Confused (3, Funny)

Ranx (28829) | about 10 years ago | (#9951881)

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.

what is PG's fascination with Python? (5, Insightful)

Anonymous Coward | about 10 years ago | (#9951897)

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

Excellent article (2, Interesting)

Chuck Bucket (142633) | about 10 years ago | (#9951924)

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)

Python is great for guys like me.... (5, Interesting)

StressGuy (472374) | about 10 years ago | (#9951926)

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.

Mr. Graham's next article should be... (4, Insightful)

dot niet (629871) | about 10 years ago | (#9951956)

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.

Paradox? (2, Insightful)

Svennig (665498) | about 10 years ago | (#9951983)

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

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>