JVM serialization ‘unexpected behavior’

Hello all,

One of my personal projects is a web site (jugandoenprimera.com) developed with Wicket framework (wicket.apache.org). This framework intensively uses the mechanism of serialization implemented in the java virtual machine to preserve pages’ state across requests.

Java also provides a keyword named transient that can be applied to an attribute and it implies that this field should not be taken into account when serialization occurs (as if it were not there).

For example:

public class MyClass {
private transient int myField = -1;
}

It turned out that I didn’t need a field to be serialized so I marked it as transient. Also, that field had an inline initialization (like in the above example).

Well, the problem raised when hydration process occurred. I expected that after hydration the value of myField were -1. But this doesn’t work like that. The value set to the transient attributes is the default for that type (0 for integers, bytes, longs, false for booleans, null for references).

This doesn’t look like as an expected behavior but led me to a hard-to-find bug.

See ya.

Deployment week

Hello all,

I wanted to announce that @legilioli and I released the third beta of Parallel Editor Eclipse Plugin (0.0.1.beta3). It fixes a lot of bugs (nah, only three) and is ready for installation at https://github.com/maurociancio/parallel-editor. Give it a try!

Also, yesterday I’ve deployed a wicket application that I’ve been working on for a few months. It’s running at http://jugandoenprimera.com.

That’s all.

Thanks.

Parallel Editor is out!

Hello all,

In the last three months @legilioli and I were developing a plugin for Eclipse that provides real-time collaboration over the internet. It’s developed using Scala and it works really smoothly.

We’re very proud to announce… holy sh*t. I’ve read this sentence too much times (see here for an example), so I’ll start different.

You can try it for free by visiting this site: https://github.com/maurociancio/parallel-editor. You can follow the instructions in order to get it working in your Eclipse installation.

Please, bear in mind that is a beta and isn’t bug free. So feedback is appreciated.

We’ll add some screenshots soon.

Thanks.

Git fan

Hello everyone,

I had been working with svn in a few academic projects and I had found it very useful. But, when I started a freelance job I came across with some problems.

The main one, I couldn’t have mirrors of my main repository. At that time, I googled and I didn’t find a straightforward solution.

The solution I’ve found was changing my scm from svn to git. And I loved it.

Here I’m going to tell you about a command that blew up my head:

The most automagic command (imho) is the git bisect: it can perform a binary search in order to find a commit that introduced a bug. When I read the manual I realized it was very simple. You tell git which commit is the good commit (the one without the bug) and which is the bad commit (the one with the bug). And the magic begins.

Git will check out several commit into your working copy and in every one of these will ask you if the bug is present. You do whatever you need to determine if the bug is in this commit or not (eg: run the automated tests suit). According to the answer you give to git, it will select the half commit list that introduced the bug. When git has no more commits to test, it will tell you which commit is the bad one.

This command saved me hours of debugging. And that’s why I’ve become a git fan.

See you.

Hello world!

Welcome to maurociancio’s blog!

Here I’ll post some thoughts or ideas that I have in my mind.

I’ll be writing in English in order to practice it, but this isn’t my native language. My native language is Spanish, so if you find a mistake please tell me. I will fix it as soon as possible.

I hope to write something usefull.

Stay tuned!
Thanks you!