Monthly Archive for April, 2006

Colbert SKEWERS the Bush administration

Wow. Wow. Stephen Colbert somehow landed the final spot at the White House Correspondents’ Association Dinner, and he absolutely SKEWERED the Bush administration, while standing 15 feet from Bush! You have to see it to believe it.

See the video at crooks and liars here (i think this isn’t a complete video, if anyone finds a better one let me know), and more coverage here.

UPDATE: a torrent of the full video here (thank you, helpful anonymous commenter!)

UPDATE: full length easy to watch version here.

Interview Brainteasers

Fellow ibiblian Sayan was recently telling me about his experience at an interview, where he was presented with this challenge:

There is a room with 3 lights in it (each with one bulb), controlled by 3 switches outside the room. We don’t know which switch controls which light. How do we figure this out, with only entering the room one time?

When interviewing for tech companies, these brainteasers are a pretty common part of the interview. Another one that I was recently asked:

We have a 3 quart jug and a 5 quart jug and an infinite supply of water. How do we measure out 4 quarts of water?

(The “solutions” are at the bottom of this post)

These two questions are good examples because they demonstrate the two main categories of interview brainteasers:

The first type of question tests the interviewee’s ability to map out a problem space, aka to think “outside” the box (what I like to call “not ignoring most of the box”). In the light bulb question, a successful interviewee will think “wait a second, there are more variables here than the interviewer explicitly mentioned using english words. Light bulbs also… create heat!”.

So the challenge is to think of variables that were not explicitly mentioned. This also implies that you can use tools (a stepstool or a ladder) and perform actions (touch the light bulbs) that were not explicitly mentioned. The essence of the challenge is restrictioning information, tools, and activities. There are no labels on the light switches, you can’t peer around the corner while you flip the switches on and off, and you can only enter the room once. All of these restrictions are artificial things that you would never experience in the real world. And that’s fine. The point of asking anyone anything in an interview is because there is neither time nor resources to see how the candidate performs on a 6 month project with a real client.

BUT, if I can use a ladder, why can’t I use a sledge hammer to break down the wall? Or better yet, buy 2 or 3 $10 mirrors and set them up so I can see the bulbs go on and off. It sounds absurd, but how is that more absurd than not being able to enter a room twice?

Okay, let’s say we’ll put a little more faith in the validity of the universe of the question. Let’s say that the reason we can’t enter the room twice, or peak around the corner, OR set up mirrors, is because the switches are too far away from the bulbs. Well then wouldn’t the second bulb possibly warm up by the time we walked from the switches to the bulbs, so that, within the resolution of heat perception of human skin, it is the same temperature as the first bulb?

Let’s say that the restrictions on tools and actions represent limited resources in a project, but the ladder is an acceptable tool because it’s cheap. Okay, you, reader, sitting there reading this. Do you own a ladder? Now, do you own 2 computers, a web camera, and a wireless router?

Yes, the ladder is cheaper, if you don’t have any of the above. But since the average programmer / consultant is more likely to have 2 computers, a web-camera, and a wireless router, is that not the more efficient solution? Somebody tell me what I’m missing here.

These questions ask you to map out a problem space, but which dimensions are considered “outside of the box”, and which dimensions are considered silly, is completely dictated by the predetermined outcome devised by the question designer. And this is supposed to identify the candidates who have innovative thinking skills?

The jugs problem represents the second type of interview brainteaser. These questions are pretty much a test of raw math and reasoning skills. They aren’t a horrible idea in and of themselves, but I still question their usefulness in an interview context. Everyone is going to get the answer to the jugs problem, the only question is will it take 30 seconds, 3 minutes, or — if the person is anxious — longer than that. So there are only two things that can be ascertained from a candidate’s performance with this question: [1] the raw time that it took for them to find the solutions, [2] how they perform, in terms of reasoning path and self confidence, while finding the answer.

Regarding [1], of all the things you can learn from someone during an interview, are you really going to learn that much more about their intellectual ability by seeing how many seconds it takes them to manipulate jug volumes in their mind?

Furthermore, (while we’re still talking about raw time to the solution), there are more variables than math and reasoning skills at play here. A perfectly capable and sharp interviewee might be very nervous about the interview, being around new people, or being in the unfamiliar environment of a new city. I realize that most adults aren’t nervous wrecks during interviews, but it doesn’t take much anxiety to double the time it takes to do artificial math problems, when for the past 30 hours you’ve been worrying about traveling, printing resumes, getting directions to a new building, and giving a good first impression at a social and professional level.

Given that the interviewer probably doesn’t have a stopwatch on hand, factor [2] is probably the primary purpose of the question. Do companies really want to hire adults in their 20s and 30s who feel totally normal while being commanded to think of solutions to brainteasers from middle school math club (which is the first time i saw the jugs problem)? To me this would indicate that the interviewee suffers from social maladjustment, or even a personality disorder. In fact, this type of situation is an example of the core apparatus of coercion employed by car salesmen, the CIA, and cult leaders: inducing the subject to regress into a childlike state.

