back to article Pleasant programming playground paves popular Python path

To help aspiring programmers start writing code, researchers from the Georgia Institute of Technology in the US have developed a free web-based platform called Code Shrew. The site – built with Django (Python 3), PostgreSQL, the Skulpt in-browser Python interpreter and the JavaScript-based CodeMirror editor widget – relies on …

  1. JLV
    Trollface

    >It doesn't implement advanced concepts like Lambda Expressions

    Many snake worshipers also instinctively avoid the Lambda with a Thousand Young, spoken of by the Mad Arab Abdul Alhazred in his dreaded tome as an affront to linguistical purity. Unaussprechlichen Kulten also refers to its non-Euclidean capacity to achieve both powerlessness and obfuscation. The, now retired, BDFL is rumored to have wanted to sacrifice the errant and ungrateful child when summoning the third incarnation of the snake that shall eat the world.

  2. HmmmYes

    Lambda expression ... list comprehensions ....

    Thats what drove Guido over the hill.

    Just get them looping first.

    1. K

      This might be me showing my age.. but I honestly don't get the lure of Lambda functions... GOTO was demonised because it left code unreadable, hence it was banished to he fire-pits of hell. So why are Lambda's acceptable?

      I'm quite lucky, as I used to be a Java/PHP developer, but I was jumping ship into an IT Manager role just as these features were being backed in PHP. Those they days, I'm back to scripting/automating with Python, but I still avoid these unholy features.

      1. Anonymous Coward
        Anonymous Coward

        -->So why are Lambda's acceptable?

        Greek words are computer sciency.

        My wild generalisation over many years is that women programmers tend to want to get the job done with minimal fuss while many male programmers want to demonstrate their ability with the coolest concepts and the latest buzzwords. That's why I'm grateful that the two people who taught me programming were both women. When the most recent comp sci graduate decides to refactor some of your code because it's insufficiently exciting, spends a week doing it and then is asked for a change log, it's Schadenfreude time.

        There's probably money to be made out of running bare knuckle fights between the "do it in the compiler" mob and the "this code is so much more efficient" mob.

      2. Gene Cash Silver badge

        Lambda is used (at least by me) for tiny little anonymous one-line snippets, used only in one place, usually as an argument to a function, so they don't need to be a full function by themselves.

        For example, if you wanted to sort a list of lists by the 2nd item in each sublist, you'd do "output.sort(key=lambda x: x[1])" which is a perfect use of lambda.

        1. david 12 Silver badge

          It's been a long time since I've used Python, but as I remember, "sorted(output,key=lambda x: x[1])" is

          sorted(output,key=(x[1] for x in output)), but for people who like having extra keywords in their programming language?

  3. Vanir

    "They shouldn’t be forced to follow predesigned paths."

    Like OOP?

    Like Agile?

    Like TDD?

    Hopefully 'they' learn to read and follow a specification.

    Then be able to write an easily comprehensible one. Now I'm definitely dreaming!

  4. Rich 2 Silver badge

    Excellent

    This is fantastic!

    We can have even more people learning Python and then pretending they know how to write code. It's a bit like learning how to draw with a crayon and then declaring that you're a top novelist.

    It's a start though, so presumably once the student has completed this course they can then start the next course which introduces a real programming language like C or C++ or assembler?

    1. cambsukguy

      Re: Excellent

      Python is very useful for corralling large data sets using numpy etc.

      My other half uses it as a scientist and it saves using R, works more like matlab and allows huge amounts of processing on an HPC with minimal effort.

      The algorithms employed are difficult to say the least and I dread to think how hard it would be to do it all in C++ even, let alone C.

      Having taken over a python project in a consumer electronics device (running Linux) which used python for everything and almost worked, I can vouch for the fact that it can shorten dev times whilst still working - I only had to code up some serial stuff and replace some BLE node-based interfacing with proper C Bluedroid clients and it ran pretty smoothly on a fairly ordinary bit if kit (because the heavy lifting for the radio stuff in this case was done by HW, as would be normal).

      1. elDog

        Re: Excellent

        "Python is very useful for corralling large data sets using numpy etc."

        I think that is true of almost any language - it's really the availability of good libraries (NumPy, Pandas, scikit-learn, etc.) that makes the job doable. Of course having a good clean syntax and constructs to call these libraries is best.

        Now about those missing {}...

      2. Rich 2 Silver badge

        Re: Excellent

        Oh, I know Python has its place. Even outside of "rm *python*" :-)

        I just don't think that place is as an introduction to good software engineering practice (the same goes for javascript - God help us!) - a knock-about hacky scripting language with do-as-you-like variable types and a bit of OO stuff bolted on (because that's cool), yea. Fine. But as a foundation of structured software discipline, I think not.

        This is why we have a whole generation of software students that don't have the faintest idea about what's going on under the bonnet, and who's answer to a problem is to just include yet another couple of megabytes of random library code because they need to use a two-line function that it defines and they're not skilled enough to know otherwise.

        Very soon, there will be nobody left with the skills to write those (non-Python) libraries and we'll have to go back to writing on stone slabs

        1. Paul Hovnanian Silver badge

          Re: Excellent

          Python is actually a good platform for teaching coding. Thanks to it's varied interpretation of whitespace, it messes up attempts by students to cut and paste from Stackoverflow without having the code blow up on them in mysterious ways.

          1. Anonymous Coward
            Anonymous Coward

            Re: Excellent

            "it's varied interpretation of whitespace"

            This is precisely what has kept me away from serious Python. I still have a mental block against significant whitespace.

  5. Anonymous Coward
    Anonymous Coward

    Not the best choice of mascot

    Do they know what shrews do with their prey?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like