Sunday, July 20, 2008

Dr Joe Trodahl on Radio NZ with Veronika Meduna

Here’s a voice from the past, my old thesis supervisor at Victoria University, Joe Trodahl on Radio NZ speaking about new materials that combine ferroelectric and ferromagnetic properties. Joe’s got a great accent with that wonderful Alaskan sound.

http://www.radionz.co.nz/audio/national/ocw/2008/07/17/new_materials

Tuesday, July 15, 2008

Label Cloud in Blogger

Great, just found how to do it. Seems to work fine with Blogger labels. Go to http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html for details.

Monday, July 14, 2008

More Adventures with Innovation Blogging

So, as I reported recently I’ve been working on an internal blog to report the clever stuff we do in the IT shared service line within the corporate where I work. The reason behind doing it is of course to raise awareness of the great stuff I see the broader team delivering each week. This might be grass roots incremental or possibly (hopefully!) ground breaking and disruptive.

Now I’m getting blog postings, I’ve managed to deliver a KPI on the Sharepoint list hosting the blog, I’ve worked through how to create a chart to make progress through the year obvious, but now I want to get a summary of the blog postings on pages elsewhere in the Sharepoint server.

Unfortunately, while I have a large team of developers, the reality is they’re all fully busy so I’ve had to work through this problem myself.

Here’s some guidance for others doing the same. First off quick note to say I was surprised at how hard it was. Still, I’ve got there.

So, to get the blog posts and re-display them elsewhere I used Sharepoint Designer. This gives you the ability to place a DataView in a webpart on any page. It turns out the DataView is the Swiss Army knife of Sharepoint programming (at least when you’re using Sharepoint Designer). This control allows you perform an XSL transform on a data source and display the results. The query is represented using CAML and the best reference to help me with my problem was a posting on the Sharepoint Designer blog. Look for the entry on the CAML query. My select command turned out like this:

selectcommand="<View><Query><OrderBy><FieldRef Name='PublishedDate' Ascending='FALSE'/></OrderBy><Where><Geq><FieldRef Name='PublishedDate'/><Value Type='DateTime'><Today OffsetDays='-30'/></Value></Geq></Where></Query></View>"



The next problem is formatting the output. If you don’t format the output you’ll get HTML tags that will disrupt the rest of the page.



So, in the end I did something like the following. Note that I used some XSL to remove the markup where it occurred. I got that from http://blogs.pointbridge.com/Blogs/morse_matt/Pages/Post.aspx?_ID=37.





   1: <xsl:template name="RemoveHtmlTags">


   2:     <xsl:param name="html"/>


   3:         <xsl:choose>


   4:             <xsl:when test="contains($html, '&lt;')">


   5:             <xsl:value-of select="substring-before($html, '&lt;')"/>


   6:            <!-- Recurse through HTML -->


   7:            <xsl:call-template name="RemoveHtmlTags">


   8:              <xsl:with-param name="html" select="substring-after($html, '&gt;')"/>


   9:            </xsl:call-template>


  10:          </xsl:when>


  11:          <xsl:otherwise>


  12:            <xsl:value-of select="$html"/>


  13:          </xsl:otherwise>


  14:        </xsl:choose>


  15: </xsl:template>


  16:     


  17: <xsl:template name="dvt_1.rowview">


  18:     <xsl:variable name="pureTextBody">


  19:         <xsl:call-template name="RemoveHtmlTags">


  20:               <xsl:with-param name="html" select="substring(@Body,0,250)" />


  21:         </xsl:call-template>


  22:     </xsl:variable>


  23:  


  24:     <tr>


  25:         <xsl:if test="position() mod 2 = 1">


  26:             <xsl:attribute name="class">ms-alternating</xsl:attribute>


  27:         </xsl:if>


  28:         <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">


  29:             <td class="ms-vb" width="1%" nowrap="nowrap">


  30:                 <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>


  31:             </td>


  32:         </xsl:if>


  33:         <td class="ms-vb">


  34:             <a href="/CleverStuff/Lists/Posts/Post.aspx?ID={@ID}"><xsl:value-of select="@Title"/></a>


  35:         </td>


  36:         <td class="ms-vb">


  37:             <xsl:value-of select="ddwrt:FormatDate(string(@PublishedDate), 1033, 5)"/>


  38:         </td>


  39:         <td class="ms-vb">


  40:             <xsl:value-of select="$pureTextBody" disable-output-escaping="yes" /></td></tr>


  41: </xsl:template>


  42: l:stylesheet>




