about author

Next Year

2002

Java: discovering limits of programming

alek blogs

insane blabbering without spelling (*)

marketing ...

better marketing that is what really matters. example?
my minilogger has nicer syntax as it does not require class parameter to getLogger() so less redundancy and no need to do this awaful redundancy (and that is typical pattern in code that uses Log4J):

public class Xxxxxx {
  private static Logger logger = Logger.getLogger(Prunable.class);
it is hardly if i have to chase for bugs when i my class logger gets out of sync with class name (look on Productive Environments: Log with log4j) - typical problem of code redundancy i.e. class Prunable was used as template to create Xxxx but logger is still reporting for Prunable - it may be good but it may be also a mistake and definitely it is better to declare intention with your code:
public class Xxxxxx {
  private static Logger logger = Logger.getLogger();
no confusion here: Logger works for containing class



XML Pull Builder API (XB1)

i love XML Pull Builder API and it may not be good sign as i am its author ...

Anyway, this is second reincarnation of XPP2 XmlPullNode but this time done with all very nice decomposition into interfaces and value objects and both really easy to use (no longer prefixes or raw XML names are required) and really fast and powerful - essentially can be as fast as streaming pull parser as user can for part of tree work with pull parser directly :-)

The API is modeled after XML Information Set and allows building incrementally XML trees from events streamed from pull parser (user can start navigating tree before whole XML input was parsed!) and has an unique ability to bypass tree building for selected sub trees to work directly with underlying event stream. This coupled with ability to create XML tree that can mix in any Java Object allows to represent objects derived from XML (databinding) in the XML tree.

The unique feature of API is ability to achieve high performance that is common in streaming parsers and ease of use associated with tree approaches in the same API by provising very precise control over XML tree creation and access to underlying streaming parser during tree creation (API users needs to do it if and only if they do want to bypass default tree creation and replace it with their customized object tree, work directly with XML events or just skip unneded parts of XML that do not need to be in XML node tree).

Now the challenge is how to do it in C++ and to make it easy (especially memory operations) so it can favorably compare to DOM ...



CodeGuide Wishlist

Codeguide Omnicore Wishlist let me first state i really like CodeGuide = Incredible Power and Simplicity however there are seom issues that are still not resilved
  • organize imports: when multiple imports are possible let user choose (and not show dialog that multiple choices are possible ...)
  • more powerful completion that will search all classes and not only what is imported (so it can work with Ctrl-O and no need to leave import package.*)
  • multiple run parameter sets - so i can configure different set of parameters
  • allow to execute any JUnit test or even one method from TestCase just by selecting it by mouse



one of dream J* features already provided by minilogger

in James Strachan blog he writes about features to add to Java to compete with C# including thisClass and uses example of Logger:

A constant for the current class instance

We have this but why not a thisClass?

Its a PITA to have to cut and paste class names when they could easily be a compile time constant. e.g.

public class Foo {
    private Logger log = LogFactory.getLog( thisClass );

instead of

