March 2007


If you have a lot of eclipse workspaces to manage it is helpful to have them shown in the title bar of the window. Is there any setting in the preferences for this? I don’t know, but you can use the -showlocation option at start up:
eclipse -showlocation -vmargs -Xmx700M

Did you ever wonder about the paradox (or not paradox) of independent or dependent living of so called inner classes (sometimes used in pattern like observer, strategy …) in Java? Today I came to a point where I needed some further clarification. The inner class will compile to Outer$Inner.class. But it will not be instantiable as such outside the Outer class. You still can access a private member of Outer by Methods of Inner, but that is not much different from using such Methods in Outer. Trying to reach the Outer private members by deriving the Inner class from a global (outern) super class (PreInner) and casting the Inner object to PreInner type to make it “available” in global scope will only result in reaching the superclasses member. Of course all this is reasonable regarding the Java specification, but it is different when it comes to “feel” that.

Here some code samples:
public class Outer {

String name;
private String intimate;
private String intimate2 = "intimate2 in Outer";

public Outer(String s) {
name = s;
}

public String getName() {
return name;
}

public String getIntimate() {
return intimate;
}
public Inner getWrappedName() {
return new Inner(name);
}

// the inner class
class Inner extends PreInner{
//public String innername = "innen";

public Inner(String s) {
innername = s;
}

public String getName() {
return innername;
}

public void setIntimateInOuter(String s){
intimate = s;
}

public void setIntimate2WillYouReachThatOfOuter(String s) {
intimate2 = s;
}
}
}
-------------------------
public class PreInner {
public String innername = "innen";
public String intimate2 = "intimate2 in PreInner";
}
-------------------------

public class RunOuter {

public static void main(String[] args) {

Outer out = new Outer("name");
// cannot be resolved! :
//Inner in = out.getWrappedName();
//with idea:
// in.setIntimateInOuter("intimate through inner");

//that works:
out.getWrappedName().setIntimate2WillYouReachThatOfOuter(
"intimate2 over Inner");
PreInner in = out.getWrappedName();

System.out.println(in.innername);
System.out.println("intimate2 from Inner " + in.intimate2);

//that works too:
out.getWrappedName().setIntimateInOuter("intimate over Inner");
System.out.println(out.getWrappedName().getName() +
" == " + out.getName());
System.out.println("Outer Intimate: " + out.getIntimate());

}
}

gives output:
name
intimate2 from Inner intimate2 in PreInner
name == name
Outer Intimate: intimate over Inner

Here I will try to examplify some vicious circles that one regularly faces during software development and project management. There are some archetypes of dynamic interaction which were described by Peter M. Senge in “The Fifth Discipline. The art and practice of the learning organization”. Some Pattern you will find (implicitly in the recipes) in “The Pragmatic Programmer” by Anrew Hunt and David Thomas. There is also a very instructive Google-Video of Ken Schwaber giving a talk about Scrum Project Management where he demonstrates some mechanisms which lead to system rod and decline of quality.

The first example:  You are in a hurry, you skip writing tests (doing refactoring, documenting)  for your code, your code quickly becomes less stable reducing your productivity and putting you more and more under pressure - eventually ending in the programmers burn out.  In the language of system archetypes this could be described as”Fixes that Fail” (see Archetypes for an overview). The unintended consequences of reducing code quality also influence, after some delay, the amount of control you have over the coding process.

Update: It’s know included in the kubuntu distro as package kssh with standard installation procedure.

Switching from Suse to kubuntu went not so smooth as I expected. One small issue was getting to run kssh – a small and useful tool to manage your ssh connections.

This is the way it worked for me:

  1. Download the source file from sourceforge kssh-xx.tar.gz and extract it.
  2. Install the package libqt3-compat-headers.
  3. Run ./configure --with-qt-includes='/usr/include/qt3/' --prefix=/usr/local/
  4. followed by make and make install

That’s it!

If you like to access the kssh-Session directly from Konsole just create new session type in Settings - Configure Konsole - Session with Name:ssh and Execute: kssh .