Archive for the ‘Work’ Category

Robert J Sawyer at Google Waterloo

Monday, June 22nd, 2009

A few weeks ago we hosted Robert J Sawyer over for lunch and he gave a pretty interesting talk about his upcoming book Wake. The books is about the Web gaining consciousness. I’m not even a huge sci-fi fan and I found it pretty interesting.

First two weeks

Saturday, January 24th, 2009

I just spent 2 very warm weeks in Mountain View, CA as part of my orientation at Google. Unfortunately it’s time to go back to the -18C temperatures of Canadia. A bunch of people keep asking me how it was, so here’s the lowdown:

  • Awesome food (I made a counscious effort to gain 5 pounds in 2 weeks, lets see how it worked out)
  • Sweet weather (yeah I just have to say it again to rub it in)
  • Went on a 3-day trip to Vegas (we can call this my starting work bonus vacation)
  • I’m going to be working in the AdSense group (that’s where Google supplies ads for third-party sites and both Google and the publisher site make money from the clicks)
  • I don’t really yet know what I’m going to be working on, but even if I knew it’s possible I’d have to kill you if I told you
  • Orientation wasn’t super-useful because I’ve seen about 60% of it before – the other 40% was actually pretty awesome
  • Hanging with people I haven’t seen for 8 months was a lot of fun
  • I’m going to be working mostly in C++ so I spent a bunch of time in the past week cramming up on C++
  • Google rocks
  • This is all

Learning to read

Monday, August 18th, 2008
Image licensed under Creative Commons

Image licensed under Creative Commons

No, this is not a post about illiteracy.

OK, now that I got that off my shoulders…

I’ve been learning Ruby on Rails for the past few weeks, and I’ve encountered an interesting question that I’ve faced a few times before and never really found a good answer to.

How do you read code?

And I don’t mean that in a metaphysical sense. I mean when you’re learning a new framework, language or technology you usually look at some code written in it to try and see how real world applications use it. These days you can pretty easily find Open Source code written in almost anything. What I find difficult is figuring how to read the code of these applications.

I’ve read a book about Ruby on Rails, so I understand the basics decently well. I’ve created a toy application just to see how to do it. But the jump from that to digging through source code for a full fledged real application is pretty huge. Where do you start? Initally I started looking at the models to try and understand the objects that the application dealt with. But I found that to be a bit confusing. Then I looked at some of the key controllers (like user authentication and those that handle the main pages) and also found that a bit confusing.

Finally I sort of settled on looking at a specific page in the app, looking through the view that generated it, then going to the controller that was invoked, and maybe looking at some helper methods and model code that I found there. I found that to be a reasonably understandable strategy. But I’m not really sure if it would have worked as well if I didn’t already have looked at some model/controller code before hand.

This is not specific to RoR. If you learn a new development environment, how do you figure out where to learn the code?

Googled

Friday, August 8th, 2008


View Larger Map

Click View Larger Map to see more…

Recent Readings

Tuesday, August 5th, 2008

I’ve been asked a few times in the past few weeks about books that I’m reading, mostly because I tend to carry them around with me a lot. So I decided to write a bit about them. Maybe I’ll inspire a new generation of wonderful, socially-outcast bookworms. Or maybe I’m just bored. Here goes.

The Jungle
This is a story describing the horrors of the Chicago meat packing industry at the turn of the 20th century. The story follows a large fictional family of immigrants from Lithuania coming to the land of opportunities, and hoping for a better life. Instead they end up being enslaved by the Chicago meat packers, and starved to death one by one. This a very heart-wrenching story, and definitely not for those with a weak stomach. When the book was published in 1906, it was heavily censored and most of the worst details of human suffering were removed. What remained were the countless examples of unsanitary and plain dirty conditions in which America’s meat was prepared. The final outcome was that the book caused an uproar that culminated in the creation of the Pure Foods and Drugs Act (1906) and the eventually FDA.

