A Foolish Manifesto

fREWdiculous!

YAPC NA videos available!

This year at YAPC::NA nearly all the talks were filmed, including mine. I watched them so I could glean a bit more ideas for how to make talks in the future better.

Two things jumped out:

I feel better now than I felt after doing the talks

This is great. I feel like they went really well now.

The diversions into code weren’t that great

On the other hand, actually showing the underlying code for DBICDH was probably not worth the time spent.

And if you want to watch the videos, here they are:

  • 0 Comments
  • Filed under: Uncategorized
  • Being a Speaker at YAPC 2010

    This year Rob Kinyon and mst convinced me to do some speaking at YAPC. I ended up doing three forty minute talks. The DBIx::Class one was certainly the easiest, but also the one I was least invested in. I didn’t write DBIx::Class and it’s a big enough project that the slides nearly wrote themselves.

    I also did a talk on DBIx::Class::DeploymentHandler. I am a little frustrated with how this talk went down. I am confident that DBICDH is an excellent piece of software that can do some really cool things and I kinda botched the end of the talk (very abrupt.) I wouldn’t call the talk a failure; it had a great turnout and at the very least I got to discuss features with jnapiorkowski, which was fun.

    My third talk was about DBIx::Exceptions. It was hard for a couple reasons; first off DBIE isn’t actually done yet. That certainly is not conducive to talking about something. Second, what it ultimately does really isn’t that complicated. The module is almost entirely a function of doing some research. So while I think that the subject is good and interesting, I don’t think it warrants a whole 40 minute talk. I actually had a long discussion with Rob about exceptions in general and he strongly supported the point of view that exceptions in any language are fundamentally flawed. I’ll turn that into a blog post at some point.

    I finished all three of the talks in less than forty minutes; I think that was a combination of me talking too fast (DBIC + DBICDH) and not actually having enough content (DBIE.) I would have done better were I less nervous, which should be less and less of a problem as a I practice technical speaking more. I actually did a lot of presentations in college and rarely had these issues, but in college I almost never spoke about software I wrote and my talks were usually from 10 to 20 minutes long. Another thing that I feel is important is that I need to try to add humor to my talks. The talks that are the most engaging are also the ones that are entertaining. I’m not sure I how I could work in jokes etc, but I need to try to do that next time.

    In other news, I’m pretty worn out in general from YAPC. I just need a break. So while I will do bug fixes and whatnot for my existing modules, and I still hope to release DBIx::Exceptions very soon, I’m going to try to chill out for about a month before taking on any of the other large ideas I have in mind for the future. Or at least I won’t start them on purpose :-)

  • 0 Comments
  • Filed under: Uncategorized
  • YAPC Talks I Think Are Worth Note

    So I just got back from my second YAPC. Again I had to leave early, but not as early as last time, so that’s good. Instead of summarizing every single talk I went to, I’d like to highlight some of my (most and least) favorites.

    Day 1

    Not Quite Perl (NQP) A lightweight Perl 6

    I can’t help but follow this since I see Patrick fairly regularly in our Dallas.p6m meetings; which is really half Perl 5 and half Perl 6. NQP is an amazing bootstrapping language for Perl 6 that is actually already self-hosting (written in itself!!!) and can do a lot of neat things. And of course Patrick is an excellent and humble speaker, which always helps.

    Take a look at the slides (linked to above, page up and page down for next and prev slides) for more information.

    For a language as minimal as they could get away with it’s extremely pretty. Note: For all the talks mentioned here, slides != talk.

    Plack – Perl web framework & server superglue

    Plack is very cool tech, even though Perl is late to the concepts it brings us. The cool thing about the talk was that it starts off really slow and then ramps up to some really amazing middleware that just blows my mind. Miyagawa was an excellent speaker and had lots of fun little jokes in his talks too.

    Fey and Fey::ORM

    I was told to go to this talk by ribasushi with the sole idea of stealing ideas for DBIx::Class. I was generally unimpressed with the ORM part, but Fey is far better than SQL::Abstract it seems like. Rolsky is very adamant about having no magic in his core, which is fine, but it typically means baseline code will be ugly. It’s certainly a trade off. He has a really cool autojoin feature, which I envy but also know that ribasushi already wants to implement that to an extent. Our $rs->as_query is cool, but he has something like that for EVERYTHING, which yields some interesting results. Of course this is due to his thoughts that pretty stuff belongs in a sugar layer. He has much more powerful relationships, which I envy for now but I also know that we have a branch in progress to give us arbitrarily complex (???) relationships. It seems like he has a global schema, which is too bad, but that’s just how things work sometimes. He wants to keep per db stuff out of the core, which I can certainly see being a good thing, but I also think it’s good that we try to keep all of our per db code up to snuff, so theres a tradeoff there.

    Overall I thought rolsky was very honest about the fact that Fey (and Fey::ORM) is about doing things differently due to taste and that’s completely fine. I definitely envy his SQL generation code, but I’d rather SQLA2.

    Lightning Talks 1

    A/B testing with Perl‎

    Look around at some docs on AB testing. The stuff they did with this was amazing. Forget hallway testing. This is where it’s at for usability.

    perlopquick – a quick reference for Perl 5 operators‎

    Ever want to look up how //= works? Not easy. Check out perlopquick. Awesome stuff for the future of core docs.

    Day 2

    Perl for CS Grad Students

    For this talk I have to give a little bit of background. This year it was attempted to film every single one of the talks unless the speaker explicitly said not to. Cameras et al were paid for by the conference’s budget. Of course, cameras are not all you need. You also need someone to run the cameras. It turns out that ONE MAN (his name is Krishna) did ALL of that for all five tracks. Of course the videos won’t be perfect, but if this becomes a trend it would be a great thing for all of perl.

    The speaker of this talk, like probably 33% of all the speakers in general, had technical difficulties getting his mac to work exactly how how wanted with the projector. He (reasonably) got frustrated at this and the wasted time it caused. What bothers me is that krishna was setting up the camera (and mic) as he did in every room every morning and walt said, “Why are you even here?” to krishna, presumably thinking that he was staff of the college (which is of course a great reason to treat a person poorly) and continued to lash out complaining about his technical difficulties. I guess to put a positive spin on this I got to know krishna better for it and I think we all owe him a beer or curry or whatever for all of his hard work (and apparently taking abuse) for doing WAY too much A/V for one person.

    The talk was ok.

    Iron Mad: The Iron Man Forfeit Talk‎

    This was mst’s Iron Man forfeit talk. Watch the video, it’s hilarious. I’m not sure much more can be said :-)

    perl5i: Perl 5 Improved‎

    I heard about perl5i last year and I thought it was neat. Now I think it’s excellent enough that I might use it in code at work. One thing I think is very good about it is the fact that you must use a version number when using the module, because it is expressly backwards incompatible. Take a look at the module. Very fun.

    Lightning Talks 2

    Reframing the Death of Perl‎

    This basically looked at the psychological term called “framing.” The gist of the talk: when you say “Perl is not dead” people see “perl is dead.” So instead you have to completely reframe and say “Perl is alive” etc. We ended up all yelling perl is alive and scaring prospective students that were visiting Ohio State. Awesome.

    Musical Intervals and Chords

    This was a talk by ology about (duh) music. Very cool stuff. I wish I could have talked with him more than I did for the few minutes that I did, and especially I wish I had discussed the music stuff with him. Unfortunately he ran out of time in his talk, but what he did say was getting very cool :-)

    How I mastered English with Perl

    This was a hilarious talk by a man who moved to the US from Japan and learned some english with perl. It focused on Lingua::EN::Inflect, using CPAN as a dictionary, and adorable daughters.

    Auction

    Not really a talk per se, but still a fun time. Apparently the auction usually takes hours, but this only took 1.5 hours, so not really that bad, and still a lot of fun. I got some O’Reilly coasters (beer mats for you brits) and wes got the new Effective Perl book + autographs. Very cool.

    Day 3

    Path::Dispatcher

    This talk was interesting in structure. It started off fairly slowly but got super cool as it built on itself. It made me want to start writing CLI apps. The fact that it yields such a nice API makes it hard for me to justify why I like the way that catalyst does it’s dispatching (all spread out) but I do think that different ways of doing things are valid. I would love to write some kind of text adventure game with this. Maybe I’ll use it to create a Perl tutorial game?

    Cool Perl 6 you can do today

    Again, this was Patrick. This talk makes me want to start writing my one off scripts in Perl 6. Unfortunately some of my more interesting “one off scripts” involve creating a DBIC schema and shoving data into an sqlite database so that I can get a feel for my data. Either way, check out the slides, very cool stuff. Also note: I downloaded and installed rakudo in the talk and actually played with it. It’s been a while since I’ve done that and I assure you it’s only gotten easier.

    All in all it was a great conference. I liked it better than last year despite the stress of three (supposed to be) forty minute talks. I’ll discuss that in my next post :-)

  • 1 Comment
  • Filed under: Uncategorized
  • YAPC Day 2

    This is day 2 (my final day :-( ) of YAPC. I tried my best to keep reasonable notes but near the end of the day my brain started to slow down. Hope you dig it nonetheless!

    The Future of DBIx::Class

    FYI: mst doesn’t use a mic, he yells.
    Instead of using MI, the future will use Moose and Roles.

    Good things DBIC already did:

    • Everything objects (almost no class methods)
    • Schema object
      • multiple connections
    • storage and cursors are objects
      • hides away backend specifics
    • ResultSource object
      • table/view metadata
      • not tied to the class
      • so multiple classes associated with the same table
    • relationships
      • near side, far side, join condition
    • no single columns assumptions for keys
    • result class (inflate_result) minimal protocol
    • ResultSet (my favorite)
      • virtual view
      • pure functional
      • chainable
      • updatable
      • cacheable
      • RestrictWithObject is a really cool use of this stuff
      • Extensible
      • were an accident
      • ‘aha’ moment needed
    • Result Class vs ResultSource
    • list context vs scalar context
    • search() args vs find args()
    • aha moments indicate conceptual inconsistency
    • essential vs implementation complexity

    Bad things:

    • find() deflates, search() doesn’t
    • connection attached to schema instance
    • details result in underlying design mistakes
    • persistent vs. non persistent
    • query handling should be more flexible by less DWIM and more consistency
    • Objects know too much, classes shouldn’t need to know how to serialize themselves
    • $rs->next, implicit iterators are a bad idea
    • ORM: where’s the mapper?
    • search() doesn’t understand delegation
    • rebuild
    • refactor
    • re-use
    • rebase

    The Future:

    • generic persistence backend
    • so you just declare a moose class and tell DBIC to persist it
    • very sugary
    • uniform data API’s
    • perl array == files == database table == LDAP
    • Data::CapabilityBased
    • A role with a default implementation
    • validation suite
    • semantic queries
      • use perl syntax for searches
      • instead of foo => $bar, ‘foo’ eq $bar
    • SQLA2 provides an explicit AST
    • Autojoins!
    • Stream API so that there won’t be the implicit cursor in ResultSet
    • lots more!

    join #dbix-class for the fun

    And that is my weird list of DBIC Future points. This stuff is really, really exciting. The ability to both use Moose and DBIC with a very sexy API is extremely exciting. And as I may have mentioned yesterday, mst has plans to make Moose startup time instant. Feel free to doubt it! That won’t stop him :-)


    Fundamentals of Modern Perl

    This was chromatic’s talk. It was very polished and he had his ideas very well organized. The outline should give you a very good idea of what the talk really was.

  • About ideas, not people.
  • Perl is great.
  • Problems
    • lots of terrible legacy code
    • Not a lot of external support for perl 5 (ActiveState)
    • Chaotic dev process
  • Plan
    • fix problems of ancient code
    • Replace bad tutorials with good ones or drown them out
    • Sustainable dev models
    • Advocate modern Perl
  • Complementary Efforts
  • Enlightened Perl
  • The Perl Foundation
  • Strawberry + Chocolate Perl
  • Governing Principle of Modernity
    • What is painful in the language?
    • What is painful in the ecosystem?
    • Solve pain for everyone (good defaults) so that noobs don’t have to get in touch with people to find out how to do things right
  • The Heirachy of Defaults
    • Unknown Problem
    • Poorly Recognized Problem
    • IAQ (Infrequently)
    • FAQ
    • Frequently Reinvented Module
    • Available Module
    • Communiy Idiom
    • Popular Module
    • Bundled Modle
    • Core Module
    • Core Language
    • (higher in the hierarchy, the more a problem)
  • How to advocate Modern Perl
    • experiment with new techniques
    • give good feedback
    • help converge to good defaults
    • refactor code regularly for good design
  • How to develop Modern Perl
    • deliberate convergence multiplies our power, great effort over the past years has made this possible and even advisable
    • document experience, reuse foundational concepts as often as possible
  • How to experiment with Modern Perl: just do it!
  • How to Pumpking Modern Perl: n/a :-)
  • New features you need
    • given/when, smartmatch are going to change
    • say, awesome
    • $x //= ‘default’
    • named captures
    • Work Around Core Bugs (and lacking areas):
    • What’s missing?
      • Single installable tarball
      • Easy-to-use GUI programming
      • non-Lovecreaftian XS replacement
      • make taint less all-or-nothing
      • Support policy
      • ponie
    • perl5i autoincludes some of these things
    • Book!

    • I <3 Email

      This was rjbs’ talk on sending email. He’s done a few of these before; I know that Email hates the living is on Google Video. This was less about the standards of email, and more about how to get everything working. Mostly just module namedropping, but very awesome!

      Sending Email in the past: MIME::Lite, Mail::Send, Mail::Sender, Mail::Sendmail, Mail::Mailer, Email::Send

      Email::Sender The future!
      Eail::Sender::Simple for most of us
      Email::Sender::Transport::* is excellent; allows you to easily create new transports for email. Already exist:

      • Sendmail
      • SMTP
      • Persistent SMTP
      • Maildir
      • Mbox
      • DevNull
      • Print
      • Test
      • SQLite

      Programmable failure means you can wrap any transport and make it fail under any conditions (great for testing)
      structured failure, partial success
      Email::MIME::Kit <– most excellent
      SWAK
      EMK::Assembler::Markdown
      Very, very cool stuff.

      This is the kind of thing that makes email work on par with things like Perl based webapps. I’d say that Perl based webapps are mostly a solved problem. Yes we have more elegant ways to do things, but there is very little arcana involved. This makes email like that.

      As a side note, I was trying to install the module (I never did get it working) and after the talk I showed rjbs the error log and when he looked at the terminal he said, “Oh, you’re fREW!” So that was cool. I felt a little famous!

      I’ve now shaken hands with rjbs, Steven Little, mst, castaway, Larry Wall, and more!


      Business Process Management with Workflow.pm

      This talk educated me about the idea of Workflow management in general. It wasn’t extremely exciting, but I can’t imagine a case in which it would be. He had some code, he had some concrete examples, but it’s really just kindav a boring topic. But I still think the idea and the module could be extremely useful at $work. Here is a summary that I think is worthwhile.

      • Benefits
        • Fully document your business process
        • Can keep business rules separate from tools
        • Automate some parts
        • Can discover the state of any work in the system (reporting)
        • Can expose parts to external systems (including other companies)
      • Components
        • Model (Map, Business Process)
        • Workflow Engine
        • Workflow Client
        • Workflow API: Descripe the Workflow
        • Workflow API: Act on incendents
        • Reporting
      • Model
      • Business process described in a config or model
      • Also called workflow or map
      • Determines how incedents (tasks, processes) move from step to step
      • These are your business rules
      • And basically the rest of the talk was specifics. Boring to take notes on, but good ideas. Workflows are basically state machines, and documenting that stuff can really simplify or even change your business model. The slides for this would be great. He has a lot of info about how, for example, most of your time will be spent figuring out undocumented business practices. The code will be easy after that.


        Driving a USB Rocket Launcher from Perl in User Space

        This was way cool! He shot a toy rocket with perl! Slides are a must for this, but I don’t see them yet.


        What Haskell did to my brain

        This one was alright. I expected more revelations, but that may have been unreasonable for a 50 minute talk. A lot of his talk boiled down to: be immutable, and stop worrying about performance.


        Catching a ::Std – Standardisation and best practices in the perl community

        This was mst’s talk that was a segue into the Enlightened Perl Extended Core. It was very similar to chromatics talk in a lot of ways. Here are some major points.

        • What is a standard? Spec, Multiple Implementations, One Way
        • TMTOWTDI BSCIAGTT (bicarbonate) (but sometimes consistency is a good thing though)
        • Four types of standards:
          • Inferred standards
          • invented standards
          • enforced standards
          • evolved standards
        • Perl is an inferred standard
        • TCP/IP is invented; awesome
        • IMAP is invented; zomg terrible but it works mostly
        • Java is enforced; JCP (requires $$$, sketch)
        • POSIX is evolved
        • LSB is evolved
        • Scheme is evolved
        • Perl6 is
          • inferred from perl5
          • invented by larry
          • enforced by standard grammar and test suite
          • evolved based on implementation attempts
        • “best practices”
        • Class::Std: “your code caught a Std!”
        • STD in french is MST. lawlz
        • Socially Transmitted Disease, aka Cargo Culting, but gone good.
        • Enlightened Perl Extended Core
          • what do the experts use?
          • One Good Way (not Only)
        • beware the cargo cult
        • the first few plugins that get written become the template
        • The principles for Std community based creation are a good thing.
        • Maybe you could call this kind of thing whirlpool standardization? I don’t know. Notes were hard to take in this one as it wasn’t very concrete. The slides will be up for sure, but without video they may not be very helpful. We’ll see!


          The EPO Extended Core

          Basically the name says it all. There are a lot of bad modules in the core and a lot of good ones that are not in the core. These should not be added to the core, but instead added to a list of things that are known to be good. It already exists! It just has a weird name: Task::Kensho. Check it out! Use it! Give feedback!


          I almost didn’t go to this one because my brain was so full. I’m glad I did though!

          CHI: Unified caching for Perl

          • Generic caching for perl
          • you can cache all kinds of stuff
            • Templates
            • MVC stuff
            • Sessions
            • ORMs
            • Code Processing
            • Startup Performance things like Moose
          • Lots of backend drivers
            • Memory
            • file fastmmap
            • memcached
            • dbi
            • bdb
            • cachecache
          • super simple to write more drivers
          • avoiding miss stampedes
            • soln 1: probabilistic expiration (expires_variance) so instead of everything expiring at once, one thing probably will expire first
            • soln 2: busy locks
          • avoiding recomputation latency
            • soln 1: background recomputation which manually recomputes value over given time (not done)
            • soln 2: externally initiated recomp (ping the server regularly)
          • Multilevel caches
            • L1 cache in memory and everything else can be in a server or something.
            • Mirrored caches

          And I think that’s it. This summary is huge! Why did I do this?! Sadly, I have to leave tomorrow at 4am for a flight to another trip that I booked on accident. I probably won’t post again until next Monday as I’ll be at a “regular” vacation :-) If I do though it will probably be reactions to some of the stuff I thought about here.

  • 0 Comments
  • Filed under: Uncategorized
  • YAPC Day 1

    Today was the first official day of YAPC. A lot happened! I’ll just document what was interesting :-)

    First there was an intro. The Pittsburgh guys did a lot of work to get it all to work. Enjoy.


    The Perl Foundation has had a big year. Mostly with updating p5 and working on p6. The Parrot Foundation (ParF) got created. Big deal.


    Larry’s talk

    • He barked at us! And then played many other sound effects.
    • Expect the Unexpected
    • Paranoia is necessary for success in modern life
    • P5 is powerful and extensible
    • p6 is more of both, lwall says don’t trust it
    • He listed various and sundry p5 to p6 differences.
    • P6 has great error messages
    • And the rest of the talk was tangents based on specific error messages :-)

    Parrot Foundation

    Lots done. Read This.


    Stuck in a room with Schwern.

    • Wants to make CPAN stable or add recommended packages. Commercial service.
    • PHP does right
      • works out of the box (With a bazillion modules)
      • so typically PHP apps typically work
      • web based configuration
      • Basic OO
    • Why PHP sucks
      • or Those who do not learn LISP are doomed to repeat it
      • PHP has 13 sort functions. Nice.
      • no anonymous functions, so that’s a drag.
      • PHP is like Lua, arrays are a kind of hash
    • Perl 5 + i
      • strict
      • warnings
      • feature ‘:5.10′
      • MooseX::Declare
      • English
      • Scalar::Util
      • List::Util
      • List::MoreUtils
      • IO::Handle
      • autobox
      • autobox::Core
      • Datetime
      • Time::y2038
    • or just: use perl5
    • He also related Agile Dating to polyandry… so that was interesting. The ideas was that people do it wrong and of course it’s not well defined. Yet people assume a definition of course though.
    • Things you know, and things you don’t know: can learn
    • Things you don’t know you don’t know: must learn new things to fix this

    Git is Easy
    This was a basic overview of git. It would be great to get the slides for this one. But I really shouldn’t relate the whole thing here.


    Hacking on Rakudo

    Lots of P6 info. Should be posted on the link below.

    Slides should be here


    KiokuDB

    • Object database. Instead of storing tuples, vanilla data.
    • KiokuDB is actually a frontend that you can use for other DB’s.
    • This could be sweet for arbitrary, malleable datastructures
    • Backends: BerkeleyDB, DBI, Directory::Transactional, CouchDB, Amazon SimpleDB
    • Slides should be here

    CPAN Stats

    • 7477 CPAN Pause IDs
    • 4460 CPAN authoers who have uploaded to CPAN
    • 3017 (obviously) haven’t
    • CPAN is clearly growing.
    • New CPAN authors is consistently increasing.
    • 18085 Distributions
    • 55409 Distribution Vesions
    • 20304 Dists on CPAN Forever
    • 112037 Dist Versions on CPAN Forever
    • 4054659 Testers Reports

    • Dist::Zilla

      • Sweet to decouple install and build process
      • FakePod to pod conversion, etc. Uses and ini file to configure.
        • This will be really cool stuff for releasing perl modules. Check it out on CPAN. I am definately checking this out.


          Dinner with Steven Little

          This wasn’t a talk, it just happened with magic :-) The funny thing was that we talked about KiokuDB the whole time! Also, he didn’t start with perl like a lot of us, but started with JavaScript. I feel like a famous person now! We are actually doing very similar stuff as they are at work.


          Bar with Matthew S. Trout

          Again, this just happened. We talked about all kinds of stuff, but the main thing that should be mentioned here is that if you want to be awesome like mst you should read other people’s code. He mentioned by name Audrey Tang’s code, so yeah.

          Also mst has a scheme to speed up Moose startup to what it would be if you never used it and to reduce memory usage to the same. Very interesting stuff!


          It’s midnight.
          The end.

  • 2 Comments
  • Filed under: Uncategorized
  • YAPC::NA – Day -1: Moose

    Today was the first day (for me) of YAPC::NA. It was pretty cool! A coworker and I convinced our work to pay for us to go to YAPC and go to the Moose Masterclass. The class was very good. I thought that the slides were very complete and that the exercises were great for a professional conference. Basically he would present a major section of Moose (there were 4 or 5 I think) and then he would tell us to get going on the Classes for that given library. We would get instructions from comments in the base unit test file and then we would just run the unit tests to see if we were doing the right thing. There were some discrepancies between the comments in the tests and the tests themselves, but I’d say that’s pretty standard for comments. Anyway, the slides were all just webpages and the rest was of course just perl code. So check it out here!

    I actually found the most intriguing part of the talk to be MooseX::Types. Unfortunately that is not included in the slides linked about as it was done by Jonathon Rockway. I can’t yet find slides for it. But the important thing is that Types are awesome with Moose. It’s fairly trivial to write new types. He wrote a type for Social Security Numbers and then showed us how to use it and how to make a thing that would automatically coerce integers into the SSN type. Very cool stuff! I am very excited for when I get to use that in the future.

    Another thing that must be mentioned. There is always someone in a talk who wants to be heard more than the presenter. Or maybe they just act that way. I don’t know. But we had one of those in our talk. There was a point at which our presenter was showing how to have a singleton as an attribute to a class and apparently this guy zoned out when he was showing it. Furthermore he didn’t notice that the code

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    package Person;
    use Moose;

    my $highlander_bank =
        Bank->new( name => 'Spire FCU' );

    has bank => (
        is      => 'rw',
        default => sub { $highlander_bank },
    );

    had the word highlander in it. Anyway, he tried to correct the presenter about this and before the presenter got a chance to respond MST yelled at the dude and said, “THERE CAN ONLY BE ONE! THAT’S WHY IT’S CALLED A HIGHLANDER!” It was hilarious.

    So yeah, that’s day minus-one for YAPC. I will write about everything I go to so that you can be ok with the fact that you are stuck at work or whatever :)

  • 6 Comments
  • Filed under: Uncategorized