Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Monday, December 26, 2011

pentahexed: the tale of a misleading manifest

If you have worked with Oracle's JDBC drivers before, you are no doubt familiar with ojdbc5.jar and ojdbc6.jar.

Oracle tells you that ojdbc5.jar contains Classes for use with JDK 1.5. It contains the JDBC driver classes, except classes for NLS support in Oracle Object and Collection types and that ojdbc6.jar contains Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types.

Take a class oracle/core/lmx/CoreException.class from each JAR, send it to file and you are not surprised with what you see:

(for oracle/core/lmx/CoreException.class from ojdbc5.jar): compiled Java class data, version 49.0 (Java 1.5)
(for oracle/core/lmx/CoreException.class from ojdbc6.jar): compiled Java class data, version 50.0 (Java 1.6)

Open the manifest of each JAR, however, and you see something interesting. The value of Created-By is the same in both JARs: 1.5.0_30-b03 (Sun Microsystems Inc.). How can a JDK 1.5 compiler know about JDK 1.6? Surely, this has to be something lurking in the scripts that needs to be fixed. It also wouldn't hurt to use a newer version of Ant (the value of Ant-Version) is Apache Ant 1.6.5 (the latest version is 1.8.2).

Saturday, May 28, 2011

true and really true: what's the difference?

I was forced to return to the murky depths of the Java-Web Services marsh and specifically to the quadrant dominated by Axis2 and a variation of it adopted by a behemoth peddling an enterprise-grade application container. This is what they called nostalgia (for those who do not enjoy etymology, that almost literally means a return to pain). As the flashbacks ensued, I found myself drawn to an old favourite in the Axis2 code base, org.apache.axis2.util.JavaUtils. The class contains several methods that seem dedicated to an exploration of verity and falsitude. Here are the methods devoted to the truth, the whole truth and all variants of it.

/**
   * Tests the String 'value':
   * return 'false' if its 'false', '0', or 'no' - else 'true'
   * Follow in 'C' tradition of boolean values:
   * false is specific (0), everything else is true;
   */
  public static boolean isTrue(String value) {
    return !isFalseExplicitly(value);
  }

  /**
   * Tests the String 'value':
   * return 'true' if its 'true', '1', or 'yes' - else 'false'
   */
  public static boolean isTrueExplicitly(String value) {
    return value != null &&
        (value.equalsIgnoreCase("true") ||
            value.equals("1") ||
            value.equalsIgnoreCase("yes"));
  }

  /**
   * Tests the Object 'value':
   * if its null, return default.
   * if its a Boolean, return booleanValue()
   * if its an Integer,  return 'false' if its '0' else 'true'
   * if its a String, return isTrueExplicitly((String)value).
   * All other types return 'true'
   */
  public static boolean isTrueExplicitly(Object value, boolean defaultVal) {
    if (value == null) {
      return defaultVal;
    }
    if (value instanceof Boolean) {
      return ((Boolean) value).booleanValue();
    }
    if (value instanceof Integer) {
      return ((Integer) value).intValue() != 0;
    }
    if (value instanceof String) {
      return isTrueExplicitly((String) value);
    }
    return defaultVal;
  }

  public static boolean isTrueExplicitly(Object value) {
    return isTrueExplicitly(value, false);
  }

  /**
   * Tests the Object 'value':
   * if its null, return default.
   * if its a Boolean, return booleanValue()
   * if its an Integer,  return 'false' if its '0' else 'true'
   * if its a String, return 'false' if its 'false', 'no', or '0' - else 'true'
   * All other types return 'true'
   */
  public static boolean isTrue(Object value, boolean defaultVal) {
    return !isFalseExplicitly(value, !defaultVal);
  }

  public static boolean isTrue(Object value) {
    return isTrue(value, false);
  }

Needless to say, there are similar methods that handle the dark side. Jack Nicholson's famous line from A Few Good Men would be the best summary of a code review, should one ever happen.

