Finally got around to creating the additional marketplace images and application signing  to publish my first android app findr.

It’s still a beta so expect a few issues.findr feature graphic mosaic

I’m working on:

  • better storage to cache downloaded data
  • allow saving to SD card
  • better compression when setting as wallpaper
  • Live wallpaper

Why not give this a whirl and resist the 1 star ratings (if you can) and instead post some feedback or feature requests below or tweet me.

Dropbox allows you to sync your files online and across computers. 2GB account is free! http://db.tt/Tk9RpcD (Shameless referral alert)

I struggled to find time to preform code reviews around projects and tight deadlines? However I found if you are using RAD? then the Analyse tool can help your team be more efficient and reduce the code review time.

There is a cut down version of Rational Software Analyzer that is integrated into Rational Application Developer (RAD) 7.5 that allows you to improve code quality and decrease the time it takes to perform a code review. Initially you’ll probably find a fair few items identified, but trust me this reduces as you move forward and start using the analyser as part of your daily routine or even better nightly build. It’ll also help developers start coding to the same standards.

Our development team took the approach that you don’t ‘have’ to fix all the issues identified in a given project/component, but as a rule you should be running the Software Analyzer on the methods and classes you’ve created or edited. So if you edit a method with an issue (e.g missing java doc) it is your duty to correct it. If it’s more complex refactoring we treated on a case by case basis (normally down to experience of the developer). The pros as that all the developers gained more exposure to Java code standard and we were able to tidying some of the older code as we went along rather than a big block of refactoring.

For our first pass analysis I selected the most critical rules plus a few extra around javadoc.  Some might be not be applicable for example there’s a critical rule states you should check a objects type before casting it, a valid rule indeed however all the RAD generated code in the JSF backing beans breaks this rule, so you’ll want to ignore it for classes in the pagecode.* package. Example of RAD generated code that breaks the casting analysis check.

protected HtmlPanelGrid getNewPremiumdetailsbox1() {
if (newPremiumdetailsbox1 == null) {
newPremiumdetailsbox1 = (HtmlPanelGrid) findComponentInRoot(“newPremiumdetailsbox1”);
}
return newPremiumdetailsbox1;
}

The idea is that you Analysed your code before submitted for code review and that if you haven’t fixed the raised issue they should be a comment explaining why. All developers were asked to pay particular attention to the Java Doc rules – can’t really think of an excuse for not adhering to those rules?

My only gripe is that Rational Software Analyzer doesn’t contain explanation of the issue raised? why is not checking an object’s type before casting just an issue? obvious to some but not others.  This enhanced functionality is included in the standalone paid Rational Software Analyzer product. However found a quick google or question on Stackoverflow explains why certain issues have been flagged.

Here’s a few screen shots on how to kick it off:

Firstly go to Run > Analysis

Screenshot of launching the Analysis tool

This will launch the Software Analyzer config window, create a new configuration and import the rule set (or select a predefined one)

Screenshot Config window

Here’s the rules with there various priority levels these can be edited. Once your happy click Analyse to start.

Screenshot of the Code Analysis Rules

This is what you code will look like after the see the blue underlines and ticks and crosses to the left of the code.

screenshot showing the Rules flagged in code

My first android app is almost ready for the market place, drop me a tweet if you want to test the beta.

Description:

Findr allows the user to search the popular photo sharing website Flickr for images that have been tagged with location data. For example: architecture in New york. The retrieved items are displayed as either a list of thumbnail images or as locations on a google map. Selecting an item allows you to see more details and a long press on an item in the list enables the user to set the image as their device wallpaper.

Technical Notes:

I have used Yahoo Pipes Flickr module for this app as it’s a quick and easy way of the required images with geo data.  I’ll look to use the Flickr API directly for the next version.  I’ve developed Findr for Android version 2.1 allowing it to be compatible with the majority of Android devices.
I have used this opportunity as a chance to experiment with a two 3rd party libraries showing my willingness to build on the efforts of the Android community and satisfy my programming desire to code efficiently:
  1. Spring Android- I’m currently studying towards becoming a SpringSource Certified  Professional and I have discovered a version of their useful RestTemplate for Android I’ve used this to retrieve the RSS feed.
  2. ThumbnailAdapter  by Mark Murphy aka Commons ware – Mark mentioned this at Droidcon 2010. This has been specifically created to download thumbnails in the background without blocking the UI thread. This was ideal for the list items page.
