Slashdot Mirror


The Python Paradox, by Paul Graham

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

726 comments

  1. FP by Anonymous Coward · · Score: 0, Funny

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

    1. Re:FP by nyssa · · Score: 2, Informative
      print "First Post" # is more appropriate
    2. Re:FP by Rob+Riggs · · Score: 1

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

      --
      the growth in cynicism and rebellion has not been without cause
    3. Re:FP by Anonymous Coward · · Score: 0

      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.

      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.

    4. Re:FP by Anonymous Coward · · Score: 0

      print "First Post" # is more appropriate

      #how about
      null = file('/dev/null', 'w')
      null.write('First Post\n')
    5. Re:FP by Anonymous Coward · · Score: 0

      should be
      java.system.console.out.sucks()

  2. Seek the Python by NoData · · Score: 0, Flamebait


    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.

    1. Re:Seek the Python by Anonymous Coward · · Score: 0

      She's seeking your Python!

  3. nonsense... by mantera · · Score: 0, Offtopic



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

    1. Re:nonsense... by NSash · · Score: 3, Funny

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

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

    2. Re:nonsense... by Ploum · · Score: 1

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

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

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

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

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

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

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

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

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    5. Re:nonsense... by Anonymous Coward · · Score: 0

      When I think of great art, I think of Da Vinci and Michelangelo. These men and most great artists like them worked for money in a manner very similar to independent programming contractors like myself. Even though they/we might not like the medium/language that patrons/clients ask for, we need the money so we do the work.

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

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

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

      --
      did you forget to take your meds?
    7. Re:nonsense... by Anonymous Coward · · Score: 0

      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.

      All the passion in the world ain't going to help your teeth if you're brushing with a tire iron (using the wrong tool for the job) or if your idea of brushing is to wave the brush around the room (you're just an idiot).

      That's not 100% applicable to programming as, I'm assuming, that people really do enjoy programming and they look for ways to improve themselves. But I can't take Paul's idea with complete faith -- who is going to startup a company these days with the 10 remaining Smalltalk programmers in the world? Its an academic fantasy.

    8. Re:nonsense... by Taladar · · Score: 1

      If you do not unterstand that statement you are exactly the type of programmer the first sentence describes.

      There are people out there who, like me e.g., like to learn new programming languages just for fun, not because I can not do something I need to do in the programming languages I already know.

      If all people would think like you noone would have ever invented another programming language after Assembler, after all you can do anything in Assembler, or if you want portability, take C if you like. After that all programming languages just did things a better, easier, more intuitive way, they did not add anything you couldn't have done in C as well.

    9. Re:nonsense... by js3 · · Score: 1

      I understand that statement. Just because someone doesn't know python doesn't mean he is apathetic to programming.

      apathetic: having little or no interest or concern : INDIFFERENT

      Now let me ask you. What part of that statement didn't you understand?

      here is a hint. There is a difference between programming and programming languages. Having an interest in programming does not mean having an interest in every flavor of the month programming language that shows up on your door step.

      --
      did you forget to take your meds?
    10. Re:nonsense... by dnoyeb · · Score: 1

      Yea its bullshit.

      How many times have i been in 100 posts threads arguiging about the inner workings of the Java spec. People are certainly not patronizing the Java forums to make money. They are there because they enjoy it.

      I have yet to make a dime on Java, but I swear by it. Lots of fun projects I have created, and also helped others to create.

      Just look at sourceforge...

    11. Re:nonsense... by Just+Some+Guy · · Score: 1
      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.

      To hear a dentist tell it: the guy who does just enough to get by. Most toothpastes ("Most teethpaste"?) contain abrasives that will eventually destroy your enamel if you use too much force or brush too long.

      Yeah, I know what you were trying to say, but your example fails in non-obvious ways.

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:nonsense... by OldAndSlow · · Score: 1
      financial incentive is one of the strongest motivators

      For some folks, that's true. For others, it is not true. Consider poets. What they do has no economic value whatsoever. But they continue to write. Just like great hackers continue to write code.

      I actually feel sorry for folks who work only for money.

    13. Re:nonsense... by Anonymous Coward · · Score: 0


      The more money I don't have, the more artistic I get, that's for sure.

    14. Re:nonsense... by Anonymous Coward · · Score: 0

      ok, i dont know python OR much java so ill preface by saying that.

      but i think theres a nother point that is missing here... the article assumes those people who are interested enough in programming to learn python are better programmers... but that doesnt make them better employees and developers. some of the best and most technically proficient programmers i have met couldnt build a quality user application to save their lives. the best actual products often come from people with more rounded skills than those who spend their weekends coding cause they love it.

      the sad thing was that meny of those people couldnt figure out why their grand skills didnt get them ahead of some joe average programmer, but it was in fact that joe average programmer was able to deliver to users.

      (of course if you aure working on systems deep inside, away from the user then these type of guys can be great, but my experience is in user-facing apps.)

      just my 2 cents. a 'programmers programmer' might be the guy you ask hard questions of, and may add a lot of value to other developers in your organisation, but having an overly nerdy interest in the tech and heavy technical skill is not enough for many roles. you need to be able to speak the strange languages of the peon and average-user. unfortunately the technical skills of many people ive worked with were locked away behind a jargon-barrier and they fail to deliver.

    15. Re:nonsense... by junklight · · Score: 1

      Having read both of your statements I know which one of you I would hire (and yes that *is* part of what I do for a living)

    16. Re:nonsense... by Anonymous Coward · · Score: 0

      Working just for money is stupid.

      Why work just for money if that makes you miserable? Work for joy.

      work for your family to give them a good home, work for yourself so that your happy all day long. Work for the stuff you can do with your money. so on and so forth.

      Just working for money is retarded, what is little peices of paper going to do for you??

    17. Re:nonsense... by Anonymous Coward · · Score: 0

      What offends me is the intimation that Bjarne Stroustrup somehow cares less about programming than ... well, than Paul Graham. Utter bullshit. The guy's got a very narrow-minded view of programmers.

      I mean, I fulfill every requirement to be a "great hacker" according to his last article, except one - I like C++ and I like programming on the Windows kernel through the Win32 API. (Note I said kernel, not all that TAPI, MAPI, GDI, OLE crap.) Sure I program in Python sometimes, because Python is a great language with great library support. But it's also dog slow and I do 3D graphics for a living and a hobby, so it's simple inappropriate for me to spend much time learning and using Python. And that is the sign of a truly great mind (in my oh-so humble opinion!!!) Using the RIGHT tool for the job, not using the tool that gets you kudos with smug self-satisfied twats like Paul Graham.

    18. Re:nonsense... by Anonymous Coward · · Score: 0

      That's just crap. Robert Frost (a poet) was once the richest person on the planet. Robert Pinsky (the current US Poet Laureat) is in the top 100. Also, Larry Ikea became the richest man in the world due largely to his sold-out poetry readings at Rockefeller Center (although he also manufactures quality furniture). Finally, the most powerful man on the planet, US President George W. Bush, got elected because people liked his poetry (or, at least, people in the US Supreme Court did). So don't you go saying that poetry has no economic value.

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

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

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

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

    ...a civil discussion will ensue.

    --
    Ironically, the word ironically is often used incorrectly.
    1. Re:I am positive... by Anonymous Coward · · Score: 0

      Doody-head!

    2. Re:I am positive... by Anonymous Coward · · Score: 0

      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!

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

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

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

      --
      an ill wind that blows no good
    5. Re:I am positive... by BroncoInCalifornia · · Score: 1

      I program in Python -- on the job. I had to learn it to do my job. I guess this means I am not a good programmer. -- Well I knew that already. I am really a hardware engineer.

      --

      Religion is the main cause of atheism.

    6. Re:I am positive... by cbowland · · Score: 1

      In Soviet Russia, Lisp wraps your mind around you. Come to think of it, that's pretty much true everywhere else too.

      --

      Give a man a fish and he will eat for a day.
      Teach him to eat and he will fish forever.

    7. Re:I am positive... by dasmegabyte · · Score: 1

      Uh, you can have any job and use any language and still be a good coder. Or a bad one. It's all about the care you take with the program. I've written friggin' DOS batch files that were beautiful and flexible yet subtle. And I've written C# that was completely unorganized and only ran in a small range of circumstances.

      --
      Hey freaks: now you're ju
    8. Re:I am positive... by antirename · · Score: 1

      With the economy the way it is, job titles don't mean much. On paper, at the moment, I'm a "designer". No one knows what that means at my company. On the job function chart of the company, I'm a mechanical engineer. In reality, I write code (at least for the last year or so). That's not my only responsibility, at least until recently. I just have to get things done. Sometimes I get a plant worker to bring me some blanks so I can machine a prototype. No, that's not part of an engineer's job description, that's just how it works. I'm trying to schedule time so that I can get rated (don't know what that takes) so I can take a forklift and go get my own bundle of extrusions or whatever else need to be machined. There is no easy way, for me, to define what I'm supposed to do during a workday... and I think this will become more common.

    9. Re:I am positive... by Anonymous Coward · · Score: 0

      I've written friggin' DOS batch files that were beautiful and flexible yet subtle.

      That's just not possible.

    10. Re:I am positive... by Anonymous Coward · · Score: 0

      I use both LISP (BTW, it's "LISP" ,not "Lisp") and Python. LISP is more powerful, but Python is more versatile, due mostly to its extension libraries. I also find Python to be more readable when looking at it "cold".

    11. Re:I am positive... by amightywind · · Score: 0, Offtopic

      Loser

      --
      an ill wind that blows no good
    12. Re:I am positive... by CoughDropAddict · · Score: 1

      Lisp is for windbags who are more concerned with creating new words than actually saying anything.

      Python is for pragmatists who would rather use a reasonable set of predefined syntax and language constructs than recreate the Tower of Babel in the name of elegance.

    13. Re:I am positive... by YomikoReadman · · Score: 1
      I know that this was meant to be absolutely hilarious, and I found it to be exactly that.

      However, I found it so because as I was reading through the list, I noticed that many of them apply to me. I've been a C++ programmer, and I really do enjoy a good mystery. I've been a VB programmer, I do wear sensible shoes, and although I currently drive a Ford Ranger, I have owned a Toyota at one point in time. Currently I mainly work in SQL and PL/SQL alongside Oracle Forms/Reports, and it's true; my laugh is absolutely annoying and strange, but everyone says I'm an okay guy.

      --
      I have no regrets, this is the only path.
      My whole life has been "UNLIMITED BLADE WORKS"
  6. aiiii get them off my back!#@$#! by joeldg · · Score: 1, Insightful

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

    1. Re:aiiii get them off my back!#@$#! by tcopeland · · Score: 1

      > the steady stream of hate mail

      Heh, yup, as characterized by this BileBlog entry.

    2. Re:aiiii get them off my back!#@$#! by AKAImBatman · · Score: 1

      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.

    3. Re:aiiii get them off my back!#@$#! by Anonymous Coward · · Score: 0

      That holds true in the presidential election as well. There are millions of Repulblicans ready to just jump my ass for preferring Kerry cause "I am just voting against Bush." Welp I have several hundred reasons I am voting for Kerry and against Bush. The same Republicans who were so high on themselves in putting me down probably wouldn't even take the time to comprehend my opinion. Also, why should I try. They may be voting cause they can benefit financially, think that IF they ever get rich they will benefit from always being republican, or maybe their mommy and daddy always voted Republican and welp they aren't changing yet. Yes I can list a few hundred reasons not to vote for Bush. Kerry?
      Ya he may have a few problems (SO DOES BUSH).
      I am in no way interested in seeing Bush
      as president for another 4 years. And nope I've
      never seen F/9/11. Was at a friends house and
      he made me watch 10 minutes till I just left.
      Michael Moore=Rush Limbaugh. Moore could have
      presented the facts without twisting. (How can you respect someone who twists obvious facts to
      make them obvious?)

    4. Re:aiiii get them off my back!#@$#! by JamesOfTheDesert · · Score: 1
      But his statement explicitly said that he's "never met any GOOD Java programmers", and implied that there were none.

      Please. His statement implied no such thing; you *infered* that. He's simply reporting personal experience. Others will have different stories to tell.

      Don't be so sensitive. You prefer Java? Great. Go use it, and stop worrying what other people think.

      --

      Java is the blue pill
      Choose the red pill
    5. Re:aiiii get them off my back!#@$#! by aled · · Score: 2, Insightful

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

      --

      "I think this line is mostly filler"
    6. Re:aiiii get them off my back!#@$#! by SunBug · · Score: 1

      I think you missed the analogy. It's more like "Fords suck because all the good mechanics I know drive Chevy's." While the mechanic may need to work on a Ford (Java) now and then to pay his bills, or he has to drive a Ford as a work truck because they won't supply any other brand, he chooses to drive (and work on) a Chevy (Python).

    7. Re:aiiii get them off my back!#@$#! by antirename · · Score: 1

      Good mechanics drive whatever they get their hands on for cheap, and then run it into the ground. To a mechanic, it's JUST A CAR. It wasn't expensive. It does what you want to it to. And when it blows up to the point that it's not worth fixing you just have it crushed, take the $75 bucks and buy another. It's a CAR. Mechanics (in my experience, and yes I have been one) care very little about their personal rides unless it's the special classic in the garage that never gets driven anyway.

    8. Re:aiiii get them off my back!#@$#! by AKAImBatman · · Score: 1

      By your analogy, then good Java programmers would exist, which is not the statement made by the author.

    9. Re:aiiii get them off my back!#@$#! by Anonymous Coward · · Score: 0

      Ooo, way to turn this into a political discussion. Wait, I know, you're a nazi who likes Hitler. There, I've just dragged the conversation even further into the gutter. Thanks, Godwin!

      Vote Libertarian!

    10. Re:aiiii get them off my back!#@$#! by SunBug · · Score: 1

      Not really. He's talking from personal experience. In the previous article he notes that he knows one good programmer who chooses java.

      I think the point Graham is trying to make is that if a programmer knows only one language, and it's java, that person is probably not a good programmer. They're someone who was taught some idioms in college and can squeak out the par-level code required to bring in the paycheck.

      A good programmer seeks out a good language. And a surprisingly high number of good programmers choose python or lisp.

      If you want to fill a seat, choose java. There are a million and one code monkeys out there that will take the job. If you want to fill a position with good programmers, choose a language that good programmers use. Java is not that language.

    11. Re:aiiii get them off my back!#@$#! by Anonymous Coward · · Score: 0

      Just because you're offended doesn't mean that it's not true. I find it offensive that people like Bill Clinton and George Bush (either one) can become President of the U.S.A., but the fact is that they can. Similarly, the fact that Java Programmers aren't as good as Python programmers (or aren't good programmers, period) may be offensive to some, but, hey, that's just the way the world works.

    12. Re:aiiii get them off my back!#@$#! by JamesOfTheDesert · · Score: 1
      What if the article would be the other way around, would you say the same?

      Sure. Either way, it's him relating his experience, and giving an opinionated interpretation. He's not asserting that there are no good programmers who use Java. Just that he personally has yet to meet one. It's a data point.

      I don't know who the writer is but if his experience is that then he doesn't know that much programmers.

      Well, then, there you go. Why are you offended by his lack of experience? Introduce yourself to him. Then he'll be sure to know at least *one* good programmer who uses Java, no?

      But if you don't know who Paul Graham is, then I suspect your experience may be lacking, too.

      Graham may be wrong (well, in this case he's not), but he's no fool; if he says something that irks you, try to look past it for the deeper point.

      Then go pick on Lispers

      :)
      --

      Java is the blue pill
      Choose the red pill
  7. Yea by jellomizer · · Score: 4, Insightful

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

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

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

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

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

      --
      I don't need no instructions to know how to rock!!!!
    3. Re:Yea by JediTrainer · · Score: 1

      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.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
    4. Re:Yea by jellomizer · · Score: 1

      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.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    5. Re:Yea by Anonymous Coward · · Score: 5, Funny

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

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

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

      --
      I don't need no instructions to know how to rock!!!!
    7. Re:Yea by Anonymous Coward · · Score: 0

      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.

    8. Re:Yea by Mateito · · Score: 4, Funny

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

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

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

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

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

      Nearly all female subroutines appear to be written in it.

      --
      Hokey statistics and ancient misconceptions are no match for a good thought in your head, kid!
    11. Re:Yea by BarryNorton · · Score: 1

      I'd love to think you were talking about declarative code, higher-order functions, (real) parametric polymorphism, borders between pure functional and side-effecting code, lazy evaluation etc. etc., but I've the feeling you're talking about mere syntactic differences over the same old imperative language features and the associated libraries... Please tell me I'm wrong and rescue my faith!

    12. Re:Yea by digerata · · Score: 1
      Your first mistake is you are looking for work with employers/customers that want VB experience.

      :)

      And a more apt analogy would be someone telling you to use nails instead of screws. You are not selling them the tool you used to build the product (screwdriver in your example).

      --

      1;
    13. Re:Yea by butane_bob2003 · · Score: 1

      Right on, on. An extensive OO background in C++ and Java did not impress this company looking for a 'software architect' to do, ahem, PHP stuff. The company was offering a pretty good salary, was within biking distance, but err, what exactly do you want me to us PHP for? It's not as if they had a huge existing investment or anything. I was saying 'hello, who is telling you that you need to hire a PHP expert for this project? How did PHP get written in stone into the requirements?'. They had someone there who was a PHP guru who just wanted a buddy, not someone who was going to come in and throw a wrench in things. I guess sometimes the investment in skills that a company has can determine the language of preference. I figure this guy would be out of a job before long if someone with a strong software engineering background came along and wanted to start talking in patterns... Probably not a good match.

      --


      TallGreen CMS hosting
    14. Re:Yea by Inf0phreak · · Score: 2, Informative
      Then I think Unlambda or Whitespace would be better choices.

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

      --
      ________
      Entranced by anime since late summer 2001 and loving it ^_^
    15. Re:Yea by torpor · · Score: 1
      i was wondering that too, then i saw just today i say this brainfuck interpreter in python:
      import sys

      z,x,y= "}{|}A|k{|kA|}=BE1)|BF}))|$}:~pI~/;@Go{H%{&A?| if }:~pJ"\
      "IJ-1~#>=0:GoAG@HG;o{G;%-I&{?|m,kJ,j=C?;/@~o{~ D:G l[c]("\
      ")?","G$p:%~;%~;el!]':p%break~;![':p%#<len(j):~ %\ n\t\t"\
      "%if c=='%while o%\n%m[k]%+=1%\t%if not %c=j[o]%-=1%sy"\
      "s.std%[0]*64000,0,0,open(sys.argv[1]).read( )%if l.has"\
      "_key(c)%in.read(%out.write(chr(%=1%,o".split('%' ),"HG"\
      "&%/~!#?}{;$@ABCDEFIJ"

      for i in range(len(x)):z=z.replace(y[i],x[i])
      z=z.split('| ')
      for o in range(9):
      exec("def %c():\n\tglobal k,m,o,j\n\t%s\n"%(chr(97+o),z[o]))
      l={'>':c,'<':d ,'-': b,'+':a,',':e,'.':f,'[':g,']':h}
      i()
      and realized it'd probably make a pretty good crypt message, scraped on the limestone wall ...
      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    16. Re:Yea by anomalous+cohort · · Score: 1
      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.

      You would be amazed at the number of technical interviews I give where the applicant lists both VB and C++ yet cannot even tell me what a pure virtual member is.

    17. Re:Yea by Anonymous Coward · · Score: 0

      brunson writes: Perl is the vice grips of the programming world. ... when you use it there's a 90% chance you'll strip your nuts.

    18. Re:Yea by Dwonis · · Score: 1
      they think programmers could be replaced by robots (or monkeys).

      Take a look around you. A lot of programmers could be replaced by robots or monkeys.

    19. Re:Yea by Dwonis · · Score: 1
      That's the wrong screwdriver. What you meant was:

      I only need one screwdriver.

    20. Re:Yea by upsidedown_duck · · Score: 1

      Perl is the vice grips of the programming world.

      I've been learning Perl, recently, and it's not so bad, well, yes it is, but Regexps are really powerful, but this syntax is terrible, yet that operator is pretty cool, godddam parenthesis, oh boy I finally found the 'require' keyword, WTF is mod_perl not flushing the cache, ohh it's got hashes...*boom*

      --
      -- "Makes Little Debbie look like a pile of puke!" - Moe Szyslak
    21. Re:Yea by aled · · Score: 1

      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.

      Sometimes the customer has valid arguments to give technical directives, like they have all their apps in one language and want to keep it that way for them to uniform development, even if it's a pain for programmers that like other languages. After all the customer is the one who is paying for the job.

      --

      "I think this line is mostly filler"
    22. Re:Yea by Anonymous Coward · · Score: 0

      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.

      The idea that there is one tool that is "best" for every job is an attractive fallacy.

      For web apps, maybe Java, Perl, or PHP would be a better choice than C++ - but I seriously doubt it makes much difference which you choose.

      For games, C or C++ with time-critical routines in ASM is traditional, but frankly most of that sort of thing is in libraries already, and there's no reason why you shouldn't use Python + SDL if you're not planning to go head to head with Doom 3.

      For compiler tools, I know people who swear by ML or Haskell, but there are decent parser generators for every language under the sun. Maybe the compiler could be written 15% faster in a functional language, but does that 15% really matter in the long run? And if it does, is the "best language" Haskell, OCaml, SML, or something else with similar features?

      The simple fact of the matter is that for many programming tasks, it doesn't make any significant difference what language is chosen: the end result, for most purposes, will be delivered as fast as the client needs it, perform as well as the client requires, and be as robust as the application demands. And even where some languages are better than others, it is overwhelmingly likely that there will be a number of languages providing equally good results at the top of the list.

      What's a programmer to do? Stratjakt says he has to choose the best tool for the job, but there isn't one. Oops.

    23. Re:Yea by SageMusings · · Score: 1

      It's been my recent experience that every HR drone writing job descriptions of late is using the same damned play book. That is, they start off with whatever the department in need declared they required and finish with the obligatory "5-years experience in VB, VBA, and Java on Windows, UNIX, and Mac". I swear these jobs are everywhere. Oh, and don't forget the 8+ years .Net exp.

      --
      -- Posted from my parent's basement
    24. Re:Yea by Anonymous Coward · · Score: 1, Insightful

      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.

      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?

    25. Re:Yea by RdsArts · · Score: 1

      Customer: Brainfuck?!?! Why brainfuck?!?!
      Coder: Oh... Job security, mostly.

      I kid, I kid. Still, you have to respect anyone who codes in something that makes Perl look readable.

    26. Re:Yea by mibus · · Score: 1


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

      Nearly all female subroutines appear to be written in it.


      Well! Look where it got you!

      *ducks* ;-)

    27. Re:Yea by Nataku564 · · Score: 1

      The reason the syntax is terrible is because you are learning. TMTOWTDI

    28. Re:Yea by Piquan · · Score: 1

      Do not fall into the error of the artisan who boasts of twenty years experience in his craft while in fact he has had only one year of experience-- twenty times.
      -- Otake, Shibumi, Trevanian

    29. Re:Yea by nihilogos · · Score: 1

      Grrrr ... you just reminded me of php4's 'object oriented' facilities. What a complete dud they were.

      --
      :wq
    30. Re:Yea by Tablizer · · Score: 1

      Take a look around you. A lot of programmers could be replaced by robots or monkeys.

      So could a lot of other jobs. Airline pilots could be replace by auto-pilots, for example. There are even software apps that can diagnose diseases if given a patient's checkup results and description of symptoms. In trials, it has caught things that human doctors have missed.

      Automation and offshoring potentially affects just about every career out there. Marketing and other "persuasion" jobs so far are the most immune. Physical jobs are being replaced by robotics and purely technical or science jobs are being offshored to places where Phd's earn 80 cents an hour.

    31. Re:Yea by Progoth · · Score: 1

      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?


      mod the AC up

    32. Re:Yea by SigmaEpsilonChi · · Score: 1

      I don't recall seeing any of Dianora's contributions being written in brainfuck.

    33. Re:Yea by Anonymous Coward · · Score: 0

      "supposed"

      Dumb ass!

    34. Re:Yea by Anonymous Coward · · Score: 0

      Still, you have to respect anyone who codes in something that makes Perl look readable.

      Respect? I think the word you are looking for there is "fear". :)

    35. Re:Yea by klmth · · Score: 1

      Of course, that would be a oneliner in perl:

      $_.=qw(++ }while$ -- ++$ $$p=shift; --$ print$ ${)[$p%60%8].'$p+0;'&#173;while$p=ord getc;eval

      (Rick Klement's implementation)

    36. Re:Yea by afd8856 · · Score: 1

      Script-kiddie

      --
      I'll do the stupid thing first and then you shy people follow...
    37. Re:Yea by tehcyder · · Score: 1
      You're not a big fan of the "p" tag are you?

      Good points though.

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    38. Re:Yea by jnana · · Score: 1
      Actually, some routine programming work is already being handled by monkeys.

      Lisp still seems out of reach for the non-human primates though.

    39. Re:Yea by Anonymous Coward · · Score: 0

      Absolutely.

      Sadly, very few people, even among the best programmers, really keep their minds open beyond a certain point.

      Most people find a "favorite language" at some point of time. Paul Graham found one with Lisp; that mostly serves as a limitation to him. I agree with very many of the things he says, and his general ideas, but he misses the entire spectrum of advantages available due to modern static typing (ML-family languages, Haskell etc. - definitely not the popular alternatives) by expecting some of the questionable advantages of dynamic typing (e.g. the ad-hoc polymorphism wrt numeric types he makes use of in his succintness benchmark).

      Modern, static type systems are far more powerful than the ones he considers relevant to his language choices. Still, I'll admit that they are far from perfect, but they are becoming far more advanced, and the advantages provided are significant. Anyone who considers C++ or Java a representative of statically typed systems should update their knowledge.

  8. Learning by Klar · · Score: 3, Interesting
    And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.
    Well, not 100% true in all cases. For our major programming assignment in 2nd year, we were required to create a library in C, then impliment it and add some more functionality by using Python. This forced us to learn the language on our own. Which was a really good experience, and I really liked the language. I think more people who are java programmers should be trying Python for smaller programs, cause I was able to pump small programs out much faster than with Java..
    1. Re:Learning by jfb3 · · Score: 1

      But the point it still true. You didn't learn Python to get a job.

      Repeat after me:
      "An academic excercise is not a job."

      This will explain your future interviewers eye-rolling when they ask you about the experience you listed on your resume and you tell them about some class you took.

    2. Re:Learning by Anonymous Coward · · Score: 0

      "implement"

      Dumb ass!

    3. Re:Learning by james_in_denver · · Score: 1
      Try ruby, it has a very clean syntax, feels a lot like that other OOP (java?) without the bloat. Oh yeah, it is most widely accepted, and undergoing most of it's development in Japan.

      Feels like the same philosophy as the '80's Honda Civic. Clean design, very functional, not completely sexy, incredibly fuel efficient..... With plenty of pep, very reliable, and excellent handling.

  9. Implementation is important by gtrubetskoy · · Score: 5, Interesting

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

    1. Re:Implementation is important by Anonymous Coward · · Score: 0

      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.

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

      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.

      What is this nonsense? "Mysterious" claims about the JVM? Huh? First of all, you're comparing the source code of a language implementation to books. Second of all, The documentation for Java is way better than Python's, Perl's (yes, even considering perldoc), and Ruby's combined. If they gloss over a few things in Java books, it's most likely because they don't want to get into irrelevant, potentially confusing details or cover details that are a part of the implementation and not a part of the language specification.

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

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

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

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

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

      Now, you've got two related effects here.

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

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

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

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

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

      --
      Farewell! It's been a fine buncha years!
    5. Re:Implementation is important by Anonymous Coward · · Score: 0

      Absolutely 100% dead on.

      And what was with those Wrox books with all the ugly author photos on them? Yikes. Bright red, too. No wonder they went bankrupt.

    6. Re:Implementation is important by Anonymous Coward · · Score: 0

      Thanks for your advice, Zbigniew! :-)

    7. Re:Implementation is important by Anonymous Coward · · Score: 0

      I can think of one book that perfectly fits the template you are describing: Sam's Teach Yourself Java in 21 Days. I imagine most of the other Sam's Teach Yourself ... are the exact same way.

    8. Re:Implementation is important by bladesjester · · Score: 1

      Actually, the 24 hours one wasn't bad. I skipped through a lot of it, because it was old hat, but it covered the concepts fairly well. If you were used to programming in other languages, you could sit down and go through the book in probably a day and a half. After that, I stuck with O'Reilly's books and the net.

      Also, their sql in 10 minutes (by Ben Forta) isn't bad to use as a quick reference. I picked it up because I occasionally need to look something up and had the pleasure to meet the author in person at a conference a couple of years ago (He can pull better code off of the top of his head than a lot of people that I know, not to mention being a total nut and a load of fun to chat with).

      --
      Everything I need to know I learned by killing smart people and eating their brains.
    9. Re:Implementation is important by dnoyeb · · Score: 1

      Strange. You must have had preconceptions.

      c is the most heinous language to follow next to c++. Includes that you gotta track down with some kind of global directories search, not to meantion all the header madness, and the order of includes is important.

      You think its easy to follow that?

      And I have YET to come across a well documented c program, but thats not the languages fault, just my experience.

      While java is completely traceable. No pre-compiler or whatever, no define madness. Help files all over the place.

      I have never met a java program I could not trace. while the c programs require considerable more architecture knowledge.

      Maybe you just need to learn objected oriented programming more!?

      Note: by day I program embedded c programs, and by night I write java desktop applications for fun.

      There is a huge difference in understandability of writing a visual c++ program, vs. writing a Java program for Eclipse.

    10. Re:Implementation is important by Baki · · Score: 1

      You're 100% right. I fell into the trap of buying some of those fat books as well (on java, xml and oracle). Result: I never read them, I don't have the time to wade through all those lengthly examples and texts.

      I just read the specs from the authors (java -> sun, xml -> w3c, oracle -> oracle) and one or two tutorials also from the source. Any good product has good documentation. If it needs additional external documentation, it's not for me and I'm not interested (such as the typical MSFT product which does not have consise reference type documentation but only lengthy cut&paste examples, blah).

    11. Re:Implementation is important by cduffy · · Score: 1

      Wrong level.

      Sure, it's easy to tell how your Java code operates within the bounds of the JVM. However, it's basically impossible to know how your Java code maps to actual syscalls (and similar low-level operations), in no small part because this varies by JVM implementation. For most people, this is fine -- the JVM is a black box, put bytecode in, get correct output out.

      It's not fine for everyone, though. The fellow you're replying to is onesuch, and he has a valid point.

    12. Re:Implementation is important by Anonymous Coward · · Score: 0

      Oh my god! Those books were so fugly! I had the VB one, and that guy's ugly mug was on all three sides (big picture on front, medium on back, small on spine!). I ended up making a bookcover for it because I couldn't stand looking at it!

      Honestly, what a fucking weird marketing hook..."I know! We'll cover the books in pictures of the author!"

    13. Re:Implementation is important by Anonymous Coward · · Score: 0

      Sure, it's easy to tell how your Java code operates within the bounds of the JVM. However, it's basically impossible to know how your Java code maps to actual syscalls (and similar low-level operations), in no small part because this varies by JVM implementation. For most people, this is fine -- the JVM is a black box, put bytecode in, get correct output out.

      It's not fine for everyone, though. The fellow you're replying to is onesuch, and he has a valid point.


      This argument could be used to argue against any closed-source library implementation. It is not a valid point unless you wish to never use such libraries. That would mean that many commercial C and C++ compilers would be off limits. That's fine for zealots, but not OK for most developers that don't hold such religious beliefs.

    14. Re:Implementation is important by cduffy · · Score: 1

      You're attacking a strawman.

      Sometimes I want to know, as I'm writing my code, exactly what low-level operations will occur when that code gets run. My code, not the libraries I'm calling. Java doesn't even let me do that.

      It's a pretty rare "sometimes", though -- I don't do so much low-level work these days. As far as the why of the matter, I think someone wrote a paper about leaky abstractions that explains it pretty well.

    15. Re:Implementation is important by Q+Who · · Score: 1

      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.

      Not true for C++.

    16. Re:Implementation is important by Anonymous Coward · · Score: 0
      A corollary to this post:

      I read more of a good thin book than I read of a bad fat book.

    17. Re:Implementation is important by e-Motion · · Score: 1

      You're attacking a strawman.

      Sometimes I want to know, as I'm writing my code, exactly what low-level operations will occur when that code gets run. My code, not the libraries I'm calling. Java doesn't even let me do that.

      It's a pretty rare "sometimes", though -- I don't do so much low-level work these days. As far as the why of the matter, I think someone wrote a paper about leaky abstractions that explains it pretty well.


      It's not a straw man because the original post said it differently. The key word present now that was not originally present: sometimes. You even admit that it's very rare that one would want to know what low-level operations are involved when executing code, and that's very damaging to your original claim that certain people need to avoid back boxes altogether. In actuality, such people would skip Java, Python, and C and opt for assembly code.

      The thing is, one could take that "my code" comment to the extreme and say that it is no longer "my code" when it is run through a compiler that might optimize it, or, to take it even further, it is no longer "my code" when it is not written in zeros and ones. You're dealing with abstraction wherever you turn, so let's not pretend that intepreters are so different from compilers.

      That "leaky abstractions" paper you're referring to was very weak. It was written by Joel (of "Joel on software") and it was just about the worst material of his that I'd ever read. He even went so far as to claim that the performance of an abstraction can make it leaky, which rendered the definition of "leaky abstraction" pointless, because the implementation of an abstraction would have to run in no time at all to avoid being leaky. No implementations run in no time at all, so every abstraction is leaky, so the definition of "leaky" is worthless because it adds no new meaning to the term abstraction. It was a paper that appeals to programmers who simply don't like abstractions and want to stick to lower-level languages and in-house libraries.

    18. Re:Implementation is important by Trinition · · Score: 1

      every Java book I read always had mysterious claims about threads, JVM, synchronization, garbage collection...

      Does Pyhton support multiple threads? If so, then how does it handle thread-safety? If not, then you don't have to worry about it. BUt it you write simple Java programs witha single thread, you don't have to worry about threads eithers.

      Pyhon is interpreted, no? THe interpreter is much like the JVM from this altitude.

      Pyhton, I believe, also had garbage collection in the form of reference counting (which can leak) as well as direct 'del'etion.

      So, I fail to see your point?

    19. Re:Implementation is important by SigmaEpsilonChi · · Score: 1

      There's a mindset in corporate/professional comp sci I like to call "fat book syndrome".

      Please do not confuse O'Reilly books or Sun's Java books for Computer Science. At the best they're informative documentation of software systems, and at the worst they're little more than introductory tutorials for software systems.

    20. Re:Implementation is important by julesh · · Score: 1

      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

      Its actually very simple. Another poster has given you a reference to the VM spec, which explais everything in detail, but this is the summary:

      - Threads are objects that have a method called 'void run()'. When you call their 'start()' method, the run() method is executed in parallel.

      - All Java objects have a monitor and an event object associated with them (they should be allocated on demand, but the details of how this happens is up to the individual virtual machine). There are virtual machine instructions, 'monitorenter' and 'monitorexit' which lock and unlock the monitor. Only one thread is allowed to lock it at a time. When you have a lock on the monitor, you are allowed to call the methods 'wait()' (which releases the monitor, waits for the event object to be signalled and then locks the monitor again), 'notify()' (which signals the event object) and 'notifyAll()' (which signals the event object once for each thread that is currently blocked in 'wait()'). Using these capabilities, most advanced synchronisation systems can be built up.

      - Objects are allocated by a garbage collector. The precise mechanism it uses isn't defined, but most VMs use a traditional 'conservative' garbage collector, which scans each thread's registers, the stack and heap for anything that looks like a pointer and counts the references to each object. The collector may be invoked at virtually any time. In some implementations it may stop all threads while it is running -- this is why Java is unsuitable for real time applications. Objects have a method 'finalize()', which is executed in another thread after the collector has determined there are no more references to the object and before its memory is released.

    21. Re:Implementation is important by mwa · · Score: 1
      I've always wanted to be a successful author. Now I know how.

      Whitespace by Example: I'll include the Whitespace tutorial and 3500 pages of uncommented, non-annotated examples.

    22. Re:Implementation is important by cduffy · · Score: 1

      The thing is, one could take that "my code" comment to the extreme and say that it is no longer "my code" when it is run through a compiler that might optimize it, or, to take it even further, it is no longer "my code" when it is not written in zeros and ones. You're dealing with abstraction wherever you turn, so let's not pretend that intepreters are so different from compilers.

      I'll generally have a pretty good feel for what assembly a compiler will spit out when I'm writing C, and if I need to poke into what the Python interpreter is doing under-the-hood (and I *have* needed to do that before), I can. I'm not saying there's a difference between interpreted and compiled languages -- in either case it's sometimes important to have access to the underlying implementation, and in either case (of compiled C or interpreted Python), such access is available.

      Compare to Java.

    23. Re:Implementation is important by crazyphilman · · Score: 1

      The same thing happened to me. I ended up with like, a hundred pounds of books clogging my shelves, and the pressure to read them to feel like less of a phony was worse than not having them. So I chucked them, and focused on the online docs, and I've felt pretty good ever since.

      --
      Farewell! It's been a fine buncha years!
    24. Re:Implementation is important by crazyphilman · · Score: 1

      I don't know about that; there are a lot of good C++ sites. What does a book really buy you that a good web search won't? If you want a structured approach, you can always take a course, but I dunno; learning it yourself seems a lot faster.

      --
      Farewell! It's been a fine buncha years!
    25. Re:Implementation is important by crazyphilman · · Score: 1

      Ah, but I wasn't talking about academic or scientific comp sci. I was talking about the form comp sci takes when you enter the corporate world. REAL, ACTUAL comp sci isn't practiced very often (although almost no one will ever admit this).

      --
      Farewell! It's been a fine buncha years!
    26. Re:Implementation is important by crazyphilman · · Score: 1

      Yeah, some of those are pretty good. I like how they break things out into a lesson plan you can zip through in a week or so. And, O'Reilly does make some pretty good books, although *some* of their books have been gaining weight lately, and some of their Java stuff is getting so unwieldy it's turning into a bookSHELF rather than a book. But on the whole, I think they're pretty cool. I've got some of their stuff around here somewhere...

      --
      Farewell! It's been a fine buncha years!
    27. Re:Implementation is important by bladesjester · · Score: 1

      I know what you mean about the size of the java books from O'Reilley. I have a small stack (nutshell, j2me, foundation classes, and a couple of others), but the small stack covers most of my questions so I don't really need all of the rest of them. It really comes down to picking which subjects you need most of your information in and just sort of playing the rest by ear when you get to it.

      My big thing was trying to find what libraries had classes that I had a use for. As always, YMMV

      --
      Everything I need to know I learned by killing smart people and eating their brains.
    28. Re:Implementation is important by Q+Who · · Score: 1

      What does a book really buy you that a good web search won't?

      In-depth knowledge. There is simply no substitute for a good book.

    29. Re:Implementation is important by dnoyeb · · Score: 1

      there is a java compiler. you can analyze the java byte codes produced.

      with c you have to worry about the OS and the CPU, with java you have to worry about the JVM. same difference.

    30. Re:Implementation is important by cduffy · · Score: 1

      Sure, I can know what JVM bytecodes come out of the compiler -- but I don't (and can't, unless I control the JVM) know what OS-level syscalls and CPU-level instructions that collection of bytecode will evaluate to, and occasionally it matters. The JVM may hide the lower levels most of the time, but it certainly doesn't do so flawlessly.

      Practically speaking, I've never had CPU-related issues with Java -- but I *have* had OS-related problems leak through the JVM, and plenty of them. (I'm liable to get more of those than most, though -- I'm "dev support" at my company, a Java shop, meaning I field the toolage problems the developers and the sysadmins can't handle unassisted). Recently, for instance, I ended up debugging an issue revolving around heavily threaded Java code not playing nice on a system with a NPTL-enabled libc but a pre-NPTL kernel; I've also seen more than my share of JNI-related issues, and not a few based on filesystem semantics differences that the JVM's abstractions just couldn't hide.

      In short: Targeting the JVM just doesn't give the same low-level control (and, consequently, debugging capabilities) that targeting the OS and CPU does -- but then, you knew that already, right?

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

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

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


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

    1. Re:That's all well and good... by despik · · Score: 1

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

      --
      "I seem to have mastered a certain amount of control over physical reality."
    2. Re:That's all well and good... by nyssa · · Score: 1

      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.

    3. Re:That's all well and good... by CPlusPlusOwnsYou · · Score: 1, Troll

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

      --
      "Software is like sex: it's better when it's free."
    4. Re:That's all well and good... by Anonymous Coward · · Score: 1, Interesting

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

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

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

      --
      All's true that is mistrusted
    6. Re:That's all well and good... by wdavies · · Score: 1

      The one true language.

      But yes, he probably does think that too. Having written some of the greatest Lisp books of all time, and having built a major Shopping engine in Lisp (was that right).

    7. Re:That's all well and good... by Anonymous Coward · · Score: 0

      I'll admit perl hackers are better if you admit whitespace hackers are the best of all.

    8. Re:That's all well and good... by ArsonSmith · · Score: 1

      (was that right)

      It may be Correct, I don't think it was right.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    9. Re:That's all well and good... by Anonymous Coward · · Score: 0

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

      And that OCaml hackers are better than LISP hackers. :)

    10. Re:That's all well and good... by mr.+marbles · · Score: 1

      But the real question is who's better at pleasuring the ladies.

    11. Re:That's all well and good... by zsau · · Score: 1

      He doesn't just buy that theory. He sells that theory wholesale. In fact, he manufactures that theory from raw materials. I think he's just gone to advocating Python because most people don't like Lisp anymore.

      --
      Look out!
    12. Re:That's all well and good... by ajs · · Score: 1

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

      You're both WAY off base. I've known some AWFUL programmers who programmed in LISP and/or Python. I've also known some great programmers who prefered assembly, C, C++, Smalltalk, Perl, bourne shell, Python, Modula-2 (well, ok, no one good liked Modula-2) and a wide variety of other languages.

      I've also noticed that there are a lot of metrics by which to judge a good programmer, and sometimes they're mutually exclusive.

      In the end, I think it's the quality of your logic, your problem solving skills and your ability to understand the ENTIRE domain in which your code must exist and be maintained, not your choice of dialect that matters. Your statement is a bit like saying "French speakers are better at public speaking," which is pure nonsense.

    13. Re:That's all well and good... by bugbear · · Score: 1

      Ok, deal.

    14. Re:That's all well and good... by bugbear · · Score: 2, Interesting

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

    15. Re:That's all well and good... by SigmaEpsilonChi · · Score: 0, Flamebait

      Your prima facie retarded banter does only slightly less than Erik Naggum's vitriol to assure that lisp will remain a family of fringe languages, and long before your vaporware lisp dialect can even be as minute a footnote as your brief and unimpressive programming career, your inane Java-programmer trolling and Raymond-class attempts at equivocated self-promotion will eventually burn themselves out as no one can any longer take anything you say seriously. Do Python the favor of sparing it your brand of deluded advocacy.

      Maybe you can take up programming, since you do seem to be so interested in it.

    16. Re:That's all well and good... by Anonymous Coward · · Score: 0

      Your opinion is really valuable, pseudonymous internet luser.

    17. Re:That's all well and good... by SigmaEpsilonChi · · Score: 1

      That's the spirit.

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

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

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

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

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

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

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

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

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

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

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

    2. Re:Python vs Java by tb()ne · · Score: 1, Redundant
      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.

      Didn't they change it to "write-once-debug-everywhere"?

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

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

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

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

    4. Re:Python vs Java by Monkey-Man2000 · · Score: 1

      I think he's referring to the fact that you have to download the Java stuff separately and install the jars into your CLASSPATH. By default Python, has a lot of the features you're talking about with one install. This is very nice for some quick and dirty applications.

      Another thing that I like about Python is the sane way they treat environment variables and other platform-specific features. Rather than ignoring them like Java tries to.

      --
      This post was generated by a Cadre of Uber Monkeys for Monkey-Man2000 (603495).
    5. Re:Python vs Java by crazy.tyae · · Score: 1
      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.
      Actually, it's Tkinter, if only because it has been packaged with Python for a long time (since the beginning?). However, wxPython is very popular, and tends to look much better cross-platform as it uses native controls.
    6. Re:Python vs Java by chez69 · · Score: 2, Informative

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

      --
      PHP is the solution of choice for relaying mysql errors to web users.
    7. Re:Python vs Java by Anonymous Coward · · Score: 0

      Oh, and what's the difference between the 3587324 different XML parsing packages?

      Just pick one. Like JDOM.

      Sure, it's not "portable", but just do what Perl and Python have done

      You can do that yourself with a System.exec call. I'm sure there's some jars out there that do just that.

    8. Re:Python vs Java by pthisis · · Score: 1

      To me, thats a very strange statement. The standard library of Java is, IMHO, one of the strongest around.

      Ugh. Java as a language is rather nice (for a statically typed, non type-inferred language). The standard library is pretty unwieldy and inconsistent, though; I find myself fighting against the library more often than working with it.

      --
      rage, rage against the dying of the light
    9. Re:Python vs Java by Monkey-Man2000 · · Score: 1

      That's true, but the grandparent was talking about Jakarta Collections. To get comparable functionality (for some things) you have to install additional third-party software and keep track of the dependencies for each application.

      In particular, to do something relatively simple like easily getting command-line arguments you need to use a third-party. It comes down to your particular application. If I'm writing a quick-and-dirty app that requires command-line parameters and is platform independent, I'll use Python over Java anyday. I don't want to rewrite the command-line parsing code and I don't want to install another jar.

      The fact that Jakarta Commons Lang exists further emphasizes this point. Most of the functionality it adds to the Java base install is already in Python by default.

      --
      This post was generated by a Cadre of Uber Monkeys for Monkey-Man2000 (603495).
    10. Re:Python vs Java by killjoe · · Score: 1

      Is there a techinical reason for not having a J2EE like environment for python? It seems to me the only reason one does not exist is because the community does not feel like it needs one.

      J2EE is insanely complex but I don't think it needs to be that way. Maybe a decent OR layer, a logging API, scheduling, soap server and a servlet hoster is sufficient. All the parts exist they just need to be put together.

      Zope is almost there now.

      --
      evil is as evil does
    11. Re:Python vs Java by Anonymous Coward · · Score: 0

      We don't need to wait for an enterprise-level app framework for Python, we've got one: Mono (or .NET for you suit types). With Iron Python on Mono, you have a fully-featured industry standard framework library (this should please those buzzword bingo types), and an implementation of Python that's even faster than the standard CPython implementation. Even Microsoft has taken note, they've hired Jim Hugunin, the developer of IronPython, giving him a spot on the CLR team. This is going to be big (IMHO).

    12. Re:Python vs Java by abigor · · Score: 1

      Well, here at work we're using bits of Zope for various things, and from what I've seen it lacks the massive scalability of a J2EE server like (for example) WebSphere.

      Let me put it this way: could you run a site like Amazon or a business like HSBC on Zope?

    13. Re:Python vs Java by aled · · Score: 1

      to do something relatively simple like easily getting command-line arguments you need to use a third-party.

      That was also true in Python until some version. Java has the same kind of standard command line parsing that almost every other language. If you don't want to use a third party, optional library is up to you, but even the method of installing is simpler in Java than it was in Python. Java has an easy way to use third party libraries which is a Good Thing.

      --

      "I think this line is mostly filler"
    14. Re:Python vs Java by upsidedown_duck · · Score: 1

      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.

      However, it drives a person to spend so much time researching the given options that all mental energy is spent before programming can begin. The "Enterprise" world really needs a lot of consolodation and simplification, because XML, for example, is just completely out of control. So, people decided that DTDs are too weak...okay, so is it better now that there are more than one new incompatible approaches to schemas? How about the XML-is-the-new-EDI camp? Oh, they can't decide on a common set of schemas, either. What parser should a person use? To XSLT or to not XSLT.

      Why not just POST it between servers, because by the time an sound XML approach is devised the deadline has already passed.

      --
      -- "Makes Little Debbie look like a pile of puke!" - Moe Szyslak
    15. Re:Python vs Java by mad.frog · · Score: 3, Interesting
      I think the main reason I write so much stuff in Python and pretty much nothing in Java is simple: Open source and comprehensive standard library.

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

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

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

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

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

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

    16. Re:Python vs Java by Anonymous+Brave+Guy · · Score: 1
      The standard library of Java is, IMHO, one of the strongest around.

      The standard library of Java is, IMHO, one of the largest around. However, that is not at all the same thing.

      The collections libraries you mention, for example, have a reasonable underlying model (though nothing special that I've ever seen) but often rather inelegant syntax. Unfortunately, that's a bit of a trademark for Java, the platform where 17.6 layered objects are needed to input a string from STDIN. :-)

      As you say, there are myriad redundancies and confusing aspects to the Java libraries. They "evolved" too fast, without the kind of peer review and developer culture that supports other examples as diverse as Perl's CPAN and C++'s Boost. Consequently, for many things there aren't really any standards; you have a variety of mediocre options, where it would have been much better had there been just one choice that was well-designed from the start.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    17. Re:Python vs Java by RdsArts · · Score: 1

      Agreed, the PyQT binds are great. But they need documentation. I was playing with them using the C++ API docs (about all that exist that I could find, unless windriver has them hidden somewhere...) and figuring out what does and does not map from the class declarations alone was a big pain.

    18. Re:Python vs Java by Ogerman · · Score: 1

      Is there a technical reason for not having a J2EE like environment for python? It seems to me the only reason one does not exist is because the community does not feel like it needs one.

      First of all, note that "J2EE" is a random collection of standardized tools that Sun thought would be useful for Enterprise development. It's not an environment. Many tools can more or less stand alone -- you don't have to swallow the whole pill and run a big J2EE app server like JBoss. There's no technical reason why J2EE-like tools cannot be written for Python. In fact, several projects, such as PEAK, have already started to attempt this. The problem is that they are highly immature compared to the existing Open Source Java/J2EE tools (such as those of the Apache project). For better or worse, the community has rallied around Java as the language of choice for building quality enterprise development tools. As a professional developer, Python is really not an option at this point. I need software that works and is well supported by the community. Frankly, the Java software I've used is beautifully written by people who really do know what they're doing -- contrary to Mr. Graham's baseless opinion.

      J2EE is insanely complex but I don't think it needs to be that way. Maybe a decent OR layer, a logging API, scheduling, soap server and a servlet hoster is sufficient. All the parts exist they just need to be put together.

      J2EE taken as a whole is, in fact, insane -- which is why real Java programmers don't "use J2EE" but rather take the pieces that suit their needs. If you want to see examples of Java "put together" right, check out the Spring Framework and the Hibernate persistance layer. Then read the books by Rod Johnson.

      Zope is almost there now.

      Zope is improving, but I'm not sure I would label it "almost there" yet. It is still far too focused on web rather than enterprise development. If that's what you need, great. If not, use Java.

    19. Re:Python vs Java by msevior · · Score: 1

      pyGTK is a really nice GUI. Available on Unix (all sorts) and windows. It's totally free of course. Combined this with glade and libgalde and you can put nice apps together really fast.

    20. Re:Python vs Java by Trinition · · Score: 1

      Python...comprehensive standard library

      Sure, it doesn't have a standard GUI toolkit...

      The XML parsers... some are absed on the W3C stuff (i.e. supporting a standard) and others are avilable that overcome the shortcomings. That's called choice.

      Java comes with not one, but two standard GUI toolkits, and SWT is a viable alternative. I'm sure there are others. YEt Python doesn't come with any standard one and it has a comprehensive standard library? Does Pyhton trump the need for GUIs? Obviously not if there are GUI libraries available outside of the standard comprehensive library. Maybe I'm confused. Explain!

    21. Re:Python vs Java by Trinition · · Score: 1

      Please, please, DO NOT LOOK TO J2EE as an enterprise framework. At the high level, there's a lot of nice ideas. And some of the APIs are pretty good (i.e. servlets). But it is littered with over-designed, over0engineered, cumbersone to use APIs. Piecewise, you can make good with it, but as a whole, it is a bumbling bohemoth!

    22. Re:Python vs Java by Anonymous Coward · · Score: 0

      I strongly second the recommendation of Spring. Rod Johnson's latest book is my J2EE bible, and the Spring Framework is such a joy to use. Hibernate is also pretty impressive, but the documentation is nowhere near as good, and architecturally, it doesn't blow me away with it's elegance and flexibility like Spring does, but it sure beats rolling your own O-R layer.

    23. Re:Python vs Java by The+Wookie · · Score: 1
      Java's collections are just okay. Try the collections in Smalltalk, Ruby or Python if you want to see where Java's could be better. Here's a quick example of one of the cool things in Python:
      ages = [ 1, 54, 7, 9, 22, 34, 75, 81 ]
      kids = [ a for a in ages if a < 13 ]
      agesquared = [ a*a for a in ages ]


      Another one, that I have seen other people here griping about with Java. This is how you read all the lines of a file into an array in Python:

      lines = file("somefilename").readlines()
      Java's standard library does a lot, but sometimes you have to jump through a lot of hoops. I think Python needs some work on its database API, I think JDBC is still a little better.

      Although Paul sounds like he is being a bit elitist to me, I don't think he was trying to say that one programmer is better than another because they choose language X. It's that someone is more likely to be a good coder if they take the time to learn other languages for the sake of learning new ways to do things rather than just to make a quick buck.
    24. Re:Python vs Java by killjoe · · Score: 1

      I don't claim that zope is as scalable as websphere. I am simply saying that there is no technical reason for that. In other words the reasons have nothing to do with python it's just that the community doesn't seem to want it bad enough. No itch, therefore no scratch.

      --
      evil is as evil does
    25. Re:Python vs Java by FunkyMonkey · · Score: 1

      Although it's got a ways to go to catch up to Java, they are making fast progress over at Zope?

    26. Re:Python vs Java by Anonymous Coward · · Score: 0

      The enterprise bullshit is just that. It is for those cowards who need the supposed assurance enterprise tools/frameworks to solve "enterprise" solutions.

      Java scaling?

    27. Re:Python vs Java by Ambassador+Kosh · · Score: 1

      Actually yes you could. With a cluster of ZEOs using ZRS (ZEO Replication Service) and a bunch of Zope instances in front of ZEO and squid proxies in front of them with load balancing it should work fine. Zope scales very well and very easily. It is smaller sites that zope is overkill for not larger ones.

      --
      Computer modeling for biotech drug manufacturing is HARD! :)
    28. Re:Python vs Java by Ambassador+Kosh · · Score: 1

      The parent was confused. Tkinter comes with python and it is the default gui toolkit. There are many other choices for different needs though. pyKDE is very good if you want to integrate with kde and use stuff like KDE vfs layer which is very useful.

      --
      Computer modeling for biotech drug manufacturing is HARD! :)
    29. Re:Python vs Java by dragondm · · Score: 1

      As it happens, I work on a large enterprise app (of exactly the sort J2EE is usually used for) that is written in python. We basically had to create much of the infrastructure J2EE provides for java ourselves, but the productivity bost from using python has made it worthwhile. (the company this app is for changes VERY often, thus the code must too. We can do in an hour what would take a day of coding in Java, in many cases. )

      We're slowly opensourcing soem bits of the infrastructure we've created (our Python Servlet Engine http://nick.borko.org/pse is out so far )

      --
      -- -- The Dragon De Monsyne
    30. Re:Python vs Java by SigmaEpsilonChi · · Score: 1

      That is all one collection type with multiple construction syntax. You have a resizeable heterogeneous array literal, and two resizeable heterogeneous array comprehensions.

      Python has a rather small number of collections within the base install. Namely resizeable heterogeneous arrays (referred to as lists), associative arrays (dictionaries), heterogeneous immutable tuples, homogeneous resizeable arrays of a few builtin types via the array module, heterogeneous unordered sets via the sets module (and soon as a builtin in 2.4), and I think that is probably about it. There are no linked lists, doubly linked lists, directed acyclic graphs, general directed and undirected graphs, balanced binary trees, skip lists, splay trees, B-trees, bitvectors, or a dozen of other useful datastructures.

    31. Re:Python vs Java by dbIII · · Score: 1
      Python has a rather small number of collections
      It sound like you really know your stuff - good luck in your exams. Your views may well change once you hit a workplace, there are a wide variety of reasons for choosing a programming language, and good and bad programs can be written in any language.
    32. Re:Python vs Java by SigmaEpsilonChi · · Score: 1

      Do you frequently not bother to try to make sense?

  13. I'm sorry but.... by Anonymous Coward · · Score: 0

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

  14. Paul Graham is a language bigot by doinky · · Score: 1
    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.

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

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

    2. Re:Paul Graham is a language bigot by WWWWolf · · Score: 1
      When your favorite tool is LISP, every problem looks like a set of parentheses.

      But (by expanding the Greenspun Tenth Rule of Programming), when your favorite tool is Not Lisp, every problem looks like an expensive, clumsy reimplementation of half of the features of Common Lisp. =)

    3. Re:Paul Graham is a language bigot by Anonymous Coward · · Score: 0

      The people I know who use Python are better programmers than the ones I know who use Java. Therefore Python programmers are smarter. And since we know Python programmers are smarter, here's some rationalization why that's so.

      What kind of fucked up logic is that? Obviously this dude doesn't program in Python...

    4. Re:Paul Graham is a language bigot by Theatetus · · Score: 1

      OTOH, every complex project that doesn't use lisp is doomed to end up implementing it in the process.

      --
      All's true that is mistrusted
  15. cover all the bases! by MarkEst1973 · · Score: 2, Interesting
    and learn to use Jython!

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

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

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

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

    1. Re:cover all the bases! by furball · · Score: 1
      The downside of java -- in this circumstance --- was having to deal with classpath and compiling cycles and whatnot


      Consider getting better tools. Eclipse or even IBM's Visual Age Java back in '96 compiled in the background so you weren't even aware of the compile cycle. Eclipse is free.
    2. Re:cover all the bases! by MarkEst1973 · · Score: 1
      ... and what about when these programs have to be run from outside of the development environment?

      I use Eclipse, and I ran into all those issues when my little utility programs were ready to deploy.

    3. Re:cover all the bases! by Mr.+Competence · · Score: 1

      And Netbeans 4.0 uses ANT for it's project information; meaning that you can compile and deploy without your IDE and have it create nice JARs for you with all of the magic settings so that they are runnable from the command line.

      --
      Those who open their minds too far often let their brains fall out.
    4. Re:cover all the bases! by abigor · · Score: 3, Insightful

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

    5. Re:cover all the bases! by furball · · Score: 1

      ZeroG makes a great installer. It solves deployment problems.

  16. A nice, short article! by lpangelrob2 · · Score: 0, Redundant
    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.

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

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

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

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

      I love you, Ruby!

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

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

      For each Object in Collection
      Object.DoSomething
      Next Object

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

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

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

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

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

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

    5. Re:The way source code looks by Kentamanos · · Score: 1

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

      foreach (object o in array)
      {
      // Code here...
      doSomethingWith(o);
      }

      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.

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

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

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

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

    7. Re:The way source code looks by Kentamanos · · Score: 1

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

    8. Re:The way source code looks by gptelemann · · Score: 1

      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.

    9. Re:The way source code looks by foo23 · · Score: 1

      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 http://www.fobj.com/rubycocoa/doc/

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

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

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

      for x in collection: x.foo()
    11. Re:The way source code looks by Anonymous Coward · · Score: 0

      Okay, now try this kind of refactoring in Java:

      # make sure lock is released in case of error
      def with_lock
      l = get_lock
      begin
      yield
      ensure
      l.unlock
      end
      end

      # see how long the code took to run
      def time_it
      t0 = Time.now
      yield
      Time.now - t0
      end

      s = time_it {
      with_lock {
      3.times {
      foo(something)
      bar(baz(34))
      }
      }
      xyz()
      abc()
      }

      puts "operation took #{s} seconds"

    12. Re:The way source code looks by iabervon · · Score: 1
      With JDK 5, that's:
      collection.each {|x| do_something(x) }
      versus
      for (SomeType x : collection) {
      do_something(x);
      }
      The differences are that the looping construct in Java isn't a member of the collection, but a keyword; and that you declare the element type with the variable. I think these are both advantages for making errors easy to detect.

      The main downside to Java is that Sun is extremely slow in the core parts of the language (which is why it took so long to get the nice version of "for"), and pretty careless in the non-core library. On the other hand, they did manage to get a nice set of features together for version 5 that wouldn't have been so nice if they weren't all done together.
    13. Re:The way source code looks by rreyelts · · Score: 1

      Actually, you can use the JDK 1.5 compiler right now, and run the compiled bytecode on JDK 1.4. Check out Retroweaver. Sun compiler team approved.

    14. Re:The way source code looks by Anonymous Coward · · Score: 3, Informative

      Sure, with these toy examples...

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

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

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

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

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

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

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

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

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

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

    16. Re:The way source code looks by tcopeland · · Score: 1

      > you can use the JDK 1.5 compiler right now

      Cool! Of course, you'll still need to be careful not to use any new JDK 1.5 methods... but you're right, that does allow using generics and such-like now. Nifty!

    17. Re:The way source code looks by Anonymous Coward · · Score: 1, Insightful

      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.

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


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

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    19. Re:The way source code looks by tcopeland · · Score: 1
      > what the hell is the x for in the
      > ruby statement?

      It's the item in the collection that the iterator is operating on. For example:
      irb(main):001:0> x = ["Steve", "Tom"]
      => ["Steve", "Tom"]
      irb(main):002:0> x.each {|y| puts y }
      Steve
      Tom
      => ["Steve", "Tom"]
      Good times.

      > you can't beat Java WebStart

      I'm with you there. JWS rocks. I've used it at a job to download an EJB client... it even loaded up a DLL and opened up Excel. JNLP is good stuff.
    20. Re:The way source code looks by Fnord · · Score: 1

      Doesn't anyone like Perl anymore??

      foreach $thing (@list){ do_something($thing); }

    21. Re:The way source code looks by abigor · · Score: 1

      Actually, no.

    22. Re:The way source code looks by jeremyp · · Score: 1

      1.4?!

      You were lucky.

      The last big Java project I was involved in (about 6 months ago) hadn't progressed off 1.3.

      It was a bit of a shock really. "This feature can be implemented with this library. Damnit - I've got to roll my own"

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    23. Re:The way source code looks by Adartse.Liminality · · Score: 1

      mmmmh let me think it out...NO!!

      list.each{|thing| do_something(thing)}

      is far clearer to me...
      remember kids just say NO.

      --
      Smokin' & rubying away
    24. Re:The way source code looks by Anonymous Coward · · Score: 0

      for (Iterator i = collection.iterator() ; i.hasNext() ; do_something((SomeType)i.next()) ;

    25. Re:The way source code looks by tcopeland · · Score: 1

      > hadn't progressed off 1.3.

      Yup. I've left PMD with 1.3 compatibility for a while... it'd be nice to move to 1.4 and use String.replace() and such-like.

    26. Re:The way source code looks by Jon+Pryor · · Score: 1

      Something very similar to your example is possible with C# 2.0 anonymous delegates. Just substitute "yield" with a delegate invocation, and each Ruby anonymous block becomes an anonymous delegate.

      using System;

      class Test {
      delegate void Func ();

      // make sure the lock is released in case of error
      private static object lock_ = new object ();
      static void WithLock (Func f) {
      lock (lock_) {
      f ();
      }
      }

      // see how long the code took to run
      static TimeSpan TimeIt (Func f) {
      DateTime start = DateTime.Now;
      f ();
      return DateTime.Now - start;
      }

      // run the test
      public static void Main () {
      TimeSpan s = TimeIt (delegate {
      WithLock (delegate {
      for (int i = 0; i != 3; ++i) {
      Console.WriteLine ("foo!");
      Console.WriteLine ("bar!");
      }
      });
      Console.WriteLine ("xyz");
      Console.WriteLine ("abc");
      });
      Console.WriteLine ("Operation took {0} seconds", s);
      }
      }

    27. Re:The way source code looks by Anonymous Coward · · Score: 0

      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.

      iirc from back when I used qbasic, the next is basically the closing brace on the for. So it does advance the iterator, and that is handled by the loop itself.

    28. Re:The way source code looks by pthisis · · Score: 1

      Python would just use:

      for Object in Collection:
      Object.DoSomething()

      --
      rage, rage against the dying of the light
    29. Re:The way source code looks by tcopeland · · Score: 1

      Doesn't compile; you forgot a closing paren.

      But that aside, jamming the loop body into the optional ForUpdate expression is hardly a standard Java idiom. And the Ruby example I gave is certainly a standard Ruby way of doing things.

    30. Re:The way source code looks by hobo2k · · Score: 2

      Lets not forget VB! LOL

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

      W00t!

    31. Re:The way source code looks by Evangelion · · Score: 1

      Thank you for not pointing out my syntax error :)

      It really should have been:

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

      Yours could be also improved by writing like:

      foreach my $item (@collection) {
      $item->do_something();
      }


      Cheers.

    32. Re:The way source code looks by AnyNoMouse · · Score: 1
      Basic, in general, has always used a For -- Next syntax instead of a block syntax. In C, and most other languages, you use {} to define your block. Python, I believe you use white space. Anyway, Basic doesn't have such a syntax, so you have to close your blocks with a statment:

      for f = 1 to 10
      ...
      next f

      do (true)
      ...
      loop

      if (true)
      ...
      end if

      select case (x)
      case 1
      ...
      case 2
      ...
      case else
      ...
      end select

      etc.
      And now you know more about VB than you really wanted :-P

      --
      -Redundancy Man strikes again!
    33. Re:The way source code looks by hobo2k · · Score: 1

      Hmmmm, tough one. Maybe:

      Call foo()
      Call Sleep(1000)
      Call bar()
      Call Sleep(1000)
      Call baz()

      Har Har Har.

      (I know that wasn't your point. attributed programming allows us boring procedural programmers to start doing similar hacks, just 20 years late)

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

      Damn Perl trolls ;-)

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

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

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    35. Re:The way source code looks by jdhutchins · · Score: 1

      You didn't write the java as cleanly as you could have; using a while loop for iterators is cleaner. And what difference does it make? You can do in one line what I can do in three, but who cares? It's not like you're going to run out of memory for your code, and since they do the same thing, one won't run faster than the other. The java should be more like:

      Iterator i = collection.iterator();
      while(i.hasNext()){
      do_something( (SomeTime)i.next() );
      }

      It doesn't really make a difference, except to language zealots who think that being able to do everything in one line is a good thing.

    36. Re:The way source code looks by Waffle+Iron · · Score: 1

      Hmmm... that jogs my memory. I guess I already knew that, but I haven't used basic since the days of "1000 for i = 1 to 10"; seeing it with "for each" threw me off. IIRC, the "next" statement worked like a GOTO; there were no blocks, and you could mix loops together in arbitrary ways. I don't know if that's still true in VB.

    37. Re:The way source code looks by UserGoogol · · Score: 1

      Smells like Cobol.

      --
      "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
    38. Re:The way source code looks by cliveholloway · · Score: 1

      Well, assuming the values of @collection are objects /namespaces rather than scalars, yes (I don't know anything about Ruby to interpret original example). But even then, you can simplify to:

      $_->do_something() for @collection;

      Hardly a punctuation nightmare ;-)

      cLive ;-)

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

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

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

    40. Re:The way source code looks by Anonymous Coward · · Score: 0
      That's clear enough, and the people who don't like it wouldn't like this either, but they're wusses anyway:
      do_something($_) for @list;
    41. Re:The way source code looks by Cyberfox · · Score: 1
      Greetings,
      Hear hear! The next full release of my own open source app will warn users of 1.3.x that when 1.5 is released, 1.3.x will no longer be supported.

      It's REALLY hard to constrain myself to 1.3.x stuff, and I made a critical mistake very recently where I wrote:
      StringBuffer sb = new StringBuffer("This...");
      StringBuffer sb2 = new StringBuffer("is a test.");

      sb.append(sb2);
      Now, under 1.3.x the StringBuffer object doesn't have an 'append' function that takes (specifically) a StringBuffer. But it does take a String. The 1.4.x compiler generates
      sb2.add(sb)
      but the 1.3.x compiler generates
      sb2.add(sb.toString());
      So the code gives no errors when compiled with 1.3.x, but if you compile the same source with a 1.4.x compiler, it blows up when running on a 1.3.x JRE. (Heh, can I plug the idea of version-specific coding errors as a PMD ruleset?)

      I want to ditch my own regex library, string replace functions, etc., and be able to use 1.4. However, I have to slowly wean my users off 1.3.x, by warning them in advance that when 1.5 hits, I'm no longer supporting 1.3.

      I recommend doing the same.

      -- Morgan Schweers
    42. Re:The way source code looks by Anonymous Coward · · Score: 0

      collection.each {|x| do_something(x) }

      Huh? How is that readable? I don't know Ruby and have no idea what the |x| expression does.

    43. Re:The way source code looks by cliveholloway · · Score: 1
      I'll add a caveat though. You can't do this:
      blah($_); blahblah($_) for @x;
      as it's treated like this:
      blah($_);
      for @x {
      blahblah($_)
      };
      I found that I code how I speak. Which is fine until you need to expand the commands that are iterated through. Sometimes I'll do this:
      blah($_) and blahblah($_) for @x;
      but that will not do what you want if blah returns 0/undef/'', so you have to be careful.

      I used to always use if/else statements, but find myself getting lazy on that.

      # this
      if ($condition) {
      do_this()
      }
      else {
      do_that()
      }

      # becomes
      $condition ? do_this() : do_that();
      Again, that's quicker for statements, but messy for blocks.

      No idea where this rant's going... Perhaps you should log back into perlmonks (assuming you're that fnord) and see what's there ;-)

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    44. Re:The way source code looks by tcopeland · · Score: 1

      > The java should be more like:

      Nahhh.... declare the Iterator inside the for statement, it'll go out of scope and get GC'd sooner. Over several centuries, this can save up to a microsecond. :-)

    45. Re:The way source code looks by Fnord · · Score: 1

      Actually fnord was at perlmonks before I got there. I'm jsadusk.

      And you could do:
      eval{blah($_);blahblah($_)} for @x;

    46. Re:The way source code looks by RdsArts · · Score: 1

      just incase anyone's wondering and doesn't want to look it up:

      collection.each { |iteration| do_something(iteration) }

      this should make it clearer. The collection can be anything, say a array. It's been awhile since I touched Ruby in any real manner, but I believe for_each would also work as well. Basically, you're looping through the entire array/list/what have you. I believe you can even for it with a string, going through each character.

      Anyway, in the front of the block you have a |iteration|. This is defining what you want each iteration to define the variables of. Say you had a matrix of:

      [ [1, 2, 3],
      [4, 5, 6]]

      And you want to go through it all. You'd have a:
      matrix.each() { |x, y, z| do_stuff(x, y, z) }
      or
      matrix.each() { |iter_array| do_stuff(iter_array) }

      It really nice.

    47. Re:The way source code looks by Anonymous Coward · · Score: 0
      Ruby:
      collection.each {|x| do_something(x) }


      Man, how unnecessarily verbose. Haven't you Ruby fans heard of partial application?

      OCaml:
      collection#iter do_something
    48. Re:The way source code looks by cduffy · · Score: 1

      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.

      Yes, but Perl is worse than the others, simply because the language spec itself has so many rules and edge cases that nobody can ever remember them all. (Putting regular expressions into the syntax rather than the standard library is, IMHO, one of the major mistakes along these lines). Here's a test I use to determine whether a language syntax is too complex: Can an 85th-percentile coder write a parser for it from memory?

      TIMTOWTDI is a liability more than an asset: It means that no two skilled Perl coders will ever write the same solution, whereas two good Python coders (who are fully familiar with the standard library, available language features, etc) are much more likely to write similar code. As anyone who's actually worked on a large team (in which code is passed around between team members, inherited from those who leave or are fired[1], and otherwise has "ownership" as only a transient idea) can attest, consistancy is good. There are plenty of documents published about The Right Way to do a given thing in Java; likewise, Python has a consistent philosophy that it nudges everyone towards by design. Perl? A bloody mismash.

      [1] - Bad Java, like bad Python, is typically bad by design -- it's not just that the implementation itself has no-op error handling or uses a ridiculously inefficient algorithm, but the actual internal interfaces are broken and wrong. In a corporate setting where interfaces are reviewed by someone known to be competant before they're implemented, this kind of evil can be contained -- so the problems that remain are implementation level, where the very strictness you complain "punishes the programmer" lets components be swapped out with sanely-written replacements one by one. I suppose you also think that policies requiring everyone to implement unit tests punish the folks who get their code right the first time?

    49. Re:The way source code looks by Anonymous Coward · · Score: 0
      It's the item in the collection that the iterator is operating on. For example:
      irb(main):001:0> x = ["Steve", "Tom"]
      => ["Steve", "Tom"]
      irb(main):002:0> x.each {|y| puts y }
      Steve
      Tom
      => ["Steve", "Tom"]
      Good times.

      It never ceases to amaze me that people go all gooey over Ruby, when exactly the same features are available in languages like OCaml - which also provides a native compiler that rivals C++ for speed, and the safety of static typechecking.

      Your example:
      Objective Caml version 3.08.0

      # let x = ["Steve"; "Tom"];;
      val x : string list = ["Steve"; "Tom"]
      # List.iter print_endline x;;
      Steve
      Tom
      - : unit = ()
      Note the lack of a pointless and confusing y. That's this neat little feature called "partial application" at work. I don't know if it's been discovered by languages like Ruby yet, it was only invented about thirty years ago.
    50. Re:The way source code looks by Anonymous Coward · · Score: 0

      (for-each do-something x)

    51. Re:The way source code looks by tcopeland · · Score: 1

      > when 1.5 is released, 1.3.x
      > will no longer be supported

      That's a darn good idea.

      > version-specific coding errors
      > as a PMD ruleset?

      Make that two good ideas. It'd be tricky, because in the example you gave PMD would need to chase down types and such. But it'd be handy even if it would just catch a few cases...

      > regex library

      Ah, I'd forgotten about that... another 1.4 bonus. Very nice!

    52. Re:The way source code looks by shellbeach · · Score: 1

      I'll add a caveat though. You can't do this:
      blah($_); blahblah($_) for @x;


      Well ...

      map {blah($_); blahblah($_)} @x;

      seems simple enough to me ...

    53. Re:The way source code looks by Trinition · · Score: 1

      By applying the visitor pattern and functor pattern, in Java, you can write...

      collection.visit(doSomethingFunctor);

      That is, allow the operand to visit each item in the collection.

    54. Re:The way source code looks by tcopeland · · Score: 1

      > collection.visit(doSomethingFunctor);

      Sure! There's certainly a way to do it in Java. But it'll come with lots of casting and type-specific classes and all that. And it's a reasonable tradeoff that Gosling et al made - static typing is cool in many ways.

      But I think Ruby is more fun :-)

    55. Re:The way source code looks by Rick+and+Roll · · Score: 1
      No idea where this rant's going...

      ...

      blah($_); blahblah($_) for @x;

      You don't like that sort of thing, Ada doesn't allow that sort of thing.

      You don't want to use Ada, so that's where your rant ends.

    56. Re:The way source code looks by Anonymous Coward · · Score: 0
      I don't think this is a good for the reason you stated (relies on return value of first operation). I would only mention this as a bad way to do it:
      something() && something_else() for ( ... )
      I have used this:
      begin_launch(), sleep(1), collect_stats(), halt() for (1 .. 10);
      I'm pretty quick to use a full block though.
    57. Re:The way source code looks by Anonymous Coward · · Score: 0

      FWIW, python:

      for x in collection: do_something(x)

    58. Re:The way source code looks by Anonymous Coward · · Score: 0

      Yes, but Perl is worse than the others, simply because the language spec itself has so many rules and edge cases that nobody can ever remember them all.

      You don't have to remember them all. You just need to be able to remember how to write a reasonable subset that will get you where you need to go. And, you need to be able to remember enough to read others' code, and maybe not even with 100% fidelity as long as you get the gist of it. Perl is indeed a complex language, but it has one quality going for it that redeems that: where it gets complex, good sense and smart linguistics have been applied. Larry Wall, the creator of Perl, knows a fair bit about linguistics, which is to say he knows a fair bit about how the human brain actually processes language. Note that this is a fundamentally different thing than how recursive-descent parsers process language. So he makes good decisions, and often -- if you get yourself integrated into the Perl culture a bit -- you can go with your intuition and be right most of the time when you see something you haven't seen before (or have forgotten).

      Here's a test I use to determine whether a language syntax is too complex: Can an 85th-percentile coder write a parser for it from memory?

      That's a strange test. I don't think Java would even pass that test. I once took a compilers class and built a toy-Java compiler, so I know how to write a parser. And when I felt it would be good for my career to put a Java certification on my resume, I decided to study for it by reading the entire Java Language Specification word for word. Bottom line is, you may THINK as a regular user of it you know the language backwards and forwards, but you don't.

      Another example, this time with ANSI C: Did you know you can legally put a typedef lexically inside a function? Turns out, syntactically, any type of declarator (function, type, variable declaration) can go anywhere any other type of declarator can go. The only restriction is semantic, and although you didn't say anything about an 85th percentile coder writing a semantic analyzer for a language, still the semantics might make you believe that a typedef can't occur inside a function, although if you did, you'd be wrong.

      About the only language where I'd say that an 85th percentile user can write a parser for the language is Lisp. And that's because the average Lisp user is smarter and Lisp is simpler than the average syntax.

      TIMTOWTDI is a liability more than an asset: It means that no two skilled Perl coders will ever write the same solution

      "It's a liability that TIMTOWTDI in Perl, because any two skilled Perl programmers will always write different solutions." Hmm, notice that I just totally restructured your sentence, but it says the same thing? Yet, both of them are clear and easy to read. English is also a TIMTOWTDI language, yet nobody disputes that it's a good thing when it comes to English, because when we use English, we want to be expressive, not uniform. If you are a good writer, having options gives you the flexibility to choose what works for your given situation.

      Here's a snippet stolen from something Larry Wall had to say on the subject:

      But seriously, many computer scientists have fallen into the trap of trying to define languages like George Orwell's Newspeak, in which it is impossible to think bad thoughts. What they end up doing is killing the creativity of programming.

      A more insidious trap, promulgated in many places these days (including the most recent Discover magazine), is that a computer program should be beautiful. Let me tell you that when it comes to computer languages, this is totally bogus. If you want to do beautiful art, you don't go out and buy a beautiful canvas, and a beautiful brush, and a beautiful p

    59. Re:The way source code looks by cliveholloway · · Score: 1

      That's a map in void context. As soon as you add parentheses, you might as well rewrite it as a for loop.

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    60. Re:The way source code looks by otuz · · Score: 1

      Ruby comes standard with MacOS X

    61. Re:The way source code looks by Anonymous+Brave+Guy · · Score: 1
      English is also a TIMTOWTDI language, yet nobody disputes that it's a good thing when it comes to English

      On the other hand, scientists write in maths, and computer programmers write in languages with formal specifications. It sucks in maths when people use non-standard notations, or there simply isn't a standard notation, for the concepts you're working with. It makes it hard for others to follow your logic, and for you to follow theirs. The same is true of programming languages. Sometimes providing one good way to do something is better than a plethora of mediocre ones.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    62. Re:The way source code looks by Evangelion · · Score: 1




      Hardly a punctuation nightmare ;-)


      spoil sport.... :P

    63. Re:The way source code looks by Anonymous Coward · · Score: 0

      Assuming collection is a list:

      Scheme: (for-each do-something collection)

    64. Re:The way source code looks by ArsonSmith · · Score: 1

      yea, perl's abilility to reverce loops for readability I think is one thing that makes it more readable. I also think it is something that a lot of people look at and say "That's just confuseing."

      die unless imright();

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    65. Re:The way source code looks by cduffy · · Score: 1

      First, I'll grant you that the 85th-percentile parser rule needs to be relaxed -- but I'm still inclined to hold that there's a grain of truth in there, as the percentage of the language rules that (for instance) an 85th-percentile C programmer knows is assuredly greater than the percentage known by an 85th-percentile Perl coder. In any event, that's a side issue -- it's just my own, personal guideline -- while the core issue is what languages are suitable for Real World (which, to me, is commercial) software development.

      English is also a TIMTOWTDI language, yet nobody disputes that it's a good thing when it comes to English, because when we use English, we want to be expressive, not uniform. If you are a good writer, having options gives you the flexibility to choose what works for your given situation.

      Yes, but one rarely has a team of 30 (or even 5) people working on a novel, with the expectation that that novel will be handed off to a set of different authors with completely different backgrounds to write extended versions later. Commercial software development has different requirements than writing novels -- and some of these involve containing the damage that is done by people who aren't good writers, as I've gone into in my parent post.

      I need to go in to work now, so pardon if I'm leaving some threads unanswered.

    66. Re:The way source code looks by aleax · · Score: 1

      Yeah, sure, but Python's:

      for x in collection: do_something(x)

      is SO clearly better!

      --
      Alex
  18. Python in the workplace by jobeus · · Score: 3, Informative

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

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

  19. By that logic... by Anonymous Coward · · Score: 0

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

  20. Apples and oranges by mysterious_mark · · Score: 1, Insightful

    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

    1. Re:Apples and oranges by tcopeland · · Score: 2, Insightful

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

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

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

    2. Re:Apples and oranges by Prior+Restraint · · Score: 1

      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'm not sure what you meant by "dynamic this-and-thats," but on the other, here's my current situation at work:

      $ find . -name "*.java" -exec cat {} \; | wc -l
      462263
      $ find . -name "*.java" -exec grep forName {} \; | wc -l
      12

      If you could clarify what you meant by the "dynamic this-and-thats," I'll see what I can find out about it.

    3. Re:Apples and oranges by tcopeland · · Score: 1

      > I'm not sure what you meant by
      > "dynamic this-and-thats,"

      Sure. I mean things like Class.forName, like using the java.lang.reflect packages to see what public members a class has, like putting things in a collection and then casting them once they come out to defeat Java's static typing... stuff like that.

      > 462263

      That is a large number. Consider running PMD on it to see if it can dig up any unused code. One never knows....

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

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

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

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

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

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

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

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

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

    6. Re:Apples and oranges by Theril · · Score: 0, Flamebait

      Someone in Sun marketing should get a nice bonus for brainwashing the "Java is a compiled language" nonsense in 90% of people who know the difference.

      The holy Java bytecode is practically Java source with a bit terser syntax. All the high level constructs are there and, as 50% of above mentioned group knows, Java can be decompiled from bytecode to almost identical source it was compiled from (sans comments of course).

      What is Java beneath this hype? A scripting language without the benefits of being interpret and with the downsides of compiled languages. What a nice compromise.

      How could someone get this in to the "programming experts" heads'? Hire the same guy who is responsible for current reputation of Java?

    7. Re:Apples and oranges by Prior+Restraint · · Score: 1

      Okay, if casting counts, then I agree completely (and don't forget the instanceof operator). You can't do much of anything without casting all over the place.

      We use a fair amount of reflection, too (which makes debugging all kinds of fun). I'm fairly ignorant of Python, so if it doesn't do a lot of that, it sounds pretty neat. My only complaint is I'd prefer a compiled language, because watching production crash because of a typo is not fun.

      Consider running PMD on it to see if it can dig up any unused code. One never knows....

      You are my new friend, tcopeland. I know we have unused code (data objects whose private members have no setters?), and I've tried to clear-cut as much as possible, but it's a spare-time task, and thus far a manual one.

    8. Re:Apples and oranges by abigor · · Score: 1

      You have just badly embarrassed yourself.

      Python is an object-oriented development language that runs on a virtual machine, exactly like Java does. In fact, there's a variety of Python that runs of the JVM itself. Next time, learn first, post later.

    9. Re:Apples and oranges by tcopeland · · Score: 1
      > I'd prefer a compiled language, because
      > watching production crash because of a
      > typo is not fun.

      Touche! Those typos are always in odd places, and they don't show up until a critical moment. Argh...

      I usually write tons of unit tests to keep my Ruby code from failing like this, but I know I don't have 100% coverage... ah well.

      > You are my new friend, tcopeland

      Heh :-)

      > data objects whose private members
      > have no setters?

      At a previous job I was instructed to declare all variables at the top of the session bean methods, which were sometimes hundreds of lines long. Thus the first twenty lines or so of a method would often be local variables... many of which were unused. And many of them were declared like this:
      Vector v = new Vector(100); // dim to 100 for optimization!
      but "v" was never used. Argh!

      > it's a spare-time task, and thus
      > far a manual one

      Believe me, I feel your pain.
    10. Re:Apples and oranges by Adartse.Liminality · · Score: 1

      Boy those __whatever__ are as ugly as they come, not to mention self in __add__(self,b) why?

      just for comparison:

      class Fixnum
      def add(b)
      if self==2
      return self
      else
      return self+b
      end
      end
      end

      a=2 #=>2
      a.add(1) #=>2
      a.add(2) #=>2

      a=1 #=>1
      a.add(1) #=>2
      a.add(2) #=>3

      that's ruby...can't redef '+' because when
      'return self+b'
      it becomes messy: Stack level too deep...so I extended Fixnum

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

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

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

      HTH,

      Eli
    12. Re:Apples and oranges by eli173 · · Score: 1
      > I'd prefer a compiled language, because
      > watching production crash because of a
      > typo is not fun.

      Touche! Those typos are always in odd places, and they don't show up until a critical moment. Argh...

      Does Ruby not have an equivalent to Python's pychecker?

      Eli
    13. Re:Apples and oranges by pthisis · · Score: 1

      > I'd prefer a compiled language, because
      > watching production crash because of a
      > typo is not fun.

      Touche! Those typos are always in odd places, and they don't show up until a critical moment. Argh...


      A decent lint (pylint, pychecker) will catch those typos before you run the code.

      --
      rage, rage against the dying of the light
    14. Re:Apples and oranges by mad.frog · · Score: 1
      A decent lint (pylint, pychecker) will catch those typos before you run the code.

      Yeah, but I shouldn't have to use a separate tool. If it's a good idea to run such checks -- and, IMHO, it always is -- it should be built in to the standard language.

      (Keep in mind that I'm the kind of coder that cranks the C++ warning level as high as it will go, and then set the flag to treat all warnings as errors...)

    15. Re:Apples and oranges by tcopeland · · Score: 1

      > an equivalent to Python's pychecker?

      Hm, good question, I don't think so. Sounds like a good RubyForge project, though...

    16. Re:Apples and oranges by pthisis · · Score: 1

      Yeah, but I shouldn't have to use a separate tool. If it's a good idea to run such checks -- and, IMHO, it always is -- it should be built in to the standard language.


      Think about it this way: There is no compile phase for your program. If you want to run lint, you can. If not, you don't have to. But it's not an "additional step" relative to a statically typed language.

      And there are good reasons not to lint, many of them the same reasons that you would pick a dynamically typed language in the first place. I lint at the least before any code is checked in (our repository enforces that--you can't check in any code that isn't pylint-clean), but for rapid prototyping and testing it's not necessarily worth it.

      (Pylint can even enforce policy, like making sure naming conventions, formatting conventions, etc are followed)

      In a statically typed language I agree with keepin g the warning levels cranked up at all times. Since you can only test your code at points where static analysis is possible, you may as well not do it half-assed.

      --
      rage, rage against the dying of the light
    17. Re:Apples and oranges by Peaker · · Score: 1

      The whole point of your comment's parent was to redefine + itself, not extend the integer object. The difference is huge, and is that users of your object need not know that they are using the object.

      There's no real point to polymorphism if the users of your code disambiguate the call (choose the exact method to run) themselves.

      Also, the "self" in __add__ is exactly because the parent poster did prevent the recursion and to do that explicitly identified the parent class's method implementation which is not recursive. This means that both the superclass and the current instance have to be mentioned, instead of just the current instance (as in your lesser example of "self+.."). The mentioning of both is exactly what happens in the example: int.__add__(self, b)

      In essence you wrote a lot of code that does less and tried to show that it is superior because it was simpler in the one certain aspect in which it does less.

    18. Re:Apples and oranges by Adartse.Liminality · · Score: 1

      In the first place I intended to provide the same functionality not the same technique by redefining + itself which is far easy, but since you complain that about the 'user' specifically using a new method then:

      class Fixnum
      alias plus +
      def +(b)
      if self==2
      return self
      else
      return self.plus(b)
      end
      end
      end

      p a=2 #=>2
      p a+1 #=>2
      p a+2 #=>2

      p a=1 #=>1
      p a+1 #=>2
      p a+2 #=>3

      to avoid the recursive problem in the self+b I just setted an alias for + and used internally in the redefinition of 'self+b', so doesn't need to know what's going under the hood.

      btw I never intended to prove that my ruby was bigger than your python, it was just a silly comparison...don't read that much into this.

      --
      Smokin' & rubying away
    19. Re:Apples and oranges by tb()ne · · Score: 1

      Unless I'm misunderstanding your post, you're implying that python is a scripting language whereas java is an OO development language. Why consider python [just] a scripting language instead of an OO development language? Are there OO features of java that are missing in python?

      As of the last time I used java (a few years ago), python supported all the OO features that java did, plus others that it did not, such as true multiple inheritance, operator overloading, etc. The fact that python is convenient for scripting shouldn't discredit its utility for OO developement or relegate it to the status of a mere scripting language.

  21. Google agrees. by Anonymous Coward · · Score: 1, Interesting
    Paul's page http://www.paulgraham.com/gh.html 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

  22. Using that logic, REXX coders are God-like by spookymonster · · Score: 3, Insightful

    We're both obscure AND poorly-paid!

    --
    - Despite popular opinion, I am not perfect.
  23. Best tools... nonsense by l4m3z0r · · Score: 1
    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.

    1. Re:Best tools... nonsense by notany · · Score: 1
      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.
      --
      Dyslexics have more fnu.
    2. Re:Best tools... nonsense by l4m3z0r · · Score: 1

      True, but my point is that van gogh didnt say, this brush is the best above all others including the chisel. The point about paying I suppose is rather misleading, Van Gogh wouldn't pick the 'best tool' over something that did the job(in his case a painting) properly for example van gogh wouldnt pick up a special or particularly well made paint that was blue in order to paint grass when he has some lesser quality green paint sitting right there. I do disagree with your ascertion that to be a programmer is to be an artist. I am both an artist(film, photography, music) and a programmer I don't find the two to be at all alike. Art is appreciated for its esthetic value, and programs are entirely built for the functional. A program may in fact have esthetic value, but that couldn't be a sole reason for its existence.

    3. Re:Best tools... nonsense by phsdv · · Score: 1
      Your logic is faulty. For example you need to connect two pieces of wood together. You have a few options and they all get the job done but there is a difference in quality:

      1) use hammer and nail - jobs get done but you can not change things without any damage

      2) use a simple screw - you can undo it, as long as you do not damage the screws head, which is likely to happen.

      3) use a phillips screw - much higher change to get the screw out later without damaging anything!

      And thats the difference between for example C, Perl and Python...

  24. Python jobs - got resumes? by otisg · · Score: 3, Informative

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

    --
    Simpy
  25. hhhh by farmer11 · · Score: 2
    He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend far more time reading code than writing it
    1. Re:hhhh by CPlusPlusOwnsYou · · Score: 1

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

      --
      "Software is like sex: it's better when it's free."
  26. Who gives a fuck by Anonymous Coward · · Score: 0

    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.

  27. Java programmer's viewpoint by MSBob · · Score: 4, Interesting
    Well, all I can say to Paul is "you're wrong". Java developers tend to stick with Java not because they are in mad love with Java the language but because they recognize that Java is bigger than the sum of its parts.

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

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

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

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

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

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

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

      I didn't mean by this that Java programmers are dumb. I meant that Python programmers are smart. It's a lot of work to learn a new programming language.

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

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

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

      Yaz.

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


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

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

    3. Re:Java programmer's viewpoint by Gadzinka · · Score: 1

      Java is abused as a server-side language...

      I recently witnessed real life tests at huge GSM operator of some SMS-center related system. Single PC computer with app written in C++ is able to do 300 sms/sec. Java implemented sytem doing the same on exactly 10 outregously expensive computers was doing 100sms/sec. And I don't even have to explain how much such java system costs alone...

      So the c++ version developped inhouse still runs the show... ;)

      Too often I've seen overly complicated systems implemented in java, where c/c++ or python/ruby would have done the job faster, cheaper and less resource-hungry.

      Robert

      --
      Bastard Operator From 193.219.28.162
    4. Re:Java programmer's viewpoint by MSBob · · Score: 2, Interesting

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

      --
      Your pizza just the way you ought to have it.
    5. Re:Java programmer's viewpoint by RAMMS+EIN · · Score: 0, Redundant

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

      And you know, I very much have the impression that Java is a language of the month.

      First there were promises of write once, run anywhere. Alas, many problems have cropped up in this area, which I think is what killed Java applets and, largely, desktop apps.

      Then there is Java on the server. I never really understood the advantage of Java on the server is. It can't be platform independence - one server is only one platform. Is it performance? I doubt it. Is Java easier to code in then other languages? Perhaps for some, but for me, it's one of the saltier languages. Is it the library support? Well, I would expect such support to exist for other languages, too, and if it didn't, they would be no worse than Java was at the beginning.

      Another class of projects that uses Java is software that runs on mobile phones. However, at least on my phone, Java programs run so slow that I prefer to avoid them. Of course, portability is a consideration here, but then, the fact that there are often lists of supported devices and different versions for different phones is telling.

      So what are the great features of Java? Garbage collection? LISP has had that for ages. Same code works mostly everywhere? Goes for basically any interpreted language, and it works for C source, too. Object oriented? Again, LISP has had it for ages.

      Whether Python is better than Java is a completely seperate issue. I personally prefer it because of its syntax, but that is obviously not the only consideration.

      --
      Please correct me if I got my facts wrong.
    6. Re:Java programmer's viewpoint by MSBob · · Score: 1

      you just hired wrong people for the job. Just because Java offers JMS, EJB, Servlets, JSPs, Velocity, Rules engines, Jini, and hundreds of other technologies doesn't mean they all have to be used in every single project. Overdesign is a problem of bad developers and not the Java platform.

      --
      Your pizza just the way you ought to have it.
    7. Re:Java programmer's viewpoint by soundsop · · Score: 1

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

      Seems like a good motivation to avoid Java. Often, part of being smart is also being somewhat lazy. Based on your description, I would much rather learn Python than Java

      A good Java programmer has to be smart.

      We are comparing relative intelligence here. Obviously, anyone who can learn ANY modern programming language is reasonably smart. Nevertheless, there are large ranges of intelligence even within the group of people smart enough to learn to program.

      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.

      I think Paul Graham would disagree that this ratio is the same for all languages. His experience and understanding of programming languages is deep (which lends credence to his thoughts, but obviously doesn't mean he is automatically correct). Is your experience and understanding deep enough to really justify your claim? Can you give the approximate ratio for 3 different programming languages?

    8. Re:Java programmer's viewpoint by Ian+Bicking · · Score: 1, Flamebait
      You're exactly the enterprise developer he's talking about. Enterprise developers don't do it because they love enterprise programming. You have to be really sick to love enterprise programming.

      You use Java for many reasons, I would guess. In large part because you have a job using Java? You got a job using Java because Java has certain attributes and advantages, many of which are valid. But those advantages are soleless. They are advantages like "you can find Java developers". Or the conservative nature of your workplace. Risk avoidance. Even encapsulation -- a technique intended to save developers from themselves. People who consider that an advantage are exactly the people Graham is not talking about.

      A lot of people choose Java, but only a very small number for open source projects, especially if you discount projects that were initiated by corporations. If Java is so great, why don't they use it? Because, in that case, the developer has a choice. Because the choice is left to their personal aesthetic sense -- exactly the sense Paul Graham spends so much time talking about.

      Changing topics: aspects. Aspects are stupid. They make sense in a language like Java that has no metaprogramming capabilities. They are absurd in other languages like Python or Lisp. It's a whole technique built around a broken language. Metaprogramming facilities like metaclasses and macros do everything aspects do, only they do it reliably and transparently. Aspects are literally just a form of macro, and yet they manage to obfuscate even that simple idea, maybe to make it appear revolutionary.

    9. Re:Java programmer's viewpoint by 3am · · Score: 1

      God, now I remember why I don't post here any more.

      Do you even have a point? Or did you just want to point out the the original post didn't have an air-tight thesis?

      This was the best part:

      "I think Paul Graham would disagree that this ratio is the same for all languages. His experience and understanding of programming languages is deep (which lends credence to his thoughts, but obviously doesn't mean he is automatically correct). Is your experience and understanding deep enough to really justify your claim? Can you give the approximate ratio for 3 different programming languages?"

      Here you go: Java ratio is 80/20, Python 80/20, C++ 80/20, and VB Script is 80/20. How about that? I also assert that my experience justifies my claims. You can't refute it, if you had the answer, you wouldn't have asked the question in the first place.

      Did I even read the Graham article? No. He's a bad writer. Does that mean his point is incorrect? Probably, because a smart person would be capable of better writing.

      Ugh.

      --

      A: None. The Universe spins the bulb, and the Zen master merely stays out of the way.
    10. Re:Java programmer's viewpoint by Nemi · · Score: 1
      It has been posted before that sourceforge has java in the top 3 languages used, right after C and C++ I believe. Never used for open source projects?

      http://developers.slashdot.org/comments.pl?sid=113 316&threshold=1&commentsort=0&tid=108&tid=106&tid= 8&mode=thread&pid=9598928#9599173

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

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

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

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

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

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

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

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

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

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

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

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

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

      -- Former consultant

      --
      t
    13. Re:Java programmer's viewpoint by kraut · · Score: 1

      Paul certainly phrased it badly, but in essence his claim is that people who learn different programming languages because they enjoy programming are more likely to be good programmers than those who do it just for the money. And learning a less well-known language is indicative of that love.

      That seems to be a very sensible,

      --
      no taxation without representation!
    14. Re:Java programmer's viewpoint by Yaztromo · · Score: 1
      Paul certainly phrased it badly, but in essence his claim is that people who learn different programming languages because they enjoy programming are more likely to be good programmers than those who do it just for the money. And learning a less well-known language is indicative of that love.

      That I can readily agree with -- the more languages one learns the better IMO. But this is generally independent of which languages you select (so long as they aren't derivitives of one another), and has nothing to do with the superiourity of Python, or Python developers over Java developers.

      Yaz.

    15. Re:Java programmer's viewpoint by mschaef · · Score: 2, Informative

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

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

    16. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      PG is right you just can't bear the thought of if! First of all I discredit your post as you are clearly uninformed, "reading the tutorial" does not a programmer make.

      Second of all I am glad you use eclipse it is a very nice IDE however true hacker use powerful text editors (VIM or emacs) and the shell. I am not calling my self a "true hacker" in fact I consider myself a highly average programmer, but don't take my word for it, read chapter #3 of the "pragmatic programmer" which makes a good case for using a powerful text editor. Point being, arguing about dev tools is moot

      Python has been around for ~10 years, it's not the lang of the month, it just doesn't have a marketing machine like SUN behind it.

      What it comes down to is that good hackers are far more productive using python then java.

      BTW: I earn a living as a JAVA sw engineer, but I code nights + weekends using python.

    17. Re:Java programmer's viewpoint by pthisis · · Score: 1

      I know that Python has some very nice features (I read the tutorial) but it's hardly the sort of paradigm shift

      static typing vs. dynamic typing is one of the MOST fundamental differences between programming languages. It has a tremendous effect on how you approach software design and how you engineer large systems.

      Python is hardly the first dynamic language out there, but Paul knows that quite well.

      --
      rage, rage against the dying of the light
    18. Re:Java programmer's viewpoint by soundsop · · Score: 1

      God, now I remember why I don't post here any more.

      Now I remember why I don't respond to people who don't post anymore.

    19. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      That's the problem, though - your average Java programmer *WILL* overdesign. That's part of what Paul Graham is fighting - not just Java the language, but the mentality that is too often ingrained in your typical Java programmer.

    20. Re:Java programmer's viewpoint by MSBob · · Score: 1

      you've confused dynamic typing with weak typing. Python is weakly typed and java is strongly typed. Both languages have strong dynamic typing. Reflection in Java gives you virtually unlimited introspection capability and CGLib and Jassert make it a child's play to do self-modifying code in Java.

      --
      Your pizza just the way you ought to have it.
    21. Re:Java programmer's viewpoint by pthisis · · Score: 1
      aspects. Aspects are stupid. They make sense in a language like Java that has no metaprogramming capabilities. They are absurd in other languages like Python or Lisp.

      Aspects are not macros and macros cannot do everythin that aspects can.


      Macros are not metaprogramming and macros cannot do everything that metaprogramming can. Go read up on metaprogramming.

      (Python doesn't even _have_ macros, but it certainly has metaprogramming)
      --
      rage, rage against the dying of the light
    22. Re:Java programmer's viewpoint by chromatic · · Score: 1
      java is strongly typed

      Until you want to put an object in a collection, that is -- even in Java 1.5.

    23. Re:Java programmer's viewpoint by zipwow · · Score: 1

      "And you know, I very much have the impression that Java is a language of the month."

      Which month would that be, exactly? February 1999, perhaps?

      Java's clearly a front runner, if not leader, in enterprise server-side applications. Even you admit its influence. Now the question is: why?

      First, wrote-once run-anywhere is very, very true in my experience. I'm curious what you're talking about when you say, "many problems have cropped up in this area". I develop in windows and deploy to unix-based (HPUX) servers, and haven't had any issues in three years. The one issue (the only one I've ever seen) was a threading issue caused by a poor decision on my part (busy waiting with no yield call). What gives you the impression that there are issues? When I was doing client-side development, many of the perceived GUI issues were the result of developers making direct calls from java to the operating system. It's obvious when you're doing this, and it should be obvious that it harms portability.

      Write-once run-anywhere is important even for server-side development because the criteria for choosing a development platform are different than those for choosing a server platform. In my corporate environment, Windows is the dev platform. I wish it weren't so, but because of other tools for scheduling, email, and application maintenence, it is. That has not been a barrier to our using unix servers, however, and that's a big deal.

      You dismiss the idea of server migration, but that too is a big deal. Even if you've decided to go with unix, are you sure you've picked the flavor that is best with you? We've got HP 3000's still where I work, and there are some interoperability tools available for HP-UX that are important to us. Or they were originally. Once we get all the HP3000 code migrated, I'm sure we'd like to ditch the licensing fees and switch to Linux. Is this a problem for the code that I write? Not at all.

      I think you need to present some facts to make your case that C-source is as portable as Java. Most of the C developers that I talk to find that idea pretty laughable. If the write-once-run-anywhere problems you alluded to earlier were primarily GUI-related, please give examples of write-once-run-anywhere fully graphical OS-launched C code. I'm pretty sure that's a rhetorical question.

      You seem to ask why LISP isn't used for server-side development. I think that answer is partially the syntax, and largely library support. Java's standard libraries are widely regarded as a step above everything else that's available, both for networking and for basic structures (Collections, etc). You can argue that this sort of stuff is available for LISP, but from the comments I read, it isn't as standardized and approachable as the Java APIs.

      Java's combination of garbage-collection, solid and complete libraries, portability, and object-oriented features is clearly powerful. It allows people to ignore these issues, and focus on the more difficult (and more important) business-related issues.

      You mention that Java applications on your phone are slow. Perhaps.

      Would I recommend Java for a commandline-interface application? Absolutely not. Would I develop my company's new accounting application to be distributed to 200 servers worldwide in LISP? Again, I think I'd say absolutely not.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    24. Re:Java programmer's viewpoint by Yaztromo · · Score: 1
      A lot of people choose Java, but only a very small number for open source projects, especially if you discount projects that were initiated by corporations. If Java is so great, why don't they use it?

      Because Java has quite unfairly been given a bad rap by people who don't understand it, coupled with the fact that most operating systems don't make it easy to run Java applications (until fairly recently).

      And I speak as someone who administers an Open Source Java Project that wasn't initiated by a corporation.

      Outside the Unix world you don't see a whole lot of Open Source Python projects either.

      Yaz.

    25. Re:Java programmer's viewpoint by Paradox · · Score: 1
      That I can readily agree with -- the more languages one learns the better IMO. But this is generally independent of which languages you select (so long as they aren't derivitives of one another), and has nothing to do with the superiourity of Python, or Python developers over Java developers.

      Yeah, but that statement collapses back to "learn languages X and (P or Q or R) and (A or B or C)" It really doesn't mean much. Paul and Eric Raymond recommend learning Lisp. It's an eye-openining experience. Some languages expose you to more ideas than others.

      Java exposes you to one very narrow set of what's possible in programming. C's window is equally narrow (although much more complex due to the fact that C code can take the hardware into account much more, and tends to have tighter hooks to the OS). Lisp's window is quite wide. Ruby and Python and Ocaml also have very wide windows.

      So, by selecting your languages carefully, you can learn a lot more in a smaller set or known languages. Thusly, virtuous programmers (which is to say lazy, of course) will pick and choose their languages very carefully, and it does matter which they learn.

      --
      Slashdot. It's Not For Common Sense
    26. Re:Java programmer's viewpoint by pthisis · · Score: 1

      you've confused dynamic typing with weak typing. Python is weakly typed and java is strongly typed. Both languages have strong dynamic typing.

      Wrong. Strong and static are orthogonal. Static vs. dynamic refers to whether the language does type checking at compile time or at run time. Weak vs. strong refers to whether the type system can be circumvented or whether operations are type-safe.

      Both properties are continuums, not booleans. It's reasonable to say:

      C's typing is weak and static.
      C++'s typing is weak and static
      Java's is strong and static
      ML's is strong and static
      Tcl's is weak and dynamic
      Python's is strong and dynamic.

      BUT:

      C++ has stronger typing than C, and it has rtti and other mechanisms to do dynamic type checking at runtime. But it's basically weakly typed in the realm of all languages, and it's basically statically typed.

      Java is more weakly typed than ML, but it's still basically strongly typed. It's more dynamically typed than Ada, but it's still basically statically typed.

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

      I call bullshit on you.

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

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

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

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

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

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

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

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

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

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

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

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

    28. Re:Java programmer's viewpoint by aled · · Score: 1

      Java is the choice of consultants, not the choice of scientists.

      What scientists are talking about? What they do? Why they don't find Java useful?

      Most of the complaints about Graham are likely from people who are just barely programmers.

      Do you have ANY facts to backup that? I don't think so.

      --

      "I think this line is mostly filler"
    29. Re:Java programmer's viewpoint by Dwonis · · Score: 1, Interesting

      The fact that you exist does not disprove the statistical proposition (i.e. that the average Python programmer is smarter than the average Java programmer).

    30. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      MSBob is an idiot. Ignore him. There's a reason your on my "friends" list and he isn't.

    31. Re:Java programmer's viewpoint by Lenbok · · Score: 1

      I'm on the verge of getting into seriously learning lisp. Can you explain why lisp macros (since the general term 'macros' is a bit ill-defined in this thread), do not qualify as metaprogramming?

      It seems to me that lisp macros == metaprogramming, and lisp advice == aspects.

    32. Re:Java programmer's viewpoint by Hast · · Score: 1

      Because since they don't post anything it's quite obvious that there's nothing to reply to?

      Damn, forgot to take my smart-arse medication again...

    33. Re:Java programmer's viewpoint by Brando_Calrisean · · Score: 1


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


      Wow! This sounds like a premise for another rock-solid Paul Graham essay!

      --
      Don't call me a cowboy, and don't tell me to slow down!
    34. Re:Java programmer's viewpoint by Hast · · Score: 1
      Paul and Eric Raymond recommend learning Lisp. It's an eye-openining experience. Some languages expose you to more ideas than others.

      I'd go with that. Or at least that you should learn a functional language. It seems to me that learning functional programming after knowing standard procedural/object oriented is going to be a lot more rewarding that learning "yet another scripting language" which I would have to classify Python as. I really like Python though and it's pretty much my favourite scripting language.

      I wouldn't use it to code 3d engines though.
    35. Re:Java programmer's viewpoint by Trinition · · Score: 1

      OK, I'll bite. What's so wide, wide, wide about Python?

    36. Re:Java programmer's viewpoint by zorander · · Score: 1

      Ok. I'll take the bait.

      "But same goes for every other language out there -- the only difference is in degree."

      Even if that is the difference, that is quite a difference to be belittling. Extremely mundane and mildly mundane are very different. Yesterday I was writing documentation. Do I classify that as mundane? Of course, but I only do it every six months or so when we near a release (User documentation, not code documentation). If I were doing mundane work each day, I would probably be searching for another job, but the vast majority of the time, I'm doing very interesting development with a lot of design freedom, incedentally, in python.

      What Java gives you that python doesn't is insurance. On a run of the mill design-by-committee java project, the amount of damage a single programmer can do is minimal. This makes it a good investment for large corporations. Employees can be completely replaceable and the project will not die. If I left my job, the project would be dead in the water. At the same time, a much smaller team has accomplished much more for much less money than we could have using a more legalistic, less flexible tool like java.

      I would be much happier with java if it had a few things--first off, a dynamic typing construct a la 'id' in objective C. 'object' just isn't powerful enough. Secondly, callables a la python. This includes class methods and statics (not merely function pointers like C). The fact that you have to jump through hoops to attach an event handler using a callback model (a la Swing) is inexcusable. Are anonymous classes really a solution? How about in an application with hundreds of event handlers? A programming language should enable the use of different techniques, not restrict them.

      Additionally, the overhead of object allocation in Java is awful. Simple objects whose only attributes are primitive types should be stack allocated under a certain size. Heap allocations across the board are just too costly for a language that encourages the use of lots of small objects (by not providing list/dict/tuple style semantics). This sums up the chief scalability concern that I've encountered using Java. Can it be worked around? Yes. I found that fewer, larger objects accomplished that, but why shouldn't the language bridge that gap? If the concepts are best expressed with smaller primitives, why force the use of large ones? Isn't that what optimization is for?

      The accountability that Java offers for the largest projects is indispensable in the industry. Very few people will argue with you on that, but Graham's main point is that a small, tight team, with a project based more flexible/powerful languages (usually he's praising lisp, but occasionally python gets some attention as well), will be much more productive than a large one using java.

      A good programmer using the tool he/she feels best for the task at hand is seldom a bad thing, and if that is Java for you, then by all means, write java.

      Brian

    37. Re:Java programmer's viewpoint by spRed · · Score: 1

      A minority of python CVS commiters run windows or OSX but there is a fair number; they keep the canonical interpreter happy on those systems. Throw in Jython (python to JVM bytecode) and IronPython (python to dotnet/mono bytecode) and pirate (pie-in-the-face inability to make python into parrot bytecode) and that is pretty portable.

      Also, the python 2.3 release was timed to coincide with the OSX panther release. I make demo CDs for clients that run windows with exes on them (really just a python interpreter and files crammed into an exe, but it makes it easier for them).

      Technically OSX might be UNIX but to Mac fanboys "UNIX" is just the newest reason that they kick windows' ass. They didn't care when it wasn't UNIX and they don't care now. They do care about OSX because ...
      Its got frigin drop shadows, DROP SHADOWS. [if that wasn't funny you haven't gotten multiple client requests for a 'contact' page that includes the postal address with frigin DROP SHADOWS]

      --
      .sig Karma out the wazoo, better to spend points elsewhere if this is above 2 or below 0
    38. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      Actually, it's "bigotry" and not "bigotism."

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

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

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

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

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

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

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

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

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

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

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

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

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

    40. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 1, Informative

      I agree that tool availability is an important reason for selecting Java. Most "XXX vs Java" comparisons tend to assume that one is using some form of simple text editor (e.g. Vi, Notepad) to write code, yet few Java programmers work this way due to the plethora of IDEs (open source and commercial) and specialist editors (e.g. JEdit) that exist. These take a lot of the drudge-work out of Java programming by having:

      1) Systems that automate "boring-to-write" stuff such as RMI/CORBA/etc. classes/stubs, interface implementations, pure virtual method overrides in derived classes, etc.

      2) Refactoring support. This is not merely in the "nice to have" category if you have large amounts of legacy code to maintain and expand.

      3) Integrated debugging facilities which assume that one will be writing distributed, multi-threaded code.

      4) Javadoc integration that makes documenting one's classes a doddle.

      5) Ant and other build script integration.

      6) Automated use of CVS and other version control systems.

      7) Extensible architectures that allow easy integration of third party add-ons.

      8) Context-sensitive on-line help, javadoc searching for information on user-written classes, automatic method parameter prompting, and other stuff that can be a big help when writing code.

      Thus, while a Java listing may seem wordier and more complex than (for example) a Python equivalent, one must consider the fact that (a) most Java programmers won't have to write it all by hand, and (b) they will likely spend a lot less time managing, debugging, and refactoring when working on large projects.

      Note also that those who want to use Python, Lisp, Rexx, Smalltalk or whatever can do so from within Java - alternatively, they can avail themselves of those languages' facilities while maintaining Java-like syntax semantics. Have a look at:

      http://flp.cs.tu-berlin.de/~tolk/vmlanguages.htm l

      for some of the language options available to Java programmers.

    41. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      "Lisp languages also have an instantly-recognizable appearance. Program code is written using the same syntax as lists -- the parenthesized S-expression syntax. Every sub-expression in a program (or data structure) is set off with parentheses. This makes Lisp languages easy to parse, and also makes it simple to do metaprogramming -- creating programs which write other programs."

      Macros != metaprogramming, but often you'll use macros to accomplish it. The _creating programs which write other programs_ is the key part.

    42. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      " Until there is an IDE for Python that's as extensive, capable and sophisticated as Eclipse I'm going to stay with Java."

      ActiveState Komodo...

    43. Re:Java programmer's viewpoint by Paradox · · Score: 1

      Python? Well it's basically Ruby with slightly less dynamism (to me anyways, guess which one I learned first). But Python programmers use many interesting OO idioms in their code which I've used in other languages (albeit awkwardly).

      In my (not-so) humble opinion, Python is up there with Smalltalk and Self in terms of "interesting OO environments."

      --
      Slashdot. It's Not For Common Sense
    44. Re:Java programmer's viewpoint by Anonymous Coward · · Score: 0

      Perhaps you don't realize what his point is. While I don't agree with him on all that many things, I think I understand what the point of the article is - the best programmers are those who truly love programming, and those people who truly love programming don't care about what the most commercially successful language is, and tend to know programming languages that aren't all that popular.

      I know tens of programming languages, and honestly the only good thing I can say about Java is that it has a fairly comprehensive library included with recent versions. In every other respect, it's pretty bad. Basically, it's sort of like C++, but less flexible and even more verbose - it's about as verbose as Ada, without providing the same level of static guarantees.

      Seriously. Anyone with lots of ML, Haskell and/or Oz programming experience who considers Java a worthy language - please feel free to respond, I'm very curious to hear about your experiences, and I'll be following this thread (if anything ever comes of it...).

    45. Re:Java programmer's viewpoint by zorander · · Score: 1

      Thank you for your thoughtful reply. As for the id/object distinction, there are a few major differences.

      Id isn't a 'base class', but exists at a different level than the object system itself. It is used to pass an object whose type might not be determined until runtime. Methods can be called on this object and are bound at call time. For projects where all internal interfaces aren't set in stone early, this can add a lot of flexibility. In Java, you'd have to explicitly cast the object into a type which had a particular method, then call that method. The Java response to this is to use interfaces. Indeed, this provides a moderately clean, if overly legalistic, solution.

      id is not as powerful as python's 'everything is an object' principle (As far as I know, it can not contain primitive types, the handling of which is one of Java's major weaknesses, IMHO), but it does help to get closer. I don't have much experience with reflection in Java, but would it be possible to resolve a method at runtime, by its name represented as a string? Making everything an object induces significant overhead (which python only escapes partially).

      Objective C can also be used in a statically typed way (similar to that of C/C++/Java), allowing performance in the general case, without limiting dynamicism, at the cost of a hashtable lookup, in the special ones. Keep in mind that python does a dictionary lookup on each function call, so this is not an unreasonable overhead.

      My concern with anonymous classes is the same that is expressed in the SUN documentation for them--load time overhead. They each compile to a separate file that has to be loaded. Since a common implementation pattern in swing involves attaching an event handler using an inline anonymous class, else using a messy event handler with a switch statement by implementing an event handler interface and passing this. Neither are particularly clean. I see how reflection could circumvent this problem, but it is a much messier API than it should be. If you were implementing an event system yourself, however, I can see how you could abstract away much of the mess.

      Stack based allocation, now that I think about it, would be difficult to implement, but I don't think it's impossible, and as time goes on, reference implementations will probably do something about this performance problem.

      Brian

  28. haha (repeated less times due to lameness filter) by Uber+Banker · · Score: 0, Flamebait

    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.

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

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

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

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

    1. Re:The Java Problem by tuffy · · Score: 1
      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.

      --

      Ita erat quando hic adveni.

    2. Re:The Java Problem by SRMoore · · Score: 1

      I use both at work. Again it comes down to the best tool for the job.

      Yes Python is easy to use/understand/remember, but then again there are some time when I would need several pages of python code to do something that I can use one or two pre-made classes in Java for.

      I've only recently learned Python (had two days to get up to speed..) and I like what I see, but for building larger applications I'll stick with Java. It is more manageable I think when you design the app right.

      One interesting thing to know is that many large complex applications will embed the python engine in them to allow for scriptability. Several of the large MMORPGs do this so the people developing content program in Python, while the rest of the system is in a more appropriate language/environment.

    3. Re:The Java Problem by gl4ss · · Score: 1

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

      maybe you just hang around with the wrong crowd. knowing java still has it perks and it is _not_ a hard language to master moderately well, or to jump between different flavours of it(an average java programmer can whip up a simple j2me app in just mere hours).

      loysy programmers will be lousy even if they used python.. or php.. or whatever.. good programmers just use a weekend to get to know a bit of the language and start coding.

      and really, if python is all you know do yourself a favor and learn some another language, _any_ language.

      **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.** is oftern heard from visual basic 'programmers'(interface builders/scripters more like) until they hit a ditch.

      --
      world was created 5 seconds before this post as it is.
    4. Re:The Java Problem by brunson · · Score: 3, Interesting

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

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

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

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
    5. Re:The Java Problem by arose · · Score: 1
      I've written in just about every language you can name.
      Brainfuck, Whitespace, POV SDL :-D
      --
      Analogies don't equal equalities, they are merely somewhat analogous.
    6. Re:The Java Problem by LnxAddct · · Score: 1

      Java is real easy to learn. I mean really really easy. Especially if you know C++. And there is so much documentation on the net that you'd never need a book on it. It also has the most kick-ass APIs available. I do however have a book on python, although there is also enough on the net to learn python without a book as well. I do use python quite frequently, but for anything serious, its pure java. Any language that uses whitespace as a main aspect of the language and for defining scope needs to be looked at again. Although its nice and forces your code to look clean, it does have its limitations when it comes to defining scope and what not, at least as far as I can tell. There should at least be an alternative, i.e. brackets. Regardless, if I were you I'd go download Netbeans and/or Eclipse (personally I find netbeans easier to start with, it just works out of the box) and start reading up on java, its a great language.
      Regards,
      Steve

    7. Re:The Java Problem by Sloppy · · Score: 1
      Yes Python is easy to use/understand/remember, but then again there are some time when I would need several pages of python code to do something that I can use one or two pre-made classes in Java for.
      If the Java library is Java's main strength, well, you know what people are going to say... Check this out, Java dudes.
      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    8. Re:The Java Problem by SRMoore · · Score: 1

      I have checked out Jython.. there were things in regular python that were not supported in Jython.

      I'm not really arguing that one is better than the other. I wouldn't use Jython to create an app that uses mostly the Java libraries either.. that is just adding another layer to the problem.

      I just agree with the pick the best tool for the problem at hand approach to doing things. For me, Java for bigger projects, now Python for not as complex or big ones.

      One thing that I didn't like about Python's object model is the lack of private stuff.. and the ability to add variables/methods to an instance. So I do like Java's object model better, but again that is only when I really need objects that are going to be kind of complex.

    9. Re:The Java Problem by pjt33 · · Score: 1

      Define "get things done". I need one reference: the API. I can usually find what I want in there by working out what I would have called it and looking there. If there's a similar reference on Perl, I'd like to know the URL: I use the O'Reilly book, but when I run into problems I generally have to ask a Perl guru what I need to look up in the index.

    10. Re:The Java Problem by chromatic · · Score: 1

      search.cpan.org, perhaps? Otherwise, you might like perldoc -f function for documentation on a function or perldoc -q searchterms to look up a question in the FAQ.

    11. Re:The Java Problem by frank_adrian314159 · · Score: 1
      And I have been a professional C developer and I know C++, Objective C, Fortran, Cobol, Ruby, Haskell, sed, awk, Korn shell, Bourne shell, DTKsh, C shell. I've written in just about every language you can name.

      Learn Lisp and you'll understand where just about every cool langage you mention above gets its good points. Then we'll talk...

      --
      That is all.
    12. Re:The Java Problem by Anonymous Coward · · Score: 0

      lthough its nice and forces your code to look clean, it does have its limitations when it comes to defining scope and what not, at least as far as I can tell. There should at least be an alternative, i.e. brackets.

      Like what?! How could you possibly do anything with scope with a bracket that you couldn't do with indentation?

      The only thing I can think of is if you like your multiline blocks on the same line:

      if (x) { doSomething(); doSomethingElse(); x++;}

      Which is an abomination in itself.

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

      I'm a programmer. Period.

      With the exception of DTKsh, Objective C and Ruby, I've also programmed in all those languages and Smalltalk, Prolog, Lisp, Basic-Plus, various forms of assembly and some I've forgotten. I've also designed and built my own languages. I've taught programming language courses at university.

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

      And you know what? I think Python's an OK-ish language.

      I'd use Python for stuff where perl is too deranged and primitive to handle the complexity, it's not a large enough project to require the support of Java and where I need a slimmer, more direct environment than Smalltalk. And where I can't show how infinitely superior I am to sad little wannabes like Paul Graham, who argue over Python and Java, by using Prolog.

    14. Re:The Java Problem by Trinition · · Score: 1

      ...dump Perl completely after using it for 12 years.

      And what of the other languages? Did you dump them as well? Everything you do now and ever have done would be done best with Ptyhon because it is the "best"?

    15. Re:The Java Problem by Trinition · · Score: 1

      I don't know Python, so I apologize for not meeting that crieria, but I wanted to reply anyways...

      Java 101 public class MyMainClass { public static void main(String[] args) { System.out.println("Hello, World!"); } }

      That shoudl look pretty familiar to C++. And you didn't need any books, I bet, to read and understand that. Hell, I didn't use any books to write it either!

      As others have pointed out, what's compelx about Java is the sheer number of APIs. Even the standard ones are countless, not to mention the many, many, many might-as-well-be-standard third-party libraries. BUt you don't need books. All you need is the javadocs, which every standard or third party library I've used has with it. You just don't write code without wiritng the javadoc comments and then the documentaiton is done. Well, ok, when the deadline comes and goes and people are breathing down your neck, you start to skimp on the javadoc comments :)

      Now, I Don't know Python, so educate me? IF you can fit it all in your head, how do you access a database with Python? Write a GUI? CReate an HTTP server? Read and parse a JPEG?

      My bet, unless someone says otherwise, is that you either use a standard Python librayry (meaning Pyhton isn't as small as you suggested), you rely on a third-party library (meaning, Pyhton is small, but you still can't fit it all in your head if you count the third-party libraries), or you write it yourself (meaning you have to have books on how to write that stuff, lest you have it all crammed in your head).

    16. Re:The Java Problem by LnxAddct · · Score: 1

      I'm no python expert, but how would you do something like say:
      int b = 0;
      {
      int a = 32;
      b += a;
      }
      {
      int c = 43;
      b += c;
      }
      ? Granted that it isn't the best example, but you get the idea, i mean both set of brackets would imply one indent in from the code block prior, so would you double indent the second set of brackets? That might be the answer, I'm really not sure though and can't test it right now.
      Regards,
      Steve

    17. Re:The Java Problem by Ridgelift · · Score: 1

      Now, I Don't know Python, so educate me? IF you can fit it all in your head, how do you access a database with Python? Write a GUI? CReate an HTTP server? Read and parse a JPEG?

      Python's beauty can probably be best summed up in the easter egg planted in the interpreter itself. Just go to any Python interpreter and type "import this"

      The Zen of Python, by Tim Peters

      Beautiful is better than ugly.
      Explicit is better than implicit.
      Simple is better than complex.
      Complex is better than complicated.
      Flat is better than nested.
      Sparse is better than dense.
      Readability counts.
      Special cases aren't special enough to break the rules.
      Although practicality beats purity.
      Errors should never pass silently.
      Unless explicitly silenced.
      In the face of ambiguity, refuse the temptation to guess.
      There should be one-- and preferably only one --obvious way to do it.
      Although that way may not be obvious at first unless you're Dutch.
      Now is better than never.
      Although never is often better than *right* now.
      If the implementation is hard to explain, it's a bad idea.
      If the implementation is easy to explain, it may be a good idea.
      Namespaces are one honking great idea -- let's do more of those!

    18. Re:The Java Problem by sql*kitten · · Score: 1

      I have also been writing Perl for the last 15 years

      dump Perl completely after using it for 12 years

      Only 4 more paragraphs and you'd have been using Perl for zero years!

    19. Re:The Java Problem by Anonymous Coward · · Score: 0

      "How could you possibly do anything with scope with a bracket that you couldn't do with indentation?"

      Define variables whose scope is local to a block:

      { boolean b = true;
      while (b) ...
      }

      The above _could_ be done with indentation, but this might easily result in ambiguities for both the compiler / interpreter and anyone reading the source.

      NB: I like Python, and use it for some things. I also like Java, and use it for different things (and I use other languages / tools too, many of which are better than either for certain problem domains).

  30. Re:Article Text by Anonymous Coward · · Score: 0

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

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

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

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

    --
    Dyslexics have more fnu.
    1. Re:Not true! by Anonymous Coward · · Score: 1, Funny

      and all but one of those millionaires came from
      the 255 people


      of course...that last one was the broadcast person.

    2. Re:Not true! by stevedekorte · · Score: 1

      "The Other 90%" by Robert K. Cooper, Three Rivers Press 2001

    3. Re:Not true! by Anonymous Coward · · Score: 0

      Cite your sources

    4. Re:Not true! by Anonymous Coward · · Score: 0

      You nerd! I'm getting a reading of 0.00 MegaFonzies!

    5. Re:Not true! by orasio · · Score: 2, Insightful

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

    6. Re:Not true! by Perky_Goth · · Score: 1

      it could also mean that people who do what they like don't care about the money, just about being happy.

    7. Re:Not true! by 1u3hr · · Score: 1
      "The Other 90%" by Robert K. Cooper, Three Rivers Press 2001

      From his website he looks like one of those inspirational speakers -- "he's an ordinary man working as hard as he can to discover the unseen possibilities of leadership and life". As a class, snake-oil vendors. I'd need a primary source (i.e. at least saying who did the research, etc) before giving it any credibility.

    8. Re:Not true! by tehcyder · · Score: 1
      But if you were going to a business school, wouldn't making money be exactly the thing you cared most deeply about?

      --
      To have a right to do a thing is not at all the same as to be right in doing it
  32. Definite Nonsense by Arbogast_II · · Score: 0, Troll

    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!

    --


    HenryJamesFeltus.com
    1. Re:Definite Nonsense by brunson · · Score: 1


      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.

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
    2. Re:Definite Nonsense by Anonymous Coward · · Score: 0

      PHP and ActionScript smoke Python or Perl for writing beautiful software that human beings will enjoy!

      ROFL!

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


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

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

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

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

    Python Rules, Perl Sucks. ;-)

    --
    09F911029D74E35BD84156C5635688C0
    Jesus loves you, I think you suck
    1. Re:Why I like Python by cmowire · · Score: 0, Redundant

      Ahh..

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

    2. Re:Why I like Python by CRCulver · · Score: 1

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

      Ruby's lack of Unicode support makes it infinitely inferior to Python. It's the 21st century, the era of the global village, and it's time for language designers to realise that people want to be able to mix scripts effortlessly.

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

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

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

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

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

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

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    5. Re:Why I like Python by nofx_3 · · Score: 1

      I concur. Why not write a function that takes the two args? This way a maintainer will not see a - b; and just pass on by, they will see something like subdate(a, b); with the next logical step for a maintainer obviously being to check the function subdate() see what it does, and what value it returns. This was odd to me in c++, a language that implements objects for code readability and reuse, yet also a language that allows something easily confusing or hidden to a maintainer, to be implemented as well.
      -kaplanfx

      --
      Visualize Whirled Peas
    6. Re:Why I like Python by razeh · · Score: 2, Informative
      I disagree. Operator overloading is nothing more then syntactic sugar. Code that uses it is no more difficult to read then code that makes ordinary function callls.

      When you see:

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

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

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

      Or better yet:

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

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

    8. Re:Why I like Python by Anonymous Coward · · Score: 0

      And doing that while attacking a new project, my friend, is absurd - a la parent poster's point.

      Unless you're just hacking in your basement and get paid whether you deliver or not - like Paul Graham.

    9. Re:Why I like Python by Anonymous Coward · · Score: 0

      So, what you're saying is, python is like a weakened lisp? Great.
      I think I'll stick with lisp...

    10. Re:Why I like Python by dnoyeb · · Score: 1

      Amen brother.

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

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

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

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:Why I like Python by aled · · Score: 1, Funny

      Syntactic sugar makes code fat.

      --

      "I think this line is mostly filler"
    13. Re:Why I like Python by mvpll · · Score: 2, Informative

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

      You seem to think that

      A3 = A1+A2
      B3 = B1+B2

      is just as easy for a human to parse as

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

      I disagree.

    14. Re:Why I like Python by Khazunga · · Score: 1
      You seem to have missed the point of the article intro-text entirely.
      Hint: I did not reply directly to the article. My comment had a parent...
      --
      If at first you don't succeed, skydiving is not for you
    15. Re:Why I like Python by lhand · · Score: 1

      tcA thgirypoC muinnelliM latigiD eht detaloiv tsuj evah uoY

      And now I've violated copyright too!

    16. Re:Why I like Python by EsbenMoseHansen · · Score: 1

      I've never understood why people found operator overloading to be hidden or anything. When you see

      a-b
      you should think
      operator-(a,b)
      , unless a and b a native/primitive/whats-it-called-in-python types. Easy, I find.

      What makes operator overloading hard (sometimes) is the operator precedence. E.g., in C++, the following does not do what you would expect:

      cout << mybool ? "true" : "false" << endl;

      This is, of course, because somebody thought it a good idea to take the bit shift operator and use it for stream operations...

      If Perl, Python and C++ can be criticized re operators, it must be the (exceedingly) long hierachi. I believe C++ is the shallowest with only 11 (!) levels. Then for extra fun, some are prefix, some are infix, some are postfix and some are more two of those. That gets me from time to time, not the that operators can be overloaded. It's not like the code would compile if the overloads were not there...

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    17. Re:Why I like Python by chenwah · · Score: 2, Interesting

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

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

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

    18. Re:Why I like Python by Electrum · · Score: 1

      Unless you're just hacking in your basement and get paid whether you deliver or not - like Paul Graham.

      Paul Graham wrote the software that is now Yahoo! Store: http://www.paulgraham.com/avg.html

    19. Re:Why I like Python by nofx_3 · · Score: 1

      nah, it was just shorthand for the example, I usually try to create var names as readable as possible.
      -kaplanfx

      --
      Visualize Whirled Peas
    20. Re:Why I like Python by Anonymous Coward · · Score: 0

      This is an absurd statement. The entire point of syntactic sugar is to make code thinner at the expense of a fat (or rich depending on your perspective) language.

    21. Re:Why I like Python by Anonymous Coward · · Score: 0

      'h' + 'e' + "llo world" is very readable. It also does something wildly different from what it looks like. Transparency is more important than readability.

    22. Re:Why I like Python by Anonymous Coward · · Score: 0

      It's the 21st century, the era of the global village

      go back to france u fuckin commie

    23. Re:Why I like Python by the_Speed_Bump · · Score: 1

      If you can't understand the language of the problem domain, what makes you think that you can understand the solution?

      Overloading operators where it makes sense (and nowhere else!) makes simple things look simple so that complicated things can stand out better.

      --
      "Break out the gin, and the small violin, I'm a raging success as a failure." --Firewater
    24. Re:Why I like Python by wdr1 · · Score: 1

      RTFM.

      perldoc -f tie

      -Bill

      --
      SlashSig Karma: Excellent (mostly affected by moderatio
    25. Re:Why I like Python by zorander · · Score: 1

      While python 'operator overloading' is good, it's not quite good enough. I am a python programmer. I work full time maintaining 15,000 or so lines of it for an in-house project. I designed most of the system I'm working on so I've had to make thousands of decisions along the way. One of them was to use python, a decision I do not regret. In fact, it has enabled us to do much more then we ever could have hoped to had we decided to implement similar functionality in C.

      What python is missing is infix functions (a la Standard ML). I am not the biggest standard ML fan, but I have to say, infix functions are incredible. Here's how they work (copy/pasted from an interpreter interaction):

      - fun times (x,y) = x*y;
      val times = fn : int * int -> int
      - infix times;
      infix times
      - 6 times 7;
      val it = 42 : int
      By simply informing the interpreter environment that times is an 'infix function', it can be used as an operator. This is, lamentably, one of the few really cool things in ML. As another lose, it's statically typed...which is very annoying coming from the dynamic typing of python.

      If you could dynamically define new operators in any way in python using a similar system, then define them for arbitrary objects (like operator overloading), then you could come up with some very interesting syntaxes that would be a bit more explicit *and* avoid confusing operations that don't correspond to the operators chosen to represent them (the c++/python weakness). Combined with decorators (yet to be introduced) and metaclasses, this could enable some very interesting and thus uncharted techniques. Brian

    26. Re:Why I like Python by gnovos · · Score: 1

      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.


      Maintainable? Seriously? So, once you get hit by a bus, how the sam hell is your replacement going to figure out that X + Y will return X MOD Z ^ Y in one case because that fits the problem space better but not another case where it's not needed without having to read and understand *each and every line* of the code you have written.

      Maybe you are in the business of writing 100 line python scripts so that's ok. But imagine if you had to write serious applications, 300k plus platforms for, say, stock trading?

      --
      "Your superior intellect is no match for our puny weapons!"
    27. Re:Why I like Python by brunson · · Score: 2, Interesting


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

      Get over yourself.

      --
      09F911029D74E35BD84156C5635688C0
      Jesus loves you, I think you suck
    28. Re:Why I like Python by SigmaEpsilonChi · · Score: 1

      Yahoo Store was rewritten with Perl and C++, and according to Paul Graham, the rewrite included the construction of a lisp interpreter for preserving templating. Paul was also not the exclusive author of Viaweb's product, but that's really just nitpicking.

      IIRC that link you provided includes Paul's commentary about the subsequent rewrite of Yahoo Store, but if not, it's on his website somewhere.

    29. Re:Why I like Python by Capsaicin · · Score: 1

      Ref. the creation of the += operator to bypass the (possibly mutating) hooks involved in a = a + b.

      While I disagree with you about the niceness of Python hooks, I must agree that the specialised 'assingment' operators, as currently implemented, are a warts. IMO there should be no functional difference, for instance, between a = a + b and a += b

      But note:

      >>> a = [0]
      >>> b = id(a)
      >>> a = a + [1]
      >>> id(a) == b
      False
      >>> a = [0]
      >>> b = id(a)
      >>> a += [1]
      >>> id(a) == b
      True

      I guess the latter almost makes sense, given lists are mutables, if it weren't for that fact that '+=' is masquerading as an assignment operator. Though this is a small (and perhaps pedantic) complaint regarding a language that serves me so well.

      Still, I'd be interested in seeing an example of where += causes the meaning of a hook to "mutate".

      --
      Better to be despised for too anxious apprehensions, than ruined by too confident a security. --Edmund Burke
    30. Re:Why I like Python by Anonymous Coward · · Score: 1, Insightful

      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.

    31. Re:Why I like Python by alex_tibbles · · Score: 1

      True, if you don't understand the problem domain, or the solution you will not be able to understand well-designed top-level code (particularly if it is designed in a botton-up way). That doesn't mean that bottom-up design is bad. It just means that new personnel on a project are restricted to lower level portions where domain knowledge is less important. Why exactly would you want people who have NO domain knowledge changing or adding to top-level code?
      Perhaps your problems have been in cases where the language of the solution is a very poor match for the language of the domain (so that domain knowledge does not translate easily into top-level design understanding). That, I would claim, is not the fault of operator overloading, or of bottom-up design (using operator overloading), but of poor top-level design.

    32. Re:Why I like Python by Anonymous Coward · · Score: 1, Funny

      Yeah...umm...when Paul was talking about great programmers liking Python...he...ummm...wasn't talking about you.

    33. Re:Why I like Python by steinnes · · Score: 1

      I know alot of programmers who agree so wholly with you. However in my opinion, the beauty of python, is that you can create objects that behave exactly like you want them, like they're a built-in type. So in my opinion, having an object with certain operators overloaded, simply makes that objects interface more complete, thus making the object more beautiful. Note, operator overloading can be used where it shouldn't and cause terrible confusion, but when used appropriately, it works to make the core of the program even cleaner. I admit that the idea of an unknown object with some overloaded operators, doing "hidden stuff" is scary, but you can code scary stuff in even the most restrictive languages, it all depends on the programmer, and whether or not he abuses the features of the language.

    34. Re:Why I like Python by Anonymous+Brave+Guy · · Score: 1
      Transparency is more important than readability.

      Transparency is a prerequisite for readability.

      (In a programming context, I define readability as being easy to read with the correct understanding.)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    35. Re:Why I like Python by Anonymous Coward · · Score: 0

      There's nothing wrong with subdate(), if that particular short function name isn't obvious to a coder then then they don't have the logic power to understand the code to begin with. Generally I agree but you picked a bad example; sub, mov, add are widely used and understood so I don't see the gain.

    36. Re:Why I like Python by Just+Some+Guy · · Score: 1
      Spoken like someone who's never had to maintain legacy code. When I sit down to a 20KLOC codebase that I've never seen before, I want to be able to look at a page of code and be able to figure out what it does without having to hit CTAGS twice on each line.

      As far as "sub" being obvious, would that refer to subtraction, or substitution, or substring count, or subscribe to dates within the specified range? The point is, there's no great reason to have to figure out the meaning of a common three-letter prefix when the easy solution of just spelling it out is conveniently sitting there.

      --
      Dewey, what part of this looks like authorities should be involved?
    37. Re:Why I like Python by Just+Some+Guy · · Score: 1

      I was trying for a "Funny", but got an "Insightful". I didn't mean to sound lecture-y when I wrote that. :)

      --
      Dewey, what part of this looks like authorities should be involved?
    38. Re:Why I like Python by Anonymous Coward · · Score: 0

      (Passes hand over head.) Whoosh!

      For the similarly clueless: "sugar ... fat". Get it?

    39. Re:Why I like Python by Anonymous Coward · · Score: 0

      "Ruby's lack of Unicode support makes it infinitely inferior to Python."

      Use either ruby -Ku on the command line, or '$KCODE=u' in your program to use UTF-8 strings in your ruby programs.

  34. i used to think paul graham was cool by Anonymous Coward · · Score: 0
    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.

  35. Bigot by Anonymous Coward · · Score: 0

    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?

  36. Confused by Ranx · · Score: 3, Funny

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

    I'm confused.

    --

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

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

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

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

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

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

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

    1. Re:what is PG's fascination with Python? by pthisis · · Score: 1
      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.

      In theory, Python is different from Lisp in a lot of ways. It's really not a functional language, though it does allow more flexibility in that direction than many basically OO languages.

      In practice, I often find myself using a lot of dynamic functional techniques when I'm programming in Python.

      You're correct about anonymous functions, but it's trivial to create named functions on the fly in Python. They can't be anonymous, but you can reuse the name immediately (either after the function isn't needed or after storing it in a dictionary or something). (Underscores addes since slashdot mangles whitespace)

      >>> def incr_func(some_func, arg):
      ... _ return 1+some_func(arg)
      >>> func_dict={}
      >>> for i in [1,2,3]:
      ... _ exec("def a_func(a): return a*%s" % i)
      ... _ incr_func(a_func, 10)
      ... _ func_dict[i] = a_func

      11
      21
      31
      >>> func_dict[2](20)
      40

      Or you can have functions that build functions:
      >>> def make_add_x(x):
      ... _ def rv(a):
      ... _ _ return a+x
      ... _ return rv
      ...
      >>> plus1 = make_add_x(1)
      >>> plus20 = make_add_x(20)
      >>> plus1(4)
      5
      >>> plus20(4)
      24
      >>> make_add_x(30)(4)
      34
      --
      rage, rage against the dying of the light
    2. Re:what is PG's fascination with Python? by Anonymous Coward · · Score: 1, Insightful

      Paul has an interest in Python because he has this sneaking suspicion that Python will evolve into Lisp, albeit with a cruftier syntax. He admitted as much when I saw him talk at Powell's during OSCON.

      Unfortunately, I think Guido is taking the (wrong) steps to make sure that Python never becomes Lisp...

    3. Re:what is PG's fascination with Python? by frank_adrian314159 · · Score: 0, Flamebait
      Python is different from Lisp in a lot of ways. It's really not a functional language...

      And this shows you don't know squat about Lisp. Lisp is not merely a functional language - it is a multi-paradigm language with facilities for functional, procedural, declarative, pattern-driven, and object-oriented programming paradigms. Plus all of those features are well-integrated in a common syntactic base.

      Or, to put it in a way all you Xtreme dooods can understand, "Common Lisp is da bomb..."

      --
      That is all.
    4. Re:what is PG's fascination with Python? by goon · · Score: 1
      • 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.

      repeat after me, "python documentation is my best fiend ... ".

      You can read all about lambda expressions in the Tutorial section, 4.7.5 Lambda Forms. They have been around at least since '99. In fact if I dig out my trusty copy of Learning Python, Mark Lutz, 1st Ed., 1999, Oreilly Press, I find that if I turn to page 111 - 113 I can read that:

      ... Python also provides an expresson form that generates function objects. Because of it's similarity to a tool in the LISP Language. It's called lambda. It's general form is the keyword lambda, followed by one or more arguments, followed by an expression after a colon:

      • lambda argument 1, argument N : expression using argument

      So python does have lambda expression capability. However you maybe making a point similiar to PG in that Python is not as useful as Lisp as outlined in Beating the Averages and Sussinctness is power.

      --
      peterrenshaw ~ Another Scrappy Startup
    5. Re:what is PG's fascination with Python? by Anonymous Coward · · Score: 0

      Can't you read? The parent was complaining that Python only allows you to have anonymous expressions, but not real anonymous functions.

    6. Re:what is PG's fascination with Python? by pthisis · · Score: 1

      And this shows you don't know squat about Lisp. Lisp is not merely a functional language


      I never said it was. I said that Python wasn't.

      Both of them are multi-paradigm languages, but Python's support for functional programming is weaker than Lisp's. Still stronger than, say, Java's, but that's not saying much.

      (and Python is even worse at pattern-driven programming)

      --
      rage, rage against the dying of the light
    7. Re:what is PG's fascination with Python? by Anonymous Coward · · Score: 0

      Or, to put it in a way all you Xtreme dooods can understand, "Common Lisp is da bomb..."

      Waaaaaaaaah! I can hear your whining and crying from here. Lisp has been selected out. Time to move on, Professor Numbnuts.

    8. Re:what is PG's fascination with Python? by Trinition · · Score: 1

      OK, I'm not a Python programmer (and frankly, all of this Pyhton chest-thumping isn't doing anything for its cause), but what I think I see above is a bunch of anonymous functions and on-the-fly function definitions. I've done at least part ofthat in ECMAScript. Yeah, that's right, JavaScript. Surely this can't be true. So what am I missing?

    9. Re:what is PG's fascination with Python? by Trinition · · Score: 1

      Learning about Lambdas functions.... they sound a lot like the "funcktor pattern" but that instances of the functor can be created with various arguments. i.e. in Java...

      public class Incrementor {
      public static Incrementor makeIncrementor(int pAmount) {
      return new Incrementor(pAmount);
      }

      private int amount;

      public Incrementor(int pAmount) {
      this.amount = pAmount;
      }

      public int evaluate(int pArg) {
      return this.amount + pArg;
      }
      } // ...

      Incrmentor f = Incrementor.makeIncrementor(42);
      f.evaluate(0); // returns 42
      f.evaluate(1); // returns 43

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

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

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

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

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

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

      _# v2, in Python:
      _def make_spammer (n):
      _____def fn (stream):
      _________for i in range(n):
      _____________print "A ton of spam!"
      _____return fn
    11. Re:what is PG's fascination with Python? by pthisis · · Score: 1

      There are no anonymous functions above (Python doesn't really support them, which was a part of what I said in the above post). I have no idea if Javascript supports dynamic functions (if so, it's got plenty of company); I was simply responding to the assertion that Python doesn't.

      Plenty of languages do support dynamic function creation. Scheme, smalltalk, and lisp are good non-python examples.

      Sumner

      --
      rage, rage against the dying of the light
    12. Re:what is PG's fascination with Python? by Anonymous Coward · · Score: 0

      You can write v2 in Python using lambdas.

      def make_spammer(n):
      return lambda stream: [stream.write('A ton of spam!\n') for i in xrange(n)] and None
  38. Re:haha (repeated less times due to lameness filte by adawgnow · · Score: 2, Insightful

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

  39. Re:Python made my collegues start writing scripts. by farmer11 · · Score: 1

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

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

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

    Oh, bullshit.

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

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

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

    CVB(Neil P. Davis)

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

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

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

    Just a thought.

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

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

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

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

    3. Re:Python is great for guys like me.... by Anonymous Coward · · Score: 0

      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.


      Python: The programming language for the non-programmer.

      Python: Because I can't be bothered to learn a high-level language that's more commonplace.

      Python: It's like an open source Matlab!

      Sorry, those aren't very catchy.

  43. Yes by Arbogast_II · · Score: 1

    And Heck yes

    --


    HenryJamesFeltus.com
  44. Re: Check out his other essays too by Alwin+Henseler · · Score: 1
    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.

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

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

    1. Re:Mr. Graham's next article should be... by nemexi · · Score: 1

      Did you notice that he already wrote an article on why Lisp hasn't gained acceptance in commercial software development circles: If Lisp Is So Great
      An article about Python would probably look very similar - although the "frightening syntax" argument wouldn't be valid in this case.

    2. Re:Mr. Graham's next article should be... by kraut · · Score: 1

      I know at least two investment banks that use python internally; I do most of my "pay the mortgage" programming in Python. It also seems to be getting more and more press.

      So I can't see that it hasn't gained "acceptance in comercial development circles". Yes, it's not as visible as Java was, or C# is, but then it doesn't have a huge market machine behind it, either.

      --
      no taxation without representation!
    3. Re:Mr. Graham's next article should be... by mav[LAG] · · Score: 1

      Ah but you see Paul Graham at least practices what he preaches. He has written at length about why programming languages vary in power and why leveraging that power can really make a difference - no matter what pointed haired bosses think.

      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?

      Python puts food on the table for me - and quite a lot of it too. My clients so far haven't cared what language their systems (some very large systems I might add) are written in - just that they work, are reliable, easy to maintain and took a surprisingly short time to write.

      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.

      You do that. In the mean time many of us will continue to enjoy Graham's essays. I may not always agree with him but he's not just some theoretical pontificator - he founded ViaWeb and made it the leader in virtual shopfront building solutions by using the power of Lisp (hardly a mainstream commercial development language) and then sold it to Yahoo for several million dollars.

      --
      --- Hot Shot City is particularly good.
    4. Re:Mr. Graham's next article should be... by Just+Some+Guy · · Score: 1
      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

      You've honestly never heard of Zope, the web application server written in Python? My company isn't selling copies of our site that I developed on Zope, but it sure is turning a tidy profit on the people accessing it.

      Many of us are feeding our families by programming in Python. It just may not be in the most visible places.

      --
      Dewey, what part of this looks like authorities should be involved?
  46. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    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?

    Cumbersome::Dictionary.examples(1)=Java

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

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

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

    No-ones been hurt by sticking with the mainstream.

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

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

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

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

      --
      I don't need no instructions to know how to rock!!!!
    2. Re:Paradox? by Svennig · · Score: 1
      Absolutely!

      When it comes down to it, languages are just wrappers around machine code. The wrappers are defined by the syntax of the programming language, and to a greater or lesser extent thats the only way in which they differ.

    3. Re:Paradox? by dekeji · · Score: 3, Insightful

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

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

      No-ones been hurt by sticking with the mainstream.

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

    4. Re:Paradox? by redfiveneo · · Score: 1
      No-ones been hurt by sticking with the mainstream.

      If everyone else jumped off the top of a cliff, would you? :P

    5. Re:Paradox? by gnovos · · Score: 1

      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.

      Seems to me quite the opposite is true. With Java you have a wide range of skill levels and persoanlities to choose from wile if you pick a more obscure language you'll limit your choices a great deal.

      Just because somone is a great hacker and can write a string sorting algorithm in Malboge doesn't mean they are good programmers. In fact, they usually are the kinds of people to make code LESS maintainable.

      A really excellent hacker is much more likely to use some obscure, incomprehensible undocumented feature of Python build 42079.3HB5_103 that only he and four other people in the world know about. It'll make the application run like a dream, fast, efficient, stable... and then he'll quit for a higher paying job and you'll be left with an application that can't be touched since it's all magic.

      --
      "Your superior intellect is no match for our puny weapons!"
  48. Standard class for file permissions... by SuperKendall · · Score: 1

    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.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  49. Apples and apples by Dan+Ost · · Score: 4, Interesting

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

    Even their performance is similar.

    Please explain how this is an inappropriate comparison.

    --

    *sigh* back to work...
    1. Re:Apples and apples by Anonymous Coward · · Score: 0

      I'd rather program batch files than something as nasty as Python or whatever you call it. Its like comparing a rolls-royce to a mini - wake up boyo

    2. Re:Apples and apples by Anonymous Coward · · Score: 0

      Hello World in Python:

      print "Hello World"

      Hello World in Java:

      class HelloWorld {
      public static void main(String[] args) {
      System.out.println("Hello World\n");
      }
      }

      I rest my case.

    3. Re:Apples and apples by Anonymous Coward · · Score: 0

      Same performance? Not really. Java is way faster.

    4. Re:Apples and apples by JohnGalt00 · · Score: 1

      Only python is dynamically typed, and their performance is not similar.

      While the benchmarks are old (2+ years), I think they are close to real world results. Java can execute at close to, and in some cases faster than C++ code.

      While the comparison is appropriate because both languages accomplish the same result (usable programs) the languages are different.

    5. Re:Apples and apples by Dan+Ost · · Score: 1

      While the benchmarks are old (2+ years), I think they are close to real world results

      Considering that JIT compilers didn't exist for Python 2 years ago, there's
      no way that 2+ year-old benchmarks are still accurate. Take a look at
      gnu.fyxm.net/directory/devel/Compilers/Psycho. html to see what I'm
      talking about.

      --

      *sigh* back to work...
    6. Re:Apples and apples by varjag · · Score: 1

      So would you voluntarily program on a Turing Machine, with standard libraries, JIT and running in a VM?

      --
      Lisp is the Tengwar of programming languages.
    7. Re:Apples and apples by Anonymous Coward · · Score: 0

      Python:

      print "Hello World"

      GWBASIC:

      ?"Hello world"

      Gee, look how wordy the crappy Python example is compared with the short, elegant GWBASIC code. This categorically proves GWBASIC is among the best systems yet devised for writing "Hello World" programs, so all those out there who need to produce "Hello World" thingumies now know which language to use for them.

      I rest my case!

    8. Re:Apples and apples by Ambassador+Kosh · · Score: 1

      Python has improved a lot since those benchmarks where done and there are better structure for doing many of those things now and 2.4 makes a number of those things even faster.

      Between psyco and python 2.3 and soon python 2.4 you could pretty easily get some massive improvements on those tests. In almost every case where I have seen python slower then java the algorithm chosen was the problem. Algorithms that work well in java,c,c++ don't work as well in python and vice versa. String appends are a simple one (http://www.skymind.com/~ocrow/python_string/ )

      I have helped far too many people speed up their programs 10-1000x with just changing a few simple things.

      --
      Computer modeling for biotech drug manufacturing is HARD! :)
  50. Re:haha (repeated less times due to lameness filte by kndyer · · Score: 2, Insightful
    This argument just doesn't seem constructive to me.
    When I'm looking to hire a programmer, I'm looking for one thing. Adaptability.

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

  51. What a dum bass by Anonymous Coward · · Score: 0

    this is the stupidest thing i've ever read

  52. Re:Who's Paul Graham? by notany · · Score: 1

    He is the guy who started his own startup shortly after he complained in public that nobody is willing to pay more than 500 000$/year for programmer/consultant.

    Then he sold his company for 50 million.

    --
    Dyslexics have more fnu.
  53. not always true by bobblebob · · Score: 1

    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. I program in these languages and I'm crap

  54. Or Groovy... by SuperKendall · · Score: 1

    That's exactly the kind of issue that Groovy addresses, a cool scripting language that runs in the VM.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Or Groovy... by Monkey-Man2000 · · Score: 1

      And about a million other languages.

      --
      This post was generated by a Cadre of Uber Monkeys for Monkey-Man2000 (603495).
  55. Total nitpick by nine-times · · Score: 4, Insightful
    I'm nitpicking, but it's not a paradox. A paradox is something that must be untrue in order to be true, or something which can neither be true nor untrue at the same time, or must be true and untrue at the same time....

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

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

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

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

    1. Re:Total nitpick by Anonymous Coward · · Score: 0
      A paradox is something that must be untrue in order to be true, or something which can neither be true nor untrue at the same time, or must be true and untrue at the same time....

      That's only true if you learned English exclusively by reading time travel science fiction.

      The preferred meaning for "paradox" is "something which appears contradictory but is actually true." Look it up.

      There is nothing that fits your definition of paradox; if that were the definition, there would be no such thing as a paradox.

    2. Re:Total nitpick by nine-times · · Score: 1
      That's only true if you learned English exclusively by reading time travel science fiction.

      How about logic and physics courses? Do those count?

      The preferred meaning for "paradox" is "something which appears contradictory but is actually true." Look it up.

      I love you dictionary folk- always using words to define words without talking about what words mean. That's already coming closer to a paradox. In other words, the wording of that definition seems to have lead you astray.

      See, for that definition to be any good, you have to get at what "appears" means. Something isn't a paradox merely "because the wording 'sounds' contradictory, but a close analysis of the sentence reveals it makes perfect sense". A paradox is a logical conundrum where something is, by all accounts, self-contradictory, and yet it is/exists/occurs.

      The classic examples of this are Xeno's paradoxes, demonstrating, for example, that motion is logically impossible by using our logical understanding of math/physics/motion.

      So back to the word "appears": If you can really show that a paradox isn't logically self-contradictory, then it isn't a paradox, it's merely bad wording. The "appears" comes in because, although it's logically self-contradictory, you must admit that somehow it isn't self-contradictory, or else it wouldn't be/exist/occur.

      There is nothing that fits your definition of paradox; if that were the definition, there would be no such thing as a paradox.

      Ah, but you see, the fact that there are paradoxes is, in itself, a paradox. The idea of a paradox logically precludes it from happening, and yet paradoxes do occur. However, I'm not sure this really matters, and is fairly off-topic. I think, either way, my point stands: calling it a paradox seems like a dodge.

    3. Re:Total nitpick by Zangief · · Score: 1

      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.

      It is not a paradox. It makes sense. It is a simple reality from the capitalist economic model.

  56. My Job by RobPiano · · Score: 1

    I think my job defies most of the argument, and many major software arguments in general.

    I'm paid to write open source software in Python and C++.

    Kinda funny huh?

    1. Re:My Job by morgajel · · Score: 1

      Is your company hiring? :)

      --
      Looking for Book Reviews? Check out Literary Escapism.
  57. Hmm, in which CAD system? by PaulBu · · Score: 1

    Still stuck with Mentor or something like that? ;-) If you would be using Cadence DFII you would be using their variant of Lisp (SKILL)... Yes, that was one of the best design decisions that Cadence guys made.

    Paul B.

    1. Re:Hmm, in which CAD system? by wallclimber21 · · Score: 1

      I wasn't necessarily talking about scripting the application itself, there you have to use SKILL for Cadence, Scheme for Avant!, or, unfortunately, TCL for most other tools. I'm more talking about stitching multiple applications together. E.g. linking timing delays from PKS to PrimeTime SI etc. Other examples are general purpose scripts to display regression results, scripts to tie together Vhdl and Verilog models etc etc. Tom

    2. Re:Hmm, in which CAD system? by PaulBu · · Score: 1

      OK, OK, I surely know how it feels, doing similar stuff myself... ;-) And add gnuplot to the mix too! ;-)

      Paul B.

  58. Why does it have to be a pissing contest? by rrangel · · Score: 1

    I think the quality of the product / service you write with the tool is more important than the choice of tool. And no need to cut down others for it. I can use the same brushes as Rembrant but that doesn't make me a flemish painter of the hightest order.

    1. Re:Why does it have to be a pissing contest? by kjd · · Score: 1

      Have you actually read the article, or any of Paul's other articles? It's not about who can piss farther, it's about finding the most efficient tools.

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

    [reposted because my original parent got modded into oblivion]

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

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

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

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

    Python Rules, Perl Sucks. ;-)

    tcA thgirypoC muinnelliM latigiD eht detaloiv tsuj evah uoY

    --
    09F911029D74E35BD84156C5635688C0
    Jesus loves you, I think you suck
  60. Re:Python made my collegues start writing scripts. by gomoX · · Score: 1

    Amazingly, even if you haven't used it, Python will be probably more readable to you than any other language out there.

    --
    My english is sow-sow. Sowhat?
  61. Source? by bretharder · · Score: 1

    Could you post the source of the above post?

    1. Re:Source? by TwistedSquare · · Score: 1

      I second that :)

    2. Re:Source? by kjd · · Score: 4, Informative

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

    3. Re:Source? by anomalous+cohort · · Score: 1

      I does seem apocryphal that 6.7% of these business students became millionaires. Perhaps most of them were already millionaires (or children of millionaires) before they started school?

    4. Re:Source? by Anonymous Coward · · Score: 1, Informative

      From Googling:

      This study is mentioned in this book excerpt and here.

      The first reviewer here mentions a reference that would seek to discredit the cited study's author however.

    5. Re:Source? by snarkh · · Score: 1


      The whole thing sounds highly apocryphal.
      Some stupid poll correlates 99% with becoming a millionaire? Absolute BS.

    6. Re:Source? by snarkh · · Score: 1


      Very good. The statistics sounds absolutely incredible.

    7. Re:Source? by aled · · Score: 1

      Agreed, I don't believe them.

      --

      "I think this line is mostly filler"
  62. or poor Paul by linuxislandsucks · · Score: 1

    A Language does not make a great hacker or ignorantone..

    Its the training/skills inthinking, math, logic. philosophy, and etc..

    --
    Don't Tread on OpenSource
  63. WHat turns me off Python by SuperKendall · · Score: 3, Interesting

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

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

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

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

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:WHat turns me off Python by Prof.Phreak · · Score: 1

      I wish I had mod points. I'm with you on that white space issue... I looked at Python, and that white space thing totally turned me off...

      oh, and my primary language of choice is Perl; and about 5 or so years ago, my language of choice was Java.

      Anyone who thinks Python is cool, should really look at Perl.

      --

      "If anything can go wrong, it will." - Murphy

    2. Re:WHat turns me off Python by Disco+Stu · · Score: 1

      Understandable. The whitespace thing really turned me off when I saw it. I used to love perl - the only thing that convinced me to try python was perl's inability to run in the JVM. All I can say is, try python. Try writing a tiny (but non-trivial) app in it (using a decent editor, of course). You may still hate the whitespace thing, but I wouldn't be surprised if you discovered that it's really not a big deal. That's what I found, anyway.

    3. Re:WHat turns me off Python by Anonymous Coward · · Score: 0
      but not Python. And you know why? It sounds petty and stupid, but I just hate the whitespace indenting.

      You'll probably hate it much less after you give it a try. It's off-putting to many beginners because they're not used to this approach, but it works just fine.

    4. Re:WHat turns me off Python by random_static · · Score: 1
      I have always thought that perfect code readability relied on the felxibility to format certain sections of code differently than others

      i could've written that, a few years ago before i learned python...

      seriously: how much of your code (and i'm talking only about that part of your code which you would consider readable and well-formatted; i'll be generous and ignore any ugly spaghetti code you might have written) is not indented by nesting level? what is it indented by, then?

      i thought the whitespace thing would be a huge problem for me when i started learning the language... then after a couple hours, i noticed i was actually programming exactly as i normally would have been, i just left out the braces. the way i formatted my code in practice never needed to change at all.

      (i also hate Java, by the way, but that's for other reasons entirely. i do think its syntax suck-starts entire biker gangs' worths of harleys, but even that's only part of it.)

    5. Re:WHat turns me off Python by Anonymous Coward · · Score: 0

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

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

      but not Python..."

      That was an excellent troll "SuperKendall", if that really is your name, but you've managed to contradict yourself within the short quoatation I've highlighted above. You claim to be a "good programmer" and yet you fail to recognise that "Python programmers are just naturally the smartest people on earth". You even claim that you find this unassailable fact "to be rather offensive". This last statement alone proves beyond a shadow of a doubt that you are nothing but a stupid Microsoft shill.

      However, perhaps there is hope for your penis yet. You claim that you "hate the whitespace indenting". I can undersand this but remember my dear, dear friend, that this particular attribute of the God given language called Python (God in this case being Osama Bin Laden) is there simply for your own good. You see, Python is like Jazz, You may not like it but you should listen to because eventually you know that it'll do you good.

      Please think of the children before you write another Visual Basic programme. I know homosexuals such as yourself simply love the moist sensation provided by Windows and to a lesser extent, the Apple rip-off but it is my duty to tell you that GNU/Linux is far more erotic and boasts far more homosexual users than Microsoft or Apple can ever wish for.

      Perhaps I've said too much already, but I can reveal here for the first time that the reason Microsoft fears GNU/Linux so much is the fact that Bill Gates wants all the faggots to use his operating system and not the communist sponsered Linux as championed by his secret bum-chum, Linus Torvalds. I know all this incidentally because Richard Stallman told me so -- and he only told me because I promised that I wouldn't tell anyone else lest his regular shag, that other doyen of the terrorist Slashdot underground, Bruce Perens found out.

      No. It's a sad day when people like you can't accept the fact that vi is better than emacs and that George Bush has no dick.

      Good day to you Sir. I've no wish to speak with pussy fearing fascists who can't accept that Python is the superior language. After all, as programmers, we all have python like dicks between our legs, even the women. Perhaps you fear us so much because you can't, like us, suck your own knob; or, again like us, can't find a suitable 12 year old Japanese schoolgirl to do it for us.

      Please, in the future, bear in mind that SCO astroturfing at best bores everyone and at worst, confuses the newcomers to Slashdot.

      (and if that's not a troll, I don't know what is)

    6. Re:WHat turns me off Python by _|()|\| · · Score: 1
      Anyone who thinks Python is cool, should really look at Perl.

      Many Python programmers are (often former) Perl programmers who are fed up with Perl's expressiveness (i.e., TMTOWTDI). Making Perl as complex as a natural language may be empowering, but only if you have a commensurate amount of time to devote to it. I've read Programming Perl cover to cover (twice), and I'm still not as comfortable with it as I am with Python, for which I haven't read any books. Based on what I've heard about the new features of Perl 6, I doubt I'll ever go back.

      The white space thing is virtually a non-issue. The only problem I have with it is that it complicates copy and paste to a different indent level. Even then, most editors have a command to indent or outdent a region. We're all entitled to our opinions, but it's a shame that so many people can't get past a few parentheses (Lisp) or spaces (Python).

    7. Re:WHat turns me off Python by Anonymous+Brave+Guy · · Score: 1
      Many Python programmers are (often former) Perl programmers who are fed up with Perl's expressiveness (i.e., TMTOWTDI).

      /me points to current .sig and smiles quietly. :-)

      The white space thing is virtually a non-issue.

      To an extent, I agree; personally I find languages like C and Java over-punctuated. However, I think the grandparent made a valid point that to get good readability you (or at least, he and I) often want to line up related code fragments vertically, which may be inhibited if whitespace serves a punctuation role. Visible punctuation does serve a useful purpose in moderation! :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    8. Re:WHat turns me off Python by Anonymous Coward · · Score: 1, Insightful

      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.

    9. Re:WHat turns me off Python by pdamoc · · Score: 1

      I too hated whitespaces at first. But after playing with some code, after forcing myself to actually write something in python I discovered at fist an accommodation with the lack of {} and after a little while, looking back on code, I found myself smiling, it was in better shape than most of what I've written till that date... I could understand it better, I could see more and then I realised that the whitespaces that I hated at first were actually acting as a guardian, keeping my code together, helping me, this is the moment when I truly embrace them, the moment when I have fallen in love with the language.

    10. Re:WHat turns me off Python by Paul+Crowley · · Score: 1

      Ah, you haven't tried it, have you?

      Every experienced programmer has this reaction at first. You have to actually try it to find out that it's not the problem you think it is - quite the reverse.

  64. Since when does Java land you a better job? by callipygian-showsyst · · Score: 1
    When I get a resume that says Java, I'm likely to throw it in the trash, especially if that was the bulk of their experience. I find that people raised on Java are very bad at debugging "system level" problems. Also for some reason (maybe because there's no first-class support for events and delagates, combined with garbage collection), Java Programmers tend to pass objects all over the place, even to unrelated classes that shouldn't need to know about them. It gives you the same "spaghetti" proglem that 70s era "BASIC" did.

    Typically a senior software engineering resume doesn't enumerate languages, but if I see significant exprience in Python, Scheme, as well as C++, it's probably a good resume!

  65. Overheard on #twisted by xant · · Score: 1

    <Logan> Although I'm fighting for it, my boss thinks the customer wants it done in C++ or, even worse, Java.
    <Logan> But I told him it'd quadruple the cost. :P
    <PenguinOfDoom> Logan: What does the customer care, anyway?
    <Logan> PenguinOfDoom: That's what I said. It's like dictating what brand of toothpaste your plumber brushes his teeth with.

    (Disclaimer: no, I'm not either of these guys ;-)

    --
    It's rare that you're presented with a knob whose only two positions are Make History and Flee Your Glorious Destiny.
  66. It's not the tools by nuggz · · Score: 1

    Better algorithms and coding practices give the largest contribution to good results.
    These are a function of the programmer.

    The tool is pretty much secondary, as long as an appropriate one is selected. To be honest there are a lot of good programming languages. I personally like python, but I use it because it's easy not because I'm any good at programming.

  67. Re:Python doesn't land you a better job by osobear · · Score: 2, Funny

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

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


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


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

    --

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

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

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

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

      RTOFA. He says:
      And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know.
      Which makes them exactly the kind of programmers companies should want to hire.


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

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

      --
      --- Hot Shot City is particularly good.
    2. Re: Dumbest thing I've read in a while by akuzi · · Score: 1

      ...to become an eminent NT developer he would have had to use NT voluntarily, multiple times, and I couldn't imagine a great hacker doing that.

      > Not trolling here, but this opinion piece is stupid.

      I agree. It's not exactly hard to find a counter-example to his claim...

      eg. from... John Carmack's .plan in 1997
      " I currently develop mostly on NT, and Quake 2 will almost certainly be delivered on win32 first"

      http://rmitz.org/carmack.on.operating.systems.html

    3. Re:Dumbest thing I've read in a while by Anonymous Coward · · Score: 0

      back in 2000, I DID know a dot-com startup who developed initially in PHP+MySQL, then their main dev disappeared so they looked for someone else who moved everything over to NT for a web-based system.

      This seems kinda dumb to me.. Especially because months later, when I was kindof wondering what they were up to I hacked into their site using trivial SQL injection.

      So in this case getting the "experienced" NT dev didn't pan out very well for them. They went bust before they could finish their product.

    4. Re:Dumbest thing I've read in a while by nuonguy · · Score: 1

      Disclaimer: I love Python, the programming language.

      While it may be a generalisation to imply that someone who likes NT couldn't be a first-rate hacker, you miss the point.

      Do you remember 1997? I do. In that year, every wannabe pundit proclaimed that NT is going to overrun Unix, the Mac, and anything else. I have these memories of self-styled industry watchers telling me to forget everything I ever new about the Mac and anything that wasn't directly related to NT. My career was obviously about to dead-end if I didn't get on the NT bandwagon. Being the weak-minded drone that I am, I did just that. There was a multitide of programmers betting their future on NT back then.

      My Python experience was completely different. I tried it out because someone talked about it (during a Perl class, of all occasions) and once I used it for more than 1/2 hour, I never looked back.

      I agree that any decent hacker can learn Python, and learn it quickly. The point is, the first rate hacker is the one who will take the initiative for no other reason than because she finds it interesting, not because it's a buzzword that'll get you hits on monster. Contrast this with the hordes of VB and Java programmers of which I have not yet met an idealist devotee. I can understand that because Java and VB (for different reasons) severely limit the kinds of programs you can write and the concepts you can reason about. Python is a lot more liberated.

    5. Re:Dumbest thing I've read in a while by Anonymous Coward · · Score: 0

      Saying "...but I know Python" is the same as saying "...but I know Assembly" when you have a bunch of C++ code to write.

      This actually makes sense, if you think about it. C++ programmers (and most high-level language programmers) tend to overlook the architecture they program on, or the hoops a compiler goes through to optimize their code. Yes I know that's what the high-level language is for, but guess what, Knowing assembly gives you the upper hand WHEN you program in C++ over someone who does not.

    6. Re: Dumbest thing I've read in a while by Anonymous Coward · · Score: 0

      Well duh, he's a GAME programmer who produces software for a MARKET. He is probably talking about favoring the NT architecture over Windows 95 anyway, it's not like he had the choice to develop on non-Windows.

    7. Re:Dumbest thing I've read in a while by julesh · · Score: 1

      According to the author, there's no way to succeed if you choose to build on NT.

      That's not what he said.


      It's exactly what he said. I'll quote the relevant portion:

      But the next time I talked to him, he said they'd decided to build their software on Windows NT, and had just hired a very experienced NT developer to be their chief technical officer. When I heard this, I thought, these guys are doomed.

      Based entirely on the fact that they've chosen to use NT, he's decided they have no chance of success. The reasoning process that leads him to this might have involved his definition of a first rate hacker, but that's not involved in this statement, which is what the OP was responding to.

  69. Python & jobs by shadowmatter · · Score: 1

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

    Right -- just ask Bram Cohen at Valve...

    But anyway, if people can get jobs by having VB on their resume, why not Python?

    - sm

  70. Re:haha (repeated less times due to lameness filte by eidechse · · Score: 1

    I agree, but I think that this is compatible with his (Paul Graham) statements. Great programmers will recognize situations where one language will be better than another. 'Regular' programmers will just bash square pegs through round holes...or give up on the problem entirely.

  71. Hm. by cbiffle · · Score: 2, Funny

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

  72. apples to oranges by mrm677 · · Score: 1

    Its the type-checking stupid.

    I love Python. But I've shot myself in the foot enough times, with dynamic typing, to realize that strong typing is better for many things including code that must be correct and fully debugged.

    1. Re:apples to oranges by GnuVince · · Score: 1
      First of all, the opposite of dynamic typing is not strong typing, it's static typing. I'm sure you knew that, but I wanted to make sure people who are not familiar with the difference between static/dynamic and strong/weak typing get it.

      Using Ruby and Smalltalk here, and thanks to unit tests, I rarely have such problems. When I worked with O'Caml, I spent quite a lot of time doing conversions back and forth to please the type system. Programming should not be about that.

    2. Re:apples to oranges by pthisis · · Score: 1

      Its the type-checking stupid.

      Absolutely...

      I love Python. But I've shot myself in the foot enough times, with dynamic typing, to realize that strong typing is better for many things ...but you have it wrong. First, Python _is_ strongly typed. It is not statically typed. The two concepts are orthogonal (e.g. C is statically typed but not strongly typed).

      Second, for many problem domains--especially the development of large web applications--dynamic typing has huge advantages over static typing.

      And third, if you're dead-set on static typing, consider a language with type inference and _very_ strong typing (e.g. ML, Haskell, or Dylan -- ocaml is a very nice ML implementation)

      IOW, typing is a huge factor. But it is not a better/worse thing except relative to certain problem domains.

      --
      rage, rage against the dying of the light
  73. Re:Python doesn't land you a better job by Anonymous Coward · · Score: 2, Insightful

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

    Oh, bullshit.

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

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

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

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

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

  75. It's amazing, how un-meritocratic by Anonymous Coward · · Score: 0

    People are in their decision making, relying on what is clearly prejudiced thinking to cover up for their lack of ability to judge human character directly.

    If programmers want to become managers, they need to learn something about people. Until then, they will be flying in the dark, relying on tokens like Stanford degrees and Lisp knowledge as proxies for the ability they really need to do their job.

  76. Perl's great, but not for everything by Anonymous Coward · · Score: 0

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

    Not quite. Probably closer to the truth is that Perl hackers are the better hackers, because Perl provides vastly more scope for very flexible hacking. I doubt that there's another language quite as flexible. That's not the same thing as saying that it's the best language though (there is no such thing of course), nor that its users are the best programmers.

    Horses for courses. Perl is one of the (many) languages I use, and it's unbeatable for a large range of applications. I don't use it for everything though. It seems to be especially bad for engineeering large systems that need to be maintained by people other than the original developers. Maybe that stems from the easy-going culture of most Perl programmers.

  77. just topped the ball; states the obvious by zztong · · Score: 1

    I think the real statement here is that persons motivated to learn a language/technology beyond the minimum required for their job are bound to be your most knowledgeable. And in this industry, knowledge often translates into productivity.

    I don't think Python is specifically relevant. In a world of massive Python work, the same self motivated people are the ones who would likely have bothered to learn Java.

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

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

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

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

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

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

    It's all just a matter of taste.

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

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

      I come from a C++ background, with a couple of yeas of Java, and I will boldly claim that Python is more productive than Java. It's more than a matter of taste, and I would love to be able to back that up experimentally.

      The hyped language of the day always gets all the press, all the books, and all the idiots flocking to it, because it's fashionable and there's money in it. I've seen it with C++, Java, and C#, and I'm sure I'll see it again.

      --
      no taxation without representation!
    2. Re:Horsefeathers! Horsefeathers I say! by pthisis · · Score: 2, Insightful

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

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

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

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

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

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

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

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

      --
      rage, rage against the dying of the light
    3. Re:Horsefeathers! Horsefeathers I say! by Dean+Kusler · · Score: 1

      It's silly to even imply that one programming language can do something that another can't. It's perfectly possible to do everything you can do in Java or Python or C++ in a language like Ook! - the question is not about possibility, it's about productivity. Python is - in my opionion and in the opinions of many other people smarter than me - capable of promoting higher programmer productivity than Java.

      I come from a C++ background - I've been using it since 5th grade, before there was an STL - and I prefer Python's syntax over that of the curly-bracket-semicolon languages. Familiarity doesn't preclude the recognition of Python as a syntactically cleaner language.

      Also, those smart coders who use Java usually don't know only Java. One of the hallmarks of a good programmer, in my book, is competancy in - if not mastery of - as many languages as possible. Even if you never use half of the languages you know, you will be able to analyze problems from many different angles to find the best solution.

    4. Re:Horsefeathers! Horsefeathers I say! by shmigget · · Score: 1

      I agree that, while substantial differences between languages obviously exist, the main reason that I've seen for Python's adoption (or lack thereof) comes down to style. I have friends who just hate the lack of braces, or some punctuation that ends a block. Those of you who love Python may find that silly, and maybe it is, but style does matter, and style boils down to taste. Some Algol-family coders like the open curly-brace on the same line, and others like it on the following line, and both argue their perference is the most readable.

      I also know may coders who grew up on Perl (I am one, myself) who developed a disdain for Python simply because every Python fan they met would greet them by saying, "Python can do more things than Perl and Perl sucks!" In my personal experience, Python-coders have distinguished themselves as the most zealous (that's in comparison with fans of C/C++, Perl, Java, PL/SQL, LISP and SmallTalk), and unfortunately that has also translated into the most obnoxious.

    5. Re:Horsefeathers! Horsefeathers I say! by _|()|\| · · Score: 1
      Tell me which one is faster! On modern equipment, you won't notice any difference for most tasks.

      If only this were true. It's fashionable to say that modern hardware frees you from performance concerns, but I have found Python's slow performance to be an obstacle. Loops, function calls, and name lookups can be annoyingly expensive, to say nothing of bit twiddling.

      I like Python, but its full potential isn't realized without some optimization and, occasionally, an accompanying C module.

    6. Re:Horsefeathers! Horsefeathers I say! by Anonymous+Brave+Guy · · Score: 1
      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.

      But Audis are better than BMWs... ;-)

      Seriously, though, I disagree with your claim about personal taste in programming languages. Of course personal preferences matter, but there can be objective differences between languages: some have stronger underlying models, in the sense of providing better abstraction tools, for example. Given what we know of programmer behaviour, a language that provides a more concise representation of a problem will, other things being equal, be a more productive tool.

      In the particular case of Java vs. Python, I'm not sufficiently expert to identify all the significant differences. However, in general, while all Turing-complete languages may be isomorphic on some level, they certainly are not all equal as development tools.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:Horsefeathers! Horsefeathers I say! by Trinition · · Score: 1

      HOLD IT!

      Everyone on Slashdot knows that if you came from C++ and now say Python is better than Java, you are further obliged to say how nothing can outperform C++, especially some two bit interpreted language like Python, runtime optimizations or not.

      Now finish your job!

    8. Re:Horsefeathers! Horsefeathers I say! by Trinition · · Score: 1

      OK, so make Pyhton into python-bytecode, throwing in a Python Virtual Machine with HotPlace runtime optimizations.

    9. Re:Horsefeathers! Horsefeathers I say! by tree_frog · · Score: 1

      But of course there is a difference between BMW and Audis. I'd buy a second hand Audi, but a second hand Beamer has probably been razzed to fuck by some twat from marketing who has watched Ronin too often :-)

      Treefrog

    10. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      Yes, but older beemers have those cool red instrumentation lights, kinda like being in a U-Boat (hmm...)

      --
      Farewell! It's been a fine buncha years!
    11. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      You have a valid point, but at the same time, most currently popular languages are equipped fairly equally (hence their popularity). It's a sort of darwinism, I think. Weaker languages die off, leaving the strong.

      I'm not saying that they're equals because they're Turing-complete; I'm saying they're equals because they've survived in the same environment long enough to evolve the same capabilities.

      --
      Farewell! It's been a fine buncha years!
    12. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      I wasn't aware of this because I'm Java, not Python, and it tends to reinforce my pro-Java leaning... This is a shame, if true -- you'd think they'd have worked it out by now. Ah, well...

      --
      Farewell! It's been a fine buncha years!
    13. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      Maybe it's a personal phobia, something like agoraphobia, but writing code without any clear boundaries for code blocks would totally freak me out. I'd feel like I was naked, wandering around a hyper-conservative church revival...

      --
      Farewell! It's been a fine buncha years!
    14. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      I agree with most of your post, but since I'm a Java guy, not a Python guy, I have no idea whether your claim about increased productivity is true. Having said that, I'll say this:

      I buy the possibility that you can do certain things more easily with Python. I'm not writing it off. However, I'd have to see it to believe it.

      As far as Python being "syntactically cleaner" I've got to disagree with you there. I really dig them curly brackets. I think they make it really easy to completely and definitively lay out your code. I'm really, really suspicious of code that uses indent positions to lay out blocks. I'd hate to have to scroll up and down to see where the cursor lines up, to trace my way around a long block. With Java, all I have to do is count braces, as if I was storing them in a stack. You know, "Push, push, push, pop" and so forth...

      I basically find the more anal syntax of C/C++/Java more determinate.

      --
      Farewell! It's been a fine buncha years!
    15. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      If "it's possible somehow" is your measure, then there's no reason to choose Java over assembly

      That's not really what I meant. I think that languages evolve the same way creatures do, i.e. that languages which are more effective survive while less effective languages die off. I think that the current popular set of languages all share the same set of capabilities because these capabilities are the set that have evolved as the "necessary" set. In other words, there are a certain set of abilities that are demanded by most users; the languages that support them are more successful; and consequently, most of the "big" languages currently are very similar.

      It's not really about being "Turing complete" although that facilitates the process. It's about the market acting as a darwinian laboratory which is spawning useful languages.

      Anyway, that's what I meant. ;)

      Having said all that, I prefer static typing, myself. Again, there's that personal preference rearing its head...

      --
      Farewell! It's been a fine buncha years!
    16. Re:Horsefeathers! Horsefeathers I say! by Anonymous+Brave+Guy · · Score: 1
      You have a valid point,

      Why, thank you. :-)

      but at the same time, most currently popular languages are equipped fairly equally (hence their popularity).

      To some extent, that's clearly true. However, I think the two qualifiers you've added in that sentence give away the nature of today's programming world.

      Firstly, languages which are "currently popular" are frequently faddish in this business. A few years ago, it was all about "object orientation". Now it's all about "scripting".

      Of course there are a lot of similarities between, say, Perl, Python and Ruby, but then there's the qualified "fairly equally": if you look at the programming landscape as a whole, focussing on popular languages rather than minority or academic interests, you can still see very significant differences even between the popular languages. C++ lacks the convenience of Java at times, but makes up for it in raw power at other times. It's easy to say Perl and Python are almost the same if all you look at is trivial text processing work, but for more complex tasks?

      But it really is very faddish. I'm still waiting for someone to produce a language with strong support for both functions and UDTs, where most of the coding can be declarative, but the structure is familiar to the 9x% of programmers who live in an imperative world, and structured programming with side effects isn't prohibitively awkward where it would be useful. It's not hard to imagine such a thing if you're familiar with both imperative and functional programming, and several of the so-called scripting languages tend in this direction, but no-one's really bitten the bullet yet. In the meantime, as you say, we're stuck with a lot of languages that are different, but really not that different.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    17. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      Here's the language I'm waiting for:

      C/C++/Java like syntax with curly braces, semicolons and etc (I like the rigid nature of it, I feel it's more unambiguous than more open syntaxes);

      Java style OOP, where everything is a class;

      A rich library with all of the tools I might need to do my work;

      A single, well thought out library to handle GUI development which works in approximately the same way on all systems (this means using a virtual machine, of course, but many languages already do this so it isn't much of a leap);

      Reasonable speed on older equipment (a good minimum baseline for me is a 500Mhz Pentium II with 128MB of Ram).

      There are a few languages already which are partway there. I think Java is pretty close, except for their multifarious GUI libraries, although I don't find that TOO much of a hurdle because Swing seems okay. I just wish they'd streamline it a little, it's such a bear to work with.

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

      I think that the current popular set of languages all share the same set of capabilities because these capabilities are the set that have evolved as the "necessary" set. In other words, there are a certain set of abilities that are demanded by most users; the languages that support them are more successful; and consequently, most of the "big" languages currently are very similar.

      Except that the "big" languages are not very similar. I would think that currently C, Java, Perl, and VBscript are near the top of the "big" language heap and they are pretty far apart on most of the major axes. Even within a single small domain like web programming there's a split between page-inline languages (e.g. ASP, PHP, Coldfusion) and server object/template transform solutions (most Python/Java-based solutions. There's a split between static and dynamic typing. There's a split between OO solutions, functional solutions, and procedural solutions.

      Really, most languages have agreed to spell conditionals "if" and loops "for" or "while". They agree that there should be some way of defining and calling procedures and returning values from them. They seem to agree that seperating code into multiple files is good. But there isn't all that much consensus outside of that--not even on basic things like "should functions have their own scope?" or "what happens if I add two numbers?"

      It's about the market acting as a darwinian laboratory which is spawning useful languages.

      A whole ecosystem of them, each very competitive in certain niches and some more widely useful than others.

      --
      rage, rage against the dying of the light
    19. Re:Horsefeathers! Horsefeathers I say! by crazyphilman · · Score: 1

      On the contrary; I think they ARE very similar, but perhaps I mean it in a more philosophical sense than you do. I don't mean they look and feel the same, I mean they can do the same things. Similarity, for me, is all about capability.

      Don't get me wrong, I fully agree that certain languages are more suited to certain tasks, and that's fine. And I totally agree that an ecosystem is great, and there's plenty of room for all languages, with their differences.

      But when you consider general-purpose languages like Java or C# (which are practically twins), or C/C++, you have to admit they have most of the same facilities, and therefore are similar.

      Having said all that, you have to admit there IS some convergence going on, syntax-wise. Already similar languages are getting more similar every day. Whether you think that's a good thing or not, well, that's up to you...

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

      I don't mean they look and feel the same, I mean they can do the same things.
      Well, they're all Turing complete so the capability is always the same, right?

      Really, it's how quickly, effectively, and maintainably you can get the job done that matters, and while you're right that C# and Java are the same, Java and Python or VB and C are very far apart on the language spectrum, and I actually think there is more diversity and divergence now in maintstream programming languages than there was 10 years ago (though maybe not as much as there was 20 years ago)

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

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

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

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

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

    Just a curiousity I thought I'd note.

    --

    --Erik
    1. Re:He likes Small Is Better, which isn't Java by Anonymous Coward · · Score: 0
      The Yahoo Store code wasn't that small. And the Orbitz Lisp code is about 200K lines. Lisp works fine for big projects. The Yahoo Store was eventually re-written in C++, but to do so they had to essentially re-implement a Lisp in C++.

      You don't mention the biggest reason he likes Lisp better than Java...it's more expressive. By which he means, you can do the same thing in fewer lines of code. There have been empirical studies showing that programmer productivity is basically constant with lines of code, so if you only have a third or a tenth as many lines, you get three or ten times as much accomplished. The researchers were surprised to find that even simple things like type declarations factor into that constant LOC-per-day...concise is productive.

      Of course, if someone else has already written the code you need, that's the best of all...Graham himself says libraries can trump language, if libraries exist to do what you need.

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

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

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

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

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

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

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

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

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

    5. Re:He likes Small Is Better, which isn't Java by aled · · Score: 1

      In large projects architects and designers have more importance that the programmers.

      --

      "I think this line is mostly filler"
    6. Re:He likes Small Is Better, which isn't Java by dbIII · · Score: 1
      (or at least languages that can be both interpreted and compiled like Lisp)
      There are however (formatting) problems with lisp using parenthesis for structure (paticularly when you get some nested (and I mean ( deeply ) nested) structures and have trouble keeping track of all of those parentheses) which can make it difficult to use (paticularly if the interpreter is buggy).
    7. Re:He likes Small Is Better, which isn't Java by civilizedINTENSITY · · Score: 1

      Actually one of the places that Lisp does well is *really* large projects. When complexity issues drown C++/Java, look to Lisp.

    8. Re:He likes Small Is Better, which isn't Java by SigmaEpsilonChi · · Score: 1
      From the HyperSpec:
      3.1 Evaluation

      Execution of code can be accomplished by a variety of means ranging from direct interpretation of a form representing a program to invocation of compiled code produced by a compiler.

      Evaluation is the process by which a program is executed in Common Lisp. The mechanism of evaluation is manifested both implicitly through the effect of the Lisp read-eval-print loop, and explicitly through the presence of the functions eval, compile, compile-file, and load. Any of these facilities might share the same execution strategy, or each might use a different one.

      The behavior of a conforming program processed by eval and by compile-file might differ; see Section 3.2.2.3 (Semantic Constraints).

      Evaluation can be understood in terms of a model in which an interpreter recursively traverses a form performing each step of the computation as it goes. This model, which describes the semantics of Common Lisp programs, is described in Section 3.1.2 (The Evaluation Model).



      evaluation n. a model whereby forms are executed, returning zero or more values. Such execution might be implemented directly in one step by an interpreter or in two steps by first compiling the form and then executing the compiled code; this choice is dependent both on context and the nature of the implementation, but in any case is not in general detectable by any program. The evaluation model is designed in such a way that a conforming implementation might legitimately have only a compiler and no interpreter, or vice versa. See Section 3.1.2 (The Evaluation Model).



      3.2.2.2 Minimal Compilation

      Minimal compilation is defined as follows:

      All compiler macro calls appearing in the source code being compiled are expanded, if at all, at compile time; they will not be expanded at run time.

      All macro and symbol macro calls appearing in the source code being compiled are expanded at compile time in such a way that they will not be expanded again at run time. macrolet and symbol-macrolet are effectively replaced by forms corresponding to their bodies in which calls to macros are replaced by their expansions.

      The first argument in a load-time-value form in source code processed by compile is evaluated at compile time; in source code processed by compile-file, the compiler arranges for it to be evaluated at load time. In either case, the result of the evaluation is remembered and used later as the value of the load-time-value form at execution time.
    9. Re:He likes Small Is Better, which isn't Java by SigmaEpsilonChi · · Score: 1

      Perhaps you can be less vague so that I can understand what you're claiming.

      I want to believe very badly that you're not suggesting that you don't have an editor capable of visually matching parentheses and that you are not implying that there is any common interpreter for which it is the case that it is unable to properly handle nested parentheses of arbitrary depth.

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

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

    11. Re:He likes Small Is Better, which isn't Java by dbIII · · Score: 1
      Perhaps you can be less vague so that I can understand what you're claiming.
      It's the old LISP joke (Lost In Stupid Parenthesis), and was vague because of all the ().
      you're not suggesting that you don't have an editor capable of visually matching parentheses
      Back when lisp was used more frequently there weren't any editors I was aware of that could do that. Perhaps emacs could at the time - but I suspect that was added later.
      interpreter for which it is the case that it is unable to properly handle nested parentheses of arbitrary depth
      Lisp was used for scripting in early versions of AutoCAD, and the interpreter was horribly buggy.
    12. Re:He likes Small Is Better, which isn't Java by SigmaEpsilonChi · · Score: 1

      Lisp editors have had parenthesis matching for decades.

    13. Re:He likes Small Is Better, which isn't Java by dbIII · · Score: 1
      Lisp editors have had parenthesis matching for decades.
      In the late 1980's on a Microsoft platform? Wrong - decades implies at least twenty years. History tells me there was something called a lisp machine and perhaps it had parenthesis matching, but I've never met anonyone that has seen one - and this is from someone that has seen an analogue computer in use.

      Lisp had similar problems to modula-2, nice structure but harder to do anything with it than with C or Fortran.

    14. Re:He likes Small Is Better, which isn't Java by SigmaEpsilonChi · · Score: 1

      Microemacs and Star Sapphire Emacs ran on DOS in the 1980s and you could perform parenthesis matching. I don't know why that seems surprising too you; syntax-aware editors are not new. I assume from the assiduity for your position that editors capable of matching parenthesis are somehow modern, and from your arrogant and obnoxiously ignorant commentary, that it seems surprising to you because you're an ignoramous with an over-inflated sense of historical insight.

      You should get that checked out.

    15. Re:He likes Small Is Better, which isn't Java by dbIII · · Score: 1
      syntax-aware editors are not new
      Sadly, mainstream ones are, and lisp is confusing without one - perhaps that's why you don't see a lot of it about.

      As for the rest - playing the man and not the ball is seen as poor form in soccer, and most certainly elsewhere in life. Get one.

    16. Re:He likes Small Is Better, which isn't Java by SigmaEpsilonChi · · Score: 1

      If you don't want people to point out that you're talking out of your rectum, perhaps you should cease doing it.

    17. Re:He likes Small Is Better, which isn't Java by Anonymous+Brave+Guy · · Score: 1
      When complexity issues drown C++/Java, look to Lisp.

      Really? I've worked on some pretty large projects in my time, and found the design and abstraction tools in the first languages you mention to be very helpful. What sorts of complexity issues did you have in mind, and how big is "really large"?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    18. Re:He likes Small Is Better, which isn't Java by Anonymous Coward · · Score: 0

      You are absolutely spot on about Graham here, and I dislike the chap a little (with a grudging respect), but here's an intersting case study:

      At Naughty Dog we used a LISP variant to write Jak & Daxter (I've left since but Jak II is the same). This was a compiled language, but we got the read-eval-print loop running anyway, so you can write code at the interpreter prompt in Emacs, have it compiled on the fly, passed to the PS2 dev kit, and linked. Then you can test the function at the prompt. You can also stop the program, check any state ... it's like the good old days of BASIC!!!

      So score 1 for Graham saying that interactive development is cool, but score -1 for saying that it requires an interpreted language. But certainly, interactive programming is not limited to low-speed domains like web services. Jak & Daxter was the single highest-performance game of its generation.

    19. Re:He likes Small Is Better, which isn't Java by Anonymous Coward · · Score: 0

      The problem with Java is that it isn't really particularly good at anything that would make people experienced with several other programming languages happy.

      In some senses, Java is the worst of both worlds - in terms of static vs. dynamic typing, it has all the inflexibility of (limited, C++-like) statically typed languages, with the lack of safety of dynamically typed languages - forcing you to perform type-narrowing casts that might fail if using the built-in collections (this was prior to "generics" in Java 1.5).

      Even with the recent improvements, the runtime checking overhead is there (unnecessarily!).

      For Lisp programmers (such as Graham), it also seems silly for Java to exclude first-class functions and methods (the closest thing to first-class closures is anonymous classes, which are considerably more verbose - for no good reason).

      Admittedly, one of the important designers of Java - Guy L. Steele - has considerable Lisp experience, but it looks a bit like he's trying to avoid Lispish things too badly, probably bitten by the nastiness of Common Lisp (which is pretty big and complex, but not because of the basic concepts).

      Personally, I like to look at Java in a perspective other languages - e.g. Java doesn't have first-class closures - C/C++ don't have garbage collection (but include first class functions/methods to the extent possible otherwise), what's Java's excuse?

    20. Re:He likes Small Is Better, which isn't Java by rplacd · · Score: 1

      You know, people used to deride Smalltalk for being big and slow. In my experience, Eclipse is bigger and slower than any Smalltalk environment I've used! It brings my work box (athlon xp 1800+, 256mb ram) to a crawl, something VisualWorks 7.2 doesn't do.

    21. Re:He likes Small Is Better, which isn't Java by rplacd · · Score: 1

      In the Unix world, "vi" is pretty mainstream. And in "vi" (which, incidentally, is what Paul Graham uses -- not emacs), you can get paren matching with :set showmatch.

    22. Re:He likes Small Is Better, which isn't Java by Anonymous Coward · · Score: 0

      Finally, some intelligent commentary on Slashdot!

  81. more libaries = bad? by ndunn · · Score: 1

    This is like the anti-argument. Not only does java come with a whole host of standard functions, including a gui, adding additional frameworks is easy, like C and java. The difference, I think, is that there simply a lot more of them for java.

    If you are upset about adding additional libraries to your code to extend its functionality without re-inventing the wheel you either:
    - never write code that has a significant amount of functionality
    - enjoy writing code for things that have already been implemented by better coder(s)

    There are a lot of reasons for writing in a scripting language, but I don't think you highlighted any of them. If you find using java confusing, then maybe you are using it for the wrong things.

  82. Fighting the "more is more" mentality by Anonymous Coward · · Score: 0

    I find Java zealots a very curious bunch, and theirs is a hard mentality to understand. The typical arguments from the Java crowd:

    * The libraries are great!

    So are the Perl, Python and Ruby libraries. In fact, if we were to base the quality of a language based on the available libraries, Perl would be the greatest language on Earth.

    * The libraries are second to none!

    And you know this because you looked? Or do you just parrot what Sun and other Java zealots have told you? I have yet to see someone point to a specific library and point out, "see, here Java's library is better than the Python equivalent because...".

    * The tools are great!

    I have two responses to this. First, since when do we base the quality of the language based on the surrounding toolset? Yes, they're nice to have, but they don't make the language. In fact, some folks have said that were it not for tools like Eclipse, Java would be unbearable. The fact that Java MUST have tools like this ought to be a BFC that something is wrong.

    Second, languages like Ruby and Python just don't need all these tools. Why? There are a variety of reasons for this, ranging from the already compact code (I've heard estimates of 1/3 to 1/10 the code base of the equivalent Java code from folks), to the fact these languages already have builtin shortcuts for certain features. Ruby, for example, has shortcut syntax for getters and setters.

    On a final point, there ARE some good tools for these languages, including Eclipse plugins, Komodo, ArachnoRuby, OpenPerlIDE, PerlBuilder. The list goes on.

    * Java scales!

    And Perl, Python and Ruby don't? Did you try to build an app in one of these languages and have it fall down? Or are you just towing the Sun Party Line?

    * Java is fast!

    No faster than C, and probably less so in most cases. When Python and Ruby programmers need speed, we resort to C extensions which are quite easy to do in these languages. You can do it in Perl as well, although XS is quite ugly.

    In addition, once GUI's, ORM's or Web Services get involved, the bottleneck is not the language, but the network/sql/database/whatever.

    * Struts! EJB!

    It's the "more is more" Java zealot mentality that lead to these sorts of monstrosities. It's the notion that good software must be big and complex for it to be good. Note to Java zealots - it just ain't so.

    The advent of projects like Spring and Hibernate, as well as the new features in Java 5, are a testament to the growing discontent among Java programmers who are fed up with overly complex layers of goo. Even these, however, are still more complex than their scripting language counterparts.

    * Cross platform!

    First, Perl/Python/Ruby are also cross platform. Second, in my experience, it is more likely that your application would be retired than, say, ported from a Windows box to a Unix box. The only advantage Java has here is in the GUI category. Even then, you can still make a cross-platform GUI with scripting languages, but it may require 3rd party libraries.

    * Structured exceptions!

    You mean the ones that Java couldn't get right until Java 1.4? Yeah, Ruby and Python have these.

    * Threads!

    You mean the ones that have been broken in various ways since Java 1.0? Yeah, Ruby (green) and Python (native) have threads.

    * (cough, sputter...) Corporate Backing!

    So what? It's a better language because Sun says so? Is C# a better language then because MS has a better stock price? Yes, I'm familiar with the arguments to open up Java.

    Frankly I hope they don't so that it will die quicker.

  83. Very poor reasoning by geophile · · Score: 1, Insightful

    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.

  84. This is related to the fewer CS majors story... by danielrm26 · · Score: 3, Insightful

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

    --
    dmiessler.com -- grep understanding knowledge
  85. I beg to differ by FudgePackinJesus · · Score: 1

    I'm not being condescending but you haven't read that much Graham, have you? In Paul's ideal world every problem worth solving would be solved with Lisp and the only other languages would be domain specific languages related to the specific application.

    He is, for lack of a better term at the moment, a Lisp whore.

    Mad props tho' for rep'in' brainfuck ;)

  86. Why does... by Anonymous Coward · · Score: 0

    ... every fucking Paul Graham article have to include generalizations about a 'friend' that 'knows everything'? That's such an awesome tactic, I can't believe I didn't think of it.

    Assert controversial subject .
    My friend who knows everything asserts , too.
    So must be true.

    The only thing that surprises me is that he's not using himself as a reference, as you would expect a typical big-headed academic like Graham. I guess that saves him from having to back his claims up, though.

    1. Re:Why does... by Anonymous Coward · · Score: 0

      I also love how 'plain old text' parses tags.

      Assert controversial subject 'a'.
      My friend who knows everything asserts 'a' too.
      So 'a' must be true.

  87. n00b question by Espectr0 · · Score: 1

    Why doesn't python let you overwrite a position of a string?


    >>> b="hola"
    >>> b[0]="y"
    Traceback (most recent call last):
    File "", line 1, in ?
    TypeError: object doesn't support item assignment

    1. Re:n00b question by Anonymous Coward · · Score: 0
      strings are "read only", constant objects (just like other built in data types such as float and ints). You need to perform an operation on that string, and reassign the result instead:

      b = 'y' + b[1:]

    2. Re:n00b question by pclminion · · Score: 1
      Because strings are immutable objects. Here's how to do what you want with slices:

      b = 'hola'
      b = 'y' + b[1:]

      In general, to replace the n'th char of a string (n=1 is the first char):

      str = str[:n-1] + char + str[n:]

    3. Re:n00b question by Anonymous Coward · · Score: 0

      Strings are constants. This allows you to do something like: a = b = c = "hola", and only one copy of the string needs to be made, rather than one for each of a, b and c.

      Another reason is that it can make it very fast to compare strings for equality if there is only one copy of any particular string floating around.

      Also, a very common use for strings is as dictionary keys. If you could modify a string you could change its hash value and all of a sudden it would be in the wrong place in all the dictionaries that use it as a key.

  88. Best tool for the job by foidulus · · Score: 1

    Guess what, you would be laughed at if you went into carpentry and claimed that your hammer was the best hammer for every single job. Same goes with programming languages, these, "but language x is clearly superior to language y, and here are some bs reasons I pulled out of my butt" statements are just plain dumb.
    There is no silver bullet in programming languages, every project has different situations/stipulations etc. I know I will get flamed for this, but sometimes if a VB app will work and you can get it out the door fast, use that. Same goes with apps witten in Java/perl/c/assembly whatever. Every situation is unique.
    Writing software is all about finding the best tool for the job. It seems people like the author tend to forget that.

  89. Eh. by ForsakenRegex · · Score: 1

    I learned Java 1.0* because I wanted to write a GUI app with no prior knowledge of such in any language. I read Sun's Java tutorial and wrote my first GUI with no books or training of any kind. I know that's no big deal, but I thought I'd explain why I learned Java. I much perfer Perl. When I write Perl, I feel like Cartman rolling in a pile of money. It makes me feel good just to write something in Perl, rather than some other language. That's not because I want to push Perl, it's because I just like writing Perl more than anything else. However, I write Java for a living. I do this because programming skill is language independent, and when I go looking for work I'm far more likely to find Java jobs than Perl jobs. I set out to learn Python just for the hell of it. I didn't have any visions of it ever being in widespread use. I just did it for fun, but I could not like the language. I don't like block-follows-indentation. I don't like 'else' statements on loops that get executed when you don't break out of the loop. So, when I saw these things (and others, but it's been years since then), I decided I should make a decision on whether to continue learning the language. I couldn't come up with a reason to use Python over Perl, Java, C, C++, or even PHP. So I stopped exploring Python. Nothing has happened since then to change my mind. This article certainly does not have that effect.

    --
    "A man talking sense to himself is no madder than a man talking nonsense not to himself."
  90. Language troubles by Animats · · Score: 1
    Oh, for something to program in. It's not like Python has stiff competition.
    • Perl is a mess, and Larry Wall likes it that way. Object-oriented Perl 5 is painful. Perl 6 is getting limited traction. The fact that you can't write an efficient XML/HTML parser in Perl without dropping into C reveals a basic problem.
    • Java started out OK, but is sinking under a morass of libraries that sort of work. Sun has an annoying tendency to rush a bad API to market half-implemented, maintain it badly, and then dump it. Java 3D comes to mind.
    • C++ is in deep trouble. The C++ committee has been taken over by template fanatics, who want ever more obscure features added to support compile-time programming. (Did you know you can misuse the template expander as a recursive rewrite rule engine and do arbitrary computations at compile time in C++? Do you care? Do you want to debug someone else's botched compile-time computation?) The C++ committee is completely unbothered by the lack of safety in C++, and there are no plans to tighten up the language in the next revision.
    • C is still around, and stable. There's something to be said for that.
    • C#. Resistance is futile; you will be assimilated.
    • Delphi. Good idea from a loser company.
    • LISP. Give it up. It's not coming back.
    • TCL. So awful, it's hard to believe a computer science prof created that.
    • Z, D, Occam, Eiffel, Prolog, etc: not happening.
    1. Re:Language troubles by fishbowl · · Score: 1

      "The fact that you can't write an efficient XML/HTML parser in Perl without dropping into C reveals a basic problem."

      I've wondered about this. It seems like Perl would be just the thing for something like SAX parsing against a stream of text. And while an XSLT processor will be an ugly thing in any language, it's surprising to hear that perl falls short of the capability.

      p.s., I do have to admit to liking C#, and I wish I could use Vis Studio to do pure Java.

      --
      -fb Everything not expressly forbidden is now mandatory.
    2. Re:Language troubles by Anonymous Coward · · Score: 0

      Python's competition is Ruby. One need only look as far as PEP 308 and PEP 318 to see why I prefer Ruby.

    3. Re:Language troubles by Fnord · · Score: 1

      Ok, people always say that OO perl is bad, or tacked on or something to that effect. I find that most of these people aren't exactly perl experts, and usually haven't bothered to learn OO perl.

      In reality, perl hashes are such a powerful concept that they almost become objects in themselves. Which is why OO perl is achieved by having a module named the same as your class, a hash to represent your object, and ONE keyword to make that hash an object. How many non-OO languages can become OO with the addition of a single keyword? With this comes inherritance, encapsulation, runtime binding, polymorphism and all the other things you expect from OO, in a fairly clean syntax.

      Ok so there's no data hiding. But that's just a matter of programmer disipline:)

    4. Re:Language troubles by vadim_t · · Score: 1

      It's pretty easy, you can't make anything perfect. You *can* do a XML parser in Perl, it just won't be as fast as in C, because ultimately Perl is interpreted.

      It's like when some time ago on this site somebody said Java could be faster than C due to JIT and all that. I replied that no way, Java could never be faster than an optimal implementation in machine code, and C is only a bit above it. S/he argued again that the magic of JIT could somehow make the code be faster at runtime.

      To this what I say is: If you really needed it, you could use C to write your own bytecode interpreter in it, with its own JIT, that would be faster than Java's because you could make it optimal for your application.

      The point of all this is: Any language that's somehow interpreted, even with a JIT and all that stuff, can never be faster than something clever enough written in assembler or C, because it's practically certain your interpreted language is coded in such a way that it makes your algorithm execute at least a bit slower than it could be if you spent enough time coding it with the underlying hardware in mind.

      When I use things like Perl is when I think that it's more important to get something done faster, than getting the ultimate efficiency from the code. Perl certainly lets you write clever regexps that will produce in one line a result that would require 200 lines of C. But, what you don't get is the ability of taking those 200 lines of C, and spending a few days profiling them, writing a version that takes advantage of MMX or the latest technology, etc.

    5. Re:Language troubles by mad.frog · · Score: 1

      Wow. You are my new friend.

      I totally agree. C++ is what I pretty much have to use for work, and it's pretty much the best of a bad lot.

      Of all the stuff you mention, C# is most appealing to me from a language design standpoint... if only I could use it without installing a 23 megabyte runtime package first, that is...

    6. Re:Language troubles by Anonymous Coward · · Score: 0
      Did you know you can misuse the template expander as a recursive rewrite rule engine and do arbitrary computations at compile time in C++? Do you care? Do you want to debug someone else's botched compile-time computation?

      The main problems I have with this "feature" are some ridiculous syntax and the 1000 varieties of implementation that seem to plague every newish C++ feature.

      I think it would be better to add any sort of compile time directives to the processor, but they added the feature to templates instead and I don't see that I am any more likely to have to debug botched template programming than botched macro programming.

      (Whether or not I'm likely to add 30% to my compile and link times is another matter altogether.)

    7. Re:Language troubles by Anonymous Coward · · Score: 0
      It's pretty easy, you can't make anything perfect. You *can* do a XML parser in Perl, it just won't be as fast as in C, because ultimately Perl is interpreted.

      It goes a bit beyond that because perl pokes its nose into the streams buffer that libc uses. A native perl XML parser would be beyond slow because it would suffer the costs of buffering and discarding for every operation. This applies unless it is an all in memory document, which only happens in projects that don't need XML in the first place.

    8. Re:Language troubles by random_static · · Score: 1
      It's like when some time ago on this site somebody said Java could be faster than C due to JIT and all that. I replied that no way, Java could never be faster than an optimal implementation in machine code, and C is only a bit above it.

      that's correct, but useless. it's useless because, for this to do you any good, you need to have an optimal implementation in machine code at hand. such beasts are very hard to even recognize, never mind write.

      your friend was at least potentially right, because JIT compiling (and other recompile-at-runtime schemes) all have access to more info than a static compiler does: the code to be compiled is running, so a lot of knowledge about what it's actually doing right then and how it's been dynamically behaving since started up is at hand. optimizations can be based on this that static compilers can't perform.

      consider byte-compiling at runtime from one processor's native machine code to another one's (Crusoe), or -- as a degenerate case -- to the same processor's machine code. HP have done a lot of research on this; their Dynamo project byte-compiles PA8000 code to PA8000 at run-time. the weird thing is that programs so interpreted occasionally run up to 20% faster than "native" machine code... because the system could micro-optimize the running program as it ran, focusing automatically on the pieces that needed optimization the most, and performing optimizations that no static compiler could do at all for lack of knowledge of how the code behaved dynamically.

      To this what I say is: If you really needed it, you could use C to write your own bytecode interpreter in it, with its own JIT, that would be faster than Java's because you could make it optimal for your application.

      yeah, you could. but Phil Greenspun would just shake his head at hearing of it and, perhaps, mildly pity you for your wasted effort. if you're going to go down that route, at least you could reimplement Common Lisp...

    9. Re:Language troubles by chromatic · · Score: 1
      You *can* do a XML parser in Perl, it just won't be as fast as in C, because ultimately Perl is interpreted.

      Yes and no. If Perl 5 had an optimizing JIT and could turn string tokenizing operations into machine code, I think it'd still be slower than a corresponding C application because of the overhead of working with strings in Perl versus an array of characters in C.

      Perl'd be a lot closer to C in that case, but C has a big win where it can increment a pointer and switch on the new value with very little overhead.

    10. Re:Language troubles by vadim_t · · Score: 1

      Well, to expand more on that, I just see JIT as a clever runtime optimization that the programmers could make themselves if they wanted, probably better. After all, JIT can't do magic.

      What I object to is when people say strange things like "Java is faster than C because JIT can optimize things at runtime that gcc can't". Well, IMHO one doesn't choose Java because of the speed, which at least in my experience (not trying to troll here). I seriously haven't seen a fast Java program, so if somebody can show me an example of a real Java application of a decent size that runs faster than I'd expect something equivalent to run in C without consuming gigabytes of RAM in the process, I'd love to see it.

      Sure JIT can be very clever, but if you want, you can fairly easily be even more clever. JIT won't turn bubble sort into quicksort, and by the way, I'm pretty sure it won't distinguish the interesting cases where bubble sort is actually *faster* than quicksort, because the data happens to be close to being the worst case for quicksort. Now, a clever programmer could fairly easily notice this possibility, code several sort algorithms, and make the program try use another if sorting starts taking too long.

      The description of what JIT does seems to go along the lines that it examines frequently executed code, and finds a way of optimizing it. Maybe it inlines a small function directly into the code that calls it, or changes the order of the options in a switch statements. But all those are quite unlikely to bring a very noticeable speed improvement, and if you needed it all that much you could just do that yourself, probably better.

    11. Re:Language troubles by Animats · · Score: 1
      You *can* do a XML parser in Perl, it just won't be as fast as in C, because ultimately Perl is interpreted.

      The interpreter isn't not the problem. It's that the operations you need, "get next character from string", "look up character class from character", and "fan out on character class", are all painful in Perl. Not for any good reason, either.

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

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

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

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

  92. Re:The way source code looks (Python) by Thinman · · Score: 1

    [do_something(x) for x in collection]

    (yeah List comprehensions rocks!)

  93. Depends on your problem by Anonymous Coward · · Score: 0
    Sometimes, you're working on new applications of things that have been done many times before. You don't want to reinvent the wheel. Libraries are more important than the language itself.

    Other times, you're doing something for which no library exists, because you're the first, or because you have some idea for doing it better than anyone has ever done before. Now the language itself is most important.

    Paul Graham wrote the Yahoo Store, one of the first web-based applications. He did it in Lisp, and crushed his competitors with his speed of development. He had a very expressive language, and nobody had libraries they could just plug in.

    Of course, Lisp is not exactly slouchy on libraries these days, though I still haven't found anything anywhere that matches Swing's text system.

  94. Python programmers write better Java by iabervon · · Score: 1

    I have to agree with what (he says) Google does: hire Python programmers for Java development jobs. Regardless of what language your project is in, you'll do better if you hire developers who are motivated to try out (and learn from) tools that they don't need for their job and who know a wide variety of ways code can be structured.

    On the other hand, I'm not impressed by Python. You can't apply any static reasoning to the code, because other code can dynamically change the code you're looking at. There's no way to determine if a variable is undeclared without actually running the program and getting to that line, because some other code could add it. Other code could even read a string from the user, and add a field with that name to an existing object. It's relatively hard to test Python code, because you have to exercise every line of code to find out if you have a simple typo.

    Java does a reasonably good job (and a better job in 5) of making code that couldn't be right not compile. Better programmers make fewer design errors, but they don't make any fewer typos, so the verification that Java provides is, if anything, more important to better programmers.

    It seems like most Java code is designed by bad designers and written by bad programmers, but that doesn't mean that Java is bad; it could be that a Python program is always more broken than an equivalent Java program, so only really good programmers can get Python programs to work at all.

    1. Re:Python programmers write better Java by hsoft · · Score: 1

      I don't use python, but my brother does. He told me that python was all about letting the programmer do *everything* he wants with the code he imports.

      Of course, that means that a programmer can easily, and *badly* mess with imported libraries. However, since we assume that good programmers use python, they will not actually mess with the libs. If the programmer is a bad one well... let's just wish he'll go back to VB.

      In fact, I particulary don't like that fact either (free-for-all with namespace, variable declarations/scope and all...), but I must say that the python language is quite graceful IMHO.

      --
      perception is reality
    2. Re:Python programmers write better Java by MikeBabcock · · Score: 1

      If you want your library to do what you want it to do, code it that way.

      If someone else messes with it to make it do the wrong thing, they either tried pretty hard and deserve what they got, or they know better than you and got what they wanted.

      --
      - Michael T. Babcock (Yes, I blog)
  95. Don't pick on Design Patterns by GoF! by lordpixel · · Score: 2, Informative

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

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

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

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

    --

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

    1. Re:Don't pick on Design Patterns by GoF! by jeroendekkers · · Score: 1

      It's actually funny that you say this in a thread which started with an essay from Paul Graham. On the bottom of his article "revenge of the nerds" (linked from "the python paradox"), there is this note:

      "Peter Norvig found that 16 of the 23 patterns in Design Patterns were "invisible or simpler" in Lisp."

      I wonder what a lisp book is worth. :-)

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

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

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

      --
      the growth in cynicism and rebellion has not been without cause
    3. Re:Don't pick on Design Patterns by GoF! by top_down · · Score: 1
      The Martelli paper isn't a very good example:

      The C++ implementation of his Borg pattern is simpler than the Python one. What can be simpler than making some variables static.

      The Singleton pattern itself is already very simple, that is why everybody and their dog is using it. The suggested Borg pattern has no advantages over it.

      The initialisation and sometimes destruction of a Singleton object can be highly problematic. Initialization on first use is often not acceptable. Martelli's Borg pattern offers no solution. He doesn't seem aware of the problem. Rule of the thumb: don't use Singletons for objects that need initialization.

      Dependecies of a class should preferable be specified in the interface of that class. This is not the case when you use a global variable, a Singleton or a Borg object. Therefore avoid use of all three if possible and instead just pass the initialized common object as an argument to the constructor.

      Please give us a better example of how dynamic languages don't need some of the patterns that static languages do (might very well be true).

      --
      Anyone who generalizes about slashdotters is a typical slashdotter.
    4. Re:Don't pick on Design Patterns by GoF! by HaveNoMouth · · Score: 1
      Please give us a better example of how dynamic languages don't need some of the patterns that static languages do (might very well be true).

      Peter Norvig, another Lisp guru, has written about this topic.

    5. Re:Don't pick on Design Patterns by GoF! by crazyphilman · · Score: 1

      No offense meant, I just picked that example because the "fat books" types generally count it as a must-have. Many people seem to use it more for its symbolic proof of their brilliance than for its content.

      --
      Farewell! It's been a fine buncha years!
  96. OT: Heads up by tmoertel · · Score: 1
    Looks like your home page is returning the Test Page for the Apache HTTP Server on Fedora Core. Might want to look into it.

    Cheers,
    Tom

  97. Obviously, he knows a LOT about Java ... by arhar · · Score: 4, Insightful

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

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

    Do I need to add more?

  98. Calling Python from Ruby by jesterzog · · Score: 1

    On-going from my previous reply, I should also point out for all those existing python programmers who are concerned they might miss a particular module that they really really need:

    ruby-python: Ruby/Python is a Ruby extension library to embed Python interpreter in Ruby. With this library, you can use the libraries written for Python in your Ruby scripts.

    I've never used it so can't comment on its effectiveness, but would be interested if anyone has any comments.

  99. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    some other languages regarded as 'obscure' because intelligence

    Like what, exactly? I'm curious as to what obscure languages you've used at a job.

  100. The Reality by kaffiene · · Score: 1

    The reality is that most good programmers like several different programming languges. Certainly the more ways of doing things that you're exposed to the better. The author could have ignored Python and avoided talking crap about Java and simply said that programmers that know several languages are better than those that know just one.

  101. I want my langauges COSHER by goon · · Score: 1
    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.

    I think a better way to put it is, "I want my languages COSHER and prefer Computer Science over Computer Secrecy", [Steve Mann, wearcam.org]. It doesn't necessarily mean someone is smarter but it might mean they think better.

    --
    peterrenshaw ~ Another Scrappy Startup
  102. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    Java is cool with me. Let the language meet the need

    Where is the need for Java? Maintain some previous Java? Java was a nice idea of a COBOL-like OO language (no, COBOL was certainly not OO, no matter how much crazies insist). A learning tool for OO, procedural programming maybe (though the original Smalltalk did the job great, Pascal was OK)...?

    To me it all boils down to reinventing the wheel. If I want a quick calculation done I'll use my calculator, or possibly a spreadsheet if my data is 2D and requirements simple - hey, I can write a macro (VBA:MSOffice/Javalike:OOo) too! If I want to do a major project collaborative project I'll probably end up doing it with VC++ (such as these projects dictate). If I want to do serious data analysis I may use C++, I may use Matlab or Mathematica, I may use a vast array of functional languages too. If I want to make a website I'll use HTML, hell... if I want to query a database I'll probably use SQL! In each of these cases the attributes of the need require a language to 'get the job done fast and well'. I am inable, and if this is a fault of my own please let me know, to find a function for which Java is the best tool for the job, if you know of any I insist you to post them here.

    My point? Comparing a language to Java is as pointless as TFA states. A language is meant for a job, and could perhaps be applied to others. Java is, IMHO, suitable for nothing which another language is/was superior at already - I believe this was the point of the article: we may have to lower our standards when working, but we can signal our standards by recognising what is better.

    Choice is a great thing. I chose to give up COBOL and BASIC years ago as soon as something else better became feasible for work, I pushed to use an alternative, and so did a heck of a lot of other people, and those languages became mainstream. Yet today we have people programming with VB, Java et. al., which are dominated (functionally) by other languages, yet they have their (market) dominance because they meet the lowest common denominator. This is what is so wrong with programming today. SQL and HTML are great examples of 'languages' (the relational model employed is rarely normalised limiting n-dimensional implementation of SQL, HTML can still be screwed by poor interpreters becomming mainstream), perhaps as their function is so specific the lowest common denominator applies less.

  103. An even subtler distinction by Anonymous Coward · · Score: 0

    I suspect you'd agree with me on this, and I think Paul Graham would as well. Python hackers are better Java hackers and Lisp hackers are better Python hackers.

    It has been ages since I've worked on a project in a single language. At this point, I'm very sceptical of anyone who does. There are things I do in C and wouldn't seriously try to do in Lisp or Python or Perl. But I turn those into tools that are callable from higher-level languages as components.

    1. Re:An even subtler distinction by Anonymous Coward · · Score: 0

      There are things I do in C and wouldn't seriously try to do in Lisp or Python or Perl.

      Just out of curiosity, can you give an example or two?

      There are things I wouldn't do in Python or Perl because of tight speed requirements, but you make it sound like it would be a difficult task to accomplish in those languages.

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

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

  105. Python popular with sysadmins by Anonymous Coward · · Score: 0

    Most of the people i know who use Python are sys admins and DBAs who use it for the same tasks that people use Perl.

    These people as a group are definitely not better programmers than the full-time Java programmers i know.

  106. Re:Python made my collegues start writing scripts. by frank_adrian314159 · · Score: 1
    We used to script most of our processes (digital chip design) with Perl. ... 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.

    Remember that a lot of early CAE system were written in Lisp. Look at tech reports from CMU, MIT, Stanford, and Berkley (or even DAC Proceedings) from the early 80's. You'll be surprised at the number of parentheses you see.

    This was another reason (besides DoD funded expert systems projects) why Lisp machines were viable at the time - they were needed to run graphically intense IC design systems. This history is the foundation of interchange formats like EDIF.

    --
    That is all.
  107. Maybe, but I'm not sure... by Paradox · · Score: 2, Informative

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

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

    --
    Slashdot. It's Not For Common Sense
    1. Re:Maybe, but I'm not sure... by kupci · · Score: 1
      However, it was big enough that Yahoo! had trouble reimplementing it in more conventional languages (and in the end, actually wrote a simple lisp interpreter to handle part of it).

      Ahh. The small print. And why did they need to "reimplement" it? I'm assuming they didn't use Lisp, nor Python. Funny that wasn't mentioned. Just curious.

  108. Whatever. Right tool for the job. by roman_mir · · Score: 1

    Today I finished writing proof of concept code that uses JVM to start a JFrame derived class, which has Canvas on it, which dynamically loads a dll (with JNI) that I wrote in C++ (this is for Windows in this release, next release for Unix with shared objects,) which uses JAWT dll to get hWnd and hDc of the Canvas, and initializes a device driver for a video input card that has a DVD player attached to it.

    Right now I am sitting in front of a Java application that uses a C++ module to run a video from a DVD player through a specialize industrial video input card.

  109. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    So please lets turn the tide starting at the edges - whenever one sees the opportunity to use an better alternative, lets do it and write up success stories.

    Personally, I have used perl, ruby, sh and erlang where massive weblogic/websphere overengineered Java crap would have been used if someone else had gotten control of that subproject instead of me (and only through the inefficencies of the Java ecosystem turned it into a full blown project with 6 developers and a need for 3 new machines).

    The upcoming SOA revolution will marginalize Java and creeping OO-ism but the problem is right now MS is the only one building a full multilanguage toolkit around it and doing it hand in hand with patentable XML sprinkled liberally throughout the system.

    Mark my words - MS is stealing the future of SOA before people wake up and realize that is what has happened.

  110. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    Mainstream languages, not that good, in widespread use:
    Basic (+ Variants)
    VB (utter crap)
    VBA (I have seen complex data analysis that was s.l.o.w. and entire complex databases interfaced through Excel VBA)
    Pascal/Delphi (see VB)
    Java (COBOL all over again)
    Algol/COBOL (yes this is still in mainstream use)
    Javascript (hmmmm, why)

    I believe these, aside from C/C++ (not included as they can be pretty good), make up the vast majority of applications. Just my experience from a business-world perspective).

    'Obscure' languages, which are pretty decent:
    Assembley (speeeeeeeeeeeeed)
    APL, K, J, etc (vectors, arrays, yeah!)
    Haskell (how recursive)
    Ruby (nice)
    Smalltalk (ideas which are still fresh and useful but poorly implemented by modern languages)
    Python (not that obscure these days)
    TCL/TK (pretty OK for strapping some things together in a GUI... certainly superior to VB, not least because it is very platform portable and doesn't miserably fail at OO)

    YOu can see, bar C (which was sculpted long ago and for which there was no alternative bar assembley) and C++ (C + OO concepts, similar 'quality' in design and people adopting), the successful languages are those of the lowest common denominator.

  111. Auto mechanics by avandesande · · Score: 1

    This is like saying that a mechanic that uses metric wrenches is a better mechanic than one who uses SAE....

    --
    love is just extroverted narcissism
  112. Kind of did by SuperKendall · · Score: 1

    I had to maintain a medium sized app written in jython. For a litle while I maintained it and made slight changes - but eventually I had to move it back into Java as it bugged me too much to work like that.

    It was actually a very well written app too, well commented and structured, easy to follow. So it really was all about python/jython for me!

    I really like the look of Groovy and it's different enough from Java that the sae kind of people going for Ruby, Python, and other languages might go for it if they have to do some work with Java.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  113. And you say you can read and think logically? by Anonymous Coward · · Score: 0

    He did not say "java programmers are dumb", "python is better than java" or "python programmers are smarter than java programmers", he said "python programmers are smart." This does not exclude java programmers from being smart, but the smart ones will actually read and understand the essay. As with many of Paul Graham's critics, you appear to be someone who thinks he is a member of the top 1 to 3 percent of programmers who are truely create but clearly are not as evidenced by your poor reading comprehension and sub-average critical thinking skills.

  114. Re: New language, new programming style by Anonymous Coward · · Score: 0

    I agree that big books are seldom good books but I think that ...

    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.

    ... doesn't apply for every Language. At least it requires a background in similar languages to make a small book suffice. Learning a different language isn't all about learning a different syntax.

    With my C, C++, Assembler, Pascal and a bit of Perl and Python background it took me quite some time to master Common Lisp. It's a different style of programming - but it's definitely worth knowing since it has a couple of features not available in the former languages that really give you much more power (despite it being even harder to learn due to a lot of newbie pitfalls). (Actually I'm now almost exclusively using CL, but that's another topic.)

  115. But I don't think it does by SuperKendall · · Score: 1

    I had to maintain a Jython app for a short time, and I've tried writing other things.

    Basically I dislike Python for whitespace indenting even more that Fortran77 which had a special "comment" column that meant something was commented out if a character was in that column. I only had a short brush with Fortran 77 in school but I would have gone insane without a special mode in Emacs to help keep you out of that column by accident.

    To me, it's just wrong to use a medium (whitespace) that is all about improving code readability, to also control code flow in any way. I find it to be imposing values about how to best visually present grouping that I might not always agree with, and thus I just can't get behind it.

    I like some of the language features quite a bit. It's mostly, as I said, the whitespace.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:But I don't think it does by qbwiz · · Score: 1

      I find it to be imposing values about how to best visually present grouping that I might not always agree with, and thus I just can't get behind it.

      I'm curious - how often do you see good code where the indentation is not connected to control-flow? Much of the (C, etc.) code I've looked at, you could use whitespace-based flow control, and the program would act the exact same way as with braces.

      --
      Ewige Blumenkraft.
    2. Re:But I don't think it does by sholden · · Score: 1

      Can you give an snippet of example code showing a style using whitespace to improve code readability that doesn't work in python?

      In an imperative language, since that's what python is...

  116. True... by SuperKendall · · Score: 1

    It's just that Groovy is what happens when you say "I'd really like a powerful modern scripting langauge that can take full advantage of VM features easily."

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  117. Flamebait!!! by adolfojp · · Score: 1

    And this article is not flamebait because?

  118. Bigotry by Anonymous Coward · · Score: 3, Interesting

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

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

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

    I say.. what about Smalltalk itself??

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

    Pragmatic reasons.. not purist ones.

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

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

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

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

  119. Re:haha (repeated less times due to lameness filte by antirename · · Score: 1

    I agree. I've been looking for a programmer, and one stood out because he listed Perl and Python on his resume. So I asked him how he had used those in the past, and how he got interested. The answer? "It's neat, and it just does what I want it to". He learned it ON HIS OWN. For his own personal use, on his own websites. Because the thought it was neat. Now, I'm not quite management, but that put his resume on top of the list. Unfortunately (for me) NASA hired him instead. See, the way I look at it if I'm interviewing someone (especially fresh out of college) I'm not looking for adaptability as much as I am willingness to learn. Those aren't the same thing; someone that knows three programming languages is good; someone how actually enjoys learning new things is a whole lot better. Being self-taught in anything technical that your college doesn't offer a course in is a big plus in my book. You have no idea how hard it is to find someone self-taught (even if they got the mindset from a four-year degree). Those people are rare. I'm just keeping my fingers crossed that I can find another.

  120. Op overloading by Anonymous+Brave+Guy · · Score: 1
    Why not write a function that takes the two args? This way a maintainer will not see a - b; and just pass on by, they will see something like subdate(a, b); with the next logical step for a maintainer obviously being to check the function subdate() see what it does, and what value it returns.

    Because the approach doesn't scale, that's why.

    To use an obvious example of sensible operator overloading, suppose I'm working with mathematical matrices and vectors, with the * and + operators overloaded in the usual mathematical sense of matrix multiplication and addition. A typical multiply-and-add on a vector x (as in M*x+y) could be written like this:

    Add(Multiply(M, x), y)

    Or it could be written as... oh, wait, I already showed you the version with operator overloading.

    There is no doubt in my mind -- as someone who uses mathematical concepts with overloaded operators in C++ all day -- that a judicious use of overloading can make for much more readable code than the unnatural, prefixified mess you get without it. Just don't overload operator^ to mean "to the power of", because that's not what that operator means in C++, and the precedence is wrong as a result; trying to force new meanings on operators (cout << "Ahem!") is when it all goes wrong. Otherwise, why not use the natural, obvious notation, and save functions for more specialised things that don't have ready-made natural notations, like Inv or Det in the matrix example?

    You can make a similar case for many uses of op-overloading in mathematical contexts, for container classes (using operator[] in C++), for pointer-style classes (using operator* and operator->), and so on. Used sparingly and in the right context, they make things much easier to read, and indeed decrease the learning curve as a result.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Op overloading by jcr · · Score: 1

      There is no doubt in my mind -- as someone who uses mathematical concepts with overloaded operators in C++ all day -- that a judicious use of overloading can make for much more readable code than the unnatural, prefixified mess you get without it,

      The keyword being "judicious", of course. Somebody should have slapped Stroustrup good and hard for overloading the left and right shift operators to be cute.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    2. Re:Op overloading by Anonymous+Brave+Guy · · Score: 1
      Somebody should have slapped Stroustrup good and hard for overloading the left and right shift operators to be cute.

      I don't know if it was originally his idea, but yes, the perp should indeed be slapped good and hard. However, they should be slapped mostly because the whole I/O streams structure that results codifies what should be data, and thus fundamentally inhibits portability where string translation matters. A stupid use of operator overloading, truly heinous crime that it may be, is not really on the same level.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    3. Re:Op overloading by dkf · · Score: 1
      There is no doubt in my mind -- as someone who uses mathematical concepts with overloaded operators in C++ all day -- that a judicious use of overloading can make for much more readable code than the unnatural, prefixified mess you get without it.

      As long as the basic semantics of the operators are maintained, overloading isn't too evil (being able to add and multiply additional numeric types is a good thing after all), but anything that does complete replacement of semantics is evil. Which is why the person who decided to allow operator= and the casting operators needs relocating to Shrub's Cuban Holiday Camp...

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    4. Re:Op overloading by Anonymous+Brave+Guy · · Score: 1

      While I certainly agree that maintaining the normal semantics of operators is very important, I'm not entirely sure I agree with your specific counterexamples here.

      Overloading assignment is probably a necessary evil in a language as flexible as C++, because in general it's not clear whether you should deep or shallow copy any data members. The meaning of assignment in C++ generally varies with the use of a class, and what assignment implies (if it's not simply a direct copy of a value type) really has to be described as part of a class's interface documentation. Of course, you can argue that other languages are better because they do not allow this level of complexity, and thus avoid the problem. Others would then argue that other languages are worse because they do not allow that level of flexibility, and thus miss the opportunities. And before anyone says it, yes, auto_ptr is frankly weird, and yes, its bizarre semantics are responsible for a few of the biggest screw-ups in C++.

      Much the same goes for casting operators. You can argue -- and I might well agree with you -- that implicit conversions are basically a Bad Thing, causing more trouble than they are worth. However, given that they exist in C++, you basically need casting operators and/or conversion constructors for much the same reasons that you need overloaded assignment.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  121. Re:Yea - Ah man! by bstarrfield · · Score: 3, Insightful

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

    Hope they don't read Slashdot...

    --
    /* Dang, I can't type that well. */
  122. RTFA before posting a story. OMG. by Wolfier · · Score: 1

    Neither of the article say "Python programmers being better hackers than Java programmers".

    They merely say, "Python hackers are smart, because they choose a language based on more than just money".

    On the SAME person, using what you like will make you do things smarter than using what you don't like.

    However, the same comparison is entirely pointless and illogical if it is made between two individuals. It is like saying,

    "I'm is a hobbyist car mechanics but you are JUST an airplane mechanics. Since you're doing it for money and I'm not, therefore I'm a smarter mechanic than you are".

    Geez.

  123. If She Weighs the Same as a Duck by Anonymous Coward · · Score: 1, Funny

    Then she's made of wood....

    ok, not quite a paradox, but a Python logicism nonetheless.

    "There, I've run circles round you, logically" - John Cleese, the penguin on the television sketch

  124. Mod Parent Up by mad.frog · · Score: 1

    Wish I still had mod points. Give me compile-time type checking and I'll be all over Python.

  125. Perl Programmers are better lovers by Anonymous Coward · · Score: 0

    TMTOWTDI - There's more than one way to do it.

    I'm waiting for ThinkGeek to come out with this T-Shirt. ;)

    1. Re:Perl Programmers are better lovers by Anonymous Coward · · Score: 0

      You sound like my ex boyfriend. He spent ages talking about how we were going to do it, what the options were, how long it would take.

      Things were invariably left unfinished.

      I'm with a mainframe guy now. How I love big iron.

  126. Give the choice, I'll go with... the obvious? by Anonymous+Brave+Guy · · Score: 1

    Ruby:

    collection.each {|x| do_something(x) }

    Thanks, but I'll take

    apply do_something collection

    or, if you prefer,

    foreach collection do_something

    It never ceases to amaze me when languages take something simple like applying a function to everything in a collection, and clutter it up with objects, blocks and/or iterators. What's more amazing is how many people think doing so is clever...

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  127. The editors suck. by DynamiteNeon · · Score: 1

    I'm referring to Python editors. Unless they've changed in the last few months since I last used them, compared to Eclipse, they're not worth much. It's a bit surprising to me considering how long Python's been around, too.

    I was recently working on two separate projects: one mainly in c++ and one mainly in Java. For part of my work, I scripted stuff in Python. You can definitely tell the difference when you're having to work with all of them side by side. I like Python for small projects, but, given the choice, I would rather stick to Java for anything larger just because a good ide like Eclipse makes my life easier.

    1. Re:The editors suck. by Antity-H · · Score: 1

      Pydev has made good progess. Lately I find it to be quite usable for real dev. Few things beat eclipse when it comes to being an IDE, but eclipse is modular, it can be an IDE for whatever you like.

    2. Re:The editors suck. by Anonymous Coward · · Score: 0

      It's not just the editors that suck, but also the dev. environments. If you're using Java in an IDE like Netbeans or Eclipse, you have access to all manner of tools that make managing projects _so_ easy:

      - Refactoring.
      - Code completion.
      - Code folding.
      - CVS integration.
      - Unit testing.
      - Ant build script generators.
      - Debugging for multi-threaded and distributed applications.
      - Loads and loads of other stuff.

      In other words, these IDEs are aimed at people who are writing and maintaining big, complex applications, and their toolsets reflect this. There is simply nothing in Python that offers the general level of maturity and power that these open source IDEs have (Boa Constructor etc. are filled with nice ideas, but large parts of them are still alpha releases, and have been for several years), and Python's commercial IDE offerings are also pretty pathetic when compared with commercial Java environments.

  128. Re:The correct definition of "paradox" by blargh3 · · Score: 1

    There is discussion among philosophers about what a paradox is, but the best definition I've heard is this: a paradox is an apparently valid argument with apparently true premises and obviously false conclusion.

    Since a valid argument is one such that it is logically impossible for the premises to be true and the conclusion false, this definition of "paradox" helps make it clear why they are puzzling. Each premise really does seem to be true; the argument really does seem to be valid; and the conclusion really does seem to be false.

    This definition also has the benefit of making clear the different ways you can attempt to "solve" the paradox: you can deny one of the premises; you can deny that the argument is valid; or you can accept that the conclusion is true. Of course, for the great paradoxes, none of these options is tolerable.

  129. Psyco by Peaker · · Score: 1

    Psyco speeds up some Python code to nearly the speed of the C counterpart, surpassing in some cases even statically-typed Java code.

  130. By Paul's logic... by cpu_fusion · · Score: 1

    ... I guess I'll have to make sure I'm not doing anything financially rewarding to make sure I'm "cool".

  131. Python will go the way of Perl by ajs · · Score: 4, Interesting

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

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

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

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

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

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

    1. Re:Python will go the way of Perl by SigmaEpsilonChi · · Score: 1

      What specifically do you mean by "dynamic conversion?"

    2. Re:Python will go the way of Perl by eff · · Score: 1

      That "1" + 1 ought to be 2, or at least 11.

    3. Re:Python will go the way of Perl by SigmaEpsilonChi · · Score: 1

      Do you have an intermediary layer for picking random accounts for posting, or do you select them from a list?

    4. Re:Python will go the way of Perl by SigmaEpsilonChi · · Score: 1

      Ah, I should have perused your comment history before being presumptuous; how lazy of me. I erroneously considered you a troll. I apologize.

      I think that there's nothing preventing subtypes from overloading operators and perpetuating that error-prone idiom. Expressing it as generally as "ultra-dynamic typing without dynamic conversion" was sort of disingenuous on his part, since it's really that he doesn't like that Python's int and long types don't have Perl's broken behavior for their numeric operators.

      His real complaint then would be that he cannot modify the slots of built-in types, it seems.

    5. Re:Python will go the way of Perl by SigmaEpsilonChi · · Score: 1

      On second thought, perhaps breaking the operators for subtypes of str and unicode would be easier for implementing that idiom. I had overlooked the necessity of a float subtype before, and two is better than three. Then there's probably some desire to have floats behave like integers and so forth. Who would really want to spread Perl's scalar ambiguity? Bad stuff.

    6. Re:Python will go the way of Perl by Anonymous Coward · · Score: 0

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

      In fact, one could argue that languages such as Python encourage the poor-quality Joe Blow programmers because they make it easier to slap something that works together with minimal programming knowledge. I've seen this sort of thing time and time again in 4GLs and various interpreted languages, where large bodies of code was written by people who didn't know enough to use a ten element array instead of ten named variables, or a loop for iteration instead of a goto with a conditional jump inside it.

      I've also seen a lot of dreadful stuff written in Java, C++, and others, but it doesn't even begin to approach the shite-level of the bad stuff in 4GLs, BASIC, and various scripting languages, quite simply because a certain level of knowledge is required to actually obtain a working program (even a trivial one) in C++, Java, etc.

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

      Programming languages do not make good or bad programmers, any more than having big boxes of expensive tools makes for better carpenters - in fact, some of the best examples of carpentry were produced with very rudimentary hand tools, just as some superb examples of programming predate the languages we're arging about here by decades.

      Thus, programming is pretty much like any other craft: good workmen will produce good work with any adequate tool that is available to them, while bad ones will produce shite, and then blame their tools for it.

    7. Re:Python will go the way of Perl by Anonymous Coward · · Score: 0

      I don't think all those bad programmers matter as much as what is considered "acceptable".

      Python is quickly becoming something that is indeed considered acceptable for real programming tasks (Perl never did to the same extent). This is a relief to those programmers who want to make use of features that are prevalent in languages like Python but not in commercial languages (Java - ick - or C/C++, which are too low-level for many tasks).

      I might very well be wrong, but I think that the people who are solving things in Python now have a better chance of success than those who are choosing languages for other reasons instead.

      Personally, I think I could've had much more success with less-known languages compared to Python, but Python was an excellent compromise because it allows me to embed a powerful embedded extension language in our products, without alienating most other people.

    8. Re:Python will go the way of Perl by ajs · · Score: 1

      Who would really want to spread Perl's scalar ambiguity?

      Perl has no scalar ambiguity; scalars are.

      Look, it was an off-hand comment about the language at the beginning of a rather long analysis of the reasons that popular languages become "bad languages" in the eyes of many.... let's not nit-pick ok?

    9. Re:Python will go the way of Perl by ajs · · Score: 1

      Python is quickly becoming something that is indeed considered acceptable for real programming tasks (Perl never did to the same extent).

      I disagree. Python is still in the same ghetto that Perl was always in. Those who take the time to learn it and understand it will use it for the tasks to which it's suited, but the mainstream (no, Paul Ghramm is NOT the mainstream) don't understand why anyone is wasting their time.

      The corporate world will never truly accept Python because there's no giant marketting machine like there is for Java and C#. Sadly, that matters.

    10. Re:Python will go the way of Perl by SigmaEpsilonChi · · Score: 1

      Perl scalars are disgusting.

      Your "analysis" was uninteresting; I merely wanted elaboration on what you meant by "dynamic conversion" since in any general sense dynamic conversion is unencumbered. Someone else reaffirmed what I expected you had meant. There is nothing preventing subtypes from having Perl-like behavior over various operators if the behavior was desired, but the behavior is stupid and who would want it other than someone that largely programs in Perl is beyond me.

      Your "point" in your "analysis" didn't interest me, whereas your pseudo-technical characterization did. Your social theory is uninteresting, and if I must burst your bubble, then let me be the first to point out that your five-year prediction about the future clarity comparisons of Python and language X are too late and that they are quite present now, and have been for several years. There are plenty of bad Python programmers, too. But you predicting the present and the obvious doesn't change that what you were implying was that Perl isn't really messy and doesn't encourage bad programming, and that it's just the ubiquitous bad programmer that adopted Perl that gave it its write-only reputation. Whatever! I know you're a Perl programmer, and I don't care, and your social theories as to why everyone except Perl programmers consider Perl a messy language don't interest me.

  132. Overdesign by Anonymous Coward · · Score: 0

    Overdesign is a problem that has appeared in the Java culture because a bunch of C++ programmers, previously concerned with language features are now free to meditate about design issues, unit tests, dev practices.

    All this thought about these more valuable issues has made many overdesign their solutions (hype hasn't helped either). That is why there is now a trend to a "simpler Java". (We learned from the PHP people .... which is many of us ourselves... that life doesn't always have to be so complex)

    OO encourages overdesign.. C++ never let us truly do OO because we were so stressed by the language features (don't believe me.. just look at any C++ forum, and you'll notice they are still trying to figure out how the language works)

    Java now lets us do OO, but we have little experience (our C++ experience was insufficient).. so we overdesign to compensate.

    Never underestimate the value of a highly experienced and hard nosed project lead.

  133. Syntactic Whitespace by gnovos · · Score: 1

    Seriously, syntactic whitespace! Damn you Python! Long live Ruby?

    --
    "Your superior intellect is no match for our puny weapons!"
  134. I disagree with both of you. by Estanislao+Mart�nez · · Score: 1
    The grandparent poster's statements imply that one shouldn't have to understand the language of the problem domain one is programming. I think this is just fundamentally wrong: programming close to the language of the problem domain is immensely important, because (a) that language is a tool closely tailored for thinking about that problem domain, and, usually equivalently, (b) it's the language in which the experts on the domain talk and think about it, which makes it easier to translate their knowledge into code, and for them to understand your code (or even write their own code).

    You, on the other hand, are making a different mistake: you're advocating that one treat the terms and syntax of a language as meaningless symbolic stuff. Strictly speaking, this implies that all symbolisms are equally good. In practice this isn't so-- "+" has a meaning in real world use that goes well beyond "invoke a function".

  135. So Do You Program in Java? by magnum3065 · · Score: 1

    Yes, operator overloading can lead to confusing code when used improperly, but it can lead to clearer code when used well.

    For a simple example, take the BigInteger class from Java. I think it's quite easy to see that it would make sense to write "bigInt1 - bigInt2" rather than "bigInt1.subtract(bigInt2)."

    Now look at "y = m * x + b" compared to "y = m.multiply(x).add(b)". This makes it even more clear how what should be a simple, easy to read statement becomes quite muddled by unnecessary verbiage.

    Of course I could define operators for situations in which their intention is quite unclear, but that's not the fault of the language.

    Operator overloading lets bad programmers write bad code, however without operator overloading all programmers are forced to write bad code.

    Of course I suppose that kind of supports Paul Graham's point. Java is a crippled language that eliminates some programmer pitfalls, thus catering to the lowest common denominator. However, languages like Python give good programmers the freedom to write a solution well suited to their problem.

    1. Re:So Do You Program in Java? by Retric · · Score: 1

      Here let's say you make a new abstract class Total Number that used 4 or more subclassses which would each convert to the others when needed so you can handle complex situations but not always carry the overhead of using complex numbers or realy large notation when dealing with smaller data set's.

      Type 1:
      NotComplex
      1 longint and 3 unsigned longint's
      Decimal offest stored as an int

      Type 2:
      Complex
      a real and a complex part each stored as:

      1 longint and 3 unsigned longint's
      Decimal offest stored as an int

      Type 3:
      NotComplex

      1 longint and as many unsigned longint's as neededz
      with a decimal offest stored as
      1 longint and as many unsigned longint's as neededz

      Type 4:
      Complex

      1 longint and as many unsigned longint's as neededz
      with a decimal offest stored as
      1 longint and as many unsigned longint's as neededz

      You now have a powerfull tool to solve complex computation needs but think about debugging:

      C = ((A *A) + (B *B)).root(2) if it's not working for large values of B.
      And even if it works using somthing like:
      AddExact()
      AddAproxWithRounding(,)
      could make reusing that old + notation code a little bit painfull.

    2. Re:So Do You Program in Java? by Anonymous+Brave+Guy · · Score: 1
      Here let's say you make a new abstract class Total Number that used 4 or more subclassses which would each convert to the others when needed [Emphasis added]

      That was your first mistake. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  136. Also check out groovy. by bwt · · Score: 1

    Groovy is heavily influenced by ruby - it supports the same kind of closures/iterators and strict "everythin is an object, damn it" mentallity. If you work in a java environment, groovy has some compelling points that make it superior to jython and jruby. Groovy does not introduce its own class libraries -- it is purely syntax and reuses the java libraries. It is normally interpreted, but can also be compiled. When it compiles, it compiles to pure bytecode which makes it literally indistinguishable from compiled java code.

    Finally, it adds one innovate syntax feature that I really like: in addition to syntax support for lists and hashes, it has syntax for representing heirarchical data structures and searching them (using closures). This makes tasks like dealing with XML or HTML effectively trivial.

  137. Severe reasoning problems by don.g · · Score: 1

    Well, that's not offensive, it's just silly. They were likely to be smart people before they learnt python.

    But I think labelling yourself as a "Java (or whatever) programmer" is also dangerous; it may lead people to assume that Java is all you know. And if that is the case, then you should learn a few more languages, if only to broaden your understanding of programming, and develop abstractions that aren't intimately tied to the functionality provided by one single language.

    Suggested "other languages": another OO language or too, one of the dynamic OO languages like python or perl or smalltalk, a declarative language - Prolog and/or Haskell, ...

    --
    Pretend that something especially witty is here. Thanks.
  138. Ruby is easier to program in for a lot of tasks by Estanislao+Mart�nez · · Score: 1
    It never ceases to amaze me that people go all gooey over Ruby, when exactly the same features are available in languages like OCaml - which also provides a native compiler that rivals C++ for speed, and the safety of static typechecking.

    I know Ruby very well, ML fairly well, and like them both, but Ruby is just usually easier to program in, at least in the short run. This is because of a combination of dynamicity, really good OOP, libraries that are easy to use and extend, and integration with the OS. (The last point would be the one to emphasize if you changed your question to "Why do so many people program in Ruby instead of Smalltalk"...)

    It's also a big factor that Ruby takes a lot of pretty advanced language features like coroutines and closures, and packages them up in a syntax that looks like imperative control structures.

  139. you can do more than that by Estanislao+Mart�nez · · Score: 1
    Basically, you're looping through the entire array/list/what have you. I believe you can even for it with a string, going through each character. All sorts of things implement an each method in Ruby, not just arrays and strings: IO objects (files, pipes, network sockets), for iterating over lines of input, and XML libraries (over elements).

    Also, there's many iteration methods defined generically on terms of each(), like each_with_index(), find(), find_all(), collect(), reject(), inject(), etc.

    You can also write your own iterators very easily: the other day I needed to convert a list of objects into a list of strings with their position in the list substituted into the string, so I wrote a map_with_index iterator, like this:

    module Enumerable
    def map_with_index
    result = []
    each_with_index { |elt, i| result << yield elt, i }
    return result
    end
    end

    # sample use
    ["foo", "foo", "foo"].map_with_index { |elt, i|
    "#{elt}#{i}"
    }
    # returns ["foo0", "foo1", "foo2"]
    Another generic iterator I once wrote is each_with_successor(), which iterates over pairs of an element and its successor in the collection (or file, or string, or XML element children, or whatever).
  140. The dumbest thing I've done... by Anonymous Coward · · Score: 1, Informative

    was to learn python. I used it in my previous job for rapid development (easy interfacing with C, clean code, etc etc) and it did the job. But in the end (looking for a new job) this python experience is pretty much useless... everybody wants .net / .com /.c++ experience and nobody's even heard of python... they thought I was taking the piss... probably would've had a better chance mentioning perl or php.

    Anyway, I hope it's not going to take me a year to learn c++ to the same level I can do python because there are better places I could think of statying in than my parent's basement...

  141. each_even, and more... by Estanislao+Mart�nez · · Score: 1

    module Enumerable
    def each_even
    each_with_index do |elt, i|
    yield elt if i % 2 == 0
    end
    end
    end

    # Hell, that was too easy. Let's have this instead:
    module Enumerable
    def each_modulo(n, polarity=true)
    each_with_index do |elt, i|
    yield elt if i % n == polarity
    end
    end

    def each_even
    each_modulo(2) { |elt| yield elt }
    end
    def each_odd
    each_modulo(2, false) { |elt| yield elt }
    end
    # and so on...
    end

    # now we can print all line of a file except for every seventh one:
    File.open("filename") do |file|
    file.each_modulo(7, false) do |line|
    print line
    end
    end
    </ecode>

  142. Lameness filter encountered - use fewer junk chars by Animats · · Score: 1

    I tried to post a Perl example to answer this, but Slashcode thinks Perl has too many junk characters.

  143. Corporate strong-typing preference by Tablizer · · Score: 1

    For some reason, corporations prefer strong-typed and compiled languages. Dynamically typed languages are often passed over even though many developers prefer them and are more productive under them.

    I think it is because it is perceived (real or not) that strong-typing herds the lazier programmers into doing the right thing.

    Corperations have always been that way. Even in the 60's, Fortran and Cobol were embraced while LISP was ignored.

    1. Re:Corporate strong-typing preference by Antity-H · · Score: 1

      Actually, python is a strong-typed language, it is also a dynamically typed language. Java is a strong-typed language but is statically typed.
      See there for the differences between strong/week typing and dynamic/static typing.
      http://en.wikipedia.org/wiki/Datatype or many more

      Additionnaly, C isn't a strong typed language (though it is compiled) yet many corporations still use C. I would say, most corporations prefer compiled language. I guess it kind of makes sense.
      In a compiled language, the result is pretty close to machine level language, thus reverse-engineering is often too costly to be worth it, allowing the company to keep its trade secrets.
      I will simply add that both java and python are compiled, yet python seems to be disregarded, maybe because most people don't know it is compiled too.
      The fact that it is compiled on the fly and that the interpreter is also the compiler may explain that misunderstanding.

  144. Huh! by Anonymous Coward · · Score: 0

    I misread your perfectly reasonable sig:
    "Never underestimate the value of a highly experienced and hard nosed project lead."

    as:

    Never underestimate the value of a high velocity hard nosed lead projectile.

    Those are just not interchangable.

    Obviously, I need a _lot_ more sleep, but unfortunately I'm an insomniac with a colicky baby.

  145. Re:Learning (Parent is a troll shill) by SigmaEpsilonChi · · Score: 1

    Ah, you almost had me before I looked at your comment history.

    I got as far as:

    Except that he did not learn the language because of some disdain for the tools with which he had been conducting himself; he learned the language as a requirement imposed upon him by his environment.


    I was going to include some sardonic comment about your reading-comprehension but then I decided to see if you were a regular troll or just an idiot.

    You can freely consider it a bite, since I've decided to reply anyway. Have fun.

  146. You're fooling yourself... by Anonymous Coward · · Score: 0

    Any program not written in the language of the problem effectively simulates the language of the problem. To maintain or even comprehend that code you'll at least understand the language of the problem...AND the encoding/simulation of that language in the actual code.

    Nothing's for free in understanding the code.

    However there *may* be an advantage to having the simulation explicit and in plain view everywhere because it isn't encapsulated in an overloaded operator, etc. But, clearly, that is a different sort of advantage (if it exists).

  147. Java is best suted for large buisnes apps by Retric · · Score: 1

    I am working with a real time system that needs:
    1) A web site for job entry and tracking
    2) A single simple interface for updating changing business data.
    3) A complex GUI for real time resource allocation and monitoring of job status.
    4) An EDI system for communicating with outside vender software
    5) A simple billing system for small clients and interfaces for more complex billing systems.
    6) A hand held interface for agents in the field
    7) Insane stability, and reliability
    8) The flexibility to change the system on a whim

    Why? When my customer agrees to pickup and deliver a package within 15 minuets of there customers call my system has to ensure that they can deliver. They also need to connect this information to all their clientele and be able to manage updates even though there not the brightest people in the world.

    Now try to create a system like that in C++ or hell a mix of 3 or more lanuages and watch what happens when a new customer says they love your system but they let there customers select pickup and delivery windows so can you change your website to handle that and o yea I guess that changes some dispatch a little and hmm maybe the handhelds as well. And when you start thinking of how much of the database your going to have to change and how much of the EDI and billing system need to be updated when suddenly they hand you the requirements for the "largest" client's EDI system and you realize they don't use Unicode.

    1. Re:Java is best suted for large buisnes apps by Anonymous Coward · · Score: 0

      Sounds like Python is perfect for the job then. You can always use Jython if you've got some java code already written.

    2. Re:Java is best suted for large buisnes apps by Anonymous Coward · · Score: 0

      What more than SQL and some webscript (ASP, PHP, Perl, lalala) do you need? This is all logistics, barely any programming that would require manipulation of data, calculation, etc.

  148. Obligatory whitespace joke .. by mrgsd · · Score: 1

    And for completeness, heres the equivalent in whitespace:

    --
    End Communication.
  149. Lets try VB.NET! by Anonymous Coward · · Score: 0

    (had to post this anomously to not get modded down for trolling :)

    Foreach item As MyItemClass In collection
    DoSomething(item)
    Next

    Personally, I'd prefer the Java syntax (or the VB snippet above) over Ruby. After working over a year with a strongly typed languages (Java and VB.NET) and trying PHP for change, I found myself missing the compiler errors if I try to do absurd things with my non-strictly typed $foobars.

    Sure its powerful to say

    $foo['bar'] = "Something";
    echo $foo['bar'];

    Instead of

    HashMap foo = new HashMap();
    foo.put("bar", "Something");
    System.out.println((String)foo.get( "bar"));

    But the truth is, if you didn't code it yourself, you won'be finding the bar from foo, so to say. And after the application gets big enough, you start missing those type definitions..

  150. Re:haha (repeated less times due to lameness filte by Retric · · Score: 1

    That's great until you end up with a system that uses Pascal, C, C++, Cold Fusion, JavaScript, and ORACLE stored procedures and you find yourself adding the same basic changes to multiple parts of the system and you start recoding the same function in 3 different languages because someone thought this or that language would be for this task. I agree that you use the right tool for the right job but try and avoid using several tool set's for the same problem. I have been cleaning this mess up with java for a while and while sometimes I want to write this or that in some other language sticking to one tends to save a lot of time in the long run. If for no other reason than the fact you use the same naming library's across several subsystems.

    PS: Look into Java it's like C# but without the Microsoft. Sorry people used to call it C++ without the C, and after what .Net did to VB I don't like the idea of sticking with a Microsoft language.

  151. Re:Pain sensation... by Anonymous Coward · · Score: 0
    >> 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.
    _Initially_ it may be the one brushing out of sheer joy. However, a friend of mine who has brushed his teeth after every meal (just becouse he hate feeling dog-mouthed) has now worn out the protective enamel layer. This is very painful and makes it hard to eat too hot or too cold.

    The risk to wear out your teeth has increased over the years since many toothpast manufacturers adds abrasive and call it whitening. Many dentists of today actually advices against brushing more that 2 times a day. (Eat regular instead!)

    Off-topic ok, just wanted to spread dental enlightenment
  152. Re:Python made my collegues start writing scripts. by SigmaEpsilonChi · · Score: 1
    If you have some history with languages with ALGOL roots, perhaps. It might also depend upon what one considers readable to mean.
    for x in range(n):
    pass
    It might be reasonable to expect that someone would understand that this iterates over an integral range of numbers (although from what starting point they might not know), but would it at all be obvious to them that it eagerly constructs a list of length n?
    def f(fn, n, xs = []):
    for i in range(n):
    xs.append(fn(i))
    return xs
    We might say that some random person that doesn't know Python might be able to determine that this defines a function that takes three arguments, one of which looks like it's a function, another that appears to be a numeric value used for creating an upper bound for iteration, and another that is meant to support some method named append. We might then say that they would be able to figure out that xs here has a default value (and as such is an optional parameter), and perhaps we'll cede that they have determined that the default value for the parameter is some empty array/list constructor. We'll then say that they can determine that this function iterates over a sequence of integers bounded by n, and appends to an optionally provided list the results of the application of the function fn to each integer within the sequence, and then returns the list as a result.
    def id(x):
    return x

    a = []
    b = f(id, 15, a)
    c = f(id, 2)
    d = f(id, 6, b)
    e = f(id, 5)
    Is the value of e going to be obvious to our hypothetical reader? That is, do we take for granted the clarity of the one-time evaluation of the default value for the xs parameter?
    a = [(x,y) for x in range(n) for y in range(n)]

    b = [x for x in range(n) if not x == 5 for y in range(n) if not y == x]
    Hmm. Is this going to be clear?

    I'm not certain that I really have much of a point, except that any reasonably high-level language probably appears simple, trivial, and readable by the people that already know and use it. If one has a certain background, or one has a sufficiently-defined meaning for what it means to be able to easily read code then meeting that criteria is perhaps harder or more difficult.

    I'm sure Smalltalk programmers would consider their language to be more easily understandable by a novice than Python, and I've seen plenty of posters on Usenet that believe that Ruby is more elegant blah blah than Python. You get the idea, I imagine.
  153. What he says may be true, but ... by chris_sawtell · · Score: 1

    REXX Rules. Understand that you snake.

  154. Let's take this a step further... by Anonymous Coward · · Score: 0

    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.

    Because people writing code in binary on the bare metal will certainly not land a job, they certainly must be better coders than these Python Hackers.

  155. Boycotting fat books by Anonymous Coward · · Score: 0

    There are some second and third rate publishers who are notorious for cellulose bloat that are easy enough to avoid. Maybe I'm just "old school" in wanting reference volumes that don't hog space in my briefcase, knapsack, or shelves. I've purchased quite a few Java books and almost none of them are the official Sun documentation despite my usual preference for the most authoritative sources. I wish that Sun Microsystems and Addison Wesley would consider using paper with half the thickness they have been using. Hint! Hint! Besides, this would save a few trees.

    Small well-written books will always rock!

  156. Re:haha (repeated less times due to lameness filte by Anonymous Coward · · Score: 0

    No. It was formalised in Common Lisp. Gregor Kizcales (sp?) designed the common lisp MOP before selling out and going to java.

  157. They're Just Languages by okimsrazor · · Score: 1

    C'mon folks, who really cares how many lines X can be accomplished with? Just get X to happen, in whatever is fastest for you, that can also be read and maintained by a large group of people.

    For me, that's Java, because I know it so well, and because that's the "standard" here. For others, the situation should drive the language. I also believe that the environment has more influence on the choice of language then does the problem/solution.

    Isn't the true sense of a hacker to accomplish the previously thought impossible with what we have today? I think bringing tools, languages and such from outside the environment is a bit like cheating.

  158. No.....Octave is like an open source Matlab... by StressGuy · · Score: 1

    ...at least very similar to the vesion I "cut my teeth" on. While Python is very useful for numerical applications, it isn't ready to replace Octave just yet.

    My current Python project is a program that evaluates repairs and/or holes in aircraft skin (say, you need to cut a hole for an antenna cable). It includes a rudimentary CAD engine for drawing up the repair. Apparantly Tcl was originally intended for drafting programs (or so I've been told). In any event, can't really do that in Octave. So, in this case, Python is well suited to the task.

    The real cool thing is that I can mail the source to my home e-mail account and fire it up on my Linux box. The only thing I needed to do was specify font sized based upon which OS it runs on. When, I get to the printer calls, I'll need to do something similar, but writing code that works on both systems is pretty darned easy by-and-large.

    --
    A goal is a dream with a deadline
  159. Language is but one part of the puzzle by Stu+Charlton · · Score: 1

    I'm not quite sure what to make of this. Sometimes I think he's just promoting that developers learn more than one programming language. I can dig that. I don't agree with equating intelligence with choice of programming language. Things are harder than that, particularly in a large company.

    In a general sense, there has been a long debate about whether language influences thought, or if all languages are independent of thought. In oral human languages, Steven Pinker would argue that language is an instinct, and doesn't influence thought -- it evolves from thought.

    In computer languages, however, you're not just communicating. You're representing. Also note that computer languages are written langauges, not oral languages. Harold Innis and Marshal McLuhan have both shown that written languages do influence thought, particularly the western phonetic alphabet leading to a paritcular societal pattern vs. eastern pictographic languages.

    Turning to computer languages, one could argue that if you've only been exposed to one way of "representing" a thought, say with Visual Basic 6 - you are limited in the boundaries you set up in your own mind about what's possible. Ideas like dynamic dispatch, inheritance, etc. are all foreign, unless you've been exposed to them in another language.

    Or, on the other hand, you may be using a language like C with very few boundaries, but this doesn't help either -- there's a lot of freedom there, and not a lot of guidance about how to use it properly. I always find it interesting when C programmers defend their choice and suggest "but, you can do object oriented programming in C!". Well, of course you can! But it required another language, Simula, followed by Smalltalk, to generate the discipline and ideas around what object oriented programming really was. Could that paradigm have evolved without another language to naturally support it? It's possible, but somewhat unlikely.

    Any Turing complete language could implement a programming paradigm, it's just a matter if it's natural to the language's constructs or if it requires more elaborate structures. For example, if anyone has programmed Microsoft's COM realizes that the underlying concepts are relatively simple, but the elaborate syntax for achieving it in C++ (prior to ATL especially) is ridiculous. In this light, .NET really is about bringing the level of language up to and beyond the semantics that Microsoft technologists already had with COM.

    Nevertheless, there's still a practical problem with modern dynamic languages. The world has a legacy, and that legacy is large, chaotic, crufty, and not very dynamic. Getting a handle on it requires simplification, constraints, and classifications for the kinds of languages, tools, techniques, and platforms for the future. This is the main reason why languages like COBOL, C++, or Java stick around: we have to stick to something for a few years to simplify the system dynamics in the large. Picking "one standard" or "one vendor" is a key way of ensuring quality - by constraining and simplifying the business environment.

    Java is clearly not a "thought leading" language like Python or Ruby , or even older languages like Lisp or Smalltalk. But that's not what it was supposed to be. Java was an "action provoking" language that took a very large C and C++ legacy of systems, skills, and mindsets, and pushed them forward an inch.

    A lot of independent technical people may not agree with "constrainting" the environment, because it limits innovation. Modern dynamic lanaguages make life so much simpler for the programmer. And I agree they do. But there are levels of simplicity -- and organizational simplicty in the large often trumps simplicity in the small. We'll get there eventually, but it will take a while. Most enlightened organizations will have an emerging technology lab to bri

    --
    -Stu
  160. That's not a source by dash2 · · Score: 1

    The link you posted quotes text from a book, which is the same as the OP's quote. But there isn't a source for the actual (?) academic research.

    1. Re:That's not a source by kjd · · Score: 1

      I said it cites a source for the text (which itself could potentially contain its source, etc...). My post was mostly to indicate that if in a few seconds I could find relevant information on Google, so could he.

  161. One in 15 become millionaires? Unlikely by brlewis · · Score: 1

    Even given a primary source, I'd find the claim highly questionable. One in 15 business school majors becoming millionaires seems unlikely, especially in 1980 dollars. If this really happened at some super successful business school, it would be worth naming the particular school. This smells an awful lot like a snake-oil vendor dangling false visions of wealth in front of people.

  162. COMPLEATLY unreadable Lisp by brlewis · · Score: 1
    Confusing, isn't it? Take Scheme, for instance.
    (for-each do-something x)
    I keep looking and looking, but I can't figure out what that code is doing!!!
  163. Read my !!&^@% followups!! by SuperKendall · · Score: 1

    Yes I HAVE tried it. I've even maintained some stuff in it. That's why I REALLY HATE it, because I had to work with it. Otherwise I'd probably just have a mild dislike.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  164. Amen Brother by hotspotbloc · · Score: 1
    There's a mindset in corporate/professional comp sci I like to call "fat book syndrome".

    The best computer book I've ever had (and it still sits less than a foot away) is K&R's "The C Programming Langauge". 272 pages (small by today's standards) of pure gold. No wasted pages here. IMO the best "my first C book" ever written. Now if some publishers would listen to your sage advice.

    Don't judge a book by it's cover? Don't judge a book by it's weight.

    --
    "I hate to advocate drugs, alcohol, violence or insanity but they've always worked for me" - HST
    1. Re:Amen Brother by sparrow_hawk · · Score: 1

      I'll second (third?) that -- my copy of K&R almost single-handedly taught me C, and it, like yours, sits within arm's reach. As the authors say in the preface, "We have tried to retain the brevity of the first edition. C is not a big language, and it is not well served by a big book." Truer words...

      It isn't the be-all and end-all, of course -- I've supplemented my education with a few online tutorials, chatting with people who are more familiar with C, and reading the copious amounts of open source code available. I've never found those "tutorial" books to be worth the money, because I don't have the patience to work through all their stupid examples. Even with K&R I jumped around a lot, pulling it out as needed when I ran into a problem on my own projects. It hasn't made me a super-coder, but it has sure saved my butt a couple of times. When I buy computer books, I'm looking for utility as a *reference*, not shelf-space filler.

    2. Re:Amen Brother by crazyphilman · · Score: 1

      And, with K&R, you're getting it right from the source, so that's cool too. 272 pages isn't bad; that's a nice size, comfortable to keep around while you code.

      --
      Farewell! It's been a fine buncha years!
  165. Re:One in 15 become millionaires? Unlikely by Scaba · · Score: 1

    The quote doesn't imply a single school. It says 1500 business school students. There could be between one and 1500 business schools in question here.

  166. Re:One in 15 become millionaires? Unlikely by brlewis · · Score: 1

    I noticed it doesn't necessarily imply a single school. In no way does my guess that the story is false hinge on there being only one school. In fact, I only mentioned the one-school scenario as the case that would require the least stretching to make this far-fetched tale believable. The closer you get to 1500 business schools, the more certain you can be that the story is a lie.

  167. Matrix multiply by sleepingsquirrel · · Score: 1

    I'll completely agree if you make sure that I get a compiler error when I try to do x*M instead of M*x (i.e. matrix multiplication isn't commutative).

  168. Aspects, Java, Metaprogramming by Anonymous Coward · · Score: 0

    Of course, aspects are no macros. Nor they are stupid. But they are no important advance in CS - indeed, the AOP is just a fashionable buzz-acronym. Because you can do AOP in Java, using reflection for that so-called "metaprogramming". There is a drawback, however: one must be quite a hacker to understand it.

  169. Previous anecdote by Anonymous Coward · · Score: 0

    This seems to confirm the PG article:

    http://slashdot.org/comments.pl?sid=101530&cid=866 3091

  170. Python is good because no-one will pay ... by JavaIsCool · · Score: 1

    Yes ... and that is why the Red Sox are the better baseball players over the Yankees. They play for a team that doesn't win! Brilliant! IMHO the hacker is in the person, not the language.

  171. Python is the Silver Bullet? [was Lisp] by kupci · · Score: 1
    And I was new to patterns and was likely not communicating my questions as clearly as one could.

    Then maybe that's why you're confusing simple programming, i.e. skipping patterns (whether in Python, Java, C++) or whatever, vs. programming using patterns to build reliable, robust, maintainable, modifiable, extendable applications.

    Let's take MVC (Model-View-Controller). I could write on large simple script in PHP, Python, Perl what have you, quick and simple, gets the job done, I saved some time etc etc. But as you build on it, that solution quickly falls apart, hence the MVC and other time-tested patterns.

    I just read about a new CRM based on PHP and MySQL. They emphasize "Fast fast fast" on their website. They don't have any documentation on their architecture, but I'm betting it's 'fast' because they hit the db directly from their web scripts.

    Here's an interesting discussions on patterns. Paul Graham seems to be arguing that there is a silver bullet. I remember this guy, he used to say Lisp was the silver bullet. Now I guess he's saying Python is.

  172. SQL Server stored procedures! by kupci · · Score: 1
    Figures. Originally I read his article about the greatness of Lisp a while back, seems interesting, but now that he's yammering about Python being the "new, new thing" I've realized the gent is a bit of a kook.

    First of all, some of the best programmers I know work magic in _whatever_ language they program in. One guy, who used to write operating system code for a phone company (in Forth I believe), wrote a simple messaging server using SQL Server stored procedures (when the management said we couldn't buy a real messaging system like MQSeries). Now that's what I call a cool hack.

    Paul Graham's statement reminds me of a friend's kid brother saying why he didn't want to eat his spinach. But Mom, real surfers don't eat vegetables. By the same token, real programmers don't program anything but Python either!

  173. RE:sig (the stars my destination) by Mycroft_VIII · · Score: 1

    re your sig, that was a good book, can't remember the authors name though. Have to dig it out of storage and re-read it sometime. There was also a short story version of it in some anthology or other.

    Mycroft

    --
    https://signup.leagueoflegends.com/?ref=4c3ed6600b6ea
  174. Blessed comma by Anonymous Coward · · Score: 0

    blah($_), blahblah($_) for @x;

    Of course, with the comma being recommissioned for Perl 6, who knows where that idiom will go.

    aQazaQa

  175. Political reasons... by Paradox · · Score: 1

    From all reports, a PHB wanted Yahoo! Stores based in a language that was more mainstream. Yahoo! sunk a lot of money into trying to redo what PG's group did. And in the end they lost several features and had to write a bare-bones lisp interpreter in Java to get only about 1/2 of the html generation and templating functionality.

    What was cheaper? Hire two (relatively expensive) Lisp hackers to maintain and upgrade the project, or sick whole teams of wage-slave-class developers to literally downgrade the product.

    From reports, they even reimplemented the C code for image generation and the perl glue code. It must have been like watching lemmings march off a cliff. Lemmings with huge wallets.

    The economics calculations that go on in these people's minds boggles me. It really does.

    --
    Slashdot. It's Not For Common Sense
  176. Ideal languages by Anonymous+Brave+Guy · · Score: 1

    Interesting combination... As you say, it sounds pretty close to today's Java.

    C/C++/Java like syntax with curly braces, semicolons and etc (I like the rigid nature of it, I feel it's more unambiguous than more open syntaxes);

    This is one of those issues that I think polarizes people's opinions, and although semantics matter more than just about anything in a language, I certainly disagree with those who say syntax doesn't matter. Personally, although I work with languages like C++ and Perl all day, I do find the curly braces, semicolons and (in particular) parentheses for function calls overweight at times.

    I'm quite a fan of functional programming. I wouldn't want to use a purely functional language for most real projects, but I miss serious tools for manipulating functions in languages like C++. When you're dealing with that level of flexibility, I find the parentheses can build up uncomfortably in a language like C++: it becomes almost LISP-like, and while the latter has a certain elegance in its design, I think people who dislike all the )))))s have a good point.

    I guess I prefer a relatively clean and punctuation-free syntax by default, but where you can easily add () pairs to disambiguate. I'm undecided about Python's characteristic use of whitespace to block code, perhaps because the rigid nature doesn't fit with my hypothetical style where both functions and types are built fairly freely, but in a naturally block-structured language (such as Python is) I think it also has that certain practical and elegant quality.

    Java style OOP, where everything is a class;

    I guess we just disagree on that one. In my world, not everything is an object; something like Java's approach is great for certain features with types, and does impose a useful structure that's good for maintainability by Joe Average, but it severely limits what good guys can do -- I want both powerful types and powerful functions, not something one-sided.

    I totally agree with your other points: I think any serious contender for my "New Language of the Year" award is going to need a very tight, very flexible standard library, backed by something like CPAN so all those features that 10% of the users want have a home, and community effort can be focussed on producing a small number of top quality libraries rather than a wide range of mediocre ones (which is what, IMHO, Java's standard library has become).

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Ideal languages by crazyphilman · · Score: 1

      I find strict object-orientation very comforting. It makes building a very large project from very small pieces much, much easier. Also, there's the reusability, the ease of maintenance... It's kinda neat in my view. I don't think it really limits you all that much. Although, there is an art to it. I've seen object designs by good and bad programmers, and the bad ones reeeeeeeeallly know how to hang themselves... ;)

      --
      Farewell! It's been a fine buncha years!
  177. wrong analogy by aleax · · Score: 1

    The claim that "being forced to use a language" to write a certain application "is like someone telling someone when they build a house that they have to use this screwdriver and only this" is a badly flawed analogy. The language an application is coded in is rather like the material a house is built with -- wood versus brick versus prestressed concrete etc; the material/language will remain with the house/application and define for example its maintenance needs for a long time after the builder/programmer has been paid and gone on to other tasks for other customers. It is therefore quite reasonable for the customer to care about this kind of technical issue! You as a professional may agree or disagree with the customer's preferences, but it's unprofessional to belittle the customer for caring about this kind of choice.

    The proper analogy to a silly customer specifying that you must use a screwdriver rather than another, would be one telling you which text editor you must use to edit the program's source code. _THAT_ would be pretty ridiculous (as long as you're procuring your own tools -- if the customer is the one that has to supply your tools, the situation is, again, different)...

    --
    Alex