Welcome to blog.chinoy.com Sign in | Join

The Collatz Conjecture is a mathematical problem which states that given any number, and following a simple formula, converges to 1.

Take any number and do this:

  • If odd, multiply by 3 and add 1
  • If even, divide by 2
Repeat. You'll get to 1. Every time.

A comment about the latest xkcd comic's reference to the Collatz Conjecture, which I had never heard of before, lead me to create Hailstone sequence; my first Google AppEngine web app.

1 Comments


I've updated the wwc wwj project on JavaForge with the latest NASA wwj source, in trunk\worldwind.release and have added tags for previous releases (05/11, original; 08/17, latest; and 09/15).  Don't ask me why the latest download of wwj points to 08/18/2007 or the sourceforge version is still 05/11/2007, but they are.
0 Comments
I've begun two documents about integrating the NASA World Wind Java SDK into the Eclipse framework - Creating Plug-Ins out of World Wind and Hello, Globe! (basic integration).  They're in process, so I wouldn't mind any feedback. They're a bit light on justifications of the Eclipse framework, so they're more suited to people familiar with Eclipse.
0 Comments

From the forums regarding the future plans for the Java SDK
There is no feature roadmap written down.
What's troubling me today is not that NASA isn't elaborating on their goals for the WWJ SDK other than what they've already said ("The goal is 100s of World Winds, not one. That's why NASA created WWJ as a Java component. NASA has no plans to create a World Wind Java client similar to World Wind .Net. They plan only to continue to develop and expand the SDK." - WWJ FAQ) though that statement is a bit ominous (open source, vague/unstated patch & development process), but the minor technical discoveries I'm making as I use the SDK.  There's a real overuse of static members and methods that is complicating the process of trying to douse how NASA intends the use of this SDK.  For example, layer classes have a construtor that requires a LayerSet or PlacenameSet to have already been created.  That means a static method. This makes it appear that almost all their AbstractLayer derived code isn't designed for extension or reuse but as an example of how to create a Layer - and that means a lot of redundancy.  The options are to change the source and allow for a constructor that doesn't require LevelSet/PlaceNameSet (cons: changing the code means changing their SDK code) or copy wholesale and reproduce what appear to be core SDK classes, such as. TiledImageLayer and PlaceNameLayer.

The other thing that irks me and irks me bad is the variety of OGL implementations on various video cards.  Though this appears to be a case of "it's the video card manufacturer's issue, not NASA's" it becomes a very large barrier to adoption when an example works perfectly on one machine (ATi X1500), partially on another (ATi FireGL 5200), and is an abysmal failure on a third (Intel Extreme).  To me, this is a massive user acceptance issue.  I see a lot of people (primarily through failed demos or inability to see their own houses with ease) discounting a WWJ-derived app due to driver issues.
0 Comments
It's been in the works for over a year now, and NASA, today, is finally releasing a SDK of WorldWind for Java.  Patrick Hogan, the Project Manager for NASA's WorldWind which, up until now, has been a Microsoft .NET application, explains in a JavaOne session yesterday: CNet Video.
The .NET application, version 1.4, is still available as well as the source code.  There's much speculation on the WorldWind open source community about the future of the .NET version.  Hogan says that NASA will turn it's efforts back to the .NET codebase as interest in the Java version picks up, but that hasn't stopped the community's worries.  On the Microsoft platform, ESRI has dominated the GIS space, while most of the innovation in open source GIS has been in the C++ and Java languages, geared to either cross-platform or linux use.  That's a bit of a generalization, but it's useful to see why a successful open source globe viewer like WorldWind .NET could easily (and quickly) be overshadowed by a proliferation of WW Java SDK based apps.

I'm hoping to pop out an Eclipse RCP based one, but that's dependent on how good the AWT/JOGL wrangling goes into SWT.

Here are my first impressions.

