<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bacon and Tech</title>
	<atom:link href="http://www.baconandtech.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.baconandtech.com</link>
	<description>Because everything's better with bacon</description>
	<lastBuildDate>Tue, 12 Jan 2010 07:03:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Array Sorting</title>
		<link>http://www.baconandtech.com/2010/01/12/array-sorting/</link>
		<comments>http://www.baconandtech.com/2010/01/12/array-sorting/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 07:03:13 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=107</guid>
		<description><![CDATA[I have this little sorting problem that had been bothering me for a month, but as it&#8217;s only a minor annoyance, I hadn&#8217;t spared the cycles to work on it.  Last Friday I decided I needed an instant gratification project, and set about solving it.
I have a table that contains hostnames, cards, and the [...]]]></description>
			<content:encoded><![CDATA[<p>I have this little sorting problem that had been bothering me for a month, but as it&#8217;s only a minor annoyance, I hadn&#8217;t spared the cycles to work on it.  Last Friday I decided I needed an instant gratification project, and set about solving it.</p>
<p>I have a table that contains hostnames, cards, and the slots on the host chassis those cards are installed in.  All datatypes are varchars.  The sorting problem arises because I have some cards that are actually installed on other cards;  those are referenced by a slot/subslot designation.</p>
<p>Here&#8217;s some sample data:</p>
<pre>testytest=# SELECT * FROM cards ORDER BY card_slot;
hostname | card_slot |   card_model
----------+-----------+----------------
zucchini | 0         | card
zucchini | 0/0       | daughter card
zucchini | 0/1       | daughter card
zucchini | 1         | card
zucchini | 1/0       | daughter card
zucchini | 1/1       | daughter card
zucchini | 1/15      | daughter card
zucchini | 1/2       | daughter card
zucchini | 17        | something else
zucchini | 18        | something else
zucchini | 2         | another card
zucchini | 3         | another card
zucchini | 4         | another card
(13 rows)</pre>
<p>I&#8217;d like to see 1/15 come after 1/2, and 17 &amp; 18 come after 2, 3, &amp; 4.  (Like I said, it&#8217;s a minor annoyance.  But still an annoyance.)  I need to be able to sort both pieces in numerical order.  I went through some weird gymnastics writing functions to split out &amp; return each piece, but each of my solutions introduced other problems.  (These instant gratification projects so rarely are, eh.)</p>
<p>Before I wrapped things up for the day, I read the PostgreSQL docs about <a href="http://www.postgresql.org/docs/8.3/static/functions-array.html">array functions &amp; operators</a>.  That percolated around in my brain and a solution came to me while I was out hiking over the weekend:</p>
<p>First, I reCAST string_to_array &amp; made it return a set of integers:<br />
<code>CREATE OR REPLACE function foo(varchar(15)) RETURNS integer[]<br />
AS $$<br />
SELECT CAST(string_to_array($1, '/') AS integer[])<br />
$$<br />
LANGUAGE SQL;</code></p>
<p>Since Pg includes &lt; and &gt; array functions, I expected to be able to sort by the array my function returned:</p>
<pre>testytest=# SELECT hostname, card_slot, card_model, foo(card_slot) AS sort_value
FROM cards
ORDER BY sort_value;
hostname | card_slot |   card_model   | sort_value
----------+-----------+----------------+------------
zucchini | 0         | card           | {0}
zucchini | 0/0       | daughter card  | {0,0}
zucchini | 0/1       | daughter card  | {0,1}
zucchini | 1         | card           | {1}
zucchini | 1/0       | daughter card  | {1,0}
zucchini | 1/1       | daughter card  | {1,1}
zucchini | 1/2       | daughter card  | {1,2}
zucchini | 1/15      | daughter card  | {1,15}
zucchini | 2         | another card   | {2}
zucchini | 3         | another card   | {3}
zucchini | 4         | another card   | {4}
zucchini | 17        | something else | {17}
zucchini | 18        | something else | {18}
(13 rows)</pre>
<p>Voila.  Works as expected on my small (~2000 rows) data set.  It also fails as expected when passed bad data (eg something with a text string).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2010/01/12/array-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring!</title>
		<link>http://www.baconandtech.com/2009/11/06/refactoring/</link>
		<comments>http://www.baconandtech.com/2009/11/06/refactoring/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 01:35:51 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[hackathon]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=92</guid>
		<description><![CDATA[Last night at the hackathon,  we refactored one of our queries from my review of Refactoring SQL Applications.*
First, we had a duplicate field name in the original select.  Not a problem if you&#8217;re just doing a select, but if you want to create a table (temp or otherwise) from the data, it won&#8217;t work.  So [...]]]></description>
			<content:encoded><![CDATA[<p>Last night at the <a href="http://calagator.org/events/1250457973" target="_blank">hackathon</a>,  we refactored one of our queries from my review of <a href="http://www.baconandtech.com/2009/06/06/book-review-part-i-refactoring-sql-applications-with-bonus-queries/" target="_blank">Refactoring SQL Applications</a>.*</p>
<p>First, we had a duplicate field name in the original select.  Not a problem if you&#8217;re just doing a select, but if you want to create a table (temp or otherwise) from the data, it won&#8217;t work.  So we replaced the first num_rows with rows_in_bytes.</p>
<p>Also, reading over this 5 months after the original attemp, I realize it&#8217;s a lot clearer if we don&#8217;t use table aliases in the outer SELECTs.</p>
<p>Then, we got some advice from Greg Smith that we shouldn&#8217;t do joins on pg_class.relname &#8211; this can screw you up if you have different schemas with identical table names.  You want to use oids (which I&#8217;d always thought was not desirable, but I&#8217;m assured it&#8217;s ok if you&#8217;re doing it with the system tables &#8211; you don&#8217;t want your application to depend on them, though. <img src='http://www.baconandtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )  So, instead, we match pg_namespace.oid with pg_class.relnamespace.</p>
<p>Selena&#8217;s illustration of how this works:<br />
<code>SELECT relname, relkind FROM pg_class<br />
JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace WHERE relkind = 'r' AND pg_namespace.nspname = 'public';</code></p>
<p>The new &amp; improved version of the query can be found on the <a href="http://wiki.postgresql.org/wiki/Index_Maintenance" target="_blank">Pg wiki</a>.</p>
<p>I wanted to compare the new query against the old, so I created a couple of temp tables containing the results&#8230; and discovered we had a couple of data discrepancies:  a few of our tables were listed twice in the original query results, with different values for num_rows, only one of which was correct for the current schema:</p>
<p><code>portal=# SELECT tablename, rows_in_bytes, num_rows FROM index_experiment_1<br />
WHERE tablename IN  ('detectorid_count','stations','test_agg')<br />
ORDER BY 1;<br />
tablename     | rows_in_bytes | num_rows<br />
------------------+---------------+----------<br />
detectorid_count | 0 bytes       |        0<br />
detectorid_count | 631 bytes     |      631<br />
stations         | 22 bytes      |       22<br />
stations         | 350 bytes     |      350<br />
test_agg         | 0 bytes       |        0<br />
test_agg         | 1386 bytes    |     1386<br />
(6 rows)</code></p>
<p>portal=# SELECT count(*) from detectorid_count;<br />
count<br />
&#8212;&#8212;-<br />
0<br />
(1 row)</p>
<p>portal=# SELECT count(*) from stations;<br />
count<br />
&#8212;&#8212;-<br />
350<br />
(1 row)</p>
<p>portal=# SELECT count(*) from test_agg ;<br />
count<br />
&#8212;&#8212;-<br />
0<br />
(1 row)</p>
<p>It turns out we&#8217;d run into the exact problem that Greg had warned us about.  The additional rows were from identically-named tables in other namespaces.</p>
<p>Find your namespaces:<br />
<code>portal=# SELECT nspname from pg_namespace order by 1;<br />
nspname<br />
--------------------<br />
information_schema<br />
pg_catalog<br />
pg_temp_1<br />
pg_temp_2<br />
pg_toast<br />
pg_toast_temp_1<br />
pg_toast_temp_2<br />
public<br />
selena<br />
wendell<br />
(10 rows)</code></p>
<p>Find your data:<br />
<code>portal=# SELECT count(*) from selena.detectorid_count ;<br />
count<br />
-------<br />
631<br />
(1 row)</code></p>
<p>portal=# SELECT count(*) from wendell.stations ;<br />
count<br />
&#8212;&#8212;-<br />
22<br />
(1 row)</p>
<p>portal=# SELECT count(*) from selena.test_agg ;<br />
count<br />
&#8212;&#8212;-<br />
1386<br />
(1 row)</p>
<p>Note that these match the additional data from our original query.</p>
<p>Thanks, Greg!</p>
<p>&#8211;<br />
<small>* No, I haven&#8217;t finished reading it yet&#8230;I don&#8217;t read during the summer, I ride my bike.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/11/06/refactoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PgWest:  Sunday</title>
		<link>http://www.baconandtech.com/2009/10/19/pgwest-sunday/</link>
		<comments>http://www.baconandtech.com/2009/10/19/pgwest-sunday/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 22:46:20 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=88</guid>
		<description><![CDATA[We arrived at the conference site to find that the XML Data Warehousing had been canceled, so I spent that session in the Hackers&#8217; Lounge attempting to continue work on pg_proctab, while getting kicked off the commie college wireless.
In Lists and Recursions and Trees, Oh My!, David Fetter gave us some example of old kludges [...]]]></description>
			<content:encoded><![CDATA[<p>We arrived at the conference site to find that the XML Data Warehousing had been canceled, so I spent that session in the Hackers&#8217; Lounge attempting to continue work on pg_proctab, while getting kicked off the commie college wireless.</p>
<p>In Lists and Recursions and Trees, Oh My!, David Fetter gave us some example of old kludges to get row numbers out of Pg &#8211; &#8220;Not only is it slow, but it&#8217;s wrong&#8221; &#8211; but you may not notice that subtle wrongness in huge data sets.  This really illustrated the value of testing your data.</p>
<p>After lunch, I went to Josh Berkus&#8217;s 5 steps to PostgreSQL Performance Tuning.</p>
<p>He gave us some rules of thumb for figuring out how much RAM &amp; CPU you need, but also recommends hiring a hardware geek to design your system for you &#8211; because vendors lie. <img src='http://www.baconandtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Try hardware out before you purchase it, or definitely test them within the warranty period.  And, here&#8217;s another use case for pg_proctab (other than my own amusement):  capacity planning.</p>
<p>Tip:  Don&#8217;t use autovacuum for data warehousing applications, or where you have large number of writes happening at once.  Manually vacuum those.</p>
<p>(An additional tip from me:  if you&#8217;re using linux, try increasing the default readahead buffer from 1024K to at least 1M for an ~80% performance improvement.  See our [in]famous file systems talk for the graphs to back this up.)</p>
<p>&#8211;</p>
<p>Thanks for another wonderful conference experience, PgPeeps!  See you again soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/10/19/pgwest-sunday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PGWest:  Saturday</title>
		<link>http://www.baconandtech.com/2009/10/19/pgwest-saturday/</link>
		<comments>http://www.baconandtech.com/2009/10/19/pgwest-saturday/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 22:35:23 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[databases]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=85</guid>
		<description><![CDATA[This past weekend was the 3rd annual PgWest.  The conference moved up to Seattle this year, and I think it was the biggest it&#8217;s ever been.  As usual, there were more interesting talks scheduled than I had time to attend.  (This is the 21st century;  where&#8217;s my time machine?)
For my first tech conferences a few [...]]]></description>
			<content:encoded><![CDATA[<p>This past weekend was the 3rd annual <a href="http://www.postgresqlconference.org/2009/west">PgWest</a>.  The conference moved up to Seattle this year, and I think it was the biggest it&#8217;s ever been.  As usual, there were more interesting talks scheduled than I had time to attend.  (This is the 21st century;  where&#8217;s my time machine?)</p>
<p>For my first tech conferences a few years ago, I only went to sessions that were meaningful for my job.  I&#8217;ve since had a much better time (and learned more) by choosing which sessions I&#8217;ll attend based on the following criteria, in this order:<br />
1) topic interestingness<br />
2) speaker interestingess<br />
3) relevance to my job duties</p>
<p>(See Tips #1 and #2 in Skud&#8217;s recent <a href="http://infotrope.net/blog/2009/10/15/ten-tips-for-tech-conference-attendees/" target="_blank">Ten tips for tech conference attendees</a> post.)</p>
<p>So, right out of the gate at PgWest, I&#8217;m in a python talk* &#8211; Adrian K&#8217;s (of LinuxFestNW fame) discussion on <a href="http://dabodev.com/" target="_blank">Dabo</a>.  Dabo&#8217;s a python desktop framework;  I program primarily in Perl, and I&#8217;ve never touched a desktop app.  Adrian&#8217;s example project was a management system for a plant nursery, which I *do* understand, so I had a point of reference into the material (the methods &amp; options used to track plants made sense to me).  I really wanted to talk to him more about this app, but never caught up with him.  (The hallway track felt kind of rushed for me this time.)  I got a good idea for form validation &#8211; if user tries to enter a blank value where one is not allowed, they get a pop-up immediately and the original text (if there was any) is put back in the field, forcing the user to accept the original input or enter something new before they can proceed to the next field.  This is a step up from giving the user the error message after they&#8217;ve submitted the form.</p>
<p>Next we were on to JD&#8217;s keynote, featuring the usual heckling of and by the podium.</p>
<p>Then Mark&#8217;s &amp; my talk about pg_proctab, which ended with some live demos &amp; some audience participation, the way I like it.</p>
<p>A bunch of us went to lunch at Honeyhole Sandwiches, where I tried the &#8220;Texas Tease&#8221; &#8211; BBQ chicken.  The sandwich was excellent.  I *highly* recommend the fries.</p>
<p>Scott Bailey&#8217;s Temporal Data talk was *packed*.  He talked about the &#8220;period&#8221; datatype, featured in both his own (Chronos) and Jeff Davis&#8217;s PgTemporal project.  You can do unions &amp; intersects on time periods.  I am thinking this would be a useful datatype for searching large tables of log entries.</p>
<p>Based on Scott&#8217;s talk, I decided to go to Jeff&#8217;s &#8220;Not Just UNIQUE&#8221; talk, because he would be discussing this in a little more detail.  This meant I missed the session on backup &amp; recovery.  (See comment above about more material than I can fit in my schedule.)</p>
<p>I spent the last session partly in the hackers&#8217; lounge, working on some pg_proctab wrapper scripts with Mark.</p>
<p>Then it was off to the EDB-sponsored after-party, where I caught up with Lloyd Albin, who <a href="http://pugs.postgresql.org/node/460" target="_blank">spoke at PDXPUG about a year ago</a>.  He brought me up-to-date on the work he&#8217;s done on the project, including a twitter feed to let clients know of updates, which I think is really cool.</p>
<p>&#8211;</p>
<p><small>*Which I was late to, because we were installing the snacks in the Hackers&#8217; Lounge (thanks, Mark!)</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/10/19/pgwest-saturday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDX.pm meeting notes</title>
		<link>http://www.baconandtech.com/2009/10/15/pdx-pm-meeting-notes/</link>
		<comments>http://www.baconandtech.com/2009/10/15/pdx-pm-meeting-notes/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 01:17:33 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[LUGs]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl mongers]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=82</guid>
		<description><![CDATA[Jeff (aka @duckyd) gave a presentation about CPAN Awesomeness at last night&#8217;s pdx.pm.
Slides are on github!  Your homework is to find them.    Here are some highlights.
There are over 16K modules on the CPAN as of 11 Oct 2009.  Wow.
Jeff&#8217;s recommended changes from the default cpan shell configuration:
- auto_commit 1
- prerequisites_policy follow
- build_requires_install_policy yes
- [...]]]></description>
			<content:encoded><![CDATA[<p>Jeff (aka @<a href="http://twitter.com/duckyd" target="_blank">duckyd</a>) gave a presentation about CPAN Awesomeness at last night&#8217;s <a href="http://pdx.pm.org" target="_blank">pdx.pm</a>.</p>
<p>Slides are on github!  Your homework is to find them. <img src='http://www.baconandtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Here are some highlights.</p>
<p>There are over 16K modules on the CPAN as of 11 Oct 2009.  Wow.</p>
<p>Jeff&#8217;s recommended changes from the default cpan shell configuration:<br />
- auto_commit 1<br />
- prerequisites_policy follow<br />
- build_requires_install_policy yes<br />
- prefer_installer MB (Module::Build)<br />
- change your make_install_make_command and mbuild_install_mbuild_command to include your sudo command.</p>
<p>&#8211;</p>
<p>Spend 10 minutes &amp; give something back to CPAN every time you install a module:  Simply set up CPAN::Reporter!</p>
<p>Recommendations:<br />
- make sure that you set cc_author to &#8216;no&#8217;.  (In the latest version, that&#8217;s the default.)<br />
- set it to prompt you to edit/send the report if the tests fail.  This way you can judge if the failure is due to your own<br />
boneheadedness.<br />
- you can set the transport value to a file to run reports without sending them.<br />
- for help:  perldoc CPAN::Reporter::Config</p>
<p>For automatic continuous testing, set up CPAN::Reporter::Smoker.  (Doesn&#8217;t actually install anything, justs runs tests.)</p>
<p>Recommendations:<br />
- don&#8217;t run it as root;  you are the canary in the coal mine.<br />
- create a dedicated user that has essentially no privs on your machine.<br />
- run it on a separate Perl install (core modules only).<br />
- this is a cool place to use that RAND option for prefer_installer in CPAN.</p>
<p>&#8211;</p>
<p>Another cool tip that I REALLY DIG because I have systems with multiple perls &amp; users associated with them:<br />
Set your shebang line to:</p>
<p>#!/usr/bin/env perl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/10/15/pdx-pm-meeting-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My picks for PgWest</title>
		<link>http://www.baconandtech.com/2009/10/13/my-picks-for-pgwest/</link>
		<comments>http://www.baconandtech.com/2009/10/13/my-picks-for-pgwest/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 00:24:37 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=79</guid>
		<description><![CDATA[(I&#8217;ll be missing Friday&#8217;s tutorials.)
Saturday:
9am:  Jeff Davis:  PostgreSQL, Extensible to the Nth Degree.  Jeff&#8217;s talks usually melt my brain, and I like that.
10:15:  Conference Keynote.
11:30am:  Mark Wong: pg_proctab.  Turns out I&#8217;m giving this talk with Mark, even though my name&#8217;s not on the schedule.  I should probably show up.
1:45pm:  Scott Bailey:  Temporal Data or Magnus [...]]]></description>
			<content:encoded><![CDATA[<p>(I&#8217;ll be missing Friday&#8217;s tutorials.)</p>
<p>Saturday:<br />
9am:  Jeff Davis:  PostgreSQL, Extensible to the Nth Degree.  Jeff&#8217;s talks usually melt my brain, and I like that.<br />
10:15:  Conference Keynote.<br />
11:30am:  Mark Wong: pg_proctab.  Turns out I&#8217;m giving this talk with Mark, even though my name&#8217;s not on the schedule.  I should probably show up.<br />
1:45pm:  Scott Bailey:  Temporal Data or Magnus Hagander:  Secure PostgreSQL Deployment.  There will be a coin toss.<br />
3:00pm:  Kevin Kempter:  Backup and Recovery.  There&#8217;s always something else to learn about this topic.<br />
4:00pm:  Bill Karwin:  Practical Full-text Search.</p>
<p>Sunday:<br />
9:00am:  Aaron Sheldon:  XML Data Warehousing.<br />
10:15am:  David Fetter:  Lists and Recursion and Trees (Oh, My!)  I want to learn about Windowing functions, new with 8.4<br />
11:15am:  Matt Smiley:  Basic Query Tuning Primer.  Another topic I could stand to learn more about.<br />
1:30pm:  Tossup between David Wheeler:  pgTAP Unit Testing Best Practices and Josh Berkus:  5 Steps to PostgreSQL Performance.  I&#8217;ll probably go to Berkus&#8217;s talk because Wheeler is a sport about repeating his talks for PDXPUG.</p>
<p>Other fun stuff:</p>
<p>The Hacker lounge will be open for two days of geekery:  7:30 am &#8211; 4:30pm Saturday, and 9-4 on Sunday.<br />
EnterpriseDB has stepped up to provide entertainment after the Saturday sessions.<br />
I haven&#8217;t heard if there are Lightning Talks, but I have a couple of ideas for one.  You should too.</p>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/10/13/my-picks-for-pgwest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are you going to PgWest?</title>
		<link>http://www.baconandtech.com/2009/10/08/are-you-going-to-pgwest/</link>
		<comments>http://www.baconandtech.com/2009/10/08/are-you-going-to-pgwest/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 00:07:40 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[databases]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=76</guid>
		<description><![CDATA[At a loss for what to do next weekend?  Grab your rain gear &#38; head on up to Seattle for PgWest 2009.
There&#8217;ll be three days of talks &#38; tutorials plus a hackers&#8217; lounge.   After-party plans are nebulous at this time, but we are researching options.  (Psst&#8211;pub crawl!)
Come join the fun!
At a loss for what to [...]]]></description>
			<content:encoded><![CDATA[<p>At a loss for what to do next weekend?  Grab your rain gear &amp; head on up to Seattle for <a href="http://www.postgresqlconference.org/2009/west/" target="_blank">PgWest 2009</a>.</p>
<p>There&#8217;ll be three days of <a href="http://www.postgresqlconference.org/2009/west/schedule" target="_blank">talks &amp; tutorials</a> plus a <a href="http://wiki.postgresql.org/wiki/Hackers%27_Lounge" target="_blank">hackers&#8217; lounge</a>.   After-party plans are nebulous at this time, but we are researching options.  (Psst&#8211;pub crawl!)</p>
<p>Come join the fun!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">At a loss for what to do next weekend?  Grab your rain gear &amp; head on up to Seattle for PgWest 2009: http://www.postgresqlconference.org/2009/west/.</p>
<p>Three days of talks &amp; tutorials http://www.postgresqlconference.org/2009/west/schedule plus a hackers&#8217; lounge.  http://wiki.postgresql.org/wiki/Hackers%27_Lounge.   After-party plans are nebulous at this time.  (Psst&#8211;pub crawl!)</p>
<p>Come join the fun!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/10/08/are-you-going-to-pgwest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDXPUG Patch Review Party</title>
		<link>http://www.baconandtech.com/2009/09/23/pdxpug-patch-review-party/</link>
		<comments>http://www.baconandtech.com/2009/09/23/pdxpug-patch-review-party/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 18:30:29 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[LUGs]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Portland]]></category>
		<category><![CDATA[pugs]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=73</guid>
		<description><![CDATA[(just in case you haven&#8217;t read about it yet):
http://pugs.postgresql.org/node/584
]]></description>
			<content:encoded><![CDATA[<p>(just in case you haven&#8217;t read about it yet):</p>
<p><a href="http://pugs.postgresql.org/node/584">http://pugs.postgresql.org/node/584</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/09/23/pdxpug-patch-review-party/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pdx.pm code sprint #1</title>
		<link>http://www.baconandtech.com/2009/07/02/pdxpm-code-sprint-1/</link>
		<comments>http://www.baconandtech.com/2009/07/02/pdxpm-code-sprint-1/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 05:38:35 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl mongers]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=70</guid>
		<description><![CDATA[Hacking on 5.10.1 was the plan&#8230;that happened for a couple of us.  
Duke proposed a PDX.pm sprint to work on 5.10.1:
&#8220;I think if everyone learns how to
a) get a copy of the perl git repo
b) keep it in sync
c) run the perl test suite, including running a single test at a time
d) submit a [...]]]></description>
			<content:encoded><![CDATA[<p>Hacking on 5.10.1 was the plan&#8230;that happened for a couple of us. <img src='http://www.baconandtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://twitter.com/dukeleto">Duke</a> proposed a <a href="http://pdx.pm.org">PDX.pm</a> sprint to work on 5.10.1:<br />
&#8220;I think if everyone learns how to</p>
<p>a) get a copy of the perl git repo<br />
b) keep it in sync<br />
c) run the perl test suite, including running a single test at a time<br />
d) submit a small documentation patch</p>
<p>then we will have a great start.&#8221;</p>
<p>This is perfect for a first sprint: &#8220;<a href="http://opensourcebridge.org/2009/wiki/Effective_code_sprinting">small, solve-able tasks</a>&#8221; that will get everyone up &#038; running, plus have the potential to actually be productive. </p>
<p>Your first code sprint with a new group of people is like the first day on the job&#8230;except nobody realizes that we&#8217;re each FNGs*.  It can take some time to figure out how to work together.</p>
<p>It&#8217;s really great if people get the stuff that&#8217;s going to take time from the code sprint out of the way beforehand.  For example, cloning the perl5 git repo (step a):</p>
<p>:::=>git clone git://perl5.git.perl.org/perl.git</p>
<p>(Took me 13 minutes.)</p>
<p>Duke suggested some advance reading as well &#8211; how to use the repo (cd perl; perldoc pod/perlrepository.pod) (you will need to install perl-doc if you don&#8217;t have it;  it was not installed on ubuntu.)<br />
<span id="more-70"></span><br />
&#8211;</p>
<p>At the sprint:  I don&#8217;t have the necessary experience with git yet, so most of my time was spent learning that, specifically in regards to task b) Keeping your repo in sync.</p>
<p><code>git branch</code><br />
shows me that I am on the blead branch</p>
<p><code>git remote show</code><br />
just an interface into .git/config</p>
<p><code>git pull</code><br />
convenient combination of fetch (from remote) + merge (into local stuff)</p>
<p><code>git pull origin</code><br />
&#8230;by default pulls your current branch.<br />
<code>git pull</code><br />
&#8230;would have done the same thing (depending on your .git/config!)</p>
<p>The blead branch is NOT what perl 5.10.1 is going to be released from, so that&#8217;s not what we&#8217;re going to work with.</p>
<p>Side trip:<br />
Duke has an excellent graphic that he &#038; <a href="http://twitter.com/jhelwig">jhelwig</a> created that illustrates git as applied to the perl development process**.  (I think I convinced them to put it into an actual graphics program &#038; make it available&#8230;)  One of the tips I got from the diagram was that tags are immutable.  They should not move.  If they move, UR DOIN IT WRONG.</p>
<p>perldelta.pod &#8211; manually-maintained (!!!) filed that lists the changes in all versions of Perl.</p>
<p>OK back to work:<br />
How to check out maint 5.10:  (remember, blead is beyond 5.10 &#038; has changes we don&#8217;t need to be concerned with.)</p>
<p><code>git checkout -b</code><br />
&#8230;is a combination of checkout and branch</p>
<p><code>git branch -a</code><br />
&#8230;shows me all the branches I have locally.</p>
<p>I want to create a *local* tracking branch for 5.10 maint.</p>
<p>git branch [whatever I want to call it] [branch I want (or anything that can uniquely id a commit!)]<br />
eg:<br />
<code>git branch maint-5.10 origin/maint-5.10</code></p>
<p>Tip:<br />
<code>git config --global color.ui auto</code><br />
- git branch -a &#8211; local branch is white, currently checked-out is green, remotes are red.</p>
<p>THEN I need to actually check out the local tracking branch (ie switch to it)<br />
git checkout [name I gave it]<br />
eg:<br />
<code>git checkout maint-5.10</code></p>
<p>git checkout -b maint-5.10 origin/maint-5.10 is a shortcut for the above two steps.</p>
<p>&#8211;<br />
c) run the perl test suite, including running a single test at a time</p>
<p>For reference:<br />
:<code>::--> uname -a<br />
Linux princess 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686 GNU/Linux</code></p>
<p>First, you have to build (opts from <a href="http://twitter.com/schwern">Schwern</a>, modified)<br />
<code>sh Configure -Ode \<br />
 -DDEBUGGING \<br />
 -Dprefix=/usr/local/perl/maint-5.10 \<br />
 -Dusedevel \<br />
 -Duseithreads \<br />
 -Dccflags='-I/usr/local/include -I/opt/local/include -I/sw/include' -Dldflags='-L/usr/local/lib -L/opt/local/lib -L/sw/lib' \<br />
 -Dlibpth='/usr/local/lib /opt/local/lib /sw/lib /usr/lib' \<br />
 -Uversiononly \<br />
 -Uinstallusrbinperl $@</code></p>
<p>- DEBUGGING builds the debugging symbols<br />
- usedevel is required or configure will BITCHBITCHBITCH.<br />
- useithreads enables one interpreter thread to do something I hope I don&#8217;t ever have to deal with.  Or something.</p>
<p>Then:<br />
<code>TEST_JOBS=9; export TEST_JOBS #parallelizes your tests<br />
make test</code><br />
to compile perl and then run the tests.  This takes a while.  Grab a beer.  In fact, grab a pitcher.  Pay attention though, because a failing test here might be something interesting to patch.</p>
<p>make test TEST_FILES=[file] to run a single test.<br />
e.g.:<br />
<code>make test TEST_FILES=t/pod/podselect.t</code><br />
This turned out to be unreliable because it&#8217;s running through all the dependencies first.  Bleah.</p>
<p>This is a better method:<br />
<code>cd t; ./perl TEST ./pod/podselect.t</code><br />
Although Duke had problems with the debugger tests.</p>
<p>Remember TEST tries to cd to ./t, so you need to give your path relative to that.<br />
(@Theory has more about this in <a href="http://justatheory.com /computers/programming/perl/build-5.10-from-git.trackback">his blog</a>.)<br />
(This is actually covered in perlhack, we just didn&#8217;t find it in time.)</p>
<p>&#8211;<br />
Another tip:<br />
get the name of your branch on your prompt.  You need __git_ps1.  Which is&#8230;somewhere halfway through the second pitcher.</p>
<p>Then add that var to your bash prompt whereever you&#8217;d like it:<br />
$(__git_ps1 &#8220;(%s) &#8220;)<br />
&#8230;the (%s ) is just my preferred formatting.  The whole thing looks like this:<br />
PS1=&#8217;\n\u@\h\w/\n$(__git_ps1 &#8220;(%s) &#8220;):::&#8211;> &#8216;</p>
<p>You can get some pretty colored output with this:<br />
https://launchpad.net/~git-core/+archive/ppa</p>
<p>&#8211;<br />
<code>git shortlog:</code><br />
shows you the commit messages, grouped by author.  Useless if you&#8217;re looking for anything other than &#8220;a bunch of people did things.&#8221;</p>
<p><code>git shortlog -se:</code><br />
number of commits, grouped by unique author + email.</p>
<p><code>git log --pretty=oneline maint-5.10..blead</code><br />
&#8230;shows you the differences between two versions.  In the perl source, there may be duplicates (different commit ID for same commit.)</p>
<p>&#8211;<br />
Now let&#8217;s actually *do* something.<br />
<a href="http://rt.perl.org/rt3/Public/Search/Simple.html?Query=MemberOf=66092%20AND%20Status!=%27Resolved%27">Stuff that&#8217;s holding up perl5.10.1</a> (I think)<br />
Other stuff is in perltodo, but I&#8217;m not seeing anything that I&#8217;m actually up for given my skillset &#038; current BAC.</p>
<p>I need to look for a doc to patch.</p>
<p>&#8211;<br />
Annnnnd we decided to go to whiffies for pies. <img src='http://www.baconandtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>More later!  This is going to be a regular event.</p>
<p>&#8211;<br />
<small><br />
* F&#8217;ing New Guy.<br />
** Keep in mind that I am slightly more familiar with the Postgres release process &#038; was expecting something similar.<br />
</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/07/02/pdxpm-code-sprint-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSBridge Recap</title>
		<link>http://www.baconandtech.com/2009/06/20/osbridge-recap/</link>
		<comments>http://www.baconandtech.com/2009/06/20/osbridge-recap/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 00:52:07 +0000</pubDate>
		<dc:creator>gabrielle</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Talks We've Given]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[link salad]]></category>
		<category><![CDATA[nms]]></category>
		<category><![CDATA[OSBridge]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.baconandtech.com/?p=68</guid>
		<description><![CDATA[This week I attended Open Source Bridge here in Portland.
Typically, I managed to miss the keynotes both days.  There is something about conferences which makes me sleep through my alarm.
It was really hard choosing which talks to attend.  The results of the coin toss:
Wednesday:
Tcl/Tk: Grandpa might be old, but he can still kick [...]]]></description>
			<content:encoded><![CDATA[<p>This week I attended <a href="http://opensourcebridge.org/">Open Source Bridge</a> here in Portland.</p>
<p>Typically, I managed to miss the keynotes both days.  There is something about conferences which makes me sleep through my alarm.</p>
<p>It was really hard choosing <a href="http://www.baconandtech.com/2009/05/08/betcha-cant-eat-just-one/trackback/">which talks to attend</a>.  The results of the coin toss:</p>
<p>Wednesday:<br />
<a href="http://opensourcebridge.org/sessions/24">Tcl/Tk: Grandpa might be old, but he can still kick your ass</a>!  I went to this primarily because I use Expect so much.  (Well, I use Expect.pm, but I remember my roots.)  Webb gave a good intro to Tcl/Tk (&#8221;Tickle-Tea-Kay!&#8221;) despite some initial technical difficulties.  I finally figured out the brackets vs braces variable expansion.</p>
<p>Then I gave <a href="http://opensourcebridge.org/sessions/115">my talk</a>.  Thankfully, Impress <a href="http://twitter.com/gorthx/statuses/2203565011">did not surprise me</a>.  I now have my <a href="http://tagal.us/tag/unicornlaw">unicorn badge</a>.</p>
<p><a href="http://opensourcebridge.org/sessions/25">Spindle, Mutilate, &#038; Metaprogram</a>:  This was really cool, although it seemed similar to things that came out of the Perl community a few years back.  I&#8217;d like to see a throwdown between Markus Roberts &#038; Damian Conway.</p>
<p><a href="http://opensourcebridge.org/sessions/216">Assholes are killing your project</a>:  I only managed about 20 minutes of this talk before I got too depressed &#038; had to leave.  Sorry, Donnie!  We&#8217;ll talk about this later.</p>
<p>I spent some time in the hall track &#038; then hit the yoga session.  This was an excellent pick-me-up after a day of talking and brain-filling, and set me up for my BoF and then some time at the pub.</p>
<p>Thursday:<br />
Arrived too late for chromatic&#8217;s <a href="http://opensourcebridge.org/sessions/175">Intro to Parrot</a> so hung out in the speaker lounge and watched Andy and Irving&#8217;s run-through of <a href="http://opensourcebridge.org/sessions/134">Virtualize vs Containerize:  Fight!</a>  I love the mashups.</p>
<p>Next up was Emma McGratten&#8217;s <a href="http://opensourcebridge.org/sessions/131">Ask Forgiveness not Permission</a>, which had a lot of excellent reasons (financial &#038; otherwise) for using open source, but not many tips on how to subversively bring it into your organization.  I&#8217;m sure I know someone who could give a talk about that. :cough:</p>
<p>Lunch today was the excellent <a href="http://www.koifusionpdx.com/">KOiFusionPDX Food Cart</a>!  They came to the conference site &#038; provided excellent korean tacos.  (Yeah, I know, sounds weird &#8211; but TRUST ME.)</p>
<p>Speaking of trust&#8230;<a href="http://opensourcebridge.org/sessions/252">Trust the Vote</a> sounds like an excellent project.  Unfortunately the question period started devolving into political discussion, and I didn&#8217;t want to just dive right in there and ask them why the hell they&#8217;re using MySQL instead of PostgreSQL.</p>
<p>Maria Webster got her unicorn badge for <a href="http://opensourcebridge.org/sessions/213">Faking it Till I Make It</a>.  Check out <a href="http://www.dotfiveone.com/">her blog</a> to see what geeky women are up to.</p>
<p><a href="http://opensourcebridge.org/sessions/37">bzr vs git smackdown</a> with Selena &#038; Emma.  I&#8217;ve already made up my mind (git all the way!), but it&#8217;s good to listen to alternatives.</p>
<p>The Meditiation for Geeks session didn&#8217;t go too well for me, because I was so tired that any time I got close to The Zone, I almost fell over onto a fellow PostgreSQL Smurf.  Still, the yoga &#038; meditation sessions are a great way to unwind prior to the post-con socializing &#038; I&#8217;d like to see more of this.</p>
<p>Pg took over the room &#038; had our <a href="http://pugs.postgresql.org/node/553">PostgreSQL BoF</a>, which replaced the regular PDXPUG meeting. </p>
<p>Josh Berkus was riding a bicycle around town, which made me <a href="http://twitpic.com/7ryy1">inordinately happy</a>.  I want to see if we can provide more bikes for attendees next year.</p>
<p>Friday:  The Unconference rocked my socks:<br />
1. Emma Jane&#8217;s &#8220;Playing with yourself&#8221; about Open Source documentation teams.  I am even sadder that I missed <a href="http://writingopensource.com/">WOSCON</a>.  This got me totally excited to contribute to docs.  (Especially for certain Perl modules &#8211; but that&#8217;s a discussion for another post.)  Highlights:  the conference team is working on a style guide, and a library of personas (which isn&#8217;t public yet)</p>
<p>2. I signed up with <a href="http://dayon.org/">DayOn</a>, a local volunteer effort.  This will be fantastic once we can get people trained in what&#8217;s actually reasonable to ask for.</p>
<p>3. I did a Network Management Basics talk (&#8221;FCAPS:  What the hell?!?&#8221;) with <a href="http://twitter.com/jkeroes">Ua</a> and <a href="http://twitter.com/robotadam">Adam</a>.  We talked about the FCAPS model &#038; where various tools we use fit.  A very high percentage of them are rrdtool-based, so we talked about that a bit as well.  Adam showed us his munin install.  I keep trying to find other people in town who are as into Net Management as I am&#8230;I sort of feel like I need a 12-step program sometimes.  On the way out, Ua proposed a Super-Sekrit project which we&#8217;ll start working on in September.  (Excitement!)</p>
<p>&#8212;<br />
I saw up-close what it took to put on this conference and I&#8217;d like to congratulate the organizers on their success!  Great job, and can&#8217;t wait until next year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baconandtech.com/2009/06/20/osbridge-recap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
