afongen
Sam Buchanan's weblog.

Monday at OSCON

The first day of tutorials has passed. I'm still plugging away on that overdue project, but after tonight I should be set.

The "Mastering Data Structures and References in Perl" tutorial was everything I'd hoped it to be. As I wrote earlier, I've used references and complex data structures in the past, but especially with OOP it never quite seemed natural, I didn't grok them. Almost every time, I have to slowly think through how to dereference a complex hash of hashes of arrays or whatever. Paul Grassie's session helped to clarify some things for me, especially the dereferencing syntax, so I am not more confident in what I'm doing. Good.

I wonder if the advent of the Schwartzian Transform was a eureka moment.

That, by the way, is another one of those things that I've read numerous explanations of without ever really feeling like I got it, until sometime in the past year. I think I've used a Schwartzian Transform exactly once. The explanation in Effective Perl Programming is what finally did it for me.

I've set some goals for myself, some of which I'll discuss in the coming days. One of them is to become more familiar with the modules in the standard distribution of Perl, as well as some of the more popular and useful ones from the CPAN. Things like Data::Dumper and File::Find. I'm not very good about taking the time to go find modules that will help me solve a problem because someone else already has. I don't mean stuff like XML parsing or FTP or LDAP connections, for which I obviously turn to CPAN. I mean "everyday" stuff like disk I/O or data structure interaction, for which there are some nifty modules. I must get better about using those. It will make me a better programmer.

It also occurred to me during the session that no matter how much I use other languages because they're better suited to a particular problem, at heart I just so much prefer Perl.

The next tutorial, Jeremy Zawodny's MySQL Optimization, was also excellent. His is a practical approach. He didn't just cover server or query optimization, he hit a number of different areas where bottlenecks can occur, including database and application design, hardware & operating system tuning, etc. I like his attitude: don't overdesign, do what works to get your job done. Don't, for instance, index columns until you need to. Start with MyISAM tables for most things, convert to new table types if you need to. (This is reminiscent of the idea that when coding, one shouldn't spend huge amounts of time optimizing a particular algorithm if it will end up having negligible impact on the overall code efficiency. Algorithms are not often where the bottlenecks are.) Even beyond his practical advice, this was a very informative session.

A few disjointed thoughts:


So I'm liking it here. Tomorrow, "Migrating to Apache 2.0" and "Transitioning to mod_perl Handlers". And the State of the Onion, and maybe some exploration of San Diego. I've still gotta hit the beach, or my coworker Stacy will have my head.