Now, I still have a problem. I’m getting an error message at the bottom of the (successfully) displayed list. The message is “An error occurred processing the data view. The XslText property is empty.”. Any ideas???? This Microsoft KB article has some information but it’s for Sharepoint 2003. I might have to get one of the dev team onto it:)

Update: 16 July

Doh! Figured the problem out - I had an extra DataView webpartzone inserted. I think this is an outcome of the sluggish performance of Sharepoint Designer. You tend to click too many times when you're inserting controls...

Wednesday, July 09, 2008

Update on the List Activity Viewer

Just a quick note regarding deployment of the activity grapher I described last week. This is now deployed and working a treat but I did have a minor problem getting it going. Turns out our current production implementation of sharepoing isn’t using the delegation model for Excel Services security. Instead we’re using the trusted subsystem approach (typical for a farm). In this instance to get the UDF going I just needed to remove the impersonation I was using for my dev/test environment.

Friday, July 04, 2008

Great Day

What a great day! A month ago almost exactly, I spoke at the FSI Media Technology and Innovation Conference and mentioned the importance of internal selling in a corporate. As an example of the opportunities we often miss I mentioned that I have a development team sitting in an open plan pod next to the CEOs pod (a remarkable fact in itself for a corporate of our size!). David, the team lead, had recently shown me his real time graphs of call centre activity displayed using Microsoft’s new WPF technology. They looked fantastic and the obvious thought was to maximise the impact by making available a big screen that ensured CEO, GMs all and sundry could see the impressive output from these monitoring programs. All I had to do was make a big screen available.

Well, it took a month but finally we got a 40” screen up there and yes, they had the desired impact. Before leaving work today we had a cluster of people ranging from analysts through our EXT team admiring the graphs and watching them turn from green to red and back as the metrics progressively changed in real time.

Success and many thanks to David!

Tuesday, July 01, 2008

Graphing Sharepoint List Activity

Here’s an interesting challenge that I’ve had over the last few days. At work we’re beginning to use sharepoint (MOSS/WSS) more and more as a tool within our office environment. It’s used for document/record management; it’s used for team workplaces; it’s used for hosting business processes; heck, it’s used for all sorts of things. In my case I’ve been using it lately to track the innovative ideas and deliverables that our IT shared service line are coming up with. I bug them for their clever stuff and either they post an entry into a blog, or I do it for them.

Now, here’s the problem. The blog looks great and I have a KPI web part showing blog items submitted over the last 2 weeks. I even have separate KPIs for different team’s submissions (identified by the category of the blog post), but what I really wanted was a graph of activity over the weeks. Do you think this would be easy? Well no!

You can easily add a web part to show an Excel report using Excel Services at the top of the blog. You can access sharepoint list data in an Excel workbook. The tricky part is that when you go to publish it into Excel Services you find an error message saying that retrieving data from sharepoint lists isn’t supported yet! A search on the net tells you that you need to create a UDF. I read somewhere that Excel Services is a ‘version 1’ product and apparently it doesn’t support everything you’d expect. Hmm, consuming a sharepoint list was one thing I definitely was expecting Excel Services to be capable of doing. Nevermind…

