2007-12-18

XMas, jFokus and OSGi

Christmas time is closing in. No stress there as I already have the necessary presents covered, that is; to my sister's kids. Well, and yes - my lovely wife will also get a present or two.

This year it is a rather long period off during Christmas for most people. Myself, I plan to take five days of vacation and get two full weeks of laziness. Well, not really, I have to prepare two presentations for jFokus planned for end of January 2008. Firstly, I will be co-speaking at Christer Larsson's OSGi-tutorial the first day. Christer is heading a company called Makevawe which is behind the famous Knoplerfish implementation of the OSGi R4 spec. The other speaker is Joakim Eriksson, researcher at SICS, where he works with wireless sensor networks. The entire tutorial is three hours long and we will work with the material during the festive season ...

The second day of the conference there a several presentations scheduled. Attendees also has some food for thought during lunch time as well; there will be twenty minute short lectures for those who have a short lunch break. During one of those slots I am scheduled to talk about the possibility to make and use a Java API for GNU Radio. So, more work for the weeks to come ...

2007-12-17

Bee movie

Just got see a preview of the new movie created by Jerry Seinfeld; Bee Movie. Great fun!
But, bee keepers are not displayed as the ones with the bees' best in mind. Myself, I am a bee keeper and was just a little taken aback by this. Well, it is a very fun movie even though there are some facts not really in line with common knowledge regarding bees. One thing; bees are really good at flying, the movie says they aren't. However, bumble bees are the ones not aware of the fact that they cannot fly according to human science. There are a few more items I could complain about but does not really add anything significant. Instead ...
Go see the move! It is great fun!

2007-11-19

Just got GNURadio working

Got GNURadio working with my new laptop. Managed to listen to the local FM-radio station. So from here on it is experimentation time! Next step, guess what... plan to do a Java API to it of course! I'll keep you posted on the progress, and - well - lack of it as well, here.

2007-11-16

Yes - started a bit of blogging again....

Despite the latest trend abandoning the concept of blogging, at least those well known i public, and at least those well known ones in Sweden [in Swedish] - I currently tend to go against this trend. Well, somewhat, I am not really up to speed yet. Just finalized an entry which has been laying around for some time (since February actually). So if you would like to read and comment you can check it out here: "Developing Software is a people thing". As I started working on it in February, it appears as if it was published in February...

We'll see if more is coming. Keep you posted.

Late addition: well how wrong can I be?? The referred entry does now appear as if recently published, not in February as first mentioned.

2007-11-15

Developing software is a people thing

It has been said many times before; you probably do not need first class developers in order to produce first class software, but you need a first class team. I argue that if some or all of them are first class, then it makes it easier to create a first class team, as long as they can co-operate. The latter is vital. So, if we assume that the team members are proficient in the technologies used in the project at hand we can take a look on other vital aspects that makes a team work. The co-operation part.

How do we co-operate? One of the key components I would like to discuss is the ability to communicate. So to be more precise how do people, ourselves - us, communicate? Or, sometimes, the lack of it can be equally important to analyze. Most technically oriented persons would probably answer "by talking". Yes, talking is important, actually that is the technical part of it, and it can be analyzed. We do need to talk to each other. The actual talking and communicating in speech and text has been quite analyzed for great many years. Some of the basic ideas how this part of communication between individuals are described in various models, where the semiotic triangle is central. It describes how words, objects, concepts and symbols relate. There is also the area of pragmatics, describing how body language, gestures, utterances, etc. fit into the picture. Both of these alone can keep one busy for a very long time, these are interesting subjects indeed.

But, there are more subtler forces at work, some that might be very eluding - and apparently, not that much science seems to have been conducted in this area.

Why did he suddenly avoid eye contact? Why does he not want to speak to me? Why are she suddenly so angry? Well, I have this great idea but nobody seems to care after my presentation?

Are these questions you have asked yourself in a project? Encountered situations where similar scenarios have taken place? There must be something else going on. Enter our subconscious. Seemingly there is subconscious communictaion going on. Also, due to the evolutionary roots of our mind, there are certain reactions to certain behaviour - all in order to retain the integrity of the group (the team). It is all about group dynamics, but on a more subtle, subconscious, level. These are things we are not aware of. Simply, because we are deceiving ourselves not to notice what is going on. It is an autonomous function. One could argue that we actually run on autopilot more of our time than we might be prepared to admit.

