Latest Publications

JavaFX is here …

I thought it was going to be a bit later, but JavaFX is ready for download. The site has also been redesigned, and to the relief of many (I’m sure) it actually uses the technology it’s advertising (at least for the video).

I’m downloading the Netbeans bundle as I write this, so we’ll see what this package brings but from the JavaFX blog here are a list of features available in this release;

Here are just a few of the features in JavaFX 1.0:

  • KeyFrame animation
  • XML & JSON web services
  • Fast and easy to use 2D graphics
  • PerspectiveTransform for 3D effects
  • Pixel-filters and visual effects with GPU hardware acceleration
  • Video and Audio support using both native and cross-platform codecs
  • Swing Integration
  • CSS styling (more on that later)
  • Windows XP+ and Mac 10.4+ support with Linux & Solaris in the works (more on that later too)
  • The new JavaFX Script language with binding and animation built in, running 10->20x faster than Javascript
  • Visually rich applets that you can drag to your desktop and save for later
  • Integration with Photoshop and Illustrator
  • Access to the world’s huge library of Java code and APIs
  • A new website with docs, tutorials, and tons of BSD licensed sample code
  • A sneak-peek beta of JavaFX on mobile devices

Also, I’m interested to hear if anybody else is having some problems with the JFX enabled video. I’m seeing some weird errors in my Java console, and I don’t think it’s starting fast enough for me as intended. I see this error (but the video still plays at the end).

network: Wrote URL http://dl.javafx.com/emptyJarFile-1228403636122__V1.0.0.jar to File D:\somepath\javaws\temp\6.0\47\a6b8bef-751ceabc-temp
java.util.zip.ZipException: ZIP file must have at least one entry
at java.util.zip.ZipOutputStream.finish(Unknown Source)

Well the file is called “empty jar file”, I wonder what it’s trying to do.

BTW congrats to the JFX team, the release surely took a lot of hard work and sleepless nights.

Tomorrow, JavaFX becomes a reality

JavaFX 1.0 will be released tomorrow (Dec 4th). Chris Oliver invites us to judge for ourselves if this project delivers on the promise of an improved user experience for rich clients in the Java Platform.

I remember well when this technology was announced at last year’s JavaOne. Chris’ demos impressed the audience, and in his sessions he showed off a really cool JFX powered PDF reader (sadly, I don’t think they ever released this demo). Yet, there was and has been lots of skepticism about the project, or maybe I should say about client side development in Java. Part of this has had to do with startup times, and bad implementations of the Java Plug-in. Lots of enhancements have been done in these areas, in part motivated I think, by client side initiatives like JavaFX.

Anyways, it will be fun to finally download and try out version 1.0 of this technology. What I’m hoping is that Sun has stepped up in their tooling for this, and that the download comes with a good set of useful demos that spark the creativity of both designers and developers. We’ll see.

I’ll have more to write about this once I try it out, there were a couple of projects (yes, one of them was a follow up to my JFX Clock example) I was working on using earlier versions of JFX but I’ve been waiting for the final release to continue these projects. Over the few weeks/months I should post a lot more examples and impressions of this. Stay tuned.

BTW: I noticed my JRE was automagically updated to 1.6 update 11, probably in preparation for tomorrow’s release? I’m a bit unclear on how JFX is being “pushed out” to existing JRE installations.

Vote!

Vote for somebody, anybody … just go out and vote!

Tomorrow’s election day and it looks like there will be record turnout. Hopefully that is the case, here in FL early voting has proven to be very popular but the lines have been long. Anyways, happy voting day!

Sofia loves Penguins

Penguin sketches from a year ago.

Happy “Talk Like a Pirate Day”!

Ahoy!

Today is the International Talk Like a Pirate Day! I guess a lot of people still are not aware of it because I was talking to a co-worker and he thought I was drunk! Anyways, this day gives me the perfect excuse to link to one of my favorite pirate songs. If you have kids, you’ll recognize this show; Lazy Town.

Ahoy, Mateys!

My JavaFX presentation at PanamaJUG 2007 (JavaFX en Español)

Last December I did a presentation about JavaFX in Spanish for the Panama Java User’s Group (JUG). This event took place in the city of Chitre, and was a lot of fun to participate in, specially since it gave me a chance to visit my native country. The presentation aimed to serve as an introduction to JavaFX, providing an overview of the main features of the language. I showed some simple demos from Sun, and a few I created myself. At the end, we went over my JavaFX clock implementation and discussed a bit what place JFX occupies in the RIA technology space. The slides are featured at the top of this post, and are in Spanish of course. Thanks to Aristides Villareal, and the members of the Panama JUG for inviting me to this wonderful event! I was lucky enough to bring along one of my daughters, Sofia, and she enjoyed the trip very much.

I have to say, the most difficult part of preparing this presentation was trying to figure out the Spanish version of common programming words and concepts. Part of the problem is that when I was learning how to program in Panama (when I was around 10-12 years old) all of my resources; magazines, books, etc where all in English. So I never knew that array is “arreglo”, that a developer is called a “desarrollador”, or what the corresponding word for loop is. It would be really nice if there was some type of resource out there with a table with all these terms, and maybe other languages. One challenge is that it seems not all of these words are “settled”. I noticed some people were still pretty comfortable with the English versions, while others used the Spanish ones exclusively. Also, there are a lot of emerging technologies and concepts in Computer Science which I think still don’t have Spanish translations. Pretty much a more difficult challenge than I expected.

