On my vacation I listened to about 30 pod-casts. Although most of what I heard was not new, it still was a good refresher and exciting to listen to. It also inspired me to order a few books and make me think more about what I am doing as software engineer.
One pattern that was new to me is Dependency Injection. It was mentioned in software engineering radio Episode 2 on Dependencies. Instead of using a Factory or a Service Locator (like OSGi), make your class have some members referring to the interfaces it uses. The Dependency Injector then uses either the constructor or some set methods to provide your class with the implementations of the classes your object needs. Read the One minute description and the Two Minute Tutorial of PicoContainer (a nice little Dependency Injection Framework) to see what I mean.
Martin Fowler wrote a long article about Inversion of Control Containers and the Dependency Injection pattern.
I was always wondering why using interfaces when you have only one implementation of the interface anyway. So, why bother? With Dependency Injection you can test your object easyly using Mock Objects. Jeremy Weiskotten wrote an Dr.Dobb's Article on why Dependency Injection is very helpful to create testable and decoupled objects.
Dependency Injection makes it very clear which interfaces your objects depend on. This makes refactoring, testing and understanding code easier. Factories and Service Locators often provide more products than needed by a single class and therefore you cannot really tell what the class depends on.
I'll play with Dependency Injection :-)
Here I collect interesting links and findings about eclipse and java...
Thursday, September 07, 2006
Monday, August 21, 2006
Going on vacation with a mp3 player full of geek pod-casts...
I'm going on vacation for two weeks to Athens and Crete. My wife is Greek and therefore we go every summer to Greece. Going on vacation also means no laptop (that's not my deceison ;-). So usually, I take some geek books with me. This time I loaded my mp3 player with the 9 Callisto pod-casts from Eclipse Zone and a few of the Software Engineering Radio pod-casts.
I tried it on Friday. It's a almost like being in a conference call. But it's better: I can wind back if I get sidetracked and I don't have to be afraid that suddenly someone says: "And Michael, what do you think?....". I was shopping and listening to Richard Gromback on GMF. I was waiting in the queue to pay and when it was my turn, I started talking in English to the German cashier -- lost in cyberspace...
One thing I think pod-casts should do: Please say at the beginning of the pod-cast when it was recorded! If someone says: "Next month we'll release foobar..." it is annoying not to know when next month is or was...
And now, relaaaaaxxx, summer, sun, beach, fun -- for 2 weeks -- I'll be back Sep.5 late afternoon....
I tried it on Friday. It's a almost like being in a conference call. But it's better: I can wind back if I get sidetracked and I don't have to be afraid that suddenly someone says: "And Michael, what do you think?....". I was shopping and listening to Richard Gromback on GMF. I was waiting in the queue to pay and when it was my turn, I started talking in English to the German cashier -- lost in cyberspace...
One thing I think pod-casts should do: Please say at the beginning of the pod-cast when it was recorded! If someone says: "Next month we'll release foobar..." it is annoying not to know when next month is or was...
And now, relaaaaaxxx, summer, sun, beach, fun -- for 2 weeks -- I'll be back Sep.5 late afternoon....
Friday, August 18, 2006
Blog comments, my mistakes and good feedback...
Marko Schulz asked me why his comments did not appear in my blog. I checked it and I realized that I had a setup problem with my blog (my mistake). Now all comments are visible and new comments will be shown automatically! I'll check them for spam later.
Here's what I learned from the comments:
Here's what I learned from the comments:
- Parsing and verifying hex, octal and decimal numbers...: Several commenters pointed out that I should have used Long#decode(String) and therefore I adjusted the blog entry (and my code ;-).
- Am I the only person having problems with the update manager? The answer is clearly: no!
- Eclipse was hanging my machine regularly -- solution -XX:MaxPermSize=128m Surya asked if the -XX:MaxPermSize=128m can be put into the eclipse.ini files: the answer is yes.
- Why is super.super illegal? is the most debated. Lots of good reasons why super.super is illegal -- but from practical point of view it is annoying...
- I hate ClassCastExceptions...Marco said its fixed in 1.5 (ClassCastException is reporting the actual type of the object). I just made a test and it is true: even if compiled with 1.4 and run with 1.5 I see the ClassCastException reporting the type. I'm a bit puzzled why I don't see it in my applications -- I thought I'm using a 1.5 jre.
- How to setup some plugins to use java 1.5 in a java 1.4 workspace? Neil Bartlett pointed out that step 3 (Setting the execution environment in the build path to J2SE-1.5) is not needed. I tested it and it is needed. Le ScaL pointed me to an article on execution environment in the eclipse wiki.
- Update manager battle: the players Yoxos - YUM - eclipse... Wassim Melhem asks why I like yoxos though I have not seen it in action. Hmm, maybe I'm biased because its German and I know the guys or maybe because I spent some money on it and therefore it "has to be good" ;-). I hope to see an update soon....
- How far are the hotels from the eclipse summit October 11-12 2006 in Esslingen/Stuttgart Germany? Gerd Castan suggested to search search hotel.de. Good idea!
Thursday, August 17, 2006
MDSD/MDA framework openArchitectureWare 4.1 is available at eclipse.org
I just read the announcement that openArchitectureWare 4.1 is available. openArchitectureWare is hosted at eclipse.org/gmt/oaw. It is one of the coolest projects at eclipse.org but it seems not to get much attention. If you are interested in MDSD or MDA take a look at openArchitectureWare - openArchitectureWare is really cool!
Parsing and verifying hex, octal and decimal numbers...
How to parse a number that might be octal, decimal or hexadecimal. Numbers like
Thank you for all the comments! My code is stupid! Use
OK, and here is my VerifyListener:
0xFF, 0x1e, 077, -123, -0x12, -066. This must have been solved a million times, and here's my version: Thank you for all the comments! My code is stupid! Use
Long.decode(numberString).longValue() Instead!String sign="";
int base=10;
if(numberString.startsWith("-")) {
sign="-";
numberString=numberString.substring(1);
}
if(numberString.startsWith("0x")) {
numberString=numberString.substring(2);
base=16;
} else if(numberString.startsWith("0") && numberString.length()>1) {
numberString=numberString.substring(1);
base=8;
}
return Long.parseLong(sign+numberString,base);
OK, and here is my VerifyListener:
class NumberVerifyer implements VerifyListener {
final boolean fSigned;
NumberVerifyer(boolean signed) {
fSigned=signed;
}
public void verifyText(VerifyEvent e) {
Text text = ((Text)e.widget);
StringBuffer fulltext = new StringBuffer(text.getText());
fulltext.replace(e.start, e.end, e.text);
String sign=""; //$NON-NLS-1$
if(fSigned)
sign="-?"; //$NON-NLS-1$
e.doit = fulltext.toString().matches(sign+"(0?|[1-9][0-9]*|0x[0-9a-fA-F]*|0[0-7]+)"); //$NON-NLS-1$
}
}
Wednesday, August 16, 2006
Vote for the eclipse 3.3 release train name. Europa is a bad choice!
Vote for the Eclipse Release Train Name (2007). There has been some discussions in bugzilla.
I think Europa is a very bad choice for two reasons:
1. There are too many Google hits already if you search for eclipse europa.
2. In many languages Europa means Europe and this will confuse. Messages like the "Europa Build Workshop", sounds for many non-native speakers like "The Build Workshop Europe". If English is your native language, you might not understand this point, but for Germans this is very confusing. For the same reason you would not call a workshop held in the nice Austrian village called Fucking the "Fucking Workshop" ;-)....
I think Europa is a very bad choice for two reasons:
1. There are too many Google hits already if you search for eclipse europa.
2. In many languages Europa means Europe and this will confuse. Messages like the "Europa Build Workshop", sounds for many non-native speakers like "The Build Workshop Europe". If English is your native language, you might not understand this point, but for Germans this is very confusing. For the same reason you would not call a workshop held in the nice Austrian village called Fucking the "Fucking Workshop" ;-)....
Tuesday, August 15, 2006
Am I the only person having problems with the update manager?
I wonder if I am the only person in the world using the update manager and having problems. Two weeks ago I reported a real show-stopper update manager bug: Update does not work if *ANY* error is found in configuration. I expected that it would be marked as a duplicate but I seem to be the only person having the problem. I cannot finish the updates dialog because of some mysterious errors:

