Hacker News new | ask | show | jobs
by Mithaldu 3462 days ago
Examples, with explanation of wrong in comment. First talk:

  print $hash;   # he accompanied this by a dump of the hash, when in reality it would print the reference id
  print ($a, $b, $c);   # same thing as above, pretends it does a dump, when the reality is wildly different
He does these repeatedly in his second talk:

  $arg1, $arg2 = @_;   # assigns the length of @_ to $arg2, instead of unpacking args. only the newest of newbies would get this wrong
  if(ref $arg1 eq 'HASH') print $arg1{'key'};   # perl does not have block-less pre-fixed ifs
  else print $arg1;   # same with this, entirely nonsense
The entire style of his code (paren-usage, quoted hash keys) also smells of code copied from bad (w3schools) perl tutorials.
1 comments

Yeah, quite damning and sloppy on his behalf...

Thanks for pointing this stuff out!