From david.romano at gmail.com Tue Jun 12 01:13:39 2007 From: david.romano at gmail.com (David Romano) Date: Tue, 12 Jun 2007 01:13:39 -0700 Subject: [Oc-pm] Meeting Notes In-Reply-To: <20070525062645.GB27744@www.unobe.com> References: <20070525062645.GB27744@www.unobe.com> Message-ID: <20070612081339.GC12563@www.unobe.com> David Romano wrote on Thu, May 24, 2007 at 11:26:45PM PDT: > ... > > - HOP & the Y Combinator > I brought HOP along with Programming Perl, and we discussed the > great ideas it contains, but lack of abstraction that the > Iterator* modules provide. We agreed that we usually just used > bits and pieces of what was described in the book, and morphed > it to suit the problem at hand. I just noticed someone uploaded Iterator::Simple[1], which seems useful more useful. It's the grab bag of stuff that HOP discusses wrt iterators, but without class stuff. Besides that, is anyone down for meeting up in next week? I'm free Monday(18th), Wednesday (20th), and Thursday(21st) evenings. Also, I noticed Ben Tilly posted a public response to Steve McConnell's latest book[2] about estimating costs and time schedules for software projects. [1] http://search.cpan.org/~rintaro/Iterator-Simple/ [2] http://use.perl.org/~btilly/journal/33489 - David -- "What you'll feel in the dumpp tomorrow is what God sees every day. I think we all look the same to Him, covered in ash and dust. When you hug a dirty child without recoiling, you're doing what God does to us. We're dirty, but He loves us anyway. That's unconditional love. That's grace." -- Brad Corrigan in Managua, Nicaragua (recounted by Jason Boyett) From btilly at gmail.com Tue Jun 12 13:51:08 2007 From: btilly at gmail.com (Ben Tilly) Date: Tue, 12 Jun 2007 13:51:08 -0700 Subject: [Oc-pm] Meeting Notes In-Reply-To: <20070612081339.GC12563@www.unobe.com> References: <20070525062645.GB27744@www.unobe.com> <20070612081339.GC12563@www.unobe.com> Message-ID: On 6/12/07, David Romano wrote: > David Romano wrote on Thu, May 24, 2007 at 11:26:45PM PDT: [...] > I just noticed someone uploaded Iterator::Simple[1], which seems useful > more useful. It's the grab bag of stuff that HOP discusses wrt > iterators, but without class stuff. Besides that, is anyone down for > meeting up in next week? I'm free Monday(18th), Wednesday (20th), and > Thursday(21st) evenings. I'm up for it, particularly if it is near the northern end of OC. (I'm coming from Torrance and have to head back to Long Beach.) > Also, I noticed Ben Tilly posted a public > response to Steve McConnell's latest book[2] about estimating costs and > time schedules for software projects. > > [1] http://search.cpan.org/~rintaro/Iterator-Simple/ > [2] http://use.perl.org/~btilly/journal/33489 I did, I did. And I had hoped that it would stimulate more discussion than it apparently did. I'm willing to talk about it over dinner, but since my copy has already been lent out, I probably can't refer to the actual book unless someone else brings a copy. Cheers, Ben From peter.t.wilson at gmail.com Tue Jun 12 21:03:18 2007 From: peter.t.wilson at gmail.com (Pete Wilson) Date: Tue, 12 Jun 2007 21:03:18 -0700 Subject: [Oc-pm] Meeting Notes In-Reply-To: References: <20070525062645.GB27744@www.unobe.com> <20070612081339.GC12563@www.unobe.com> Message-ID: <4c3ca8c50706122103o1d65f1bdl5968b42246d2330d@mail.gmail.com> I would probably be able to meet Mon, Wed or Thurs night next week. Last time we met at Pannera Bread in orange. Would we meet there again? I'd be willing to to travel north a bit if it made it possible for Ben to come. [1] http://maps.google.com/maps?f=q&hl=en&q=panera+bread+2214+N+Tustin+St,+Orange,+CA -Pete From david.romano at gmail.com Mon Jun 18 20:14:45 2007 From: david.romano at gmail.com (David Romano) Date: Mon, 18 Jun 2007 20:14:45 -0700 Subject: [Oc-pm] Meeting this Thursday (June 21st) Message-ID: <20070619031445.GA12519@www.unobe.com> Hi everyone, Let's meet up this Wednesday around 7:30pm at the Panera[1] that Pete mentioned. Look for the Camel book again :-) [1] http://maps.google.com/maps?f=q&hl=en&q=panera+bread+2214+N+Tustin+St,+Orange,+CA - David -- "I know enough not to know everything." -- Socrates From peter.t.wilson at gmail.com Mon Jun 18 20:33:41 2007 From: peter.t.wilson at gmail.com (Pete Wilson) Date: Mon, 18 Jun 2007 20:33:41 -0700 Subject: [Oc-pm] Meeting this Thursday (June 21st) In-Reply-To: <20070619031445.GA12519@www.unobe.com> References: <20070619031445.GA12519@www.unobe.com> Message-ID: <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> carp( 'subject/body mismatch : unable to resolve meeting day' ); OK, so I'm a dork! but I don't know whether we are meeting Wednesday the 20th or Thursday the 21st. I can probably meet either day. -Pete On 6/18/07, David Romano wrote: > Hi everyone, > > Let's meet up this Wednesday around 7:30pm at the Panera[1] that Pete > mentioned. Look for the Camel book again :-) > > [1] http://maps.google.com/maps?f=q&hl=en&q=panera+bread+2214+N+Tustin+St,+Orange,+CA > > - David > > -- > "I know enough not to know everything." > -- Socrates > > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > From david.romano at gmail.com Mon Jun 18 21:23:44 2007 From: david.romano at gmail.com (David Romano) Date: Mon, 18 Jun 2007 21:23:44 -0700 Subject: [Oc-pm] Meeting this Wednesday (June 20th) In-Reply-To: <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> References: <20070619031445.GA12519@www.unobe.com> <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> Message-ID: <20070619042344.GC12519@www.unobe.com> Pete Wilson wrote on Mon, Jun 18, 2007 at 08:33:41PM PDT: > carp( 'subject/body mismatch : unable to resolve meeting day' ); > > OK, so I'm a dork! but I don't know whether we are meeting Wednesday > the 20th or Thursday the 21st. I can probably meet either day. Dude, how embarrassing :-/ Yeah, the subject is wrong, as I mean for us to try to meet up Wednesday the 20th. I had originally thought the 21st, then a family event came up and I finished the e-mail scheduling for the 20th. Thanks, Pete :-) - David -- "Perfection is achieved not when you have nothing more to add, but when you have nothing left to take away." -- Antoine de Saint-Exupery From peter.t.wilson at gmail.com Tue Jun 19 08:55:18 2007 From: peter.t.wilson at gmail.com (Pete Wilson) Date: Tue, 19 Jun 2007 08:55:18 -0700 Subject: [Oc-pm] Meeting this Wednesday (June 20th) In-Reply-To: <20070619042344.GC12519@www.unobe.com> References: <20070619031445.GA12519@www.unobe.com> <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> <20070619042344.GC12519@www.unobe.com> Message-ID: <4c3ca8c50706190855u7737f5fj86859b74be1566cc@mail.gmail.com> On 6/18/07, David Romano wrote: > Pete Wilson wrote on Mon, Jun 18, 2007 at 08:33:41PM PDT: > > carp( 'subject/body mismatch : unable to resolve meeting day' ); > > > > OK, so I'm a dork! but I don't know whether we are meeting Wednesday > > the 20th or Thursday the 21st. I can probably meet either day. > Dude, how embarrassing :-/ Yeah, the subject is wrong, as I mean for us > to try to meet up Wednesday the 20th. I had originally thought the 21st, > then a family event came up and I finished the e-mail scheduling for the > 20th. Thanks, Pete :-) > > - David > > -- > "Perfection is achieved not when you have nothing more to add, but when > you have nothing left to take away." > -- Antoine de Saint-Exupery > > I will be there. -Pete From btilly at gmail.com Tue Jun 19 08:15:34 2007 From: btilly at gmail.com (Ben Tilly) Date: Tue, 19 Jun 2007 08:15:34 -0700 Subject: [Oc-pm] Meeting Notes In-Reply-To: <20070619031616.GB12519@www.unobe.com> References: <20070525062645.GB27744@www.unobe.com> <20070612081339.GC12563@www.unobe.com> <20070619031616.GB12519@www.unobe.com> Message-ID: On 6/18/07, David Romano wrote: > Hi Ben, > Ben Tilly wrote on Tue, Jun 12, 2007 at 01:51:08PM PDT: > > I'm up for it, particularly if it is near the northern end of OC. > > (I'm coming from Torrance and have to head back to Long Beach.) > I left Torrance around 6:40pm tonight and got to Orange at 7:15pm. Hope > you can make it out this Wednesday :-) Have we finalized a location and time? Ben From btilly at gmail.com Tue Jun 19 08:17:24 2007 From: btilly at gmail.com (Ben Tilly) Date: Tue, 19 Jun 2007 08:17:24 -0700 Subject: [Oc-pm] Meeting this Wednesday (June 20th) In-Reply-To: <20070619042344.GC12519@www.unobe.com> References: <20070619031445.GA12519@www.unobe.com> <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> <20070619042344.GC12519@www.unobe.com> Message-ID: On 6/18/07, David Romano wrote: > Pete Wilson wrote on Mon, Jun 18, 2007 at 08:33:41PM PDT: > > carp( 'subject/body mismatch : unable to resolve meeting day' ); > > > > OK, so I'm a dork! but I don't know whether we are meeting Wednesday > > the 20th or Thursday the 21st. I can probably meet either day. > Dude, how embarrassing :-/ Yeah, the subject is wrong, as I mean for us > to try to meet up Wednesday the 20th. I had originally thought the 21st, > then a family event came up and I finished the e-mail scheduling for the > 20th. Thanks, Pete :-) I can make it. Ben From peter.t.wilson at gmail.com Tue Jun 19 10:44:06 2007 From: peter.t.wilson at gmail.com (Pete Wilson) Date: Tue, 19 Jun 2007 10:44:06 -0700 Subject: [Oc-pm] Meeting this Wednesday (June 20th) In-Reply-To: References: <20070619031445.GA12519@www.unobe.com> <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> <20070619042344.GC12519@www.unobe.com> Message-ID: <4c3ca8c50706191044y56b409f7k3bf5aaf76684a486@mail.gmail.com> Just to clarify the time and location: We are meeting tomorrow night, Wednesday the 20th, at the Panera Bread[1] at The Village in Orange around 7:30. See the URL below for directions. [1] http://maps.google.com/maps?f=q&hl=en&q=panera+bread+2214+N+Tustin+St,+Orange,+CA -Pete From btilly at gmail.com Wed Jun 20 17:37:20 2007 From: btilly at gmail.com (Ben Tilly) Date: Wed, 20 Jun 2007 17:37:20 -0700 Subject: [Oc-pm] Meeting this Wednesday (June 20th) In-Reply-To: <4c3ca8c50706191044y56b409f7k3bf5aaf76684a486@mail.gmail.com> References: <20070619031445.GA12519@www.unobe.com> <4c3ca8c50706182033r7b0cecdasda4e4661d1822070@mail.gmail.com> <20070619042344.GC12519@www.unobe.com> <4c3ca8c50706191044y56b409f7k3bf5aaf76684a486@mail.gmail.com> Message-ID: I'll aim to be there, but I don't know anybody and have no contact information. So I'd appreciate it if someone could call my cell at 917-838-9491 so that I can find the group. (The last time I tried going to OC.pm several years ago I couldn't find the group. I had a good meeting, but no meetup.) Ben On 6/19/07, Pete Wilson wrote: > Just to clarify the time and location: > > We are meeting tomorrow night, Wednesday the 20th, at the Panera > Bread[1] at The Village in Orange around 7:30. See the URL below for > directions. > > [1] http://maps.google.com/maps?f=q&hl=en&q=panera+bread+2214+N+Tustin+St,+Orange,+CA > > -Pete > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > From dgwilson1 at cox.net Sun Jun 24 20:51:22 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Sun, 24 Jun 2007 19:51:22 -0800 Subject: [Oc-pm] Updated web site Message-ID: <467F3BBA.1020803@cox.net> I've finally updated the site so that it's not completely out of date, with new mailing list instructions and the old meeting place removed. It's amazing what you can get done when the kids are away (I might even be able to update some perl modules too) :-) We should probably have another meeting sometime soon...anyone up for July 10 (or 11)?? -Doug From david.romano at gmail.com Mon Jun 25 00:44:55 2007 From: david.romano at gmail.com (David Romano) Date: Mon, 25 Jun 2007 00:44:55 -0700 Subject: [Oc-pm] June 20th Meeting Notes Message-ID: <20070625074454.GD12519@www.unobe.com> Last week's meeting was held at Panera and had four attendees: Ben Tilly, Pete Wilson, V.J. (didn't catch the last name), and me. Sorry for getting this out a few days late. My memory of what was discussed is now a little fuzzy, but here's a bit of what I remember: - Pythagorean Theorem At first it was just Ben and me, and since he has a background in mathematics and I'm going to be a high school math teacher, we talked a bit about math. One of many interesting things that Ben talked about was a proof of the Pythagorean Theorem. The proof is at the first link below , which is based on a more elaborate proof by Euclid (the second link). I actually hadn't seen that proof before, but it made sense when I looked at it. I now have another proof I teach (thanks Ben! :-) http://www.cut-the-knot.org/pythagoras/index.shtml#9 http://www.cut-the-knot.org/pythagoras/index.shtml#69 - Interweaving SQL and Perl code I had brought along Perl Hacks, which I'm currently working my way through, and Ben looked at its discussion of using SQL from Perl. Hack #23 suggests to create a subroutine for each different query, and tuck away all those subroutines in a SQL package. Ben explained a different way of managing SQL code in Perl, and that is by writing chunks of SQL statements, storing them in scalars, and combining them as appropriate. He said he found this very useful when working with complex queries. http://www.oreilly.com/catalog/perlhks/ - GPS and General Relativity Pete is a data analyst for a company in Anaheim, and his job is to analyze extreme amounts of data from GPS devices his company manufactures. Ben mentioned that GPS is the only real-world application that takes into account the general theory of relativity. I had just read the ABC of Relativity and was still a bit patchy on what the general and special theories were, but Ben gave a good explanation (and demonstration) of general relativity. http://en.wikipedia.org/wiki/GPS http://en.wikipedia.org/wiki/General_relativity - Pugs and Parrot Ben mentioned how surprised at how far Parrot has come along. Parrot now passes the sanity tests (copied from the Pugs test suite) and they're now working on getting a workable Test.pm to start writing all the tests in Perl 6. Pugs seemed to lose steam when Audrey got sick, but one of the interesting subprojects has been MiniPerl6 and KindaPerl6, both headed by Flavio Glock. Now that Parrot is passing sanity tests, Flavio and Patrick Michaud (the Perl 6 pumpking, AFAIK) are teaming up to work on getting a full Perl 6 implementation. I have a somewhat up-to-date installable package of Pugs available for OS X (ghc, parrot, readline are all bundled too). http://www.parrotcode.org/ http://www.pugscode.org/ http://www.unobe.com/files/osx/ - Lingua::Romana::Perligata It exists. If you're leaving a company you hate, you might consider rewriting your code using it. At least that's what one of Ben's acquaintances thought of doing. http://search.cpan.org/~dconway/Lingua-Romana-Perligata-0.50/ - Databases Pete and I didn't know that much about databases. Ben Tilly enlightened us :-) Ben explained the idea of relational mapping using a Students table, Teachers table, and Classes table. He stated the importance of designing tables orthogonally, and only adding redundant fields to improve performance. He also described what happens when a database falls over. The number of requests to update a certain record (or is it a certain table?) in a database is so high at a certain time X. Each request's continuous check to see if the record has been unlocked (and is now available for writing) overloads the server resources and the server croaks. I hope that makes some sense :-/ - Catalyst and Win32 perl Branching off the database talk, Pete is the the maintainer of an Access DB at work. He's thinking of making his job easier by importing it into MySQL and writing a limited front-end to it using Catalyst (or maybe just setup phpMyAdmin). He's been trying to fool around with Catalyst, but ran into some troubles compiling some of the XS modules some of its prerequisites require. I mentioned he might want to try Strawberry Perl, which has worked wonderfully for me. Ben suggested that if he goes the Catalyst route, Pete should work through the tutorials to get a good understanding of the framework. http://www.phpmyadmin.net/ http://www.catalystframework.org/ http://vanillaperl.com/files/strawberry-perl-5.8.8-alpha-2.exe http://search.cpan.org/~jrockway/Catalyst-Manual-5.700701/ - Next Possible Meeting Location Ben had remembered that the group had met at a good pub a few years back, and wants to go again. I noticed an old e-mail from the oc-pm archives that mentioned The Olde Ship. Pete mentioned a pub in Fullerton whose name escapes me (The Shipyard?). http://mail.pm.org/pipermail/oc-pm/2003-June/000085.html - David -- "I can do everything through him who gives me strength." -- Philippians 4:13 From btilly at gmail.com Mon Jun 25 07:15:00 2007 From: btilly at gmail.com (Ben Tilly) Date: Mon, 25 Jun 2007 07:15:00 -0700 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: <20070625074454.GD12519@www.unobe.com> References: <20070625074454.GD12519@www.unobe.com> Message-ID: On 6/25/07, David Romano wrote: > Last week's meeting was held at Panera and had four attendees: Ben > Tilly, Pete Wilson, V.J. (didn't catch the last name), and me. Sorry > for getting this out a few days late. My memory of what was discussed > is now a little fuzzy, but here's a bit of what I remember: You remember it better than I did. :-) [...] > - Interweaving SQL and Perl code > I had brought along Perl Hacks, which I'm currently working my > way through, and Ben looked at its discussion of using SQL from > Perl. Hack #23 suggests to create a subroutine for each > different query, and tuck away all those subroutines in a SQL > package. Ben explained a different way of managing SQL code in > Perl, and that is by writing chunks of SQL statements, storing > them in scalars, and combining them as appropriate. He said he > found this very useful when working with complex queries. > http://www.oreilly.com/catalog/perlhks/ I should note that those two techniques solve very different problems. SQL::Abstract solves the problem of generating SQL for someone who doesn't really want to learn SQL. The problem that I was trying to solve was making complex SQL understandable for someone who understands SQL. In particular, for reporting purposes I often wind up writing subqueries within subqueries of the main query. In native SQL, even with good indenting, it winds up being hard to correctly pair up the SELECT with the WHERE clause. (Because all of the subqueries went in the FROM clause between them.) So I write subqueries, and interpolate them in. The result is a series of queries like this: my $example_sql = qq{ SELECT s.this , s.that , s.the_other FROM foo f , (} . indent($complex_subquery_sql) . qq{ ) s WHERE f.some_key = s.some_key AND f.some_field = 'some condition' }; each of which has a clear and readable intent, and the result of which is nicely indented and is as legible as possible. (ie not very.) If you routinely wind up writing several hundred line SQL statements which nest subqueries several deep, you may find this useful. You may likewise find my ideas on how to correctly format SQL useful as well. (See the above for an example of my formatting. In particular I put commas and AND statements on the start of lines, which generally makes it easier not to forget one when you add new lines.) Of course if you're coding a CRUD application and wind up writing such SQL statements, then you have another kind of problem... (Note that my job is reporting. It is far more natural for me to want to write complex SQL than it is for most people.) > - GPS and General Relativity > Pete is a data analyst for a company in Anaheim, and his job is > to analyze extreme amounts of data from GPS devices his company > manufactures. Ben mentioned that GPS is the only real-world > application that takes into account the general theory of > relativity. I had just read the ABC of Relativity and was > still a bit patchy on what the general and special theories > were, but Ben gave a good explanation (and demonstration) of > general relativity. > http://en.wikipedia.org/wiki/GPS > http://en.wikipedia.org/wiki/General_relativity Well I wouldn't say that I *explained* general relativity... Incidentally http://en.wikipedia.org/wiki/GPS#Relativity discusses the connection quite well. [...] > - Lingua::Romana::Perligata > It exists. If you're leaving a company you hate, you might > consider rewriting your code using it. At least that's what one > of Ben's acquaintances thought of doing. > http://search.cpan.org/~dconway/Lingua-Romana-Perligata-0.50/ Close. My aquaintance thought of rewriting his code in Klingon. He got the idea because his friend who left the same company actually DID rewrite his code in Latin. I don't know what company it was, but it provides a clear demonstration of why you shouldn't piss off your programmers. (The company is in New York, nobody need fear working there by accident.) > - Databases > Pete and I didn't know that much about databases. Ben Tilly > enlightened us :-) Ben explained the idea of relational > mapping using a Students table, Teachers table, and Classes > table. He stated the importance of designing tables > orthogonally, and only adding redundant fields to improve > performance. He also described what happens when a database > falls over. The number of requests to update a certain record > (or is it a certain table?) in a database is so high at a > certain time X. Each request's continuous check to see if the > record has been unlocked (and is now available for writing) > overloads the server resources and the server croaks. I hope > that makes some sense :-/ Actually I described one way that transactional databases can fall over. And that is in overhead for a single latch. A latch being a specific kind of (normally lightweight) lock. There are operations where requests have to be queued up and processed serially. For instance you cannot access a particular data structure until you have a lock so that you are sure that nobody else will modify it out from under you. The problem comes when the time to process that data structure is longer than the time between requests to do it. What happens then is that processes pile up trying to get the latch, aka lock. Since they are doing a busy wait for the latch, they consume all of the CPU, and the database falls over. As for what a latch covers, I didn't go through that in detail. It is highly variable, but is seldom as small as a single record or as big as an entire table. I've seen this failure mode on things as varied as fetching an already parsed SQL statement to reading a record from a table. The really frustrating thing about this failure mode is that if requests are coming in at 80% of the maximum rate the latch can take, there is absolutely no sign that there might be a problm coming. At 98% you're experiencing really nasty spikes. (That partially solve the problem by driving users away from your site.) And at 100% you fall over. Nobody, and I mean nobody, has a good handle on how to predict when this will happen. :-( [...] > - Next Possible Meeting Location > Ben had remembered that the group had met at a good pub a few > years back, and wants to go again. I noticed an old e-mail from > the oc-pm archives that mentioned The Olde Ship. Pete mentioned > a pub in Fullerton whose name escapes me (The Shipyard?). > http://mail.pm.org/pipermail/oc-pm/2003-June/000085.html :-) Cheers, Ben From peter.t.wilson at gmail.com Mon Jun 25 09:57:56 2007 From: peter.t.wilson at gmail.com (Pete Wilson) Date: Mon, 25 Jun 2007 09:57:56 -0700 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: <20070625074454.GD12519@www.unobe.com> References: <20070625074454.GD12519@www.unobe.com> Message-ID: <4c3ca8c50706250957p11184c79kd2ab8cc4e7179310@mail.gmail.com> There is an Olde Ship in Fullerton as well as one in Santa Ana. The website [1] in the archive message has information for both of them. The pub in Fullerton is off the 91 freeway[2]. I have been to the Fullerton location a couple of times. It appears to be a very authentic pub, at least to my Yankee eyes. I doubt they have open wifi, but that probably doesn't matter. Thanks for the summary David. [1] http://www.theoldeship.com [2] http://maps.google.com/maps?q=Olde+ship&near=Fullerton,+CA -Pete On 6/25/07, David Romano wrote: > > - Next Possible Meeting Location > Ben had remembered that the group had met at a good pub a few > years back, and wants to go again. I noticed an old e-mail from > the oc-pm archives that mentioned The Olde Ship. Pete mentioned > a pub in Fullerton whose name escapes me (The Shipyard?). > http://mail.pm.org/pipermail/oc-pm/2003-June/000085.html > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/oc-pm/attachments/20070625/4a209613/attachment.html From dgwilson1 at cox.net Mon Jun 25 19:09:33 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Mon, 25 Jun 2007 18:09:33 -0800 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: <4c3ca8c50706250957p11184c79kd2ab8cc4e7179310@mail.gmail.com> References: <20070625074454.GD12519@www.unobe.com> <4c3ca8c50706250957p11184c79kd2ab8cc4e7179310@mail.gmail.com> Message-ID: <4680755D.2060906@cox.net> Pete Wilson wrote: > There is an Olde Ship in Fullerton as well as one in Santa Ana. The > website > [1] in the archive message has information for both of them. The pub in > Fullerton is off the 91 freeway[2]. I have been to the Fullerton > location a > couple of times. It appears to be a very authentic pub, at least to my > Yankee eyes. I doubt they have open wifi, but that probably doesn't > matter. The one we met at last time was the one in Santa Ana (on 17th just east of Bristol, a few major blocks west of Main). It's larger and so could accommodate more people, but I don't think we have to worry too much about that yet (though we did have about 9 people that time, which would be hard to fit all together at the Fullerton location). I used to go to the Fullerton one when I lived in North OC. Now that I'm down south, the Santa Ana one is closer. Either one is fine with me though. -Doug From dgwilson1 at cox.net Mon Jun 25 19:17:45 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Mon, 25 Jun 2007 18:17:45 -0800 Subject: [Oc-pm] OC Jobs Message-ID: <46807749.5000702@cox.net> Being the mailing list admin, I occasionally get job notices that say "Could you post this on the mailing list?" and I've sometimes posted them, but always direct them to jobs.perl.org. I'll probably just direct them to the jobs.perl.org site and maybe mention something here from now on. Anyone that knows about this list usually knows about jobs.perl.org, but just in case, check it out if you are looking for perl related jobs. And if you're looking for something local, there's just been a posting for something in Newport Beach :-) -Doug From btilly at gmail.com Tue Jun 26 06:54:50 2007 From: btilly at gmail.com (Ben Tilly) Date: Tue, 26 Jun 2007 06:54:50 -0700 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: <4680755D.2060906@cox.net> References: <20070625074454.GD12519@www.unobe.com> <4c3ca8c50706250957p11184c79kd2ab8cc4e7179310@mail.gmail.com> <4680755D.2060906@cox.net> Message-ID: On 6/25/07, Douglas Wilson wrote: > > > Pete Wilson wrote: > > There is an Olde Ship in Fullerton as well as one in Santa Ana. The > > website > > [1] in the archive message has information for both of them. The pub in > > Fullerton is off the 91 freeway[2]. I have been to the Fullerton > > location a > > couple of times. It appears to be a very authentic pub, at least to my > > Yankee eyes. I doubt they have open wifi, but that probably doesn't > > matter. > > The one we met at last time was the one in Santa Ana (on 17th just east > of Bristol, a few major blocks west of Main). It's larger and so could > accommodate more people, but I don't think we have to worry too > much about that yet (though we did have about 9 people that time, which > would be hard to fit all together at the Fullerton location). > > I used to go to the Fullerton one when I lived in North OC. Now that I'm > down south, the Santa Ana one is closer. Either one is fine with me though. Either is good, but given that I'm coming from Torrance, north is preferable for me. Ben From dgwilson1 at cox.net Thu Jun 28 21:42:20 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Thu, 28 Jun 2007 20:42:20 -0800 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: References: <20070625074454.GD12519@www.unobe.com> Message-ID: <46848DAC.6020601@cox.net> Ben Tilly wrote: > > my $example_sql = qq{ > SELECT s.this > , s.that > , s.the_other > FROM foo f > , (} . indent($complex_subquery_sql) . qq{ ) s > WHERE f.some_key = s.some_key > AND f.some_field = 'some condition' > }; > > each of which has a clear and readable intent, and the result of which > is nicely indented and is as legible as possible. (ie not very.) I'm happy as long as the statement is broken up by newlines (single line SQL statements make for debugging fun...not!) :) Though I like the style above, so maybe I'll just have to get over my irrational fear of extra-indentation in multi-line strings. :-) When embedding SQL into indented blocks, I tend to use the style at the bottom of this post: http://www.perlmonks.org/?node_id=615032 Though when using that style in the past, I have at least once misplaced a "," for a "." and ended up with a momentarily mysterious "Odd number of hash elements" warning :-) > > If you routinely wind up writing several hundred line SQL statements I often find myself deconstructing 300 line SQL statements rather than writing them, which was the entire reason for that perlmonks thread. Then by the time I have them torn apart, figured out and fixed, I'm too lazy to put them back together, so if performance is reasonable, I'll leave it as is. It makes future debugging easy, like when trying to figure out why certain data doesn't make it through the entire pipeline, as I can eliminate joins by commenting out one line at a time. The biggest drawback with the framework in that thread is that you can't order by arbitrary columns :-( So you have to pipe it through some other process if you want to order by anything other than columns in the outermost SQL statement (to columns statements contiguously inward). Well, I should be able to make the next meeting... -Doug From dgwilson1 at cox.net Thu Jun 28 21:55:32 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Thu, 28 Jun 2007 20:55:32 -0800 Subject: [Oc-pm] Meeting July 11 (Wednesday) 7PM Message-ID: <468490C4.20302@cox.net> Well there's one vote for Fullerton, and one for Santa Ana, and many that seem to be abstaining...so let's flip a coin...and call it Fullerton (I haven't been to that one in a while anyway)...we'll see how that works out and then try Santa Ana again later :-) So here are the details: The Olde Ship 709 North Harbor Blvd Fullerton, CA Wednesday, July 11 7PM From the 91, it's North on Harbor a little bit past Chapman (Chapman in Fullerton, not Chapman in Orange, don't get confused). There's parking on Harbor, or some behind the pub, or on the residential streets. -Doug From btilly at gmail.com Fri Jun 29 11:14:14 2007 From: btilly at gmail.com (Ben Tilly) Date: Fri, 29 Jun 2007 11:14:14 -0700 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: <46848DAC.6020601@cox.net> References: <20070625074454.GD12519@www.unobe.com> <46848DAC.6020601@cox.net> Message-ID: On 6/28/07, Douglas Wilson wrote: > Ben Tilly wrote: > > > > my $example_sql = qq{ > > SELECT s.this > > , s.that > > , s.the_other > > FROM foo f > > , (} . indent($complex_subquery_sql) . qq{ ) s > > WHERE f.some_key = s.some_key > > AND f.some_field = 'some condition' > > }; > > > > each of which has a clear and readable intent, and the result of which > > is nicely indented and is as legible as possible. (ie not very.) > > I'm happy as long as the statement is broken up by newlines > (single line SQL statements make for debugging fun...not!) :) It truly puzzles me that experienced programmers who would never think of not indenting code, frequently don't indent SQL. SQL is code like anything else. All of the reasons to indent anything, apply to SQL. > Though I like the style above, so maybe I'll just have to > get over my irrational fear of extra-indentation in multi-line > strings. :-) :-) Please note that the leading , and AND statements are a very concious choice. I settled on that style after noticing how often I'd get a stupid SQL error when adding new conditions because I left that out. I do the same thing in, say, parameters to JavaScript functions. But not in Perl, there I just leave trailing commas. > When embedding SQL into indented blocks, I tend to use > the style at the bottom of this post: > http://www.perlmonks.org/?node_id=615032 Did you notice that you have syntax errors there? > Though when using that style in the past, I have at least once > misplaced a "," for a "." and ended up with a momentarily > mysterious "Odd number of hash elements" warning :-) For me a bigger deal is that I like having the ability to cut and paste SQL directly from code into an interactive SQL prompt to check for errors. This is particularly important with Oracle - its interactive SQL prompt gives far, far more useful error messages than go back to DBI. > > If you routinely wind up writing several hundred line SQL statements > > I often find myself deconstructing 300 line SQL statements > rather than writing them, which was the entire reason for that > perlmonks thread. Then by the time I have them torn apart, figured > out and fixed, I'm too lazy to put them back together, so if > performance is reasonable, I'll leave it as is. It makes future > debugging easy, like when trying to figure out why certain data > doesn't make it through the entire pipeline, as I can eliminate joins > by commenting out one line at a time. You can comment out individual lines of SQL with --. Or blocks with traditional C-style comments like /* ... */. (I almost always use the former style.) > The biggest drawback with the framework in that thread is that you > can't order by arbitrary columns :-( So you have to pipe it through > some other process if you want to order by anything other than columns > in the outermost SQL statement (to columns statements contiguously inward). Native SQL avoids that drawback as well. :-P But it seems to me like it should be easy to add that back in? > Well, I should be able to make the next meeting... I look forward to seeing you again. Ben From dgwilson1 at cox.net Fri Jun 29 19:37:49 2007 From: dgwilson1 at cox.net (Douglas Wilson) Date: Fri, 29 Jun 2007 18:37:49 -0800 Subject: [Oc-pm] June 20th Meeting Notes In-Reply-To: References: <20070625074454.GD12519@www.unobe.com> <46848DAC.6020601@cox.net> Message-ID: <4685C1FD.6000300@cox.net> Ben Tilly wrote: > On 6/28/07, Douglas Wilson wrote: > > It truly puzzles me that experienced programmers who would never think > of not indenting code, frequently don't indent SQL. SQL is code like > anything else. All of the reasons to indent anything, apply to SQL. Old habits, and all that...not that I'm not open to change. > >> When embedding SQL into indented blocks, I tend to use >> the style at the bottom of this post: >> http://www.perlmonks.org/?node_id=615032 > > Did you notice that you have syntax errors there? Uh, yeah...I thought I fixed that...I copied actual code, then quickly removed any meaningful names, and pasted into the web form...anyway, at least one syntax error is fixed now :-) Someday I may post the real actual code, it'd probably help users of Informatica, but I'm not sure of the license restrictions, as they have never been keen to give out explanations of their database schema (probably due to how horrible it is). There might be restrictions on publishing anything about it. > > You can comment out individual lines of SQL with --. Or blocks with > traditional C-style comments like /* ... */. (I almost always use the > former style.) It's not commenting out single lines or blocks that's the problem..it's commenting out the specific SELECT columns for some tables, then commenting out the specific tables in the FROM clause, then the specific joins and filters in the WHERE clause. Though I can think of other ways of handling that... And it's just as bad or worse if there's a giant nested foreach loop of SQL executing and fetching. > >> The biggest drawback with the framework in that thread is that you >> can't order by arbitrary columns :-( > > Native SQL avoids that drawback as well. :-P > > But it seems to me like it should be easy to add that back in? It's on the TODO list :-) > I look forward to seeing you again. Same here.