From william at knowmad.com Mon Nov 15 20:59:26 2004 From: william at knowmad.com (William McKee) Date: Mon Nov 15 20:59:31 2004 Subject: [Charlotte.PM] November Perl Mongers Meeting - Thursday 7:00pm Message-ID: <20041116025926.GT16058@knowmad.com> Charlotte Perl Mongers Because of the holidays, we will not be holding a December meeting. This is your last chance to meet your fellow Perl mongers in the Charlotte area until next year. In January, we'll be starting the year by cleaning out the cobwebs with a code clinic; post your name to the list if you have any code that you would like reviewed. Reviews will be done on a first come, first served manner so get your name on the list soon. The difference between arrays and lists has still not been hashed out so we'll start the 6:30pm tutorial with this issue. Afterwards, we'll look at the next chapter in the tutorial involving Operators and Functions. If you are student at UNCC and need a ride to the meeting, I can come by campus to pick you up on the way to Jackson's Java. Send a post to the list. See you at the meeting, William McKee Meeting Topic: Social Meeting Meeting Date and Times: >> Thursday, November 18th * Learning Perl - 6:30 PM to 7:00 PM * General Meeting - 7:00 PM to 8:30 PM * Discussion/Networking - 8:30 PM to 9:00 PM Next Meeting: Thursday, January 20th ~ Code Clinic Meeting Location: Jackson's Java, University Blvd. near UNCC see the link at http://charlote.pm.org for a map -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Thu Nov 18 07:15:18 2004 From: william at knowmad.com (William McKee) Date: Thu Nov 18 07:15:24 2004 Subject: [Charlotte.PM] Cargo cult programming & Tonight's Meeting Message-ID: <20041118131518.GO26190@knowmad.com> Hi folks, With the rise of the Internet and more sophisticated software development tools, it's very easy to give in to copying code (if it's not licensed) or using automatically generated code to get a project done quickly. However, without knowing exactly what the code is doing, you will likely end up with more work debugging the code (and often when there is no time left in the schedule to do debugging). This type of development is known as cargo cult programming[1]. Recently I was burned by two errors in some automatically generated code by an otherwise very helpful Perl package. Stop by the meeting tonite[2] to learn more about this tool and why my code was mysteriously failing. See you offline, William [1] http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming [2] http://charlotte.pm.org/ -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Mon Nov 22 11:01:43 2004 From: william at knowmad.com (William McKee) Date: Mon Nov 22 11:01:49 2004 Subject: [Charlotte.PM] Cargo Cult Programming - @ISA array and $VERSION strings Message-ID: <20041122170143.GQ21158@knowmad.com> At the meeting last week, we took a look at the modulemaker script (which is part of the ExtUtils::ModuleMaker module[1]). It was this script which produced automated code that I used in a recent project without fully evaluating what it was doing (thus the references to cargo cult programming in my message from last week). The first problem I encountered was with inheritance. After copying existing code into the framework, I was getting errors with inherited methods not being found. As it turns out, the framework was overriding my 'use base' pragma by directly setting @ISA in the BEGIN block. At the meeting, we looked at how easy modulemaker is to use and the framework code it creates for your new module. We then proceeded to add a new test to the framework created by modulemaker to check whether use base was being ignored or not. I'm using Test::More[2] these days which offers many convenience tests including can_ok and isa_ok. I wasn't sure whether isa_ok would properly determine inheritance but knew that can_ok would tell me whether the methods were imported. As expected, this test failed when run with the default code. By changing the '@ISA = qw(Exporter)' line to 'push @ISA, qw(Exporter)', the test passed. Over the weekend, I also tried the isa_ok test which also works because it checks the @ISA array which is unique for each package (in Perl, inheritance is determined by the @ISA array; to check the value look at @MyModule::ISA for packge MyModule or @main::ISA for the default package). See Chapter 6 of Damian's book for more details. The other problem I had was more of a minor nit than a serious issue such as not getting properly subclassed. It had to do with the version string not being quoted so that perl was dropping the ending zeros. General rule of thumb is to put version strings into single quotes as follows: $VERSION = '1.00'; Hope everyone has a good Thanksgiving! Cheers, William [1] http://search.cpan.org/author/RGEOFFREY/ExtUtils-ModuleMaker-0.32/lib/ExtUtils/ModuleMaker.pm [2] http://search.cpan.org/author/MSCHWERN/Test-Simple-0.50/lib/Test/More.pm -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Wed Nov 24 09:27:51 2004 From: william at knowmad.com (William McKee) Date: Wed Nov 24 09:27:58 2004 Subject: [Charlotte.PM] O'Reilly User Group Program - We're Approved! Message-ID: <20041124152751.GA14324@knowmad.com> Good news for you book hounds! The Charlotte.PM has been approved for the O'Reilly User Group Program. In a nutshell this means we can request review copies of any of the O'Reilly books. In addition, we can get a 20% discount on any books we buy as well as free shipping if the order is over $30. It's an all-around good deal. Here's what we need to do in return: 1) Add a banner to the website (I'm still looking for a volunteer to help me with redesigning the site using the wiki) 2) Review books and send your reviews to the mailing list so that we can post them onto the website; in addition, you can post them to any online book review site such as Amazon, Barnes & Noble, or Slashdot. I'd like to maintain a library of books that can be checked out by our members. I don't mind lugging the books if someone would volunteer to be the librarian and keep track of the books (preferably via the wiki so we can see what's available, what's in and what's out). I plan to place a request by December 15th which should have the books available to us by the next meeting in January (remember there is no December meeting). Send an email to the list with your request. As usual, this is a FIFO process (we can't request duplicates). Thanks, William -- Knowmad Services Inc. http://www.knowmad.com From gami at d10systems.com Wed Nov 24 07:35:15 2004 From: gami at d10systems.com (Dhruv Gami) Date: Wed Nov 24 11:36:17 2004 Subject: [Charlotte.PM] O'Reilly User Group Program - We're Approved! In-Reply-To: <20041124152751.GA14324@knowmad.com> References: <20041124152751.GA14324@knowmad.com> Message-ID: On Wed, 24 Nov 2004, William McKee wrote: > Good news for you book hounds! The Charlotte.PM has been approved for > the O'Reilly User Group Program. In a nutshell this means we can request Congratulations ! This is great news ! > review copies of any of the O'Reilly books. In addition, we can get a > 20% discount on any books we buy as well as free shipping if the order > is over $30. It's an all-around good deal. Does that mean that members can get orders placed via the group in order to avail the discount ? I don't know a 20% discount is a big deal, or whether or not it could be availed from other sources. > 2) Review books and send your reviews to the mailing list so that we can > post them onto the website; in addition, you can post them to any online > book review site such as Amazon, Barnes & Noble, or Slashdot. is there a commitment of any sort? like we need to post X number of reviews per month ? or that we need to review the books we request within X number of days or something like that ? > I'd like to maintain a library of books that can be checked out by our > members. I don't mind lugging the books if someone would volunteer to be > the librarian and keep track of the books (preferably via the wiki so we > can see what's available, what's in and what's out). Initially probably someone would have to lug the books around, as we don't have a place to store them. I could ask a couple of people in UNCC who're interested in being a part of the PM and they *might* be willing to store the books in their offices, and letting us access them. But i'll go ahead with this only if others here agree upon this sort of a set up. If others feel more comfortable if the books are with william, and if he's okay with the inconvenience of carrying them, we could probably give it a try for some time. > I plan to place a request by December 15th which should have the books > available to us by the next meeting in January (remember there is no > December meeting). Send an email to the list with your request. As > usual, this is a FIFO process (we can't request duplicates). I'm unfortunately tied up for the entire next month and would not be able to contribute much to these latest developments. Hopefully by the end of next month i'll start being more visible, and contribute more to the group. It'd be great have our website wiki'd. hats off to william for doing such a wonderful job. regards, Gami -- Dhruv Gami http://d10systems.com/gami From william at knowmad.com Tue Nov 30 07:56:09 2004 From: william at knowmad.com (William McKee) Date: Tue Nov 30 07:56:53 2004 Subject: [Charlotte.PM] O'Reilly User Group Program - We're Approved! In-Reply-To: References: <20041124152751.GA14324@knowmad.com> Message-ID: <20041130135609.GH4033@knowmad.com> > > review copies of any of the O'Reilly books. In addition, we can get a > > 20% discount on any books we buy as well as free shipping if the order > > is over $30. It's an all-around good deal. > > Does that mean that members can get orders placed via the group in order > to avail the discount ? I don't know a 20% discount is a big deal, or > whether or not it could be availed from other sources. The 20% is probably not that great a deal if you compare it to places like Amazon.com but the free shipping could get the cost down. To my understanding, this rate is available to all members of the group. > > 2) Review books and send your reviews to the mailing list so that we can > > post them onto the website; in addition, you can post them to any online > > book review site such as Amazon, Barnes & Noble, or Slashdot. > > is there a commitment of any sort? like we need to post X number of > reviews per month ? or that we need to review the books we request within > X number of days or something like that ? I have not read anything about a commitment or quota. Personally I think anyone who requests a book should be able to put together a few words about it. It's a small commitment in return for being able to request any of the O'Reilly titles. > Initially probably someone would have to lug the books around, as we don't > have a place to store them. I could ask a couple of people in UNCC who're > interested in being a part of the PM and they *might* be willing to store > the books in their offices, and letting us access them. But i'll go ahead > with this only if others here agree upon this sort of a set up. If others > feel more comfortable if the books are with william, and if he's okay with > the inconvenience of carrying them, we could probably give it a try for > some time. Thanks for the offer. I've not had any requests for books yet so lugging the library is not a problem. I don't care where the books physically reside. My plan is to leave the bulk of the books somewhere and only take to the meeting those that have been requested. Having the list of books available on the website would facilitate this process. It will be important that whoever is in charge of the physical books attends every meeting or finds a proxy to deliver any requested books. > I'm unfortunately tied up for the entire next month and would not be able > to contribute much to these latest developments. Hopefully by the end of > next month i'll start being more visible, and contribute more to the > group. It'd be great have our website wiki'd. I hope you're able to get yourself untied soon and can join us at the meetings again. Thanks for the feedback. It's good to hear from you. Cheers, William -- Knowmad Services Inc. http://www.knowmad.com