Feb 5, 2009

Some Tech Resume Tips

I'm not really the best person to be giving resume advice given that mine isn't exactly impressive, but from reading a fair amount of them over the last little while I can tell you some things that I've thought of.

  1. Do not use .docx format. This is not standard. It is not supported in older versions of Office or in OpenOffice without active work on my part.
    The formats I prefer are: plain text or PDF if you want to have fancy stuff. .doc is acceptable, although OpenOffice doesn't render everything the same way as Word, so lay off the heavy formatting or I won't be able to read what you've sent me. This probably isn't the same for most people, but in the tech world there are a fair number of Linux geeks that may be reading your resume in OpenOffice. Make sure it doesn't look like ass there.

  2. Normally in my books it is OK to apply for the job if you don't have the relevant experience that the job posting is asking for, provided that you have some other way of setting yourself apart from the hordes of other applicants who also don't have the relevant experience. People are great at learning and I have no problem teaching people.
    However if the job posting says "startup", chances are they can't afford the ramp-up time. So if you don't have the relevant experience, you better have something huge to contribute in the long run.

  3. It'd be nice to have code samples of what you've done. The best is if the code is on SourceForge or Github or Google Code, so that we can actually go on there, easily browse it and see what it is that you've done. If you just send us a random code sample that has your name on it, it might be yours, but we have no real way of knowing.
    If you don't have this, have a blog and write a couple posts about coding.

  4. It really amuses me when people put "strange" languages like Scheme or Haskell on their resume. Now this always makes me want to ask about them. If you haven't noticed yet, I like to play around with languages a lot. While I don't really know enough about many of them to do some real work with them, I know enough to see whether you're full of shit or not. And I'm guessing I'm not the only person like this. So if you put Haskell on your resume, be prepared to answer questions like "how do you swap the values of two variables?"

There's one thing that really bugged me. I got this guy's resume and decided to give him an interview. At the time we didn't have an office where I could interview people, so I told him to meet me in Square Victoria right near that big sign that says "Metropolitain" at the metro entrance (there would be no excuse for not finding that!) It was November and freezing. The guy didn't show up, I waited for about 25 minutes or so after the time decided upon. So I went home, cold and annoyed. He never emailed/called me saying why he couldn't make it.
So far I was slightly annoyed, but not for long. I just thought, "whatever, no big deal. I'll just make some hot chocolate to thaw out and all will be good again."
Three months later (as in around now) he applied again. Now I can't really blame him here since the job posting was slightly different, the guy who wrote it wasn't me this time. But yeah I definitely recognized his name and this time gave him a figurative red X in the form of the delete button.[/rant]

Anyway these are my resume tips, feel free to care or not. Or argue that I'm wrong, interviewing/resume judgement isn't an exact science.

Feb 1, 2009

Ruby and Recursive Send

Some dynamic languages have the ability to call an arbitrary method of an object. The name of the method to be called is usually stored inside a string.

Ruby is no different. You use Object#send to call a method:
"5".send(:to_i)   # => 5
This isn't that useful for a small thing like that example there, but for more sophisticated applications this can save you a lot of typing.

For something I'm working on, I have some code that gets repeated a lot on different return results of an object. So I figured I'd just stick all the things I had to do in a string, iterate over the string calling send. However some of the properties I wanted were a little complex, as in they were calling the methods of a return result of a method. For example (something I may have used on my freegamage site):
["genre", "user.name"].each do |method|
game.send(method)
end
Unfortunately the "user.name" property is not actually a method of game, so it fails.

We have a solution though:
class Object
def send_r(method)
method.split(".").inject(self) { |ob, meth| ob.send(meth) }
end
end
This little method assumes you're using something like "method1.method2.method3..." when you call it, and then recursively calls each method on the previous method's return value.

Jan 30, 2009

Linux, Dual Head and Background Images