OK - back on track, so there is some sample code out there (eg check http://msdn.microsoft.com/en-us/library/bb267252.aspx) but explanations are fairly limited. So here’s a quick run down of what I’ve managed to do.

Firstly, borrow someone else’s code (eg from the link above):) Then iterate through items in the sharepoint list and accumulate across a number of previous week counters (or maybe put into a collection and try using linq?) eg:

   1: // Create an object array to return to Excel and initialise values


   2: toExcel = new object[weekCount, 2];


   3: for (int i = 0; i < weekCount; i++)


   4: {


   5:     toExcel[i, 0] = i;


   6:     toExcel[i, 1] = 0;


   7: }


   8:  


   9: // two approaches to try


  10: // 1: iterate through all list items and increment week activity counters when in range; or


  11: // 2: use linq


  12:  


  13: CultureInfo ci = new CultureInfo(CultureInfo.CurrentCulture.Name, false);


  14: int thisWeek = ci.Calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstDay, DayOfWeek.Monday);


  15:  


  16: // Iterate through SPListItems in the view.


  17: foreach (SPListItem currVal in values)


  18: {


  19:     // get created date field


  20:     // !** might need to set DateTimeFormatInfo appropriately 


  21:     // use Calendar.GetWeekOfYear (from System.Globalization) to determine difference in weeks from today


  22:     // or perhaps SPIntlCal.GetWeekNumber from Microsoft.Sharepoint.Utilities


  23:  


  24:     SPField field = currVal.Fields.GetFieldByInternalName("Created");


  25:     DateTime created = DateTime.Parse(field.GetFieldValueAsText(currVal[field.Id]));


  26:  


  27:     // find week number for today


  28:     // then find week number of list item


  29:     // subtract and accumalate appropriate counter


  30:     // if week difference < max number of weeks previous


  31:     int createdWeek = ci.Calendar.GetWeekOfYear(created, CalendarWeekRule.FirstDay, DayOfWeek.Monday);


  32:     int weeksPast = thisWeek-createdWeek;


  33:  


  34:     if (weeksPast < weekCount)


  35:     {


  36:         toExcel[weeksPast, 1] = (int)toExcel[weeksPast, 1] + 1;


  37:     }


  38:     else


  39:     {


  40:         // must be the first few weeks of a new year


  41:  


  42:     }


  43: }




Then return to Excel, generate the chart and post back into Excel Services so you get something like the screenshot below (all test data of course).



image



In this case there were 8 posts in the previous week, 1 post in the current week, and none going back 2 weeks.



One thing to keep in mind with the code I put up above – I didn’t put in any logic to handle week intervals around the change of one year to another – in this instance I think you’ll need to add 52. You can grab some sample code from my public skydrive folder: ListActivityInWeeks.zip-download. Suggestion: grab a copy of Cum Grano Sails Professional Excel Services book.



Update 2 July 08: Code changed slightly from snippet above - check download for difference - basically just to add 52 if week difference goes negative...

Saturday, June 14, 2008

Kayak Strongback Option 2

Just seen in a recent mailer from Bunnings - 4m aluminium planks for around the $NZ150 mark. Surely this would provide a good rigid base for building a kayak.

Wednesday, June 11, 2008

What Are The Odds?

You go walking along the Wellington waterfront and... end up on the 6 o'clock news on TV.

Apparently not so low. Check the last interviewee on http://tvnz.co.nz/view/video_popup_windows_skin/1842042 . Ah yes, that's me. Now I must admit this is at least my second performance on the biggish screen. I remember my primary school class being used as in the opening to Nice One Stu - a popular 1970s, kids after school TV programme in NZ.

Fortunately I suspect the video clip will be archived fairly soon. But it's good to know that in little 'ol NZ it's not that hard to end up in the media:)

Friday, June 06, 2008

Kayak Strongback Spacing Planner

Now getting away from banking, and remembering that I’ve kept my blog as a personal blog first and foremost, here’s an article (hopefully the first of many) on the building of (hopefully) 3 kayaks.

For some time now I’ve been prepping myself for the construction of a fibreglass composite kayak and finally I feel I’m underway! The basic process is to construct a sandwich core with a wood (or other) substrate used to create the form for the kayak with fibreglass on each side providing tensile strength on the inside and abrasion resistance on the outside.

