Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

KM (4)

KM
  (email not shown publicly)
AOL IM: perlguy13 (Add Buddy, Send Message)

I wrote a book, maybe you will buy it. Writing CGI Applications with Perl [perlcgi-book.com]

Journal of KM (4)

Friday August 15, 2003
07:30 PM

Validate::SSN

I didn't see a module on CPAN for validation of SSN numbers.. not validating it has 9 digits, but validating the area, group and serials. I'm starting to work on what will probably be Validate::SSN (or SSN::Validate) to do this.

So, not wanting to redo any existing wheels someone may know about, let me know if you are doing this or if it has been done and I haven't found it. Or, if anyone else would find this useful, let me know.

Also, if anyone knows of any RSS feeds or fetchable lists of updated areas and high groups (didn't notice any on the SSA website), please point me to them. Right now the module has all the area info in a __DATA__ section.. so this means it will have to be updated by hand. An RSS file or something would allow me to have a script update the module automatically when any changes are done. I'd rather not screen scrape, or depend on myself to look for changes on the website. Need to stay lazy ;-)

Wednesday August 13, 2003
05:45 PM

No Perl Mongers Here

Seems there are no active PM groups up this way. A few weeks ago I emailed some contact which seemed like a HudsonValley.pm, but got no reply. I see no Albany.pm, or Saratoga.pm.

If you are a Perl hacker up this way, let me know. I already started one PM group (Hartford.pm) and helped revive another (SouthFlorida.pm), and don't feel like starting another one unless I know some folks are in the area. "In the area" for me is Albany to Lake George. I'm up for getting some lunch, doing a talk, hanging out.. anything!

Thursday August 07, 2003
07:05 PM

Powerpuff Girl Cake

Here it is, Kyla's 5th birthday cake.. decorated by Suzy and named by me... Powerpuff Girls On Acid Cake! Behold the wonder!
Wednesday August 06, 2003
02:11 PM

Kyla turning 5

Tomorrow Kyla will turn 5. I sort of feel bad for her since her party will be lame. Since we are new here, she has no friends to party with. So, it will be family. My mom is coming up from FL, and of course my dad already lives here. I'll be baking her a cake in a little while.

5 years. Wow. Seems like only 4 years and 264 days ago when she was a little helpless thing which pooped at will. To date she has installed FreeBSD (I told her what to click, and she would), installs and plays games on her own, knows her way around various kid websites, talks, runs, can read, and does all sorts of things which amaze and amuse me.

She's a cool kid. I think I'll keep her :-)

Saturday August 02, 2003
06:57 PM

Presentations

One of these days I need to write a presentation. I once started a CGI one (after all, I wrote a book on it, so should be able to do an talk on it!), but never finished. I wrote one (and gave one) on all the bits of an email, especially header info and ecodings. I didn't have much Perl in it, just more of a "How to look at raw email and understand it, so you understand how to parse it or what a parser is doing when it parses it". I also gave one on I18N and G11N, in relation to emails (this was part 2 to the headers) and the web. Covered a lot of dealing with encodings, double byte characters, UTF-8, etc... While I was working at Verio I learned a lot about email structures, encodings, charsets, etc... since I had to write a "globalized" web based email system. I wrote some modules which do various header parsing/creation which works nice with non-ascii charsets (concentrated on iso-2022-jp, Shift_JIS, iso-8859-1 and UTF-8... but uses iconv for whatever conversion is needed). Why not Encode.pm? Wasn't considered stable at the time (and we were using 5.6.0). And the existing email parsing modules didn't seem to work right, or do what I needed as far as getting a folded iso-2022-jp subject converted to UTF-8 for web display.

Maybe I should revisit the talks and add some Perl-fu into them. YAPC will be here before I know it! They are interesting on their own, but would need more Perl... or maybe not.

Wednesday July 30, 2003
10:50 AM

Spaghetti code to Ziti

I mentioned I am refactoring some code for a client. My first step was reformatting (perltidy and some by-hand stuff), and fixing up some minor code mistakes and consolidation along the way. I'll tell ya, formatting helps wonders. Spending the time to do proper indenting, make some things more consistent, and more visually pleasing can make speghetti look much more like ziti.

Now I can start breaking out some redundant code and making it modular. The guy(s) who originally wrote this were, er.. not the greatest with code design. Sort of half Matt Wright-esque and half "Hey, noone else will ever work on this". Of course, now I am maintaining it so I feel the need to better it for my own sanity and time.

There are thousands of lines of code in about a dozen scripts. No warnings, no stricture, not even using CGI.pm (except for sections I added) or ANY (that's right NONE) modules from CPAN (again, except for my sections) aside from DBI. Thank god they didn't reinvent DBI along with everything else!!

So, now I need to plan how to keep making the code better without completely rewriting it. As I went through the code I noticed some obvious things to consolidate... so I guess I'll start there and see where it goes. At the very least, I can now visually follow the code!

mmmmmmm.... ziti

Tuesday July 29, 2003
12:17 PM

Florida Bad, NY Good

I think 98% of anyone I meet.. from neighbors to barbers.. after asking me where I moved from say "Why would you move from Florida to here??" in a tone of "what are you nuts?" Sort of tired of saying over and over "It's too hot and flat there for me, I just don't like it", I decided to start posing the question back to them. I started with the lady cutting my hair. She asked, and I replied "Well, why don't you move to Florida?" She paused, then replied "Florida is nice to visit, but I like it up here." EXACTLY!

I think I'll just started saying I moved here from Buffalo when people ask where I moved from.

Thursday July 24, 2003
06:25 PM

Races begin!

Saratoga Springs sure loves horses.. that's something I have learned since living here (if I hear about Funny Cide one more time...). The Saratoga race season started yesterday. So, went to the track today. Was a lot of fun. Out of the 6 races I stayed for, here are the standings for picking winners so far:

Me: 0
My Dad: 0
Kyla: 1

Kyla picked the winner for the first race. I wish I kept track of this when I went to the track in FL, because I think overall, Kyla (at 4) has a better win ratio then any of us.

Tuesday July 22, 2003
06:38 PM

Kyla Reading

I don't think I have mentioned it, but Kyla has been reading quite well over the past 6 weeks. She is excellent at sounding words out, and can read some beginners books on her own. I have no real idea when kids start reading, but people seem to be impressed with how well she reads at 4 years old (5 next month). So, I guess she is doing quite well. Luckily, her new school (kindergarden) will make sure she reads where she is at, and doesn't re-teach her how to read what she can. I'm very proud of her.. and tell her that often.

Monday July 21, 2003
01:48 PM

Refactoring

Doing some code refactoring for a client. There is a lot of code which was written by someone else, who didn't seem to have much experience with CPAN, or code design. As I go through it, it seems I say to myself a lot "This should be pulled out, and this too.. and this". I could rewrite the whole thing, but don't want to and won't have the time to do so right now. That would be a long-term goal.

So, right now I am starting with formatting (perltidy, and various things it doesn't catch) so at least it is more readable for maintaining. Also catching various "This could be written better" blocks and snippets which I am fixing. I guess once that is all done I'll chose something to start really making better. Like abstracting the SQL from the main code, incorporating some CPAN modules, and seperating some of the HTML from the code.

Lots of fun doing it though. Every time I do something, anything, with it I know I am making my life easier for down the road.