This section lists all blog posts, regardless of topic.
20 minute challengeJuly 18, 2007
After work this evening, Meredith and I went to the Running Room to take part in the
20 minute challenge. Basically, you show up, get a free hat, and then head out to Laurel Trail to run/walk for 10 minutes, then back for 10 minutes. Despite the rain it was still lots of fun and it was neat to see so many people of all ages. Afterwards, we used our 20% off coupon and got some nice running shorts.
Update: Running shorts with sewn in breathable boxer briefs... there's no going back once you've tried these puppies on!
Logging business logicJuly 15, 2007
Where would we be without log files? They help users, system administrators, and developers peak under the hood of software. And while developers may have access to debuggers in some cases, avoiding time consuming debugging sessions with good log output is a smart practice.
Something I've learned this year is that it can be very useful to specifically log business logic. More specifically, if you were to create a flow chart for your program's execution consisting of the various steps, decisions, etc, and then translate that into log output, you'd have a representation of what the program is doing. When the program starts behaving in a suspicious way, you compare the log output to the flow chart that you created, and from there you're in a very good place to proceed with either fixing the program or simply explaining why the program is doing what it's doing.
Again, this level of logging should be highly analagous to the business logic / business processes and shouldn't include any trace output from low level functions to confuse the matter. If the logging output is polished enough, a technical support person should be able to read it comfortably. Here's an example:
2007-07-01 02:33:43: Purchase request 2007-07-01 02:33:43: Username: dbigham 2007-07-01 02:33:43: Valid username and password? Yes 2007-07-01 02:33:43: Book ID: 2922882 2007-07-01 02:33:43: Book in stock? Yes 2007-07-01 02:33:43: Valid credit card number? Yes 2007-07-01 02:33:43: Charge credit card 2007-07-01 02:33:45: ERROR: Couldn't connect to billing server 2007-07-01 02:33:45: Abort transaction |
|
Each of the lines with a question mark correspond to a decision point in the flow chart, and items such as "Charge credit card" are analagous to subroutine calls that may have their own flow chart.
The next step is to mark your log output with a unique identifier that represents the transaction/event. For example, the above output could have the text "TRANSID:1892828" put on to each line. With this in place, the log file can be easily parsed into a database and transactions/events can be listed and made searchable on a web page, with the relevant logging output available by click. Furthermore, the error lines can be flagged in the database and presented in an error log, again clickable, so that given an error you can see what was happening at the time.
Hanging from the catalpaJuly 14, 2007
When I was 13, I was a featherweight of a kid, weighing in at 99 pounds. I had just finished grade eight, and had enjoyed being on the wrestling team. But I was still a bit of a
weakling, and I wasn't yet able to do a chinup. The next best thing was hanging from tree branches. We had a catalpa tree in the back yard at the cottage, and there was this one branch that was the perfect height to hang from, 8 feet off the ground. It became a bit of an endurance test between Graham and I and a place to hang out. The next year I was finally strong enough to do a chinup, and soon I was doing 10. Well the tree is gone, but it's fun to remember one of the many ways I enjoyed the catalpa.
older >>