Sunday, June 28, 2009

first published code

so i finally figured out svn and the code seedlings are finally online.

the code is in the same state it was on thursday's update, theres a readme in the svn for more information.

this would be a good chance to remind any loyal followers that the project is sponsored by RPI's center for open source software, so direct questions to me and complaints to them. but honestly, i have to thank rcos for the opportunity to work on code i have a personal interest in, and thank sean o'sullivan for the funding to make it happen.

oh, the link for the project page is http://goffe.googlecode.com

good luck with it, send comments along to bryan.yudkin@gmail.com

Thursday, June 25, 2009

status update 6/25/09

after paving over the initial hurdles last week things have gone incredibly smoothly.

functionality has been added bit by bit and code is almost where i hoped it would be by the end of the month.

works:
takes input and opens corresponding xml file
parses XML, builds nodelist and arraylists of contents of root directory
selection of file or folder by index, opening/rebuilding contents of subdirectories
delete and rename functions for in-memory representation
creates and modifies current working path
input validation, exception handling (every bug i've caught but one)
etc.

to be continued:
fix one nagging exception
start writing changes to file
save new XML upon leaving
work on copy, paste functions, etc.

then onto the GUI.

Tuesday, June 16, 2009

status update 6/16/09

for something that was supposed to be so easy and standardized, learning how to make the DOM do what i want it to do has been a huge pain in the ass.

a lot of it is my fault too, to be sure, like not updating the DTD for XML validation when i changed the layout of the fields in the XML.
so, the DOM was inserting null characters in my nodelists, which is just bad for everyone.

in any case, those simple mistakes have all been cleared up, after hours of debugging, and hopefully a text-based tree walker type majigger will be ready by the end of the night.

with how quickly these tiny errors multiply, i'm beginning to doubt it.

what works:
xml builds (or close to it)
xml validates and loads
given a folder element, the code builds arraylists of file and folder objects. then it lists them.

what doesn't work:
everything else

Wednesday, June 10, 2009

status update 6/11/09

i suppose using 'tree' was a bad idea, but ive been stuck in this quicksand so long trying to float i never bothered to grab the rope and switch to ls.

major issues have come up as a result, and trying to iron them out has been a major goal before proceeding into the java section of the code. i wanted to use tree to build the XML due to its functionality, it did everything i wanted it to, nothing more, nothing less. line by line data that was practically XML already.

everything worked fine until i went to validate the XML and found there were missing tags. enough sleuthing around and i found the issue: subfolders, while further indented than their parents, didnt have any kind of delimiting character i could use when awk recomputed its position in the subfolder nesting.

long story short, when attempting to close folder tags, if it had to do more than one at a time, it couldn't. due to the way the code has been designed thus far, there is no way to correct the issue (not that i see, anyways). somehow i missed this in the slew of vertical lines tree spits out.
if i wanted to correct it, i could switch the script to use ls, but since i'm hoping to put the XML building functionality into the java later on, this seems like a waste of time.

anyways, when i manually put the tags in, the code validated with no errors against the DTD i had written. what a shame to waste such "almost perfect" code.

since the XML did validate, i can move onto the java tomorrow, and hopefully build something like a DOM tree crawler to lay the bricks for the GUI down the road.