About Kent Cowgill
Articles filed under...
abs ab_ripper andylester arms back baggyshorts bestpractices biceps bike birthday blog bugs bus calculator cardio catalyst cgi chart chest chinups code cpan datamodel dbi doctor documentation exercise exhaustion fitness flattire flat_tire google gps heart_rate helmet history home houston html humor journal kate kenpo kenpo_x kettlebell knees lazy legs lisa lisanne maps math matthew michaelmckenna mom montreal motivation movie mysql oops orm P90X pain park patellar_tendonitis patrick pdf perl phb photos physical_therapy plyometrics poor_gait presentation procrastination progress pullups pushups pyramid rabbits racecondition rant refactor rest ribs ride route running shoulders situps slides sore spike sql statistics syntax test testing textile timex training triceps ups versioncontrol video vim vimrc walk warren work workouts yapc yapcna2007 yoga youtube

A R C H I V E S

(3)
(1)
(3)
(2)
(7)
(15)
(16)
(25)
(3)
(4)
(2)
(4)
(11)
(1)
(1)
(3)
(2)
(2)
(10)
(5)
(2)
(3)
(4)
(9)
(21)
(3)
(3)
(1)
(6)
(4)
(1)
(4)
(3)
(2)
(1)


    Is Kent Cowgill Online?
    View Kent Cowgill's profile on LinkedIn
    Add to Technorati Favorites

    Recent Entries...

    Re: Re: Yoga kicks my butt

    Chris @ 46: Tatyana @ 21 – at best its a stop gap measure...

    Re: Vibram FiveFingers FTW

    Hats off to whoever wrote this up and potesd it....

    Re: A little more detail on using a new model

    百度 [url=http://www.sina.com]sina[/url] ...

    Re: Catching up through week 7

    testing video ...

    Re: Porting a non-Moose object to Moose

    Wow, look what I found, greedy genius ...

    Re: Porting a non-Moose object to Moose

    Kevin, You're right, that does seem a little confusing. ...

    Re: Porting a non-Moose object to Moose

    Wait. I'm confused. Moose isn't the tool to reach for. So...

    Re: Porting a non-Moose object to Moose

    You should switch to MooseX::Types to declare your Typed and...

    Porting a non-Moose object to Moose

    I'm currently working with a lot of legacy code in an envi...

    Testing strategy for mocking code

    I keep finding myself using the following idiom for writing ...

    weblog | `web·lôg -läg |
    noun
    Another term for BLOG
    ORIGIN 1990s: from web in the sense [World Wide Web] and log in the sense [regular record of incidents.]
    blog | bläg |
    noun
    A web site on which an individual or group of users produces an ongoing narrative.
    ORIGIN a shortening of WEBLOG.

    Pardon my dust

    Kent Cowgill

    Please forgive me - I'm working on updating this. "This", of course, can mean different things. But what I mean is that I'm working on finishing my Grand Unification Project. What's that? Well, I'm finally bringing everything together. And finally making my blog public. It's done in Catalyst, everything else is plain CGI.

    All this means is that you might find some things that don't work from time to time. If you encounter this, please excuse me. I'm only human. I can't know about every single bug. Yet.

    So far, most of my blog has been updated. I even have a new version of my photos up and running. Even my resume has been somewhat updated... :)

    Related Photos: photos

    Catalyst wins again

    Kent Cowgill

    So I'm in love with catalyst all over again.

    I got tired of trying to figure out all these fancy-schmancy Object Relational Mapping database classes and trying to massage them to be able to understand my simplified database - which is a single table which is joined to itself for attaching a comment to a particular entry. I really didn't see any need for a separate table, since the structure of a comment doesn't really differ from the structure of a root post. Other than the fact that a root post doesn't have a parent.

    Thinking that restructuring the database was just too much work, I just ripped out the ORM and created a model class that simply ran queries and returned the results.

    Also, I added support for running my blog as a CGI and found that it was a really simple conversion, and only needed to update a few methods that I wasn't properly using before.

    Related Photos: None

    Is it just me?

    Kent Cowgill

    Snippet from a real conversation with names and features renamed to protect the guilty, on implementing a test feature for a piece of software I've been tasked to write:

    me: "Here, look at feature A, which is a test of X!"

    phb: "Oh, that's wrong, it's supposed to be B."

    me: "... But that's not spelled out in the requirements."

    phb: "Oh, it's there."

    me: "No, I just read them again, B is not mentioned. X is mentioned, Y is mentioned, B is clearly not mentioned. B is implied indirectly, but it is not mentioned. I implemented A to test X, but nowhere do the requirements say that A should be B. In fact, A is not mentioned, either."

    phb: "But it's in there"

    me: "No, X is mentioned, and to test X most easily, A should happen, but A is not mentioned, and B is clearly not mentioned. Regardless, if you wanted B a particular way, perhaps you should've, I don't know. mentioned it?"

    Had I only had a copy of the requirements handy, I would've happily requested said PHB to point me to the specific section.

    Related Photos: None

    Wow, IE is broken.

    Kent Cowgill

    I hope you're not looking at this using Internet Explorer. If you are, I'm surprised you're able to read this. "This", of course, referring to my new home page that I've been working on lately.

    I've run afoul of some of the more heinous differences between Internet Explorer and the rest of the more standard-compliant web browsers. Specifically, as it relates to Tableless web design using solely CSS for element positioning. It looks so easy at CSS Zen Garden!

    Please pardon my dust as I learn to work around these issues. Assuming you can even read this. And I just checked. It's quite likely you can't :(.

    Related Photos: None

    Figured it out, pictures are a-flowin'

    Kent Cowgill

    Sweet.

    It only took re-writing the thing from the ground up, switching out completely the modules I was using - but I finally managed to get that silly picture stripper/thumbnailer working again.

    Were it not for Imager by Tony Cook or Email::MIME::Attachment::Stripper by Casey West (with my friend Yaakov recommending the former and perlmonks.org for the alternative to MIME::Parser) - I'd still be spinning my wheels.

    During the debugging, I'd get MIME::Parser to appear to work, but then Image::Magick would stop working. Or MIME::Parser would fail me in strange and non-reproducibly ways but Image::Magick would faithfully render an incomplete image file.

    But no more.

    Related Photos: perl photos

    New Years Resolution

    Kent Cowgill

    I've resolved to figure out why my photo uploader keeps cutting off my pictures I email from my phone.

    It's driving me crazy - it used to work like clockwork. Snap a little photo with the phone, punch a few buttons, click click bang, and whaddaya know, my photoblog gets automatically updated. With a thumbnail and a picture that aren't broken.

    I'm working on it as I write this, waiting for slow email to arrive at my server.

    We'll see...

    Related Photos: photos

    Finally figured it out!

    Kent Cowgill

    So, I'm a moron.

    Seems I'm not making proper use of the Model:: modules. I had originally found an old out of date tutorial making use of the Class::DBI helper scripts, so that's what I used in making this blog. Problem is, the tutorial was woefully incomplete, AND CDBI seems to work - at the surface - without any additional configuration.

    Except when you have a stupid datamodel that requires you join a table to itself and get a count of child rows for each parent row.

    These days, using Class::DBI seems frowned upon by the catalyst community, so I think instead of trying to fix what's broken, I'll just use a different model to access my data - HOPEfully one that isn't woefully broken, lets me write some of my own nasty SQL and actually reference the correct results to stuff into TemplateToolkit.

    Too bad I'm busy working on my wishlist, otherwise I'd tackle this issue straight away.

    Related Photos: None

    Newest to do list

    kent Cowgill

    Ok, now I really need to concentrate on the formatting.

    I think for now I'll just do some simple multiline substitutions. A single linebreak gets turned into a br tag, two linebreaks next to each other get turned into para tags (which of course means that the beginning of all entries get a para by default). Update: I'm just going to use Textile.

    Next, HTML entities will go away. Cross site scripting anyone?

    Maybe there's already a plugin for this... (Catalyst::Plugin::Textile?)

    1. Add skin support
    2. Add parent topics to the top of the view template, add links to the recent table to read more of the recent posts.
    3. Maybe don't show "view" links for 0 replies?
    4. Add a threaded view. This will involve some more advanced SQL.
    5. Look into Class::DBI::Sweet - see if I can translate my single table join-to-itself query with Sweet - why junk up my code with ugly SQL?
    6. add next and previous navigation once I get over 10 entries.
    7. Move the SQL code to the Model object! :)
    8. Continue to tweak the look & feel. Maybe move it from index.tt to the header.tt. Maybe instead re-think the templating system?
    Related Photos: None

    New To do list

    kent Cowgill
    1. Fix formatting. Implement either WikiStyle or some other psuedo-html formatting. At the very least, encode line breaks. They're killing me. While I'm at cleaning up the input, how's about cleaning up the input? :-)
    2. Add the no-cache header.
    3. Add skin support.
    4. Add a real threaded view?
    5. Low hanging fruit: incorporate some better navigation, look & feel, left hand navigation, etc.
    Related Photos: None

    nasty sql

    kent Cowgill

    Ok, I'm not one for figuring out nasty SQL. I was about to ask my friend Devin to lend a hand, since he's really good with SQL. However, I was able to figure out what I was looking for, and that was:

    select a.blog_id,
         a.blog_parent_id,
         a.blog_title,
         a.blog_date,
         a.blog_authorname,
         a.blog_authoremail,
         a.blog_entry,
         count(b.blog_id) as child_count
       from blog a left join blog b
       on a.blog_id = b.blog_parent_id
       where a.blog_parent_id is null
       group by a.blog_id
       order by a.blog_id desc

    And the result of that query counts the sub-comments for each main comment in the very blog you're looking at now ;)

    Related Photos: devin

    Newer articles | Main Page | Login | Older articles

    Do you want to buy me ? Find more gift ideas at my wishlist