There are so many things wrong with Verbosio in its current state that it’s hard to keep the faith, and keep going. A number of large issues have been bubbling around, the biggest one being that I can’t support WYSIWYG editing. But that’s a discussion for another day.
Because Verbosio is intended as a complete application, involving a combination of chrome, content, and extensions, getting a proper development environment is notably a struggle. For example, I simply forget how to recompile IDL files after I’ve made a change to them. IDL’s are actually pretty important in Verbosio, so that barrier alone to development is tough.
On top of that, I frequently make changes to Verbosio code, and forget to move it back to my Verbosio repository. I’ve probably got six or seven complete copies of Verbosio in various states of disrepair, and so by not using the advantages of CVS revision tracking (SVN would be better, but mozdev doesn’t have that yet), I have allowed myself to lose pieces of code in development… which is even worse than outdated IDL’s.
So on Friday evening, wanting to get myself organized, I grabbed Mozilla Sunbird 0.3a2 (I’m a developer – alphas only frighten me a little), and started writing down some of the unfinished business I have with regard to Verbosio and mozilla.org bugs. It turned out to be a big list… and the first thing on it was to simplify the development process between repository and objdir’s. In other words, time to write some Perl and shell script code.
Now, I’m not all that great at Perl. But over the last year at ManyOne Networks, I’ve been exposed to more than a little of it. So with a handy Sams Teach Yourself Perl in 24 Hours guide, a few script subroutines borrowed from work, and an unhealthy bit of trial and error… I got a basic make-project.pl script written to handle exporting repo code into objdir code, and set up for the reverse.
I could have written it as a Makefile, I suppose… but Perl seemed to have more of the capability I needed. The Makefile will of course call on the Perl script… later.
Just to write this one script has literally taken me about 18 hours in pretty much one straight shot (one break for food, and another break for Saturday night anime). Along the way, I learned a few things:
- XPIDL generates .xpt files for one IDL file. To get more than one IDL into a .xpt, you have to use xpt_link. I think it was shaver who told me that…
- Mozilla’s cygwin-wrapper doesn’t like /tmp. Imagine that. I can’t really blame them, though.
- I am woefully inexperienced with shell scripting.
- I really should learn more about Perl, in particular Perldoc.
- I should also find or write a common assert() & design-by-contract functionality for Perl. die()’s okay, but not great. I like debugging structures in any programming or scripting language. (Maybe I can ask Damian Conway nicely for it. If he can handle Klingon with Perl…)
- Okay, I didn’t so much “learn” as “already knew” this one: when one doesn’t eat for over 15 hours, including sleep, a mental numbness begins… I skipped breakfast and lunch, and my dinner was at about a quarter to nine PM here. I last ate at about 1:30 am. I actually wanted to leave about 5 PM, but it took me another three hours to get my code to a stable-enough setting (i.e. no more “Just one more change to get this working”) where I could walk away.
I woke up Saturday morning about 8:30 AM. It’s now 3:15 AM Sunday. Marathon coding sessions for me are relatively rare, but they do happen. Kinda like when I was writing my book for Sams Publishing – though I’m not planning on doing 40 hours without sleep like I did five years ago. I’m going to bed now.
Incidentally, I’ve been spending a bit of time lately writing patches for mozilla.org trunk code, just to support features that a editor like Verbosio should have. Patches that really make Verbosio moderately useful.
I’ll take suggestions on CPAN modules for design-by-contract…