Slashdot Mirror


Django: Python's Rapid Web Development Framework

ucahg writes "Simon Willison has a post on his blog introducing Django, a rapid web development framework he and his colleagues are releasing into the wild. Hailed as Python's own version of a Rails framework, Django looks very promising. I'll be keeping a close eye on it as it gets more and more support..."

75 comments

  1. What's old is new again by Yohahn · · Score: 1

    Ok, and perl has catalyst coming. Now everybodies pet languages have their own rapid development web platform. Can we move on now?

  2. for the grammer nazi's by Anonymous Coward · · Score: 0

    I forgot to preview.

    Okay, and Perl has Catalyst coming. Now everybody's pet language has it's own rapid development platform. Can we move on now?

    1. Re:for the grammer nazi's by Profane+MuthaFucka · · Score: 0, Offtopic

      Apostrophes are used to indicate possession or contraction, not a plural form. When you want to make a plural form of a noun, you generally tack an 's' onto the end. There are some exceptions, such as 'mice' or 'sheep'. You should be aware of those.

      Thus, the plural of 'Nazi' is 'Nazis.' It's also a proper noun, so it's capitalized.

      I'm not a grammar Nazi; I like to call myself a grammar motherfucker.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    2. Re:for the grammer nazi's by Anonymous Coward · · Score: 0

      Apostrophes are used to indicate possession or contraction

      And possessive "its" has no apostrophe, in the same way you don't write "hi's" and "her's" (another mistake the OP made).

    3. Re:for the grammer nazi's by Anonymous Coward · · Score: 0

      Sorry.. you're both correct. The wife was rushing me. It's Ironic, considering she is a grammer nazi. Anyway.. it's my mistake. My comment cannot fix its problems.

      Until next time, gammer nazis.

    4. Re:for the grammer nazi's by cyb3r0ptx · · Score: 1

      Gah! It's grammar, not grammer!

      Reminds me of a Post-It I saw on a co-worker's desk: "Remember to check spelling and grammer."

    5. Re:for the grammer nazi's by Anonymous Coward · · Score: 0

      This is because "Grammar" is one of those "Exceptions"... you know... one of those words that don't follow the "Norm", just for the hell of it. Can you blame people for spelling it as "Grammer" when we have:

      hummer (bummer, summer, etc...)

      taller (caller, faller, holler, etc...)

      runner
      ... and so on.

      You know, the whole GRAMMER nazi thing would mean more if you were to single out the COMPLETE retards (EX: "I wuz lookin 4 U"). Instead, you simply want to be a dick.

      Congratulations. You win.

    6. Re:for the grammer nazi's by Yohahn · · Score: 1

      I never challenge the spelling nazi's. There, I simply admit defeat.

      That said, how do you pronounce "grammar"? My spelling "mistake" (languages evolve, right?) is due to my spelling it as I say it.

      Anyway, either I spelled it wrong, or I was referring to nazis from grammer, IN.

    7. Re:for the grammer nazi's by Anonymous Coward · · Score: 0

      I'm not a grammar Nazi; I like to call myself a grammar motherfucker.

      hahahahaha, you win

    8. Re:for the grammer nazi's by Anonymous Coward · · Score: 0

      "This is because "Grammar" is one of those "Exceptions"..."

      Yeah, sure... but exception to what?

      Grammar is a noun where the suffix neither means occupation (like in caller -the one who calls) nor comparation (like in tall-er, and even then, it should be an adjective, not a noun).

      So, it is not expected to be spelled one way or the other. Grammar from latin Gramatica.

      "You know, the whole GRAMMER nazi thing..."

      must be about a nazi who GRAMS (whatever it is).

    9. Re:for the grammer nazi's by lachlan76 · · Score: 1

      It's pronounced gramm-ah, at least in Australia :)

  3. *shakes head* by Anonymous Coward · · Score: 2, Insightful

    Okay, great.

    Now when people talk about Rails you can say "ha ha, I'm better, I use DJANGO!" Or Subway, Maypole, Catalyst, Cake, or Trax, or whatever.

    I've tried about half of those and none are *quite* as smooth as Rails. Anything in Perl or PHP is right out. Perl can do everything Ruby can, but with syntax that makes you want to poke your eyes out. PHP is a joke and can be dismissed without further discussion. Python is more verbose than Ruby, doesn't allow the same metaprogramming (closed classes! no anonymous functions!), doesn't allow you to use Python in the HTML templates, because Python is white-space dependent (okay, some people disagree about that last one, but I personally think the same language should be used in the templates).

    Is Rails perfect? Hells to the no, Ruby is about as fast as a constipated 80-year old, and doesn't support Unicode, but if you want to talk ease of programming, Ruby is at the top IMO. Except maybe for maybe lisp or smalltalk but Ruby is a lot more pragmatic.

    I don't mind people reinventing the wheel over and over again but whenever you see people saying "Language X's answer to Rails" all the time, you gotta be thinking to yourself, wow, maybe I should try Rails FIRST and then try the knock-offs. Don't be afraid of Ruby!

    1. Re:*shakes head* by jamminpotato · · Score: 1

      if i remember correctly (i think i do at least) python has the 'lambda' function which can be used anonomously?

    2. Re:*shakes head* by Anonymous Coward · · Score: 0

      > if i remember correctly (i think i do at least) python has the 'lambda' function which can be used anonomously?

      Python's lambda sucks. Immensely. Even Guido thinks it sucks.

    3. Re:*shakes head* by Webmonger · · Score: 1

      So you would agree that Python has anonymous functions, then? See, I don't care what the argument is, if it's based on statements that are obviously wrong, I usually dismiss it.

    4. Re:*shakes head* by Fess_Longhair · · Score: 2, Interesting
      Python ... doesn't allow you to use Python in the HTML templates, because Python is white-space dependent (okay, some people disagree about that last one, but I personally think the same language should be used in the templates).

      Me too. That's why I use spyce.

    5. Re:*shakes head* by Unordained · · Score: 1

      Indeed. But LISP'ers will be quick to remind you it's nothing to be proud of, they've had it forever by accident.

    6. Re:*shakes head* by Anonymous Coward · · Score: 0

      In what way is Lisp not pragmatic?

    7. Re:*shakes head* by Anonymous Coward · · Score: 0

      Um, no. Eval was the accident. Lispers have had lambda forever on purpose.

    8. Re:*shakes head* by Scarblac · · Score: 1

      So you would agree that Python has anonymous functions, then?

      Well, in the strictest meaning of function, then yes. Lambdas don't contain a block of code to executed (like in named functions), they can only contain an expression to evaluate. Python is sufficiently functional programmingish to make that somewhat valuable, but anonymous functions aren't the same things as named functions.

      --
      I believe posters are recognized by their sig. So I made one.
    9. Re:*shakes head* by sethadam1 · · Score: 1

      Anything in Perl or PHP is right out.

      Yeah, because that would be way too mainstream. Explain to me why every article has to have some holier than thou asshat slamming PHP for being good at one thing. Can I ask - is there some exclusive club you got a card to when you dissed PHP?

      There are many bad PHP programmers out there, and that has led to tons of sloppy code, but that doesn't mean the language as a whole sucks. How about some REASONS, other than the fact that it's not as 1337 when you're writing in the same language that many new programmers started with?

    10. Re:*shakes head* by Reverend528 · · Score: 1
      Although Lisp is syntactically the most expressive language around, it is lacking certain core features that are widely available in {insert language here}. Part of this is due to the abstractness of Lisp, like the fact that it lacks a good posix interface. Other things are just items that we've come to expect from dynamic languages, like XML parsing, or regular expressions.

      If you compare the standard libraries that are built into python with those in Lisp, you'll notice a huge difference. Python comes with a lot of useful utility classes/methods/functions whereas Lisp comes with a lot of syntactic fluff.

    11. Re:*shakes head* by Reverend528 · · Score: 1

      I believe part of this is due to the fact that python doesn need lambda expressions. It allows a function to be defined within a lexical scope to be returned from a function. While the function technically does have a name, it's inaccessible by name in the global context, essentially making it anonymous.

    12. Re:*shakes head* by Webmonger · · Score: 1

      True, one does blocks, and the other just statements. But other than that, there's no difference between functions and lambdas. Both can have side effects in their enclosing scope, and neither one must return a value (other than None).

    13. Re:*shakes head* by snorklewacker · · Score: 1

      Oh PHP, how do I hate thee, let me count the ways:

      1. Namespace. Everything in one big global namespace of functions.

      2. Consistency. Grossly inconsistent function naming scheme. Sometimes it's noun_verb, sometimes it's verb_noun, sometimes there's an underscore, sometimes there isn't, sometimes it changes these conventions within the same module. Making matters worse are about a dozen different ways to compare and match strings, typically a different one for case-insensitive or not. I guess that's the one nod to consistency -- being consistent with C of all things.

      3. Pass-by-value. You need special syntax to pass objects by value. I actually had to lecture the primary PHP devs on the concept of object identity, yet they still managed to screw up the implementation of === to not use it.

      4. Culture. "I'll whip it up in PHP and MySQL and it'll cost you a shiny nickel sir, don't throw your money away on a shopping cart that will survive a crash!"

      5. Magic quotes.

      Yes, it's possible to write good PHP. I've seen industrial-strength well-written apps in VB 6. But you get no help from the language in doing so.

      --
      I am no longer wasting my time with slashdot
    14. Re:*shakes head* by VolciMaster · · Score: 1
      PHP is a joke and can be dismissed without further discussion.

      Ok, I'm not responding just because I use PHP in my day-to-day job and for my personal web programming. PHP is not an application development language, it's a scripting language!

      PHP, Python, C++, Ruby, etc. They all have their place and their function. Citing Ruby as superior to Python (or vice versa) is kind of like saying my kid is better than your kid because he can juggle and yours can't. To which you respond, 'yeah, well mine can ride a unicycle'.

    15. Re:*shakes head* by holovaty · · Score: 2, Informative

      > I don't mind people reinventing the wheel over
      > and over again but whenever you see people saying
      > "Language X's answer to Rails" all the time, you
      > gotta be thinking to yourself, wow, maybe I
      > should try Rails FIRST and then try the
      > knock-offs.

      Disclaimer: I'm one of the two core developers of Django.

      Django isn't a reinvention of the wheel or "copycat" of Ruby on Rails. We wrote it about two years ago for production use at the newspaper Web site I work for and have been using it since then. (I believe Rails was released one year ago.) It's a framework that was derived from our production sites.

      Frankly, it's not intended to be an "answer" to Rails, and I'm disappointed (but not surprised) it's being talked-about as such. Rails and Django solve different problems. Django is more suited for content-management, because it gives you a lot of content-management capability for free.

    16. Re:*shakes head* by Intron · · Score: 1

      Since lisp is based on Alonzo Church's Lambda Calculus, I'm not sure how you can call it an accident.

      --
      Intron: the portion of DNA which expresses nothing useful.
    17. Re:*shakes head* by 3.2.3 · · Score: 1

      doesn't allow you to use Python in the HTML statements

      if you are embedding language statements in your HTML, you have made the egregious mistake of combining rendered content and logic (ala PHP).

      however, any decent templating language, including Django's, will allow you to embed language expressions in your HTML.

    18. Re:*shakes head* by oldCoder · · Score: 1
      Don't be afraid of Ruby
      Well I tried to install with the ruby on rails one-click installer, just to see what all the dang hype is about, and the OnLamp instructions fail at the gem step.

      If you must know, it claims:
      ERROR: While executing gem ... (Gem::RemoteSourceException) Error fetching remote gem cache: getaddrinfo: no address associated with hostname.

      I guess Ruby isn't quite done yet. Although to be fair, it took about a day and a half to install Microsoft Visual Studio.

      --

      I18N == Intergalacticization
  4. Django Fever!!! by chris_mahan · · Score: 1

    Catchy, no?

    --

    "Piter, too, is dead."

  5. Very clean syntax by JPyObjC+Dude · · Score: 1

    The {{ }} syntax is quite readable. I've been waiting for a decent Python template engine to jump on and migrate away from Java. Don't mind a performance hit when I get easier to read code that has a shorter iterative development cycle.

    Waiting for WebLogic to compile a JSP is way too painful and having to write strait in Servlet is troublesome as well. Aside from going to Velociy templates, This looks very sweet indeed.

    Nice to also have native JSON interpretation in the language to aid client (JavaScript) to server (Python) communication.

    Will be keeping a close eye on this one as well.

    1. Re:Very clean syntax by Saeed+al-Sahaf · · Score: 1
      Don't mind a performance hit when I get easier to read code that has a shorter iterative development cycle.

      Most people do mind a performance hit, and will go out of the way (read: more work on the code) to avoid it.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    2. Re:Very clean syntax by same_old_story · · Score: 1

      don't mean to flame, but this is one of the reasons why there is so much buggy / useless software out there.

      as they say, premature optimization is the root of all evil, maybe the first optimization is the programming language + framework you choose...

    3. Re:Very clean syntax by Nasarius · · Score: 2, Informative
      don't mean to flame, but this is one of the reasons why there is so much buggy / useless software out there.

      as they say, premature optimization is the root of all evil

      Precisely. One of the cool things about Python is that you can write your app with it, run it through a profiler, and rewrite the bottlenecks in C/C++ if you really need to.

      --
      LOAD "SIG",8,1
    4. Re:Very clean syntax by RAMMS+EIN · · Score: 1

      Just out of curiosity, have you actually tried Rails? If you care about concise and easy to read code, Ruby+Rails seems a better option than Python+Django to me. At least I find Ruby to be cleaner than Python, and Rails code often seems about as concise as it gets.

      --
      Please correct me if I got my facts wrong.
    5. Re:Very clean syntax by afd8856 · · Score: 1

      Haven't you've tried Zope Page Templates? They have a few implementations outside of zope, if for any reason you don't like that.

      On the other hand, I don't know much about Rails, but Why not zope? Rapid development, a lot of suport, open source, has comercial backing, and you also get plone or CPS. Extra goodies! You don't need to mess with SQL, has catalog search features, users and rights, ZPT (which are absolutely beautiful, IMHO), workflow, security, "disk" based development, through the web development, you get to use python for development etc. Have a look and don't dismiss it!

      --
      I'll do the stupid thing first and then you shy people follow...
    6. Re:Very clean syntax by RevAaron · · Score: 1

      I saw Woz surfing PORN on the Woz Cam [woz.org], now it's disabled!

      And you didn't take a screenshot?

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    7. Re:Very clean syntax by Anonymous Coward · · Score: 0

      Check out Cheetah its a very nifty python templating engine that isnt whitespace dependent http://www.cheetahtemplate.org/

    8. Re:Very clean syntax by JPyObjC+Dude · · Score: 1

      The reasons I have avoided Ruby has many tails:

      1) It was difficult enough for me to convince my bosses to install a Python interpreter on our production servers.

      2) Python has very good bridging support with libraries for binding to Objective-C and Java. Since multi-language apps is where I want to go for my larger hacks this is important.

      3) Python has been around longer, has a larger user base and has tons of libraries and apps out there. Ruby is still quite young and will take more time to gather more libraries under their wings.

      [Question] Does Ruby natively support JSON?

  6. Can I be the first to say... by baldass_newbie · · Score: 3, Funny

    The Django ate my baby.

    --
    The opposite of progress is congress
    1. Re:Can I be the first to say... by Mr.Sharpy · · Score: 1

      OMFG, I nearly shot coffee out of my nose from laughing. Good Job.

  7. It would be a great name by Anonymous Coward · · Score: 0

    if it were perl rather than python.
    http://www.pearldjango.com/

  8. django hopes by danielDamage · · Score: 0

    Weird, I submitted this story to Slashdot a week ago when Simon first posted. I'm new to Slashdot and still not quite understanding the mysteries of the editors.

    But hell, I really wanted to see what Slashdotters had to say about Django and glad to see the thread started.

    I'm a web developer and Django looked pretty slick to me for building quick, cheap CLED (create, list, edit, delete) applications to edit simple datasets. We build a lot of these and I'd love to see a tool that allowed us to build them for clients for less than a grand.

    We tried installing Django on our dev. FreeBSD box. It installed okay, once it was installed, the paths in the demo apps were not mapped correctly, and the styles were not in a place that apache and mod_python could find it. I'm sure with a few more hours we could have smacked it up, but for a rapid development platform, we just couldn't afford the non-bill hours to spend on it this early in the game.

    I wanted to be an early adopter because it looked so cool, but I guess I'll have to wait until it's a little more mature. Plus, to my knowledge, it doesn't have an AJAX library like Ruby.

    Perhaps we'll try Ruby on Rails after all. I know how to code in Python, but Ruby seems to be cake.

    I've been reading Simon Willison's weblog for awhile, and he's a smart guy. I bet he'll help whip this thing into shape and Django will turn out to be something pretty damn cool.

    --
    Slices, dices, eats your lunch.
    1. Re:django hopes by theapodan · · Score: 1

      "I'm new to Slashdot and still not quite understanding the mysteries of the editors."

      Their mysteries are written in UTF-8, but they're trying to decode them in ISO-8859-1.

      Thats why they often get confused.

    2. Re:django hopes by holovaty · · Score: 1

      Hey Daniel, Django hasn't even been "officially" released yet, so I apologize that you had troubles installing a pre-release version. We (Django developers) have been using the framework for a long time internally, but creating an installation script is something we've never had to do. That, and documentation, are our top priorities before we actually launch our first version. The cat got out of the bag a bit early, and before we knew it everybody was linking to our Web site, even though we only offer Subversion access to the code at this point. I can't complain that people are excited about our project, but I wish they'd hold off on judging it until we considered it ready for release.

    3. Re:django hopes by Anonymous Coward · · Score: 0

      My only hope...

      Is that you change the name of this framework to something that doesn't suck

      Seriously... WHO THE HELL NAMED THIS THING?

      I love python, I like the ideas behind this framework, but the name has got to go.

  9. I'm not "the wild". Are you? by Futurepower(R) · · Score: 1


    "... he and his colleagues are releasing into the wild."

    Software developers need marketing skills. It's not a good idea to call your prospective users "the wild".

    1. Re:I'm not "the wild". Are you? by yasth · · Score: 1

      Yet it strangely fits. It will be taken, mangled, nearly abandoned, and then if the project is lucky it will have a sucess from out of the blue, that gets enough momentum behind it to do something.

      Just the way these application platforms work.

      --
      I'd do something interesting, but my server can't handle a slashdotting.
    2. Re:I'm not "the wild". Are you? by ucahg · · Score: 1

      I am neither Simon nor one of his colleagues, so they aren't my prospective users, but point taken.

    3. Re:I'm not "the wild". Are you? by 7-Vodka · · Score: 1
      Don't be silly. The wild is the environment, not the users. I guess the users would be the animals :)

      Seriously the headline said it would be released into the wild.
      If you were the wild like you say, then I'd be worried about them coming to release something into you. You only got a few holes and only one is for input of solids.

      --

      Liberty.

    4. Re:I'm not "the wild". Are you? by Tablizer · · Score: 1

      Software developers need marketing skills.

      Naw, we outsource our marketing to the Philippaens.

  10. Another one by Fweeky · · Score: 1

    Nitro; another Ruby web framework which seems stronger than Rails in some areas.

    Mmmmm, so much choice.

  11. Tcl by DavidNWelton · · Score: 1

    Tcl:

    1) Is a very easy language to learn, so it can be used in the templates as well as the backend.

    2) Has lots of nifty introspection features, so you can do quite fancy programming if you care to - since the syntax is so simple, you can even write new control structures in Tcl itself.

    3) Tcl is sort of a pragmatic Lisp: http://philip.greenspun.com/tcl/

    Unfortunately, we don't have the fancy web framework in place just yet, but I think Tcl is still one of the best languages out there for web coding.

    1. Re:Tcl by dkf · · Score: 1

      Unfortunately, we don't have the fancy web framework in place just yet...

      Ah, so OpenACS isn't a fancy web framework?

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  12. PHP equivalent by Boffy · · Score: 1

    I'm currently half-assedly developing a similar deal for PHP, but it lacks a lot of the features of Django. Anyone know of a PHP equivalent? Don't say Prado or whatever it was that won the PHP Coding contest or whatever recently, that seems to me like killing an ant with a nuclear warhead

  13. Dispelling some myths by ultrabot · · Score: 2, Informative

    Python is more verbose than Ruby,

    Example? In fact ruby is more verbose than Python in some ways, because of the need for block delimiters.

    doesn't allow the same metaprogramming (closed classes! no anonymous functions!)

    The classes are not closed, you can add methods and attributes to classes after declaration (classes are mutable objects). It's just that there is no direct syntactic support, which is not a big problem because normal user code (as opposed to framework code) doesn't need to do it.

    And anonymous function are there, (lambda x: x*x), and it's not a problem to give function a temporary name because the names can be reused.

    As for blocks (which you didn't mention, surprisingly), python 2.5 is going to have a "with" statement that does mostly the same thing blocks in ruby are used for.

    doesn't allow you to use Python in the HTML templates

    Come on, there way too *many* templating systems for Python.

    --
    Save your wrists today - switch to Dvorak
    1. Re:Dispelling some myths by snorklewacker · · Score: 1

      Example? In fact ruby is more verbose than Python in some ways, because of the need for block delimiters.

      Python has block delimiters too. They prefix every single line. Just because you can't see them printed doesn't mean they're not there. Just try leaving them out.

      I can deal with the indentation syntax, I in fact write and maintain quite a bit of code in python. I also used to work on Infoseek pages way back, and I can tell you that I cannot deal with the indentation syntax when code is embedded into web pages. Python's indentation syntax might actually be the best thing to happen to "separation of presentation and code", because it's such a pain to actually embed code.

      Cheetah looks like one of the better template engines for Python. No whitespace silliness in it either.

      Rails isn't all that hot as a template engine, as it uses nasty ASP-ish syntax, where conditionals look especially noisy. For generating front-ends to databases though, it's sure nice. Now if they'd only work on that Oracle DBI driver.

      --
      I am no longer wasting my time with slashdot
    2. Re:Dispelling some myths by Colonel+Panic · · Score: 1

      anonymous function are there, (lambda x: x*x)

      Can you have more than one expression in a Python lambda? Didn't think so.

      As for blocks (which you didn't mention, surprisingly), python 2.5 is going to have a "with" statement that does mostly the same thing blocks in ruby are used for.

      Hey, why not get rid of (or make optional) that indentation-as-block-delimiter thingy in 2.5 too, then it'll be even more like Ruby.

      Ruby is flattered that the 'with' statement is being added to Python in an effort to make it more Ruby-like, but from what I've seen it still doesn't have the power of Ruby's blocks.

    3. Re:Dispelling some myths by ultrabot · · Score: 1

      Can you have more than one expression in a Python lambda? Didn't think so.

      No, but then you can just do

      def L(x):
        print x
        return x+1

      doStuff(L)

      Using the letter "L" doesn't hurt anyone.

      Ruby is flattered that the 'with' statement is being added to Python in an effort to make it more Ruby-like, but from what I've seen it still doesn't have the power of Ruby's blocks.

      It covers the cases where the blocks are mostly used, that are not already covered by generators.

      --
      Save your wrists today - switch to Dvorak
    4. Re:Dispelling some myths by Anonymous Coward · · Score: 0

      You should take another look at the Oracle driver in Rails, its made a bunch of progress recently...

  14. Because it's Python? by EnglishTim · · Score: 1

    I'm sure that Rails is spiffy 'n all, but I'd rather use a language that I'm already familiar with.

    I realise at that point all the hacks will crawl out of the woodwork and tell me that any programmer worth his salt can pick up a language in no time, but that's not really true. Yes, any decent programmer should be able to get started with another language very quickly, but it takes some time to get used to the standard library that comes with a new language and it takes time and experience to get a handle on what the best way to handle a problem is in a particular language. When you start off with a new language (or even a new module or library), you spend an awful lot of time looking things up in the reference documentation.

    I'd rather spend that time getting something done.

    1. Re:Because it's Python? by snorklewacker · · Score: 1

      What's nice about Rails is how little code you actually write. It makes it easier to pick up Ruby gradually that way. If you know perl, ruby won't take you long. Learning some of Ruby's odd idioms might take longer, but you aren't forced to use 'em.

      Ruby has poor unicode support however, which makes it a non-starter for my current application (which has to deal with data in UTF-8 that's often in Russian, Chinese, and Korean just to name a few).

      --
      I am no longer wasting my time with slashdot
    2. Re:Because it's Python? by Paradox · · Score: 1
      I'm sure that Rails is spiffy 'n all, but I'd rather use a language that I'm already familiar with.
      I am so tired of this complaint. Keep up or ship out. If you're going to compete with other languages, you need to know what they can and cannot do. That means you have to learn them. This is not time wasted. This is time invested in your ability as a programmer. You are getting "something done." You are training yourself. At the rate that our industry evolves, if you don't train yourself, you'll become useless or confined to legacy work in no time.

      As an example, I devoted about one day a week out of my very limited spare time to learn Lisp. It took me about a month to get to where I could make a real lisp program at this pace, and about two months to feel comfortable. I learned it because I wanted to broaden my horizons as a software engineer, I didn't think I'd get any money.

      Turns out, 3 weeks later, there was some Scheme code that needed to be reworked. Since no one knew scheme, they were going to ditch perfectly good, working code. For nearly a month, I got paid to professionally hack and upgrade a product written in a dialect of Scheme, and I probably saved months worth of development, the Scheme code was both very good and very complex (at least, a C++ copy would have been complex).

      If I hadn't invested my time, I wouldn't have had such an opportunity, and my development group woul d have had to spend at least twice as long developing a replacement piece of code and testing it.

      The fact that I see a python user balking at learning a new language really worries me. I hope that you are not reflecting the Python community, because if that's the case, then Python really is the next Java. Sometimes, Getting Things Done means taking a path that has less immediate returns but better long-term returns. The DRY principle (upon which Django leans heavily) is a perfect example of this.

      --
      Slashdot. It's Not For Common Sense
    3. Re:Because it's Python? by Hast · · Score: 1

      I think his point is that while Ruby is nice and all it doesn't seem to offer that much more than eg Python. They are both scripting languages. And while Ruby on Rails is good for hacking together a simple WWW site it may not pay off to learn the language just to solve a one off problem. In that case you'd be better off solving it in a language you know.

      So I think you are overthinking this "problem" waaaaay too much. Besides I'm quite convinced that someone who uses Python is already competent in multiple languages. Personally I know Python, C/C++, Java, Haskell, Lisp, Perl, some extinct languages like Basic, Fortran and Pascal as well as hardware languages like VHDL and Verilog. I know these to different degrees of competence, as a rule I have made at least a couple of bigger projects in each and have gotten a "feel" for the languge.

      Is it a big problem that my feeling towards Ruby is more of "Meh, perhaps I'll look into it in the future" than that I spend a lot of time learning it? For me the question isn't if I can learn a new language or not. It's more of a question of "Why Ruby?". And to be honest, I have heard a lot of good things about Ruby, but very little as far as specifics are concerned.

    4. Re:Because it's Python? by EnglishTim · · Score: 1

      It wasn't a complaint.

      You were saying that we shouldn't use [insert own language preference here] Rails-alike and should instead try Rails first.

      I was saying that actually, I'd rather just stick with the one in my preferred language, as I'll be able to get going more quickly.

      Now I'm not really sure what you're trying to say now. That I should try every new language I see? I have looked at Ruby, but to be honest if I was to devote some time to learning a new language I'd probably want to go with something a little less similar to the langauges I am already familiar with. In fact, I'd probably do as you did and have a look at Lisp. I've been meaning to do that for ages.

      It's not that I balk at learning a new language, but if I've got the choice between:

      a) Using something neat
      and
      b) Using something neat that also requires me to learn a new langauge

      When my time is limited, I'm likely to go for option a).

    5. Re:Because it's Python? by Paradox · · Score: 1
      I think his point is that while Ruby is nice and all it doesn't seem to offer that much more than eg Python.
      Non-trivial lambdas is a big deal. Python doesn't offer it. Ruby does. I'm not sure why python doesn't offer it, but it doesn't and even with this new "with" stuff, it's not going to.
      And while Ruby on Rails is good for hacking together a simple WWW site it may not pay off to learn the language just to solve a one off problem. In that case you'd be better off solving it in a language you know.
      Your condescending attitude is noted, and not unexpected. People's derision of web apps on slashdot is about as predictable as hot grits and welcoming overlords, albeit more sophisticated.
      It's more of a question of "Why Ruby?". And to be honest, I have heard a lot of good things about Ruby, but very little as far as specifics are concerned.
      Rails cannot exist in Python. Both I looked at the work on Subway and realized this. Django has taken some good steps, and it's a good idea for Python, but it is not up to par with Rails. If you want concrete details, here are the biggest selling points for Ruby:
      1. Real lambdas. What python has doesn't count, and I've never heard a good, non-Java-esque explanation for why it doesn't have them. I'm tired of being told that we, the masses of programmers, are not smart enough for feature X.
      2. Better meta-programming facilities. It's entirely possible to create embedded domain specific languages in Ruby. Doing so in Python will only yield Python. Ruby is both about a beautiful result and an easy time writing. Python is all about ease of readability (and we hear this from people in the Python community about 76.7 times a day). Python isn't a bad language, but it's still feature deficit. And no, I'm not bitching about immutable strings.
      Besides I'm quite convinced that someone who uses Python is already competent in multiple languages. Personally I know Python, C/C++, Java, Haskell, Lisp, Perl, some extinct languages like Basic, Fortran and Pascal as well as hardware languages like VHDL and Verilog. I know these to different degrees of competence, as a rule I have made at least a couple of bigger projects in each and have gotten a "feel" for the languge.
      This is why the other poster's reluctance to learn Ruby troubles me. After you learn 4 or 5 lanuages, it starts to become easy. I learned Io in about a day, because I was familiar with languages using similar concepts (yeah, Self!) If people start preaching Python as the Only Thing You Need To Learn, and continue with this "executable pseudocode" approach to everything, then Python is going to be the next Java. This may be exactly what the community wants, but I see it as a failure and a disappointment.

      If Python picked up a few key features from Ruby, I'd be very enamored with it. I know it, and I like a lot of what GVR has to say. I just can't understand the stubborn refusal to give us the real killer features that wouldn't even significantly increase the complexity of the language.

      --
      Slashdot. It's Not For Common Sense
    6. Re:Because it's Python? by Paradox · · Score: 1
      You were saying that we shouldn't use [insert own language preference here] Rails-alike and should instead try Rails first ... I was saying that actually, I'd rather just stick with the one in my preferred language, as I'll be able to get going more quick.
      People have gone from 0 ruby skill to major Rails contributor or Rails consultant in less than 2 months in some cases. Ruby is a very easy language to learn, and its standard library is designed around the concept of doing what you expect. Considering you'll have to wait a few more months just for Python's frameworks to start approaching something resembling parity and even then, they won't be able to mimic many of Rails' killer features, it's obviously faster just to learn the tool now.
      Now I'm not really sure what you're trying to say now. That I should try every new language I see?
      No one has infinite time. But here you are contemplating building green-pasture small-to-medium scale webapps and you're passing on Ruby On Rails because, "Meh, I don't know it." This is not the more efficient path. As perl folks would put it, this is False Laziness.
      I have looked at Ruby, but to be honest if I was to devote some time to learning a new language I'd probably want to go with something a little less similar to the langauges I am already familiar with.
      Ruby bears far more in common with both Lisp and Smalltalk than Python does. While they do share many similarities, the significant differences greatly distance them. Ruby and Python coding styles (and their communities) are worlds apart. Take it from someone who has professional competence in both languages... they are extremely different when you go into a real project.
      In fact, I'd probably do as you did and have a look at Lisp. I've been meaning to do that for ages.
      Learning Lisp is a good idea. But it will help you realize some of the reasons why Python is irritating. Lisp is all about empowering the software author to make his code as close to his domain as possible. Everything in Lisp is carefully shaped towards this goal. Python is all about constraining the programmer to a "readable subset."
      It's not that I balk at learning a new language, but if I've got the choice between:

      a) Using something neat and
      b) Using something neat that also requires me to learn a new langauge

      How about:
      1. Learning something that is exhibiting all the characteristics of a "Killer App," taking a competitive market by storm in a way that hasn't happened for a long time. PHP and J2EE never really had this kind of momentum and penetration within less than a year. Perl did, but that's because Perl made it so much easier than C that there wasn't really any other choice.
      2. A me-too copycat of such a product in a language you know, which does not have all the capabilities of the language used to write the aforementioned killer app.
      I'm sorry if I seem to come on a bit strong through all this, but one of the most important attributes of a programmer, in my humble opinion, in is the willingness and even excitement for learning. There is simply too much to know all in advance, you have to train yourself as you go. I see so many pythonistas who take your attitude, and I've never responded. This has built up and I probably directed too much of that ire at you personally, for which I do apologize. My point is Rails is here, now, and the barrier for entry is learning a very interesting language called Ruby. If it were in Lisp, I'd tell people to get off their assess and learn Lisp. If it were in Haskell, the same would apply.

      I worry that Python, with a very promising evolutionary path, might fall into the trap of becoming the next Java. It'd be a great loss to see that happen.

      --
      Slashdot. It's Not For Common Sense
    7. Re:Because it's Python? by EnglishTim · · Score: 1
      Well, if Rails really is so much better than Django as you suggest, then perhaps it is worth looking at Rails instead. If it's only a little bit better though, I'd still be tempted to go with Django.

      Nevertheless, all your points are good.
      ...but one of the most important attributes of a programmer, in my humble opinion, in is the willingness and even excitement for learning.

      That's true, but there's more to learn than just languages. I've got interesting enough things to look at right now without another new language.

      However, I've found your steadfast recommendation of Rails pretty interesting so I think I might go ahead and have a quick peek at it again, as well as Django.

    8. Re:Because it's Python? by EnglishTim · · Score: 1
      This is why the other poster's reluctance to learn Ruby troubles me. After you learn 4 or 5 lanuages, it starts to become easy.


      To be fair I did explain that. Perhaps I simply don't have a particularly good memory, but I find that it's not the learning of the language that's tricky - the basics of a language can be picked up very quickly - it's the remembering all the standard library stuff that takes time. Starting with a new language I seem to spend a lot of my time flicking through the reference manuals.
  15. Tcl is tired by Colonel+Panic · · Score: 1

    Please. Not Tcl. It's ugly. It's even slower than Ruby. Has bizarre scoping rules (upvar, global, interp - just try chasing variables around in a moderately complex Tcl script where these are all used liberally). OO tacked on as an ofterthought.

    I haven't done a lot of Tcl, but when I have had to work on Tcl code over the years it's been exceedingly painful.

    Tcl was great in it's day (1989), but now Tcl is tired and needs rest.

    1. Re:Tcl is tired by Anonymous Coward · · Score: 0

      Ugly? De gustibus... I don't care for the look of Ruby myself. I think Python looks pretty clean, but Tcl is ok.

      The "bizarre scoping rules" are an integral part of having a language as flexible as Tcl, and frankly they aren't that hard to grasp in any case. "interp" isn't really scoping, it's the ability to run multiple interpreters and control them from Tcl, which is pretty neat. "OO as an afterthought"... sez you. "Language flexible enough to implement OO in the language itself", sez me:-) So it will never be OO all the way down, ala smalltalk, but neither are a lot of other very practical languages.

      If you found the language painful, perhaps you didn't grasp it fully. It looks easy, being a 'scripting language', but perhaps the way of thinking is closer to Lisp than most people are comfortable with, which might explain your difficulties.

    2. Re:Tcl is tired by Anonymous Coward · · Score: 0

      It looks easy, being a 'scripting language', but perhaps the way of thinking is closer to Lisp than most people are comfortable with

      Mr. Tcl, I know Lisp and you're no Lisp.

    3. Re:Tcl is tired by dkf · · Score: 1

      Which version(s) of Tcl do you believe to be slow? Which software were you running on top of the language core? Griping about stuff on /. is all very well, but actually saying "This specific X is too slow" allows it to be fixed.

      On the "ugly" comment, I'll just say "each to his own". I don't care for Ruby or Python all that much myself, but I learnt long ago that people's mileage really does vary.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  16. MOD PARENT UP by JLyle · · Score: 1

    +1, Informative.

    Sorry that I don't have any real mod points to use at the moment.