ClustrMaps

The roadrunner is back as never before! See also: My homepage or my very obsolete site
If by any means entries in my blog are considered to be harmful or damaging, please let me know (add comment) or just mail me. In this (unhopely) case I will remove or change the contents.

Sunday, January 28, 2007

Java and the persistant arrogancy of Sun.
See this simple Java source:


import java.math.BigDecimal;

public class TestDouble {

/**
* Translates a double into a BigDecimal. The scale
* of the BigDecimal is the smallest value such that
* (10scale * val) is an integer.
*


* Note: the results of this constructor can be somewhat unpredictable.
* One might assume that new BigDecimal(.1) is exactly equal
* to .1, but it is actually equal
* to .1000000000000000055511151231257827021181583404541015625.
* This is so because .1 cannot be represented exactly as a double
* (or, for that matter, as a binary fraction of any finite length).
* Thus, the long value that is being passed in to the constructor
* is not exactly equal to .1, appearances notwithstanding.
*


* The (String) constructor, on the other hand, is perfectly predictable:
* new BigDecimal(".1") is exactly equal to .1, as one
* would expect. Therefore, it is generally recommended that the (String)
* constructor be used in preference to this one.
*
* @param val double value to be converted to BigDecimal.
* @throws NumberFormatException val if val is
* infinite or NaN.
*/
public static void main(String[] args) throws Exception {
double d = 0.1;
System.out.println(d);
System.out.println(new BigDecimal(d));
System.exit(0);
}

}

And it's output when run:
0.1
0.1000000000000000055511151231257827021181583404541015625

This is far from expected.

See also: http://www.javaranch.com/newsletter/July2003/MoneyInJava.html

Or this Sun form entry: http://forum.java.sun.com/thread.jspa?forumID=256&threadID=252852

Tuesday, January 23, 2007


Confused? You will be after this week's episode of this blog.
As developing in Java is not without risk (of failure) and often competing with performance:
YAVA: Yet Another Version Available.
As developing an application is a never ending story.

In Dutch they say:

Ga toch krassen! (Build some code).




And if unhoped errors occur in the code, just bang your head:


Friday, January 19, 2007

Yes, this disclaimer is still there for Java:
14. NOTE ON JAVA SUPPORT
THE PRODUCT MAY CONTAIN SUPPORT FOR PROGRAMS WRITTEN IN JAVA. JAVA TECHNOLOGY IS NOT FAULT TOLERANT AND IS NOT DESIGNED,MANUFACTURED, OR INTENDED FOR USE OR RESALE AS ONLINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF JAVA TECHNOLOGY COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE. Sun Microsystems, Inc. has contractually obligated CoffeeCup Software, Inc. to make this disclaimer.

See:
http://www.coffeecup.com/legal/eula.html

And now for something completely different: DILBERT!
See this Dibert-esque: http://monster-island.org/tinashumor/humor/corpmemo.html
And this Dilbert archive: http://pag.csail.mit.edu/~adonovan/dilbert
And this Dilbert finder: http://www.bfmartin.ca/finder

Saturday, January 13, 2007

I accidentally hit this page:
http://www.theserverside.com/news/thread.tss?thread_id=22481

On this page is:
J2EE complexity debated in the community
Erik Hatcher in J2MU thinks that the question needs to be unasked.
If you try J2MU you see something as familiar as disturbing:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
java.io.File.(File.java:180)
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:113)
org.apache.lucene.index.IndexReader.open(IndexReader.java:98)
org.apache.lucene.search.IndexSearcher.(IndexSearcher.java:75)
blogscene.store.lucene.LuceneStore.retrieve(LuceneStore.java:55)
blogscene.BlogSceneServer.doGet(BlogSceneServer.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs.


Apache Tomcat/5.0


See also this page: http://www.blogscene.org/

Is anyone using it?

Yeah, Erik's blog runs it: http://www.blogscene.org/erik

Development in Java can be cumbersome.
Try java.lang.NullPointerException search in Google:
Results 1 - 10 of about 892,000 for java.lang.NullPointerException. (0.07 seconds)
and the second time:
Results 1 - 10 of about 938,000 for java.lang.NullPointerException. (0.04 seconds)
This will toggle if repeated.
As I found out all searches toggle between two values!

Wednesday, January 10, 2007

I did not believe my eyes. See this bridge:










And this link: http://bridgepros.com/projects/Millau_Viaduct/

For something completely different see: http://jos.coenen.googlepages.com/evolutie.mpg