Also based on Google’s UI guidelines I’ve added the Action bar element, using example resources from the Google IO Schedule application.

Recently had to move CVS repository to a new server, while I’m no CVS expert but in the land of the blind! Yadda, yadda, yadda… so down to me. A couple of googles later and with a sesnse of impending soom I did the following:

1. Stop the CVS service and Lock Service

2. Copy CVS Repo folder(s) to the new server

3. Install CVS on the new server – did full installation

4. Replicate the settings of the old server.

5. Add the folder as Repo location. I was able to add the repo location ok, but couldn’t connect 🙁 and when I tried adding a new folder to the repo I got the following error:

cvs init: connect to 127.0.0.1(127.0.0.1):2403 failed: No connection could be made because the target machine actively refused it. cvs [init aborted]: Couldn’t connect to lock server

So the server couldn’t connect to it’s own lockserver? Hmm… maybe the LockServer service wasn’t running or firewall interference? I checked both of these but all good. I thought let’s try stopping the lock server service, that worked! which is weird and the error seemed to say wasn’t running. Anywho I tried the telnet command again and got the CVSLock 2.0 Ready message so all seemed ok 🙂

TIP: When on the server, you can check the lock server using telnet try doing a “telnet localhost 2403” and see what you get.  It should respond with “CVSLock 2.0 Ready” if it’s working properly.

Note: I should say I was moving both new and old server were Windows 2003, the versions of CVSNT were the same and the new server had the same name as the old one.

I’ve been a avid user of stackoverflow.com since I first heard of it a year or so ago. For the uninitialted it’s a place to ask development and programming related questions. The commuity is good and the idea of offering rep and badges to help others is great. Rep aint a new concept by any means but the way the stackoverflow team have implemented this simple idea is brill.

The new(ish) kid on the block is serverfault.com, which is aimed at sysadmins. A cool thing is you can link and import you profile from stackoverflow.

Also lats time I was on there i noticed the flair widget which allows you to embed your profile pic/rep/badge in any webpage.

hi, was playing around trying to get a rest API call to work and keep getting connection and timeout issues. Released as I am doing a HTTP request it needed to be routed via the company proxy server, here’s how I set the proxy details.

System.setProperty(“http.proxySet”, “true”);
System.setProperty(“http.proxyHost”, “130.x.x.x”);
System.setProperty(“http.proxyPort”, “80”);
System.setProperty(“http.proxyUser”, “UsernameHere”);
System.setProperty(“http.Password”, “PAsswordHere”);

Note: This was just a proof of concept to test out consuming a rest webservice, I’m not advocating this as the best way to set the proxy details.

I wanted to get the clients browser info and screen resolution and pass in into to a contact form so I can tell a little bit about the client’s browser encase of unreproducible issues. Basically run a javascript function to collect the info from it’s implicit objects and write that to a hidden form element.

Had this working in JSP ok, and with a slight tweak to account for the : in the hidden field id (fromname:compnonentId) it works.
In JSF file…

function getClientInfo()
{
var clientinfo = “”
clientinfo+=”Browser:” + navigator.appName + “,”
var b_version=navigator.appVersion
clientinfo+=” Version: ” + b_version + “,”
clientinfo+=” Screensize: ” + screen.width +”x” + screen.height
(document.getElementById(’contactfrm:clientinfo’)).value = clientinfo;
}


‹h:form id=”contactfrm” styleClass=”form”>

In Backingbean the usual code to get a request param:

String clientInfo = getFacesContext().getExternalContext().getRequestParameterMap().get(”contactfrm:clientinfo”);

Or is there a better way of doing this? comments most welcome