How can I claim something as preposterous as the above? Well, I can't really, can I. I am not into psychology. However, I do meet, and have been working with, a great number of people from various parts of the world. What I have done is that I have read a very good and inspiring book on the subject. It is a book I can recommend, especially if you want to gain more knowledge in this area; "Why we lie: the evolutionary roots of deception and the unconscious mind" by David Livingstone Smith.

By the way; finding brilliant programmers can be hard sometimes. But, why not devise a test like the one posted here.





2007-02-28

Steve Jobs is sooo wrong

Recently in an interview with the New York Times Steve Jobs said that the iPhone will not ship with Java due the Java ME implementation being too large and that no one is using it anymore. My reaction to that might not be an outrage, but at least a bit upset as Mr. Jobs is somewhat influencal, at least among his fellow CEO:s and upper management in some large corporations. Some years ago Steve Jobs claimed dusing his keynote at the JavaOne conference that the Apple Macintosh would soon become the best environment for Java development. I know, I was there. Well, did we see anything in that direction? Big words, but no action in the end ...

Among the Java community it is probably frowned upon and seen as yet another statement by the Apple CEO. Eric Bruno at DDJ captures it quite well in his blog-entry. In his blog he mentions Google using a Java based client for its mobile email clients, etc. I would like to add another powerful, and very useful, application to the list; Opera Mini. Or click on "mini.opera.com" if you are reading this from your mobile device.

Opera Mini is a Java application that in part is installed on your phone, or whatever mobile device you've got. The other part resides on Opera's server, i.e. the installation is optimised by running some tests when you use it for the first time. The server-browser combintaion will compress the pages, the images in particular, you are browsing in a for your device optimised way. I have been using it for a while now and I see that surfing is way quicker using the Opera Mini browser than the browser bundled with the device.

So there are useful applications made in Java that are effecient on mobile devices. As we also have seen in the Java SE world Java is in a way becoming the language of choice for systems programming. Languages like JRuby are produced this way. I wonder how long it will be before we start see this development on mobile devices as well?

And, by the way, there are people around that require mobile devices to fully support Java. See Ove's blog-entry where he actually comments on the iPhone and its need to have Java ME bundled. So Steve, I think you will have to reconsider. Nothing wrong with that, just accept that there is a community out there. You should not let them down...

2007-02-27

JavaOne 2007

This year's conference I'll relax and enjoy as many interesting presentations as possible. Myself, and some friends and collegues, submitted a number of papers. As I had a BOF last year I would appereciate holding another this year. Despite the effort required, it is quite fun presenting at a venue as JavaOne. You tend to meet numerous intersting people with bright ideas.

Anyhow, the relax part; none of the submissions this year was accepted. Thus there will be no repesnting this year, less effort as well, but none the less, it will be great fun. Last year I missed a few talks due to some admin around the BOF we, Anders - a friend and collegue who also was co-speaker, held.

After registering I got the usual prompt for adding myself to the Event Connect tool. I do have an account there, but as I've lost my password, I had to re-register - with a new account name (!). Anyhow, this time I've started a OSGi gathering group, so if you would like to meet and discuss OSGi during JavaOne, sign for the "OSGi at JavaOne" group. Just follow the link and you should end up in the group's homepage.

2007-02-26

Writing to the statusbar in Eclipse from a non-UI thread

If you are dealing with the UI in Eclispe and need access to a certian part, e.g. the Statusbar in this case, it is quite easily achieved. On the other hand if you would like to simply write a message to this afore mentioned status bar, it is a whole new deal. You wrie your code that in the end extracts the site in question. As you get hold of the current statusline manager from the site, this is the way to go. Or,..?. well, when you start to debug the code you find that you run into NullPointerExceptions. The site or its view parts are null. This happens if certain methods in e.g. JFace is called from a non-UI thread. It actually says so in the Javadoc, in some places. I.e. the getActiveWorkbenchWindow method in IWorkbench exposes this behaviour.

