Posts tagged: Eclipse

On top of Tasktop

My post about tracking time attracted the attention of Tasktop. While this had been mentioned to me before, I was mistakenly under the impression that this was a windows only app.

I was pleased to find out that this was also available for linux. Great… Lets try it out.

First stumbling block is the requirement to register on the website before I can download a trial. I am a firm believer of try before you buy. I should be able to register but it should be entirely my choice.

I am more comfortable with registering before buying or for the use of a free piece of software. However, registering for a trial always irritates me. This was also the case when I wanted to trial InDesign / Illustrator the other day.

After registering, there was the irritating wait for the email to arrive. Now, this is irritating. When I want something, I want it NOW. I hate waiting. Adobe did not make me wait for the confirmation email of registration before downloading the trials. There are two good reasons as to why this irritates me.

  1. Email, as reliable as it is generally, can take time. In theory, this can be anywhere from a few seconds to hours. How about if my mail server is currently down. Or even more importantly, what if I have shut down my mail client so that it does not keep distracting me from something that I am trying to do. Opening up my mail client, I now want to find out about the other emails that are in my inbox and whether any of them require an action…
  2. I have reluctantly provided details about myself. Confirming my email address before I am allowed to download a trial suggests that Tasktop does not trust me enough to just let me download the trial. The software has started off on the wrong foot. How much of an issue is it really if someone gave the wrong details before downloading a trial. Is it really that important that you are able to keep bugging them via email to buy the product?