Sunday, May 01, 2011

the joy of comments

(in code, I mean). Truth is funnier than fiction. Comments in source code, to be precise. Consider, for example, the following worthy addition to the list of classic lines for fortune cookies:
// later is to be
or a declaration of principles:
// THIS method is not calling anywhere
or a declaration of the laws of the jungle:
// All transactional processing classes are responsible
// for calling this method and for providing what action is provided
or perhaps an example of stating the obvious:
// This abstract class houses default and common
// implementation for some interfaces

// This class is the message-driven bean implementation class
// which acts as the listener to queues which hold the messages that affect other 
// business objects
it is unclear why the following comment should even appear in code (perhaps the reader is not expected to be a developer):
// It is restricted to change this API without testing all the references
how does one say a lot without making much sense? how about (some of the funny names in camel case are euphemisms to protect the innocently dangerous; any others are changes just to keep the legal eagles awbay):
/*
 * DefectNumberInOneTrackingSystem Fix : Added this flag becoz
 * misspelledMethodName() in Abstract Object Check Against Null String of
 * FieldThatCannotBeDisclosed String While in This Defect Although it was Not
 * ______ Update But then also FieldThatCannotBeDisclosed string was
 * Not Null Becoz the default value stored in database is
 * 0.0 So it is Not Null and MisspelledFieldName Become true and
 * Then it dont set the AnotherFieldThatCannotBeDisclosed if it is True...See
 * DefectNumberInAnotherTrackingSystem
 */
{includes material that previously appeared hereabouts}

Friday, April 22, 2011

how do you puke in Java?

RuntimeException up = new RuntimeException();
throw up;

Wednesday, April 06, 2011

linky dinky

The Wall Street Journal has an article that tells us things we already know: India churns out a lot of graduates from a system that is rife with insufficient funding, peppered with corruption and laced with stale knowledge; these graduates don't really cut it when it comes to the jobs that have flooded the market and contributed to all the "prosperity" the nation seems to be enjoying (the call centre kind). I liked what Vijay Thadani of NIIT had to say: If you pay peanuts, you get monkeys.

I have been learning and using git for quite some time now and my experience with the DVCS (although not as D as I would have hoped it would be) has been fun so far (endorsements from various open source projects and enthusiastic presentations from the likes of Matthew McCullough have also helped). Windows is still a secondary platform for it and EGit offers IDE integration but is still in incubation. That's why I always wondered about that other DVCS that I had heard people talk about: Mercurial. I had heard about it first from a friend at Sun as they were moving to it. That was probably when the OpenJDK project moved over to Mercurial as well. Mercurial is written in Python and when Python moved over to Mercurial, it seemed to make a strange kind of sense (the dogfood kind). The reasons, however, were more interesting and backed by some thorough investigation. Simply put, the team chose something that would meet the needs of the developers as much as possible. The articles about the journey from PEP 374 to PEP 385 have been very interesting. They will also help me learn how to use Mercurial and MercurialEclipse.

Saturday, March 26, 2011

bing goes boing with axis2

If you've read posts hereabouts before, you know quite well how I feel about Axis2. You will understand, I hope, my lack of surprise at finding yet another piece of elegant congruence that Axis2 had wrecked by usurping the throne from ye olde Axis. Axis worked well with Commons HTTPClient and that library from the Apache Commons, like so many others, made life easier for a lot of developers. When Axis2 reared its ugly head from the sea of mediocrity and ambitious juvenile over-engineering, it made sure that this association was squashed. Here is how.

Have you ever tried using the Bing Maps web services using Axis? The curious aspect of these web services lay in how one had to request a token. This amounted to a request that used digest authentication instead of basic authentication. This was not such a problem if you had used ye olde Axis.

