Wednesday, April 30, 2008

A Test

A friend of mine recently applied for a job and received the little test included below that I'd like to share. As someone who has to interview quite a lot of people, I thought it was brilliant because I generally do not like programming problems for interviews as they tend to focus on Computer Science style knowledge that doesn't really apply in the real world.

For this very reason, I don't think I could get a job at google (if I actually wanted to), yet I know I am smart and have shipped quite a lot of wonderful useful code. As far as I can tell, they are looking for CS majors, not people who ship great code.

This particular test is more unique than others that I have seen. It isn't a hard problem, if you know what you are doing. Instead, it is a test of how well you can follow directions and think about basic OO code design. I also like the JUnit and ant requirements. There is also several different valid ways to go about solving the problem. Creativity is encouraged.

Another reason why this test is great is because we generally ask for code samples from people we decide to hire. There has been several times now where someone passes the interview with flying colors (ie: great personality), yet they can't code for shit. Really, I have seen stuff like this:

String foo = new String("my string");
if (foo != null) { doSomethingFun(); }

Sadly, showing a complete lack of fundamental knowledge of the Java language. We have also gotten people who send us source code that is copyrighted by their employer!?! Even after we specifically asked them not to send us copyrighted code. Um. Next.

If you are looking for a job, please please please have some quality work to show. The best candidate will have at least contributed to an existing open source project. Even better, create your own! Nothing is more appealing to a future employer than someone who is motivated enough about their profession to spend at least some after hours time working on their own ideas, building communities, sharing knowledge, etc.

Model a simple class library in Java for the representation of a bicycle.  Show basic OO principles in this class library. Keep the approach simple, and show good balance of class responsibilities. Implement the library for 3 bike types.

Question should be answered by each implemented bike type:

Determine the Max and Min speeds in MPH for the road bicycle, mountain bicycle, and kids tricycle.
  • For geared bicycles, Max and Min speeds should be calculated at a given front crank RPM. For Unit Tests, assume 90 RPM.
  • For non geared bicycles, Max and Min speeds should be calculated for reasonable human RPMs.
Solution should contain:

Turn in one simple console app that performs the Max and Min speed for each bike type. Use JUnit to do the testing and ant for the build. Use Java5 style generics and collections where necessary. Submit a .zip file with everything in it.

Some things to think about a bicycle for your model:

Road bike
  • Light, larger diameter Wheels, smaller width, higher pressure tire:
  • Tire size 700c
  • Gears, two sets:
  • Front: 50-39-30 teeth
  • Rear: 11-28 teeth , 10 speeds (11,12,13,14,15,17,19,21,24,28)
  • Two wheels
  • Rigid front fork
  • Generally lighter than a Mtn. Bike
Mtn. Bike
  • Heavy, smaller diameter Wheels, Large width, Lower pressure tire, more rolling resistance:
  • Tire size 26 Inches
  • Gears, two sets
  • Front: 48-36-26 teeth
  • Rear: 11-34 teeth, 9 speeds, (11,13,15,17,20,23,26,30,34)
  • Two wheels
  • Has a Front Fork – different travel 4-10 inches
  • Can have a rear suspension - different travel 4-6 inches, makes bike heavier
  • Generally heavier than a road bike
  • Small diameter wheels, multiple sizes
  • No gears
  • Three wheels

I've got balls.

Taken at Stefano and Jessica's wedding.
Congrats to the both of them.

Tuesday, April 29, 2008

530-350-3896 / 5303503896

As I discussed earlier, I am on the do not call list, yet I am still receiving calls from telemarketers. Today I got one from the number above. I just reported it to the do not call list. Sigh, I hate spammers.

Log of calls:
4/10/2008 @ 6:29pm
4/30/2008 @ 1:27pm
Update: I just got another call from this number. Some guy was on the line saying he was from WorldMark and my first response was "Go fuck yourself" which really really pissed this guy off. He then proceeded to ask me why I would say that to him and I said cause I'm on the DoNotCall registry and he is calling me without my permission and because he is a spammer slimeball. Then I hung up. This made him so mad that he actually called me right back! I asked to talk to his boss and he said he was the boss and refused to give me his name. So, if you get a call, just say "Go fuck yourself" and say "Jon says hi."

Interesting software bug

I just happened to be reading about the F-22 Raptor because of a /. article about the F-117A Stealth Fighter Retired. This quote from the F-22 wikipedia article really caught my eye:
While attempting its first overseas deployment to the Kadena Air Base in Okinawa, Japan, on 11 February 2007, a group of six Raptors flying from Hickam AFB experienced multiple computer crashes coincident with their crossing of the 180th meridian of longitude (the International Date Line). The computer failures included at least navigation (completely lost) and communication. The fighters were able to return to Hawaii by following their tankers in good weather. The error was fixed within 48 hours and the F-22s continued their journey to Kadena.[57]

Tuesday, April 15, 2008

Porn Advertising

