2016 Year in Review

new-year

With the new year upon us, it’s always worthwhile to reflect on the previous year.

So, just like I did last year, I compiled a list of general stats about this blog from 2016:

Read more of this post

Advertisements

2015 year in review

2015 WordPress blogging stats image

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

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

Some other general stats:

  • 40 new posts published.
  • 31,950 visitors each having 1.23 page views per visit.
  • 204 pictures uploaded.
  • The busiest day of the year was April 27th with 511 views. The most popular post that day was Microsoft Azure Essentials free eBook series.
  • The top referring site of 2015 was Stackoverflow.com.
  • There were visitors from 174 countries. More than one third of all page views came from the United States, followed by India and the United Kingdom.

Top 5 posts written in 2015

These five posts, written in 2015, received the most traffic:

  1. Microsoft Azure Essentials free eBook series (April 2015)
  2. Azure PowerShell cmdlets version updates (May 2015)
  3. Custom Telemetry Events with TrackEvent in Microsoft Application Insights (June 2015)
  4. Using Microsoft Application Insights in an MVC application (April 2015)
  5. How to enable line numbers for C# in Visual Studio 2013 (July 2015)

Top 5 posts of all time

These 5 posts have received the most traffic overall:

  1. Export an ODBC Data Source from the registry (July 2012)
  2. Using Notepad++ to write C# code (March 2014)
  3. Extending PhoneGap for Visual Studio to Android devices (August 2012)
  4. PowerShell: Invoke-WebRequest and URL links (December 2014)
  5. Creating a developer’s blog (March 2012)

2013 year in review

Now that we are well into 2014 I thought it was time to reflect on the year that passed.

I wrote 10 new articles in 2013 (which is a lot for me). The whole blog received approximately 13,000 page views for the year. WordPress equated my totals this way:

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

The most requested article for the year was one I created in 2012 entitled Export an ODBC Data Source in which I outlined the steps to export ODBC data sources from one server to another. I found information in this area lacking and so I knew that by posting it to my blog not only would it help others but it would be a great reminder for myself if I ever needed to do so again.

This year also saw me expand my presentation skills as I spoke at two major conferences. For my successful session submissions I followed the tips I outlaid in an article I wrote on submitting a conference session proposal. The first presentation was at DevTeach Toronto in May and the second was at That Conference in Wisconsin in August. Both were excellent ways to get my feet wet in speaking at larger conferences.

All of my presentation slides are hosted on SlideShare. According to their end of year totals I received 1,143 views of my slides. Or, in other words, SlideShare says:

It would take three full Boeing 747 flights to hold that many people!

Two other things that I did not blog about but which occurred in the second half of the year were the following:

In July I was asked by Microsoft Canada to be a member of the Windows Azure Canadian Community Experts Team. This was quite unexpected as I am just beginning my foray into the world of Windows Azure and I have a lot to learn. That being said I have discovered a group of Canadians excited about spreading the word about Windows Azure who I can definitely learn from.

August saw the publication of the Windows Phone book I was the Technical Reviewer for. Entitled Pro Windows Phone App Development, Third Edition, it was published by Apress and it was written by the fine folks over at Falafel Software.

Pro Windows Phone App Development, Third EditionThis is the second book that I have been the technical reviewer for. I have written an article in the past of the role the technical reviewer plays in helping a book come to fruition. If you have an interest in publishing then I recommend you explore this avenue.

I hope for 2014 that I can be more consistent with my writing. It is a good way to share the knowledge I gain and to give back to the developer community. As well, hopefully I can begin to add more Windows Azure related content to the site as I explore it in more depth.

Thanks for reading and see you in 2014!

Formatting code on a WordPress.com site

I was recently reading an article by Scott Hanselman entitled How to Post Code To Your Blog and other Religious Arguments. In this post he describes the best way to show your source code on your developer’s blog. Many of the examples relate to using the excellent tool Windows Live Writer (WLW). This application allows you to compose and manage your blog posts. You can import your WordPress theme, write your story, add images and preview how it will look all while you are offline. You can then choose to post a draft to WordPress for final tweaking (something I highly suggest) or you can Publish directly to your blog.