There are two common methods for creating the sandwich core: stitch and glue plywood; and wood strip. I’m starting off with stitch and glue plywood but I have it firmly in mind to go on and create 2 more strip form kayaks. Wife and daughter will surely be bemused as I gift them their own high performance kayak...

The initial kayak is a Night Heron from Nick Schade at Guillemot kayaks. Check the web site and especially the message board he administers. This is an invaluable resource. Once that is done I’ve got my eye on Ross Leidy’s Whiptail, and one of Bjorn Thomasson’s kayaks in particular the Njord, Hunter or maybe Isfjord. No special reason apart from the fact that they just all look so HOT!

So, what about the strongback spacing planner you ask!? Well, when you build your sandwich core form you need a rigid straight guide. This is the strongback and you can create it in a variety of ways. (And no, I don’t need one for the stitch and glue Night Heron but it should make a good flat surface for construction and will suit my needs for the later kayaks.)

The thing is how you go about creating a strongback. I’m very keen on the approach taken by Bjorn Thomasson and Dan Caouette but in building one for myself I used (like Dan) doubled up plywood sheet strips (although in my case I went 150mm wide). The problem is when I went to bend them they seemed in a lot of stress and I wasn’t sure how to even that curvature stress out over the full length. Well, this is where a bit of geometry came in useful and I thought it was worth reporting out for others.

First a diagram; let’s use H to represent the length from the centre to the long end of the strongback, W the distance from the centre to the edge at the widest point (ie half the width), r to represent the radius of the circles that would make up the two sides of the strongback, and h and w to represent the distance up and across at an arbitrary point on the strongback.

Strongback drawing

How do you get the radius of the circles? Easy thanks to Pythagoras.

eq1

So, solve for r to get:

eq2

Question is now how to get the width at some arbitrary distance along the centreline of the strongback. No worries,

eq3

This time we want to solve for w.

eq4

And remember that the width at distance h from the centre is 2w.

Using Excel for my case where I wanted the total length to be 5.00m with greatest width 0.6m I get a table such as this.

Overall Length Greatest Width Circle Radius Offset from Centre Width
5.00 0.60 10.57 0.00 0.60



0.50 0.58



1.00 0.51



1.50 0.39



2.00 0.22



2.50 0.00

Applying this to my sample kayak strongback gives me the following drawing.

Strongback schematic


Update: 9th June 2008: Thanks to the wizardry of Google Docs you can view a spreadsheet:

http://spreadsheets.google.com/pub?key=pYTbzqIDg8t4ncGmXY2EBIw


Or just view the graph here:


Thursday, June 05, 2008

Future of Banking Conference

Or more accurately titled the 2nd Annual Technology and Innovation Conference - The Future of Banking and Financial Services.

Crikey, bit of a mouthful.

I attended this yesterday and spoke briefly just before lunch. Briefer than intended unfortunately because of the length of the previous presentation. Still, I finished on time and had a ball!

Main messages and comments:

  • The role of IT, knowing why you're there: operations plus business transformation. Understanding just why you're so critically a part of the business whenever change is necessary, especially disruptive change.
  • The need to sell and market internally. No innovation will get anywhere when you're not selling it. Just as a quick aside, I noted this come up a day ago in a post from James Gardner on BankerVision. It is hard but you *can* innovate in banks; just understand that the selling will be a great part of the effort.
  • Handling of conflicts of interest especially product management versus project management. We do this so poorly in banks - the approaches taken for managing the ongoing development of software products that have enormous impact on the customer service offered by the institution is really quite simplistic. Considering that these systems are extensive pieces of IP consisting of code, hardware, ideas in the heads of testers, developers, analysts, architects, and managers, well we really should approach it like a software product vendor. We need to keep the people together and we need to balance off the conflict to build right versus build the right product. It was comforting to hear Jeff Smith from Suncorp also spoke about this within the first session of the day. In fact, quick note hear to say I was very impressed with Jeff's talk. Suncorp have scored well there.
  • Finally I managed ever (ever) so briefly to talk about complexity and how to deal to it with services. Never had anywhere near enough time to talk about this one. I noticed that the IBM stand in the vendor area had a bunch of dice. I was tempted to grab a dozen, toss them on the floor and ask the audience how complex they thought that system was. Then split them into two groups of dice, put one lot on a desk and another on a different desk with a string between them representing an interface. Then I could show the transitioning of total complexity from multiplicative to additive. This would have given a good demonstration of the power of componentisation. As an aside I have done this before with a group building many sided solid objects from paper cutouts (tetrahedrons, cubes, dodecahedrons etc), I think it worked so there's a potential way of demonstrating complexity in a tactile manner.