Unfortunately, you had moved into the future and had generated client code using the WSDLs and the tools in the JAX-WS RI. You then prepared to use this code atop the Axis2 JAX-WS stack (at which point you did not heed the pealing of alarm bells in the distance). Voila! The stack could do nothing for the first HTTP 401 response. There you were, in the middle of the ocean, staring at sharks as they discussed the latest episode of the hottest new sea soap opera, while waiting for a good time to transfer you to the dinner plate.

You had seen this code work with the standard Java Development Kit. Why was Axis2 being so different and difficult? You look at the code you wrote to use the generated client classes to see what you did wrong, to see if you had missed a step. You see the call to Authenticator.setDefault with the credentials. You know this is all you need to do. And yet.

Oh! goes your brain. Axis needed the Commons HTTPClient to help it with digest authentication. Surely, Axis2 could use Commons HTTPClient as well (after all, some of the developers on Axis2 had also committed code to Commons HTTPClient). You open axis2.xml and the first wave of horror hits you. The configuration already uses a class derived from Commons HTTPClient. The second wave of horror hits you almost immediately. They wrote their own middling class that left all the glory of Commons HTTPClient behind and treated it now as a messenger.

At this point, you hunt for something to hurt, wound, maim and dismember as you gnash your teeth.

Miraculously, Commons HTTPClient has a few tricks of its own and all you really need is the magic below.

import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScheme;
import org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
import org.apache.commons.httpclient.auth.CredentialsProvider;
import org.apache.commons.httpclient.params.DefaultHttpParams;

    CredentialsProvider provider = new CredentialsProvider()
    {

      @Override
      public Credentials getCredentials(AuthScheme scheme, String host,
          int port, boolean proxy)
          throws CredentialsNotAvailableException
      {
        Credentials creds = 
           new UsernamePasswordCredentials("BingMapsUserName",
                           "BingMapsPassword");

        return creds;
      }
    };

    DefaultHttpParams.getDefaultParams().setParameter(
        "http.authentication.credential-provider", provider);

And that, as several not-so-famous people have said before, is all. You can get rid of Authenticator.setDefault(new AuthenticatorImpl("BingMapsUserName", "BingMapsPassword")). Don't forget to replace BingMapsUserName and BingMapsPassword with the values that you use. I'm sure you can figure that out. If you can't, you deserve to continue reaping the benefits of Axis2.

As soon as you find the right opportunity, walk away very slowly from Axis2. Go find something else that doesn't look like a school project.

Wednesday, August 18, 2010

the red death

I'm sure I'm not the first or the last one to make digs about Oracle being a different kind of Red Scare. It's unfortunately no laughing matter when a lot of old content that used to be live at java.sun.com is no longer available even at the new scarlet apartments over at oracle.com. The most popular URL seems to be this one, which loudly screams Content removed before presenting you with a search box and a load of text at the bottom that's as friendly as a psychotic skunk:
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.

Whatever that means, a lot of my old bookmarks lead into nothingness. I hope it's not time to switch to tea.

Thursday, July 22, 2010

the paralysing effect of rebranding

Since having acquired Sun Microsystems, Oracle has gone about with a bottomless pail of red paint on all the solar panels rendering pages ugly but consistent with its crimson facade. As a next step forward, Oracle took a leaf out of the book of Indian politicians called "Several ways to assert authority while occasionally causing havoc": rename everything you see. Asserting geekish credentials, this extended to changing strings within the JVM DLL. This "fix" released in update 21 of Java 6.0 brought Eclipse to its knees. Oracle was admirably swift in taking care of bug 6969236. It is admittedly a bad idea to depend on such internal values, but such rebranding is also a rather wasteful exercise. It's what results in wiki pages like this to be modified with directions like The best way to really eliminate PermGen problems is to run Eclipse against non-Sun JVM, e.g. IBM J9 and BEA WebRockit. It's a sad day when an IDE for a language that came from SunOracle won't run on a JVM that came from the same place. Welcome to Larry Ellison's wonderland.

