Virtualbox again

6 05 2009

One of my favorite tools for evaluation, debugging and testing is virtualbox (link). I run it both Windows XP and Ubuntu as host and use it for Ubuntu, OpenSolaris, Fedorea, Suse and now with the latest Windows7 release candidate. We will start now testing our client applications on this release, which should be only servicepacks away from the final release version. Also check Netbeans and Glassfish.

Links:

  • Microsoft Windows7 RC (link) Runs fully until March (June 2010 with restrictions)
  • VirtualBox (link)




How do I get Java sourcecode into my blog ?

9 01 2009

If you are wondering about this and use Worpress, is that easy:
Anywhere in your text you place

[ sourcecode language='java' ]
your sourcecode goes here
[ /sourcecode ]

Remove the space before and after the bracket character to make it work.

your sourcecode goes here




On Abstraction and High-Level Stuff

3 01 2009

This is a maybe slight philosophical excursion into todays world of abstraction and the good old days when one could see the pins of a CPU.
I am into computing since the 1980’s. I never used 80-column-punchcards though (but I saw them in real). I was using early versions of Basic to program little applications on a ZX81 (wikipedia link). An ugly box with 1KB RAM connected to a TV set showing a simple monochrome screen with 32×24 char which I actually borrowed from a friend. I was soldering stuff on the motherboard on some ancient 8086 (wikiepdia link). I also learned to do programming in the heart of a CPU with assembler. Life was not convenient but simple. Something crashed you would know what happened pretty fast. Some snippet for the post-assembler generation:

cpu_type       PROC
pushf
xor    DX,DX
xor    AX,AX
push   AX
popf

Moving on (fast forward >>) to DOS machines with Turbo Pascal and C, the world of compiler and linker. You would know most of the commands and its syntax in short time. You still knew what is going on.
Some Pascal Code (not far away from todays syntax):

if c = (1+n)*(1+n)+1 then
begin
sound( 1000 ); delay( 1000 ); nosound;
repeat until keypressed;
kn := true;
goto done;
end;

And then (fast forward>>) we were hit by Windows 3.0 and we tried to understand code templates to show a little dialog with a button using C++ 1.0 and MFC.  A simple HELLO WORLD became a nightmare, at least when you started debugging it.

#include <afxwin.h>
class HelloApplication : public CWinApp
{
public:
virtual BOOL InitInstance();
};

HelloApplication HelloApp;

class HelloWindow : public CFrameWnd
{
CButton* m_pHelloButton;
public:
HelloWindow();
};

