Sunday, May 16, 2010
This is a quick heads up for all of you doing Android development on Windows 7. A lot of people seem to have the problem where they think that the Android Emulator is not launching their application. The console window shows a message like:
[2010-05-16 17:33:11 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
and then nothing seems to happen!
Do not panic! Give it a few minutes. The emulator start up seems to be pretty slow on Windows. Eventually your Android app will start up.
The best advice is to leave the Emulator running all the time so you don't have to keep waiting for it to restart.
Alternatively, try it on a Mac or other Unix / Linux derivative...
Monday, April 05, 2010
Increasingly, clients have been requesting integration of their software with Sage (mostly Sage 50 Accounts, but occasionally CRM or Act! also). So we have joined the Sage Developers Programme which cost us £1,700 + VAT. You get a lot of stuff from Sage for your money (including lots of Sage software to help run your own business).
The down side is that so far the support from Sage is a bit lacking. You don't get a lot of tutorial information from Sage, you just have to work it out for yourself. I think that they will supply training for developers, but this is at additional cost... Compare this to the enormous amount of free tutorial information available from MS et al, and the £1,700 starts to look a little steep...
I have been toying with Sage 50 2009. It took about two hours to get a simple application compiling and running. The delay was mostly due to this error:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {A29354FB-35FA-4CD4-8261-DAD864982348} failed due to the following error: 80040154.
at SageTest1.StockLevelCheck.CheckStockLevel() in F:\ResearchProjects\SageTest1\SageTest1\StockLevelCheck.cs:line 17
at SageTest1.SageTestForm.CheckStockButton_Click(Object sender, EventArgs e) in F:\ResearchProjects\SageTest1\SageTest1\SageTestForm.cs:line 26
This is pretty much the standard "COM class not registered" error. It took me an hour or so of uninstalling, reinstalling etc to realise that all I needed was a reboot! After a reboot everything worked fine. For the record, I am using Windows 7 Ultimate 64 bit.
My next task is to work out how to check the current stock level of a particular product... Wish me luck!
Thursday, December 31, 2009
I have been tearing my hair out for weeks on a Report Services 2008 problem. The symptoms are that requests to the web service that are made programmatically never seem to get to the RS ReportServer/ReportService2005.asmx web service never seem to get there and the ReportViewer component hangs try to get the reports.
Interestingly, Report Manager works fine which makes me think it doesn't use the web service!
I have tried all sorts of things including turning off the firewall, reinstalling SQL 2008 etc etc. I was astonished to find out that disabling the LinkScanner in AVG was the final solution to the problem... Wht did AVG not tell me it was blocking these requests?????
Bizarre, but problem solved now!
Monday, November 23, 2009
Just a quick heads up to the Agile community in Yorkshire!
There is another one day course on "An Introduction To Agile Software Development" at NTI in Leeds on February 15th 2010. The course is full of practical advice and aimed at teams who are just adopting Agile or who are thinking about adopting Agile.
The course is suitable for developers, testers, managers, business analysts, directors, product owners and anyone else involved in the Agile process.
For more information about this course, visit the NTI web site.
Details
Kanban focuses on becoming successful, which may lead to being Agile. Lean is a set of principles that are being applied to software engineering by a growing number of practitioners. Kanban is a true pull system implementation in software engineering. The five pillars of Lean, which Kanban fully implements are pull, continuous flow, customer value, waste elimination and continuous improvement. The Principles of Kanban are: to agree a team capacity, to limit WIP (Work in Process) to that capacity, to pull value through the value stream, and to make both work and workflow visible. It has proven easy to adopt and lowers resistance to change. The result is a gradual, incremental approach to change that is empowering for everyone.
This meeting will be a special end of year event held at Old Broadcasting House (http://www.ntileeds.co.uk/old-broadcasting-house/).
Speaker
David is an agile development manager and coach with 12 years technical team management and coaching experience, and 20 years software development experience. In recent years, using Scrum and XP, David has coached onshore and offshore development teams and successfully launched an internet video startup from inception to launch. David currently works for BBC Worldwide as a Development Manager, coaching teams on Scrum, Lean and Kanban. David is a certified Scrum Master and Lean practitioner.
Now that my Google Wave beta account has been activated I am starting to explore the possibilities! The first thing that came into my head was that Wave could be a great collaboration tool for exploring requirements / User Stories. You can have an ongoing conversation about the requirements that is documented. You can also have people join and leave the conversation as often as you need. You can upload video, photos etc that show details of a bug or a required feature. It is also ready to run and does not need any customisation work.
I think that Wave would be pretty awful for recording the final spec (maybe Google Docs for that), but for the ongoing exploration of requirements, I think it is good. Obviously, there is not substitute for a face-to-face conversation, but where that is not possible, this could be the answer!
Any thoughts?
Monday, November 02, 2009
Our work with the MS Sync Framework is going very well and the v2 release could not have been better timed! We are syncing data from a web-based application (which runs under SQL Server 2008) to a local SQL Server Compact Edition (3.5 sp1) cache. It has taken us a couple of weeks to get up to speed with everything. There are a lot of steps involved in our scenario:
- Create a Sync Framework project
- Get the sync working between databases on a local machine
- Switch to using a WCF web service call for the sync
- Hack away at the original db schema until it works (primary key issues, clustered indexes etc)
- Choose the right security mode for the WCF call (nightmare)
- Create a new web service on the test server for the WCF call
- Create a Windows app to Sync to
- etc etc etc
One of the biggest challenges is retrofitting the Sync Framework on to an existing database schema. My general advice (having been through the pain) would be:
USE GUIDS FOR ALL YOUR PRIMARY KEYS!
We did not do this in our production database (we didn't know about the need to Sync way back then) and it adds some interesting technical issues! We use Integers with Identity set for primary keys. I should also mention that are attempting bi-directional synchronisation... The main problem is that after the initial sync, the seeds of identity fields are all set to 1. This means that all of the clients and the server will insert records using the same primary key values! The Sync framework cannot handle this, so we need to make a manual intervention.
The solution is to seed the server at a high value and the clients at lower values. We are using 32 bit integers for PKs, so we simply allocate a client id to each client (we actually allocate a low number and shift it left 24 bits to give the new seed). We tries some other schemes such as having the server start at 1, but we had problems with syncing.
The other problem is that the documentation for the Sync Framework is not great at the moment. We spent a lot of time working some basic stuff out for ourselves. If I ever get some free time I will do a tutorial based on our product going from nothing to have a complete and working Sync Framework application... It might happen...
Overall, working with the Sync framework is good, but you need to be prepared to get technical and work through problems yourself as the documentation is still a little light!
Monday, October 26, 2009
From November, I am teaching a new Agile software development course for NTI (NTI is part of Leeds Metropolitan University’s Innovation North faculty). If your employer is in Yorkshire or Humber, then you will qualify for the Train To Gain funding which reduces the cost of the course from £290 to only £120.
The course is great for people who are new to Agile (thinking about adopting or in the process of adopting). Attendees include:
- Developers
- Testers
- Product Owners
- Business Analysts
- Project Managers
- Executives
Topics covered include:
- Problems With Waterfall
- What Is Agile?
- Who Is Who?
- Agile Teams
- Agile Artefacts
- Agile Process
- Agile Tools
- Scaling Up Agile
- Agile Client Relationships
If you are interested in finding out more, please visit:
Tuesday, July 21, 2009
I've been doing an Intranet application with ASP.Net 3.5, WCF and Silverlight 3 for the last few weeks. It seems that getting these things to play together is not so easy at the moment!
I am using Windows Integrated Authentication for the whole shooting match since it is on an Intranet. I thought that this would make it easy!
The functionality of the Silverlight application changes depending on the roles that the user has. First off, there don't appear to be any user querying facilities in Silverlight (e.g. like the Role Manager method Roles.IsUserInRole(username)). The general consensus seems to be that you should call a WCF service to get this kind of functionality. That is no problem as my Silverlight app already uses WCF!
I have impersonation configured in the web.config for the WCF services and the ASP.Net web site. I can call the services and see that WindowsIdentity.GetCurrent().Name is set to the name of the user accessing the Silverlight app. Great! I can also use the WCF Security Context and see that the current user is the Windows user using the Silverlight app. Happy days!
HOWEVER
Whenever I use a Role Manager method such as Roles.IsUserInRole(username) I get the error:
"Method is only supported if the user name parameter matches the user name in the current windows identity."
I have scoured the Internet looking for a way to get this to work, but alas, I cannot find one. It appears that Role Manager does not work in the ASP.Net, Silverlight and WCF scenario. My solution is this:
///
<summary>
/// Find information about a user's roles.
/// </summary>
/// <returns>The list of roles for the specified user.</returns>
[
{
WindowsIdentity id = WindowsIdentity.GetCurrent();
foreach (var group in id.Groups) NTAccount account = (NTAccount) group.Translate(typeof (NTAccount));
{
string name = account.Value;return userRoles;
userRoles.Add(name);
}
}
Obviously, I'm stuck with Windows Authentication now, but that doesn't really matter to me!
OperationBehavior(Impersonation = ImpersonationOption.Required)]public IList<string> GetRolesForCurrentUser()List<string> userRoles = new List<string>();
Tuesday, July 14, 2009
I've been doing a lot of Silverlight lately for a couple of projects. I upgraded them to the new Silverlight using the Visual Studio upgrade wizard that started automatically. It all works fine other than the minRuntimeVersion attributes on HTML pages that reference Silverlight xap files.
The problem is that if the Silverlight control was compiled under version 3 and you specify the version 2 runtime in minRuntimeVersion, you get an ugly error and download instruction:


If you update the minRuntimeVersion, then you get a much more user friendly version:

For the record, the old minRuntimeVersion was 2.0.31005.0 and the new runtime version appears to be 3.0.40624.0