On top of that, most candidates will be at least somewhat aware that their demeanor is being observed. So now you have a bunch of candidates putting on something of a show, smoothly and casually talking through their reasoning process. Or just trying to not look stressed. When I’m doing my best work, I’m not looking unstressed and socially smooth. I’m shaking my knee up and down, sucking down green tea, jamming to music, occasionally picking my ear, and occasionally doing celebratory funky dances in my adjustable chair, all while wearing anti-RSI wrist splints.

When I was asked the jugs problem a couple months ago, I didn’t even have time to get to it because I was too busy scrambling around trying to figure out string manipulation in C, which I haven’t done in 7 years. In-interview programming questions are another issue, and the topic for a future essay. Stay tuned…


  1. Turn on the first switch for a few minutes, then turn on the second one and immediately go into the room. The bulb that is warm is the first switch, the other bulb that is on is the second switch, and the bulb that is off is the third switch.

  2. Fill up 5QT, use it to fill 3QT, leaving 2 quarts in 5QT. Empty 3QT, then pour the 2 quarts in 5QT into 3QT. This leaves a 1 quart void in 3QT. Fill up 5QT and release a quart into this void, and you end up with 4 quarts in 5QT.

Stuff for sale

Apple PowerMac G5 - 2GHZx2 - 1.5GB RAM - 250GB HD - NR

Sony Studio Video Reference Monitor - PERFECT condition

RootsPrimary launches

A buddy of mine, Zack Exley, has just launched a new site: RootsPrimary

What is RootsPrimary.org?

Before Super Tuesday, before the Money Primary, and even before the MoveOn Primary, comes a Grassroots Primary among activists and volunteers who start working for candidates long before most candidates have even decided to run. In 2003-4, thanks partly to the Internet, those activists turned American politics on its head by giving a true insurgent candidate a realistic shot at the nomination.

RootsPrimary.org provides those of us who want to get involved early a transparent and democratic mechanism to demonstrate numbers and to begin building powerful organizations for our chosen candidates.

RootsPrimary voting interface

You can also sign up to be a RootsPrimary blogger when the blogging system is launched in May.

Check it out!

Safari URL Completion

grrrrrr

jeff: goddamnit i HATE auto-completion of urls...
jeff: at least the way safari does it.
jeff: i don't mind a selection of choices down below, but...
jeff: ok, rant over.
john: yeah
john: i agree
john: completely
john: sarari is absurd about it
john: you have to press delete, space, just to get to
what you typed in the first place
john: or just space i guess
john: actually a lot of arrow keys as well
john: hmm
john: totally retarded.
jeff: yep.

Awesome.

Infinite Redirect

Apache 2 follies

I was trying to get a pretty simple Apache 2 virtual host configuration together and for some reason Apache refused to start up. I tested the configuration with httpd -St and everything was fine. I started httpd with full debug reporting on (-edebug) and got no error messages. But apache would silently fail to start.

My general expectation is that programs will give feedback at the terminal if they fail, so I didn’t think it was necessary to check Apache’s logs while debugging configuration problems. But I was out of ideas so I fired up a tail -f /var/log/httpd/error_log and tried again. Sure enough:

[Sat Apr 08 16:22:00 2006] [error] (2)No such file or directory: could not open transfer log file /www/hosts/www.domain.com/logs/access_log.
Unable to open logs!

The logs directory didn’t yet exist. I created it and Apache started up just fine. Without it, Apache refused to run!

At first this infuriated me. But then I thought: maybe this is the preferable behavior for server software. It’s one less variable to worry about — if my website is up, I know that its logs are working.

Systems folks: what do you think? Should daemons refuse to run if their logs aren’t working?

Independent of if it runs or not, I think that Apache should give feedback at the console (in addition to the logs) when it isn’t starting properly. If I had restarted my daemon and gone to lunch, I would never have known that there was a problem!

To: eBay

hi… i had a draft saved, and it somehow got removed. 30 days have not passed, and i did not begin to create a new listing. [1]can you tell me why this happened? [2]can you restore my previous draft? it was a for a g5 and i made it a week or so ago.

also, i really think that we should have the ability to save as many drafts as we want. of course you have probably considered this feature 5 years ago and decided against it for some reason, but i just thought i would mention it.

thanks!
john


Hello John,

Thank you for writing to eBay. My name is Rey and I understand that you have saved a draft in your account but it was not there when you tried to complete the listing.

John, I have reviewed your account and cannot also find the draft you have saved in your account. I would like to apologize for we cannot duplicate the issue you have experienced and there is no way to recover the draft that was lost from your account. We appreciate your suggestion and I have forwarded your email to our Site Development Team. You may want to start a new listing and immediately submit it after you have finished it.

We appreciate your patience and understanding regarding this matter, and wish you continued success on eBay.

Regards,
Rey F.
eBay Customer Support


