Friday, 2 July 2010

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!


Monday, 10 May 2010

IntelliJ IDEA on Ubuntu (with Maven , Jetty and JRebel)

I have written an howto on Ubuntu+IntelliJ+Maven+Jetty+JRebel, basically a quick quide to get IntelliJ IDEA working on Ubuntu, with Maven, the Jetty plugin for Maven and with JRebel (JavaRebel).

It assumes a clean basic Ubuntu install, and is quite terse for now. I may extend it with more example work flows etc in the future.

Comments are welcome.

Wednesday, 24 February 2010

Scrum bashing - natural iterative evolution

Not throwing my weight into a current Scrum bashing trend that erupted this week, as I'm a nobody when it comes to agile. But I tend to agree some of the points and disagree with others.

It all started off with Uncle Bob responding to Chris Brookins whom was looking for some of Scrum shortcomings to present at his work.

That raised a large number of responses on the thread and in the blogsphere. People such as Jeff Anderson stated that it was time for Scrum to evolve.

Others such as Jurgen Appelo came in defense of Scrum by insisting people should stop pissing on Scrum.


Issues raised



  • No technical rules, ie no prescribed methods of insisting on CI, TDD etc.
    I dont agree with limiting Scrum to development only, but suggestions are fine, which they kind of already do.

  • Sprint lengths are too long.
    They are. But again agile carrots of emphasising e.g. 2 weeks are better than bashing teams that need longer sprints.

  • Scrum masters assume or are assumed to have to much power.
    That does happen too ften, but coaching of team members and external chickens are probably the solution.

  • CSM, Certified Scrum Masters.
    Yup the title does not help, I even got it....,
    but dropping it may result in very few taking the courses all together. Time will give a solution to this I think.

  • Backlog structure.
    Not sure this can be solved, because so many different type of organisations use scrum for a variety of usage, the items in the backlog are very different.
    Partially the problem here also lies in the pedantic use of manual physical task boards,which translate into difficulties in transferring stories/tasks.
    Also the tools available, e.g. Jira+Greenhopper, have poor support for Stories and Themes.

  • Anti management.
    Scrum and its adapters have a reputation of Anti management.
    This may be true as team members often would like to introduce Scrum for the empowering of the team in the decisions.
    But once implemented it is not so much the case.
    I would actually say it is a bit pro management, once they see the results and a clearer vision of their future. Also Scum increases management due to the team's own micromanagement and constant status reporting.

  • Automatic tests.
    It's Uncle Bob, Mr FitNesse. True, an essential part, but not always the rule.

  • Multiple teams.
    Yes, this is one point that Scrum struggles with.



Future of Scrum



I think this bashing of Scrum now is a natural evolution.

The early adopters, the evangelical Scrummers, now need a new fix, and are quite vocal in Scrum's negative points. The early sceptics, also realises Scrum does not solve everything and would like to move on.

But it is natural. RUP, then XP, Lean etc are not perfect, they are just an iterative history of continual evolution and improving methodology of teams and projects.

Scrum is not a bible to follow for the next 2000 years. But now, or rather 5 years ago it was the best thing around. It has helped a huge amount of organisations become agile. Not perfect, but a lot better than before.

We should not always jump to the new shiny thing, but it is probably time to evolve, to continually improve and never rest at least not too long.


I quite like ideas suggested by Kanban. Kanban practices more common sense. As Henrik Kniberg writes in his minibook about scrum and Kanban.

But again it is not the final evolution. And everyone should adapt their needs as appropiate. There is no need for this bashing of Scrum. But neither should we not try to improve it.

Tuesday, 23 February 2010

Dream employer past and present

With the demise of Sun following the Oracle's acquisition of it (or resurection depending on your view), I remembered that Sun Microsystem was once a "dream" employer of mine.

