oscartheduckin’ around

November 8, 2009

test driven development

Filed under: Uncategorized — Tags: , , — oscartheduck @ 9:16 pm

So, it’s been a while since I’ve done this.

 

Test driven development.

 

I’m taking the time out on tabbr to refactor completely with test driven development from the bottom down. Why? Because I’m so fucking sick of small errors appearing because I was reworking code slightly and didn’t notice a typo, or a cmd-X and cmd-V took a wrong character with it because of a bad selection or something similar.

 

The latest misfire: I just discovered that a dump of an object to yaml is coming back with dumping the false object instead. When did this error happen? It’s such a simple thing, what the fuck is going wrong? All I can imagine is that an array that’s being initialised in the object creation isn’t being created properly, because I’ve been working on methods that alter data structures. And that’s simple to find and fix, but I should have something automatic that’s telling me about it. Maybe I can write a pre-commit hook in git that runs all the tests, as soon as I’ve written them up.

 

I’ve been writing code too long to keep ignoring what is, really, the basis of the current vogue trends for behaviour driven development and the like. Test driven development is the real basis that makes agile programming completely doable, and I’m not doing myself justice by ignoring it.

 

I did have some shell scripts I was keeping up to date that did similar things, but dumped the output of a bunch of config files to stdout instead of just being automated testing suites that’re built in. Serious duplication of effort somewhere there.

 

Blah. I should learn from the crowds more.

November 4, 2009

gnomr

Filed under: Uncategorized — Tags: , , , , , , , — oscartheduck @ 9:52 pm

I’ve been thinking for a while that it’d be useful as all hell to have a solid configuration tool for gnome to generate kiosks. Internet kiosks. With one click of a checkbox.

 

So, I started reading the gnome sys admin guide today. It looks like this won’t be too hard to pull off, especially if I concentrate on getting it working well in just one linux distribution and in FreeBSD and accept that that’s the limit of my ambitions. In either case, FreeBSD’s gnome configuration is different enough to most linuxes that I imagine that alone would be a good couple of cases to ensure cross-distro viability.

 

It might be simplest to configure things how I want using the tools in gnome2 itself, rather than attacking the xml config files, then dump out the xml configs and write a tool that’ll just copy ’em over a user’s defaults.

Blog at WordPress.com.