Thursday, 24 December 2009

Development Environments

I seem to get involved in a large number of projects that have been developed and released but lack a proper, serious development environment. In many cases the project appears to resemble a well put together amateur project, the code is ok, there is a test environment, there may well be some documentation. However I always seem to come across the same old problems.

Confidence is usually a big problem. A single developer has owned the project, set up the environments and there are numerous bits of 'magic' around the solution, which nobody full understands. These people invarably leave the project and leave behind them a messy installation.

My number one complaint is the lack of a continuous integration process. Daily builds and deployments are very easy to setup, they don't have to be complicated, yet must be scripted, repeatable and in most cases automated.

The benefit of this approach is that confidence is gained as software is automatically built and deployed, therefore changes are integrated regularly and problems are identified early. As an example, I have spent the last few days implementing the following processes to enhance a project.

The Build is an automated process driven by ANT, the source code was already maintained in SVN, which is an excellent solution, but now ANT builds the whole thing automatically. The packages are automatically deployed to the Development environment where a scripted process, developed using simple WSH files, redeploys the application, including the entire database.

This has provided the project with the following benefits. The project database and code is reset everyday to a known good state. Unit Tests can now be easily developed to regression test the application automatically. It is now possible to set the application back to a know state and perform testing, such as performance, then make changes, reset the environment and run the tests again, knowing that the environment has not been pollutes with unvalid data. Confidence is much higher in the development team as the 'magic' elements of the installation have all been removed and scripted, and all of the team memebers understand exactly what is going on.

The frustration for me, is that I see these problems over and over again. Developments usually end up in this situation due to projects having unrealistic deliverables, tight deadlines and forcing developers to cut corners.

Part of the success criteria for a project in my mind is to enable the ongoing development and maintainence of the product, but in these cases no changes can be confidently made until all of the short cuts that have been made have been resolved.

Monday, 2 November 2009

JavaScript Libraries

Here are my thoughts on YUI and JQuery after some research.

I started off looking at YUI (http://developer.yahoo.com/yui/). Straight away I found YUI ( I was using the latest version 3 ) to be quite confusing, the download unpacks on to your machine 2000 files, including the core libraries and many additional extensions.

YUI appeared to be very good, the supporting website has a lot of information and the examples show off some very neat functionality. However I once again struggled to get to grips with YUI as the examples are very specific and never really show why or how YUI should be used, which makes solving generic problems rather difficult.

I spent the evening playing with YUI, but struggled to make much headway and couldn't see easily how I could achieve what I wanted with this.

I next had a look at JQuery (http://jquery.com/) and instantly the whole experience was different. The website offers two downloads, either a single development JS file or a minified production version. The examples on the website appear to be written by developers and in that respect provide introductions to JQuery as a general solution, with specific coded examples.

In contrast to YUI, I found JQuery to be far easier to understand and instantly felt at home. I worked through an example or two and then felt happy enough to go it alone with just the API reference. What a difference!

In summary, if I had to recommend a javascript library to use, I would suggest JQuery. I found it lightweight and powerful, while YUI was confusing and hard to understand.

If you are interested in JQuery there is some great examples online, but here is my demo code which maybe helpful. I have included all of the code in a single file and put all of the methods inline, for clarity really.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
.canvasElementOffline
{
border: 1px solid red;
}
.canvasElementOnline
{
border: 1px solid green;
}
</style>
<script type="text/javascript" src="../scripts/jquery.js"></script>
<script language="javascript">
$(document).ready(initialise);
var mouseDown = false;

function initialise()
{
// Add Page Handlers
$().mousemove(pageMouseMove);

// Initialise Canvas
initCanvasElement();
}

function initCanvasElement()
{
// Configure the UI
$("#canvasElement").removeClass("canvasElementOffline");
$("#canvasElement").addClass("canvasElementOnline");

// Add Canvas Handlers
$("#canvasElement").mouseup(canvasMouseUp);
$("#canvasElement").mousedown(canvasMouseDown);
}

function canvasMouseDown(eventObject) {
mouseDown = true;
}

function canvasMouseUp(eventObject) {
mouseDown = false;
}

function pageMouseMove(eventObject) {
$("#inputMouseX").val( eventObject.pageX );
$("#inputMouseY").val(eventObject.pageY);
$("#inputMouseState").val( mouseDown );
}

</script>
</head>
<body>
<canvas id="canvasElement" height="300" width="300"></canvas>
<input type="text" id="inputMouseX" />
<input type="text" id="inputMouseY" />
<input type="text" id="inputMouseState" />
</body>
</html>



Friday, 23 October 2009

Windows 7

All the talk today is of Windows 7, Apple hijacking the launch and stuff. The thing that I find strange is why is anyone bothered?
Windows 7 is an operating system. It is the thing under the hood. It has some really nice features, I use it myself and prefer it to Vista, but at the end of the day it is still an operating system, not particularly exiting and certainly not worth queuing outside a shop for.
I mean come on, this really gives tech people a bad name as we are bundled in with the losers that are busy queuing desperate to get their hands on the latest taskbar design from Microsoft.
I hate Geeks. I am a software developer, I work with computers and enjoy what I do, but I for one will not be upgrading a PC, downloading drivers or drooling at the new areo tweaks. I will be out with my daughter on our bikes enjoying life.

Wednesday, 10 June 2009

Taking a bite out of Apple

In the UK there has been a pretty big backlash against the iPhone 3GS. Mainly because of the expense of the contract (minimum £35pm plus nearly £200 for the handset on top). 
But were people expecting anything different, welcome to the world of Apple. Apple has continually brought out new products, recently on a yearly basis. In many cases they make the previous product almost obsolete and with the launches usually taking place just after Christmas, upsets a lot of fans. 
The there is OSX, the operating system to beat operating systems, but every upgrade is charged for, unlike Windows. Now there is nothing wrong with this and there are plenty of Apple fans around the world that will continue to buy new Apple hardware. 
However, Google expect 20 new Android compatible phones on the market this year and at £35pm and the phone is free, they certainly look very tempting. 
The iPhone 3GS just doesn't really do it for me. I have an iPhone and think it is great, but the minor upgrades to the hardware are not worth the expense. I for one will be keeping a close eye on HTC and their Android developments. 

Monday, 8 June 2009

Top Search

Found this today, really interesting. It is a website built by Michael Kordahi to sompare Google, Bing and Yahoo search engines. Give it a go and find out which one is best for you @ http://blindsearch.fejus.com/
Incidentally I was suprised to find the Bing would be better for me than Google.

Thursday, 4 June 2009

Bing Bonged

Personally I quite like Bing (Microsoft's newly launched search engine). For the first time they have managed to create a search that is the equal of Google and has some features that make it better. 
However there has been much press regarding the auto-play feature for video searching, which transforms Bing into a perfect porn search which also neatly avoids most filtering systems. Kids love it. 
Strangely the thing that I do not understand, in the UK if I click on the maps link, I am re-directed to the god awful Multimap.co.uk, yet Microsoft have the far superior local.live.com mapping site. 
Unfortunately, in losing Bill, Microsoft have lost their dictator and committee lead design is taking over. This can only be good news for Google. 

Tuesday, 5 May 2009

Money

Good news for all the struggling software and hardware developers in the world. A new scheme launched by the UK Govt will help revive the industry in these dark times. 
Mirroring the deal for the car manufacturers the Govt will pay £2000 to anyone with an old copy of Windows to upgrade to Windows Vista. Windows vista will only run on new more efficent computers thus providing a green benefit.