The last third of the book is full of idealistic social propaganda, which makes you cringe a bit when you read it. This is why the last 100 pages took me longer to read than the rest of the book taken together. Still, the book is a very read, from both a historical and a personal perspective. More than once I’d finish reading a few chapters of the book and I was pretty depressed for the rest of the day. But overall reading it makes me appreciate much more all the little luxuries that we take for granted. Like, oh I dont know, not working from 6am till 9pm in a dirty, stinky, scorching room.

Agile Web Development with Rails
I’ve started learning Ruby on Rails a few weeks ago, and was recommended this book by a few people, and I’ve found it to be just excellent, so I’m forwarding the recommendation here. It starts out with a tutorial that covers many of the features of Rails by building a shopping cart application. The second half of the book covers most of the features in pretty excruciating details. Along the way they manage to cram in a whole lot of best practices, as well as good writing. I haven’t gone much further than reading the book yet, so we’ll see how well it prepares me for actually writing Rails applications, but it’s definitely a smooth and easy to read introduction.

More recommendations to come shortly.

Running ‘ri’ with colors under Mac OS X

Tuesday, July 29th, 2008

Ruby has a command line utility called ri for looking up documentation, and ri has a nice feature of displaying its output with pretty colors. Unfortunately, when I tried to run it (ri -f ansi) what I got was:

After tinkering about a bit I gave up. But today I decided that I’ll have my damned pretty colors even if I have to spend a lifetime getting them! Thankfully it only took 10 minutes. ri uses less to display its output in a scrollable form, if you make it not use less you get what you want by giving it the -T option:

“But…but…but… I like scrollable output!”, says you, whimpering softly.

Well, stop your cryin’, so do I.

less itself takes an option to treat escape characters as escape characters (duh!) instead of just printing them. So you want to make it use it. Here’s what you want to add to your Bash profile file to make the magic happen:

# I likes pretty colors!!!1!!
export RI="-f ansi"
export LESS="-R"

And the result is:

DemoCamp 18

Wednesday, July 16th, 2008

I attended DemoCamp 18 yesterday, which was the first demo camp for me in about half a year. I was really excited about it, because I was looking forward to seeing awesome demos and socializing with people. Unfortunately it was a pretty big disappointment. The venue was way too small for the event, and it got really loud, so talking with people was difficult. Also because of the size and layout of the venue a lot of people ended up seating around tables with their cliques and didn’t really socialize much.

I’m not going to rehash all the demos that were presented because several people already mentioned them. Some were pretty nice and I think overall the quality of the demos was relatively good.

So why was I disappointed with the event if the demos were relatively good?

First of all lets start with the “barely legal” jokes that Joey was trying to crack all night. No one was laughing at them Joey. Maybe a few cackled for the first few times, uneasily. But after that people mostly looked at each other and shook their heads. Even the other people who were on the stage looked uneasy. It might be cool to crack these kinda jokes with your best buds, but it’s not cool when there’s 300 other people in the room and you’re supposed to be the representative of some sort of “community”.

The other big problem I have with the demo camp is the consistent lack of understanding of what a demo is. There’s always some people who just don’t get it. Last night two presentations failed in this way, one was from Refresh Partners and the other from Screed.

The Refresh Partners presentation was about 4 minutes of “wer’re awesome and better than X, Y and Z” and then 1 minute of flipping through some opened browser tabs. I’ve seen these guys at DemoCamp as far back as half a year ago so there’s no claiming that they just didn’t know what was expected.

The Screed presentation was a few minutes of “We’re so awesome” followed by “We know this crowd doesn’t like pre-canned commercial videos, but here’s OUR infomercial!”, the assumption being that because they’re awesome theirs will somehow be different. I don’t mean to pick on these guys because I’m sure they mean well, but really, just demo!

I think there needs to be a bit more work from the organizers in filtering proposed demos to make sure there’s some demoing involved. I don’t mean any decision on how good your product is. But just talking with each proposed demoer for 10 minutes (whether by phone, skype, or in person) would work. Ask one simple question: “tell me in less then 2 minutes what you will be demoing”. The point is just to see that people have given this just a tiny bit of thought. If someone says “I’ll go through my product and show what it does”, ask “Well what are the specific things you’ll be showing?”, and if they say “I don’t know, just something”, tell them to try again when they know.