With Sun always seemingly on the forefront of technology, inventing(or acquiring) and leading the development of tools I liked; mainly Java but also within Unix, OpenOffice, VirtualBox, MySQL, etc.. And being fond of Open Source they were my "dream" company in the 90ies and early years of 2000.

But that faded over the last decade, so I began pondering what my current dream employers would be.


Current employer


And is it wise to speak/blog about other companies than my current? Would my current employer be offended or even future employers if not mentioned?

As Ive never been known to care too much about political correctness nor company politics I plow on regardless... Anyway would I still be at a company if I did not appreciate it? Maybe when I was a developer padawan I may have had less options, but today I can pick and choose so I don't think my current employer nor future ones will be that offended. :)


Dark past


Actually when I think about it, even Microsoft was a highly thought of employer in my early years. But grew out of that! Even IBM seemed attractive to the naïve student.


Today's dream companies




  1. SpringSource

    Avid user of their framework(s).
    Met a few of their employers whom seem great advocates for the company.
    But wary of VMWare influence, too corporate?
    (Offices in Southampton and now Frimley are close to family and potential future home in Alton, Hampshire.)

  2. Atlassian

    Great tools (Jira,Confluence,etc).
    Great supporters of Open Source projects.
    Influenced by their sponsering of JavaPosse.

  3. Canonical

    The company behind Ubuntu.
    Nice ethos, even the Ubuntu name.
    But perhaps not a Java company?
    And Im defintely not a C man.

  4. Twitter

    Great tool.
    Still a small company.
    But any relevant Java?

  5. Spotify

    Great tool.
    Great solution for future music.
    Interesting future.

  6. Amazon AWS

    Amazon web service, mostly ec2.
    Use it myself for my private servers,
    written documentation on how to use ec2 for others.
    Would be interesting to work with their cloud.

  7. Remember the milk

    Maybe too small?
    But supports distributed work force.

  8. Google

    Now too large. Nice ethos.
    Great innovators.
    Too algorithmic/academic culture.
    Bad reputation for coder burn.




Dream role/position out of scope


Dream/fantasy company/employer does not make working for them an ideal job. The actual position I would work as is obviously the crucial part. Perhaps you can have a dream position in an awfull company and the other way round. I am sure there always some disgruntled workers working for even in general fantastic companies.

Other factors such as job stability, salary and other compensations, location, coworkers, potential personal growth etc are all important but all out of scope for this list.


Analysis



If I review my list they tend to be smaller companies that have one or more great applications that I use myself. Perhaps they are not great companies, they just make great tools? Quite a few are also Open Source supporters.

And they may be cool companies, but are they working with what I do? Any Java? As I move away from a fulltime developer role and more and more into a system architect role, technology should be not so relevant, but I still mostly prefer Java based solutions (Or similar, Scala, Groovy etc). Due to less need to reinvent the wheel, more mature libraries, easier employment/training of developers, and personal indepth knowledge. And I do not know if these companies use Java, or even if they do if it is a marginalised technology choice.


Summary



What is important in the end is job satisfaction and that it supports my life outside work: Family etc. A great Norwegian motto is that "you work to have spare time". Ie the reason you work is to afford having quality spare time. In addition I think it is important that you enjoy what you work with. I do, basically I get paid to do my hobby.

If I am happy in a role the company should not matter. So this list will probably stay as a "dream" list". If I ever did work for one of them, I might actually see sides of the company that might tarnish the "dream" label!

In a perfect world, my dream company would be a charity. But I would feel guilty about demanding a significant salary from such a company. So my requirement of quality of life for me and my family may lower my ethical requirement of a company. But Microsoft is no longer on my list so I have some standards.

Actually anything based in a nice spot (Caribean, Barcelona, Meditereanian, New York) would have a great chance of making my list!

Tuesday, 9 February 2010

oracle java blog - netbeans

So Oracle has now finally gotten their Sun. What does this mean for me and the javasphere?

A lot of people have strong feelings about the aqcuisition/merger and some feel strongly against Oracle. I don't. I don't love Oracle, but I think Java will be fine, if not better with their stewardship.

