Windows 7 Libraries Trigger Eclipse Builds

15. April, 2011

If you’re on Windows 7, you may know this odd behavior: For some reason, Eclipse goes into a build frenzy. Every few seconds, it will rebuild the workspace.

The reason: You added your workspace to a Windows 7 Library and you have “Refresh Automatically” enabled.

My guess is that indexing of Windows 7 Libraries creates temporary files which make Eclipse believe something changed in the Workspace. Which causes a rebuild. Which makes Windows re-index the workspace.

Workaround: Remove your workspace from the library or disable “Refresh Automatically”.

See also: Bug 342931 – Windows 7 Libraries trigger rebuilds


Project Ceylon, Successor for Java?

14. April, 2011

A lot of languages compete for the king’s seat taken by Java. Most of them solve a lot of problem with Java but none of them really takes the win. As I say: “Why is there more than one database? Because they all suck.”

Now Ceylon enters the stage (slides from the presentation). The main goal is to clean up the SDK while keeping an eye on what was good and what was bad with Java.

I’ve had my share with programming languages. On a scale between 1 and 10 (best), Python gets 9 from me. Java gets 6. Scala gets 5.

So how does Ceylon fare? At first glance, I’d give it a 7.

Pros:

  • Compact syntax. No packages, no classes.
  • I like to idea of the recursive block scope which gets rid of the very limited public/private and the ill fated package public. My only concern is how you can declare friends to something at a nested scope (for example for tests).
  • Short syntax to avoid NPEs. The approach allows to catch null pointers when they are assigned instead of when they are used. This means: If you find a bug, you’ll actually know what to do about it.
  • No new keyword! I really never understood why they added that.
  • No checked exceptions. No one got them right, anyway.
  • Just one constructor per class. I never use them anyway, and the new named argument syntax solves many of the existing problems.
  • Method references

Cons:

  • = vs. :=. Come on. In 2011, I still need to tell the compiler something it already knows? Also, looking at my code, I’ll probably use := a lot. So that means extra effort for me. Bad. Not everyone’s brain is wired for immutables.
  • “if (exists foo)” to check for null values. If I already have to use a special syntax to mark something as “can be null”, why do I need to mention that again in a condition? What’s wrong with “if(name)”?

Things that leave me puzzled:

  • local vs shared. I understand that the compiler can’t infer types for shared references in a single pass but who cares? The compiler is a tool that has to make me more productive. If the compiler needs two or three passes to resolve dangling type reference, so what?
  • How is the module system working? How do you bundle types in a container to keep the namespace clean?

Sony vs. The World 1:0 …?

13. April, 2011

So Georg Hotz “caved in” and accepted to sign a settlement agreement (good article). Those quotes aren’t accidental; being accused in a law-suit does odd things to your life and most of them are unpleasant. Being famous isn’t as great as MTV wants you to believe. Ever wondered why all those famous persons are either weird, drug addicts or die early? There might be a connection.

As for Georg, one hell is over and now he gets raped by all his supporters. It’ll wash over, trust me.

So did Sony win? No. Win would mean to prove in court that it’s illegal to decrypt and modify the firmware of the PS3. Which they avoided. If you’re a multi-billion dollar company and someone/something is a threat to one of your most valuable products (my impression after reading what SCEA said during the lawsuit), wouldn’t you want to make sure this issue is fixed once and for all? For some reason, Sony didn’t.

It’s probably because they didn’t want to harm poor Georg.

*hilarious laughter*

Oh man, I’m killing myself. So. Sony caved, Georg won: He’s not going to jail, he isn’t fined, he isn’t prosecuted. He’s a free man. Well, mostly.

He isn’t allowed to do illegal things with “any SONY PRODUCT” (their yelling). Oookaaayy… what exactly is illegal? Wasn’t that one important point that the lawsuit should have settled?

I mean in Europe, it’s legal to reverse engineer any software if you need that knowledge to make it cooperate with some other software (“make it interoperable”) and if you can’t get that knowledge some other way (competitor wants to keep you out of the market, producer is no longer around, etc.). You must not spread the reverse engineered code but you could, for example, write a patch or an installer with it.

And Georg isn’t allowed to talk about the settlement which is confidential. I don’t need to understand this, I guess, but I’m sure he would rather forget this sad story and move on.

So. One guy fixed. I’m sure no other smart person on the planet is going to try this again. Ever.

And one prediction: It seems that Georg has some money left. Instead of wasting it on his own case (which Sony might have dragged out for a decade, for example) he might have invested it in the other lawsuit where chances to win might be much higher – especially with all the notes he got from his case.


