Thursday, May 3, 2012

Interview at PopCap: What to Expect

I've been working at PopCap Games for just about a year now, so this post is very late in coming, but since I'm currently in charge of hiring a team of developers, I thought I would write it anyway.

Introduction

It was April last year. I was driving home from work when my phone started ringing. Being the cautious driver that I am, I refrained from answering and drove on. (Okay, that's not completely true. At the time I was director of technology at a small company and had formed a habit of not answering my phone when I didn't recognize the phone number—I received a lot of calls from sales people.) Anyway, soon after my phone finished ringing I heard the uncommon bling of a new voice mail. I was intrigued...

"Hi Brent! This is Elli...gurrggle...gurrggle...man from PopCap Games. I'm calling you in regards to the resume you submitted. I'll give you a call back at a later time. Thanks!"

I don't want to get too detailed about the whole story, but I freaked out. I pooped my pants. I spent the next two hours searching the internet for PopCap employees with names starting with "Elli" and ending in "man" (the "gurrggles" were inaudible pauses if you hadn't guessed). To make this introduction shorter: my wife found him, I emailed him, he called me, yadda, yadda, and now I am employed as a lead developer on the Platform Service team.

Now I want to fill in the blanks a little about the interview process:

PopCap Cares About Candidates and Employees

This is a simple example: I've been flown around the country for interviews. I've been picked up from the airport by company employees driving messy Toyota Corollas. I've also had companies offer NO transportation from the airport at all (maybe getting to their office was part of their interview process).

PopCap was different. I was told there'd be a car waiting for me at the airport. I honestly expected a taxi at best, but I was surprised when I spotted a man in a tuxedo holding a sign reading "Nelson". This guy escorted me to his—for lack of a more accurate word—"pimped out" Lincoln Presidental Towncar and drove me all the way to downtown Seattle. I was further amazed when I walked into the elegant hotel they put me up in and realized I was extremely underdressed (it was definitely hospitality at its finest).

The point I want to make here is that by the time I arrived for the interview the next morning, I was sure of two things: A) PopCap Games truly cared about its potential employees and B) I was filled with rockstar confidence and ready to let that bleed from me onto my interviewers.


PopCap Performs Relevant Assessments

Whiteboards are nice. Algorithms are fun. But do you know what's really awesome? Giving a carpenter a hammer before asking him to build a cabinet. For some reason a lot of companies feel that they need to torture developers by having them write code on a whiteboard or analyze arbitrary algorithms in order to gauge their abilities as a developer. Assessments at PopCap are relevant and allow candidates to use the tools that they would use on a daily basis—primarily a computer and the internet (though usage of the internet should be limited).

When interviewing at PopCap you can expect to be given the proper tools to solve the programming problems they give you. However, they do expect you to understand and know how to use them. I personally felt that my development abilities shined much brighter under these circumstances than they had when I was scribbling on a whiteboard and regurgitating the definition and implementation use cases of a min heap.


PopCap Is Where You Want To Work

If you are interested, check out our job listings at http://www.popcap.com/jobs. The specific position on my team is located here http://bit.ly/IVKImJ.



tldr: You definitely want to work at PopCap Games because they are dope.

Tuesday, February 28, 2012

fbdidlogin never called...why??

So I have been working on an iOS project recently that needed to implement the Facebook iOS SDK. I was having some major problems getting the delegate function fbdidlogin to fire. I finally realized it was an error on Facebook's part.

In Facebook.m
- (void)authorize:(NSArray *)permissions {
  self.permissions = permissions;
  [self authorizeWithFBAppAuth:YES safariAuth:YES];
}

This code prevents the FB dialog from appearing which successfully calls fbdidlogin. In order to resolve this so that it works properly you must change the third line to:

[self authorizeWithFBAppAuth:NO safariAuth:NO];

This slight code alteration will force the FB dialog to show (instead of the native app or safari app). And you'll see that all works well now. Yay.

Wednesday, April 13, 2011

RPC Over HTTP for Outlook on Windows 7 Using a Self Signed Certificate

So yesterday I was faced with a goofy problem with something I have done a million times before. You see, usually I set up Outlook on laptops to use RPC over HTTP so that I don't have to use VPN to get to a corporate Exchange server. The problem is that I had never done it with Windows 7 yet (things are still kind of stuck in XP land over here). Anyway, the exact methods used on Windows XP weren't working on Windows 7. So here's what ended up working:
  1. Find an XP box and visit the OWA website for your organization (I'm assuming you're using one since I believe RPC over HTTP uses it)
  2. Export the X.509 Cert w/ chain (PEM) version of the certificate using these instructions
  3. Save the certificate somewhere (add a .cer extension if needed)
  4. Transfer the .cer file to the Win7 machine and open it
  5. Click Install Certificate...
  6. Click Next >
  7. Select "Place all certificates in the following store"
  8. Click Browse...
  9. Select the "Trusted Root Certification Authorities"
  10. Click OK and finish the process
  11. RPC over HTTP will now connect where it wouldn't before
Booyeah!

Tuesday, April 5, 2011

Using a Query String with Segmented Controller/Method URLs in CodeIgniter

CodeIgniter has some awesome segmented URL functionality baked into its core, but sometimes you want to be able to do things like this:

http://my-domain.com/my_controller/my_method?some=more&sweet=stuff