The other day I got a new monitor in the mail from NCIX (who I highly recommend if you haven't heard of them). I realized that having two monitors at my last job gave me much more productivity, but since I work at home now I should have two monitors here. That's my excuse and I'm sticking to it.

I wrote a post less than a year ago on how to get dual head going with Compiz Fusion and back then it was really really annoying. Since then we have the nvidia-glx-new package right in Ubuntu, so there's no more having to shut down X in order to install the driver. Awesome.

So yeah, all you have to do is plug in your monitor, have nvidia-glx-new installed (assuming you're running an Nvidia card, no clue how to do it with ATI), open System->Administration->Nvidia X Server Settings, click X Server Display Configuration and enable things in there. For me, I had to click Detect Displays and click the monitor that is disabled. I clicked Configure, selected TwinView and off it went, working perfectly.

There was one last small issue. My desktop background was centred :(. So half of it was on one screen and half was on the other. There are two real fixes for this. If you just want the same image on both sides, you right-click the desktop (in Ubuntu), go to "Change Desktop Background", and set Style to Tiled. Done!
If you want to have two different backgrounds, the easiest option is probably just to take your current image, add some space to the right of it and paste a new image there. Then save your huge image as a file and select that as your desktop background.

On another note, having two screens like this for web development is awesome. I can fit a browser window, two IM windows, GVim and two terminals all without overlapping. Maybe it's time to try a tiling window manager!

Jan 29, 2009

Another Use For Duct Tape


Stupid cat.

Jan 28, 2009

Win/Fail in Ruby

Very simple yet quite amusing:
def win
true
end

FAIL = nil
Put this somewhere in your Ruby code, and you'll be able to write:
if something == win
...
if something == FAIL
Originally I had it with a lowercase fail, but that might conflict with some library somewhere. Plus it is cooler if it is in all caps.

This was inspired by a tweet from Giles Bowkett.

Jan 27, 2009

OSWs + Profit == Ethical?

The other day I posted about OSWs (open source websites, I shortened it because I might be talking about this a lot) and what their feasibility would be.

I've been thinking about this further and have come up with more ideas. One major difference between a web app and a regular app is that web apps require hosting. You can't just slap it up on SourceForge and say you're set.
The problem is that hosting costs money. Under the assumption that your site actually starts getting traffic, I don't feel that it is really fair for you to have to foot the bill while lots of other people are using your site. Not only is it unfair, but quite unsustainable unless you have another job which rakes in the dough.

This got me thinking about revenue models. If you look at other free sites, the make money off things like advertising, market research, donations, merchandise, etc. For the first two you need a lot of traffic to begin with, so if you don't have something great to offer users then it isn't really a great platform. If you're targetting a niche market with your OSW, then you're out of luck here. Merchandise works if your site has a branding, like webcomics or unique online games like Kingdom of Loathing (KoL). But if you don't have this, you're left to rely on donations. While I'd like to think if I started a site I'd get enough donations to cover the costs, but I don't think that's a realistic assumption (KoL does support itself through donations, however it gives rewards to those who donate).

The idea I'm having for a site (I won't tell you about it yet...ooh suspense! and no, it is not porn) allows users to create their own content. Ultimately I'd like to provide the tools for creative and high quality content.
Although the site itself is free (as in freedom), the content itself may not be - that's up to the content creator to decide. Should they choose to, the content creators may restrict access to their content except to those other users who want to pay for it. A source of revenue for the site would be to take a percentage of the money that content producers receive when they charge for their content.

Here is where the question of ethics comes in. Since the site is open source, it may be the case that other users would want to contribute in some way to the site, be it through code or documentation or whatever. Is it wrong to make profits off of this? Suppose somebody comes up with an idea for a sweet feature and codes it in and gives it to me, and it shoots profits through the roof. Is this unfair to the person with the sweet idea?
My answer would be no, provided the contributors know that the site does make profits. In that case it is fair for them to either not contribute, or to request some sort of compensation - either through money, or through privileged services through the site, or something.

For those few of you who actually read this blog, what do you think? Is this fair, or am I sounding like a douche in a suit?

Jan 26, 2009

Ruby Array#to_hash

The number of times I've had to convert an array to a hash is amazing. And the sad thing is that the standard Ruby array doesn't have any simple way to do it! This is probably because there are a lot of ways you can convert an array to a hash.

Here's the way I do it a lot:
hash = Hash[*keys.zip(values).flatten]
This works, unless your values array has nested arrays in which case you're screwed. A better alternative is:
hash = keys.zip(values).inject({}) { |h, nvp| h[nvp[0]] = nvp[1]; h }
This handles nested arrays, but it makes Ruby elegance freaks cry. But that's not my problem, so let's go like this:
class Array
def to_hash
self.inject({}) { |h, nvp| h[nvp[0]] = nvp[1]; h }
end
end
Assuming that the array is in name-value pair format, this should work fine. So you have:
[ [:a, 5], [:b, "hello"] ].to_hash   # => {:a => 5, :b => "hello" }
There are probably problems with this, if you know of any please comment!