Sunday, April 20, 2008

Working on open source projects

Working on open source projects is fun and educational.

I've always enjoyed molding reality to my will, as it were-- creating stuff and whatnot.

I've got mad skills at tweaking other peoples work tho, which means most of my "creations" are just mixes of various other people's work.

Pure creation is somewhat hard to organize, for me, but dirty "make it so" type stuff... no problem.

Anyways, on with the story!

For this example, we'll use my foray into CFEclipse land.

I've been there a few times before, to try to impose my will on reality, as I mentioned earlier.

In my previous visits, I was interested in adding "occurrence marking" (OM) to the editor.
I like how in other editors, when you select a word, all the occurrences of the word are selected. I wanted to add this to CFE.

So I went out, and was like, "hmmm... the java editor has OM, why not see how it does it?" so I browsed through the sources... found the spot, and was like "we are not doing anything like this in CFE". I think. It's been a while.
Anyways, it wouldn't easily jive with what we already had, so I searched through the eclipse mailing lists, or something, and found an example that was using the same classes we were using.
From there it was just fitting it in the right spot.

I think. It's been a while. Generally, that's how it goes, tho.

Anywho, let's get a bit more specific. A little fresher...

After journeying through the sources for CFE, it became apparent that it had been written a while ago. There was a lot of code that is now baked into eclipse, that was having to be maintained, this whole time. Not to say things were stale...

Looked like many of my projects, actually. Artifacts around, some stuff using newer things, some older, etc.. After as long as 10 years in some cases...

Every once in a while you've got to do some type of spring cleaning or something, and blow the dust out, re-think stuff, etc..
I started thinking it might be time to blow the dust out of CFE, so to speak.

So I started looking towards Eclipse itself-- I've been dicking with it long enough, I could probably just hack on JTD by now, and make a killer CF editor. But ouch! The maintenance. I'd be using a lot of internal stuff, that would be changing and whatnot... eh...

So next I'm like "well, an API that ties in with the core eclipse stuff wouldn't be too bad..." and so I looked at Aptana. There are some good demos, a wiki and whatnot, for building editors... I like that. But I don't like that SFTP costs money.
If I were out to make a buck, (which I am, really) it is a good option, as the framework for "pay for more" is already set up.

Money aside, it's a good pick, because it's got a decent community, and *documentation*.

Now, I like documentation as much as the next guy, but honestly, I'm a source-er. I find it almost easier to look at the code and see what's possible than reading documentation at times (the code is what's there, the documentation isn't quite real-- besides the auto-generated stuff, of course (it's always in sync)).

Still, walk-thrus and whatnot make it easier for people to get up and running, which is a big plus for Aptana. Plus, it's geared toward integrating CSS and JS and whatnot...

But there's just something that made me not want to go that direction. I don't know if it's my fear of making money, or what. Ha ha. Really it's the not-quite-open idea... I don't mind paying for support, or service, if I need it, or sponsoring features and whatnot... but I don't like paying license fees.

Now, this means making millions of dollars will be hard for me, if all I sell is work, vs. cashing in on existing work, so to speak.
Possibly. I'm thinking I can make plenty, anyways, but it *is* a different approach...
I may end up doing license type stuff anyways, ya know. I won't feel evil, if I do. Whatever's clever, I figure.

But anyways, I've also been watching the Eclipse based tools for doing web work-- at first, it was heavily geared towards pure J2EE java type stuff... good CSS and HTML editing, Hibernate/JDO stuff, great XML editing, but no javascript editing, no WYSIWYG html/css, and lots of it was internal (meaning not a hard API, and things were subject to change).

It was just building steam tho, which I was aware of, and impatient for. In the meantime I used various plugins that did javascript editing, say (don't need wysiwyg html much these days). IBM actually contributed some stuff initially, to help keep the ball rolling... just a note...

Anyways, the Eclipse stuff like WTP has really been taking off... there's a WYSIWYG html editor now, and more of the API is stable-ish... and /man/ the javascript editor kicks ass... and enter the Dynamic Language Toolkit.

DLTK I'd been watching also. I've been curious, seeing some duplication of work (WTP is doing a java editor, ATP was doing one, DLTK has one-- meanwhile, I'm loving JSEditor...) as to which horse to ride... sometimes waiting ROCKS, because it looks like the horses are forming a team, which, WOOHOO! we all get further faster.

Ennyhoo, after a recent jaunt over to DLTK, and seeing not the stagnation that I was fearing, but life, LIFE!, I started thinking... this feels right. Better than Aptana, although Aptana is fine-- I feel like Aptana is really someone else's tho, and Eclipse is everyone's (with a big business partner, IBM :). Just a different feel.

Plus, I'm loving all the crap that comes with these "platform tool" projects like WST/WTP, Data Tools, Testing and Performance... they all sorta plug into one another, and make for a uniform and powerful environment for working on stuff. More uniform and powerful by the day.

Anyways, since currently a JDT-ish CF IDE is out, the next best thing, in my mind, is an API designed for dynamic language editing. DLTK is that API.

There's also the bonus that any work on the actual DLTK code will benefit other languages as well, like Python or Ruby, or PHP (depending on what happens with PHP, I reckon-- still a lot of divergence there... eh.). Something we won't get out of a pure JDT-like CF IDE.

Eh. A lot of working with open source is making decisions like this. What project to go with/contribute to, etc.. Will it last? Is it the best? We don't like the beta-max/vhs type deals, but they happen.

And then there's feelings. You've got to feel something for the project. I loved FCKEditor from the beginning, just because. Not just the ass-kicking-ness of it, but the attitude just felt good.
I honestly didn't care about community support, if it would have staying power, or any of that, it was just fun to contribute.

Heh... actually, that's pretty much the way I've gone about it... maybe I'll reverse what I just said, and say, who cares if the project has a vibrant community (the good ones, and the ones you're drawn too will, anyways) or will be the de-facto in 5 years... if working on it seems like fun, just do it.

Eh. I guess it's a fine time to tie up this long ass initial post with a bit more meat.

When I wanted to add key-binding to Subclipse, an SVN tool for eclipse, I saw that the CVS plugin could to it (Probably the best implementation of a CVS client ever).
So I looked through the CVS plugin sources, and found where/how they were doing it. "Hmmm", I think. -- they've done some stuff that makes doing other stuff (like key-binding) pretty easy. It also means a direct cut and paste (for all intents and purposes) won't cut it.

Oh well, I'll see if I can take the bits that do what I want, and git'em into Subclipse. Long story short, I did.

I learned quite a bit, too. I'll close this first installment of [whatever this is] with a link to the original Subclipse enhancement ticket, and the dialog between myself and a great developer, Mark Phippard.

It's a good example of a noob trying to contribute.

http://subclipse.tigris.org/issues/show_bug.cgi?id=394

Some related emails:
http://svn.haxx.se/subdev/archive-2005-11/0007.shtml