Saturday, May 08, 2010

the things people do and still get paid

The programmers who are paid well and get promoted while being completely ignorant of the implications of a package name for a Java source file. While it seems stentorian to expect everyone to read the Java Language Specification (Chapter 7, in this case, and section 7.2.1 to be precise), it surely isn't too much to ask that people heed the complaints of javac when it fails to successfully compile files whose package names have nothing to do with where the file is located on the disk.

The programmers who flaunt experience with the newer versions of the JDK (5.0 and 6.0) on their résumé but ignore javac's warnings about all the raw types abundant in their freshly written code, simply because they do not understand why the compiler has a problem with code that works.

The programmers who just don't understand why XSLT (from the wikipedia page: XSLT (XSL Transformations) is a declarative, XML-based language used for the transformation of XML documents...) does not work on a document that is not XML.

Saturday, March 06, 2010

axis2: the sequel reeks

(outpourings biased by a series of unfortunate events)

I recently returned to the natatorium of web services with the most variations of alphabet soup, the most fertile bed of specifications, some unfortunate acronyms (it's the time to DISCO ... get yourself some ROPE ... and who can forget SOAP?) and enough layers around an old idea to make it look like an adorned overfed pachyderm. The tools seemed to have improved; or perhaps they had just grown to have stronger armour to withstand the onslaught of specifications and protocols. Axis, the most popular open-source toolkit for web services had made way for Axis2. Axis2, it turned out, had decided to try and beat the WS soup nazis at their own game. It came up with its own complex design (ADB, AARs) and its own alphabet soup (an object model called AXIOM).

Getting started was not a problem, but once you started using the beast, you began to see the cracks. A simple client needed 18 JARs and notched a footprint of several megabytes. You saw all the typos (When users sends SOAP messages) and poor grammar (User care able to set his own mime-boundary string using this property) in supporting articles and in the documentation (Substract?). You also saw how careless the documentation was at times (the supporting text files for the 1.5.1 distribution contain URLs for the 1.4 distribution). You were taken aback at how incomplete (why have two articles on configuration parameters, when you could have just added some more javadoc? Then there was lack of support for enums, which is unfortunate because you just lost a clean strong way to enforce some constraints on parameter values. It's also a bit silly since J2SE 1.5 is the JDK of choice and the support for enums represented one of the most useful things that came with that version. If you wanted to try using minOccurs or maxOccurs, you were out of luck again. It all started looking like a giant step back for WS-kind.

Let's not even get started on interoperability or support for Spring. There's a very limited view of the world as far that last thing is concerned and it's a gross violation of the larger view that the developers of Spring have adopted. It's time to look at something simpler and more useful. After all, getting an elephant to guard your house soon becomes an economic problem (there's also the pachydump to consider).

(a few hours later). Oh great! Despite tall claims, Axis2 has severe problems with basic inheritance.

(a few days later). I am of the opinion that the quality of logging in any project says a lot about the quality of the project itself. This makes Axis2 suck even more. Let's start with org.apache.axis2.context.AbstractContext and scroll down to the method debugPropertySet(String key, Object value). The following block of code contains enough to send your lunch back up your throat:

log.debug("==================");
log.debug(" Property set on object " + identity);
log.debug("  Key =" + key);
if (valueText != null) {
    log.debug("  Value =" + valueText);
}
log.debug("  Value Class = " + className);
log.debug("  Value Classloader = " + classloader);
log.debug(  "Call Stack = " + JavaUtils.callStackToString());
log.debug("==================");

What a great place to practise your minimal competence in ASCII art. The fun doesn't end here. Let us turn our attention to org.apache.axis2.util.JavaUtils and specifically to the method callStackToString.

/**
 * Get a string containing the stack of the current location.
 * Note This utility is useful in debug scenarios to dump out 
 * the call stack.
 *
 * @return String
 */
public static String callStackToString() {
    return stackToString(new RuntimeException());
}

/**
 * Get a string containing the stack of the specified exception
 *
 * @param e
 * @return
 */
public static String stackToString(Throwable e) {
    java.io.StringWriter sw = new java.io.StringWriter();
    java.io.BufferedWriter bw = new java.io.BufferedWriter(sw);
    java.io.PrintWriter pw = new java.io.PrintWriter(bw);
    e.printStackTrace(pw);
    pw.close();
    String text = sw.getBuffer().toString();
    // Jump past the throwable
    text = text.substring(text.indexOf("at"));
    text = replace(text, "at ", "DEBUG_FRAME = ");
    return text;
}

Turn up the logging for org.apache.axis2 to see what I mean. Your log file will start looking like Armageddon and none of the traces will offer any useful information. The lack of respect for both performance and the usefulness of information is, however, appalling.

[march 23, 2010]: I should have just seen if Hani Suleiman had anything to say about Axis2. Guess what? He already said his piece in 2006. It's all there in the bile. If only I had read this first: I agree about the documentation, the language, the quality of code (System.out.println calls instead of logging calls; a complete lack of logging in core code, which means that I have exactly no idea what's going on behind the scenes even with the Axis2 code in front of me). Heck! I agree about everything. I wonder how the ASF let such a sub-par project into its fold. I leave you with a sample log message (some details have been removed in the interests of privacy) from the morass of one of the numerous builders floating in the source tree: Build the OMElelment obfuscatedFieldNameBy the StaxSOAPModelBuilder

Tuesday, January 26, 2010

what if someone pretending to be confucius used Eclipse

depecrated (deserves to be execrated); chinese internationalisation (whatever); this abstract class houses default and common implementation for some interfaces (very observant); all tranctional processing classes are responsible for calling this method and for providing what action is provided (schizoid indecision); used to identify newly instantiated instances (काला टीका?); later is to be (absolutely). This is a heck (what the hack!).

Someone would get paid for writing code that invoked the toString() method on an instance of java.lang.String. Meanwhile, in the woods, someone talks about methods consuming a lot of memory consumption (Borges would be proud, no doubt).

Wednesday, May 06, 2009

multiplexing choice

I wonder how many users of either ... or realise that the expression can accommodate exactly two choices. Think of an exclusive or in logic, if you wanted some way to remember this. Abuse of the expression to stuff more choices is rife in usage, especially in conversations. A little popup in Eclipse today offered evidence that the Javadoc in Sun's JDK was not immune; Here's the extract from the documentation for the getTimeZone(String) method in the java.util.TimeZone class in J2SE 5.0 (I have underlined the guilty snippet):



getTimeZone
public static TimeZone getTimeZone(String ID)


Gets the TimeZone for the given ID.


Parameters:
ID - the ID for a TimeZone, either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". Note that the support of abbreviations is for JDK 1.1.x compatibility only and full names should be used.
Returns:
the specified TimeZone, or the GMT zone if the given ID cannot be understood.

Wednesday, February 18, 2009

transformations galore: OSS humour

It was a dark and stormless night as I stared at a stack trace from the hearts of the JAXP subsystem of JDK 5.0, specifically the Xalan 2.6.0 snapshot shipped by Sun Microsystems under a modified package:



at com.sun.org.apache.xml.internal.serializer.ToHTMLSAXHandler.comment(ToHTMLSAXHandler.java:360)
at GregorSamsa.template$dot$0()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:663)

GregorSamsa?? Was I seeing visions? An examination of the JDK 5.0 source code (1.5.0_12, to be precise) and the Xalan-J SVN repository told me that I wasn't. All of Kafka's obsession with an individual trapped in a cruel cold bureaucratic labyrinth aside, this is kinda cool in a geeky way. The pun should be obvious if you knew that Xalan's used for effecting XSL transformations. XSLTC (Xalan-J's compiling XML processor) compiles XSL stylesheets into Java classes. A set of such classes is referred to as a translet. A set of steps is followed to determine the name of the main translet class; the final option, should all preceding ones fail, is the built-in default class name, GregorSamsa. Here's the extract from the source code (the comments serve as software development's answer to exposition):



