18 June 2009

CSIRO pursues WiFi royalties | Australian IT

Good news for CSIRO, the Australian Government science and research body. For years, several technology companies (including Dell, Microsoft, Intel and HP) have tried to invalidate patents CSIRO has in the USA concerning wireless LAN (802.1x) standards.

These companies have argued (unsuccessfully) that government patent belongs in the public domain.

Surely, a loss for CSIRO would have had every single government in the world wondering what value there is for government research.

What will happen now? Surely the group of companies involved will appeal the decision. There’s so much money at stake for them. Meanwhile, CSIRO is targeting the next group, likely to include smartphone manufacturers such as Nokia, Motorola and Samsung.

CSIRO pursues WiFi royalties Australian IT

11 June 2009

Use VB 9 XML Literals to parse an XML tree of unknown depth

I’m in the process of building an editor interface for a Flex program we’ve written at my work. It’s my first real project using LINQ. I’ve mainly been using C# but decided to take advantage of XML Literals in VB 9.

The structure of the Flex program is held in an XML file. I’ve been needing to read this XML file in such that the whole navigation structure can be held in a tree control. This is different to the Flex program itself which only needs to display part of the navigation tree at once.

To do this, I needed to transform the tree. As I saw it, I had two options: XSLT (yuck) or LINQ.

The XML doc is structured like the example below.

<sections>   
<section>
<id>section1</id>
<label>This is section 1</label>
<layout>navStructure</layout>
<properties>
<tree>
<!-- Nested collection of node elements -->
<node label="Blah">
<node label="Blah 1" url="somedoc.pdf"/>
<node label="Blah 2" url="somedoc2.pdf"/>
</node>
</tree>
</properties>
</section>
<!-- More section elements -->
</sections>

There are several <section> elements with this layout. The <node> elements also have variable nesting levels.

The hard part is in writing a LINQ query that will find all the <node> elements without knowing the nesting depth beforehand.

This first section of VB is in the calling Sub. Note in the second expression hole that calls out to the BuildChild function.

The BuildChild function takes an XElement as a paramater and writes a <node> element with the label and url attributes. An expression hole is then opened which recurively calls back into the BuildChild function on the collection of XElements contained in the current XElement.

Dim doc As XDocument = XDocument.Load("content.xml")
Dim tree = _

<tree>
<%= From n In doc.<module>.<sections>.<section> _
Where n.<layout>.Value = "navStructure" _
Select <node label=<%= n.<label>.Value %> url="">
<%= From m In n.<properties>.<tree>.<node> _
Select BuildChild(m) _
%>
</node> _
%>
</tree>
Private Function BuildChild(ByVal element As XElement) _
As XElement
Dim retElement As XElement

retElement = <node label=<%= element.@label %> _
url=<%= element.@url %>>
<%= From e In _
element.Elements
Select BuildChild(e) %>
</node>

Return retElement
End Function

This is how I’ve solved my problem for now. My understanding is that LINQ is more closely related to functional programming in its feel and I suspect that it can provide a better solution. Recursion is difficult to read and debug and it would be great to get rid of it if possible.

Cheers
Mike

10 June 2009

Exploring open source - Part 2

Firstly, a little about my journey with open source software. I'm by no means an "expert" (def: an unknown drip under pressure) but neither am I a total ignoramus.

Intro to Linux - 2001

I came across Linux during my Diploma in IT in 2001 / 2002 where we were exposed to Red Hat 5 or 6 or thereabouts. Here is where I was introduced to the concept of open source software. It didn't last long as I figured that as we lived in a Windows world, I had to keep up with Windows and prioritised my efforts here. Getting a job during the tech-wreck was work enough.

The idea of open source in the Windows world certainly wasn't obvious to me then, so I can't say what the state of it was back then.

Asterisk Implementation