In the article Hanselman talks about the fact that you will probably want to add some code to your blog post to illustrate your article and mentions you could just copy your code right into your HTML. However, it will not have any of the color theming most IDEs incorporate. This will make the code harder to read. He then talks about using some of the syntax highlighters that are available. You can import the highlighters into WLW and the code will appear much like it does on your IDE. However you will need to also use a JavaScript file on your website so that the code can be rendered correctly there as well.

This process will work for any WordPress.org site since you have full control over the code and where it is hosted. With a WordPress.com site though you are limited in how much you can manipulate your blog theme and the posts within it. This includes the fact that you cannot append any sort of scripting file to your site. You can read more about what types of code WordPress.com allows on this support page.

You might be thinking about just inserting images of your code instead of playing around with formatters. This is something I used to do and I found it a much easier process. However I also find it very frustrating when I visit other blogs and I find a code snippet I need that turns out to be an image and not text. Typing this out just adds to my frustration. As Hanselman states in his article placing code as images “…is rude to blind folks, and not useful as GoogleBing can’t see it. Don’t do this. You’re a bad person.” The point about having your code indexed on Google and Bing is especially poignant as you want people to be able to find and use the examples you constructed to illustrate your blog post.

So are we stuck with having unformatted code in our WordPress.com blogs then? No – there is a solution. As part of Alex Gorbatchev’s SyntaxHighlighter project much of the source code formatting used in the WLW plugin and accompanying JavaScript file has found its way into WordPress.com. The sourcecode formatting shortcode can be wrapped around sample code to preserve its formatting and provide syntax highlighting for certain languages. By wrapping your code like this:

[sourcecode language=”csharp”]
RadioButton GetCheckedRadio(Control container)
{
foreach (var control in container.Controls)
{
RadioButton radio = control as RadioButton;

if (radio != null && radio.Checked)
{
return radio;
}
}

return null;
}
[/sourcecode]

you will see output like this when you post your article:

 RadioButton GetCheckedRadio(Control container)
 {
 foreach (var control in container.Controls)
 {
 RadioButton radio = control as RadioButton;

 if (radio != null && radio.Checked)
 {
 return radio;
 }
 }

 return null;
 }

The [soucecode] language attribute can be used with multiple programming and scripting languages including C#, CSS, Erlang, HTML, JavaScript, Java, Perl, PHP, Python, Ruby, SQL, VB, XML and many others. If you leave the language blank then the code will default to plain text with no highlighting.

There are also some configuration parameters you can use to display your formatted code including changing the line numbers, collapsing the code window upon form load and disabling line wrapping. You can also choose to hide the toolbar that displays on mouseover. This toolbar allows your users to copy and print your formatted code.

Note: Placing the sourcecode shortcode tag in your WLW post for publication may cause display issues with your code once posted. Do not trust the Preview tab in WLW since it might not be reflective of your published article. Instead click the Post draft to blog button and perform a final clean up within the WordPress editor.

Finally, the [soucecode] tags will format and display your code exactly how you post it on your blog. So make sure your line spacing and indents are how you like them before you publish.

If you are a WordPress.com user and regularly post code to your blog I suggest you check out the [soucecode]shortcode. As you can see it is not a lot of work to make your code snippets accessible to all users. I and other developers will thank you when we visit your site.

Hello world!

After many years of thinking about writing a developer’s blog I have finally decided to get into the act!

I encounter challenges in my daily work that I am sure others do as well. The goal of this blog is to share the workarounds and ideas that help me develop awesome websites. They will be a resource for me to return to when I need to remember a certain kluge but I am also hoping that it can help others who are experiencing similar problems.

I work mainly in the Microsoft .NET Framework (specifically C# and ASP.NET) so most of my posts will reflect this. I have however starting branching out into Ruby and HTML5 so don’t be surprised if some posts on these subjects also creep in. And perhaps some Windows Phone 7 stuff, , ADO.NET, Microsoft events…. As you can see the list is endless.

Now, onto the good stuff!