javax-panama-jug.jpg

One more thing, JavaFX has changed a lot in the last year. When I did this presentation, I didn’t cover how much effort has gone into optimizing this technology or the new changes to the animation API (like the deprecated dur keyword). There is a preview JFX SDK coming out next month, and you can sign up for it at javafx.com. I didn’t attend JavaOne this year, so I don’t know all the details, but I’m hoping the SDK comes with some of the tooling that Sun has promised. Designer level tools are key to this technology’s success. I hope to make a blog post with a quick review of the SDK once it comes out.

Parkzone T-28 Trojan maiden flight, with video!

So last year around October I started to get into the RC airplane hobby, buying a simple 2 channel Firebird Commander 2. That plane was literally “gone with the wind” and I replaced it with a nice 3 channel Super Cub. The Super Cub is currently grounded because I have to glue the tail together. I’m hoping to fix that soon.

The latest plane I bought is a T-28 Trojan from Parkzone. It’s an RTF (Ready to Fly) model which means it comes with everything. The radio, Li-Po batteries, servos, ESC, even the AA batteries for the remote! You can get one of these for around $219.99, but if you have the rest of the parts already you can get the PNP (Plug and Play) model that comes without the the Li-Po battery and radio which goes around $159.99.

t28-trojan-schematic-fx.jpgT-28 Trojan (you can see an animated version of this image in the video)

(more…)

Bug of the day : Negative screen resolution

negative_screen_resolution.png

I’m not going to brag too much, but I may be the only user in the world with a monitor capable of -1x-1 screen resolution. Makes me feel special! Now if I could only find a game that supports this resolution, perhaps Duke Nukem Forever?

Organic Software

organic_software.jpg

An article on treehugger has an interview with Paul Kim, VP of marketing for the Mozilla Corporation. The Mozilla marketing folks have decided to coin the term “organic software” in order to raise awareness of some of the other benefits of Mozilla besides its list of features.

Here is Paul’s rationale for using this term:

PK: I should clarify that we’re not trying to create a new model. Instead, what we’re trying to do is to help new sets of people who know nothing about open source software quickly start to understand that Firefox is something different from the software they’re currently using to access the Web. ‘Organic software’ is a concept we came up with that we thought would resonate with end users in ways that ‘free software’ doesn’t. I think ‘free software’, at least in the US, doesn’t carry the same valence that ‘FLOSS‘ does in, say, Europe.

PK: I think for people in the open source movement, the term ‘organic’ is a lot clearer and immediately graspable. I think in the broader culture, and again I’m speaking of the US, the word ‘free’ gets filtered through a consumer lens. So yes, it’s a terminology issue for end users – trying to communicate clearly what practitioners already grok.

I appreciate what the Mozilla folks are trying to do here, but this whole campaign seems wrongheaded and actually misleading. The term organic is often associated with organic food, which is supposed to be healthier and friendlier to the environment. That is acknowledged in the article. Using this term causes more confusion in my mind, when I first read it, I thought the Mozilla developers were making a “green” commitment and trying to save the environment by changing some of their habits (perhaps turn off their computers once in a while?).

What they should do is keep educating the public on the term “open source” instead of confusing the issue further. Their uses further overloads the word “organic” and I can also see companies jumping on the bandwagon and redefining the whole definition (ex: A software company pledges to go “green” and calls their software organic).

The article itself is proof of what I’m saying. It is from a site dedicated to environmental/green issues, and this Mozilla announcement has nothing to do with that, except that they now use the word organic.

Sorry Mozilla, a vote down on this marketing strategy from me.

The maximum number of methods in a class

penguins.jpg

The other day I saw a Java interface with well over 300 methods (with no inheritance). It’s one of these interfaces that is a single point of entry into a system, and I’m partly to blame. Really didn’t think about how the API should scale, and now that there’s years and years of development depending on this interface, refactoring this single interface is not a trivial class (it would have to be broken up at least in a dozen smaller interfaces).

That got me wondering, what could be the maximum number of methods in a class. A quick google search yielded a forum discussion with the answer as defined in the JVM spec (2nd edition);

The number of methods that may be declared by a class or interface is limited to 65535 by the size of the methods_count item of the ClassFile structure (§4.1). Note that the value of the methods_count item of the ClassFile structure does not include methods that are inherited from superclasses or superinterfaces.

So even if you have 300 methods you are still very far away from ever hitting the limit. I wonder if there are any open source projects out there with classes with this number of methods. If you count inheritance, some of the AWT/Swing classes do have a large amount of methods, but there have to be more examples of this.

Anyways, my little piece of advise is to be forward thinking when designing APIs and make sure the API can scale as more functionality is added. It is always a good idea to think very modular and to group functionality in classes and packages that make sense.

Obviously, when others depend on your code, it never hurts to practice good design usability.