If you are to produce code that calls these methods but does not have a UI-thread available? Well, then we can create one. It is quite simple once you've got the hang of it. It might look a bit complicated at first as it comprises using an anonymous inner class (which is a bit of favorite of mine as they resemble, to some extent, closures - without being it - ok, let the comments come!). Below is a code snippet that will produce a message on the status line:

final Display display = Display.getDefault();

new Thread() {

public void run() {

display.syncExec(new Runnable() {
/*
* (non-Javadoc)
*
* @see java.lang.Runnable#run()
*/
public void run() {

IWorkbench wb = PlatformUI.getWorkbench();
IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

IWorkbenchPage page = win.getActivePage();

IWorkbenchPart part = page.getActivePart();
IWorkbenchPartSite site = part.getSite();

IViewSite vSite = ( IViewSite ) site;

IActionBars actionBars = vSite.getActionBars();

if( actionBars == null )
return ;

IStatusLineManager statusLineManager =
actionBars.getStatusLineManager();

if( statusLineManager == null )
return ;

statusLineManager.setMessage( message );
}
});
}
}.start();

If you want to the clear the statusline, pass null as argument to the setMessage method. Too many method calls? I "chopped"them up a bit to make it clear. One does find code here and there in the open source community where the author has more or less kept the calls figuring out the site reference to one line.

There are few posts on EclipseZone about, or touching, the subject. One of the more intersting threads can be read here.

2007-02-12

Operating systems and Java becoming a "machine" language

There is a quite intersting article from Information Week on operating systems and where they are heading. In it there is a reference to BEA cutting out the opertaing system and letting the JVM talk direclty to the hardware. So what is the operating system in that case? One could argue that without it, the JVM itself is what comes closest to be an OS, or something like it.

Anyway I do see some movement in the direction of Java becoming the "machine language", i.e. the language and runtime system for programs written in other languages. To be more precise; the other language is implemented in Java. John Rose at Sun has an intersting blog entry on duck typing, and the implication of using Java as a "system implementation language" of the JVM.

What languages implemented in Java are there? Well, the one I first thought about is JRuby. But there are also; Jython, JavaScript, Groovy, etc. There are of course many many more, see "Programming Languages for the Java Virtual Machine" site for an assortment. And while at it, why not devise a language of your own by defining a grammar for it to start by using the ANTLR parser generator, then just add some .... There are some initial experiments in this area to make an Io implementation in Java. Ola Bini has created a lexer using just ANTLR. Neat!

If you are interested in deeper discussions regarding JRuby, check out Ola Bini's blog. He is one of the principal developers working on the JRuby implementation.

2007-02-06

Eclipse Pluginfest, Jfokus and speaking

It has gone two weeks now since the Eclipse Pluginfest in London. Time flies! There are some imagery from the event on the event Wiki.
I had an ambition to do some kind of reporting from the venue. But, we where very tied up in the exciting activities going on, and Adrian Taylor of Macrobug covered the event well. So check out his posts for day one and two. As the plug-in suite we brought with us to the fest are internal to my customer, so I cannot reveal to much of what went on regarding those. But, I can mention some intersting findings like the integration with IBM Rational Software Developer; it took some time to install (45 mins, a large number of plug-ins in our Eclipse 3.2 installation required to be updated) but proved to be an intersting tool. It does however resemble Borland's Together Architect, including model - code synchronisation. We will scrutinize this tool a bit further. It might be a candidate for replacing Together Architect ...

Further, there was a number of other interesting tools and prodcuts tried out together. We took a peek at the tool provided by Macrobug and some pre-view stuff from Symbian. All looks promising. The project manager for CDT, Dough Schaffer, told us about what is in the pipe. Another Doug, Doug Gaff from WindRiver, had an update on DSDP, Device Software Development Platform, and Mobile Tools for Java, MTJ. Two projects to keep a close eye on.

