Playing outdoors again

Posted on

Thanks to BigSoccer, I found a co-ed soccer pickup game to play in this past Saturday. Staci and I headed to a field nearby in Reston where we had a fun time running around and kicking the ball around. I've tried to start running again so I wan't as embarassingly out of breath as I could have been. Still, running around for an hour and a half took a lot out of us and we pretty much vegged for the rest of the day to recuperate.

Tags: Real Life

─── ✧ ─── ✦ ─── ✧ ───

Blatant TiVo crowing

Posted on

Rumors that Tivo and Netflix might partner together to deliver DVD's over broadband have me intrigued. The idea of getting movies delivered via broadband appeals to the lazy slob in me but the technophile who invested in an HD capable projector and progressive-scan DVD player wouldn't want to watch any movie coming out of the current, standard definition TiVO boxes. There's probably a lot more to this story, not the least of which, I suspect, is that this would be a feature of 3rd generation Tivo's.

On to the crowing, with Java Home Media Server I've found that my TiVo becomes more than just a fancy DVR. It has come in handy recently when we've wanted to show off some digital pictures in the comfort of our living room. Another very neat feature I discovered is the ability for it to serve as a proxy for shoutcast mp3 streams. That alone has opened up some channels for finding new music to listen to at home.

Tags: Movies, Music, Tivo

─── ✧ ─── ✦ ─── ✧ ───

Being a Good Debugger, PHP style

Posted on

One of the things I have found that irritates me needlessly are people who are impatient debuggers. Finding and fixing bugs is certainly one of the least enjoyable activities you have to put up with when writing code. It takes a certain amount of persistance for going through the code to make sure you're understanding what it does (not what it's supposed to do) balanced against knowing when to ask for help or a second set of opinions. A quick search of the web didn't turn up many non-technical tips about debugging scripts. Debugging Web Applications is certainly worth a read. Here are some other tips for being a good debugger in PHP:

Use Xdebug

Install and use the X Debug extension, which replaces php's error handling with more verbose output including a trace of the function calls leading up to your error. This will avoid tracing the program flow from the beginning.

Verify all of your assumptions

Use phpinfo() to verify php settings, such as your include path and what extensions are loaded. Don't assume something is setup or installed without confirming. For example, if you have an error log, make sure your script/php is set to log to that file and not some other file.

Document code behavior

Add comments for particularly hairy sections of code. For one, if you can describe it in a comment, you'll have a better understanding. Also, if you have to come back to this code later you'll save yourself some time in figuring out what that code was supposed to do.

Ask for help with details

When you need to ask for help, the more details you can provide the better. It's rarely productive to tell someone that script X is failing and to leave it at that. Indicate what you've tried, what you have checked, and what you've verified. Your colleague is in a better position to tell you what else to try as well as point out what you might have missed.

Other good articles on the web:

This list isn't comprehensive by any means, if you have any other tips to share please leave a comment.

Tags: PHP

─── ✧ ─── ✦ ─── ✧ ───