Finished the Nike+ Importer for www.runningahead.com

I finally finished up the Nike+ data importer for http://www.runningahead.com.

The code for the importer can be checked out at my Github repository:

https://github.com/duereg/NikePlusImporter

I got a small test project up for this, which walks through everything but doesn’t Mock up the calls to the Nike+ service (I couldn’t be bothered).

Let me know what you think.

Beautiful LINQ to Xml

Is there anything better in life than finding a better way to do something? An easier commute, a better night’s sleep, a tastier cake recipe?

In starting the Nike+ importer for http://www.runningahead.com, I knew I was going to have to deal with a bit of XML. Which used to mean XPath.

Not so much anymore. LINQ to XML, you rock my world. It turns XML like this…

<extendedDataList>
	<extendedData dataType="distance" intervalType="time" intervalUnit="s" intervalValue="10">
	0.0, 0.0372, 0.0705, 0.1041, ....
	</extendedData>
	<extendedData dataType="speed" intervalType="time" intervalUnit="s" intervalValue="10">
	0.0, 13.3866, 12.6856, 12.4970, ....
	</extendedData>
	<extendedData dataType="heartRate" intervalType="time" intervalUnit="s" intervalValue="10">
	0, 88, 108, 115, ....
	</extendedData>
</extendedDataList>

With a little bit of code like this:
Continue reading