Archive

Uncategorized

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

I didn’t quite get around to blogging as much as I’d have liked during 2011, but 2012 is a new year and I’ll have a lot more things to blog about, including my new job and the discoveries we make. So, go on – subscribe; you know you want to!

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 22,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 8 sold-out performances for that many people to see it.

Click here to see the complete report.

For what must have been the zillionth time last weekend, I found myself writing code again for Y.A.T.E.S. (or, “Yet Another Template Email Sender”). I don’t know why I didn’t get around to adding some snippets into my library sooner, but I thought I’d share the following as I finally decided to write something which is a good starting point for future expansion.

Basically, it fetches any file from disk (you specify), reads the contents into a variable and then parses it for a list of tokens you supply, substituting the tokens with your own values. It works equally well with HTML and plain-text emails and supports multiple CC and BCC addresses.

EDIT: July 2011 – The project has now been updated to support fetching of template files from remote locations (by URL).

Usage

I’ve tried to keep it as simple and short as possible:

// Fetch template body from disk
var template = TemplateHelper.GetEmailTemplate("D:\Path\File.htm");

// Add any tokens you want to find/replace within your template file
var tokens = new Dictionary<string, string> {{"##FIRSTNAME##", "Richard"}, {"##LASTNAME##", "Parker"}};

// Specify addresses (CC and BCC are optional)
var to = new MailAddress("some_email_address@some_domain.com");
var fr = new MailAddress("some_email_sender@some_domain.com");

// Optionally, specify a List<MailAddress> for both CC and BCC fields, or pass null.
var cc = new List<MailAddress>() {new MailAddress("bar@foo.com"), new MailAddress("foo@bar.com")};
var bcc = new List<MailAddress>() {new MailAddress("fizz@buzz.com")};

// Send the mail
TemplateHelper.Send(to, fr, cc, bcc, "##FIRSTNAME##, thanks for registering!", tokens, template, true);

It’s free to use, you can use it as you wish, and it comes with all the usual disclaimers etc.

To get the source code, head on over to the CodePlex project at tokenmail.codeplex.com.

Enjoy!

Back in early 2010, I announced the beginning of my open-source “Arduinometer” project, and released the code and schematics to build your own. This year, I’ll be upgrading the Arduinometer (running on the Arduino platform) to the Netduino: running the Microsoft .NET Micro Framework and is also open-source.

The Netduino Board

The Netduino Plus offers on-board LAN as standard, and together with a much richer toolset (the Visual Studio 2010 environment is far superior to the Arduino environment) I am planning to include the following additional features:

  • Support for up to 16 metered devices
  • Compatibility with pulse-output, photoreflective and magnetic counters
  • Web-based administrative interface
  • EEML output (for Pachube, and others etc.)

This project is still very much in the planning phase so I am keen to hear suggestions and your feedback before I get too stuck in. So, if there’s anything you think would be a particularly good idea, please get in touch. If you’d like to get involved a little further and sink your teeth into writing some code, drop me an email or leave a comment on this post and we’ll see about setting you up with access to the repository.

Happy metering!

Apparently, the stats helper monkeys at WordPress mulled over how this blog did in 2010, and produced an overall summary of how it performed during the year. Although reported as ‘healthy’ (I wonder what that means?), it’s clear I need to write more in 2011.

Healthy blog!

The Blog-Health-o-Meter™ reads This blog is on fire!.

Crunchy numbers

Featured image

The average container ship can carry about 4,500 containers. This blog was viewed about 19,000 times in 2010. If each view were a shipping container, my blog would have filled about 4 fully loaded ships.

In 2010, there were (only) 6 new posts, growing the total archive of this blog to 39 posts. There were 12 pictures uploaded, taking up a total of 529kb. That’s about a picture per month. 2011′s new year’s resolution is to triple that figure, making at least three posts per month.

The busiest day of the year was November 30th with 123 views. The most popular post that day was How to build a web connected gas meter with your Arduino.

With this in mind, I’ll be trying to make a few more posts on the Arduinometer project this year, and I’m already working on a version for the Netduino.

Where did they come from?

The top referring sites in 2010 were arduino.cc, jtlog.wordpress.com (thanks, James!), mbed.org, code.google.com, and homesenseproject.com.

Some visitors came searching, mostly for arduino gas meter, phototransistor arduino, arduino traffic light, cny70 arduino, and arduino phototransistor.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

How to build a web connected gas meter with your Arduino April 2009
30 comments

2

Reading a gas meter with an Arduino, Part 2 February 2009
2 comments

3

Connecting Windows 7 Media Center to your TV with the Acer Revo R3610 February 2010
11 comments

4

Reading a gas meter with an Arduino, Part 1 February 2009
2 comments

5

How to make your Xbox 360, Windows Home Server, Windows Media Centre and Windows 7 work together seamlessly October 2009
1 comment

Follow

Get every new post delivered to your Inbox.

Join 261 other followers