Hackathon: An experience worth living

Last Friday, I participated in my first ever Hackathon. It was the second such event sponsored by my employer. The event was held from noon to midnight and attended by approximately 13 developers from various geographical locations.

Two of us participated from the Canadian office and partnered on a small feature. Others connected via VPN (Virtual Private Network) while a small core group ran a tight ship in the bowels of our main development centre* in central US.

First, a bit of background information. My company creates and sells assessment software for use in kindergarten to grade 12 schools with a focus on math and reading comprehension. Students are encouraged to take quizzes to validate their understanding of curriculum concepts. Teachers can then report on results and identify which concepts need to be taught more in-depth or which students require more assistance.

The challenge for this Hackathon? Given an event notification that a student has started or completed a quiz, what useful subsidiary steps could we take? My partner and I chose to code a book recommendation engine. When Student A clicks to start a quiz, our engine would get notified with information about the book such as its author, reading difficulty level, number of words, and whether the book was fiction or non-fiction. Given that information, our engine would search a library of available books to find three titles Student A might like to read next.

Books by the same author would be favoured*. So would books of the same type (fiction or non-fiction) as well as books of approximately the same length since we figured a child who’s just completed an early reader is unlikely to be ready to tackle a heavy tome.

Once Student A completes the quiz, a notification is received with the quiz results. If the student performed well on this quiz, our engine would recommend books that were slightly more difficult than the one just read. If, however, the student struggled, it would take that into consideration and recommend books that were slightly easier. Our goal was not to discourage a reader by recommending something too difficult.

The engine would then send an email to Student A’s parents to inform them that their child has just taken a quiz and here are three books we recommend they read next.

A snapshot of our Kanban board towards the end of the evening.

 

Another team chose to sent notification to Twitter whenever a child passed a quiz while yet another chose to create a live heat map that would show where quizzes are being taken in the last few minutes. The solutions were all very different from one another and used a wide variety of available technologies.

This project was a lot of fun to do though, naturally, it was built on a slew of assumptions that would not hold in real-life. For example, that library of books to search through for books to recommend? We made it up. We have that information in the software somewhere but it would have taken too long to make it available for our purposes given that only had 12 hours to work with.

We also made the simplifying assumption that only one quiz was being taken at a time and that the quiz would be started and ended reliably. Limitations that can’t work in real life but make it possible to build a simple prototype which was all we were hoping to produce.

Will we ever implement this kind of functionality in our product? Who can tell? But I sure had fun coding it and I’m already looking forward to the next Hackathon!

* These are not spelling mistakes. I am Canadian! 😉

OneThing I’ve Learned Today: Windows 8 tidbits

Just this past week, I upgraded from Windows 7 (32-bits because my desktop is ancient) to Windows 8. The upgrade went very smoothly which gave me some good vibes about this new operating system.

It’s only been a few days so I’m still getting used to the new Start Menu and the way Metro-style applications work but so far I’ve enjoyed the experience though I’ve had tCharms baro change a few of my habits.

 

Charms bar with two monitors

I have two monitors but I don’t always turn them both on so bringing my mouse to the top or bottom right-hand corner of my screen without having it navigate to the second screen requires more precision than I’m willing to exercise. The solution? Shortcuts! The Windows key + C will bring up the Charms bar quickly and effortlessly.

Sleep

Rather than shutting down my computer when I’m not using it, I normally use Start Menuthe “Sleep” power option. In Windows 8, this option can be found on the Charms bar / Settings / Power / Sleep. It can also be reached via Ctrl + Alt + Del / Power / Sleep. Downright inconvenient if you ask me. The solution? Create a tile for the Start Menu. I called mine “Sleep” and placed it as lowest and rightmost tile of the menu though you can place yours anywhere. On the picture here, it’s the one with a royal blue background and a blank page for the image.

In Windows Explorer, I navigated to:

C:\Users\***username***\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Here, I created a shortcut by right-mouse clicking and selecting New Shortcut. A Create Shortcut dialog appears. Here, I gave it the following command line:

C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState

Then I clicked Next, called it “Sleep” and clicked Finish.

In my case, I needed to perform one more step. I needed to disable hibernation on my computer. To do so, I followed the instructions found here.

