Sunday, August 26, 2007

hackystat withdrawals

so, i've been AFH (away from hackystat) for the past week or so. and i noticed that i miss it. i also noticed that it is pretty easy to want to spend 30 minutes a day on hackystat and find yourself spending the whole 30 minutes on reading emails, thinking about design, etc and no a single minute on coding. doing that kind of stuff consumes your thoughts and you can get lost in it (which is a good thing).

for me to work on hackystat i need to do the following:
1) find the time (about an hour or more) preferably not interrupted
2) i have to (or really want to be) up-to-date on all the emails and postings, etc. so if takes me the whole time to do that, then i'm done. no hacking. and no, i don't feel bad.
3) make time to write an email. i like to write emails about hackystat. for example, i read other peoples emails, read code, etc. i like to provide input. its fun
4) i like to collaborate on tasks over instant message. so, if austen is working on something. its fun to know what he's working on and what choices he's is making. likewise, its fun to let him know what i'm working on, etc.
5) and general day-dreaming about hackystat is aways necessary.

wow.. so that's probably a lot different from things that i need(or want to do) when i actually do "real" work. haha. :). why is that?

to me that is the definition of a good project. give me an environment that makes feel that way and i'll be happy.

Monday, August 20, 2007

vacation over back to work

booo.. my vacation is over now i actually gotta do work-work. but, i promised myself that i will try to make time for hackystat. the only thing that i can sacrifice is watching tv. ah.. no big deal, i would do that in an instant if it was that easy.

anyway... stay tuned for more very soon.

Sunday, August 19, 2007

an observation and SensorPropertiesException