Java



Oracle needs Java, they use it all over their own product line and obviously especially with their former Bea products Java is core to their business. So an evolving, healthy and competitive Java is in their interest.

So Java, JEE, the Java VM platform etc will be fine, with more money available than at Sun. Actually it may be better as Oracle has a lot more funding and marketing capability, and it may revive the ailing JCP?


But what about the other Sun products, and specifically those related to Java?


Glassfish


I don't use glassfish, at least not directly, so personally I have no strong feelings on how Oracle will proceede with Glassfish compared to its more corporate Weblogic.

I use Weblogic at work and either Jetty or Tomcat on pet projects at home.


Kenai


Kenai was to be killed, but read somewhere today it may be saved.
I don't use it. I have a few projects on Sourceforge, and future ones may be on SF or perhaps google code or Github.


Netbeans


Netbeans however I do use.

In the initial press release by Oracle on its plans for Sun's product line they stated it was to be focused as a scripting IDE and leave JEE, java enterprise level, to their own JDeveloper and Eclipse tools.

I use it with Maven and JEE modules so this feature strategy change would affect me very much. I dabled with eclipse for a few years, and still use when forced to at work, but prefer Netbean's cleaner interface (Its not made by IBM...)

However again in an updated press release they have a seperate java tooling page regarding their plans and they may not restrict it to that. Lets hope not.


Cloud


Oracle killed Sun's cloud computing ambitions. Fine by me. They are not into being a hosting provider.

I use Amazon's ec2 a lot, and will not miss it. However I did not know enough about its features compared to ec2 and Google's App engine. It would have to be much better than those to have been worth it. Maybe it was more like Ubuntu's cloud offering with hardware hosting?


VirtualBox


VirtualBox I do use, and glad it looks like it will be kept as is, I think.


Solaris


I have no strong feelings for or against Solaris, but keeping it competitive is probably in their interest.

The hardware and other areas I am not too bothered about. I used Sparc at university, but not since.

Other links:
http://blogs.oracle.com/devtools/2010/02/updated_faq_for_the_developer.html
http://www.oracle.com/ocom/groups/public/documents/webcontent/038563.pdf

Monday, 8 February 2010

Excellent tip on how to go to sleep

(For once a non tech related posts, but still perhaps nerdy...)

I've worked out how to fall asleep quickly, and this is my simple tip:

Basically I start to think/daydream about a fantasy story. Ie something completely irrelevant but interesting.

Maybe it is by coincidence or due to other factors like getting older or simply exhaustion but it seems to work evertime. And fails everytime I don't follow these rules.

So it has to be nothing realistic or related to my real life in anyway. If I think about something in my actual life I get too upset/depressed/happy/excited and very engaged into the thinking that I don't fall asleep.


So my rules are:

  • Never think about what I did today or what I need to do tomorrow. That engages my brain too much and I can't fall sleep.

  • Don't think about regrets of the past or problems in the future, again no sleep.

  • Don't think about anyone you know whether romantically or aggressively. No good can come of that. Well maybe...

  • Don't think about work or hobbies. You minds gets too active to fall sleep.


Think about something interesting that can not upset you in anyway. Which is best if it is something not related to you at all.


The famous tip of counting sheep [2] jumping over a fence works on the same idea, but never worked for me as it was too boring. I remember a tip on a radio show that also is similar; The lady said she "thought and concentrated" about each part of her body from toes upwards step by step till she felt asleep. Doesn't work for me but is again related to concentrating on something completely irrelevant.


My thoughts/dreams are usually almost like a Hollywood film. Something not related to my real life, but I "live" in detail in these worlds. Maybe because I am a man (with a vivid imagination) that my snoozethoughts are related to wild western / jungles / space / racing cars etc but they work.

I can continue the same story for months usually because I fall asleep so quickly so never really get anywhere in the actual story line!