Over the next few days or weeks, I’ll try to post about more useful tidbits as I find them. If you’ve found this information useful, leave me a comment! :-)

 

One Thing I’ve Learned Today: Joining the community is hard work!

Blogs have been around for a long time now and until recently, I was convinced I had missed the boat. So many people were publishing excellent content on flashy and often well-designed web pages, how could I hope to compete?

 

I regularly read various technical blogs but lately, I’ve started to feel like I’m on the outside of a fascinating community looking in. It took several invitations like this one before I gathered my courage and took the plunge.

So here I am, a newbie in a world of pros. Tonight, I figured out basic things like how to change the theme on my WordPress out-of-the-box blog page. I added the RSS feed and social media (the few I’m connected to) icons though I’m not convinced I like them yet. I’d much prefer if they stayed put. I also created a new Facebook page to go with the blog. I now feel more connected but utterly flummoxed at how many hours it took me to research and learn about everything so I could configure things almost just right.

So now that I’ve finally made a step towards joining the “community”, will it accept me? Will it think what I have to offer is good enough? Is it sufficient to create a blog and regularly write to it? Is it truly a case of “if you build it, they will come”?

Somehow, I suspect that joining the community is likely more a journey than a destination and that the hard work is yet to come… 😉

One Thing I’ve Learned Today: MVC Custom HtmlHelper

This week, I’ve spent some time learning MVC and one of the things I was trying to do was to display an image given the path to an image file. Using an <img /> tag in a Razor view seemed crude and less than optimal. That’s when I started watching the MVC PluralSight course offered for free here.

I wanted to be able to use

 @Html.Image(item.ImageUrl, item.Name)

 

Unfortunately, no such thing exists out of the box. However, making this work is surprisingly straight-forward:

Create a custom HtmlHelper class.

using System.Web.Mvc;

namespace MvcApplication1.Infrastructure
{
	public static class HtmlHelpers
	{
		public static MvcHtmlString Image(this HtmlHelper helper,
			string src, string altText)
		{
			var builder = new TagBuilder("img");
			builder.MergeAttribute("src", src);
			builder.MergeAttribute("alt", altText);
			return MvcHtmlString.Create(builder.ToString(TagRenderMode.SelfClosing));
		}
	}
}

Now, all I need to do is add a using statement to my view and add my Image tag where needed:

@using MyProject.Infrastructure
 ... blah blah blah...
 @Html.Image(item.ImageUrl, item.Name)


Quick, simple, and elegant. And if this custom HtmlHelper class is used in more than one view, you may want to forego the adding of the using statement in the view and instead, modify the Views\Web.config file and add the namespace to the list of namespaces defined for razor.

 

One thing I’ve learned today: The MCSD certification is back!

Many years ago, I earned my Microsoft Certified Solution Developer (MCSD) certification passing exams on such technologies as Microsoft Foundation Classes (MFC) which I used a lot and VisualBasic 4.0 which I never actually coded in. Lucky for me, I earned this certification before Microsoft realized that certifications aught to expire. This means I can still proudly claim my MCSD status high and low, regardless of how obsolete those technologies are today.

That was then, and this is now. Microsoft now has a new MCSD certification aimed at developing Metro-style apps (HTML5 or C# are the two streams offered) and one for web applications (covering HTML5, MVC, Azure and web services in its single stream).

Methinks I’ll have to try for a second MCSD certification… 😉

At least one thing I’ve learned today…

In the hopes of keeping up with the ever-changing world of software design and development, as well as any other area of life, I’m going to try an experiment: I’m going to attempt to post at least one thing I’ve learned each day on this blog. Hopefully, this will slow down my inevitable obsolescence.

So today’s pearl of wisdom was a bit of a ah-ha moment for me. Since I started working in the software domain, immediately after graduating from a program that claimed to have prepared me for it, I’ve felt overwhelmed by the speed of change. Programming languages mutate, tools and libraries multiply, methodologies come and go, and the only constant is that what I thought I knew yesterday is only barely good enough today and won’t cut it for tomorrow.

I listened to Scott Hanselman’s Hanselminutes podcast with Iris Classon and heard Iris mention that men tend to celebrate new knowledge whereas women tend to lament the extent of the what is yet to be learned. That’s me to a T.

Well, starting today, I’m going to celebrate my successes each day! Feel free to join me!