Saturday 27 June 2009

Colca Canyon

Before reaching Arequipa I moved inland to the Colca Canyon – much wider and deeper than the Grand Canyon, this valley is wide enough to feel like a place that is worth living in; and, of course, people do. Those that do are Aloe farmers or runners of mini-rest-points for the fool-hardy traveller that has decided to trek up/down/around it.
Two times deeper than the Grand Canyon (http://en.wikipedia.org/wiki/Colca_Canyon), at over 4000m in depth, it makes for a good three day trek (scaling the sides alone can take half a day) with two nights on the canyon floor.
The first stop was as an Aloe farmers retreat that had been made a little more traveller friendly – still, electricity was from car batteries (I think) and after a certain time everything was done with torch light or candles. A healthy meal was had on the first night by candlelight under the stars followed coca ‘tea’ – or at least a coca leaf brew… my first experience of this. The leaves were plentiful and it certainly seemed to clear the head – leaving you ready to retire to the stone hut (with dirt floor) to find your bed in the dark…
Map picture
The following day’s trek took me through the canyon floor (with my guide) and on to an oasis style swimming pool (with mini waterfall under which one could massage those trek-induced aching muscles) with further torch lit food and drinks and an early night, allowing us to scale the very steep canyon sides from circa 4am onwards. The ascent took until sunrise, which found us at the cliff top watching the blue moonlight slowly retreat as the yellow of the sun took over the sky.
By the afternoon we sat on the cliff edge by the side of the road watching Condors sweep up and down on the thermals and ridge lifts around them… Never has El Condor Pasa (http://en.wikipedia.org/wiki/El_C%C3%B3ndor_Pasa_(song)) sounded so good – however corny that may sound… (Yes, somebody did start playing it on a tape player after we’d been watching them for 45 minutes or so…) – and in reflection, I’d rather by a human being watching it all…
Best memory: half way up the side of the canyon looking over the opposite canyon sides normally grey rock which was so thoroughly lit with moonlight that it was tinged blue in a way that I previously thought only possible with gel filters on a West End Stage – the world is a stage, after all. I hope we all get to the end of the play alive…
Oh, and Best Memory V2: The wonderful arse’s owner from ‘Lima to Pisco’ had turned up again… Good things always come round again. :)

Friday 26 June 2009

JQuery Multiple Selection Drop Down List...

 

JQueryNot wanting to appear too geeky at this late stage in the day - but...  This is bloody fantastic! ...or, perhaps I should say - this has been implemented to the highest professional standards.  Quite simply spiffing stuff. Change a select tag into a proper drop down list that looks as good as the real thing and works in all browsers.

Here it is in all it’s glory (with inline examples of the thing working – and source code links):

http://dropdown-check-list.googlecode.com/svn/trunk/demo.html

Thursday 25 June 2009

Comma separated list from mapping table as an embedded SELECT statement

T-SQLEver needed to get a comma seperated list instead of another mapping table? Well in these days of Linq this may be old hat - but it's still nice to remember how to do it. Here's a quick and easy way to get a list from a linked table constructing the list field using the XML PATH features of SQL Server 2005:

(SELECT CAST(CountryId AS NVARCHAR(10)) + ',' AS [text()]
     FROM UserToCountryMapping AS utcm
    WHERE utcm.UserId = externalSelectTable.UserId
     FOR XML PATH('')) as Regions

I could do with a 'D'

Do you remember the good old days when advertising was fun in some way or another...? I watch it nowadays and it seems to lack something. I'd struggle to say that British advertising was the most innovative now - although many people will tell you it's more subliminal than it was before (I can agree with that),
Gorgeous legs - what was the ad about...?
 
I have to say that much of the entertainment that used to be there seems to have gone missing. The only exceptions seem to be the strange Honda adverts that tell you all sorts of weird and wonderful things whilst you are treated to all sorts of weird and wonderful cartooons... 
 
Anyway - enough of this, for some obscure reason I remembered the phrase I could do with a 'D', the other day...  and I was en-route to the kitchen for a tea break. Shortly afterwards I had found this advert - not the *best* example of advertising humour (although Boycey(?) from Only Fools and Horses is in it); my overriding memory is the first: nice legs...  followed by pretty much everything including 'wouldn't mind living with those three'... Anyway - here it is for you to peruse...
 

Wednesday 24 June 2009

Quick and Easy T-SQL Split Statement

T-SQL

Here’s a quick and easy Split function to split a comma separated list (for example, although it could be separated with any character) into a table that can be easily joined in the calling statement.

The only bad news here is that you will need SQL 2005 or above for this to work (if my memory serves me correctly) – but then if you’re still running SQL 2000 one has to beg the question, ‘Why?’. 

Anyway – over to the code:


create function Split ( @StringToSplit varchar(2048), @Separator varchar(128))
returns
table as return
with
indices as
(
select 0 S, 1 E
union all
select E, charindex(@Separator, @StringToSplit, E) + len(@Separator)
from indices
where E > S
)
select substring(@StringToSplit,S,case
when E > len(@Separator) then e-s-len(@Separator)
else len(@StringToSplit) - s + 1 end) String, S StartIndex
from
indices where S >0

Thursday 18 June 2009

Saturday 13 June 2009

Team Foundation Server Customised Reports

OK, so Team Foundation Server is wonderful (which it truly is). However, I have imported my Microsoft Project file into TFS (or type all the tasks in by hand via the Excel file) and, with extraordinary diligence, I add all my precious time estimates to each task.
 
Now I am truly pleased with myself, assured that somehow, as the project progresses, I will be able to get statistics automatically emailed to me describing how far through the project we are. But no! At least not with the default Process Template for Agile (and I presume the same is true for CMMI as well). 'Why?', you ask...  Well:
 
It seems that strangely, out of the box, Microsoft have installed reports that allow you to see the progress that is being made down to the task level only. So when you have a task that has been estimated as 20 hours work and your diligent programmer updates the number of hoursTFS Report Sample worked (on that task) each day, there is not a single report within the standard process templates that will tell you how your project is performing.
Worse than this, getting a report saying you have 80 tasks left is all well and good, but it means absolutely nothing to anyone (unless you know precisely how long each of those 80 tasks are going to take). Clearly you can export to MS Project to get the information you need - but for small teams (who might not have the luxury of a full-time project manager) it would be beneficial (bloody useful) to see a graph showing progress.
 
Thankfully Microsoft has written a collection of reports to smooth over this minor flaw in their shockingly good system (yes, one day I will apply for a job with them) and they have 'published' them here: http://www.microsoft.com/downloads/details.aspx?FamilyID=A74486B2-F7DB-4A85-97BD-46BF478BDA60&displaylang=en