Maven Tools for Eclipse: Patching POMs

11. April, 2011

I’ve added a new feature to my Maven tools for Eclipse: Applying patches to POMs.

This is a first step towards solving issues like this one: Bug 342046 – Invalid third party dependencies in Mavenized BIRT plugins

I’m not 100% happy with the result, though. Currently, the patch overwrites the original code. I think it would be much better if it created a profile instead. This way, you could see the original code and it would be simple to switch between different solutions for a problem in a POM.

The two standard problems are:

  • Bad version (no version, version range or wrong version)
  • Dependency name

The latter is introduced by the fact that Eclipse projects need to pull dependencies via Project Orbit. Orbit often renames dependencies so there is a naming conflict if you pull your dependencies from Maven Central. So we need a way to say “I’m using Orbit” and “I want Maven Central”.


Glorious Sunrise in Minecraft

7. April, 2011

I’m working on my crystal tower. While roaming the country, I stumbled over this cliff (Minecraft Beta 1.4):


Aspiring Writer

6. April, 2011

Old but still great:

There was once a young man who, in his youth, professed his desire to become a great writer. When asked to define “great” he said, “I want to write stuff that the whole world will read, stuff that people will react to on a truly emotional level. Stuff that will make them scream, cry, and howl in pain and anger!”He now works for Microsoft, writing error messages.

Source: Microsoft jokes

 


Sound Problems on Linux

5. April, 2011

Sound on Linux was pretty stable but then came PulseAudio sigh. One of the major problems is that some programs don’t try to look for the PulseAudio server. Instead, they try to lock the sound devices under /dev. Flash is one of them.

But there is a solution: Create a file “$HOME/.asoundrc” with this content:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

That redirects all clients which use ALSA to the PulseAudio server and everyone is happy.


Too Much Time on Your Hands? Try Minecraft

28. March, 2011

I’m addicted to a new game: Minecraft.

It’s a bit like Lego: Everything is a brick, simple rules, no documentation. Unlike Lego, you got lots of bricks. Lots. The levels are huge.

I actually managed to get lost once. Fortunately, I built my house on the highest mountain that I could find (even above the cloud layer). Right now, I’m turning the mountain into a Swiss cheese 🙂

Besides carving your dreams out of a huge pile of rock, you can create stuff in a “crafting area” in your inventory. So far, I managed to craft shovels, hoes, picks, axes, stone, a bucket and a mine shaft trolley.

What can I do with leather?

Nah, don’t tell me, I’ll figure it out myself.


What’s Software Worth?

26. March, 2011
Peter Sunde (TPB)

Image via Wikipedia

I’m back from a presentation by Peter Sunde, one of the founders of Flattr and The Pirate Bay, in Zurich about his new start up Flattr. The audience was really curious why people would pay money for something that they could get for free. I like Sunde’s answer: We also give to charity even though we don’t have to.

So is the future of Software charity? Peter says: It’s one option among many others. In the future, people will have to use all the channels they can to generate income.

I agree. Let’s ask us a few questions around “What’s a piece of software worth …”

  1. … if you download it from the internet and never user or install it.
  2. … if you download it from the internet, install it, but never use it.
  3. … if you download it from the internet, install it, and use it once.
  4. … if you download it from the internet, install it, and use it several times.
  5. … if you download it from the internet, install it, and use it all the time, making a living or even a fortune from it.

If you try to answer these seriously, you’ll quickly run into missing information: What kind of software are we talking here? An OS? Proprietary or Open source? Is that from the point of view of a user or a producer?

When I’m a user, the answers are: 0, 0, X, Y, Z. X can be 0 for the “I used it once and it didn’t work for me”. Or it could saved my life in which case I’d pay a lot more than asked on the price tag.

Y is more complicated. It can be 0 for open source or public domain software. Or it can be 0 because I love the software, and I’d like to buy it but I can’t afford it.

For Z, it becomes hard to come up with an excuse. Or rather any reason to assign 0 to Z is considered an excuse before we even listen. But how about this: In some third world countries, you can make a living from a few bucks per week. So you would need more than 100 years to earn enough money before you can afford to buy the software that allows you to earn the money to buy it. How just can a price be?

If you produce software, the answers are: X, X, X, X, X where X is the number on the price tag plus the cost for the lawyer and the prosecution plus a hefty sum to make sure you lying scoundrel won’t ever have enough money to pay for an Internet connection in your whole life!

