As a woman in the tech industry

I have never met Ashe Dryden but the fact that she can’t point to a single woman like me makes me immensely sad. I’ve never felt that my experience was particularly unique but after reading recent blog posts about harassment and sexism from Sarah Parmenter, Relly Annett-Baker and several others, I’m starting to wonder if I’m the first and possibly last of my kind.

Unlike most of these ladies, I am not a public figure. I don’t speak at conferences, I haven’t written any books or been in the spotlight for anything monumental. I’m just a woman who graduated with an Engineering degree and who has worked as a software developer at a handful of different tech companies over the last 18 years.

Growing up, my father encouraged me to try my hand at all sorts of traditionally male activities. Whenever he set out to build a piece of furniture or do some maintenance on his cars, whether it be tuning the engine, replacing worn brake pads or patching up a rusted door, he’d invite me to join him. Soldering irons, voltmeters, circuit boards and electronic components littered the basement and I was welcome to try my hand at any of it should I wish. Similarly, I was introduced to LOGO and BASIC programming when those were brand new languages.

With a childhood such as mine, Computer Engineering was a perfect fit for me. I was one of 7 ladies in a class of roughly 70 students. You would think the ladies would hang out together but that wasn’t necessarily the case. Most of us made friends amongst our male classmates and never really sought the company of the others of our gender.

Throughout my university years, I considered my male classmates as big brothers I could count on to escort me around campus after dark or to help me with assignments should I need it. Similarly, they knew they could count on me for lecture notes or assignment due dates if they happened to miss a class because of my habit of writing absolutely everything down.

Yes, I would have preferred not needing to be escorted around campus after dark but given that one of my male friends was assaulted on his way home from a night class, it obviously wasn’t safe for anyone, regardless of gender, to wander around campus alone after dark.

I’ve worked for a half-dozen different software companies since graduation and have never been treated in any other manner than professionally. No, I’ve:

  • Never been asked to make or otherwise serve coffee.
  • Never been asked to take the minutes at a meeting unless it was a rotating responsibility and it happened to be my turn.
  • Never been groped or otherwise inappropriately touched.
  • Never been subjected to derogative or suggestive language.
  • Never been noticeably privileged or negatively impacted due to my gender.
  • Never considered myself unfairly compensated by any of my employers.
  • Never felt that the value I brought into any discussion was viewed as of lesser quality than that of my male counterparts.

I’ve been privileged to work with excellent people in safe and professional environments and I’m saddened to hear that my story is such a rare one.

How my 12-yr-old son became a C# Programmer

My 12-year old son has been scripting since he was 7 or 8 and writing C# code for about 2 years now. Now for full disclosure, both my husband and I are software developers; my husband writes C++ and Java on the Linux platform but was a long-time Windows developer while I’m a C# .Net developer. We’d thought of eventually showing our son how to program but hadn’t planned on getting him started before he’d even learned long division.

The scripting was a bit of an accident. The PC game my son loved to play came with a full-featured game extension tool for users to develop their own modules and quests. Also included was the ability to write scripts to supplement the existing library with new functionality. It’s always exciting to invent your own modules and see how far you can push the envelope so this quickly became his favourite occupation.

The Copy-Paste Era

At first, his father provided him with a few key scripts that he could hook up to strategic locations and that would trigger a particular behaviour. For example, a “teleporter” script could be hooked up to a particular square in the game. When a character stepped onto the square, they would be “magically” transported elsewhere. But as any parent knows, children have many more hours for play than we parents have for fulfilling all their requests. Tired of waiting for daddy to have free time to write more scripts, my son begged for access to the scripting tool and started copying the scripts he’d already been given and tweaking them to fit the new functionality he wanted. That’s how he realized that programming was fun and not particularly difficult once he understood the logic and the syntax.

The Bounce-Stuff-Around-The-Screen Era

Writing scripts for your favourite game is one thing. But wouldn’t it be even more interesting to write a game of your own from scratch? So father and son sat down together and coded Pong, Asteroids, and other such simple games. At this point, it was mostly my husband coding but explaining what he was doing. This can keep a boy interested only so long and since we’d recently bought an XBox, it made sense to delve into XNA programming next.

My husband bought the wonderfully kid-friendly Learn Programming Now MS XNA Game Studio 3.0 book by Rob Miles (there’s a newer edition out now) and worked through the first few chapters with our son who took to it like a duck to water. Soon, he’d sped through the book and was writing all sorts of games that bounced a lot of objects on the screen.

