I have finished my work for 0.1 as detailed in my project plans here and here
The project wiki: here.
Specifications
my 0.1 release was in time to make it into the 0.5 release of processing.js
I did bug #226 for my 0.1 as well as some automated test cases for the new code I implemented.
What I had to do was protect string content from the procesing.js parser, then test it.
my initial patch: here
second patch: here
Final result: This code was modified to increase speed every so slightly, but every bit counts.
var strings = aCode.match(/(["'])(\\\1|.)*?(\1)/g);
for ( var i = 0; /(["'])(\\\1|.)*?(\1)/.test(aCode); i++){
aCode = aCode.replace(/(["'])(\\\1|.)*?(\1)/, "");
}
into this.
var strings = [];
aCode = aCode.replace(/(["'])(\\\1|.)*?(\1)/g, function(all) {
strings.push(all);
return "";
});
I have to thank Corban Brook for helping me fix the code, and get it out as soon as I did.
Automated tests: here
What I learned
- Object orientation in javascript. By seeing Java object oriented code being transformed to JavaScript, I got a good understanding of how JavaScript objects work.
- Managing and working with processing.js source code; large code, that was not created by me.
- Basic uses of irc. I used ChatZilla and later irssi. I switched so I could use irssi with screen.
- Revision control: git and mercurial. I used git to work with processing,js, and mercurial to work with Firefox (to setup js.exe, which I mentioned in this post)
- I learned how to build Firefox, and setup a Firefox build enviroment.
- I learned some standards for code. Like where to and not to use whitespace.
- One of the most important things; I learned the importance of blogs.
- I learned there is no such thing as too much testing.
Conclusion
A lot of this is technical stuff that required troubleshooting. I am confident that the next release will be less of a learning process, and I can get deeper into the code.
No comments:
Post a Comment