[MacRuby-devel] HotCocoa Part I

Eloy Duran eloy.de.enige at gmail.com
Wed Dec 3 00:46:39 PST 2008


Hi listees,

> The critical question, then, is how to create an environment that  
> allows
> (nay, encourages!) frameworks to be created, tested, polished,  
> documented,
> indexed, shared, etc.  My intuition is that GitHub should be part of  
> this,
> because it promotes free-flowing cooperation, merging, etc.   
> However, I'm
> quite sure that GitHub isn't the entire solution.  So, ideas are  
> welcome!

I personally think the most important thing to do first is the testing  
part.
Since the main part of MacRuby is written in (Objective-)C,
I expect the most user contribution in the HotCocoa part.

But with the current state of the code this encourages code without  
tests,
and who is ever going to go back and write tests for them?
Also, because HotCocoa is probably the part most users will contribute  
on,
it should be easy for a user to do so in a cycle like below and not  
have to worry
about introducing a regression (or worse, worry so much that they  
won't take the effort to create a patch at all):

   get source -> run tests -> write tests -> implement feature -> run  
tests again -> create patch

This workflow is good for the user because she/he doesn't need to read  
all source first
to make sure they don't break anything else.
But also for the devs who are going to commit the patches.
And tests are also useful as examples on how to use the code.

So I would vote for rewriting HotCocoa in a TDD manner,
which isn't too hard with the majority of the functionality already  
fleshed out.

I know I'm quite alone on the stance about TDD etc on this list, so I  
need to put my money where my mouth is.
Thus I have started experimenting with mspec (since we'll need it  
anyways) and rewrote some parts of HotCocoa.
However this was purely "playing" time, meaning I'll throw away that  
code and start again now that
I have some experience with all code involved.

After that would come a testing facility for HotCocoa apps.
Which I would probably create in a manner to work with both Rucola and  
HotCocoa.
(Probably by re-using some stuff of Rucola::TestCase.)

I expect to really start work at this and committing the end of this  
week/next week.
So there's plenty of time left for discussion on this topic.

Cheers,
Eloy

PS: Rich, if you want to discuss stuff on this effort in more detail/ 
private, you can email me directly,
or my personal preference, contact me by jabber (same email) or in  
#ruby-osx on freenode.


More information about the MacRuby-devel mailing list