Friday, February 14, 2014

Shoes for the Shoemaker

We shoemakers are typically so busy making shoes for others that we and our children are often out and about in shoddy shoes if not barefoot. There is also a strong tendency in the wider Eclipse community to find fault without taking action, looking instead to others to magically fix problems while feeling entitled to "motivate" those actions with poisonous complaints. We should consider carefully what's wrong with this picture.

Consider for example the all-important Eclipse Platform project and the perennial concern about the limited contributions it receives.  Of course this same concern extends to all projectswe'd all love high-quality contributions associated with each and every Bugzilla reportbut let's just take the platform as a case in point.  Suppose you would like to provision an IDE for working with the platform SDK source so you can commit your bug fixes to Gerrit.  All you need to do to get started is follow a few simple steps.

That's right, in the modern age of integrated development environments, you're expected to act as an interpreter for converting human language scripts into machine operations.  Does that not strike you as completely anachronistic?  Of course you're likely already doing this each time you provision an IDE to work on your own project, and you likely don't keep up with the release train milestones because it's a royal pain to do all this work each time there's a new version.

This whole problem irritates me to the extreme, not so much the platform's specific problem, but the fact that I have the same problem for EMF and for every project I use and to which I wish to contribute.  Just so you don't think I'm throwing bricks at the platform, have a look into my glass house, in particular at the extremely lovely analog of the platform's wiki page for setting up EMF's source. Good luck getting that to work!  What that heck is CVS? 

Not only is it anachronistic to follow scripts manually, it's always the case that these scripts become dated and are in need of constant maintenance, which, as busy developers, we don't have time to do.   Compound that with the fact that the scripts are buggy, you should not be surprised that when you treat the community like monkeys, you end up mostly with a lot of hooting.

Oh well, so much for the whining, sniveling, and complaining part, this problem calls for action.  Eike and I, being inherently lazy, don't even want to follow these kinds of scripts ourselves so we've worked on an  alternative approach. Yes, there's still a script for bootstrap purposesyou can help improve itbut here's the synopsis:
  • just as you would any Eclipse package, download the appropriate version of the Eclipse Oomph installerwe need to do some brand marketing instead of just calling it the "Setup tool",
  • unzip it,
  • run it, 
  • select the project you wish to set up, 
  • go for coffee, 
  • and come back to enjoy your fully provisioned IDE along with that fresh cup of Java.
Here's how you'd provision an IDE for working with the platform's SDK:

Here's the end result:

Of course a workspace with the entire Eclipse SDK as source is a bit aggressive, but it's a great proof of concept that it can be done for the entire platform. Be patient though, Rome wasn't built in a day: the platform's code base is very large, so cloning it all takes time, for me more than an hour!  Try a simpler project, like the EMF Core SDK, if you want more immediate gratification, and keep in mind that this would not be any faster if you did it manually.  Note that Oomph was built with EMF.  Did I mention that we're inherently lazy?

It's quite easy to author an executable setup script for your own project.  Here's how the platform's setup script looks:

The platform's script is quite complex because the platform itself is complex. Not only that, there are gotchas to get the platform to build without errors, e.g., an inherent need to install several JREs, which I avoided by changing project-specific preferences to not treat an imperfect JRE match as an error. You can see there are tasks to set global preferences, a task to install additional tools, e.g., the EE profiles feature, tasks to clone the dozens of repos, a task to materialize the target platform, a task to populate reasonable dynamic working sets, and so on.  Unfortunately it's apparently very hard to build all the platform's Ant jars and there appears to be a platform bug that requires an IDE "Restart" followed by a "Build All" before everything builds without errors and with less than 17,000 warnings. Note that the provisioned target platform contains only bundles from Orbit and from Jetty; I have no idea how the Jetty folks provision an IDE to work with source.

Eike and I intend to maintain an index of all Eclipse project setup scripts so that our community of contributors can enjoy one-stop shopping.  In addition, there are already folks looking to maintain indices for other open source forges.

The script-authoring documentation is a work in progress, but of course you can look at all the working examples as a basis for creating your own; remember to turn on "Live Validation" in the editor to catch problems early.  Note that if you provision the CDO Release Engineering environment using Oomph, you'll have all of Oomph's source code and some example scripts at your fingertips.  Contributions to the project are welcome; your changes can be easily committed to Gerrit. If you have questions, please use the EMF newsgroup and prefix the subject line with "[Oomph]". If you find problems, please report a Bugzilla. And finally, if you're so inclined, come see our EclipseCon presentation!

