Here you will find a collection of things I've worked on or found interesting and worthwhile to post. There is some poetry and other written works, as well as projects and programming thoughts/ideas/tips.
Submitted by nathanieltroutman on Thu, 10/09/2008 - 00:31
So I wanted to swap to objects, and I prefer to write short clean code, especially to carry out simple processes. The idea was that I have two objects, in this case treeA and treeB and I wanted treeA to be the deeper of the two trees. Now the long way would look something like this:
if treeA.depth < treeB.depth:
tree = treeA
treeA = treeB
treeB = tree
Which is a little ugly, 4 lines to reorder something, so there neat trick is that if you want to swap two objects a and b simply use:
Submitted by nathanieltroutman on Thu, 08/07/2008 - 16:15
Thanks to Kiam who posted a bug at http://drupal.org/node/292242 I learned a way to properly do requirements testing to make sure the core Blog module is disabled before EveryBlog is installed.
Automated testing looks like its the way to go to help reduce the number of bugs that show up in releases. Drupal's SimpleTest module looks like it should be pretty straight forward, and it has plenty of helper functions to make my life easier as I code up the tests.
Submitted by nathanieltroutman on Sat, 07/26/2008 - 13:49
Up until now I have just been using the original search radius from the kd-tree searching to use in the irradiance estimation steps. But someone mentioned and flaw in the images, the dark edges along boxes, and I thought that perhaps the radius was wrong. For reference here is an image with that uses the search radius in the irradiance estimation.