If trying to sleep try to block out all other thoughts and imagine yourself living a life in a place like the Avatar film, then maybe this will work for you?

If you have problem sleeping, try it!
Don't think about anything in your real life, think unrelated fantasy, and zzzzzzz.

Friday, 22 January 2010

Ubuntufying Jira

This will eventually be published here: flurdy.com/docs/jira/.

But meanwhile Ill edit a draft here:



Ok. Ive "finished" the document. Please read it on my website.


Ignore below


Below is my initial draft howto, but a much more up to date version is on my site.



Why


I want to install and run Atlassian's Jira, as it is just great. Especially as I many moons ago had paid for the $10 starter pack for Jira and Confluence

I want to install and run it on an Ubuntu server.

Downloading the standalone version of Jira works very well. Atlassian has very thorough documentation of every step and issue possible.

But I want to be different... No I just like the idea of Ubuntu/debian's package system and obeying the FHS recommendation of file locations etc. So I decided to modify the download from Atlassian:

Steps



Install Jira as recommended


Launch Ubuntu (Follow flurdy ec2 docs for tips on using Ubuntu & ec2)

Install java:
sudo aptitude install sun-java6-jdk;
sudo update-alternatives --config java;
sudo echo JAVA_HOME=/usr/lib/jvm/java-6-sun > /etc/profile.d/java.sh;
sudo echo EXPORT JAVA_HOME >> /etc/profile.d/java.sh;
sudo chmod +x /etc/profile.d/java.sh

Download jira standalone

Extract and move Jira
tar xzf atlassian-jira-enterprise-4.0.1-standalone.tar.gz;
sudo mkdir /opt/atlassian;
sudo mv atlassian-jira*-standalone /opt/atlassian/jira-4.0.1

Add Jira user
sudo /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira;
sudo chown -R jira:jira /opt/atlassian/jira-4.0.1


If you are not interested in seperating the file locations etc, then you could now run Jira by launching
sudo /opt/atlassian/jira-4.0.1/bin/startup.sh
But I prefer not to...


Makign the install more FHSish



Create folder for changeable data
sudo mkdir /etc/opt/atlassian /etc/opt/atlassian/jira;
sudo mkdir /var/opt/atlassian /var/opt/atlassian/jira;
sudo chown jira:jira /etc/opt/atlassian/jira /var/opt/atlassian/jira


Move logs
sudo mv /opt/atlassian/jira-4.0.1/logs /var/log/jira;
sudo touch /var/log/jira/atlassian-jira.log;
sudo chown jira:jira /var/log/jira/atlassian-jira.log;
sudo ln -s /var/log/jira/atlassian-jira.log /opt/atlassian/jira-4.0.1/atlassian-jira.log;


Link configurations
sudo ln -s /opt/atlassian/jira-4.0.1/atlassian-jira/WEB-INF/classes/jira-application.properties\
/etc/opt/atlassian/jira/;

sudo ln -s /opt/atlassian/jira-4.0.1/atlassian-jira/WEB-INF/classes/log4j.properties\
/etc/opt/atlassian/jira/;

sudo mv /opt/atlassian/jira-4.0.1/conf\
/etc/opt/atlassian/jira/tomcat;

sudo ln -s /etc/opt/atlasiian/jira/tomcat\
/opt/atlassian/jira-4.0.1/conf



Edit configuration and enter Jira home
sudo vi /etc/opt/atlassian/jira/jira-application.properties;
jira.home=/var/opt/atlassian/jira


Move the database
sudo mkdir /var/lib/hsqldb;
sudo mkdir /var/lib/hsqldb/jira;
sudo chown jira:jira /var/lib/hsqldb/jira;
sudo ln -s /var/lib/hsqldb/jira\
/opt/atlassian/jira-4.0.1/database



Move non static tomcat files
sudo mkdir /var/opt/atlassian/jira-tomcat;
sudo mv /opt/atlassian/jira-4.0.1/work\
/var/opt/atlassian/jira-tomcat/;

