Posts Tagged ‘development’

Google Wave and IE-Support

Friday, September 25th, 2009

So after all Google has developed its Chrome Frame plugin for Internet Explorer for a good reason: enabling the majority of users – which are unfortunately still using Internet Explorer (6,7 AND 8) to have a better experience with HTML5-based websites.

Lars Rasmussen posted on the Google Wave Developer Blog that Wave will inform Internet Explorer users to install Chrome Frame for a better user experience. Reason being that Internet Explorer is just too slow at interpreting JavaScript and DOM Manipulations – features Wave heavily relies on. IE’s support of modern web standards such as HTML5 is pretty poor, too.

I’ve been experiencing the same issues with IE over and over for myself – yet in a smaller dimension: Every hour (and it have been many hours) a developer spends on the specific quirks on IE (which of course are different per each version) and to fix them for their application is not spent on adding cool new features or bug fixes which affect general issues.

Since this has been a problem for so a long time I hope this finally helps to fix this issue.

J2ME/MIDP: The hard parts (1)

Thursday, September 24th, 2009

This is going to be a series of articles about things that don’t go smooth when moving from J2SE to developing for J2ME in my case especially MIDP. It’s not intended to blame the guys behind J2ME and the MIDP APIs for what they’ve done – instead it’s intended to be a collection of common problems or traps developers used to J2SE could fall in.

First up: Simple often-used utility functions:

static boolean Boolean.parseBoolean(String s) missing

The lack of this method is really annoying once you have to cope with reading in configuration values. Many of them will be in boolean-like format but you will have no method to parse them into booleans.

A very simple re-write of this method could look like that:

public static boolean parseBoolean(String s) {
return s.equalsIgnoreCase(“true”) || s.equalsIgnoreCase(“yes”);
}

Since it could be so easy to write this function (and Integer.parseInt() still exists which seems more complex to me) I don’t understand why it has not been included.

String[] String.split() missing

Every now and then one will have to parse some input – and this is where split() comes in handy. Would have come. Luckily String.indexOf() exists which allows for the following re-implementation of String.split():

public static String[] split(String source, String separator) {
Vector nodes = new Vector();

int index = source.indexOf(separator);
while(index >= 0) {
nodes.addElement(source.substring(0, index));
source = source.substring(index + separator.length());
index = source.indexOf(separator);
}
nodes.addElement(source);

String[] result = new String[nodes.size()];
if(nodes.size() > 0) {
for(int i = 0; i < nodes.size(); i++) {
result[i] = (String)nodes.elementAt(i);
}
}

return result;
}

All in all this might not sound too bad since both “re-implementations” were pretty easy to write. But: Since Boolean and String are declared abstract you can’t subclass and by that extend those. So you will have to declare a “tool”-class for them – not the most elegant way in my opinion.

So these are methods I think many developers will use very regularly but J2ME/MIDP doesn’t provide them.

New Team. New Challenges.

Tuesday, September 22nd, 2009

In early September I started working in a new team. The main reason for this step was change itself. Since I’m still in training it’s always great to see something different and new. This helps me complete my picture of software development and also takes me to another company with business processes slightly different from those I’m used to.

I’m still a software developer. But the kind of software I’m developing has changed and so have my experiences and learnings. Of course they did not change completely – but they changed focus. For the last year I’ve mostly been developing server side applications combined with HTML/CSS/JavaScript. Although I would not see them as very large they were certainly more complex and more demanding on hardware than what I’m developing now. That thing which I’m entirely new to is development for mobile. This basically means developing for devices like the iPhone, Blackberry or Android. For me, this is a great opportunity. It’s helping me a lot to fine-tune my programming skills. Here are some examples of things I had already expected and some things I just experienced:

  • memory and processing power is so limited compared to desktop or even server environments (iPhone 3G: ~400MHz, 128MB of RAM, no swap! – Desktop: multi-core 1-2GHz, GB’s of RAM)
  • (only for the iPhone) memory management can be a tricky if you’ve always been developing in a garbage collected environment like the Java platform
  • SDKs like the iPhone SDK or Android SDK rely heavily on software design patterns. A developer using those SDks is at a loss if he’s does not only understand those but is also able to extend and re-use them

There are many things that come with this change for developers. First: one must be very careful with creating objects. Very careful! Even if you’re on platforms like Android or Blackberry which feature Java and by thus automatic Garbage Collection! Every object counts.

Those limitations and the way you deal with them really help developers get more experienced. By that it’s a great deal for both the company and me.

I’m looking forward to what comes next – and rest assured I will keep you updated about any further developments.

SpringSource: A Groovier Eclipse experience

Wednesday, August 12th, 2009

For a very long time developing Grails applications in Eclipse using the Groovy-Eclipse-Plugin was everything but enjoyable for me. Matthias Käppler summed it up best when he wrote:

Grails and Eclipse: Not So Groovy

In fact I struggled to get the Groovy-Eclipse-Plugin installed those days, and after finally having done that I found out that developing Grails applications in Eclipse was really painful for me.

But now with the first pre-M1 release of the next version of the Groovy-Eclipse plugin many things are better than ever. I finally got around using Grails and Eclipse for some of my projects at work but on the Mac at home I still prefer the combination of TextMate and Console.app. I’m looking forward to the final release which should improve UI performance in Eclipse, especially when using Code Assist.

Jacqueline – parallelized.

Friday, July 31st, 2009

Jacqueline now features a development branch containing the latest changes to check multiple documents in a parallel fashion.

My first performance tests show that this boosts overall performance when checking large amounts of CSS selectors on multiple HTML documents. The next big step will be trunk-integration of this feature.

In the meantime check the dev-branch at http://code.google.com/p/jacqueline/source/browse/#svn/branches/threaded