As you might expect, we're not the only ones who recognize the need to solve this vexing problem nor the only ones with a solution for it.  If you need this same type of thing in an enterprise context, you'll want to have a look at the cool features of p3, e.g., carefully managed inside-the-firewall p2 repositories.

As a footnote, it's committer representative election time again.  How will you decide how best to cast your vote given the 4 available choices this year?  Of course you'll want people who actively represent your committer interests at Eclipse, so you might glance at commit stats to see who's actively committing to notice these lines-of-code-committed stats over the past 1, 3, 6, and 9 months:

As a caveat, keep in mind that modeling is a great productivity amplifier!  Not only that, code commits are not the only significant committer activity and are mostly certainly not a good measure of who will best represent your interests.  On that note, I can only promise that, if elected, I'll continue to do my best to make sure Eclipse is a great place to be.  You can definitely count on me to take action where action is needed.


Unknown said...

Thats terrific!

Just downloaded and wanted to try it on OS X ... complains for missing JAVA 6 however - that seems anachronistic :)

Thanks for the great work guys!!

Unknown said...

I found a solution for this Java 6 problem on stackoverflow!

Felix Dorner said...

This rocks! Thanks!

Unknown said...

Awesome! Thanks Ed. I also went to your Eclipse Con presentation and it was amazing!

Anonymous said...

Thanks for creating this tool, I'm giving it a run as I'm writing this. Been looking this type of tool ever since I started using Eclipse 8 years ago.

Anonymous said...

取回。26.酒店花名/酒店藝名參考:在酒店藝名最好不超過2個字,因為不好廣播,且不能和幹部同名!主要就三方面:1.自己覺得喜歡 2.符合自己的外表、個性 3.不覺得講KTV酒店出口太饒舌最主要的目的就是要讓幹部、客人好記且容易留下好印象!以下提供一些藝名給大家做參考:[有姓的]  程琳、夏雪、夏琳、夏天、高潔、李靜、唐欣、藍天、方馨、金莎、韓琳、葉莎[沒姓的]雅婷、安潔、春天、安琪、維妮、艾琳、雨萱、雨蝶、紫晴、芷欣、羽萱、 (一星期為一檔。三天以下可談)。薪資: 週薪約2.5萬至4.5萬以上(週領)。註:穿禮服不需治裝費。新型態《小框店》有別於【看檯制】(有文章另述),帶檯直接引導姐妹坐定位置,不用排排站的選秀坐檯方式,也就是酒店術語「不打槍」制度。在店家安排坐定位置後,約有1節讓顧客與姐妹互動,若顧客確定「坐定」後,則需小框該公關(約4小時=24節),否則排換其他姐妹(就是酒店術語「逼框」)。在此模式下會保障優質公關的節數收入。<>~~公關~~收入: 一節的八大行業考驗。若真的不適合,趁早打消念頭,趕緊尋找其他出路,再也不要對酒店心存幻想!!】」~~#文章結束。10.「酒店經紀」跟「傳播公司」有什不同? 「酒店經紀」與「傳播公司」【相同處】:陪客人唱歌喝酒,即所謂桌面服務。「酒店經紀」與「傳播公司」【不同處】:「經紀」有固定上班點,「傳播」以客人指定場所為主。「傳播」是【跑點】(有case再過去),時間非常彈性,因地點是客人指定,如好樂迪KTV、釣蝦場等,聚會場所大多是不相識的人。到定點時,由妳自己先向客人收鐘點費,酒類來源也較不明。「傳播公司」相對客人與公關比較沒有約束力。「酒店」是固定店面上班,客人在幹部過濾後,才有辦法入店消費。加上酒店內有酒店領檯幹部、行政、少爺和姐妹們,在多雙眼睛盯著,客人不會太誇張。包廂外都有專人巡包,安全性較高。且各酒店的店風會很明確,若不符合客人期待,自然會打退堂鼓。客人買單是透過會計結帳,妳不會經手任何金錢。【傳播工作環境】:1.上班時間很彈性,想工作時再報班,待命的時間通常為下午6點~隔天早上6點!2.需要到傳播公司(辦公室)報到,在現場等待客人來電,班】。【建議一周上3~4天班最佳!】即使酒店S完全沒經驗的新人,在入行1~2個月後,建議可穩定報3~4天班(可隔週輪替)。原因如下:低於此上班天數,相對收入變少,無法減輕經濟壓力。多少要喝酒,加上日夜顛倒,體力上無