sudo mv /opt/atlassian/jira-4.0.1/temp\
/var/opt/atlassian/jira-tomcat/;

sudo ln -s /var/opt/atlassian/jira-tomcat/work\
/opt/atlassian/jira-4.0.1/;

sudo ln -s /var/opt/atlassian/jira-tomcat/temp\
/opt/atlassian/jira-4.0.1/





Init script



Copy Atlassian's init.d script


Jira port


Follo Atlassian's port page.



Apache proxy



Using elements from my own tomcat+apache howto and Atlassian's Apache page




Monday, 21 December 2009

Islands and lagoones - office open plan rant

Time to rant/moan/"throw my toys out of the pram" regarding another perhaps insignificant matter:

open plan

Open plan offices, I don't like them.

Unfortunetly it is now the norm in almost all the offices I work or visit. It is meant to enhance team work, increase communication, lowering barriers etc. And while the idea sounds good, I find it very tedious and believe it is counter productive.

But I know a solution; small open plan rooms laid out in a lagoon style. More detail further down.



For a knowledge worker, a developer, normal open plan offices are very intrusive and limits the ability to work effectively. For managers, sales and administration staff whom require a lot of communication and less concentration I can certainly believe it is a benefit, but not for people whom need to concentrate.


Placing people in rows of desks facing each other is much an extension to the American cubicle office spaces. It is like an office factory. The current trend of islands, whilst better, especially if two backs against a wall,
islands
but still leaves two or more in the wind swept corridor seats. But they still suffer from all the issues I detail below.

An even more amusing contradiction is when the knowledge staff are in an open plan office but the administration are in separate offices. It should really be the opposite, in terms of whom need to be isolated. True they may have confidential work, but that is what quiet rooms are for.


Main issues

  1. open-plan-bad-health
    An important issue should be that open plan office is bad for your health.

  2. The noise is however my main problem. Both audible and visual noise.

    • People talking about items which does not interests me but still disturbs me and breaks my concentration. Or worse talks about something interesting! Especially if you are as nosy as I am.

    • People walking by especially if you have a door / virtual corridor view point. Again being a bit nosy, my head pops up and down like a bobble head doll every time someone walks in, and since about 30 people sits in this section + meeting rooms, that is quite often.

  3. Low barrier to disturb.
    hi, just wondering...

    Nothing as annoying (ok a bit strong..) as when someone walks up to ask a question, when you are in the zone, in deep concentration, got a number of values, logic flows and algorithms in your head. Especially if it just a status update (not very agile), or a lazy question.

    Emails and IMs you can schedule a time to reply to when you are not in the middle of something. Phone calls, whilst annoying, can be rejected, But people standing over you can not be ignored. (Well you can try but that is not very nice)

  4. Paranoia.
    Another discomfort I have with open plan is the paranoia of people seeing your screen. You have to look busy, especially when I work as a consultant/contractor. It is another side of facetime, perhaps Screentime.

    Windows / websites that does not look like you are hard into coding right that minute might reflect bad upon you. So whether you are looking for solutions via google groups or downloading updates to applications but the vendor's website is too colourfull, it might reflect bad upon you even if it is important work. You hope most people realise this is normal work and even when you stray and look at bbc news, they would see it as normal.

    Unfortunetly many people do not perceive it this way, at least not subcontiously, so often you feel the need to cover your actual work with pretend work, especially for people higher up whom do not know your day-to-day work.

    Okay, after a while, (almost immidetely with me), I no longer care too much what others think I am doing, and run whatever applications and/or look at whatever websites I feel I need to. But it does still make me feel a bit paranoid, and still make me look over my shoulder, thus disturbing myself...


When disturbed, audible, visually or physically, it breaks your concentration and refering to the Peopleware book (wiki) it can take up to 20 mins to get back to that point. If this happens enough times during a day, that day is practically wasted.