/**
* As Gregor Samsa awoke one morning from uneasy dreams he found himself
* transformed in his bed into a gigantic insect. He was lying on his hard,
* as it were armour plated, back, and if he lifted his head a little he
* could see his big, brown belly divided into stiff, arched segments, on
* top of which the bed quilt could hardly keep in position and was about
* to slide off completely. His numerous legs, which were pitifully thin
* compared to the rest of his bulk, waved helplessly before his eyes.
* "What has happened to me?", he thought. It was no dream....
*/
protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";

Saturday, January 10, 2009

hop and skip

It all started with a Velocity template error on a page in my bookmarks that I decided to visit again. The Wayback Machine couldn't help out of respect for and adherence to the robots exclusion protocol. Googling got me to DZone and thence to an old InfoQ article about changes in the Java Collections API made in Mustang. Two things caught my eye: "skip lists" and "William Pugh"; The former was a data structure that a colleague in one of my previous jobs had introduced me to (not that I learnt more about this data structure later, but I was quite fascinated with what I had heard). The latter is the father of one of my favourite software code quality tools, FindBugs. As it turned out, William Pugh invented skip lists. You would think that I would've got wind of this at some point given that Pugh was not an unknown name thanks to the tool. Yet, today was when the dots presented themselves to me, connected in glee. The final surprise lay in store for me over at the inevitable Wikipedia page for skip lists. The second reference listed on the page is a paper, whose co-author is a good friend.