My first real use of open source was when my boss in 2005 set me the task of developing the company knowledge of the VOIP PBX Asterisk. Four years after playing with Linux, I was still able to remember enough to get going quickly. (hooray!!!) I actually managed to get a working installation off the ground, complete with an exim4 service to handle voicemail.

Current Open Source Usage

Since then, in the Windows world, I've been playing with open source software mainly in the software development space but also a little in the support space. Principally, I built a company intranet in DotNetNuke (DNN), a wonderful platform for hosting content management systems, based on VB.NET. Otherwise, my main use for open source has been for development support tools like Subversion and TortoiseSVN (of course), MbUnit, NUnit, NMock2 (yeah so what if Rhino Mocks is "better" - I like the expressiveness of NMock2 and you gotta start somewhere), SharpDevelop and am now dipping into IronPython (the Python implementation for the .NET Framework). I also configured and deployed a helpdesk / support tool in PHP and MySQL (of questionable quality). I'm sure there are others that elude me for now. Some of these tools are either ports from Linux / UNIX apps while others are ports from (or inspired by) Java tools (possibly open source).

It's interesting to note that the purpose of all of these tools have been to make the life of IT staff easier or more productive. No open source software that I have been in contact with has been for the purpose of enhancing end user productivity. DNN is kind of the exception, although its reason for existence was to remove me from the process of posting new content to the intranet. I learned that the IT staff should not be an essential part of the business process. Implementing DNN meant that users could post content themselves with little intervention from IT.

Open Office.org

On the open source front, I have dipped into Open Office several times since version 1.0 (possibly a little earlier) and every time have also dipped out. For a while I used it while studying part time in 2007 while holding down a full time job in preference to my other poor choice - Microsoft Office 97. I continually found that menu choices were hiding somewhere unexpected and getting help was difficult. At least as difficult if not more so than Microsoft Office. The final straw was when editing a table was more difficult than it should have been. I ditched it in favour of Office. At least the thing worked according to my expectation.

My most recent exploration with Open Office was last week when I investigated version 3.1. I opened a moderately complex Word doc, a document from Microsoft “Deployment and upgrade for Office SharePoint Server 2007” (link). It contains an automatically generated table of content, hyperlinks hidden behind display text and some pictures. There might be some tables and bulleted lists. When I opened it, some of these hyperlinks had been inexplicably changed from Arial to Symbol font.

Apologies to the Open Office folks, but this is a deal breaker. If I'm in a position of specifying a new office suite to a company, I am not going to recommend deploying a product that does this. It just has to do this right.

Summing Up

If you get me on a bad day, I'll be a Microsoft bigot and will curse open source to the ends of the earth. It's wrong for me to do this and once I calm down, I'll tell you that I'll consider it if:

  • it works reliably
  • I'm looking for software that will do a task better
  • I don't hate the world on the day you ask. ;)

Till next time
Cheers
Mike

09 June 2009

Exploring open source

I’ve spent several days recently in the company of an avid open source implementer and advocate. Until recently, he featured on an Australian radio show as the resident open source (ie. Linux) geek.

Anyway, I’m very firmly in the Microsoft camp so we ended up in an argument over the worth of open source software.

The best thing that came of it was I decided that I really should know about the state of play in the open source world and know what I think (and be able to support it) about open vs. proprietary (or closed source) software. As an designer and implementer of solutions, I feel that I really need to know if I am to make a sound business decision whether to employ it or to avoid it in a given situation.

My pre-condition to this discussion is that open source or proprietary software bigotry has no place in IS design and implementation. It only serves to remove tools from our toolkits.

What I hope to cover in what I expect will become a series of posts will include:

  • I want to know what I think about the various licences that exist (eg. GPL, LGPL, MIT, MSPL, etc)
  • How can open source contribute to a business in terms of
    • cost savings
    • competitive advantage
  • How can a company make a living out of open source development
  • Is open source really more secure because anyone can read the code?

At the end of all this, my expectation is that I will have a better understanding of open source and have some opinions which I can support with evidence of where and when I’d consider employing it.