NPLW 2016

5 minute read

The Dutch Perl Workshop (NLPW) was held on the 1st of April, 2016. Many jokes were made about the date being no joke… Here are some of my impressions about the event and notes about the talks I attended.

  • Awesome venue (funky, cool, laid back); a startup “bootcamp”/incubator, definitely startup atmosphere, complete with pinball machines, a table-tennis table and a Trabant
  • Great food and drink
  • Staff at venue very helpful and friendly
  • Wifi good, extra power cables provided (great for geeks!)
  • Talks were generally of good quality and informative
  • Fantastic to catch up with people, tell stories, discuss projects, and play Black Stories

Dr Forr; Prancer

  • Prancer: Dancer in Perl6
  • thin wrapper around Plack in Perl 6
  • relies heavily on Perl 6 features for error handling, arg parsing etc.
  • effectively only need GET and POST multimethods; no API necessary
  • still in early stages of development

Søren Lund; Documentation patterns and antipatterns

  • about documenting code, not systems or users docs etc
  • slides are on SlideShare
  • opinion about READMEs is minimalist
    • short description, how to build/install, links to detailed docs, real/proper documentation elsewhere
  • issue tracker is also a kind of documentation
  • wiki is also documentation
  • server/deployment diagrams also documentation
  • E/R diagram(s) for db. Can be automatically generated, e.g. SchemaSpy, and linked to wiki
  • comments in code
    • should one have a file header for source files?
    • document why one is adding technical debt and how it should be fixed. This is a good kind of comment.
    • helpful links
  • public APIs; documentation in code
  • refactor bad comments into good code

Leon Timmermans; Perl 6 parsing in the real world

  • wrote parsers for TAP and YAML in Perl 6
  • is maintainer of TAP::Harness in Perl 5
  • define TAP grammar using Perl 6 grammar
  • described internals of TAP parser
  • uses Perl6 Async for parallel test running
  • subtest grammar is a bit complicated due to indent requirement for subtests
    • indent of 4 chars is part of unofficial TAP spec
  • YAML parsing is complicated
  • Leon is one of the first people to use a grammar to parse YAML
  • hard to parse since YAML is context-sensitive
  • parser mostly written

Nate Nuss; Graphing logical infrastructure

  • had a whiteboard at work describing infrastructure
  • infrastructure and description thereof grew/changed organically
  • how to represent things?
  • turned description on whiteboard into a (dot) graph
  • theoretically easier to get to than the whiteboard, however whiteboard was easier to edit
  • some new information went into the graph, however basically had to go through one person to change the file
  • now things are probed and the graph generated automatically
    • GraphDB: Neo4j
    • visualisation: homemade JavaScript
  • generated layouts change each time they are loaded (e.g. force-directed graph)
  • trying to make time a part of the visual description is hard: solution in the end was snapshotting
  • new solution hasn’t yet replaced old representation, however is already useful
    • found things that weren’t necessary -> unnecessary connections
    • found dependencies to check that systems will cope with e.g. high season
  • many ideas for further improvements

Stevan Little; Roles best practices

  • roles have been available in Perl5 for about 10 years now
  • roles are a set of method implementations and optionally a set of method requirements
  • think of them as “encapsulated behaviours”; methods know other methods within the surface area of the API, hence they can form a cohesive set within the role.
  • roles are “cohesive behaviours”
  • getting cross-cutting concerns into an inheritance hierarchy is difficult, however very simple with roles. Composition over Inheritance.
  • roles are a kind of “horizontal reuse”
  • roles override superclass methods; i.e. any methods inherited into a class that have the same name from the superclass are overridden by the method in the role
  • methods from the local class override the methods from roles with same name
  • roles used in a class with clashing method names use neither method, the programmer has to define with a local method which method from which role is to be used.
  • role patterns
    • interface role
      • define an interface like in Java
    • behavioural role
      • more common and useful
      • reuse code without polluting base classes
    • strategy role
      • based on strategy pattern
  • worst practices
    • requiring private methods; don’t do e.g. require "_method";
    • using roles instead of inheritance; roles are not a replacement for inheritance
    • using roles too much; one should use classes gives required structure to the program

Abe Timmerman; Continuous Integration

  • challenges of building software
    • dependencies
    • build
    • test
    • deploy
  • dependencies management
    • cpanfile
      • more explicit than PREREQ_PM
    • can use Carton to bundle dependencies (like Ruby bundler, but in Perl)
  • cpansite: creates your own cpan mirror/server; good for providing a “darkpan”, if some modules can’t be released onto CPAN
  • Jenkins can’t understand TAP, however it does understand jUnit. There’s a module for that TAP::Formatter::JUnit
  • coverage reports
    • Jenkins understands “clover” output format of cover
  • releasing the software (one way to do this…)
    • merge pull requests
    • merge various branches
    • update the version
    • push to master
  • deploy
    • e.g. as a package, or just rsync

Lightning talks

Tina Müller; git-hub command line tool

  • command line tool to perform tasks on GitHub
  • can basically do everything from command line that one can do via the web interface
  • git-hub
  • very powerful with many commands implemented for various GitHub-related tasks

Frederico Recsky; Perlito and JavaScript

  • web tool to teach beginners Perl
  • converts Perl code into JavaScript and executes the JavaScript in the browser
  • gave some examples of what kind of Perl code can be currently handled

Richard Still; A quick trick to export data to JSON via the Template Toolkit

  • needed to convert some data that was already handled in the Template Toolkit by one system into JSON for import into other systems
  • showed a quick hack to get the object data which would normally be passed in to the Template Toolkit into JSON

Steffen Winkler; Overview of things learned from GPW 2016

  • discussed things learned from the recent German Perl Workshop 2016
  • having a logo early is a good thing
  • personal note: rating the talks on the same day on small “voting papers” was a very good idea for participants to give feedback; probably more likely to happen than filling out the survey online