Minor counter actions

  1. Head phones / headset

    • Music if loud enough kills audible noise.

      Which I use alot. Not sure what doctor would think about the damage to my ears. And wonder what Health & Safety would think about this near requirement for developers?

      It also scares the living daylights out of me when someone creeps up and taps me on the shoulder...

    • Headphones on but not on.

      A great trick to discourage unimportant interuptions is wearing head phones but without any music.

  2. Big, tall monitors, or just plain seperation screens to hide visible noise

    Again, a bit cubicle, but effective.

  3. Physical barriers

    Such as boxes, plants, narrow gaps to cupboards etc. Making it more difficult for people to actually come up to your desk, also discourages pointless interuptions.


All a bit anti-social, but with various effectivness they may help.

Bit these counter actions only paint over the main problems. The main issues are too many people in the room and no privacy.


The real solution


So my solution using the island nameing standard is: Lagoons.

Simple take a group of desks in an island and move their desks backwards to each corner or wall. Combine this with reducing the people in the room to 3-6 people whom work together.

What does this solve?:
  1. Audible noise:
    Only from the others in room can now be heard. No bable from people in other departments or teams which you could not care less about.
  2. Visual noise:
    Depends a bit on the layout of corridors etc, but mainly only the people in your little room will create visible noise.
  3. Physical disturbance:
    It would take more for people to walk into separate office rooms for minor issues that they could just as well emailed.
  4. Paranoia:
    You can work away, no one is looking over your should and virtually micro managing your every click.



Conditions of the room:

  1. They are all similar people and roles:
    So they will get on better, act similarly etc.

  2. Know how each other work and respect it.

  3. Reduce mobile phone use:
    Use quiet rooms when neccessary.

  4. One person is not frequently visited more than everyone else.

  5. Desks have space behind/ spare chairs for people to move around to encourage team work and pair programming.


defensive office

An amusing look at the defensive office space

Other office solutions:

  1. Separate individual offices.
    Would be nice, but might entice cabin fever and tangent development with little communication. And probably quite costly.

  2. Two per office.
    Can work, but people really have to get on very well. Also might feel need to socially interact more than normal, thus actually cause more interuptions.

  3. Home office.
    Really dependant on how the team communicates. Can work very well, if combined with excellent communications, and especially if time is split between a lagoon office and home.



Risks:

  1. Inter-room cooperation.
    The main issue this can cause is Us & Them situations between rooms.

    Possible solutions:
    1. Larger comfortable common coffee rooms. (with more than coffee available...)
      By combining this with actualy encouraging breaks this will stimulate interactions and break down barriers.
      rubber duck

      It can actually assist in problem solving by simulating rubber duck ([2], book) chat.
    2. The walls between does not need to be visually block each rooms.
      They can be glass at the top etc especially towards corridors etc. While still protecting against visual noise and paranoia this can hide the feeling of physical separations.





In the end for me personally, I need to be comfortable to get in the zone and be 10x more productive than in a busy noisy environment. And while everyone are different, I believe this applies to a large if not majority of developers and probably other knowledge workers.

Setting Spotify proxy settings when logging in

My problem:

* Installed Spotify for the first time on work machine.
* Work has very restrictive default proxy, which bans Spotify.

Thankfully being a developer in IT we know of a few more leniant alternative proxies....

Further problem:

* When launching spotify you need to log in with no option of defining the proxy to be used.
* And the error message just say unable to log in.


Solution:

* Unplug the the network cable

This prompts an error message with allow you to change the proxy settings.
Remember to plug in your cable again!

Tuesday, 8 December 2009

Deny mercurial, git, subverion folders in web sites

I maintain my websites mostly with a source control of some type (Subversion or Mercurial), but the folders with the SCM data should not be displayed on the actual web site.

Here is quick way to disable access to SCM folders in Apache by Ryan on Palaminum.net:

paluminum.net/blog/deny-scm-directories-with-apache