Saturday, December 24, 2011

Καλα Xριστουγεννα - Merry Christmas.

This year has gone by super fast, I can't believe it's almost over.  To help ring in the New Year, I thought I'd close it out by giving an update on some of the highlights.

Travel
This year was a whirlwind of trips, both for professional and personal reasons.  I racked up quite a few airmiles traveling to:
  • Okinawa (Dec 29 2010 - Jan 4 2011)
  • Kamloops (June 17-19 2011)
  • Hong Kong & Singapore (July 10-24 2011)
  • Iceland (Sept 11-19 2011)
  • Good old Vancouver :-) (Canadian Thanksgiving 2011)
  • Portland Oregon (Nov 8 - 12 2011)
  • Road trip to San Francisco (US Thanksgiving Week, 2011)
  • San Diego (Dec 15-20 2011)
Phew!  Can't believe I got all that into one year, but I had some amazing experiences.  Can't wait to see where next year takes me!

Professional Life
This year I learned so much and have had the chance to work with some amazing people.  Here's a few of the most memorable parts of the year:
Books
I got a lot of reading done this year!  Some of my favorite books were:
I'm still immensely happy with my Kindle but have not made the leap into the tablet realm yet.  We'll see where 2012 takes me on that front.

Blog
In November I attempted to participate in NaBloWriMo, and almost succeeded in writing a post every single day of that month (I missed one or two).  I've been able to keep it up in December, although I've been writing more like every other day and with vacations and holidays I've been slacking off a bit.  Here are the top 5 posts on my blog this year:
And here's what my pageviews look like month over month:


Well, onwards and upwards!

Friday, December 23, 2011

To-do's for 2011

This great article, "11 Things every Software Developer should be doing in 2012" has some excellent advice for developers to follow.  When we transition from student life to the world of full-time work, it's easy to focus only on the skills needed for day-to-day work and let the rest become rusty.  It's so important to not let that happen through continued practice and study outside of work, something that's definitely on my list of New Year's resolutions.

What's on your to-do list for 2012?  What are your professional goals/resolutions?

Tuesday, December 20, 2011

San Diego Trip

I'm on my way back from San Diego, where I was attending my sister's wedding.  For the most part the weather was warm and sunny and the scenery was spectacular.  Here's a few shots I took with my phone today in La Jolla, just north of San Diego:

There are seals on the rocks and beach!
Beautiful beaches and big waves off of La Jolla.
View of Del Mar Beach in front of my cabin on Camp Pendleton.

Monday, December 12, 2011

San Diego, Here I Come!

In a few days I'll be headed to San Diego, so blogging may take a backseat for a week or so.  Hope I'll be too distracted by this:


to worry about real-world stuff for a little while! :-)

Saturday, December 10, 2011

A Sweet Tooth, cont...

So I didn't quite finish off the problem I talked about in my last post.

The next part asks how much Jeremy's advantage increases by if you increase the number of cakes.  You might say, have 7 cakes.  Would Jeremy still come out ahead using the rules in the previous challenge?

I just used some extrapolation to do this one.  It's not quite as thorough as the solution in the book, but we end up at the same place.  First, I looked at the case where there are two cakes, n = 2.  Then Jeremy's advantage over Marie is 5/4 - 3/4 = 1/2.  Next, I looked at the case where there are three cakes, n = 3.  Then Jeremy's advantage over Marie is 15/8 - 13/8 = 2/8 = 1/4.  You can keep increasing n and you will see a trend, which works out to the following equation: A = 1/2(n-1).

I wrote a little code in C++ to let us easily extrapolate:
#include "stdafx.h"
#include "math.h"
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
 double advantage;
 int numCakes;

 cout << "Enter number of cakes: ";
 cin >> numCakes;
 advantage = 1.0/(pow(2.0, numCakes - 1));
 cout << "Jeremy's advantage is: " << advantage << endl;
 
 return 0;
}

The question then asks if there's a way to make sure both players of this game get an equal amount of the cake.  That part is easy!  As we noticed when Marie goes first, Jeremy always cuts that cake in half.  If she can always go first, they'll always get an equal amount of cake.

Thursday, December 8, 2011

A Sweet Tooth

As I mentioned in yesterday's post, I've been working through a book of puzzles for programmers.  The title of the first problem is 'A Sweet Tooth', and is very apropos since I had a visit to the dentist this morning (I should probably visit the dentist more and do puzzles less, but that's another matter).

In the problem, there are two children playing a game of cutting cakes and trying to get the largest pieces.  Dennis Shasha, the author, does a pretty good job of explaining the problem, but the hints he gives are a bit wordy and I think those who haven't done a lot of math proofs before might not bother with them.  I think it's easier to state assumptions and separate out the reasoning into cases, working through the math for each methodically.  I like to write mine out on a white board and I wrote out all the algebra, but ended up with the same solution as the one in the book.

I'm too lazy to type it out, but thanks to my handy cell phone you can see how I did it here.  Here's my answer to the first problem:


And here's my answer to the second:


I think it would be fun to code up a generic solution for x number of cakes.  I'll try to post it here when I do.

Wednesday, December 7, 2011

Practicing Problem Solving

I've been looking at Dennis Shasha's book "Puzzles for Programmers and Pros", which combines two of my favorite activities: programming and puzzles!  Going through the book is fun and a good way to brush up on those languages one doesn't use on a regular basis, and I may post my experiences with it going forward.  Have you tried the puzzles in the book?  What did you think?

Tuesday, December 6, 2011

Nous Nous Souvenons

Today is the anniversary of the Montreal Massacre, which took place on December 6, 1989 at l'École Polytechnique de Montréal, Canada.  On that day, 14 female engineering students were killed by a male student who blamed them for his problems in life.  So, today we remember, and commemorate the event as the National Day of Remembrance and Action on Violence Against Women in Canada.

When I was looking at related news stories and articles today, I found a couple of positive ones that I thought I'd share here.  The first one is particularly related to CS Education Week (which I've posted about a few times now); it's a blog post by the Girl Guides of Canada on why STEM programs for women are important, as told by Girl Guides' scholarship winners who themselves are studying in STEM programs.  Having been a member of Girl Guides for roughly a decade growing up, I'm happy to see them encouraging young women to enter STEM fields and explore technology as a career.

