Uncategorized

Oslo QA hackathon wrapup

May 22, 2008 Uncategorized 1 comment

In April, a dozen or so folks interested in Perl and testing got together in Oslo, Norway for a hackathon. This video gives a recap of what they accomplished.

[vimeo http://www.vimeo.com/1043143 w=400&h=225]
Oslo QA Hackathon,
Closing Remarks
from Stonehenge on Vimeo.

Nice way to recap the proceedings!

Post-Its from BarCampPortland

May 4, 2008 Uncategorized 3 comments

Selena Deckelmann has come back from BarCampPortland with copies of every Post-It on the topic selection board. The topic selection board at an unconference like a BarCamp is where people write on a Post-It a topic they’d like to see presented, and put it on a board for all to see. Whichever topics people vote for are the topics that are presented.

Scanning through the photoset on Flickr is fascinating, as these often are. Topics range from Pirates Paying Artists to WordPress as CMS to How to lie with statistics to Should we replace Congress with a wiki?

Also fascinating to see how widespread Twitter has become, with half the Post-Its leaving @usernames as contact information.

Makes me want to start up a Bar Camp Chicago. And move to Portland.

Follow Perlbuzz on Twitter

April 28, 2008 Uncategorized 1 comment

I’ve created a Twitter feed for Perlbuzz. I’m going to start posting links there on cool things I find throughout the day, but that don’t merit a full-blown Perlbuzz or Mechanix story.

Eventually I’ll have all Perlbuzz and Mechanix stories posted there automagically, too.

Looking after your bugs with Request Tracker

April 24, 2008 Uncategorized 5 comments

Linux Magazine has a big introductory article called Looking after your bugs with Request Tracker. RT is the bug tracking system used for
Perl 5,
Parrot,
Perl 6 and all the CPAN modules, at least by default.

The problem with “same terms as Perl” licensing

April 10, 2008 Uncategorized 2 comments

Shlomi Fish brought up an angle to the problem with slapping a boilerplate “same terms as Perl itself” at the bottom of your modules when you distribute them: Which version of Perl do you mean?

For me, I’ve used that line out of laziness, because I didn’t care to think too much about specifics of the details. Now I’ll be going back and specifying in my modules.

Sloppy and lazy database handling: PHP’s shortcomings, part #47

March 14, 2008 Uncategorized 10 comments

Here’s yet another reason why PHP is deficient when it comes to doing Real Work with Real Databases.
We’re currently working on a PostgreSQL-based database with six million book records. We want to walk
the book table and slurp up the rows as we go. The code looks like this.

$sql = 'select field1, field2, ... field8 from book';
$set = pg_query( $sql );
while ( $row = pg_fetch_row( $set ) ) {
// Do some processing
}
pg_free_result( $set );

Nothing crazy, right? I’m just walking the table, one row at a time. However,
the PHP PostgreSQL functions slurp up
all six million rows, even though my calling code doesn’t need to see all the rows at once.
This eats up tons of RAM and makes us worry about memory allocation for the PHP process.
too bad for us users! We can’t even get to the first pg_fetch_row() call because the pg_query slurps up all the rows immediately.

Now, there IS functionality where you can retrieve a given row, like:

$row = pg_fetch_row( $set, $rowno );

In this case, it’s necessary to iterate to that given $rowno, but even then you wouldn’t have to get to the end of the dataset.

If that’s not lazy enough coding on the back end, check out
this little nugget from the docs for the pg_free_result
function:

pg_free_result() frees the memory and data associated with the specified PostgreSQL query result resource.

This function need only be called if memory consumption during script execution is a problem. Otherwise, all result memory will be automatically freed when the script ends.

The PHP docs encourage sloppy coding. Rather than promoting good, safe programming behaviors, they’re saying “Eh, no big deal.” It’s like the PHP team knows that
PHP won’t be used on large datasets, and it becomes a self-fulfilling prophecy.

PHP needs to be left to the ghetto of guestbooks and the odd bulletin board system. Leave the real work to the real languages.

Update your copies of DateTime::TimeZone

December 28, 2007 Uncategorized No comments

Liz Cortell writes in with important updates to your time modules:

Whether travelling, calling overseas or maintaining software, time zones are always a headache. DateTime::TimeZone has seen a couple of changes this month.

0.70, released December 3, was changed to incorporate Hugo Chavez’s declaration of a new time zone for Venezuela.

0.71, released today, “Fixes a major bug in the generation of time zone data. This bug affected any time
zone that has more than one rule (most of them) and currently has no DST changes (many of them). An example would be America/Caracas. The symptom would either be mistakes about the current time zone or bogus exceptions when trying to create a local date.”

Reminiscences of Perl

December 20, 2007 Uncategorized No comments

chromatic is looking for stories of Perl over the last 20 years

As you may know, Perl is now 20 years old. In lieu of buying her a beer and waiting around for a year, I’m looking for interesting stories and memories to collect and post on a Perl-related website with a very nice and short domain name in the next couple of days. Please send them to chromatic@oreilly.com, along with a one sentence biography.

I don’t have any that come to mind, but I do remember getting turned on to Awk and its associative arrays, now called hashes in Perl. To a C programmer in the late 80s, the ability to index an array BY A STRING blew my mind.

There is no zeroth century

December 18, 2007 Uncategorized No comments

From the PostgreSQL date functions reference:

The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 to 1. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.

Tomorrow’s a big day!

December 17, 2007 Uncategorized 6 comments

Tomorrow is a big day for our little language. Stay tuned for news.

tpf-onion-cake.jpg