I've been learning to use WattDepot, which is a project of the Collaborative Software Development Laboratory here at UHawaii. It's a great, open-source tool for tracking energy and power usage, and provides a friendly API which makes it much easier for noobs like myself to learn how to use it. Friendly though it is, completing the katas was still a challenge. I learned a few broad lessons along the way, as well as many that pertain specifically to WattDepot and its use.
Broadly, I was again reminded that knowing when to take a break, to walk away from the code when I get stuck, can be valuable to my sanity. When stuck trying to print a hierarchical representation of the different sources–the meters that gather data about energy use–I remembered to be patient, ask my usergroup, and move on to other work rather than bash my head against the code-wall, so to speak. There are good reasons not to push too hard.
First, I've heard that the unconscious has a way of processing problems, passively, and my own experience has validated this. It's an unquantifiable cognitive benefit, if you ask me. It's possible for the intuition to do some of the work, if allowed the time it needs. After sleeping on it, I returned to the work and felt as though I had fresh eyes. It didn't take that long to solve the problem I was having: All I had to do was dig through the API and find a few calls to get URIs and references to source objects. As my professor told me, the last ten percent of the project is ninety percent of the work.
Another good reason to walk away from your IDE is stress-reduction. Computers are not always forgiving, and they can be big sources of stresses, and therefore illness, in your life. So, when you are mindful of stress and allow yourself a break, you are taking care of your health, too.
I managed to complete five of the six katas. Some took under an hour, others took a few hours. The last of them, I haven't touched yet—and I'm out of time. Having spent a little time learning (and struggling with) Java's Formatter class, which formats output in a manner similar to C, I'm learning to like it well enough. Used correctly, it makes a program's output somewhat more beautiful and readable.
These katas were quite enjoyable, and it was helpful to have another opportunity to practice with build systems and automated testing. I'm only beginning scratch the surface of WattDepot and the broader science of energy metrics, but it's very exciting stuff. Maybe, in the near future, I will be getting fancy with it, programming Arduino devices to integrate into the WattDepot system. In any case, I hope these katas will not be the end of my experience with the data of energy. So far, It's been fun.
No comments:
Post a Comment