Extremely complex queries in BIRT reports

30. September, 2010

Sometimes, SQL just isn’t enough. What do you do when you just can’t get the SQL to run in under an hour while a little piece of Java code does the same query in a few seconds? Put the result into a report table and then run the report against that table.


Google Relaunches Instantiations Developer Tools

29. September, 2010
Google Web Toolkit

Image via Wikipedia

From the website:

In early August, Google acquired Instantiations, a company known for its focus on Eclipse Java developer tools, including GWT Designer. We’re happy to announce today that we’re relaunching the following former Instantiations products under the Google name and making them available to all developers at no charge:

  • GWT Designer
    Powerful Eclipse-based development tools that enable Java developers to quickly create Ajax user interfaces using Google Web Toolkit (GWT)
  • CodePro AnalytiX
    Comprehensive automated software code quality and security analysis tools to improve software quality, reliability, and maintainability
  • WindowBuilder Pro
    Java graphical user interface designer for Swing, SWT, GWT, RCP, and XWT UI frameworks
  • WindowTester Pro
    Test GUI interactions within Java client rich applications for the SWT and Swing UI frameworks

I played a bit with CodePro. The tools look promising even through there were some glitches, namely:

  1. The JUnit editor looks cool but the table with the current unit results often hangs.
  2. It was more complicated than I liked to generate test cases
  3. I couldn’t get the code coverage tool to work
  4. The dependency works but didn’t play with it long enough to say for sure how useful it is
  5. The code analysis shows a lot of numbers but the workflow is clumsy. For example, it says that something has a cyclomatic complexity of 16 but I couldn’t find out what and where.

StarCraft 2 on Linux: Sound problems

28. September, 2010
Wine Logo

WINE Logo

If you have sound issues in StarCraft 2 on Linux, open WINE config (winecfg) and select the “Audio” tab. Make sure that the correct sound driver is selected (use “Test sound”) and then switch “Hardware Acceleration” near the bottom to “Emulation”.


Thoughts on documentation

28. September, 2010

Software developers believe that documentation is just another way to say code is buggy. The reasoning is like this: If the code was easy to understand and/or did what you expected, then why document it?

While this is true at the level of a code line, there should be some documentation explaining your overall view of the world.

Next, we have end user documentation. End users have no idea how software works, they just know they have to get some work done. Stat. For them, good documentation can be the difference between a nice day and weeks of overtime.

In “The Value of Documentation in Open Source“,  Chris Aniszczyk explains why this is especially important for Open Source.  Good points.

Related articles:


LOL of the day

28. September, 2010

From programmers.stackexchange.com:

Load a picture of yourself in IE6. Print screen and frame it. Give it to your grandkids to remind them that, no matter how difficult things get, they’ve got it easy compared to what you had to deal with.


Google Transparency Report

24. September, 2010

Google now shows usage data by country and service and how many requests it got from where to take items out of their search indexes, blogs, YouTube, etc.


Where do Most US Presidents Come From?

18. September, 2010

Every wondered where US Presidents come from (usually)? Freebase Parallax can answer that. Watch the video to get an idea. I was surprised that most presidents are from the East Coast.


When inheritance is not enough

16. September, 2010

Ever had the problem that inheritance just wasn’t enough? For example in this case:

package core;
public class Main {
    public static void main(String[] args) {
        sayHello();
    }
    private static void sayHello() {
        System.out.println("Hello World!");
    }
}

Say you need to override sayHello(). What are your options?

You could edit the source. But if you only have the bytecode?

You could decompile the bytecode. But what if you need the same change in several places?

Eventually, you’ll have to use copy more or less code around because Java just doesn’t offer enough ways to combine code. The solution? Object Teams. See this article for a solution of the problem above.

What is Object Teams?

In a nutshell, a team is a group of players which have roles. Usually, the roles are distributed by way of the strengths of your players. Slow and sturdy ones will be defense. Quick and agile players will attack. The calm ones will do tactics.

OT/J (the Java implementation of Object Teams) does just that: You define teams and roles and then apply those to existing Java code. Let’s take the Observer pattern (you know that design patterns are workarounds for flaws in the language’s design, yes?).

The problem with this pattern is that you can’t apply it retroactively. You must modify the involved classes to support the pattern even if they couldn’t care less. That leads to a lot of problems. Classes which don’t need it must still allocate resources for it. It clutters the API. You can’t add it to classes which don’t support it. If a class only allows you to observe some behavior, you can’t change that.

OT/J fixes all that. The OTExample Observer shows three classes which could make use of the Observer pattern but don’t. Instead, the pattern is retrofitted in all the places where it’s necessary. This allows for many optimizations. For example, you can create a single store for all your observers (instead of one per instance). The API isn’t cluttered. You can observe almost any change.


Evolutionary Void

13. September, 2010

I just finished the third volume of Peter F. Hamilton‘s Void Trilogy: The Evolutionary Void. I feel that there isn’t as much suspense in the end as in the last books but all loose ends are tied down nicely and there are a couple of funny surprises (like the identity of The Lady). All in all, a good conclusion to story.

Go. Buy. Now.

Spoiler Warning

My main critique this time is that some guys check space for enemies all the time while some teams seem oblivious to that option. The author should at least have mentioned that they check once in a while and find nothing.

Similarly with the deterrence fleet and ANA. The idea behind the deterrence fleet is great. But I doubt that just hiding it somewhere will actually protect it against being found. Next, I wonder why redundancy was no option. When the “fleet” is rendered helpless, Kazimir’s successor is unable to call any backup. I can accept that only ANA itself knows about the fleet and since ANA is out of the game at that time, they can’t ask but I wonder why ANA exists only once. There should have been a backup. Earth is well protected but not against something like the deterrence fleet.

If something like that would wipe out Sol, they wouldn’t have a lot of pre-warning. So all in all, I like the twist when ANA is disabled but I don’t quite swallow it.


Java Project Lambda

10. September, 2010
Java (programming language)

Image via Wikipedia

It seems that someone came to reason and proposed an implementation for closures in Java that would not only work but also be useful without adding too much complexity to the language: Project Lambda.


Follow

Get every new post delivered to your Inbox.

Join 312 other followers