You can do so easily by doing the following:
  1. In config.php change:
    • $config['enable_query_strings'] to TRUE
    • $config['uri_protocol'] to 'PATH_INFO'
  2. In your controller:
    • Fetch the query string using $this->input->get('some');
      (this example corresponds with the above URL)

And that's all folks! It works when a query string isn't present, it works with any number of query string variable pairs, it works with method parameters (e.g. /my_controller/my_method/my_param?some=more). It just works! Sweet, eh?

Monday, January 24, 2011

Can't Set Fireworks as Default Application for PNGs

So I use Adobe Fireworks heavily for all my graphical needs. This past weekend I inherited Adobe Creative Suite 4 (I used to have CS3) from a friend. After installing CS4 I uninstalled CS3. From that point on I was unable to have *.PNG files automatically open in Fireworks CS4. Heck, I couldn't even Open As... and have them open in CS4. Finally I found the problem in the Windows registry.

In order to fix this:
  1. Run regedit.exe.
  2. Drill down to HKEY_CURRENT_USER\Software\Classes\Applications\Fireworks.exe\shell\o pen\command.
  3. Update the REG_SZ data to point to the proper path on your machine (i.e. I set mine to "C:\Program Files (x86)\Adobe\Adobe Fireworks CS4\Fireworks.exe" "%1").
  4. Close regedit.
  5. Try associating the file again.
  6. Success.

Wednesday, January 19, 2011

How To: Create a iPhone/iPad Project in FlashDevelop

Download the following:
  1. Packager for iPhone
  2. FlashDevelop
  3. FlashDevelop iPhone Template
  4. FlashDevelop iPad Template (optional) 

Then:

  1. Install FlashDevelop via the installer (select “Install Flex SDK Automatically”)
  2. Copy Packager for iPhone files into C:\{FD_install_path}\Tools\flexsdk\ (copy over existing files)
  3. Copy iPhone/iPad Template files into C:\{FD_install_path}\Projects\ 

Now you can create new iPhone or iPad projects using FlashDevelop! Just use Project > New Project...

Further Tips:

  1. You'll want to make sure that the "Custom Path to Flex SDK" (under Project Properties..." is set to C:\{FD_install_path}\Tools\flexsdk\
  2. Also, each iPhone/iPad project will contain a PackageApplication.bat for building your project for the App Store. Make sure the FLEX_SDK variable is also set to C:\{FD_install_path}\Tools\flexsdk\bin 
  3. Lastly, FlashDevelop has some sweet SourceControl functionality built in. In order to use it you need to enable it in the FlashDevelop settings (press F10). In order to have source control functionality you need to check out the project using TortoiseSVN BEFORE pulling it into FlashDevelop (that's the tricky part). 

Thanks to geo for the awesome FlashDevelop templates!

Wednesday, August 26, 2009

Linux, PHP, and MSSQL Server

I don't know if this will work for everyone, but it took me 2 days to figure this out so maybe it will help you.

Problem
I wanted to connect to an external SQL Server 2000 database from a hosted Linux database. From the Linux box I was able to ping, telnet, and tsql the database server, but PHP would always throw a "unable to connect to database error".

Solution
PHP, in my case, uses FreeTDS to interface with MSSQL. My hosting provider has the default version of FreeTDS set to 5.0. After many hours of research I figured out that I needed to use version 7.0. So to get it to work I just set the version to 7.0 in my PHP script with the following line of code:

putenv('TDSVER=70');

And that was all folks. (Remember that when you use mssql_connect with Linux that you want to probably add the port number to the host. e.g. mssql_connect( 192.168.1.1:1433, $user, $pwd ) ).

Tuesday, August 18, 2009

How to Scrobble Internet Radio (Windows)

This is a step-by-step guide on how to scrobble internet radio using free apps:
  1. Download and install SqueezeCenter from Logitech
  2. Start SqueezeCenter (this automatically started for me)
  3. Open Winamp or iTunes and connect to http://localhost:9000/stream.mp3
    • In iTunes go to Advanced > Open Audio Stream...
    • In Winamp to go File > Play URL...
  4. Once you are connected, open SqueezeCenter (right click on the icon in the system tray and select "Open SqueezeCenter" (this will open in your browser)
  5. Press the settings button down in the bottom right corner
  6. Click on the "Advanced" tab
  7. Select "Last.fm Audioscrobbler" from the drop-down menu
  8. Enter your credentials and make sure that both drop-downs are set to "Yes..."
  9. Click the "Apply" button at the bottom right
  10. Select the "Player" tab
  11. Select either Winamp or iTunes from the drop-down
  12. Select "Last.fm Audioscrobbler" from the drop-down next to the player selection
  13. Enable scrobbling
  14. Click the "Apply" button at the bottom right
  15. Now you are set up to route internet radio through SqueezeCenter to your media player and have it scrobble...
  16. Close the "Settings..." portion of SqueezeCenter
  17. Leave iTunes/Winamp alone, go to the home page of SqueezeCenter
  18. Expand Internet Radio at the left
  19. Choose the station of your choice (I chose to search for a Boston station I like a lot)
  20. Push the play button on the station you choose
  21. Audio should start playing through iTunes/Winamp
  22. Booyeah you're done.
NOTE: If you get "chipmunk" sounding audio (I did), just press the stop button on iTunes/Winamp and then press play again. This fixed it for me.

Happy scrobbling.