Tuesday, 19 October 2010

Accessing Picasa's atom feed API from Spring's REST and XPath templates

Been swearing at my screen and Google's choice of atom based API for their Picasa web albums. Flickr's REST API took 10 seconds to work out. Picasa: days...


My problem:

Trying to parse album ids from Picasa's API: code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListAlbum.


Source picasaResponse = restTemplate.getForObject( albumsURL, Source.class, parameters );

Jaxp13XPathTemplate xpathTemplate = new Jaxp13XPathTemplate();

Collection albumIds = xpathTemplate.evaluate("//entry",

      picasaResponse, new NodeMapper(){

   public Object mapNode(Node node, int i) throws DOMException {

      Element album = (Element) node;

      log.debug("IN NODE ALBUM");

      return null;

   }

}


This never worked. It should have I thought. Trying different combinations of "/entry", "/feed/entry", "//atom:entry", "/atom:feed/atom:entry", swapping with Jaxen, etc made no impact.


Then after some googlebashing and soulsearching I solved the problem.

The Xpath template needs a namespace to resolve the atom xml. So adding this solved the problem:


Source picasaResponse = restTemplate.getForObject( albumsURL, Source.class, parameters );

Jaxp13XPathTemplate xpathTemplate = new Jaxp13XPathTemplate();

Properties namespaces = new Properties();

namespaces.setProperty("atom",

   "http://www.w3.org/2005/Atom");

xpathTemplate.setNamespaces(namespaces);

Collection albumIds = xpathTemplate.evaluate("//atom:entry",

      picasaResponse, new NodeMapper(){

   public Object mapNode(Node node, int i) throws DOMException {

      Element album = (Element) node;

      log.debug("IN NODE ALBUM");

      return null;

   }

}




Ps. code simplified and not using bean injection etc for clarity.

Friday, 15 October 2010

Why IRC is essential for distributed teams

Realising more every day that IRC is essential for distributed teams.

IMs (MSN, Google Talk, Communicator, etc), Skype & Live Meeting works well but is too sheltered, it is invitational only and time constrained.

Email is recorded, too formal, noisy and too asynchronous/slow.

Yammer or Twitter is nice for distributing comments and discussions, but is too slow for actual problem solving.

To keep teams up to date or solve problems together; a group chat is essential.

For culture build and low barrier of interaction of an informal and not archived discussions; a group chat is essential.

For rubber duck statements or help in minor but blocking issues that would be less likely to ask people directly; a group chat is helpful.

For less direct interruptions than IMs or phone; a group chat message which people can respond to when suitable will improve productivity.

Even for non distributed teams, IRC is an important productivity and culture tool. Continuous inconsiderate interruptions will kill productivity, while quick but asynchronous discussions smooth over the time requirements of the person asking and the person responding.

Unfortunately IRC is just too ugly, too much unix/hacker impression, too old; for an enterprise / self important company to consider.

Alternatives like the now discontinued Google Wave, 37signals's CampFire and others exist, but an internal IRC server does solve all these issues.

Tuesday, 21 September 2010

People's kids on profile photos

my football Think Ill replace my photo with my football. It is very dear to me, so it must represent me.

Will you first try to work out if you recognise the ball? Would you even care who the ball is, or just skip the post as you don't know who it is at a glance.

me and football What about a photo of me and the ball? Do you first try and work out whether I am the ball or me? Why is the ball relevant to tell you who I am, have you met my ball?


football team What about a zoomed our photo of my whole football team, they are my "family". Would anyone recognise who I am? Without zooming fullscreen?

Off course I know Ill change my profile photo to my eventual offsprings as well.

Tuesday, 7 September 2010

Review of Groovy for Domain-Specific Languages

I recently read the Groovy for Domain-Specific-Languages book by Fergal Dearle. The book essentially covers what Groovy is, what DSL is and how to apply Groovy to incorporate a DSL for your applications.

After reading the book I have to agree that if you intend to create a DSL, which we basically do unintentionally all the time, then Groovy can fulfil these requirements with ease and simplicity.

The book is a easy to read book with clear text, syntax and examples without being too thick and not seem a like a javadoc of information overload. It is rather quick to read through due to the nice flow. The layout do make it a nice reference for myself in the future as it is laid out clearly and contains a large variety of working examples.

The book starts of with first explaining the concepts of what DSL is, what it means in terms of computer science history and how we already use them.

It then goes on to explain in clear but complete detail what Groovy is and does. Actually these chapters are a good introduction to Groovy book in themselves.

Dearle then procedes to explain the main technologies built on top or as part of Groovy such as the web framework: Grails, the Groovy Ant builder scripting tool: Gant, Groovy & Grails ORM database mapper: Gorm, BDD frameworks and similar technologies. This it does in enough detail so that you have a good idea what they do and can experiment with yourself afterwards.

The last half of the book Dearle then brings Groovy and the related technologies back into the DSL fold and explains why and how Groovy is excellent for DSL writing. E.g: Groovy’s dynamic nature, closures, or the multitude of “Builders” which basically are DSLs outright.

These chapters of the book has a large set of basically Cook Book examples of Groovy DSL writing, builders and finishes with how to integrate Groovy with Spring, XML, Ant and existing Java applications.

I was already aware of Groovy’s suitability as a DSL language, but I am now even more convinced of its power, ease and fit as a or rather the DSL. If you would like to have a peak at the book there is a free chapter, or why not buy the book? ( amazon.co.uk, amazon.com, Packt)

(Note: this book was also reviewed on slashdot this summer)

Thursday, 26 August 2010

What more important than Productivity?

With modern day communications and old, the proliferation of open plan offices and persistence of micro management I wonder if companies really prioritise productivity enough. (This may be the same issue across business segments and professions, however I only really know IT.)

Jason Fried of 37Signals recently was interviewed about the never ending interruptions at work and how it results in longer working hours, more stress and generally lower productivity. He describes (among other things) the old fashion top-down management style's instance of continuously calling meetings to get status or decisions or walking up to you or calling to get status or feedback. With co workers doing the same as well as calling you over to solve an ad hoc problem the time to actually concentrate and get any of your own work done is almost impossible until the end of the day, and results in longer days.

The same issues I encounter all the time. Useless meetings where I only need to be conscious for 5% of the time. Using tools such as MS Live Meeting from my own desk means I can do other things during the meeting, however also the disconnected nature results in often me not quite following what others are saying and either miss opportunities for vital input I might have or context when I need to respond. It is frustrating that the closer you come to a deadline the more meetings are called for status and less work you can do.... Not very agile.

The meetings however I can deal with, it is the noise and interruptions of open plan office and with micro management that I think affects productivity the most. I did previously blog of my distaste and issues with open plan offices, and suggested solution for layout, the lagoon. Open plan in general is not compatible with developers due to its nature if "increased" communication. Open plan lowers the barrier to interrupt others which may solve your specific problem quicker however it delays not just the person you interrupted but also people nearby that was affected by your "noise". That delay and noise is very expensive for developers whom need to concentrate. But unfortunately the people that plan and evaluate the benefits of open plan offices are management, admin or finance for whom communication is paramount and the need to concentrate very short, so the lost productivity is ignored.

Jason described how the solved some of their interruption problems by using their own products, Campfire, which in general is a visual IRC and IM. This way people can ask for help or discuss subjects asynchronously and limits interruptions as people can respond when they have finished their concentration period. Sure, their individual problem is not solved immediately, but work across teams are optimised. Business critical emergencies should probably still be shouted out about though.

I certainly believe in the use of IM and would love more use of IRC and similar tools at work. I don't like the copy all emails, I detest people calling me for non urgent issues, and find people walking up to me a nuisance when it is the same people over and over again. I try to restrict phoning people for issues that are non critical to the company, as I know how inefficient it is of their time and would be annoyed if anyone did the same to me. However often management and other "communication" roles insist on this type of communication of status. ( But then again the people you need to call for status are often not good with communicating their status. E.g. not updating issue status in tools, or simple email that the issue is worked on or even email response of status when quiet for too long. )

All this disturbance usually results in that I can only really do "proper" development late afternoon. So I usually work 3-4 hours later than colleagues if I have tasks I need to finish as they can not all be done during office hours due to all the interruptions. The lost productivity across the company will vary but all this interruptions due to open plan offices and communication procedures must cost companies a lot of money!

In this time of agile projects, the agile teams usually get to decide their tools to more agile and productive. Projects still stuck with non agile often get told what tools to use. And both agile and non-agile get told what office space to use, irrespective of productivity.

Communication is important, however should not be at the cost of productivity. Agile thinking (KanBan) of focusing on few tasks is important, but always interrupting everyone else to solve your problem is not productive. Using tools to asynchronously communicate with people relevant people, limiting noise by using rooms of fewer / team related / similar people, encourage voluntary quick coffee breaks / rubber duck sessions, applying the pomodoro technique, can mitigate and solve this productivity issue, while still keep up a high level of communication.

Friday, 23 July 2010

Spring MVC ExceptionHandler needs to be in same class

Had a frustrating evening (pet project) trying to get Spring 3.0 MVC's annotation based exception handler to work.

All the examples seemed straight forwards:

Just annotate a method in a controller:
import org.springframe...ExceptionHandler;
import org.springframe...ModelAndView;
import org.springframe...Controller;
....
@Controller
public class MyController {
....
@ExceptionHandler(SomeException.class)
public ModelAndView myExceptionHandler(
    SomeException exception){
  blah
}
...
}


But it just would never catch my exceptions. Very frustrating.

But in the end a google search to the end of the world where someone mentioned in the comments that the exceptionhandler method have to be be in the same class as the method throwing the exception.

Very odd restriction compared to Spring's usual very agile and generic annotation.

So I added my handlers to my abstract controller class that all my controllers extend and problem solved, with some hair still intact.

Tuesday, 20 July 2010

org.hibernate.MappingException: Could not determine type for Set / List

I was simplifying the domain model of a pet project by removing an unneccesarry entity by using JPA 2.0's ElementCollection annotation:

public class SecurityDetail {

public enum AuthorityRole{
  ROLE_ADMIN,
  ROLE_SUPER,
  ROLE_USER
}
....
@ElementCollection
@CollectionTable(
  name="Authority",
  joinColumns=@JoinColumn(name="username")
)
private Set authorities;
....


However I was getting this error message:
org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: SecurityDetail, for columns: [org.hibernate.mapping.Column(authorities)]


Digging around (googling) I ended up on this blog entry: blog.m1key.me/2010/06/orghibernatemappingexception-could-not.html, which main solution is to make sure you have a newer hibernate, version 3.5.3 or later.


I use maven, with the hibernate3-maven-plugin, sql-maven-plugin and dbunit-maven-plugin to create the schema, database and to populate data. So I bumped the org.hibernate:hibernate-entitymanager dependency from 3.5.0 to 3.5.3-Final. (and fixed my own nexus repository to pull JBoss's latest jars.)

However it did not fix the problem. But by reading the comments of the blog entry above I also realised that my hibernate3-maven-plugin may be using older dependencies. So I explicitly added the recent verions of org.hibernate:hibernate-core dependency to both the plugin and the app, as well as org.hibernate:hibernate-entitymanager to the plugin as well:

<properties>
  <hibernate.version>3.5.3-Final</hibernate.version>
</properties>
....
<dependencies>
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>${hibernate.version}</version>
    <exclusions>
      <exclusion>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
      </exclusion>
      <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
      </exclusion>
    </exclusions>
  </dependency>
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>${hibernate.version}</version>
    <exclusions>
      <exclusion>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
      </exclusion>
      <exclusion>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
      </exclusion>
    </exclusions>
  </dependency>
</dependencies>
....
<plugins>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>hibernate3-maven-plugin</artifactId>
    <version>2.2</version>
    <executions>
      <execution>
        <phase>process-classes</phase>
        <goals>
          <goal>hbm2ddl</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <components>
        <component>
          <name>hbm2ddl</name>
          <implementation>jpaconfiguration</implementation>
        </component>
      </components>
      <componentProperties>
        <persistenceunit>${project.artifactId}</persistenceunit>
        <outputfilename>schema.ddl</outputfilename>
        <drop>false</drop>
        <create>true</create>
        <export>false</export>
        <format>true</format>
      </componentProperties>
    </configuration>
    <dependencies>
      <dependency>
        <groupId>hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
        <exclusions>
          <exclusion>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
        <exclusions>
          <exclusion>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </plugin>
</plugins>

Friday, 16 July 2010

Groovy for DSL

Started reading through Groovy for Domain Specific Languages, a new book by Fergal Dearle. As I interested in how to apply Groovy in more enterprise applications I would have normally liked to read this book, however I was also asked to write a review of the book, so Id better read it! How to keep DSLs easy to read while easy to create and maintain with Groovy will be something I hope this book covers.

The book was also reviewed on slashdot recently.

You can read the free chapter or buy the book yourself at e.g. amazon.co.uk, amazon.com or Packt.

Any comments of others interested in Groovy, especially in the DSL area are very welcome?

Friday, 2 July 2010

Skinny WAR Assembly in maven

If you want to create a "Skinny WAR" so that you can package it as part of an EAR or as in my case as part of an assembly later, then you can do this:


<plugin>
   <artifactId>maven-war-plugin</artifactId>
   <version>2.1-beta-1</version>
   <configuration>
     <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
     <archive>
       <manifest>
         <addClasspath>true</addClasspath>
         <classpathPrefix>lib/</classpathPrefix>
       </manifest>
     </archive>
   </configuration>
</plugin>


If you then later in another pom.xml want to include this war and the excluded libraries:


<dependency>
   <groupId>${project.groupId}</groupId>
   <artifactId>you war module name</artifactId>
   <version>${project.version}</version>
   <type>war</type>
</dependency>
<dependency>
   <groupId>${project.groupId}</groupId>
   <artifactId>you war module name</artifactId>
   <version>${project.version}</version>
   <type>pom</type>
</dependency>

Maven Jetty and Tomcat dependencies with JSP / JSTL errors

I use Jetty as a Maven plugin during development, but tend to run Tomcat as my deployment server. (Not sure "production" is appropiate as it's my personal server). My applications are often java MVC based utilising some form of JSP.

This combination creates a slight issue with dependencies for JSP and JSTL. If you have ever seen this error when running mvn jetty:run:

java.lang.ClassNotFoundException: org.apache.el.ExpressionFactoryImpl

Or these errors when running in tomcat when it was okay in jetty:

javax.servlet.jsp.JspApplicationContext
.getExpressionFactory()Ljavax/el/ExpressionFactory


or

org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file

or

java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"

Over the last few years I have perservered and solved this flat wheel in different ways. However in my recent deja-vue I now have a tidy solution. (the project where this is visable is my up4 project. github source, demo)

I am utilising the jetty maven plugin, and the tomcat maven plugin to show how this works.


<plugin>
<groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
   <version>7.0.2.v20100331</version>
</plugin>
<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>tomcat-maven-plugin</artifactId>
</plugin>


To utilise JSP pages and JSTL EL with e.g. Spring MVC / Struts Tiles you perhaps expect these types of maven dependencies, remembering that most containers include support for Servelet API and JSPs:


<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet.jsp</groupId>
   <artifactId>jsp-api</artifactId>
   <version>2.1</version>
   <scope>compile</scope>
</dependency>
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.2</version>
</dependency>


If you then try mvn clean jetty:run you may end up with a:

java.lang.ClassNotFoundException: org.apache.el.ExpressionFactoryImpl

A response which will solve the jetty problem is to include some jstl EL dependencies:


<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet.jsp</groupId>
   <artifactId>jsp-api</artifactId>
   <version>2.1</version>
   <scope>compile</scope>
</dependency>
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.2</version>
</dependency>
<dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>jasper-el</artifactId>
   <version>6.0.26</version>
</dependency>


mvn jetty:run

This should now work fine in Jetty (test in browser as well).

Now try the application in tomcat: mvn clean tomcat:run . It will moan about unable to read some the JSTL taglibs:

org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file

This due to the compile scope of the jsp-api dependency, changing this to provided:


<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet.jsp</groupId>
   <artifactId>jsp-api</artifactId>
   <version>2.1</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.2</version>
</dependency>
<dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>jasper-el</artifactId>
   <version>6.0.26</version>
</dependency>


Test first in mvn jetty:run , which should be okay.

Then in mvn clean tomcat:run . It starts ok, but on the first browser test this error appears:

javax.servlet.jsp.JspApplicationContext
.getExpressionFactory()Ljavax/el/ExpressionFactory


Okay, so Tomcat does not like JSTL EL dependencies as it provides them itself, so my initial respone was to have a separate profile which changed the scope of the dependency to provided for tomcat builds only. However on further reflection it turns out the spec says JSP & EL should be provided by the container. So in fact the problem lays with Jetty, and it turns out the move to eclipse.org created a licensing issue with JSP, so jetty does not include the appropiate libs. So to fix this the correct dependencies will have to be:

In your plugins section:


<plugin>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
   <version>7.0.2.v20100331</version>
   <dependencies>
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jsp-2.1-glassfish</artifactId>
       <version>9.1.1.B60.25.p2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.tomcat</groupId>
       <artifactId>el-api</artifactId>
       <version>6.0.26</version>
     </dependency>
     <dependency>
       <groupId>org.apache.tomcat</groupId>
       <artifactId>jasper-el</artifactId>
       <version>6.0.26</version>
     </dependency>
   </dependencies>
</plugin>


And in your normal dependencies section:


<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet.jsp</groupId>
   <artifactId>jsp-api</artifactId>
   <version>2.1</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.2</version>
</dependency>
<dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>el-api</artifactId>
   <version>6.0.26</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>jasper-el</artifactId>
   <version>6.0.26</version>
   <scope>provided</scope>
</dependency>


mvn jetty:run & mvn tomcat:run

Voila.


Ps. If you are providing a WAR for another jetty container, you may want to create a profile section which include the provided dependencies.

Ps2. If you prefer Sun's EL libs then replace the org.apache.tomcat dependencies with:

<dependency>
   <groupId>javax.el</groupId>
   <artifactId>el-api</artifactId>
   <version>2.2</version>
   <scope>compile</scope>
</dependency>
<dependency>
   <groupId>org.glassfish.web</groupId>
   <artifactId>el-impl</artifactId>
   <scope>runtime</scope>
   <version>2.2</version>
</dependency>

Friday, 25 June 2010

Ignorant or prejudiced Media?

Right at the end of the USA v Algeria match, the Algerian captain Antar Yahia was sent off for a second bookable offence. But it was a classic case of mistaken identity by the Belgian referee Frank de Bleeckere.

In the replays you can see it is 2 or 3 others that is shouting at the referee, one which looks similar to Yahia but you can see by his name it is a different player. The referee turns around and walks away as he has decided they have overstepped the mark.

Yahia then arrives and does what a captain should and pulls his players away. He is then the only player left when the referee turns back around this time with his yellow card and shows it to Yahia by mistake. This was his 2nd card and he was sent off.

Yahia is baffled but walks straight off the pitch to his credit. (This is not to say Yahia perhaps deserved another yellow card earlier in the match even red)

As this was in 90+ m, in injury time, it did not really affect the result nor did Algeria have any chance of progression, but it affects Algeria's reputation as again they have had a player sent off instead of a simple yellow card.


What is remarkable is that this has barely been mentioned in the media afterwards. Any Google searches only reveals match reports and comments again about Algeria failing to control their tempers. Yahia is stated as deserving his 2nd card due to abuse of the referee. [1] [2] [3] Had this been England, US, Italy etc the referee would be ridiculed in the papers, but Algeria.. no mention.

Monday, 31 May 2010

DB2 client on Windows 7

(Unfortunetly) I have been trying to install DB2 on my Windows 7 laptop as my recent assignment is very Websphere/DB2 centric. And even the unit test rely on a DB2 database.

For some reason v9.5 of DB2 Enterprise server does not like my laptop. :(

But we have standardised VM images of the DB2/Websphere set up that I could use, which is a very good practice. However as we use the type2 jdbc driver you still need a local DB2 Client installed, which again did not work...

But my solution did work: I installed the simpler Runtime Client.

Here is the steps I took.

  1. Installed our pre configured VM image

  2. Downloaded our ready made DB2 profile configuration txt file for the VM

  3. Modified my host file to alias the hostname used in txt file correctly to my VM's IP

  4. I read "Which DB2 9.5 client connectivity option is right for you?",

  5. downloaded the DB2 v9.5 Runtime Client and installed it

  6. and applied the tips on howto import the profile configuration by command line via db2cfimp file.txt



Hope this is of use to others with DB2 + Windows 7 grievances.

Friday, 28 May 2010

Pay IT people in gadgets! (Office perks)

I was talking to my collegue Rune regarding gadgets at work as an office perk as well as improving efficiency.

He was saying that IT staff (by which we mostly meant us and similar developers) love gadgets. And he would love to receive a new phone and/or pc every 6 months and thinks it actually would be benificiary to the company.

You may think that is an extraordinary unneccessary expense in hardware and install/configuration time but I think it may actually be cost effective or at least cost neutralised.

It would make staff happier and thus less likely to leave. Thus saving on reqruitement and training.

Perks are often used as a way to keep salaries down. It may reduce your salary expense which is the bulk of all company and projects costs, while still entice people to stay.

By leveraging more virtual machines the configuration costs would be reduced.

Basically we (maybe not everyone, but a large majority I think) love to tinker with new gadgets.



I know some people in my own team have left to work for companies that have an individual "gadget budget", not their only reason for leaving but a nice sweetner.

I think the cost of gadgets per year e.g £2,000 compared to salaries of £50,000 may be good retention reasons and probably can be off set against company tax etc.


Apart from job satisfaction and enjoyment, some people may be well organised or cynical to only consider salary as their only job incentive. With which they say they can join the gym they want if needed, pay for the cabin/flat/hotel for the holidays when needed, choose their own home pc etc. However I think most then just travel less, train less and have old gadgets etc and have a lesser life for it.

I love the perks I currently get with e.g. company cabins. I went 5 times this winter to skiing cabins. If I had to pay for them I may have gone only once, if that. When we had a large sports hall in our office building up until last year I played football, floorball and basketball there every week. Now since we moved office where we no longer have access to such facility I have not played floorball and basketball since, and rarely play footie as well.


Basically I am a sucker for perks, and I think most IT people would be alured by gadget perks.


Note: I have previously blogged about Why waste money with inferior equipment as so much time and therefore money is wasted due to inferiour hardware or outdated tools. Investing in new hardware and tools continously would keep those costs down, with some additional configuration cost, but savings in staff costs and the exponential maintenance cost of legacy tools and systems.

Thursday, 27 May 2010

Recommended Android apps

This is a list of Android apps I use and/or recommend. As Android Market is quite a user unfriendly especially when it comes to actually find apps, distinguish quality from copycat rubbish, regional relevance etc so I hope it is of use to some people looking for tips or reviews.

All these apps are free as I live in Norway, and Google Market does not allow paid apps in Scandinavia or most of the world. Great policy.... :(


  1. Touiteur. My prefered Twitter client

  2. Locale Useful tool that changes settings on your phone depending on different conditions. I use it to lower my ringtone at work, change autolock to off at home, turn of volume during the night, switch on wifi at home, reduce brightness in evening.
    Note: Locale is no longer free so no longer recommended

  3. Wave Secure Security app that can remotely locate you lost/stolen phone and do various things such as play a ringtone to locate it, backup data or even wipe / disable the handset.
    I no longer use it as it is trialware and was worried about battery consumption.

  4. Remember the Milk I just would not function without my rmilk controlling my life

  5. Dolphin A browser. Quite useful. Not 100% switched to it from the stock one, but give it a try.

  6. Spotify Music streaming. Can't live without it.

  7. PlayNow by SonyEricsson. Music, games and app store by Sony. Quite a good selection of music. Included with my X10

  8. MediaScape by SonyEricsson. Media Photos/Music/Videos organiser and viewer. Works very well. Included with my X10

  9. TimeScape by SonyEricsson. Social and communication tool. Neat, but some scaling issue with social tools (Twitter/Facebook). Included with my X10

  10. 1881 Mobilsøk who is calling lookup tool in Norway. Works with all numbers so far.

  11. Listen by Google. My Podcast listener. Use it all the time for my JavaPosse addiction

  12. Places by Google. Very usefull lookup of local info eg resturants etc.

  13. SayMyName text-to-speach announcer of who is calling. I like it even though it really can't pronounce my sister's name: Hege

  14. SMS Popup Handy SMS previewer

  15. Compass by Google. Does what it says on the tin.

  16. SkyMap by Google. Keep forgetting to actual try it in the dark...

  17. MyTrack by Google. Cycling/Hiking route tracker.

  18. MyCityBikes Quick usefull information on how many bikes / places available city bike stands around Oslo (and perhaps others)

  19. Delicous Usefull to bookmark e.g. twitter links to look at later.

  20. Facebook yup, does facebook.

  21. Opera Mini Nice browser, but I stil use the stock Androind browser or Dolphin.

  22. TrackId by SonyEricsson. Like Shazam identifies music tracks by listening to them. Never really used either in practice. Included with my X10

  23. CallFilter Enables ignoring unknown callers.

  24. Trafikanten Excellent tool which suggest bus/tram/tube/train travell in Oslo by position and real time data.

  25. Layar Ads information about the area in your vicinity / camera view

  26. AutoLock Customises when your Android handset is locked (require pattern thing to unlock)

  27. Moxier Mail Use it to read my work Mail via MicroSoft Exchange ActiveSync

  28. Moxier Calendar Use it to read my work calendar

  29. Moxier World handy little weather tool

  30. Shopper by Google. Nice for demos but too US centric to be useful

  31. Goggles by Google. Nice for demos but too US centric to be useful

  32. Gesture Search by Google. Neat but never really used it practice

  33. Maps by Google. Included with my X10 and probably all Android handsets?

  34. Navigation by Google. Does not work in Norway

  35. Gmail by Google. Included with my X10 and probably all Android handsets?

  36. Google Talk by Google. Included with my X10 and probably all Android handsets?

  37. FourSquare Works well, although hard to add new places.

  38. Apollo Task Killer My first task killer. I use this one as my continously running auto killer

  39. Advanced Task Killer My other task killer. Which I on demand kill tasks. If you only need one, I prefer this one over the first one.

  40. Quick settings (with lowercase s) by SonyEricsson. Very handy and pretty widget for toggling wifi, bluetooth, gps and sound. Included with my X10

  41. Quick Settings handy widget for changing brightness amongst others.

  42. Currency Converter Usefull with nice charts as well. Could do with quick left/right switch button.

  43. Autopilot for Locale. Uninstalled when Locale became unavailable.

  44. WisePilot Its trialware and expired before I really used it. Included with my X10

  45. Youtube by Google. Not really used much. Nice for demos but not in practice. Included with my X10 and probably all Android handsets?

  46. eBuddy Multi channel chat client. Not used too much since Google Talk is already included with Android.

  47. Scoreboard Not used too much yet.

  48. Ringdroid Not used too much yet.

  49. ConnectBot SSH tool.

  50. Astro File manager.

  51. ES File Explorer

  52. StopWatch

  53. Unit Converter




Apps I miss from my old iPhone:
  1. TV2 Live Norwegian TV station have an app for football score updates and commentery with live video higlights

  2. Skype No Android version.

  3. Yr.no Weather app. The Android version is unstable.

  4. Kindle Think I could read some books on my 4" X10 screen

  5. iPortalen.no Not an app, but a webpage of iPhone compatible web sites. An Android version would be good!

  6. Doodle Jump

  7. SMSBank Handy little tool to see the balances of my accounts

  8. Notes

  9. NRK Radio

  10. Twitter nae Tweetie Touiteur is pretty good though.



Apps/Features I miss:
  1. Google Voice Not available outside the US

  2. Data Roaming Toggle widget

  3. Better keyboard I switch languages a lot, which was easy on the iPhone, but too many clicks in Android

  4. BBC iPlayer Region restrictions

  5. More useful Google Latitude/Foursquare/Gowalla I am only interested whom I know in the neighbourhood, and not on demand; I want to be told.

  6. MultiSIM! Hardware, but would love to switch between my Norwegian and UK SIM cards on the fly



Apps/Features I think exist but havent had time or found yet or is a paid app:
  1. Amazon ec2 console

  2. Jira overview

  3. Google Earth



Games:
  1. Air Control Addictive!

  2. Android LightSaber Compulsary

  3. Blow Up (LITE) Fun, but limited levels

  4. Chess

  5. Labyrith Lite Once calibrated it worked well.

  6. Pinball

  7. Quadrapop by SonyEricsson. Included with my X10

  8. Sodoku Free Works well

  9. Trap Quite addictive

  10. Tux Rider

  11. ThrottleCopter Simple, hard, but good.

  12. R.Thunder Lite Looks nice.

  13. Armadillo Roll Looks nice.

  14. BreakTheBlock

  15. SpeedForge 3D

  16. Space STG Galactic...

  17. Defend Homeland....

  18. Play Curling



Need to distinguish somehow how much I recommended the various apps...





Tuesday, 11 May 2010

Sony Ericsson Xperia X10 1 month review

I have had my Sony Ericsson Xperia X10i for about a month now, and thought I could have a more reflected review than perhaps the one I nearly wrote just after I received it.

My previous phone was an Apple iPhone 3GS, so I can compare the X10 to maybe its more glamorous competitor. I will also compare it to my previous phones, such as the Nokia N95 8GB and other Android based phones I know.


In brief, what is the Xperia X10?
It is Sony Ericsson's first Android based mobile phone.

Key features:

  • 4" touch screen with no keyboard

  • 8.1 mp camera with LED light and face recognition

  • 1GB memory, includes an 8GB SD card

  • Sony Ericsson's own Rachael GUI on top of Android 1.6

  • Includes Sony Ericsson's TimeScape app for social network and communication overview

  • Includes Sony Ericsson's MediaScape, PlayNow and TrackID apps




Its Good points (Pros)


It is Android based. So you are much more in control of your own phone compared to e.g. the iPhone. Background apps are no problem etc.

The looks.
It is a very good looking phone. It also feels good for such a large screen. Its not bulky in your pocket. Unlike my N95! The screen is also very clear and bright.


The camera is excellent.
The iPhone camera was quite rubbish in comparison.
The X10's photos are very clear.

The N95 5MB and good lens was good, but the X10 is better.

The camera button which N95 did also have which iPhone does not have is a significant benefit. No more fidling around trying to take photos while trying to find the button on the screen with your other hand.


MediaScape is really usefull.
Android stock software has no proper media apps. But being a Sony derivative company, the X10 shines in this department. Not quite the full iPhone/iTunes interaction but Im not complaining, The PlayNow store works well. MediaScape integrates well with Picasa's online photo storage, but not flickr. Some improvements can be made, but media wise the X10 is excellent.


The GUI interface that SE has on top of Android code named Rachael works really well. It is only a thin layer on top of Android but is more slick and consistant. It integrates well with menu options and contact list etc. So well you are not really aware it is there, but makes the X10 stand out compared to a stock Android system.


The MW600 bluetooth stereo headset that comes with the phone (as well as a good pair of wired headsets) is really good. It has built in FM radio as well.


Its bad points (Cons)


TimeScape does not scale well.
It is a really good demo app. But once you start using it in real life it fails miserably. It just is not designed for people on Facebook or Twitter with more than a couple of friends (ie most people). Im no stalker, I perhaps follow 100-200 on both Twitter and Facebook which is less than most, but that already makes the TimeScape interface unusuable, just a big motion blurred scroll list. Some future updates could fix this. Such as limiting to certain Twitter lists, and facebook groups of friends for example.


The Android market, the app store on these devices is not great compared to the Apple app store.

You can't buy any apps if you live in Scandinavia which is ridicoulous. So we are limited to free ones only.

I am not sure about the quality or security of many of these, most seem like raw copies of others. There is no regional information, so the list is e.g. italian metro system info or loads of US bank apps for example, which is of no interest to me. There is few ways to find apps of interest to me, or new apps that is well liked etc.

There are some good apps though, and Ill list some in another post.


Android 1.6
The phone ships with Android 1.6 which is an outdated Android version. SE have shot themselves a little in the foot with this error and have been laughed at in the press regarding this. However I don't think it is big issue. If you are not aware of the improvements in 2.0, 2.1 etc then it is not a problem.

However they do need to roll out an upgrade. SE have announced upgrades later on this year. Which seems very slow to me. If this is how they will delay future updates as well then I slightly concerned about their policy.



No multitouch
Partly because old Android version, but apparently also because of hardware issues.
Not that big a deal for me. I don't like pinch and zoom, and tend to use my phone with one hand anyway. However I can see this is a big issue for other people.

Call quality
Call quality is fine, but some of the people say they can here themselves. Solved by lowering my volume slightly but should have been cancelled out by the microphone instead.


Battery life


The biggest minus of the X10 is the battery life.
In brief it sucks.
From a large screened touch smart phone I was not expecting miracles. But it is rubbish even compared to the iPhone.

With e.g. my N95 I charged it every 2 or 3 days.

With my iPhone I charged it every day, but even if I didn't it was still alive in the morning. Not great but acceptable.

With my Xperia X10 I have to charge it twice a day otherwise it is a dead brick in the morning.

Which is attrioucious. Initial exuberance and overuse will result in more battery drain, but now I am in a normal usage pattern and this should not be acceptable. Disabling all auto syncing, auto killing processes etc should make it last a long time, but does not.

Android does come with a nice battery analyses app. And on most large screened smartphones it is the display that kills the battery. But on the X10 the display is 3-4%, while "Phone idle" takes ~50% and "Cell standby" taks 45%!! Two processes I would not expect to kill my phone. (Maybe cell standby if I was in a bad reception area, but Im not.)


Conclusion

If the battery problem gets sorted I would recommmend it to everyone. I do love the phone, but it just frustrating that it is often dead or dying.

If you are of a technology background or gadget fan then it is better than an iPhone.

However if all you want is a swish looking touch smart phone then iPhone's consistent well polished interface and apps are better.

If you still have a Nokia or similar, upgrade now!