A few general comments about the rest of the event...

Gosh what a lot of suits! and what a lot of people from ANZ! I guess their building was just right next door. Lot's of conversation about mobile technologies. Much overrated based on my experiences although I am very interested in the browser interfaces possible with the iPhone and Windows Touch phones. I can see that xhtml compliance with an understanding of modern phone browser capabilities could provide a far faster and more usable method of deploying mobile applications. Java midlets might let you control the buttons, but who cares when there are no buttons! Of all the presentations that I saw I found the most value in Jeff Smiths. Good commentary on people and approach with a good criticism of the prevalence of the waterfall approach to project managing complex system change in financial services companies. A real need for more maturity of project management in our sector.

So all in all a great time and now I'm looking forward to getting stuck into some real work back in the office.

Thursday, March 27, 2008

Presentation Roadtrip

It's been 3 weeks of presenting for me for two separate events; Microsoft Architect Councils in Christchurch, Melbourne, Canberra, Sydney, Auckland, and a BrightStar Enterprise Architecture conference also held in Auckland. The tripping is now over and it's time I put some background material up onto this blog.

For the BrightStar conference attendees I know you can get the presentation from the BrightStar site and you should have been provided with the link and credentials from Brightstar.

For the Microsoft Architect Council meetings, which were public events, I've got a copy of the presentation loaded on my public SkyDrive folder.

Looking back over the presentations it's now easier for me to see the main themes come through and to recognise which have raised the most interest from attendees.

In random order they appear to be.

  1. The recognition of business value in the IT shared service line and the special function of architects to enable change, especially disruptive change in a company; something typically unrecognised in companies as typified by the statement fragment 'the business must make the decision...'.
  2. The explicit recognition of the conflict of interest between building a product right and building the right product and why this leads you away from a single project manager role in your project delivery towards separate programme and product manager roles.
  3. The discussion in the presentations about the normal but arguably short sighted pecking order of market facing teams over shared service lines and why this leads to the failure of brands and companies due to disruptive innovations.
  4. Why companies fail to be creative because they deny their staff the time fully saturate themselves with all the information required to solve a problem, and the time for their subconscious mind to actually figure it out. You can't achieve innovation in a project, projects are defined once you know what you're planning to do.
  5. The importance of addressing complexity and efforts to do this from modular programming through object orientation and service oriented architecture with lots of references to the work of Roger Sessions and his recent complexity papers.

All in all it was a great experience that benefited me probably a lot more than the attendees so a big thank you goes out to Microsoft and BrightStar for getting me along.

Sunday, February 10, 2008

From a recent trip to India

In Mumbai an elephant is stuck in a traffic jam while a young woman wearing dirt covered rags sits on a pile of rubbish and combs her hair, in another world she could be a model. In the far reaches of a rough shop in Agra sits a derelict life size wooden statue of a Hindu god, intricately carved, old and dirty, why isn't it out the front in place of the tacky tourist baubles? On the road to Delhi a camel pulls a cart in the early morning while just off the road men squat and presumably undertake morning ablutions. In Bangalore high technology campuses with green grounds and gates and walls and guards provide paradise away from the daily grime of the city. Contrasts run so great that senses are initially sent awray until a form of acceptance comes in and you now longer lift an eyelid at the sights in front of you. I liked it, a lot.