I was curious enough to jump through the hoops to download the product. The first thing I noticed is that there is no 64bit for Linux :-(. More steps involved in installing this on my 64bit machine. So instead, I installed it one of my 32bit machines – save time.

Once the download completed, the steps on the website suggested that I needed to configure it (with ./configureTasktop.sh) and then run Tasktop. The configuration step required no input from the user and outputted nothing. I have to ask:

  1. Why is the configuration step not integrated into Tasktop and configured to run once? Alternatively,
  2. Why does the configuration step, not start Tasktop right after.
  3. Even better: Make Tasktop a symlink to configureTasktop.sh, which then relinks that to the Tasktop Binary with the configureTasktop running Tasktop right after. This means that from the users perspective, they are always running the same command, and you save any cost associated with run once checks.

I finally got Tasktop to run and it asks me if I want to install the firefox addon to integrate with Tasktop. I want to see how it integrates, so I do. Of course, this is yet another step.

A restart later, I was ready to try out Tasktop – or was I? We use bugzilla to track tasks and I wanted to integrate that in similar to how I do it in Eclipse. This was also trickier than I expected.

I went into the partner connectors section which did not cover bugzilla, which I assumed meant that it came with Bugzilla integration by default. This is true but how the hell do I get there to configure it. It took me a little while to find the configuration section (there are no menus). Once I was there, I wanted to get back to the original layout which was tricky since the “close configuration” button was nicely hidden away up at the top right.

Once I had this working, I tried out the active/deactive mechanisms and this works just the same as in Eclipse. Except with the Firefox plugin, it adds in the links that you browse as part of your context – GREAT!

Add in a task to blog about it and went through writing half the document, then decided to de-activate it before I started working on something else. All the firefox tabs were closed – again, great…

The problem is that when you re-activate the context, it just clears the tabs in firefox and shows you the links you last had open. The page titles for the pages that I had open were the same for a few, so going through them trial and error to get to the blog post was tricky. More importantly, the cookie was already gone and I had to re-login. This might be a timeout issue with WordPress so wont tag that against Tasktop.

I haven’t tried linking folders / files yet but considering that with the above process taking me more time than I expected due to the sheer number of steps involved, I shall have to leave that to another day. In all honesty, it might never happen.

I do like the time logging feature of Tasktop as it tells me which tasks I spent my time on in different chart formats. This is great. However, I have a problem in that this is on an individual basis. I see nothing on here about how a team leader can link in Tasktop used by the team to calculate total time spent on a project / task. This is a necessary feature for a tool like this in the team environment.

It is possible that all of this is easier in a windows environment. Possibly because it was built on there, but more likely because Windows users are used to taking several steps to achieve something (what is it – 7 clicks to delete a file in Vista?)

Having ranted on for a while, dont get me wrong. I think that Tasktop is a fantastic concept and with a bunch of tweaking can be a very intuitive tool to use. However, at the stage that it is in, it does not do what I need it to do. It is actually more obtrusive than useful (e.g. by removing all my tabs from firefox when switching out of a context and not re-instating them on going back to the context).

Then, it is probably just because I simply expect too much… :-(

Maven2, EJB3 and JBoss

I started work on a project called InVision about a year ago but have probably spent about a week or two worth of effort on it in total… :-(

The Project aim was to bring together the easy time logging capabilities of Process Dashboard along with the project management capabilities of Microsoft Project (including the Server Component). It is also to be integrated into our request tracking System – Request Tracker. Eventually, it is also to integrate with our accounting system and turn into an ERP (Enterprise Resource Planning) system and MIS (Management Information System). There are plans to integrate with our Wiki and our Document Management System too.

But these are all lofty goals.  One of our recent projects introduced me to the Spring Framework. While I am still not a fan of Spring, the scale of the project and the way of approaching it gave me some ideas and additional tools to work with. I wanted to bring these into the InVision Project.

The key one here was Maven 2. InVision already used EJB3 and JBoss (4.2 as it happened). There was one additional issue for me to resolve and that was out of container testing. Something that is very easy to do with Spring but a little more troublesome with EJB3 since it doesn’t have an out of container framework…

I have grown to be a big fan of Maven 2 and using Maven 2 to configure an EJB project is not as easy or straightforward as I would have liked: I wanted to separate the whole project into four parts

  • Domain Model (or just the entity beans); Also referred to as a Hibernate Archive (HAR)
  • Stateful/Stateless Beans (Just the Beans, since I don’t consider entities beans in EJB3)
  • Application Client (J2SE Application)
  • Web App (Using SEAM)
  • I would also need an EAR project to deploy the DomainModel, Beans & WebApp as one pacakge into JBoss.

I have not got as far as the SEAM project yet but the other ones were straightforward enough to set up with Maven 2.

Both the Domain Model and the Beans project had to be set up as ejb projects and use the maven-ejb-plugin




org.apache.maven.plugins
maven-ejb-plugin

3.0



I set up the persistence context within the Domain Model


org.hibernate.ejb.HibernatePersistence
java:/datasource

I could then reference the context from the Beans project by injecting it with

@PersistenceContext(unitName=”em”)

Easy enough!

Now configuring the EAR project: This was configured as an ear package which depended on the other two projects with the following configuration




org.apache.maven.plugins
maven-ear-plugin

5


uk.co.kraya.invision
beans


uk.co.kraya.invision
DomainModel



4.2

invision-ds.xml





org.codehaus.mojo
jboss-maven-plugin



8080



With this configured, from the EAR project, I could do mvn ear:deploy to deploy to JBoss.

Additionally, within eclipse, I created a new run-type that ran ear:undeploy package ear:deploy to re-deploy the package to JBoss. Works a treat

There are still a few kinks to be ironed out.

I still need to install (mvn install) the two projects before the EAR will pick it up to deploy. I need to get the ear re-deploy to re-build the other projects. Something to look at another day.

I had manually deployed the DataSource file to JBoss. It might be possible to do this via Maven.

I also very much liked the Eclipse automatic deploy feature. It is possible to use the eclipse plugin on maven to get Eclipse to identify this as a JBoss deployable project but I ran into some problems and gave up. Ideally, Eclipse would auto-deploy the project.

However, the above is less relevant once Out-Of-Container testing is in place. Now, this does work, but I will leave that to another day…

Eclipse TPTP on Ubuntu (64bit)

I run ubuntu 64 bit (technically, I run an ubuntu 64bit vserver which I access from ubuntu 32 bit but thats not really relevant).

In the open source world, I expect that all things which are accessible as 32bit are also accessible and 64bit and ubuntu makes it automagic enough that everything just works. Yes, I run into problems with closed source software like Flash Player (recently resolved with flash player 10) and the Java Plugin but that is another story. I use Eclipse and wanted to do some performance analysis and benchmarking to find a bottleneck and installed the TPTP plugin; and ran into a problem. It just didn’t work.

To resolve it, I turned to google… In this instance, it turned out to be a distraction and a red-herring. It lead me in the direction of installing libstdc++2.10-glibc2.2_2.95.4-27_i386.deb which was difficult at best since there was only a 32bit version of the package and that wasn’t even in the standard repository.

In the end, digging deeper, I found that it simply missed the following shared object libstdc++.so.5.

All I had to do was install libstdc++5:

sudo aptitude install libstdc++5

and it worked… 😀

Now, I think that ACServer which Eclipse uses to do TPTP should not link to an outdated library but that is another issue…

Your Time

I have always been curious about how I spend my time. It would be useful or at the very least cool, if I could figure out what I did with the 24 hours I get each day. Considering that this is overkill, it would be useful to find out how much time I spend on each task / client at work…

This is something that a lot of companies would find useful, especially in the professional sector. Lawyers, for example need to know this information for the purposes of billing. Time tracking has always been a personal bug bear of mine and is something that I often ramble on about.

In fact, in Chris’ Blog, the team management application he speaks about towards the end is something that I have been talking about and working on in the background for about a year now (actual effort is probably only around a week since I keep getting distracted with other things)

My aim has always (unconsciously) been to have an invisible interface, more because if there is effort involved, its going to take away from the task at hand and unless you are an obsessive compulsive (which I sometimes end up being), its going to be inaccurate. More importantly, its going to take up time to track and log time and ends up being a task of its own which requires management.

The most common way to log time is to just have log sheet which is filled in at the end of the day – just putting numbers against tasks and making sure it adds up to the number of hours you worked in the day.

Mylyn for Eclipse, which is a task/bug management plugin has a cool and useful concept of task contexts. This means that when you activate a tasks, it remembers the files you are working on, as well as which lines you were on and saves it as the task context. You can then de-activate the context or activate another task. When you go back to this task, it loads up the context. In other words, the files you had open, at the lines that you were at. This is a real boon and can save a lot of time once you get the hang of creating a task for everything you are working on and practice a little bit of self discipline in terms of activating and de-activating tasks.

Mylyn could use a little more intelligence in context management and creation on activating tasks with no context. But the concept of contexts is great and it should be possible to apply this at the operating system level.

For example, I am working on Task A. This involves a number of URL’s in firefox, a number of emails from Thunderbird, some files in Eclipse, some terminal windows, couple of Documents, and a spreadsheet.

Task B involves a url in firefox or two and a document.

and so on.

It should now be possible for me to simply tell my “Task Manager” that I am about to work on Task A and have all the applications load up in the locations that I last left them and hide away or close the other applications. When I want to switch to Task B, it should close everything else and open up the applications for Task B.

My desktop environment (GNOME), like most Linux desktop environments have the concept of workspaces. You can also get this as an addon for Windows. I have used these to emulate this kind of behaviour but this is far from perfect.

In theory however, this should make it possible for an application to track the time spent in each workspace. If the application is told what task is associated with each workspace, it could automatically log time against that.

The real power for task management would come from a powerful use of task hierarchy. Lets say we have the following task list

Client A => Project A => Subtask 1

Client A => Project A => Subtask 2

Client A => Project B => Subtask

Client B => Project A => Subtask

In this setup, the task management could be told (or even better figure out on its own) that there are application hierarchies… In other words, for all tasks related to Client A – the user will always need application X (with a particular configuration – say firefox on a particular url)

For Project A, there could be the requirement of another url in firefox.

This way, when a new Project or subtask is created, the system can automatically start a few steps ahead…

Client B could have completely different application setup / layout.

Automatic time tracking, task managment and planning then becomes so much easier.

For this to be viable, however, there are a lot of things that still needs to happen.

  • Context awareness for applications and ability to save a context
  • Ability in applications to merge contexts (for hierarchical contexts)
  • Efficient Application swapin/swapout when tasks switch for instant task switching
  • Applications needs to be more lightweight to make task switching quicker

Most, if not all modern applications provide extension points and it should be possible, at least in theory to add this functionality on to most applications. More importantly, it is theoretically possible to add this functionality on to all the open source software since the source is available. However, since it requires a fairly radical shift in thinking about application state, this is probably far more complex than it seems.

Once we have something like this working, it should be much more straightforward to add workflow using the task hierarchy to make it seamless including passing the contexts to the another person if necessary…

In any case, a few years into the future, who knows, these features might be built into all applications and perhaps we will be talking about task management, not application / process management.

Invisible Interface

I am a fairly avid reader of Jeff Atwood’s Blog and the post on Is Email = Efail post was particularly interesting. This led me on to Tantek Çelik post and several other articles relating to this.

The HCI (Human Computer Interface) has always intrigued me. This was partly due to the fact that I never enjoyed working with it – adjusting all those widgets by a few pixels so things could fit and it might look that little bit cleaner. Thinking about where a particular field should go and how it would all fit together was a little too bothersome for my liking. Precisely the reason why I enjoyed web development. Someone else could work out all the aesthetics and all I had to do was plumb in the functionality behind that.

Of course, it is never quite that straightforward – there was often plenty of to and fro before the interface was nailed down. However, the worrying of where something should go could be left largely to someone else.

It turns out however, that (like with most everything else in life) – I am very much opinionated about the user interface and design. The only difference is that actually doing the work does not excite me – but the concepts do.

In Tantek’s original post, he points out:

“The fewer fields in an interface, the lower the cognitive load.”

This is something that is vital to Interface design but something that is easily missed.

It was pleasant when I went back to one of our first high profile projects – megabus and checked the user interface on there. The number of fields on there truly was minimal. In fact, there was originally only one field on there and this had a reasonable default value. All the other fields are drop downs. There are now three fields on the uk version and two on the us version of the site. All with sensible defaults.

The other advantage of the megabus system is that when you hit search, the results are usually returned under a second. This is with a very complex algorithm to calculate the availability/pricing and around two searches happening every second. At peak, we have handled up to around 5 searches a second with the results being returned in under two seconds.

After this page, there are no more fields for entry apart from when you make payment. The benefits from the simple user interface and fast search response is, at least in my view, one of the key reasons for the success of the site bringing in people from all walks of life. This includes students as well as old age pensioners who learnt how to use computers and the internet just to be able to book megabus.com tickets.

It did get me thinking thought about the perfect user interface… Is it possible to reduce the interface down to nothing…?

Installation of Thunderbird/Firefox has a good example of user interfaces that can be removed. In particular, I am referring to the import from interface…

Import Data During Thunderbird Install

Import Data During Thunderbird Install

While this is a useful step, why does Thunderbird not do this in the background, find out what other applications are installed, do the import anyway (if possible) from any and all applications, merge them together as sensibly as possible and give the user the option of whether they want to use it, or parts of it.

I realise this opens a whole can of worms…

Q. Does this not mean that Thunderbird thinks that it is smarter than the user (as per my reference to Windows being “smarter” than the user in Evil Linux)?

A. No.

  1. Thunderbird should inform the user of what it is doing – don’t miscommunicate.
  2. Have a cancel button, so that the user can cancel if the process is taking too long and they won’t be using that information
  3. If the process fails dramatically for some reason such that the install crashes, this should be detected on the next try and the installation should be “more careful” when trying again or skip that step entirely

Another example is the Microsoft Office Installation process, The name and the company of the user is already in the System somewhere (User Account Details). Why not just use this information instead of asking for it again.

Same goes for Eclipse! Why does the author information not pick up the users name from the account information?

To summarise, the point that I am trying to make is that applications should not ask the user questions if it can figure it out itself. Most modern applications can pick up most if not all the information it needs from the system itself. This even includes theming information (as per my post on Design). While the majority of the theming in most operating systems is fairly pervasive in terms of application look and feel, applications have enough control over their look and feel to be different.

While this customisation can be useful, it can also be a hindrance to productivity and an allure for procrastination!

If I have specified somewhere on my system that my name is Shri Shrikumar, every single application on here should then be able to pick that up instead of asking me over and over again per application.

I look forward to a day when I never have to type the same information more than once… 😀

WordPress Themes