Hacker News new | ask | show | jobs
by pyre 4945 days ago

  > the values it places on hacked up gimmicks (under the
  > guise of "more than one way to do things" and "see!
  > it's a one liner!") is a large part of this.
I'm curious where there is official documentation of Perl as a language putting emphasis on "See! It's a one-liner!" Sure Perl has things like Perl Golf[1], but I could equally point you to The International Obfuscated C Code Contest[2]. That doesn't prove that C as a language encourages you to intentionally obfuscate your code.

  > when someone tells me that perl is their language of choice
  > [...]  i won't hire them
Perl isn't my language of choice, but I'm not sure that I want to work for someone that has such a view of the world. You're attempting to use a small piece of data ("I like to program in Perl") to extrapolate a whole lot about a person.

[1]: http://en.wikipedia.org/wiki/Perl_Golf_Apocalypse

[2]: http://www.ioccc.org/

1 comments

I am wondering why it is as it is. I think it may be because of perls abundance of short cryptic symbols that people feel somehow "proud" to 1) know what "while(<>){print if($.==2 || $& && !$x++); $.=0 if (/^--+$/)}" does and 2) to make it even shorter. Because with )(!ยง&/$?(=)% with hell a lot of meanings you could write entire perl scripts based on special characters.

A good example is http://www.nntp.perl.org/group/perl.beginners/2009/01/msg106... that i just found googling for perl one liners. The OP want's to know what this line does, the first answer is "you can make it even shorter!". Somewhat explains what i try to say ;)

Surely there is a lot of clean perl code out there but from my experience at customers (i'm consultant) what happens in-house in some development departments looks very very very different. Then again i've seen a lot broken, half-tested and unmaintained CPAN modules as well.

One liners are an (extreme!) optimisation and programmers feel quite proud when they able to optimise code :)

And it's not restricted to Perl: http://news.ycombinator.com/item?id=4906370

> Then again i've seen a lot broken, half-tested and unmaintained CPAN modules as well.

You also get this in PyPi, Gems, NPM, etc. Just more proof that Sturgeon's Law exists.