It's more than a house. It's an adventure.

Friday, June 16, 2006

I gotta say it was a good day

Or at least morning. This week a co-worker has been working on making some updates to a pretty important Perl script, but she's got no experience with the language. It's been a couple years since I've done anything with Perl, but I offered some help as questions came up. It's a mixture of flat-file access, database work, and manipulating Excel files. DBI, Win32::OLE, and a few other fun things thrown in.

She started by stripping the script down to the barebones, than building it back up gradually, adding back in the functionality that was unchanged, and tweaking the things that needed updates.

I initially tried to steer her toward using MS's ADO for the database access, instead of DBI, as there were a few things she needed to do that would be easier that way than with DBI. But, with most of the script already using DBI, it was better to keep using it. I'd never used DBI, but seeing code that did work, it was easy enough to get my head around it.

So, we chipped away slowly at the piece she was having trouble with, discussed how we thought the code worked, tried some basic "print debugging" and lo and behold, got things working as expected! Spent about 45 minutes on it, but made huge progress for her.

Our primary goal accomplished (connecting to the database and getting results back), I turned my attention to her development environment. She was using Notepad. I asked her if she'd be interested in another editor that might help her work with the code a little better, and she readily accepted. I sent her a copy of SCiTe and she promptly installed. She loaded her Perl script into it and I think I actually saw the light bulb over her head come on. She was thrilled! Syntax highlighting, bracket matching, code folding...she could actually see how the code worked about 100 times better than the plain black & white of Notepad. I think I made her week. And I had a good time too. It was great just looking through the code, picking it apart, learning how it worked, and getting everything new working again.

She asked if I like brownies, I think I might be getting a plate on Monday.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home