canspice.org

home about code feeds archives links

Archive for the 'OSCON 2007' Category

OSCON 2007: Building Domain Specific Languages in Perl, by Jesse Vincent

Domain specific languages are little languages built for specific programming tasks. You might want to use them because they’re easier to read, they’re expressive. SQL is an example of a DSL for dealing with relational datasets. Excel macros are a DSL for working with numbers and spreadsheets. XSLT is a DSL for transforming XML.

DSLs can be called by your host language, and they’re called “internal” DSLs. Most of everything in this talk will be an internal DSL. The Ruby community is big on DSLs and says that you can’t do them with Perl, but you can!

A DSL exists for declaring database schema, similar to Rails. One exists for web templating, one exists for dispatching HTTP requests, and one exists for making web testing easier.

Jifti::DBI::Schema is a very nice implementation of describing a schema.

Template::Declare is a pure Perl templating system. The two big Perl templating systems, Template:: and HTML::Mason, are either not Perl or are full of HTML. Why learn another language? Template::Declare looks very useful for prototyping HTML in Perl. There are a few little things it can’t do (like make a tr equivalent) (edit: yes, it can, it uses row, and also cell for td tags; see comment below), but all in all it’s very nice.

Test::WWW::Declare is a readable language for testing web interactions. You can do things like content should match qr{RT Essentials}i, which is pretty cool.

DSLs are tougher to debug. Errors can sometimes be confusing. But they make coding fun and can introduce programming to non-programmers.

Tags: , , , , ,

OSCON 2007: wxPerl: Agile Cross-Platform GUI Development, by Eric Wilhelm

wxPerl is an extension module that allows you to develop graphical user interfaces (or GUIs) in Perl. It’s multi-platform, uses native widgets, it’s object oriented and event driven. It runs on heaps of platforms. Why would we want to develop local desktop apps? To take advantages of local machine resources, to keep data private, etc. wxPerl is apparently hard to install, but it’s made improvements recently. wxGlade can be used to make a GUI, but there are a lot of problems with the auto-generated code it produces. Once you’ve figured out how to get started, don’t take the one-page academic example and transform that into an architecture. Use modularity, subclassing, traits, named subprocesses, and exert discipline. There was more to this presentation, but I zoned out.

A question from the audience raised the point that the documentation is more geared towards C++ programmers, and it doesn’t sound like there’s going to be a change to this. If you’re struggling you could use wxGlade and try to go through the code that it generates, but it’s pretty hairy and your eyes might bleed.

Tags: , , , ,

OSCON 2007: Thursday Keynotes

The first keynote is about getting a different kind of person interested in and using Open Source. Ben Fry started out talked about visualizing data, showing a branching graph representation of an Apache log file. His keynote is about Processing, a programming environment for teaching, visualizing, and graphing. It’s a domain-specific language for graphing, and includes hooks for interactivity. Baseball salaries, interactive Grass display, airplane flight tracking, all done with Processing.

The next speaker, according to Nat, is going to make our brains function in a completely different way. Robin Hanson presents Understanding Bias. We, as humans, have a set of cognitive biases, systematic tendencies that make our errors go up. Wishful thinking is an example of one of these biases. Because of these biases, things go wrong. Schedules go late. The “not built here” belief is rampant. We’re in a world of polarized opinion because we think we’re better than other people, therefore we disagree. In fact, even though we know we have biases, we usually project those biases on other people more strongly than on ourselves, so we think we’re correcting for them, but we aren’t. So why do people let these biases continue? They can help us as individuals, but there’s a societal cost. Should your top cause be Truth and the others be subsidiary? Bottom line: we’re all biased, and even if we know we’re biased and have taken steps to deal with those biases, we’re more biased than we think.

Bill Hilf (or, as Nat says, “our man on the inside”) is from Microsoft and is talking about the last year of Open Source at Microsoft. Microsoft is a big company, going from Windows and Office to entertainment devices, CIO software, research and development… Microsoft is entering a collaboration with Drupal… They’re going to be working with OSI in getting their “shared source” licenses proclaimed as open source. microsoft.com/opensource is live now.

Rick Falkvinge, the founder of the Pirate Party (see also the Wikipedia entry), talks about Copyright Regime vs. Civil Liberties. The Pirate Party exists to rail against copyright, which they feel is a commercial monopoly. Today, because you’re not allowed to send copyrighted materials to someone else, that means that to prevent copyright infringement, private communications need to be monitored. This leads to problems with whistleblowers and self-censorship. Society needs to choose between privacy and copyright. This is what the copyright fight is about: civil liberties, not about economics. Politicians do not understand this, but the copyright industry definitely does. This shows when they lobby for things like four years of prison for filesharing, which they tried to do in Europe. Even though the Pirate Party didn’t get a lot of votes in 2006 (0.63%), they’ve influenced other parties — the Norwegian Liberal party used the same copyright platform as presented by the Pirate party. How can a 4% party have influence? Sweden has primarily two parties that split the vote, and the Pirate Party wants to be a wedge between them.

Steve Yegge from Google is up in a technical glitch storm, talking about how to ignore marketing and become irrelevant in two simple steps. Branding isn’t something we talk about very much. As programmers we think that if we write a really good product it’ll be used and become popular. “Introducing New Coke is like introducing New God.” He’s talking about why Coke introduced New Coke, because their blind taste tests showed that New Coke tasted better than Coke Classic, yet people liked Coke Classic better when they knew what they were drinking — showing that branding matters. A brand, in geek terms, is a pointer, it’s an identifier that’s a placeholder for some word in your mind (like how Kleenex is a placeholder for a tissue). How do you make a brand? Through publicity, not through advertising. Perl and Rails are two good brands. And brands are immutable, once your brand is established it’s set. Two problem brands in the IT world are JavaScript and open source licenses (GPL is the brand). The biggest problem brand is “Open Source”, which has become a brand that doesn’t have a strong hold on peoples’ minds.

Tags: , , , , , ,

OSCON 2007: SUN CAN HAS CRAPPY PARTIEZ

Sun threw a party last night that was, on the grand scheme of things, fairly crappy. The guys pouring the beer didn’t have a clue, so I got a half a cup of foam. They had ping pong balls but no ping pong tables. The food was medium-to-high end buffet finger food, including a ‘build-your-own-sandwich’ section (as long as you wanted meat and mustard…I didn’t see any vegetables but someone can correct me if there were some there). The music was horribly balanced, resulting in bass bass bass. It was in a converted parkade, and by “converted” I mean “nothing’s changed except rug on the floor”. And they had plastic big-wheel tricycles there that the wheels kept falling off of.

I’ll leave it to the reader to draw parallels between Sun and the tricycles.

Edit: By the way, the title refers to the ad for the Sun OSCON BoF. lolcats has totally jumped the shark.

Tags: , , , ,

OSCON 2007: Machine Learning Made Easy With Perl, by Lino Ramirez

Key lesson: computers should empower people, not replace them.

Machine learning is a three phase process: preparation, modelling, and implementation. These three phases overlap.

Actually, just go read Al’s coverage or Chris’s coverage. :-)

Tags: , , , ,