BOOL HelloApplication::InitInstance()
{
m_pMainWnd = new HelloWindow();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
HelloWindow::HelloWindow()
{
Create(NULL,
“Hello World!”,
WS_OVERLAPPEDWINDOW|WS_HSCROLL,
CRect(0,0,140,80));
m_pHelloButton = new CButton();
m_pHelloButton->Create(“Hello World!”,WS_CHILD|WS_VISIBLE,CRect(20,20,120,40),this,1);

}

Lets move on to todays world of high-level (GL4,5?) languages, frameworks and nanotechnology hardware. It is amazing how easy you can create a full fledge web application with JSF and WS* but do one understand what is going on under the hood ? Most of us, NO. We are guessing.

I am staring up Glassfish Application Server and get more log info then the worst crashing debugging session of my early Turbo Pascal applications.

Jan 3, 2009 4:23:10 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
INFO:
E:/Program Files/Java/jdk1.6.0_10\bin\java
-Dcom.sun.aas.instanceRoot=E:/Program Files/glassfish-v2ur2/domains/domain1
-Dcom.sun.aas.ClassPathPrefix=
-Dcom.sun.aas.ClassPathSuffix=
-Dcom.sun.aas.ServerClassPath=
-Dcom.sun.aas.classloader.appserverChainJars.ee=
-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,j2ee-svc.jar
-Dcom.sun.aas.classloader.excludesList=admin-cli.jar,appserv-upgrade.jar,sun-appserv-ant.jar
-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
-Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar
-Dcom.sun.aas.classloader.serverClassPath.ee=/lib/hadbjdbc4.jar,E:/Program Files/glassfish-v2ur2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,/lib/dbstate.jar,/lib/hadbm.jar,/lib/hadbmgt.jar,E:/Program Files/glassfish-v2ur2/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.serverClassPath=E:/Program Files/glassfish-v2ur2/lib/install/applications/jmsra/imqjmsra.jar,E:/Program Files/glassfish-v2ur2/imq/lib/jaxm-api.jar,E:/Program Files/glassfish-v2ur2/imq/lib/fscontext.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqbroker.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqjmx.jar,E:/Program Files/glassfish-v2ur2/lib/ant/lib/ant.jar,E:/Program Files/glassfish-v2ur2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar
-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,jesmf-plugin.jar,/lib/dbstate.jar,/lib/hadbjdbc4.jar,jgroups-all.jar,E:/Program Files/glassfish-v2ur2/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,E:/Program Files/Java/jdk1.6.0_10/lib/tools.jar,install/applications/jmsra/imqjmsra.jar,com-sun-commons-launcher.jar,com-sun-commons-logging.jar,E:/Program Files/glassfish-v2ur2/imq/lib/jaxm-api.jar,E:/Program Files/glassfish-v2ur2/imq/lib/fscontext.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqbroker.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqjmx.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqxm.jar,webservices-rt.jar,webservices-tools.jar,mail.jar,appserv-jstl.jar,jmxremote_optional.jar,E:/Program Files/glassfish-v2ur2/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar,E:/Program Files/glassfish-v2ur2/updatecenter/lib/updatecenter.jar,E:/Program Files/glassfish-v2ur2/jbi/lib/jbi.jar,E:/Program Files/glassfish-v2ur2/imq/lib/imqjmx.jar,E:/Program Files/glassfish-v2ur2/lib/ant/lib/ant.jar,dbschema.jar
-Dcom.sun.aas.configName=server-config
-Dcom.sun.aas.configRoot=E:/Program Files/glassfish-v2ur2/config
-Dcom.sun.aas.defaultLogFile=E:/Program Files/glassfish-v2ur2/domains/domain1/logs/server.log
-Dcom.sun.aas.domainName=domain1
-Dcom.sun.aas.installRoot=E:/Program Files/glassfish-v2ur2
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-Dcom.sun.aas.promptForIdentity=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Dcom.sun.updatecenter.home=E:/Program Files/glassfish-v2ur2/updatecenter
-Ddomain.name=domain1
-Djava.endorsed.dirs=E:/Program Files/glassfish-v2ur2/lib/endorsed
-Djava.ext.dirs=E:/Program Files/Java/jdk1.6.0_10/lib/ext;E:/Program Files/Java/jdk1.6.0_10/jre/lib/ext;E:/Program Files/glassfish-v2ur2/domains/domain1/lib/ext;E:/Program Files/glassfish-v2ur2/javadb/lib
-Djava.library.path=E:\Program Files\glassfish-v2ur2\lib;E:\Program Files\glassfish-v2ur2\lib;E:\Program Files\glassfish-v2ur2\bin;E:\Program Files\glassfish-v2ur2\lib
-Djava.security.auth.login.config=E:/Program Files/glassfish-v2ur2/domains/domain1/config/login.conf
-Djava.security.policy=E:/Program Files/glassfish-v2ur2/domains/domain1/config/server.policy
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Djavax.net.ssl.keyStore=E:/Program Files/glassfish-v2ur2/domains/domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=E:/Program Files/glassfish-v2ur2/domains/domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djmx.invoke.getters=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-client
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-Xmx512m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=E:/Program Files/glassfish-v2ur2/domains/domain1/logs/jvm.log
-cp
E:/Program Files/glassfish-v2ur2/lib/jhall.jar;E:\Program Files\glassfish-v2ur2\lib\appserv-launch.jar
com.sun.enterprise.server.PELaunch
start
Starting Sun Java System Application Server 9.1_02 (build b04-fcs) …
MBeanServer started: com.sun.enterprise.interceptor.DynamicInterceptor
CORE5098: AS Socket Service Initialization has been completed.
CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.6.0_10] from [Sun Microsystems Inc.]
SEC1002: Security Manager is OFF.
E:/Program Files/glassfish-v2ur2/domains/domain1/config/.__com_sun_appserv_pid
ADM0001:SunoneInterceptor is now enabled
SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
WEB0114: SSO is disabled in virtual server [server]
WEB0114: SSO is disabled in virtual server [__asadmin]
ADM1079: Initialization of AMX MBeans started
ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://bluff:8686/jmxrmi].  This is where the remote administrative clients should connect using the standard JMX connectors
ADM1506: Status of Standard JMX Connector: Active = [true]
WEB0302: Starting Sun-Java-System/Application-Server.
JBIFW0010: JBI framework ready to accept requests.
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848
SMGT0007: Self Management Rules service is enabled
Application server startup complete.

Conclusion: I enjoy the ride, I could experience early 8bit CPU’s and still draw on these hands-on exercises. It is hard to stay up-to-date today and be able to explain tech stuff to customers. It is hard to find experienced people to hire. Better try to know what you do and sell to your customers.

Life became convenient but not simple anymore.





Basic Security and Safety

21 12 2008