The second is an article about the top 100 most powerful women in Canada, featuring one of my favorite authors, Margaret Atwood (whose books I've also occasionally posted about here).  It's great to see these women honoured and I'm a little embarrassed that I don't know who more of them are.  Should make for some great reading over the coming days!

Monday, December 5, 2011

Women of Science for the Holidays

Not only is it CS Education Week, but many people have started decorating for the holidays.  And what better way to celebrate both than with these non-denominational ornaments laden with female scientist role models!  And two are female computer scientists!  Awesome!

Sunday, December 4, 2011

CS Education Week Is Here!

This week is CS Education Week.  The idea is to celebrate and raise awareness of the impact of computing science and the need for CS education.  You can find out more here.

My first experience with CS education was terrible.  It was Grade 10 and I was enrolled in the pre-IB program (a preparation year for the full IB program which started in Grade 11).  I had chosen CS as an elective as I was generally interested in computers and programming, but had no background or training in either.  The first day the teacher gave out the assignment:

"OK, you guys are going to code a database, and you will be able to sort, save, search, and print records.  Go."

Can you imagine my shock and panic?  I had no idea what to do, but it seemed like all the other students in the class (all  boys, incidentally) did.  They confidently started up their IDEs and began typing away.  There was no textbook and the teacher did not offer any kind of useful help, and there was no internet so I could not search for examples or tutorials there either.

Well, I made it through the year (I had to, since by that time it was too late to transfer and nothing else fit into my schedule) but vowed never to take another CS course again.  I didn't feel like I learned anything except HTML programming and was very annoyed by the experience.  The next year I switched to Physics and managed to avoid CS courses almost entirely in my undergraduate studies.

Luckily I realized later how important CS would be for me and went back to school to study it - but I imagine that there must be many students like me who get turned off early on and never come back.  My experience highlights a few things that are currently missing from CS education in my opinion:
  • Programming is not CS: That is, programming is a tool of CS, but at its roots CS is much more than just writing code.  CS to me is all about modeling solutions to problems using algorithms and data structures.  It's about how to think abstractly, how to analyze problems and their solutions to come up with the most efficient one, and it's how to communicate those solutions to users in a sensible way.  When I took my first course in algorithms and data structures, I fell in love, but that wasn't until long after completing my undergraduate studies.  It seems to me we have the order of things backwards here.
  • CS is everywhere: There are so areas of education that CS could impact.  Bringing up CS when teaching about other topics could help inspire students or at least get them thinking about it more broadly.  Algorithms are an easy example when it comes to mathematics, and pretty natural when you think about the programmable graphing calculators students are encouraged to use these days.  We can start even earlier; even kids in elementary school could be learning how to sort using various algorithms (there is a neat demo using blocks and weights, or discs).  There are all sorts of applications of CS to art (digital painting, photomanipulation, using computers in art installations, graphics displays, etc).  There is a lot of literature around computing these days.  I'm thinking of Cyberpunk books like Neuromancer or Cryptonomicon.  How about artificial intelligence?  When I was a kid one of my favorite discussions on this topic was whether the character Data from "Star Trek: The Next Generation" was alive or not:
  • Teachers need CS, too: In my (admittedly limited) experience, few teacher training programs have little if any focus on CS (or even STEM subjects in general).  How can we attract people with the necessary technical skills to teaching, when the technology sector provides numerous better-paying jobs?  But it's not just technical skills we need in the classroom - we need a special blend of the ability to teach and instruct in addition to the necessary subject knowledge.  At my university they had a course which was in effect 'Math for Teachers'.  Maybe we need something similar for CS.  Greater awareness of CS in general among teachers could help them integrate it into more traditional subjects, especially when CS-specific courses are not available.
Are you supporting CS Education Week in some way?  If so, please sign the pledge and talk about it!  If not, please consider how you can help raise awareness.  I don't think my experience is all that uncommon, and if so we must be losing an awful lot of talent to other fields.  Let's do what we can to help make things better!

Saturday, December 3, 2011

Show Me the Place

Leonard Cohen has a new song out, listen to it here.  It already has a lot of great reviews.  Looking forward to his new album which comes out at the end of January. :D


Thursday, December 1, 2011

Robots in the News

A few pieces of robotic news I came across this week!  First, a robot that can recognize itself in a mirror and tell the difference between itself and other objects.  The video is super cute!

Second, and perhaps more interesting, is a new robot driven by a Windows Phone.


The robot is being developed by WPBots and can actually work with Windows Phone or Android.  It's pretty neat and I'd love to try out some programming for it when it becomes available.