The annoying thing is that "Manage Configuration" seems happy and shows no error:

The error is caused by some installed features that require a specific version of a plugin.
What puzzles me the most is not the bug itself, but the fact I seem to be the only one getting the bug (I get it with 3.2 and 3.3M1).....
If you want to try it, just unzip this feature in your eclipse/feature directory and restart eclipse and try to install a feature using the update manager.
Workarounds
Fix the feature.xml file by removing the required version string.
Or use another working eclipse installation and install the plugins into a new extension location and add the extension location to your eclipse using "Manage Configuration".

The annoying thing is that "Manage Configuration" seems happy and shows no error:

The error is caused by some installed features that require a specific version of a plugin.
<?xml version="1.0" encoding="UTF-8"?>
<feature id="broken.feature" label="Broken Feature" version="1.0.0">
<description>.</description><copyright>.</copyright>
<license>.</license>
<requires>
<import feature="org.eclipse.platform" version="3.1.2" match="perfect"/>
</requires>
</feature>
What puzzles me the most is not the bug itself, but the fact I seem to be the only one getting the bug (I get it with 3.2 and 3.3M1).....
If you want to try it, just unzip this feature in your eclipse/feature directory and restart eclipse and try to install a feature using the update manager.
Workarounds
Fix the feature.xml file by removing the required version string.
Or use another working eclipse installation and install the plugins into a new extension location and add the extension location to your eclipse using "Manage Configuration".
Update manager battle: the players Yoxos - YUM - eclipse...
Yoxos
I am very frustrated with the eclipse update manager. In my opinion, it is simply unusable. But what are the alternatives? A few weeks ago, I bought a 1 year subscription of yoxos for $99. Unfortunately, since then, no new updates appeared on my yoxos update manager. The yoxos update manager is quite cool. It's a perspective that allows you to select the plugins you want:

