How Hollywood Loses Money

29. June, 2011

Apparently, making big feature films is a risky business. Let’s take unsuccessful movies like “Harry Potter and The Order of the Phoenix.”

“Wait a minute,” I hear you say, “Potter is a loss?”

Sure. It grossed only $1B so far. What a sad failure! Now, the corporate entity responsible for this blunder is $167M in the reds. Which means that no one in the “net-participation” list will see any money.

Cory Doctorow posted more details in his blog.

Apparently, this is just an example of creative money moving. All participants in the game are parts of Warner Bros. For example, the movie needs advertisement. Luckily, they have a subsidiary for that. But, oh bother, they are expensive. So what, we only want the best. So money goes round and round and round until everyone is spin dizzy.

Think again when the content industry blames losses on “piracy.”

But wait … isn’t that … yes … it kinda is piracy! Just not by the people at which Hollywood is pointing.

What was the old saying? “When you point your finger at someone, three fingers are pointing back at you.” So true.


29. June, 2011

The constant NAMED_BUILDER_SCOPE has been moved from org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider to org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.

Software Patents – More Harm Than Help

28. June, 2011

James Bessen did another study which shows again that software patents harm more than they help. Abstract:

This report examines changes in the patenting behavior of the software industry since the 1990s. It finds that most software firms still do not patent, most software patents are obtained by a few large firms in the software industry or in other industries, and the risk of litigation from software patents continues to increase dramatically. Given these findings, it is hard to conclude that software patents have provided a net social benefit in the software industry.

“A Generation of Software Patents” by James E. Bessen


Missing m2e?

28. June, 2011

If you downloaded the JEE edition of Eclipse 3.7, you’ll find that m2eclipse is missing.

Don’t worry, it’s part of the Indigo release train. Just install it manually from the Indigo p2 repository:

Links: Oh my god, but where is m2e?



UI Editor With Preview

28. June, 2011

One of the big problems with WYSIWYG editors is that they don’t really cut it. They look good in the beginning but as your experience grows, the editor tends to get in your way of getting things done.

Stackoverflow used an interesting solution: There is a wiki markup editor and a preview which is updated as you type. So you get the best of both worlds: You can see your intention and the result at the same time.

Riena is now following along the same path: They created a preview which updates when you save your UI code. That way, you can quickly see the effect of your changes without stumbling over tedious property editors all the time.

What’s Wrong With XA/Two Phase Commit

27. June, 2011

To recap, two phase commit (XA) means that you have two or more systems which take part in a single transaction. The first phase ask all system “are you 100% sure that you can commit?” (prepare) and the second phase is the actual commit.

Of course, the answer to the first question can be a lie. You can never be 100% sure that a commit will go through. The system might crash in the middle of the actual commit or the network my break between prepare and commit. Doom.

So XA doesn’t when it should. How can you solve this?

By using a less brittle protocol. Imagine you want to copy data from database A to B. You could use XA and clean up the mess every once in a while.

Or you could add a field to A which says “this has been copied to B” and when inserting data into B, you must ignore data that is already there. Here is the pseudo code:

  1. Create the connections
  2. Find all rows in A that don’t have the flag set
  3. Read all the rows and insert them into B. If a row already exists, skip it.
  4. Set the flags for all copied rows in A.

Note: You can’t use MAX(ID) or MAX(TIMESTAMP) here. Why not? Imagine:

  1. TX1 is created in A and a row is inserted. MAX(ID) == 2
  2. TX2 is created in A and a row is inserted. MAX(ID) == 3! At this time, you can’t read WHERE ID == 2 but you can conclude from the gap in the ID values that it will soon exist.
  3. TX2 is committed.
  4. TX3 is created to copy the data to B. TX1 is still running! MAX(ID) == 3 but row 2 will not be copied!
  5. TX3 ends without row 2. Since MAX(ID) is now 3, it won’t ever be copied.

If you’d rather avoid a “to copy” or “has been copied” flag in each row, create a “to transfer” table which contains IDs of the rows to copy. In step #4, delete the rows that have to be copied.


  1. Resilient. If the transfer fails in the middle for any reason, it can pick up where it left of. In the worst case, a lot of data will be copied again but data will never be lost. In the usual case, no data will be copied twice.
  2. If you make a mistake, chances are that it won’t have matter much. Say you forget to set the “has been copied” flag. Well, for every transfer, too much data will be copied but it will still work. Slower than expected but you won’t lose data. The database will always be consistent!
  3. Say something goes wrong in B and you need to transfer the data again. With my approach, you just reset the flags. It doesn’t matter if you can’t say for sure which flags to reset. If in doubt, reset all of them. The algorithm will heal itself.
  4. You can copy the data in chunk sizes of your choice. It doesn’t matter if you copy everything in one go or in blocks of 1’000 rows or row by row.
  5. It’s a simple algorithm, so it will be quick to implement and there is only a small chance for bugs. Even if there is a bug, in most cases, you will be able to resolve the situation with one or two simple SQL queries.