That kept him occupied for a while but eventually, he realized there was more to the games he liked to play than images moving on a screen. He did not have the words to express what he was looking for but I could tell he wasn’t satisfied with the games he was producing. By then, he could handle simple C# data types, conditional statements and loops and had a basic understanding of classes and inheritance. He also understood XNA sprite batches, timers and the Draw method.

The Era of Enlightenment

I came back from Codemash v2.0.1.2 with the EverCraft Kata Dungeons&Dragons-style game instructions and, on a whim, suggested working on it with him. We’d do it using Red-Green-Refactor Test-Driven Development; an agile technique I’d been introduced to at Codemash and wanted to practice. As a huge D&D fan, I figured it was right down my son’s alley. I wrote the first failing test, he wrote the code to make the test pass and I refactored his code, explaining what I was doing and why. Then we traded places and he wrote a failing test for the functionality I was to implement next.

We spent hours implementing the character class with its hit-points, abilities, and more and by the end of that day, my son’s eyes were shining. Finally, he’d uncovered the missing piece of the puzzle. He now knew how to add substance to his games: that logic that made characters tick and non-visual things happen. We did a few more sessions but that project was abandoned long before we reached the end of the Kata document in favour of the sims-based game he’d been aching to write; the one where a few thing might move on the screen but many of the underlying parameters change as time passes.

And that’s when he started flying solo. Now, I hardly ever see his code but the things he creates have me wondering if I could do half as well.

My learning quest

Early in January, I declared this the “Year of Learning”. The year I would immerse myself in technology and absorb as much as possible in all the areas I don’t yet consider myself knowledgeable enough. This means I have started and will continue to deepen my understanding of various aspects of software development from patterns to new programming language syntax, from modern data stores to effective debugging tools and techniques, from JavaScript and its myriad helper libraries to the intricacies of asynchronous programming.

Strategy Strategy

In order to accomplish this lofty self-improvement goal, I took the plunge and subscribed to PluralSight online training. This amazing library of on-demand videos is now my introductory-level training resource. Apress, O’Reilly and Manning are three great sources for technical books and regularly offer discounts on select eBook titles so I’ll be supplementing the online training with their wares, starting with the small collection of eBooks I purchased in the past year but never got around to reading. These should help flesh out concepts to a higher degree than an online course could ever do. But skills learned and never applied get lost quickly so I’ve also committed to spending more time developing code at home so I could try out interesting techniques and tools I might not otherwise get a chance to use.

How will I measure improvement?

I’ll know I’ve improved when I’m able to read the MSDN Magazine each month without feeling that every article has been written for someone much smarter and knowledgeable than I am.

Measuring Progress

It’s only February and already, I feel I’ve woken up to all sorts of new-to-me concepts and strategies that I can’t wait to put into practice. I must be doing something right!

What next?

Now that I have been at it for almost two months, I’m ready for the next step in the journey and that is to share some of what I’ve learned with others as I go. This is prompting me to dust off my “One Thing I’ve learned Today” series. I’m not aiming to write every day but I’ll post something here as often as I can in the hopes that someday, someone else may find a useful bit of information that will help them along their own journey.

Please join me!

Are you satisfied with the state of your career?

I was chatting with a colleague recently when the topic of satisfaction with the state of our respective careers came up. Both of us are software developers with similar backgrounds, at least a decade and a half of experience behind us, married with families, and reasonably financially comfortable.

His immediate answer to the question of whether he felt he was where he’d wanted to be at this point in his professional life was a resounding yes. Mine was an emphatic no.

Nowhere close.

When he prompted me, I made a desperate attempt to justify my answer but the words I heard myself say lacked conviction. I spoke of the potential I’d repeatedly been assured I had and that I hadn’t lived up to. I spoke of the expectations others had had of me and how I’d consistently come short. Even as I uttered the words, I was painfully aware that my arguments were specious. Rather than explaining why I, personally, wasn’t satisfied with my career’s progress, I was detailing the multitude of ways I felt I’d failed to measure up in the eyes of others. None of my justifications had anything intrinsic to do with me. I had ceased to be a sentient individual to become a mirror for the people who had influenced me in the past.

Putting aside external expectations, I truly do feel I haven’t ticked enough items off the list of accomplishments any self-respecting software professional should have completed midway through their career. So as an exercise, I decided to sit down and attempt to express a new answer; one that placed me in the driver’s seat.