This looks very much like the yoxos on demand site (yes, this is a screenshot of an ajax application!):

I don't know how it works, when new updates are available, but I expect it will work smoothly (well, I payed for it -- therefore it has to work ;-))
TUM - Tikal Update Manager
TUM (Tikal Update Manager) is a open source project forge project called tikal run by Tikal.
They create a dialog with some cool icons. Yoxos seems much more mature, but TUM was just announced....

The Eclipse Update Manager
The eclipse update manager seems also to be enhanced. I have not seen it (because I hope for yoxos to install it for me...), but the screenshots seem promising.

The battle shall start...
I really hope that finally the update manager gets more attention. My favorite is clearly yoxos, because they don't use annoying blocking dialogs, but a perspective. The funny thing is, that eclipse 1 used a perspective as well, and in eclipse 2 it became wizard based...
I am very frustrated with the eclipse update manager. In my opinion, it is simply unusable. But what are the alternatives? A few weeks ago, I bought a 1 year subscription of yoxos for $99. Unfortunately, since then, no new updates appeared on my yoxos update manager. The yoxos update manager is quite cool. It's a perspective that allows you to select the plugins you want:

This looks very much like the yoxos on demand site (yes, this is a screenshot of an ajax application!):

I don't know how it works, when new updates are available, but I expect it will work smoothly (well, I payed for it -- therefore it has to work ;-))
TUM - Tikal Update Manager
TUM (Tikal Update Manager) is a open source project forge project called tikal run by Tikal.
They create a dialog with some cool icons. Yoxos seems much more mature, but TUM was just announced....

The Eclipse Update Manager
The eclipse update manager seems also to be enhanced. I have not seen it (because I hope for yoxos to install it for me...), but the screenshots seem promising.

