Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Styles of programming and How We Think

by SpanishInquisition (Pilgrim)
on Oct 22, 2004 at 02:12 UTC ( [id://401354]=perlmeditation: print w/replies, xml ) Need Help??

Ok, I admit it. I am getting turned on by eclectic language voodoo. I'm becoming a language snob. I judge languages by the transparency of anonymous-function usage and the level of gorp one has to wade through to achieve things that are (by public consensus) actually quite insane. It's not enough for a language to have map anymore -- what level would I have to go through to manipulate the symbol table, to create a transaction, to use higher level functions effectively...

When I used to learn a language, I'd look up how to do File I/O, or I might implement Conway's Game of Life. No longer. And hey, I didn't use to be this way at all. In college, I thought I liked order. Maybe that was because I wasn't exposed to chaos... Ah, the joys of chaos... In chaos lies beauty (ok, you are thinking TSI is nuts now).

So, rambling am I? I have a phone-interview Monday with a Python shop. Pulled up the language today and said "it can't be that bad", and no .. after 1.5 yrs of not touching Python, it's not that bad. But it's not that good either. They limit lambdas to one liners. I was in shock. Anonymous functions? Castrated for no apparent reason? Ok, I can deal with it... but not having anonymous functions makes me feel like I'm writing COBOL. Why? I'm deranged, that's why. Err, no...Different languages are written for different people -- not just for different tasks. So this language isn't broken to many people, a lot of people love it, but I'm hung up on why lambdas are broken. It's like a giant albatross over my head. You don't want to write Python. Lambdas are broken. Lambdas are broken.

On the other hand (at least for me), Ruby (minus CPAN, of course) is looking incredibly sexy. The block constructs and ways to define interators and transactions is very cool. The user community thinks in good design terms just like the Perl one, it just doesn't have the size. This will, of course, hamper my usage of Ruby in certain settings -- but I'm looking for it to take off depending on Perl 6's future. Of course, I'm still here. Perl has an amazing codebase of modules and more so, an amazing group of people working in it.

The same funky-stuff that makes people run away from Perl screaming in terror (and defaming it for life) is turning me onto it more. The same thing that makes people like Python or Java turns me away from it. (Do I percieve a happy union between Python and Java fans or is it just me?) Anyhow, the basic theme here is that languages fit totally different mental states of programmers....

I guess what I'm getting at is there is a notable psychology to programming, and seeing I'm not a psychologist, I can't quite put my finger on it ... but we aren't all the same. While I would like to say that the world should be full of ENTJ future-world-conquerors with an air for funky language voodoo, we all aren't that way.

Perl fortunately fits more idioms than most, not just all. It's beautiful that you can write it the way you want it... Yet that beauty is, in itself, a disadvantage to some.

What makes us think in these different ways? It's all very interesting ...

Bottom line: Hooray for psychology, however it works. Let's keep learning from watching people do things differently than us.

Replies are listed 'Best First'.
Re: Styles of programming and How We Think
by zentara (Archbishop) on Oct 22, 2004 at 12:28 UTC
    "I guess what I'm getting at is there is a notable psychology to programming"

    I liken it to the toys we had as kids, like the difference between "block toys" and "clay". Some languages are like the block toys, predefined, clean, and easy to do the right thing. Our mothers(bosses) liked them, because they were'nt messy, and were predictable,safe, and you couldn't choke on them. You could produce with them, the same generic looking shapes all the other "drone-workers-to-be" created.

    Clay, on the other hand, was messy, unpredictable, and you could choke on it. But it let you make whatever you wanted. Some could produce unique masterpieces with clay, and others nothing but junk. Mothers didn't like it.

    I want clay, complete freedom, and Perl.

    I'm not really a human, but I play one on earth. flash japh
      I want clay, complete freedom, and Perl.

      Funny, a few years ago I fantasised about writing a language called Clay. I even came up with a marketing line: "Munging, messing with data has never been so deep, so intense, so different..." (or something like that) :). Clay was supposed to be written on top of or as a second generation of HC (Hygienic Classifier) (I borrowed the term "Hygienic" from Scheme's Hygienic Macros, and "Classifier" had nothing to do with OOP, in fact it was a not at all paradigmatic (paradogmatic?), minimalist, textual, principled and open-ended approach at the thorny problem of classifications).

      Maybe some day I'll get myself to rescue the papers, complete the design and write a working implementation of HC and Clay (in Perl, of course). Time, gentlemen, please!

      If you like toys you should take a look at Squeak
      -=special defects=-
Re: Styles of programming and How We Think
by kappa (Chaplain) on Oct 22, 2004 at 11:35 UTC

    Snob? Well, I prefer the word gourmet :)

    All this makes you search harder. There're LOTS of programming languages in the world nowadays. Once you've learnt one to earn your living, you can investigate even rare ones.

    I actually tried Java, Python and Ruby. I could not manage to like them. Ruby was a huge dissapointment, quite unexpectedly :( Then I stumbled upon Pike and it turned out to be the very subtle balance between elegance and power I am fond of. And when I feel like fiddling with functional programming (you said 'lambdas', I heard), I use Ocaml. These are hobbies, I enjoy them and don't try to make money from it.

      Question: what did you find disappointing about Ruby (other than say, no CPAN)?

      I am considering learning either Haskell or OCaml myself. Not sure if I understand why I should go one way or the other. We'll see. Lisp is fun, but it's rather fragmented, same with Scheme ... hence the feeling that I need to go somewhere else for esoteric-weirdness.

      "These are hobbies, I enjoy them and don't try to make money from it." ... Yep. Definitely. That's what makes it FUN.

      Yes, me too. I tried java once, didn't like it. Ruby seems okay, and I guess Python is, but I really don't like languages where whitespace is significant.

      I tried Pike too, and it became my new favorite language. I use it for nearly everything now, the way most people use perl.

Re: Styles of programming and How We Think
by itub (Priest) on Oct 22, 2004 at 12:45 UTC

      Time and again we repeat the mantra: "Bad programmers write unmaintainable code in every language."

      A master was explaining the nature of Tao of to one of his novices. ``The Tao is embodied in all software - regardless of how insignificant,'' said the master.

      ``Is the Tao in a hand-held calculator?'' asked the novice.

      ``It is,'' came the reply.

      ``Is the Tao in a video game?'' continued the novice.

      ``It is even in a video game,'' said the master.

      ``And is the Tao in Visual Basic?''

      The master coughed and shifted his position slightly. ``The lesson is over for today,'' he said.

      I first encountered that just a couple of weeks ago. What Yoda's really saying there is that he fears the freedoms that Perl gives, and longs for constraints.

      Basically, he's sounding like a good little citizen of the Empire.

      (I actually like Python; I just don't like that joke.)

Re: Styles of programming and How We Think
by dimar (Curate) on Oct 22, 2004 at 21:24 UTC

    Insightful and thought-provoking post, lets try and toss some gasoline on the fire ...(sweeping generalizations follow)

    People who genuinely *enjoy* programming JAVA (as opposed to those who see it merely as a means to an end) are people who ...

    • Like "labeling things" into neat little cubby-hole categories that fit their individual cognitive makeup and personal preferences
    • Believe that a rigorously defined taxonomy will enable "the computer to do most of the work" ... or even "enable the computer to think for itself"
    • Are more likely to buy into the semantic web and less likely to agree with the metacrap theory
    • Are more likely to favor a complete rewrite of the codebase of an inherited project
    • Will more readily characterize an unfamiliar programming language or methodology as "broken"

    Test these out on your co workers or colleagues and see for yourself if these (simplistic generalizations) hold any water.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://401354]
Approved by EdwardG
Front-paged by DrHyde
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-21 21:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found