How to pass Amazon SDE interview

Amazon is considered to be one for the most wanted employers among software engineers who don’t work for any of the tech giants. Standing in one line with Google, Microsoft, Facebook and maybe some smaller like Twitter, Uber, Dropbox etc., it has unstoppable flow of CV’s from people passionate of working on big scale.

But is it really that cool, demanding and, in the end, rewarding? A lot of people would disagree with that, others will be neutral and there will be only few of those who will agree. For example, typical everyday job of server-side SDE II responsible for customer experience with purchasing goods can only consist of sending/receiving requests to/from internal web-services,┬ávalidating input data, fixing small bugs and that’s all. Oh no, there’s one more thing – on-call rotations. So one week every few months (that depends on a team, but just to give you an idea) that employee despite of his “interesting and challenging” duties will be responsible for fixing bugs on production asap which literally means ASAP – during the weekend, in the evening, in the night – doesn’t matter.

That is why Amazon looks for people who won’t whine about such lifestyle. Amazon has a dozen of so-called “principles” (read “search criteria for new employees”) where some are contradictory to the others. Like they need employees who have a “bias for action” but are “insisting on highest standards” or who are “frugal” but “think big” and stuff like that. Interviewers will ask you about how do you match with these principles and what they’re really interested in is if you had experience working overtime, on the weekends, under pressure, overnight – in order to deliver results in short terms and fix bugs. They clearly tell you about it – if you’re weak in programming or algorithms – it does not matter if on the other hand you’re used to working overtime just to deliver results.

So how to pass Amazon interview? They will ask you about your experience and definitely will ask you to give them example where you had tight deadlines and half-finished task. They want to hear how did you work overnights and did not complain for that. If they will – you’ve passed even if your solution for┬átheir O(N^2) dynamic programming puzzle is NP-complete.

Building Hedgewars under OS X Yosemite

Ok, you considered to build Hedgewars by yourself. To be clear, I’m going to build 0.9.21 on 10.10 Yosemite on MacBook Pro with Retina. First of all, read official manual. After source code pull from Mercurial failed via hg command I considered downloading source on the Downloads page.

As original HowTo says, you should build Ogg and Vorbis, but while Ogg build succeeded, Vorbis said it can’t resolve u_int16_t type and after some googling I’ve found it was a known issue and you should replace #include <inttypes.h> with #include <sys/types.h> under #elfif (defined(__APPLE__) && defined(__MACH__)) in file ogg/os_types.h. Then everything goes more or less ok until you’re trying to generate makefile with Cmake. I had to turn off video recording feature, screenshots in PNG (BMPs instead) and no local server. Finally, I came up with

cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DNOPNG=1 -DNOVIDEOREC=1 -DNOSERVER=1 -DCMAKE_BUILD_TYPE=Release

After successful build you still can’t play, because hwengine fails to launch. It looks for libfreetype.6.dylib in /usr/X11, but you might even don’t have X11 installed. If yes, proceed to Quartz/X11, download and install it. Don’t forget after all make symlink to original X11 directory using sudo ln -s /opt/X11 /usr/X11.

And still, after everything is done, Hedgewars fail to run in fullscreen mode so you might consider running it via VirtualBox and some Linux distro instead.

By the way, you can download my build of Hedgewars 0.9.21 for OS X Yosemite 10.10 here.