Hello John,

Thank you for writing to eBay’s Customer Support. I appreciate the chance to read and understand your suggestion.

The communication we receive from our community members is critical for us to make changes that will keep our site the best. I will forward your message for further consideration by the Product Development Team.

Please note that any comments or materials you have submitted or may submit to us, including questions, technical or creative suggestions or ideas, are considered by us to be non-confidential and non-proprietary. eBay has no obligation of any kind with respect to any such submissions.

Should you have any other questions or concerns please visit our help pages located on our site for instant answers to most questions. You can get to the help section by clicking on Help at the top of most eBay pages.

We are committed to your online trading safety and success.

Have a great day!

Regards,

Helen K.
eBay Customer Support


On 4/9/06, eBay Customer Support wrote:

John, I have reviewed your account and cannot also find the draft you have saved in your account. I would like to apologize for we cannot duplicate the issue you have experienced and there is no way to recover the draft that was lost from your account.

Is there no way to recover the draft, or is it against your policy to recover the draft? I find it a little insulting to be told that there is no way to recover the draft. I am a software engineer and know full well that with big systems such as yours, information is rarely deleted from databases, it is merely flagged as “deleted”, “inactive”, etc.

Which begs the question, why do you have this policy in the first place? I find it very mysterious that there is no way to develop and save drafts. It makes me suspicious that not allowing users to save drafts results in more auctions being posted sooner, so you use this lack of convenience as a stimulant for your business? Or maybe the less carefully put together auctions are more likely to get higher bids? I could make guesses all day.

Not that I really have any reason to believe that either of those guesses are the case — other than the fact that you are not being transparent AT ALL about why you have your absurd (lack of) draft saving tools, and mysterious no-draft-recovery policy.

John


Hello John,

Thank you for writing to eBay. My name is Yul and I appreciate the opportunity to assist you.

I understand your concern regarding draft. I realize the importance of this issue and appreciate your time and effort in addressing your exact concern. I apologise for the inconvenience this may have caused you.

Please understand that if you start to create a new listing in the Sell Your Item form, but you don’t get to finish it, eBay will save it as a draft so that you can easily finish it later.

As you fill out the Sell Your Item form and click the Continue button at the bottom of a page, all the information you’ve entered so far is saved for you on eBay.

When you want to finish the listing, return to eBay and click on Sell at the top of any page. On the Sell page, click on the “Complete Your Listing” link. You can continue from where you left off in the Sell Your Item form.

Your saved draft remains available on eBay for you to complete unless one of the following happens:

1. Over 30 days pass since the last time you edited the draft. After this period, the draft will expire.

2. You start a brand new listing and click Continue on the Title & Description page. This new listing now becomes your saved draft, replacing the previous one. (You can only have one saved draft at a time.)

3. In rare cases, technical difficulties or outages on eBay may cause your saved draft to be erased. Email notifications

Please understand that if you don’t finish a listing, eBay will also send you a reminder email about a week before your saved draft will expire. Newer sellers may receive an additional reminder a few days after your last session working on the draft. These emails will include information about your progress and a Complete Your Listing button that you can click to access your saved draft.

I trust that this information has been useful to you. I appreciate your patience and understanding regarding this matter, and wish you continued success on eBay.

Regards,

Yul P.
eBay Customer Support


How insulting, that in the 3rd communication I receive from eBay on this matter, the only response I get is a copy-and-paste from the documentation that is already available on the site. Not only that, but you begin the email by thanking me for writing to you, and then introducing yourself with your first name, as if to imply that my issue is getting personal attention.

“I understand your concern regarding draft. I realize the importance of this issue and appreciate your time and effort in addressing your exact concern.”

You are NOT addressing my exact concern in any way. And you do NOT understand the importance of this issue. If you did you would change your policies and/or features.

I realize that you cannot make large feature changes for each customer who complains. But at the very least, don’t insult me by sending me 10 paragraphs of a standard customer service response in the THIRD communication. What is your strategy, to keep sending me a list of the existing rules until I stop responding? You haven’t even attempted a diplomatic answer to my questions from the previous email:

“Is there no way to recover the draft, or is it against your policy to recover the draft?… why do you have this policy in the first place?”

And don’t worry, I won’t threaten to cancel my account, you have a monopoly and I have no other options. Maybe that’s why you can afford to treat your customers so poorly.

John

MySQL Index Types

The documentation for MySQL index types is hidden in the page on CREATE TABLE Syntax and isn’t as clear as it could be. Here’s an overview. (some of this is pretty obvious but I’m erring on the side of redundancy).

  • KEY and INDEX are synonyms and mean that the colum should be indexed, and do NOT require the column to be unique
  • UNIQUE is unique
  • PRIMARY KEY:
    • is an index
    • implies that all the columns are UNIQUE
    • all columns in the key must be defined as NOT NULL
    • a table can only have one PRIMARY KEY

Let me know if I’m missing anything.




Close
Powered by ShareThis