Then again, not all coincidences are meaningful.

Tuesday, September 20, 2005

an IDE wanes?

Is Eclipse (Greek verb: ecleipo = 'cease to exist') {source: Wikipedia} all set to go the bloated way of the Mozilla/XPCOM/you_name_it nightmare that rose from the initial offering of Netscape's source code? Version 3.1 has been an improvement in some respects over the horrendously under-performing 3.0 series (which I experienced vicariously thanks to reports from friends and colleagues while enjoying the simple pleasures of 2.1.7)...

Begin Flashback

When I first encountered and used Eclipse I was impressed and pleased. And I wasn't clamouring for IDE snap-ins and wizards for J2EE and UI development (frankly, I'd like to use such one-click tools only after learning what happens under the covers). And Eclipse offered great support for coding with the Java API and conventions. Especially if you were using good old vim for electronic archaeology -- didn't quite scale well given impossible deadlines when you were talking about several source branches inundated with millions of variously commented often intuitively named source files of various genera.

End Flashback

My sweet moments of development quickly went to KDE-on-a-386 hell shortly after I installed release 0.7.0 of the Eclipse Web Tools Platform. This represented an initial offering from the IDE's fold to all those developers who had been consumed by the dark side of commercial IDEs thanks to the allure of wizards, tools and mouse-friendly snap-ins that eased J2EE development (of course, if you didn't have too much of an idea about what went on in this distributed environment, you were competing with the average Visual Basic programmer for mental regression). While the tools contained in the WTP held promise (it was nice to see a lot of the Eclipse features like code assist extended to ugly pasta like JSPs). Soon, though, the White-Screen-Of-Death syndrome (see also: the White Toolbar of Death) became a regular phenomenon. You see, this thing didn't quite scale well when you had a classpath that had as many entries as people in the Indian subcontinent (allow me the hyperbole please). The "cool" feature of automatically recompiling projects soon became an annoyance that took your workstation down every time you changed a couple of characters in the scriplet space. Soon I found myself poring posts on fora and blogs for options to control and optimise Eclipse's memory consumption and garbage collection. ProcessExplorer from SysInternals now became a messenger of bad news as I watched the javaw process iterate through each JAR file in the project classpath. There was nothing I could do. To make matters worse, the WTP subsystem did not have its own vista for configuration. So if I had to turn off the "as-you-type" assistance, I'd have to turn it off for the whole IDE. Nice! For a while, I was stuck with hitting the period ('.') and becoming a man who paused (weak pun there, tinged with some "inquizitive" nostalgia).