Last week the first Java conference in the Stockholm area took off; Jfokus. It is a joint "venture", sponserd, by Ciber, Sun Microsystems, SICS, IBS, JayWay, et. al. It has, had, four tracks and telling from the interest this might be increased next time. Speaking of interest, when the number of attendees rose past what the booked rooms could handle they had to close the registration site. The goal was to reach circa 300 attendees, when the registration site closed the number had reached 470!

Anyhow, I was asked early on if I could say something about OSGi, a technology I have been working with daily for some time now. The problem faced was a bit complicated; how much "introduction" should there be? Some people just wants to know what it is, whereas others would like to know how to employ it effieciently. Well, I kept to an introductory talk this time and time permitting there could be a quick demo. It turned out that most people probably knew quite a lot about OSGi, most of them probably knows far more about it than myself, and would have liked to see more practical stuff. And the demo? I had to fire up Eclipse as I hadn't planned for it. So there was a looooong delay before it came up (I am talking to my boss regarding a new laptop!). Did basically a reduced version of what me and Anders showed at JavaForum last year.

Lesson learned; fire up the IDE in the background just in case. If that eats to much memory - nag your boss once again. Also, we've probably had enough intros to OSGi now, next time there will something more practical with more code! The technology has really taken off lately, more and more people know about it today.

Another lesson, and a good one for that matter, is that prior to my little presentation I took some voice lessons. It has helped alot! A former collegue approached me after the presentation and informed me that I was very clear(!). That was great news! Seemingly my practicing has had some effect. Taking these lesson is quite fun as there has been a great deal of progress now when I in the beginning of the process. Also, I do realise that there is much much more that needs to be done in this area. So I am looking forward to more sessions of learning how to get in control of my voice ... Well, maybe someday I will be able to speak properly ...
I can reveal who is helping me with this; it is a very taleneted singer, soprano and artist. She has an alternate site also.

2007-01-15

More open source and disruptive technologies

Sun is seemingly moving on along its open source track. The Fortress programming language, a continuation of Fortran, has reached the ranks of open source. First Java then "Fortran", well it was long ago since I did anything in Fortran, actually a Fortran derivative with some powerful extra quirks; PLEX - Programming Language for Telephone Exchanges. It targets (still does - I think) demanding real-time systems, i.e. telephone traffic. Ericsson, inventor of PLEX; also has a programming language in the open source domain, Erlang. I have never tried Erlang, but it also targets real-time systems.

Update (2007-01-16); I recently found an intersting site regarding history of programming languages, HOPL. Unfortunately it does not mention PLEX.


There is an article recently depicting the next five most disruptive technologies, those that we will see more of during 2007. One technology which is mentioned is RFID. It got some hype a few years ago and then everything calmed down a bit. Eventually I see it more and more on a daily basis, i.e. not necessarily in the places mentioned a few years back; retail. I do see it being employed more and more in security though. I have two badges, one to get into my customer's premises and I recently gor one from my empolyer. Both utilises RFID tags, so it is no longer necessary to swipe the card, just hold in fron of the reader. Very convinient!


There is a search engine for people 50+. Check out Cranky.com It has a simple and nice UI, only shows like five results on the first page etc. Well, if you get tired of Google and sense, like myself (I do have quite some years before I reach that point, actually!), are closing in on the age critera of the target group ... maybe it could be worthwhile, I do not know anything yet whether how powerful it is or how good an indexer it has, etc.

Finally, came across this war map describing the software wars Microsoft is staging. Maybe true to some extent, but quite fun also admist everything ...

2007-01-09

Adding a third party JAR to your Eclipse plugin

I often get the question "How to add a third party JAR-file to my Eclipse plugin". It is not that tricky, but neither that obvious. Two solutions has been posted on the Eclipse newslists, but it can be quite hard to find it as the sheer number of posts is overhelming.

Here is two ways of doing it:
1. Turn the JAR-file(s) into plugin(s)
This is probably the simplest solution, but maybe not always achieving the desired granularity though. "Use New" -> "Project" -> "Plug-in Development" -> "Plug-in from existing JAR Archive". That will turn the JAR-file into a single JAR-plugin. Check that all required packages are re-exported.