But the numbers can even become negative. If you’re a company and you want to kick-start sales, you might offer a free version. If someone doesn’t like it, you not only lost one customer, you lost all his friends, too. And everyone who reads his blog.

Notice the gap? Why do I have to pay for software before I can give it a try? Yeah, shareware works that way but Maya doesn’t. I can’t return software after I bought it because I might have copied it. So when I return software, I must be a criminal. Apparently, “innocent until proven guilty” doesn’t get a lot of love in some parts of the world. Dictatorships, regulars’ tables, software companies, record companies, movie rentals, game sellers.

Now comes Flattr and changes the game. Instead of giving a lot of money to the middle men, it gives money directly to the artist (-10% which is far better than any other offer you can get today).

For some reason, the middle men are upset.

Odd. “Concerned people” were upset when the written letter replaced the face-to-face meetings. And then when the telephone replaced the letter. And when both were replaced by email. And now by mobile phones. Evolution happens. It’s like a glacier: Slow, overwhelming, unstoppable.

So laws are installed. I’m not sure evolution cares much for laws; I hear pupils today don’t have the attention span anymore to read a whole word at once. Good luck suing them. I’m sure after they were found guilty, they will start buying the products as they should have in the first place.

How does Flattr fit into this picture? First of all, Flattr isn’t built on the assumption that there is a God-given right that people have to buy what I produce. Instead, it’s built on love. Love? Doesn’t sound like a very reliable basis.

But answer this: How do you get along with all the people in your street? Do you hate them? Apparently not because then, you’d move. So we do feel for each other, we just stopped the hugging and kissing – it just takes too much time. A nod must suffice.

Do you see teenagers screaming for their idols? While it may look ridiculous, it’s a very basic human emotion: Enthusiasm. If I like something, I’ll go to great lengths.

So teens buy all the CDs, the books, the magazines, the T-shirts, tickets, you name it. They actually pay a lot of money for something (or someone) they love.

It seems the problem is not the money, it’s the “love” part. If you love computer games and you’re ripped off by a company, you stop buying their games. If you love music but the record industry insists on selling songs by album (so you get 5 good songs), you stop buying CDs. If you love books and you just bought #3 of 4 and you go to Amazon just to find that you can by the first and the fourth but the second is out of print, so sorry.

Flattr works differently. You go somewhere on the ‘Net, see something. You don’t like it, you move on. Nothing gained, nothing lost. Specifically, the artist didn’t get your eternal hatred and you didn’t waste your time. If that had been a CD, you’d been angry for your lost money. So it’s a win over the current situation already.

But you like what you saw. One click later, a little bit of money trickled from you to the creator. It’s not much, often not enough to make a living. But it’s also a message: Someone liked this. That can be worth more than any amount of money.

Now people don’t get rich with this. Today. That doesn’t mean they won’t get enough to afford living from it tomorrow. Or even get rich. And there will always be more consumers than producers. And time is on your side.

If you write a book, that book will be on sale for a decade if it’s a huge success. Only how likely is that? A lot of books are already rare after 3 years. It’s just not economical for publishers to have every title in stock. But the Internet doesn’t forget. This blog post will still be available in ten years. Maybe it will still be relevant (although I hope not). The Flattr button to the right will still be there.

I will make money from this post forever. Even if I only make a penny a day from this, it’ll be a fortune one day. And nothing stops me to write another post.

One word of warning, though: Don’t expect the content industry to embrace this change. Why should they? They are already happy and content. For them, change only means less income or less power which means less income. 50-story skyscrapers don’t come for free. In the current game, they have little to win and everything to lose. Keep that in mind when you read another story of some company suing someone for being curious or social.

PS: I’m a professional software developer. I don’t get paid for my knowledge but for my time.


Eclipse 3.6.2 Artifacts for Maven 2

20. March, 2011
Apache Maven logo.

Image via Wikipedia

Update: The project has its own web site, now.

Two days ago, I told you about Project Dash and my new tools for it. Well, we did run them over the weekend and import a lot of stuff from Eclipse 3.6.2 into a brand new testing Maven 2 repository.

So if you want to use Eclipse bundles in Maven 2 for your own projects (SWT, EMF, even BIRT), have a look and let me know:

  • Did I miss anything?
  • Is anything wrong? Version numbers, names, dependencies, optional dependencies.
  • Any other comments?

Making the world a better place, one line of code at a time! 🙂

The tools are here.

New project home page: Maven Tools 4 Eclipse