Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

2010-03-09

EclipseCON 2010

Yes, I'll be going to EclipseCON this year. Hope to see you there.

I'm going to EclipseCon 2010

2008-09-18

Continous Intergration - continous headache?

Recently attended a seminar, a free seminar, on Continuous Integration, or CI for short. It was Informator hosting it and two guys from Objektfabriken who held the actual seminar.

There are a number of good tools to get CI rolling. But is it as easy everybody claims? Tools are good, bu you need a process too and, even more crucial, backing from management. Without it, nothing can really be done in the area of CI. I.e. introducing CI requires such a level of effort (LOE) that you cannot hide it for long before it shows in your time reports, etc.

What is this thing with LOE and CI and process?? Well, you cannot just hook up CruiseControl to your Subversion repository and think you're up and running. There are a number of other aspects to consider; to what degree will engage others in your team? What branching strategy are in use at your organization? Will the introduction of CI imply changes in your organization? ... and are those in this organization ready for a change? Will this change be introduced gradually or are you planning to do it "Big Bang" style? There are of course numerous questions that needs to be addressed before you can start doing the practical stuff. Please keep in mind; every project and organization is unique in their own respects.

Degree of CI: there is a continuous scale, it basically describes the degree of isolation between development efforts. I.e. how much a change affects others in the team. In one end there is basically no isolation - this implies basically no branching strategy and thus a change can affect everybody in the organization. You have developers check-in their changes directly to the main branch in you source repository.

In the other end of the spectrum, you enforce a strict branching strategy where people have to take in updates on isolated branches, run test cases, before checking in their changes. Then merge in their change to the main branch. The latter will not render any problem as the issues involved with merging has already been dealt with in the isolated branch. The very end of this range of CI is reached in the latter if developers are continuously updating their isolated branch with any change introduced in the main source branch.

So, you can probably also see that there is also a degree of effort, cost, required; low effort - low safety or higher risk, high effort - higher safety and lower risk.

What to do now? You have to decide where on the scale to start. Do you want start in one end and move towards the other? Or, do your organization require a certain level and stay there? I think it is all up to what you want to achieve and how much risk you are prepared to take.

And... please keep in mind: Developing software is a people thing.

2008-09-15

Maven plugins

Creating plugins for Maven is quite simple, after some initial hurdles, and fun. Most Mojo:s I've done so far are rather small in size. The Maven Core API:s and the like are quite rich in functionality.

How to start? Check out this Beta version of the "Maven, the definitive guide". There is a good chapter on how to start creating your own specialized plugin doing a task not yet supported by one of the existing Maven plugins. Also, you might need some special thing done in your unique build process. Also, check out the "Plugin Developer's center" on the Maven site.

The only thing I can complain about is the lack of JavaDoc. But that is compensated by taking a peek at the existing source code of Maven and some of its plugins. Remember; the ultimate documentation is the code, after all ...

2008-09-03

Maven, maven - what's in store for us..?.

Just started working on a suite of plug-ins for Maven2. A bit tricky at first, but so far it is very fun stuff. At the core of Maven there is a dependency injection engine; Plexus. It is also referred to as an Inversion of Control container.

Anyhow, I've just begun exploring the API:s, etc. It seems promising... I'll be posting back here when new findings surface. Meanwhile check out this great book on Maven. This is the second book I've encountered so far about Maven.

2008-09-02

Opinions are the cheapest commodities

Anybody can have an opinion about just anything, and almost everybody has. Well, it is easy to have an opinion about just anything, it is the cheapest commodity in the world. Why is it so cheap? Well, it is very often preconceived, i.e. somebody else has already thought of it. Actually, most people who do have an opinion very very often has never been in touch or used what they are opinionated about. This is quite true when it comes to technology, and Java in particular - for some reason there is still some FUD lurking. People with an opinion, often negative, about Java does not know much about it. They seem to feel strongly against something they do not grasp, or whatever (something unknown?). Those who do know something about Java, just do things and get along.

So, what is the conclusion? Opinions are not based on facts as knowledge is. Find out the facts first then decide.

Where does this "cheap commodity" thing really come from? Well, I think it comes from the fact that a majority of the population very often is not thinking (I've heard a figure of 97%!) but rely on preconceived impressions. We seemingly go along with our lives on auto pilot.

So, find out the facts for your self. Listen to others - facts they reveal, and then make up your mind based on the facts discovered, and maybe most importantly; ask questions!

2008-05-05

CommunityOne and JavaOne 2008

At last! The Conference we've been waiting for has started. Rather, the pre-conference CommunityOne started today at Moscone in San Francisco. I just picked up the complimentary T-shirt and had a lunch sandwich. So I'm good!

There are more people coming to this pre-event this year than the previous, 50% more according to Ian Murdock, Sun, who started off the key note. Emphasis is on open source, sharing, i.e. we are moving away from monoliths towards modular architectures. It is also about building communities and keeping those communities active and passionate about the software and technology. But, the community also encompasses users, they actually form the bulk of the community. So, it is not only about code; documentation, tests, etc. are equally important - isn't rather irritating that undocumented (javadoc) part you so dearly want to use?

Anyhow, maybe not that big news, we have heard much about openness on previous events. I think the emphasis on community building is rather new and fresh. We need to get together more and create great software by sharing... what do you think?

P.S. I'll be posting more here during the conference week whenever I do get an opportunity. Maybe I'll manage to get some pictures up here as well. I'll keep you posted....

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-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-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.