In my early dreams, the ones fuelled by teachers and other influential people, I had envisioned myself at the bleeding edge of technology developing the next greatest thing. I’d be an expert in a particular niche area, contributing to or outright authoring technical books, providing training, and possibly even speaking at the occasional conference.

Delusions of grandeur? Possibly. But I knew I had the potential; I’d been told often enough.

I got married while in university and, within 5 years of my graduation, I was the mother of two children and working a four-day week at a company that specialized in asset management software. Though I could speak with some authority about inventory replenishment algorithms or the impact of two digit years as the end of the millennium loomed, the world was leaving me in the dust. The fastest and brightest minds were eagerly jumping on the internet bandwagon while I was adding functionality to or tweaking what was even then considered legacy code. Already, a large portion of the dream had evaporated.

The next few years found me working my way up to development manager by way of technical lead. I did my best to juggle career and family life but my career lost more often than not till I reached a point where the career simply had to be put on hold. My children needed me at home.

I spent five years as a stay-at-home mother though I took on part-time contract work so I could keep up my programming skills. The strategy worked but this was not a period of professional growth for me. By the time I felt that my children no longer required my presence at home, I was so far behind that I no longer considered myself a senior developer. I eventually found a company willing to take a chance on me and hire me as an intermediate developer. That was three years ago.

I’ve been struggling ever since to catch up and learn as much as I can but I’m still far behind the people I consider my contemporaries.

Am I where I thought I would be? Not even close. Do I regret it? A large part of me believes I’ve done the right thing and is satisfied with what I have accomplished. And yet a small but vocal part of me can’t help but yearn for the future I might have had.

I was recently reading the November/December 2012 issue of The Writer, a magazine about the craft of writing, and found the following advice by author Diana Abu-Jaber: “Don’t worry about other writers’ successes or where you thought you would be or should be by now or the latest disappointments. That’s not a winnable game. Wish everyone well, applaud for their triumphs and work, work, work!”

That’s advice I’ve decided to take to heart. So how happy am I with the state of my career? Taking all factors into consideration, I’m satisfied. Now, off I go play with some of those new fangled tools I keep hearing about but haven’t yet had a chance to try.

What about you? Are you where you thought you might be by now?

 

 

 

File Upload with ASP.Net Web API

I recently had the opportunity to create a new RESTful service for the project I was developing for my employer. As this service would be used internally, it was the perfect opportunity to try a technology that was new to me: ASP.NET Web API.

This new service would enable the caller to upload and download images. This is nothing particularly unique as there are many excellent examples on the web that demonstrate some flavor of this. All these solutions call System.Net.Http.MultipartFormDataStreamProvider to write the image file to disk. In my case, I wanted to store the image binary in a SQL Server table so I used the System.Net.Http.MultipartMemoryStreamProvider class to allow me to read the contents of the request and send the image stream to the method that wrote to the database.

As I was developing with Visual Studio 2010, I could not use the new await functionality.

public Task<IEnumerable<int>> Post()
{
  if (!Request.Content.IsMimeMultipartContent())
  {
    throw new HttpResponseException(Request.CreateResponse(
	HttpStatusCode.NotAcceptable, 
	"This request is not properly formatted"));
  }

  try
  {
    var streamProvider = new MultipartMemoryStreamProvider();
    var task = Request.Content.ReadAsMultipartAsync(streamProvider)
	      .ContinueWith<IEnumerable<int>>(t =>
    {
      if (t.IsFaulted || t.IsCanceled)
      {
        throw new HttpResponseException(HttpStatusCode.InternalServerError);
      }

      var addedId = streamProvider.Contents.Select(i =>
      {
        Stream stream = i.ReadAsStreamAsync().Result;                      

        // Insert your own code to deal with the Stream.  
        // In my case, I called my code that wrote the image to 
        // database and returned the image's id in imageId such as below.
        int imageId = DatabaseCode(stream);
        return imageId;
      });
      return addedId;
    });
    return task;
  }
  catch (Exception ex)
  {
    throw new HttpResponseException(Request.CreateResponse(
	HttpStatusCode.NotAcceptable, 
	"Error: " + ex.Message));
  }
}

This is a minor tweak to the code from the samples linked above but I thought this might be of use to the next person, or even my future self, who attempts to store images elsewhere than directly to disk as I had to do.

If you found this post helpful or wish to constructively point out improvements, leave me a comment!

Happy coding!

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… 😉