Disadvantages:  The XA sales guy won’t make a buck from it. Expect some resistance.


Jazzon 2011, Day 3

26. June, 2011

The day started with a keynote from a M$ guy:

Jazzon 2011, Day 3 – How to become a famous author and publish a book: Using Freemium Content with a Profit – Pouline Middleton

26. June, 2011

How to become a famous author and publish a book: Using Freemium Content with a Profit – Pouline Middleton

Pouline showed us the obstacles in which you run when you try to publish your own book. It confirmed my own conclusions: Unless your name is Stephen King or J. K. Rowling, publishers aren’t really for you. They most often want to own your work but selling it is more of a second thought.

Instead of using the common channels to sell her book, she chose a freemium model. You can read the book as blog posts, by email or buy it from herself (she eventually founded her own publishing company Fiction Works.

The fun (or sad) part is that she made much more money this way than she could have hoped for if she had used the traditional channels.

Here is an example. Say you have 1’000 die hard fans (not so hard to come by when the Internet has almost 1 billion users). Each of them buys from you for $100. Again not so much. That gives you $100’000.

Jazzon 2011, Day 3 – Web Security: Develop. Penetrate. Smile. – Matt Raible

26. June, 2011

Web Security: Develop. Penetrate. Smile. – Matt Raible

Matt demonstrated how to “implement authentication in your Java web applications using Spring Security, Apache Shiro and good ol’ Java EE Container Manager Authentication. You’ll also learn how to secure your REST API with OAuth and do it all securely with SSL.”

Nothing spectacular but the usual mix of nice code and how to avoid the most common pitfalls.

Some things to remember: Firewalls don’t work, not even if they’re stateful and inspect the HTTP stream.

If you’re interested in web app security, you should have a look at OWASP. Right now, there are a lot of non-developers there. What we all desperately need is web frameworks which make it more simple to configure a secure web app correctly than configuring a normal web app.


Jazzon 2011, Day 3 – Turning up the heat – techniques for self-organizing teams – Joseph Pelrine

26. June, 2011

Turning up the heat – techniques for self-organizing teams – Joseph Pelrine

Joseph reminded us that teams always organize themselves, if we want it or not. Those social forces are pretty strong which is why agile methods have given up to fight with them. Instead, they try to prevent the worst and/or alert you early of problems.

The most important three words of the talk: “Leave them alone.”

But the result is probably not going to be the way you want. Also, team building this way can take a long time. Or it can be surprisingly quick. It can take as little as 2 seconds for a group of strangers to clap in unison (as he demonstrated in the presentation using the audience). One reason why this works is because we wanted it to happen. If part of the team refuses to be part of it, you’re in trouble.

When we say “self-organizing,” who or what is this “self” really? It’s a “system” composed of a group of people and their environment. This simple fact is an often overlooked. Renovating a shabby workplace can be better for quality than a raise or bonus. Listening to people and acting on their input is more effective than bringing in external consultant. Usually, they are brought in to make the “act upon” part more easy.

Every such system defines its own rules and responsibilities. Without any regard to what people want or what happens to them. Martyr anyone? The problem: We want people to do what we want without us telling them. Only if you ignore (part of) the system, you will fail because the forces in the system can be tremendous. Again, agile lists methods that often work but you should still be aware that there are reasons why changes to the system fail.

For example, Art Kleiner came up with the Core Group Theory: For every system, there will be a small group of people who control the system. Dictator in a dictatorship. If the boss doesn’t take control, the system still enforces that the “underlings” follow – they will make fun of the boss but they will still follow orders. Most often to the letter. Financial crisis: Small group of greedy people almost ruined the world’s economy.

One important point is that you need energy from the outside if the system’s equilibrium isn’t what you want it to be. Say your developers aren’t testing enough. You need some incentive for them. This external energy is consumed but it doesn’t necessarily alter the system permanently.  For that to happen, you must look at the system (people + environment) and find a way to make sure it’s in the system’s best interest to change (and not only in the people’s best interest!)

How can you do that? You turn up the “stress” or “heat.” Note that too little heat and nothing will happen. The resistance of the system will simply swallow your efforts. Too much heat and the system will retaliate or overreact. So it need to be applied with care.

One way is to use the physical formula PV = nRT which means pressure * volume = temperature. You can increase the temperature (the heat) by increasing the pressure (add more tasks) or by reducing the time to complete the tasks.

Another is to look at the system as a star with five tips: Attractors (like bonuses), boundaries (who is on the team, who isn’t), identities (who was which role/responsibility), diversity (homogeneous systems tend to inbreed) and environment.

Which means you can try these things:

  • Offer a price like a holiday or free pizza for all (attractor)
  • Add/remove people to/from the team like mixing the testers with the development team.
  • Move a difficult customer to a different support guy
  • Bring in new blood and ideas
  • Get them new computers, remove the telephones so they don’t get interrupted every 11 minutes.

Remember: Changes are like really long hikes; one step at a time.


%d bloggers like this: