Friday, September 4, 2009

HtmlUnit 2.6 is out

It is always a pleasure to announce a new release of HtmlUnit.

The main enhancements of this release:

  • Use cache for all kinds of (cacheable) content

  • Fix many issues with (de)serialization

  • Add a mechanism to save complete page along with images

  • Add support for Proxy Auto-Config

  • Better support for XHTML pages

  • And as usual, various bug fixes

You can download it here, enjoy!

Sunday, August 30, 2009

The Pontiac that was Allergic to Vanilla Ice Cream

For the engineers among us who understand that the obvious is not always the solution, and that the facts, no matter how implausible, are still the facts ...

A complaint was received by the Pontiac Division of General Motors:
"This is the second time I have written you, and I don't blame you for not answering me, because I kind of sounded crazy, but it is a fact that we have a tradition in our family of ice cream for dessert after dinner each night. But the kind of ice cream varies so, every night, after we've eaten, the whole family votes on which kind of ice cream we should have and I drive down to the store to get it. It's also a fact that I recently purchased a new Pontiac and since then my trips to the store have created a problem. You see, every time I buy vanilla ice cream, when I start back from the store my car won't start. If I get any other kind of ice cream, the car starts just fine. I want you to know I'm serious about this question, no matter how silly it sounds: 'What is there about a Pontiac that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?'"

The Pontiac President was understandably skeptical about the letter, but sent an engineer to check it out anyway. The latter was surprised to be greeted by a successful, obviously well-educated man in a fine neighborhood. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the ice cream store. It was vanilla ice cream that night and, sure enough, after they came back to the car, it wouldn't start.

The engineer returned for three more nights. The first night, the man got chocolate. The car started. The second night, he got strawberry. The car started. The third night he ordered vanilla. The car failed to start.

Now the engineer, being a logical man, refused to believe that this man's car was allergic to vanilla ice cream. He arranged, therefore, to continue his visits for as long as it took to solve the problem. And toward this end he began to take notes: he jotted down all sorts of data, time of day, type of gas used, time to drive back and forth, etc.

In a short time, he had a clue: the man took less time to buy vanilla than any other flavor. Why? The answer was in the layout of the store.

Vanilla, being the most popular flavor, was in a separate case at the front of the store for quick pickup. All the other flavors were kept in the back of the store at a different counter where it took considerably longer to find the flavor and get checked out.

Now the question for the engineer was why the car wouldn't start when it took less time. Once time became the problem -- not the vanilla ice cream -- the engineer quickly came up with the answer: vapor lock. It was happening every night, but the extra time taken to get the other flavors allowed the engine to cool down sufficiently to start. When the man got vanilla, the engine was still too hot for the vapor lock to dissipate.

Moral of the story: even insane-looking problems are sometimes real.

Monday, July 20, 2009

Eclipse Galileo Property Testers complete list

During extending Eclipse, you may encounter Property Testers, for example in Launch shortcuts extension point.

I wanted to have a list of all Property Testers already defined, in order not to reinvent the wheel. A small program was made to list all testers found in a specified Eclipse folder.

For reference, Galileo Property Testers are:

buildpathReference, contextlaunch, extendsClass, extendsInterface, hasMethod, hasMethodWithAnnotation, hasProjectNature, hasTypeWithAnnotation, isContainer, isPackageFragment, isPackageFragmentRoot, matchesContentType, projectNature, areBreakpointTypesAvailable, bundleState, canCreateWatchExpression, canLaunchAsJUnit, consoleTypeTest, contentGenerator, contentTypeId, done, editable, extension, fileMarker, getAvailableBreakpointType, getModelIdentifier, hasFilters, hasGroups, hasMain, hasTypeOnClasspath, inArchive, inExternalArchive, inSourceFolder, isActivityEnabled, isBundleInstalled, isCategoryEnabled, isInJavaProject, isInJavaProjectWithNature, isManaged, isMultiStrata, isOnClasspath, isPerspectiveOpen, isTerminatedOrDisconnected, isTest, languageName, launchable, matchesPattern, message, name, open, path, persistentProperty, priority, processTypeTest, product, projectNature, projectOption, projectPersistentProperty, projectSessionProperty, quickFix, readOnly, refactoringPropertiesEnabled, resourceType, reuseEditor, sessionProperty, severity, superType, and type.

You can also list the associated namespace, type, class, and jar or folder location using the snippet here.

Wednesday, June 24, 2009

Eclipse Galileo is out

Eclipse team releases at committed date, always! This year, Eclipse 3.5 version contains 33 projects.

As you would expect, it contains various enhancements and new features, I think below are the most important ones:
  • PHP Package: another major language added to the constellations

  • Memory Analyser: a java heap analyzer to easily find memory leaks

  • Xtext: you define your own 'language', and a parser and IDE editor are created for you


Enjoy the best IDE here.

Sunday, June 21, 2009

HtmlUnit now supports Proxy Auto-Config

A previously requested feature, Proxy Auto-Config, is now supported in the latest snapshot of HtmlUnit.

As testing requires proxy server with related configurations, the team appreciates testing the feature in the wild.

You can get latest snapshot from here.

The typical usage is webClient.getProxyConfig().setProxyAutoConfigUrl("http://proxy_auto_config.url");

As always, enjoy!

Thursday, June 11, 2009

2009 JavaOne HtmlUnit technical session online content

2009 JavaOne conference website now has the online version of the technical session "HtmlUnit: An Efficient Approach to Testing Web Applications TS-4238", which was presented by Daniel Gredler and I.

You can view the PDF presentation here.

Saturday, June 6, 2009

James Gosling's Toy Show

As JavaOne has finished, I guess the best general session was the last one. James Gosling really brought some nice ideas:

  • Reading the data from Wii Remote camera and control projector image accordingly

  • Open source microfinance web application that helps the needy in undeveloped countries (mifos.org)

  • Seriously agressive image analysis, that has medical usage

  • Football robots done by high school teams

  • A printer application that automatically marks the answer sheets, done by two Hungarian students

  • Satellite stations monitoring

  • Other cool stuff


If you haven't already, watch this.

Tuesday, June 2, 2009

A Mother's Letter

Dear Son,

        Just a few lines to let you know that I am still alive. I am writing this slowly because I know you can't read fast. You won't know the house when you come home, we've moved.

        About your father, he has got a lovely new job. He has 500 men under him, he cuts grass at the cemetery. Your sister Mary had a baby this morning. I haven't found out yet whether it's a boy or a girl, so I don't know if you're an aunt or an uncle.

        I went to the doctor's on Thursday and your father came with me. The doctor put a small tube in my mouth and told me not to talk for 10 minutes. Your father offered to buy it from him.

        Your uncle Patrick drowned last week in a vat of Irish whiskey at the Dublin brewery. Some of his workmates tried to save him but he fought them off bravely. They cremated him and it took 3 days to put the fire out.

        It only rained twice this week, first for 3 days then for 4 days. We had a letter from the undertaker. He said that if the last payment on your grandmother's plot wasn't paid in 7 days, up she comes.


Your loving mother


P.S. I was going to send you 5 pounds, but I have already sealed the envelope.

Wednesday, May 27, 2009

Microsoft First Keynote in JavaOne

Interesting to know that Microsoft will have a general session for the first time in JavaOne, hope this will break the ice between Java and .NET.

I won't definitely miss the session ;-)

More details are here.

Monday, May 25, 2009

Don't copy if you can't paste!

A popular motivational speaker was entertaining his audience.
He Said: "The best years of my life were spent in the arms of a woman who wasn't my wife!" The audience was in silence and shock. The speaker added: "And that woman was my mother!"
Laughter and applause.

A week later, a top manager trained by the motivational speaker tried to crack this very effective joke at home. He was a bit foggy after a drink. He said loudly to his wife who was preparing dinner, "The greatest years of my life were spent in the arms of a woman who was not my wife!"

The wife went; "ah!" with shock and rage. Standing there for 20 seconds trying to recall the second half of the joke, the manager finally blurted out "....and I can't remember who she was!"

By the time the manager regained his consciousness, he was on a hospital bed nursing burns from boiling water.

Moral of the story:
Don't copy if you can't paste!

Saturday, April 25, 2009

Who said fitness isn't fun?

After 10 years, the only thing I strongly recall from the study of the physiology of the respiratory system, is that people are classified into two groups: athlete and non-athlete. It was so repeated whenever a function of that system is discussed.

However, even if you know, it doesn't mean you will comply. Sedentary lifestyle is one of the main points I personally suffered from, and doing exercise outdoors or indoors isn't much fun.

That was till someone brought a game to play to one of the company's social activities; there is no joystick, you ARE the control of the game; if you want to move forward, you actually have to bend forward, and so on.

One day later, I was configuring the game at home, and I was amazed by how the remote control works, it is like no other: when you actually move the remote to the right, it is like PC mouse that works on-air!

One week later, I am very pleased that you can play Yoga, Balance Games, and Aerobics till you are physically tired, not because you spend too much time staring at the monitor and playing with the traditional joystick.

Wii Fit, I love you!

Wednesday, April 22, 2009

HtmlUnit 2.5 is out

It is a pleasure to announce the new release of HtmlUnit, the GUI-Less java browser, which adds to the continuous improvements there.

The main enhancements of this release:

You can download it here, enjoy!

Wednesday, April 8, 2009

Java on Google App Engine

Exciting news: Google just announced the Java support for App Engine (in addition to Python), now you can host it in Google servers.

Java support is not very complete, but it is a good time to start building your applications.

You can read more information at App Engine Blog.