    private Logger log = LogFactory.getLog( Foo.class );

which can lead to cut-and-paste errors. This is a common issue with using static methods in a generic way.

This is a very trivial change.

and this is already solved by minilogger where you can write
    private Logger log = LogFactory.getLog();
and miniLogger can do it now: it will guess current thisClass from context. without changes to language to have thisClass



code guide gripes

even though Code Guide 5 is better to write code than Intellij IDEA 3 with its unbelievable-until-you-try instantaneous incremental compiler there are some small changes that would greatly improve CG5 usefulness:
  • organize imports (Ctrl-O) should give choice when class can be imported from multiple packages
  • add extended completion (Ctrl-Space?) that would allow to lookup classes that are not yet imported. right now i have to write class name from memory and then do Ctrl-O as thanks to Ctrl-O i have no longer import * declarations ...
  • dependencies between projects: so i do not need to have long list of all projects source trees but instead can say current project depends on project Foo and Bar and when CG5 compiles current project it will check dependencies and compile a dependent project if needed and then add automatically to CLASSPATH dependent project .class output (and related libraries)
  • project settings/classpath management: needs ability to add multiple source tree or jar files AT ONCE!!!



minimze redundancy or logger design

what is the difference between those two lines?
class Baz {
    Logger logger = Logger.getLogger(Baz.class);
and
class Bar {
    Logger logger = Logger.getLogger(Baz.class);
the problem is of course that prblmey user did not want to use logger from Baz class in Bar class and it may be an annoying bug. what about this:
class Baz {
    Logger logger = Logger.getLogger();
now this version is safe and less redundancy. and is available as part of my minilogger :-)



now the bug for shortened printStackTrace() has permanent home

no i am proud initiator of bug report on Bug Parade and if you do any RMI programming or have chained exceptions please vote on it ;-)



CodeGuide 5 leaves IDEA 2.6 behind...

reading recent praises about IntelliJ IDEA 2.6 i felt compelled to try it and see how it compares with Omnicore CodeGuide 5
TODO:link http://radio.weblogs.com/0112098/2002/11/06.html#a235 http://radio.weblogs.com/0107789/2002/11/06.html#a1002

... with its incredible incremental compiler that allows to instantaneously compile and show errors as you type without any delays - INCREDIBLE!!!

IntelliJ IDEA does nto come even close to it and after all the only thing i care is how to write code and not plethora of tools (though some tool sin IDEA looks cool and should be added to CG ASAP).



JDK 1.4 will not show me full exception traces ...

just sent this RFE to Sun bugs parade ...

version 1.4 changed implementation of Throwable.printStackTrace to
print chained exception

however currently it may print truncated stack trace for chained
exceptions and it is not acceptable for several classes
of apllications like programming with RMI or EJB

instead it should be an optional feature disabled by default!

here is an exampe that shows that information provided by
printStackTrace is almost useless as important stack trace
details of remote exception were truncated after first two lines!

 Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
   at $Proxy0.requestMessages(Unknown Source)
   at SimpleMessageMonitor.main(SimpleMessageMonitor.java:60)
 Caused by: soaprmi.RemoteException: IO Exception; nested exception is:
   java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read
   at soaprmi.soaprpc.HttpHandler.invokeTransport(HttpHandler.java:141)
   at soaprmi.soaprpc.SoapDynamicStub.invoke(SoapDynamicStub.java:120)
   ... 2 more



Grid, workflows, and other observations

Bunch of observations:
  • we need simple (and working) easy to use workflow engine for BPEL4WS that works on grid (for example on top of CoG API but workflow engine hides that it uses any particular grid toolkit ...).
  • WSDL as ultimate URL - but how to find correct WSDL needs for permanent URL and in OGSA it is GSH ...
  • different computing paradigms: Java is to java specific so now we replace Java with XML and re-implement Jini -> Gird and Web Services ...
  • not to forget (note to myself): why we need components?
    reusability and etc is nice but why they are really needed is because only few grid users are grid programmers or computing scientist (TODO: check term) instead we need to provide generic tools such as components (and XCAT!)
  • XSpaces needs official release, badly! (another note to myself)
  • Noted observation: Grid Spam is grid application that sends (XML) messages/events that are automatically converted into emails ...
  • PC + Management = Managewoment ???
  • new product besides eCluster, eUtility, eDisaster in IBM family is now eWeSolveYurProblemsForSmallFee <blink> <blink> ;-)
  • heard on Oprah: nobody talks about what is happening after the wedding? yeah we need to explore this space too ...



UndeclaredThrowableException ...

dealing with undeclared exception in dynamic proxies?

got UndeclaredThrowableException? i did so i wrote small utility class to do all neceessary exception wrapping and unwrapping (link to CVS java and tests)



why including XML APIs in JDK is bad idea

XML is not about APIs it is about processing XML. if XML was finished and there was no work on standards (DOM3 comes to mind) and implementations were finished and abandoned (Xerces2, Xalan etc.) than maybe it would make sense ...

actually that brings another point: java badly needs library (JAR) dependency mechanism in use right now ...



This blog is about:
XML, Java, and everything else (or nothing ..)

Find more about
blog author

Blogroll:
Sam Ruby
Russell Beattie
Diego Doval
Joel on Software
and some (almost) harmless entertainment: The BileBlog

Projects::
MicroLogger
Xydra
WSIF
XmlPull API
XPP3/MXP1
XSOAP
XMessages

RSS RSS 0.92
0.92 [validate]
2.0 [validate]

Filter Entries:
Life Category Specific RSS Feed
Java Category Specific RSS Feed
XML Category Specific RSS Feed
Computing Category Specific RSS Feed
Web Services Category Specific RSS Feed


Valid XHTML 1.0!


Powered by microBlog (C) Aleksander Slominski

Disclaimer: personal opinions and observations that may or may not be taken seriously, or even based on shared reality and generally are very unreliable and personal and snapshots of volatile writer mind ...

NOTE: THIS PAGE IS UNDER CONSTANT DEVELOPEMENT