Monday, April 21, 2008

GSOC 2008 announced

After some delay there it is. Congratulation to all students. There is one thing to highlight. This year we have two students located in Poznan. Best wishes Ola and Mateusz :)
UPDATE: look at here there is another one :D good luck Marek.

Monday, April 14, 2008

How good are your tests?

Does this test have any sense?

public void testMe() {
String result = concat("Fr", "ank");
assertNotNull(result);
}

Probably yes, but there's not much use of it, as most of concat(String,String) implementations will pass, e.g. this:

public String concat(String a, String b) {
return "Not implemented :-)";
}

So, recently I'm working on some smarter testing approach, which you maybe heard of, called mutation testing. It's idea is to rerun tests, modifying the system a little bit every time, to catch those test cases, that don't really care what system returns, or which always pass whatever happens.

Mutation testing is nothing really new, ah actually I think I have seen some articles about it dated back to 1990s..
What nobody liked about it since that old times, is that they're SLOW. Just imagine you have a system of more than 10 classes and you want to make some small changes in it, recompile and rerun whole test suite every time for 100 or 1000 times - you get the idea.

And here I'm getting to the point, why it's worth posting about this on Eclipse blog. After some tiny prototyping with pure junit library, I have switched to jdt.junit and now have ahead of me a pretty nicely working framework. It's really amazing how jdt.junit code is flexible.

Hopefully soon (no later than June - when I'm going to defend my master thesis), my users will get a nasty pinch for every test the tool finds useless :)

Thursday, April 10, 2008

An Automatic generation of EMF Editor Idea

I am quite busy right now, however I have an idea which does not allow me to focus on my task.

Could you please imagine, that you have generated your model and .edit code, and now you want to have nice editor...

EMF generates one, but I'd say its rather a good start point than real editor.

But please imagine that you can are able to metamark your model like on example:


@RootObject(cardinality="1", displayType="Shell Title", displayValue="getName")
//alternative
//@RootObject(cardinality="*", displayType="list", canCreateNew="true", displayValue="getName")
public interface RootModelClass (){

@Edit(Editable="false")
public String getName();

@Edit(canCreateNew=true, asSubsection="true", value="getName")
public ChildModelClass getChildren();
}

@TabbedEdit(tabs="first, second")
public interface ChildModelClass (){
@Edit (Editor="Text" flags = "SWT.SINGLE" validator="ExemplaryValidator")
@Tab(name="first")
public getName();

@Edit(canCreateNew="true", Editor="RecursiveTree")
@Tab(name="second")
public ChildModelClass getChildren();

}


Generated editor for this example should put the name of the root object as a title of an application/itself, display a list of the children, and then, depending on the child selection, display a recursive tree with child children. On selection of the 2nd level child a new section could be displayed that would allow for edition.

I know this is a rough, incomplete and inconsistent idea, but I'd love to hear any feedback on this.

Regards,
Chris

Wednesday, April 9, 2008

Don't underestimate CDT

If you ask me whether I am C++ or Java programmer I will say Java's one. I used to program C++ a lot and now I am in the situation I will probably do even more.
Recently, I've got a code to analyze. So as I am doing most of my programming in Eclipse choice was as usual. The software is pretty big and I tend to be lazy when I can so I decided to import my code to the managed project.
Unfortunately, the code conventions are a bit different from common practices (or maybe something has changed since I've switched to Java). Some parts of code are kept in *.cxx files and #included in *.hpp files. Unfortunately with default configuration the code in *.cxx is compiled what evidently leads to compilation errors. What I wanted to do (fortunately that rule is followed in whole project) was excluding *.cxx files from compilation.
I started with trying File Types project preferences option, but without results.
Then I found working solution. After setting everything up switch off automatic makefiles. Several minutes ago I was thinking that this is the only solution. But don't ever underestimate tools you don't know well.
Obviously there is a simple and elegant solution. Project preferences ->C/C++ General -> Paths and symbols -> Source locations tab. You can even make index
working on excluded files.
That made my day :)

Wednesday, April 2, 2008

Polish Eclipse Community


As Chris's asked about regional communities I sprint to remind you that we've build one in Poland. And it is each day growing. So if you are not involved yet please visit Eclipse forum. And if you wat to see whole picture of Eclipse community, Polish edition you can do it at this eclipse wiki page.

Eclipse in SDJ articles series

Maybe it is not time for saying that but this is surly worth to be announced.
Last year we (authors of this blog and Mirek Ochodek) started project which was intended to introduce Eclipse to the Polish community.
We came with the idea to write several articles about platform both from the programmer and end user point of view. We started cooperation with "Software" publisher and planned special Software Developer Journal about Eclipse platform. After almost two month of hard work (and at this point I must say I am really grateful for the time and passion all my friends put into this project) we've got all response from the articles' reviewers. All of them was great and I am personally proud of the quality we've achieved. At that point I was hoping that the magazine would be soon available for the community, but by now it is not. Unfortunately due to the problems with sponsorship of such a special issue, recently the project has changed the form. Although this is not the result we all have expected, it seems the articles will be published in monthly editions of the magazine, one by one. The topic we have covered are following:

  1. Eclipse community

  2. Eclipse IDE

  3. Debugging and unit testing in Eclipse

  4. Mylyn - task oriented development

  5. TPTP

  6. Eclipse for web development

  7. Beyond Eclipse

  8. SWT/JFace

  9. Building RCP applications

  10. EMF

  11. GEF and GMF


I will inform you about first article from the series.

Tuesday, April 1, 2008

workspace setup

Are you maybe from big corporation with strict development environment rules?

I remember once comming to such a company, I was given a misterious User Guide doc, about 20 pages long paper telling how to prepare a workspace, what are my coding conventions from now, why should I set up auto-save option, etc. etc. etc. It finally turned to be a day long wend thru Window -> Preferences thicket.




Hmm so how about doing it automatically?