The Style of Style Guides

*
Accepted Session
Short Form
Beginner
Scheduled: Wednesday, June 27, 2012 from 11:00 – 11:45am in B302/303

Excerpt

When you code, should you indent 2, 4 or 8 characters? Where should you put the braces? What should your variables and functions be named? Is it worth having an argument about any of this?

This talk offers an analytical approach to deciding which elements of style will benefit your code. We'll discover which is the "best style" and which is the style you should use.

Description

Why do we have coding styles? “To make the code easier to read”, but how do you do that? If you don’t understand what makes code easier to read, you can’t choose a style.

When you code, should you indent 2, 4 or 8 characters? Where should you put the braces? What should your variables and functions be named? Is it worth having an argument about any of this? Without an understanding of style, it descends into preference and imitation.

This talk offers an analytical approach to deciding which elements of style will benefit your code: which will avoid bugs; which are worth arguing about; and which should be left alone. These are tools you can use to craft your project’s style guide. We’ll discover which is the “best style” and which is the style you should use.

Whether you’ve been coding for decades or have just started reading code, this talk is for you.

Speaking experience

Schwern has been speaking at Open Source conferences for over 12 years including OSCON, Open Source Bridge, LCA, OSDC and Kiwi Foo.

A sampling of videos of Schwern's talks:
http://www.youtube.com/watch?v=9smvof85xOc
http://video.google.com/videoplay?docid=-5248422316660075262
http://blip.tv/open-source-developers-conference/git-for-ages-4-and-up-4460524

Speaker

  • Schwern round tuit oscon 2005

    Biography

    Schwern has a copy of Perl 6, he lets Larry Wall borrow it and take notes.

    Schwern once sneezed into a microphone and the text-to-speech conversion was a regex that turns crap into gold.

    Damian Conway and Schwern once had an arm wrestling contest. The superposition still hasn’t collapsed.

    Schwern was the keynote speaker at the first YAPC::Mars.

    When Schwern runs a smoke test, the fire department is notified.

    Dan Brown analyzed a JAPH Schwern wrote and discovered it contained the Bible.

    Schwern writes Perl code that writes Makefiles that write shell scripts on VMS.

    Schwern does not commit to master, master commits to Schwern.

    SETI broadcast some of Schwern’s Perl code into space. 8 years later they got a reply thanking them for the improved hyper drive plans.

    Schwern once accidentally typed “git pull —hard” and dragged Github’s server room 10 miles.

    There are no free namespaces on CPAN, there are just modules Schwern has not written yet.

    Schwern’s tears are said to cure cancer, unfortunately his Perl code gives it right back.

    Sessions

      • Title: Text Lacks Empathy
      • Track: Culture
      • Room: B202/203
      • Time: 2:303:15pm
      • Excerpt:

        Have you ever written a nice friendly email and gotten a reply that seems like they read a whole different email?

        Textual communication has special problems. This talk will help you mitigate them: ensuring that what you mean to say is what is understood; interpreting messages that seem totally out of whack; and increasing empathic bandwidth.

      • Speakers: Michael Schwern, Noirin Plunkett
      • Title: The Style of Style Guides
      • Track: Chemistry
      • Room: B302/303
      • Time: 11:0011:45am
      • Excerpt:

        When you code, should you indent 2, 4 or 8 characters? Where should you put the braces? What should your variables and functions be named? Is it worth having an argument about any of this?

        This talk offers an analytical approach to deciding which elements of style will benefit your code. We’ll discover which is the “best style” and which is the style you should use.

      • Speakers: Michael Schwern