On an almost daily base I see the most basic security breached or ignored. I am not talking about sophisticated security and access controls that more and more companies provide, but about personal user security.

  1. Where one store id’s and passwords ? Either you use always the same password since years or you write them down in your diary or (paper)notebook, in a textfile or stick them on stickies beside the screen. No need to ellaborate on the potential problems here.
  2. You carry your documents (your companies ?)  or sourcecode around on a portable USB harddisk or USB Stick. Ever thought what happens if you loose it. I dont mention the people who dont even make backups of the same devices. You loose it, you have 2 problems, right ?

My recommendation for today:

  1. Use an device-encrypting programm like TrueCrypt (link). It encrypt on the fly and even comes with bogus drives in case you are forced to reveal the passwword.
  2. Use a passwordsafe like KeePass (link). One encrypted password database for all your id’s and passwords. Just make sure you have one very good master password !

Both products use a variation of standard encryption algorithm and are opensource.





Talk back and Feedback

12 09 2008

As an IT company you know feedback is vital and can be crucial to maintain a level of quality. Either you collect feedback a) directly from your users (person to person, email, phone, ticket system,..) or b) let the deployed software talk to you directly.  How many time some piece of software crashed or did something wrong and you – as in case a) – dont bother to do anything and just restart the application and continue your work ? Many times I guess, only if the software really does not wok anymore, we would feedback and complain. So all these valuable small (and lost) incidents that appear isolated to a enduser would help to increase the quality of the software if we just would feedback (manually).

But most of us are also not happy if the software talks back to its vendor directly because we either fear it would transfer personal data or just would tell the vendor that you are using some pirated version of its application.

My recommendation/wish:

Producer: Display it clearly and ask for approval to transmit bug data to a central server. Show what you going to transmit. Make it optional.

Consumer: Let the software talk back. It will not help you this time, but with truckloads of bug reports flowing back the software, it will ultimately gets better and benefits everyone.

Sample (what Thunderbird sends back after crashing)

Application Launch Time
9/6/2008 2:33 PM
Build Identifier
2008070808
Deployment Identifier
MozillaOrgThunderbird2Win322008070808
Interface Version
8 (0×00000008)
Monitor Configuration Version
3 (0×00000003)
Platform Identifier
Win32
Product Identifier
Thunderbird2
Talkback Configuration Version
3 (0×00000003)

[..]

Event Description
32-bit Windows exception
Event Type
1 (0×00000001)
Information Collection Time
9/6/2008 2:47 PM
Memory Status
[   0] 20 00 00 00 2B 00 00 00 00 C0 5F 5F 00 B0 44 36 [ ...+.....__..D6]
[  10] 00 80 2A D6 00 A0 0C B5 00 00 FE 7F 00 C0 6B 79 [..*...........ky]

[..]





buZzWord aRt

2 09 2008

Small excursion to the field of art (this site really lacks of imagery). Created with Wordle (link).





Browser War still on ? IE8 on its way

1 09 2008

I remember the old days when Netscape aka Mosaic was around and took 90% in the mid-90’s. Then others came in and they lost valuable time by rewriting the whole thing. By 2006 it fell under 1%. (Read more @ wikipedia). I loved Netscape because it came with a simple editing tool for free, a feature none of todays browser packages offer anymore (per default).

Today we have IE (no. 1), FF (no. 2), Opera, Safari and some other browser.

Since August 2007 Microsoft is working on IE8 and they just release last week the second beta version for public download and evaluation. I propose doing that in a virtual machine. (link)





On real IT conferences

25 08 2008

Despite the need to keep yourself up-to-date on a pure technical level by reading books and websites, and even more important, by DOING it (IT), means try tools, IDE’s, solutions, basically getting your hands dirty, it is always worth looking out for ongoing conferences in your neighborhood. Just 2 weekas ago I joined 2 sessions at a conference in Singapore about Software Process Engineering (by Processworks Group, link). One about distributed development teams (Evan Leybourn from Looking Glass Solutions (LGS), Australia) and the other one about Advanced Testcase Design Techniques (Phil Robinson from Lonsdale Systems, Australia). Both pretty good presenter and sharing lots of experience.

So look out for conferences nearby. And dont forget to cover topics that are not of pure technical nature only.





Port Numbers

18 08 2008

You know that IANA (The Internet Assigned Numbers Authority, link) takes care of coordinating the use of numbers, domains and so on? Looking for a “standard” list of ports I found this helpful page (link).





Technical Inventory

5 08 2008

One day someone might look back and want to see where we started:

Netbeans 6.1
Java JRE 1.5.0_08-b03
Java JDK 1.6.0_05

Glassfish V2.2
JBoss 4.0.5

XAMP 1.6.6a
Oracle XE

Notepad++ 4.8.5