The battle shall start...
I really hope that finally the update manager gets more attention. My favorite is clearly yoxos, because they don't use annoying blocking dialogs, but a perspective. The funny thing is, that eclipse 1 used a perspective as well, and in eclipse 2 it became wizard based...
Monday, August 07, 2006
How far are the hotels from the eclipse summintOctober 11-12 2006 in Esslingen/Stuttgart Germany?
I'm about to register for the The eclipse summit 2006 October 11-12 in Germany. On the web page there are 4 hotels suggested, but no clue how far they are away from the actual summit (are they in walking distance?). The summit seems to be at Ebershaldenstraße 12, 73728 Esslingen, Germany. I called all of them to ask for the price for the eclipse summit. The hotels all seem to be in the 100 Euro category. I think breakfast is included in all cases.
Best Western Premier Hotel Park Consul Esslingen
Grabbrunnenstr. 19
73728 Stuttgart/Esslingen am Neckar
Tel: +49(0)711-41111-0
Fax: +49(0)711-41111-699
Distance: 150 meters
Email: marcus.schlaich@consul-hotels.com
Single Room: 110 Euro
Hotel Linde Berkheim
Ruiterstraße 2
73734 Esslingen am Neckar
Tel: +49(0)711-345305
Fax: +49(0)711-3454125
Distance: 4 km
Email: info@linde-berkheim.de
Single room: 85 Euro - Double room 114 Euro (until Sep. 8th)
Hotel Am Schillerpark
Neckarstr. 60, 73728 Esslingen am Neckar
Tel: +49(0)711 931 33-0
Fax: +49(0)711 931 33 100
Distance: 1.2 km (walking distance 800 meter)
Email: info@hotel-am-schillerpark.de
Singe Room: 89 euro (20 rooms for the summit)
Ringhotel Rosenau
Plochinger Straße 65
D-73730 Esslingen am Neckar
Tel: +49(0)711 315 45 60
Fax: +49(0)711 316 13 44
Distance: 1 km
Email: info@hotel-rosenau.de
Prices: The lady at the reception did not know about the "Eclipse Summit". I should call tomorrow before 4PM.
Best Western Premier Hotel Park Consul Esslingen
Grabbrunnenstr. 19
73728 Stuttgart/Esslingen am Neckar
Tel: +49(0)711-41111-0
Fax: +49(0)711-41111-699
Distance: 150 meters
Email: marcus.schlaich@consul-hotels.com
Single Room: 110 Euro
Hotel Linde Berkheim
Ruiterstraße 2
73734 Esslingen am Neckar
Tel: +49(0)711-345305
Fax: +49(0)711-3454125
Distance: 4 km
Email: info@linde-berkheim.de
Single room: 85 Euro - Double room 114 Euro (until Sep. 8th)
Hotel Am Schillerpark
Neckarstr. 60, 73728 Esslingen am Neckar
Tel: +49(0)711 931 33-0
Fax: +49(0)711 931 33 100
Distance: 1.2 km (walking distance 800 meter)
Email: info@hotel-am-schillerpark.de
Singe Room: 89 euro (20 rooms for the summit)
Ringhotel Rosenau
Plochinger Straße 65
D-73730 Esslingen am Neckar
Tel: +49(0)711 315 45 60
Fax: +49(0)711 316 13 44
Distance: 1 km
Email: info@hotel-rosenau.de
Prices: The lady at the reception did not know about the "Eclipse Summit". I should call tomorrow before 4PM.
How to quickly add a new repository location to CVS...
The eclipse Add a new CVS Repository dialog allows you to quickly fill the form, if you drop a string like
You can also select a location in the CVS Repositories view and "Copy to Clipboard" and send it to someone. The receiver can then drop it into the Add a new CVS Repository.
:pserver:anonymous@dev.eclipse.org:/home/dsdp into the Host: field. If you see a string like cvs -d:pserver:anonymous@foo.cvs.sourceforge.net:/cvsroot/foo loginat sourceforge, grab the highlighted part (including the colon before pserver)...
You can also select a location in the CVS Repositories view and "Copy to Clipboard" and send it to someone. The receiver can then drop it into the Add a new CVS Repository.
Subscribe to:
Posts (Atom)