Meanwhile, another, usually under the radar, government agency gets all paranoid: (I've blinded myself with bad puns!) Intel chief: Curbs on public satellite photos may be needed, Vice Adm. Robert Murrett, NGIA director, May 8, 2007

05/11/2007 Edit:  NASA reupped their Sourceforge and their zip includes two demo jars (worldwind.jar 4.5mb, BasicDemo.jar 10k)which don't run.  For all those people looking to download a SDK and double-click stuff, they'll be disappointed.  Granted, it'd be nice if they did have working demos for simple people, but download it anyway and build it yourself, you'll be pleased.

0 Comments
While I figure out where (and if) to post feedback on Eclipse's latest build for Windows Presentation Framework, I'm making a note of them here, so I can remember and then forget and later look at it winsomely years later trolling through my own blog and being embarassed.
  1. 3.3M6 WPF leaves up an communication error dialog box artifact when the Update Manager fails to connect to a server.  It remains in the way of using the app's editor window.  (Indiana University was chosen as the mirror site automatically, then failed/timed out. To get it to update, I had to manually chose OSU or something else.)
  2. It also attempts to check all subupdate sites of an update site - eg, when I go to the Europa Discovery Site, it tries to download everything as the default option instead of letting me check the checkboxes near the entries I want.  This has the consequence of stopping me from using Eclipse while it downloads, well, everything.
  3. The Update Manager, when it does get everything finally loaded, flickers on expanding the list as it checks plug-in/feature dependencies.
  4. Clicking "Filter other Features on the list" causes the UM to cycle through and enable check marks on all lists of updates.  Sigh.
  5. "Run in Background" for the update presents the same artifact (a dialog that won't go away and isn't updated) as per the first comment.
  6. Spacing of text between lines on menus and trees seems a little larger than necessary
Can you tell I haven't even gotten updated yet?
0 Comments

A while back, I made some odd grumbles about Java vs. NET and, in doing some early spring cleaning of code, I realized I didn't really bother to explain.

I'd made a NASA WorldWind placename converter - it read in WorldWind placename files (which were generated by NET) and displayed them as text, as shown here:

Since then, the latest version of WorldWind, 1.4 (which is in beta right now) has switched to using WFS (streaming, from the network) for placename display instead of reading from local files, cutting down on 215 mb of installation size.

A year ago I was stabbing blindly at SWT and will probably update this code since I'm so smrater to JFace and/or an RCP editor, but if anyone wants to see the current code (and JUnit test case!), feel free to let me know.

0 Comments

A while back I created a map mashup & backend to track visitors to my blog (all 3 of you) (Tracking my visitors ... with Maps, Nov 14, 2005). It just so happened it was the same day that Google put out their Analytics (nee urchin) product publicly. I’ve been quite happy using Analytics, since Google’s ability to track and resolve city locations is much better than mine, but the Analytics maps aren’t easily shareable.

Ian pointed me to this blog post and I just had to reproduce. Here’s a java jar that you can run at the command line to convert Google Analytics data to KML for use in Google Earth.

USAGE: java -jar UrchindataToKml input_report.xml [output.kml]

I used a different export method, their XML export method:

Logging into Google Analytics, go to All Reports and expand Marketing Optimization. From there, expand Visitor Segment Performance and then click on "Geo Map Overlay."

Then, select the little document-looking icon from the upper right hand corner. An xml document should open up. Save that somewhere on your filesystem.


Here’s the XSLT for urchindata xml to KML: UrchindataToKml.xsl ... and here're my latest results:

Some further thoughts:

Manually exporting and running a command-line program is, well, manual and annoying.

In order to automate retrieving urchindata map xml and converting it to KML, it’d need: a way of logging in a way of choosing a date range (would be nice) an api!
I’m sure Google’ll get around to making some sort of API for it. Knowing Google, I’m sure there’s already some unpublished API that just has to be ferreted out.

0 Comments

My frustration with programming is most probably derived from the multitudes of ways to do things that are out there. It’s choice that’s stifling me. I know how to do "something" in Java, but it’s inefficient and takes too long. Converting a .NET generated binary data file from hex to float, for example: Big-endian or little-endian? How about making a UI for testing purposes? The same issue with Ruby is one line, but there’s no Ruby in my paid-work; only Java. Spin. Or, really, maybe I don’t know how to do things in Java. Again, spin.

Java’s Integer object has a MAX_VALUE on it that’s smaller than what the primitive int can hold. Also, long is 64 bits, and float’s 128, so, for my purposes of converting an unsigned int from hex to float, I can’t really use Long, either, but I will.  Sorry extra Microsoft data.  Or, in Java, does the data lose you?

The answer, of course, is that I should choose to just *know* the restrictions of each language and not be frustrated when the API documentation says "do this and things'll happen (caveat: read the design guidelines)." And that's the problem with software. No, I really, really shouldn't have to know the useless jank of languages.

make little-endian .NET bytes into big-endian ones, convert to hex string...
int i = new Long(Long.parseLong(hexString.toUpperCase(), 16)).intValue(); // yes, two Longs make an int

Ruby did it in one line, .NET has methods in their BinaryReader to generate primitives from source bytes with one call, and, sadly, Java's ByteArrayInputStream is inadequate.

But really, who cares, anyway?

0 Comments
"Writing" code is crap. Especially the way I've been doing it for the last few years, which is predominatly fixing other people's poorly written and even more poorly documented stuff. It's classic janitorial scut. In addition, there's this whole open source trend to use the latest shiny thing. This means I have to know wtf about the shiny thing to fix it. It's never one or two new things to learn and learning about those things is never in isolation. It's dreary work to learn the combinations of new things knowing that people will continue to splatter random bits together and think they're the new hottness. It's not software "progress" that's got me irritated - I'm all for software progress, I actually enjoy learning the new spit-shined pieces of crap open source idiots think up so that they don't have to actually do any work - it's that the inanity is considered professional. Who's going to use this stuff and who's going to make it better? This is an expensive, throw away, one-off business, no matter how excited the guy telling you about it is.

Here's the manifesto for Prototype Designs, an Athena-from-my-hed company: The only product is one-off easily modifiable projects for corporations to show proof-of-concept so that they can then spend the big bucks on trying to implement a "real version." In my experience, the world lives, breathes, and commerces on prototypes anyway, this company would just be honest about it.
0 Comments

Tapestry > Tomcat, Tomcat 5.5, requiring JDK5 > JBoss, JBoss's use of AOP, AOP Intro > JBoss Blog > paper on “microreboots” > “Heisenbug”, paper on “Heisenbug” vs “Bohrbug” (pdf), ACM Interview with Bruce Lindsay

Computer geeks still want physics chic.

0 Comments
Spent the better part of a day looking into how to include Eclipse's .classpath file into an Ant build.xml classpath w/o having to retype, copy it, or whatever; in other words, trying to keep Eclipse's build in synch with Ant's build. Ends up, the easiest way is to simply define properties to the paths, then include those in the path definition. Silly, really. There appear to be ant task add-ins [1,2] for Eclipse, but for what I was doing, they were overkill. I'll have to look into them later.

In order to get Eclipse's Ant build to work, I did have to do two things:
  1. <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
  2. Have Eclipse's Run->Ant Build..., JRE run the same JRE as the workspace
0 Comments