3 ms·
One liners like this is why Perl has a reputation of being like line noise. I'm a big fan of Perl, but if any of my employees wrote this kind of write-only cod
by 321abc 17y ago
One liners like this is why Perl has a reputation of being like line noise. I'm a big fan of Perl, but if any of my employees wrote this kind of write-only code, I'd fire them.
- salvadors 17y agoIf they do any amount of command line wrangling, you should hope that your employees are writing code like this every day. The whole point of these one-liners is that once you get the hang of it they're very powerful additions to your *nix pipeline. They could write highly maintainable, well tested, peer reviewed etc code to do the same things, but in this context that would be hugely wasteful, as the utilities already exist. This is Perl as a replacement for Awk, not for Java.
- salvadors 17y agoSee also "Area Number Three" in http://steve.yegge.googlepages.com/five-essential-phone-screen-questions http://steve.yegge.googlepages.com/five-essential-phone-scre... Being able to create that line-noise is, in most cases, significantly more useful than taking 3 months to create a perfectly engineered recursive phone-number finding program.
- dionidium 17y ago...but if any of my employees wrote this kind of write-only code, I'd fire them. It's possible you're actually not aware, so take this in the spirit it's intended: statements like this make you sound like a colossal blow-hard.