2. Include the JAR-file(s) in the plugin in question:

  • Use the "Import" -> "File System" to import the JAR-file(s) into your plugin project. E.g. '/lib' directory

  • Then use "Add..." to add the JAR-file(s) to the classpath section of the Manifest/plugin.xml runtime tab.

  • Press "New..." to add "." library back to the the classpath (without quotes).

  • Check that the binary build exports the new JAR-file(s) on the Build tab.

  • Press save, important for the changes to come through.

  • Select the project in question in the package explorer view, right click and select "PDE Tools" -> "Update classpath". This will add the newly added JAR-file(s) to the project´s classpath.
When you are in the process of exporting the plugin make shure you do not package the plugin as "individual JAR archives", Eclipse cannot load JARs from within JARs, yet.

2007-01-08

Added another link to the list, well added a new language ...

I just added a link to the list of links. Why bother writing a posting about that? The reason for drawing a little bit more attention than expected from such an event is the fact that it is not related at all to Java, yet. It is a link to a very nice programming language; Io. Small, prototype based and dynamic. It could prove to be a nice candidate for a JSR-223 compatible implementation, eventually, time permitting. Especially when the JVM gets its new invokedynamic instruction. There is a blogentry, by Debasish Ghosh, that has some intersting reading about these intersting matters on his blog, Ruminations of a programmer.

If you are in the business of creating language of your own, you have probably already cecked out ANTLR. It is a powerful utility for creating a parser for your language of choice. I'll post some of my experiments here when I get around to do so (some work in progress is propriatary - owned by my customer - and cannot be posted in public). I did a grammar for Io using ANTLR, but I had to give up the rest of the implementation some time ago as I moved into the current project, which takes up much of my time. As the overtime is coming down to normal levels, I'll pick it up again.

I've started some preparations for the upcoming Jfokus conference here in Kista, Stockholm. My little talk will be a introductory presentation of OSGi. I'll post the material here after the conference, i.e. after the 30:th of January when this venue takes place.

2007-01-03

New year, new issues, new inventions and a UFO

Hope you all had nice Holidays. Myself I did as little as possible, part from eating too much good stuff and a few glasses of champagne on New Years Eve. Also had a nie experience with a chocolat dessert and some wine from Banyuls, a naturally sweet red wine from the very south of France, almost on the border to Spain.

On the second of this month I was back in the office to find that a number of collegues where doing the same. Thought I'll be quite alone in the office, but there is plenty to do in the curent project. As it turns out there are some JUnit coverage numbers to pump up - there is a report to be produced for a managerial meeting next week, which in turn means that the JRE 1.6 issue has to be postponed until next week. There are a few new things to care for during these JUnit and Eclipse plug-in test cases that confuses me; running the test case separately everyting is nice and peachy, executing it in a suite causes it to fail. It seems that the corresponding bundle is not instantiated properly for the plug-in under test. Anyhow, it is problably something obvious when it has been figured out.

Another issue to cater for later this week and coming weeks is to start evaluating the Newton component framework. In the project I am assigned to we have the need of a server portion and as we are doing much development targeting OSGi, there is a high degree of reuse possible. Further, Newton will enable us to concentrate on prodcuing POJOs as the framework takes care of the details related to lifecycle management and distribution. The latter is a very intersing aspect; one of the evaluation criterea is to see how this can be achieved on a single JVM (OSGi ) and across several JVMs (it makes use of JINI). There will be more posts on this matter when there is more to report.

Came across some new intersting inventions. I think it becomes increasingly difficult for science fiction writers as more and more of the "inventions" they have imagined has been realised, or is about to be eventually. Peter F. Hamilton, though, has come up with some very intersting things in his books, some which I believe has revitalised SF with some new concepts. Some of these are not that far fetcehd as can be believed, they should actually be feasible within not a too far away future. E.g. the "Expanding armour" described in the article referenced above comes quite close to what Mr. Hamilton has invented in some of his books (see "Fallen dragon" and the Confederation triology).

Well, speaking (writing) about things related to outer space; a UFO was sighted at Chicago's O'Hare Airport, or so it is said. Visitors or not, it seemingly hovered over the terminal building just to shoot off shortly there after. Could it be yet another climatologically change related phenomenon?