Another script I have previously posted was about parsing one of our Apache’s log files to determine the actual browser share on our site. Sure, you can find the aggregate numbers online from a pan-Internet perspective, but when choosing test data for our site I really only care about the numbers as they relate to our site. This is another important piece of the scripting puzzle: make it work for your own needs first. Only then should you make it generic. And only if you have time.
I’m sure there are more scalable and/or efficient ways of gathering and displaying the data (dynamically adding keys to the hash for example) but the script is both unrefactored and one of the first ones I wrote in Ruby so there is a lot of newbie-isms in there as well.
The script itself is in Ruby (as mentioned above) and is shown in the midst of a larger discussion on the definition of Quality.
Categories
- Android (2)
- BITW (5)
- Books (21)
- CAST2008 (2)
- GLSEC2008 (14)
- Housekeeping (22)
- Interviews (1)
- javascript (1)
- marketing (1)
- Podcasts (28)
- Process (23)
- Python (19)
- Quality (400)
- Ruby (7)
- s3cr3t (1)
- Selenium (10)
- Star West 2010 (8)
- subversion (1)
- Uncategorized (415)
- Video (54)
- What I Learned Yesterday (3)
Find things by
- Browsing...
- Searching...
check out Tim Bray’s Wide Finder competition if you haven’t. It deals with parsing Apache logs in various languages to find the best/fastest implementations. Some really cool stuff in there. There is a Ruby implementation as well that may be of some use to adapt.
http://www.tbray.org/ongoing/When/200x/2007/09/20/Wide-Finder