At work, I started a little skunkworks project to develop a dynamic advertising system (ie: Adsense for Porn) that was integrated with our affiliate tracking system. When I told people about it, they really saw value in the idea and gave me the go ahead to work on it full time. After about a months worth of work designing the system and writing the code, we now have a tool to create some of the coolest and most intelligent porn advertisements on the net. I really feel that this is going to drive quite a bit of traffic to our websites. Our affiliates will replace their boring static advertisements (for other companies) with ours. Why? Because our sites will convert the best for them and they will have a solid scalable system for tracking impressions, clicks and conversions in real time. Take a look at the bottom of my blog for an example of a really simple NSFW advertisement. Click on the ad and it takes you to the website. Future ads will have the latest trailer video, show the number of minutes until the next live show, show you information about the latest shoot and display all of it in your native language. As far as I know, a system that works like this and gives as much flexibility to the affiliates is a first in the industry. I love it.

Thursday, April 10, 2008

Mysterious Sound Waves Can Destroy Rockets

From /. : Mysterious Sound Waves Can Destroy Rockets: This is one of the most important and difficult problems I've ever heard of to solve. Imagine needing to solve this problem so that a $(#*[email protected]# rocket (potentially with humans on board) doesn't blow up (and kill people)! Imagine having to literally invent a way to even test the theory of the problem! These people are way beyond brilliant.

Wednesday, April 9, 2008

PicLens press release

It has been a long time since my name has been associated with a press release... so I'm pleased to announce a release went out today about the PicLens galleries and of course there is a silly quote from me. As a friend of mine noted... it must be a slow news day. Heh.

Hoping you are pleased using the Magic Cone.

Hoping you are pleased using the Magic Cone.

Sunday, April 6, 2008

I passed the MSF class

Got 4 negative points on the final test. Not too bad given 17 is the 'national average'. I have a MSF certification now. woot! Next up, an M1, a suzuki drz400sm and a whole lot of exploration. One of the instructors had a drz so I got a chance to take a close look at it. What a nice bike!

Sadly, the someone in the class panicked today, after blowing a turn, held the throttle open and t-boned someone who was on their motorcycle parked in line waiting for their turn. Everyone was ok, but that person just gave up and dropped out after that little incident. The look in that persons eyes when they panicked was crazy! Lesson number one, don't panic.

Friday, April 4, 2008

MSF Day 1

Last night was the first night of the Motorcycle Safety Foundation training class. It was a classroom group experience with a multiple choice test at the end. Our table had a couple of goofball guys sitting at it so at least they made the night more entertaining. The test itself was pretty easy except for the part where we had been sitting in class for 5 hours, I was tired and reading slowly. Even still, I got 48 out of 50 right. Must have been a really easy test. Heh. This weekend will be two days of on the bike training. I'm far more excited to actually ride a bike.

Tuesday, April 1, 2008


My dear old friend Paul Phillips had a recent blog posting about a cool little image browsing technology put out by a company called PicLens. So, of course I start thinking of ideas of how I can use it in my life.

I quickly remembered that I work for a porn company (ahahah) and we generate a lot of images. The current UI on the site is to list all of the images on a single page and link to each image individually. While this is ok for someone who just wants to download all the images, what a real pain in the ass for browsing. In fact, Kink's customers have complained about it in the forums several times now. Enter PicLens.

As of today, we are now the first and only porn site (that I know of) that has integrated PicLens. The implementation was pretty easy. All you need to do is export a RSS feed of the images and include a little bit of JavaScript in the page. First, I considered using a tool like ROME to generate the RSS. The problem with ROME is that it is too complicated, the code isn't updated and the API generally just sucks. Basically, it is hard to use and doesn't pass the KISS test. Then I considered using Abdera, but it is just as much of a pain in the ass to use. Then I realized that generating RSS is like generating HTML. The Element Construction Set style of code design is not the right way to go about outputting HTML. Instead I should be using the perfect tool... Velocity! (Side note: I had a major hand in creating both of those tools, so yes I am a bit biased).

So, I quickly added a method to my @Stateless FeedBean to build up a context and process a Velocity template which outputs RSS in the right format. I also have a FeedServlet which takes the input from the web tier and simply passes it to the Bean. All in all, a few hours worth of work and now we have a far more functional website using the latest cutting edge technologies. I love it. I wonder if the PicLens people envisioned their product being used for hardcore porn. I hope so.


I love stop animation and I love Tron. Link stolen (cough *borrowed*) from my friend Lorelei.

Changed my mind

In an earlier post I talked about getting a Ducati 695. After quite a bit of further consideration and research, now I want a Suzuki DRZ-400SM. The draw of dirt roads in the middle of nowhere is just too appealing. As much as I am drawn to owning a stylish piece of Italy, I'm going to have to settle on a high-tech piece of Japan for now. I'm definitely going to have to get a larger gas tank though. The stock one is just too small. Do not want to have to worry about filling up all the time.