This was getting to me. A deadline starting slipping away faster than the eye could see (aah the original figures of speech!). I began monitoring the ".log" file. Entries like the following were rather common:


!ENTRY org.eclipse.wst.sse.ui 4 4 2005-09-20 10:24:13.68
!MESSAGE problem with as-you-type validation
!STACK 0
org.eclipse.core.runtime.OperationCanceledException
at org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor.run(DirtyRegionProcessor.java:411)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)



!ENTRY org.eclipse.jst.jsp.core 4 4 2005-09-20 15:50:46.402
!MESSAGE JavaPosition was null!10780


A bug report had been filed about JSP validation and the OperationCanceledException. And another one that seemed to be related to the linear issues with the WTP. What was I to do? Wait? Hell, no!

I reevaluated my situation. Clearly, with the way development worked, all I really really (truly madly deeply) needed was some syntax highlighting for these long tedious convoluted servings of spaghetti and tremulous tofu. So, I didn't really need the WTP. I could wait till they got their act together. All I wanted was good old simple fast Eclipse.

So I began uninstalling the packages. The new "Product Configuration" management console in Eclipse was neat. You could manage plugin and feature installations and updates from here. No more shutdown-delete_files-restart. Think RPM with a nice GUI. The only downside was that some folders and JARs got left behind. Did I say "only"?? Still, it was better than going in blindly all guns blazing. Goodbye WST. Goodbye JST. Goodbye EMF. Goodbye GEF. About 218 folders (and contained files) and JARs later (and after a "-clean" run), I snagged Colorer Take-5, set up some "File Associations", and was merrily editing JSPs at regular speed. Sure, there was no code completion, opening brace/closing brace matching, no way of knowing if the code was fine until deployment. Potentially more round trips. But at least I would be doing something instead of staring at purple morphing into white bands and looking about with embarassment making sure no one was walking about -- can't have people stop and laugh at you for your conviction in a tool that clearly didn't seem to be doing the job right.

Tuesday, March 01, 2005

a bilefull of laughs ... with a strong ring of truth

For any developer (being in the Java/J2EE space will guarantee better results) in the know about TheServerSide, Hani Suleiman's BileBlog should offer excellent reading, in general. Hani transcends new heights today with a worst-of-TSS-posts entry. And while you're rolling down the aisle hurting your rollicking gluteus, take a look an older post that hurls boulders at developers who seem to represent the worst of the lot that has lost all respect for their primary language of communication. I stand by him on this one: I've seen way too many examples of people suffering from unableToTranslateThoughtsToCoherentSentences-itis.

Thursday, February 03, 2005

names! names! names!

The college formerly known as COEP and briefly notorious as PIET has now reverted to its original name. No such luck with Prince Roger Nelson/Christopher/whatever.

Java Development with Ant uses an illustration of an inhabitant of Goa (which is a region on the western coast of India, south of Bombay.). The errata [PDF link] includes a note for "about the cover illustration": The city of Bombay is now officially called Mumbai.

Thursday, June 03, 2004

corporate bloatware, nominal equivalents