end rant

Another bubble

Thursday, December 6th, 2007

Here comes another bubble!

Final stretch

Wednesday, December 5th, 2007

So…

It’s finally almost time to be done.

Yesterday I wrote my last test. Eva. If you must know it was the operating systems term test, and it was pretty damn horrible. Enough said. Anyways, that wasn’t the point.

I’m not usually very feely-touchy about these things and when I saw other people who were about to graduate being super excited my reaction was usually: meh. I totally didn’t expect to be counting all the “last” things. Last week was the last assignment I would ever hand in. This week is the last test. In a week in a half it will be the last exam I will ever write.

Wow.

It feels like I’ve spent all of my life at UofT. No wonder, considering that I’ve been here for the past five and a half years. I kinda stopped even thinking that there’s life beyond this stage, I tend to go between one assignment/test rush to the next. Finally there’s a light at the end of the tunnel and it took me a bit of time to even figure out whether that’s good or bad.

At the beginning of the semester when I realized that it was the “last” I was kinda confused. What comes next? Yeah I knew I’m gonna go to an internship at Google, but that was only a temporary thing. Then I’ll come back to Toronto, and then what? Good question. I was still considering whether I should go to grad school or not at that point, but as the semester wound up I realized that I’ve had enough of this for a while. And that’s where the finality of it all started setting in. What happens next, after the summer? I still don’t really know the answer to that question, but now I think I’m getting over that tipping point of being excited instead of just confused.

I think it’s time to take over the world. Take no prisoners!!1!

(Photo: by Laurie McClanahan, under )

Trying out the Specfile Editor

Friday, September 22nd, 2006

I’ve been asked several times how people can try out the specfile editor that Andrew and I have been working on for the past month or so. We’re not including it in the update site where our other plugins reside just yet because I don’t think it’s stable/usable enough for that, and it’s not in fedora extras yet for the same reason. I hope that maybe by the time of FC6 final or a bit after it’ll reach a good enough state that we will put it in those places.

If you just one of those people that want to try it now, awesome! You have 2 options:

1. You want to just try it out for a bit but not really use it for editing specfiles:

Just check out the org.eclipse.cdt.rpm.editor plugin from :pserver:anonymous@sourceware.org:/cvs/eclipse (hint: copy paste that string into the Eclipse CVS checkout dialog), under the rpm module, and just run it as an Eclipse Application. Click on the Run menu, Run. Then right-click on Eclipse Application, click new, pick the plugin in the plug-in tab, and run. You can now create a new project (just a general project is good) and import your specfile into it. You can now edit the specfile with the specfile editor, which will open automatically for files ending with .spec.

2. If you want to actually use it for anything more than just a cursory glance you don’t want to have 2 Eclipse instances around, unless you’re very RAM-happy. Here’s what you do:

From :pserver:anonymous@sourceware.org:/cvs/eclipse checkout org.eclipse.cdt.rpm.editor and org.eclipse.cdt.rpm.editor.feature (under the rpm module) into your workspace. Now create a new project, this will be an Update Site Project, under the Plug-in Development category in the New Project wizard. Note that you need the PDE installed for this, under Fedora all you need to do is ‘yum install eclipse-pde’. Now double-click on the site.xml file in your new project, create a new category, under that category add a feature, select the org.eclipse.cdt.rpm.editor.feature project in your workspace as the one to add. Now click on the ‘Build’ button. This will create a local update site in your workspace. You can now use this to install the plug-in.

Go to Help-> Software Updates ->Find and Install, pick New Local Site on the second page, and pick your newly created update site. Now if you want to update the plugin, all you have to do is CVS update the plugin in your workspace, hit build in the site.xml of the update site. And then go to the Find and Install dialog again. Only instead of installing a new feature pick ‘Search for updates’.

Enjoy.