just a strange observation that i had... out of hackystat-sensor-ant, hackystat-sensor-shell, hackystat-sensorbase-uh, hackystat-utilities i think there is just one Exception class. until i look at the code i guess that doesn't really mean anything, but i wonder how the implementations are handling error conditions. anyway, i'm not saying thats bad (well, i guess i don't know at this point), but it smells funny.

IllegalArgumentException vs a check exception
so, i thought about what i'm doing for Issue 9 in the SensorProperties class. i'm throwing a checked exception when the sensor properties file is invalid (missing, not readable, etc). so, why i don't i throw a unchecked IllegalArgumentException? Hm... I think thats because, this error should be handled by the clients. see this little article (i looked it up to make sure i was right).
  • Client code cannot do anything - Make it an unchecked exception

  • Client code will take some useful recovery action based on information in exception - Make it a checked exception

  • In our case, all the client should do is report to the user that the SensorProperties is invalid and to configure it. In my mind that is a useful recovery action. Moreover, in some ways it forces the clients to check and report problems with the configuration.

    so, to conclude, i think this is my justification for doing the way i'm doing it. any problems with that?

    Saturday, August 18, 2007

    developer releases...

    woah.. okay i just realized that we are going to have a lot of services. and that means a lot of version management. code in hackystat-sensor-ant's svn trunk might work against hackystat-sensor-shell that was released a month ago, but has since been totally reworked. so... when we make a release how do we know that hackystat-sensor-ant-8.0.816 is compatible with hackystat-sensor-shell-8.0.816?

    this is a difficult problem.

    here is an example: i want to make a change to a constructor that introduces a checked exception; see the email. but, now instead of using refactoring or other eclipse ide tricks of changing all code that uses the constructor, i will have to build SensorProperties and make a distribution, then manually fix the errors that come in all clients of SensorProperties to make sure that everything still works. to me this is related to the problem i pointed out previously with the eclipse project dependencies.

    anyway, i'll give it a try. at the very least documentation will have to improve to ensure people understand the changes to the API.

    Friday, August 17, 2007

    hackystat is fun, google issues

    hackystat is fun
    it is so nice to be able to work on hackystat again. i didn't realize how much i've missed it until i started hacking again. hackystat is great because:
    - you can understand other peoples code.
    - you can make suggestions and people listen
    - the developers strive to make it the best possible system
    - hackystat is big enough but not to big, it tackles a difficult concept, but in small understandable chunks
    - the design is clear and things are abstracted nicely
    - i'm running out of words... but, you'll notice that once you get into hackystat and really understand it, you'll be hooked. trust me. if you disagree, then as austen would say your a noob.

    google issues
    so, i have some issues with google issues and the way we use it in hackystat v8. i have a few, but i'll explain one. my issue is that when users use hackystat v8 (add a few of its services), is it going to be easy to identify where the bugs came from? i bet its not. yet, in google code we have a issues system that is tightly coupled to the service. so, if a users fires up a web browser and finds a error, he'll probably log the bug in the web UI. but in actuality, the bug might come from sensorbase. what is worse, the web UI developer could be totally clueless about that and ignore the issue all together. thus, the sensorbase bug, will go unnoticed.

    okay, so i can't resist... i have more... how the heck can you move a google code issue from one project to another. sheesh... they should work on a better system. what the heck is up with the separate google code password. sheesh...

    Thursday, August 16, 2007

    hackystat eclipse projects and a fix for an issue

    i noticed that there must have been a decision to use jar files to handle eclipse dependencies. i'm not too sure i like that move. anyway, i suppose we can just attach the source. i tried that in eclipse and it didn't work... hmm. i thought i was an eclipse expert.

    it took me a little while, to figure out that i was attaching the wrong source directory. haha. sheesh, what a noob. so, in eclipse if you have the source directory all you have to do is point to the source directory. anway, i think we still should be creating a jar with the source. something like the following target:

    <target name="jar-source" description="Create the source in sensorbase.jar">
    <!-- Define the directories and distribution name -->
    <mkdir dir="${tmp.dir}" />
    <copy todir="${tmp.dir}">
    <fileset dir="${src.dir}"/>

    <jar destfile="${basedir}/sensorbase.source.jar" basedir="${tmp.dir}">
    <attribute name="Main-Class" value="org.hackystat.sensorbase.server.Server"/>
    <attribute name="Implementation-Title" value="Hackystat SensorBase-UH"/>
    <attribute name="Implementation-Version" value="${version}"/>
    <attribute name="Implementation-Vendor" value="Collaborative Software Development Laboratory, University of Hawaii"/>
    <delete dir="${tmp.dir}" />

    dev work
    i also worked on a bug that i found, issue 3

    dev process thoughts

    um... where is the freshStart? what ant targets do i have to run to ensure that everything is all good. actually, i know the answer, but will other people. woah... is the answer to this one. on another note where is the continuous integration?

    also, i would suggest that our goal should be to tighten up the checkstyle errors now. that means check for brace placements, whitespace, parentheses, etc. i propose, that we create two checkstyle configurations one strict and one with our current checks. the goal would be to convert to the strict one.

    Wednesday, August 15, 2007

    smart and get things done then on to man-month

    i just recently finished smart and get things done by joel spolsky. as usual, his books/articles are really good. unfortunately, i've read a lot of what is in the book. yet, it was still a pretty good book. i also like that it was really fast reading. anyway, i would recommend skimming through it at the very least.

    i'm now reading they mythical man-month, by frederick brooks, jr. i've read most of this book a long time ago. so long ago, i don't really remember the chapters or maybe i didn't really understand the meaning of it all. anyway, the book is going well. i like a few of his points. one thing that i thought was funny was a chapter on space management. i didn't read it... but it was funny to see something like that.

    then after that, i want to read restful web services and then a book on data mining. i have these two books staring at me right now.

    getting started with hackystat

    I know I've been slacking a lot. Work is keeping me busy. Anyway, I had a day of vacation and I missed Hackystat Hacking some much I decided I better get my daily serving of V8.

    So, I just spent a little while just getting up to speed on development, reading, and rest. On the development side, I just finished getting the sensorbase running. Here are some of my notes (i guess i should set up my Hackystat blog):

    1) <fail message="This package requires JavaMail 4.1 to be downloaded and JAVAMAIL_HOME defined" unless="javamail.available"> 4.1 is wrong... its 1.4, right?

    2) a lot of the tools on the developer guide are outdated. I found that out after downloading the latest versions of all of these. So, I downloaded the ones specified, which was a little hard, some of the old tools are not directly listed on the web sites. Okay, I understand that the versions listed there are tested and confirmed. But, I would imagine that with the current ANT Build process, that upgrading the tools within the build.xml files is going to be a big pain. Tool versions and paths should be specified globally for all hackystat services via a properties file. That would be my suggestion.

    by the way, a new version of Derby was just released on my son's birthday. Also, note that i can't seem to download the old one. I don't know what is up with that, because they provide past releases.

    oh... well, i thought i had more to talk about.. but, I'll be sure to keep you posted on my progress of getting started with V8.