[pm-h] Another idea for the group

G. Wade Johnson gwadej at anomaly.org
Fri Aug 19 06:22:22 PDT 2005


On Fri, 19 Aug 2005 05:57:08 -0500
Mike Flannigan <mikeflan at earthlink.net> wrote:

> 
> "G. Wade Johnson" wrote:
> 

<snip/>

> > We could start our own list of Katas and practice with them. We could post
> > various solutions to the list and discuss what we like and dislike about
> > them.
> >
> > We could archive the problems and particularly interesting approaches on
> > the web site for other people to use.
> >
> > Any thoughts?
> >
> > G. Wade
> 
> Interesting.  If you think you can find something that we
> would all enjoy doing, start it off.  Maybe something very
> simple would pull people in and get them thinking.

I can think of a few "small" programming ideas that might make good Katas.
Unfortunately, picking good problems requires a good understanding of the
abilities of the people in the group.

> Maybe some kind of html extraction routine would be
> something our members could use.

I can see breaking this down into a few different problems that might make
good Katas:

 * Retrieve an HTML page over HTTP.
   - The simple case is easy with LWP
   - There are many variations that can make it interesting.

 * Convert an HTML page to text.
   - Remove tags.
   - Remove tags without losing basic formatting (paragraphs, bold, etc.)

 * Extract information from a few specific tags
   - Get all of the images
   - Get all of the links
   - Get only the outbound links

 * Find a particular table and extract the data from it.

I see these problems as (kind of) getting successively more challenging.
However, there are modules from CPAN that will solve each of them with minimal
effort.

Some problems in a different direction include:

 * Choosing a random item from a list.
   - The total number of items is known.
   - The total number of items is not known.

 * Picking files from a directory.
   - The ten most recent
   - Any that are older than 1 hour
   - Choose one at random

 * Generate a filename based on date. (Easy problem with some twists)
   - The format of the name
     - The format of the name depends on what you are using it for.
     - Some formats are more useful than others.
   - The date to use
     - Today's date
     - Yesterday's date
     - The date of the last weekday
     - The date of the end of this week

If anyone thinks this is an interesting idea, we can discuss it on the list.

Later,
G. Wade
-- 
A language that doesn't affect the way you think about programming is not
worth knowing.                                        -- Alan Perlis


More information about the Houston mailing list