Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

  (email not shown publicly)
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Thursday May 29, 2003
03:14 PM

Development Blues

[ #12509 ]
Predictably, I think I've hit a block.

I was accidentally trying to do test-driven development (which I realized by accident; I wasn't writing real "tests", more just printing the values before writing the code that calculates them and then writing the code and running it between) and I think I've written a morass of code.

To top it off, I'm starting to think I placed the wrong information in the data structures to begin with. Currently, I'm only figuring centroids when the object is created.

A better way to do this would be to set up a cache of calculations, figure out some quick way to test whether they'd changed at all, and then recalculate everything upon use of the apply method if anything changed. I'm not smart enough to figure out how to do that just yet, but I'm working on it.

I guess the problem isn't that the code doesn't work -- it's that it's ugly as sin. It has no idioms to speak of, and where it does they reduce readability.

I'm going to try to fix the unprettiness once I get home. I just can't write more code in this and keep it straight in my head. In the meantime, I'll try to work out what process is needed to calculate the final product and diagram it, since I can't seem to write it in Perl.

Since I'm a dipshit, I set up a wiki clone (chiq-chaq, to be specific) and I use it primarily as an enormous scratchpad. Easy to use as a bookmarking system, easy to use as a content creator, etc., and with more formatting and style options than, say, Notepad, or Hotmail. Handiness.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.