I am about to throw in the towel on IBM/Rational XDE once again. I like software engineering and acknowledge the importance of UML in OOD, and all the power that XDE can offer a developer (two-way synchronization between model and generated code is a big plus). But, the experience of using XDE has been unpleasant for the most part. The first time I tried to use it it would die randomly, and leave zombies running (complete with truncated 6~1.3 filenames in the process list). That Eclipse sits at the core is some encouragement, but the tool suffers from every flaw that identifies corporate bloatware. It's huge and complex, and is not quite intuitive straight out of the box. There's a complete lack of useful and current documentation (tutorials, even if they are discovered deep down in the cavernous set of hyperlinked files, are out of date). Dialog boxes fail to pop up, and some features no longer exist (that you cannot apply the Core J2EE Patterns anymore is a huge minus). First your company (there's no way a sane individual would shell out so many $$$ for this, is there?) drops a Godzilla poopload of money to purchase this chaotic piece of inflateware. Then you have to pay for documentation. And training. And even then there always the sense of missing out on something. I might lean more towards building up a development infrastructure from smaller components. Gives you a sense of plug n' play, and does not leave you locked into the tool. Oh, and did I mention that the codebase reveals a hotchy potchy marriage of Java and COM Automation. Talk about completely tying you down. I hope they use "Iron Maiden" as the codename for the next release.

My Japanese name is Gennosuke Chikamatsu.
Take The Kawaii Japanese Name Generator today!
Created with Rum and Monkey's Name Generator Generator.

Thursday, October 16, 2003

the standards of commercial documentation

I've been playing around with version 9.0.3 of TopLink, a commercial O/R mapping persistence tool sold by Oracle (a licensing cost of about $7,000 per processor). Oracle bought TopLink from WebGain
(see also: origins of WebGain). Oracle currently (release 2 aka 9.0.2 or 9.0.3 -- the confusion somehow translates into more sales!) ships TopLink as a separate CD in the Oracle9iAS pack (the new 10g promises integration of TopLink into both Oracle9iAS and JDeveloper). I've been having a mixed experience with the Oracle Suite of Acquired Products (Oracle9iAS, JDeveloper, TopLink), and although my little test application using the developer preview of JDeveloper 10g (aka 9.0.5.1375 formerly ka 9.0.4), the first to provide some level of integration with the TopLink Mapping Workbench was a minor success (the strange documentation notwithstanding), I hit a small roadblock and went after the Javadocs for TopLink. Lo and behold! Bad javadocs. The page in question describes the XMLProjectReader class. Note how the parameters described do not match the method signatures. Given that there are so many fairly mature tools to automate most of the process of creating and compiling javadocs, I don't really understand how this can happen. Did this ship straight from WebGain and get shipped out again without as much as a cursory glance? I'm itching for the day when I can test the persistence frameworks in the public domain like Hibernate and implementations of JDO. Any $$$ saved in the process can compensate for any "extra" hours of learning with the lack of documentation (which is the same as learning with the overabundance of useless documentation). And any $$$ saved after all that can be safely donated to these worthy causes. No valid arguments for commercial bloatware come to mind. In the meantime, suffer in silence while the higher-ups dish out the dead presidents. Sigh!

Friday, August 01, 2003

ODD

Attended my first ever Oracle Developer Days session yesterday at the Grand Hyatt in Buckhead. The session and the nourishments were free, which meant a whole day of fun and good free food (personal note: three Häagen Dasz chocolate bars are bad bad bad!). There were five presentations followed by a series of matching labs, with timely snack, lunch and bathroom breaks. Very useful and a lot of fun.

The highlight of the day was being able to preview the upcoming release of JDeveloper (9.0.5). This new release is worth most of the wait. The current release (9.0.3.1) was a good step forward but has a lot of annoying features (bugs) and sorely lacks several useful developer-friendly features that made me miss Eclipse. Here's a list of what I could uncover:

* Auto-popups to add imports (one of the cool features in Eclipse)

* A set of options to configure Javadoc comments, code structure and error markup (did they integrate Jalopy or try to supersede it?)

* Improved diagramming options with support for UML activity, sequence and use case diagrams

* Thumbnail view for UML modelling

* Wizards for profiling software metrics

* Templates to customize the IDE on an application-to-application basis

* Support for deployment to Tomcat and JBoss

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.