News for hackers. Stuff that matters.
Re:Xkcd strip used as a exam question by Steuard on Sunday November 28, 2010 @12:52PM (#1947719)
A friend of mine created a nicely organized database of xkcd strips to help teachers find subject-appropriate examples:

http://andromedayelton.com/dckx.php

Some topics clearly show up more often than others...

Re:Xkcd strip used as a exam question by tw1st3dst33l on Sunday November 28, 2010 @09:00AM (#1947358)
This isn't really surprising.I usually find myself wishing that Randall Munroe (author of XKCD) would teach most of my classes. Not only is he a polymath, but he's completely insane. Those are the best teachers.
Re:Xkcd strip used as a exam question by hugh3 on Sunday November 28, 2010 @09:58AM (#1947426)
I'm rather unconvinced that Randall Monroe is a polymath.
Re:Xkcd strip used as a exam question by xenophanes on Sunday November 28, 2010 @10:48AM (#1947508)
Math and art!! Or do you have a problem with his art!?
Re:Xkcd strip used as a exam question by wahnfrieden on Sunday November 28, 2010 @10:53AM (#1947515)
He postures himself as one, at least.
Re:Xkcd strip used as a exam question by hugh3 on Sunday November 28, 2010 @11:52AM (#1947597)
I'd go so far as to say he's interested in a lot of stuff, but his actual level of knowledge is pretty much "dude with a Bachelor's Degree and access to wikipedia".

Nothing wrong with that, but let's not get too excited.

Re:Xkcd strip used as a exam question by Natsu on Sunday November 28, 2010 @01:12PM (#1947771)
> "dude with a Bachelor's Degree and access to wikipedia"

Yeah, but that's actually pretty smart. There are a lot of people who haven't yet figured out that you can look up almost anything online....

Re:Xkcd strip used as a exam question by jtdowney on Sunday November 28, 2010 @10:12AM (#1947445)
We show Exploits of a Mom (http://xkcd.com/327/) with the moms last speech bubble blanked out to candidates during interviews. You might be surprised how many have trouble explaining what is going on.
Re:Xkcd strip used as a exam question by kenjackson on Sunday November 28, 2010 @10:33AM (#1947483)
I didn't get it until the last bubble. I thought the son did the exploit and the mom was covering for him. I'm still unclear if that was actually the childs name or this was a one-off exploit by the mom.
Re:Xkcd strip used as a exam question by wahnfrieden on Sunday November 28, 2010 @10:55AM (#1947517)
Does that really matter?

The parent poster is saying that interviewees don't get what's going on with the exploit itself.

Re:Xkcd strip used as a exam question by kenjackson on Sunday November 28, 2010 @11:32AM (#1947565)
But they pretty much show the exploit in the previous pane... How could they not get the exploit?
Re:Xkcd strip used as a exam question by cmelbye on Sunday November 28, 2010 @11:36AM (#1947574)
That's the point. If the candidate doesn't know that that is a SQL injection, then you have a problem.
Re:Xkcd strip used as a exam question by Maxious on Sunday November 28, 2010 @08:22AM (#1947306)
I've seen this one used in an Introduction to Psychology exam: http://xkcd.com/32/ And the velociraptor problem was a class exercise for calculus: http://www.xkcd.com/135/
Re:Xkcd strip used as a exam question by jawee on Sunday November 28, 2010 @01:25PM (#1947814)
The best I've had in my experience is a Calvin and Hobbes strip, but they're probably too classic to matter.

http://www.gocomics.com/calvinandhobbes/1995/08/23 I had to identify and analyze the survey bias that his response creates for a test in an introductory statistics class.

Re:Xkcd strip used as a exam question by snes on Sunday November 28, 2010 @01:01PM (#1947745)
Next, everyone will be called a cheater and have to retake the exam because they have read xkcd before.
Re:Xkcd strip used as a exam question by cosmicray on Sunday November 28, 2010 @09:18AM (#1947380)
if they use this one, does it become a recursive loop ? ... nerd sniping: http://xkcd.com/356/
Re:Xkcd strip used as a exam question by tw1st3dst33l on Sunday November 28, 2010 @09:24AM (#1947391)
Personally, http://xkcd.com/308/ is what I live my life by.
Re:Xkcd strip used as a exam question by CUViper on Sunday November 28, 2010 @02:58PM (#1948107)
I find it odd that the test's adaptation removes the first two words from "standard creepiness rule: don't date under (age/2+7)". Is it objectionable to refer to dating with large gaps of age as creepy?
Re:Xkcd strip used as a exam question by waterlesscloud on Sunday November 28, 2010 @02:59PM (#1948111)
Perhaps it's objectionable if you're a professor with a lot of hot students.
Re:Xkcd strip used as a exam question by kleiba on Sunday November 28, 2010 @05:48PM (#1948601)
I find it creepier when a professor's unwilling to cite a source accurately.
Re:Xkcd strip used as a exam question by kgroll on Sunday November 28, 2010 @06:25PM (#1948716)
Edit: Just noticed that the Wolfram links break because of their syntax. HN then worsens the problem, by shortening the displayed links with '...', meaning copy/paste breaks! So I'm just removing the http prefix and you'll have to copy/paste to view any of the graphs.

---

This seems to disagree with the gist of the comic, but I think the answer to the final part (largest dating pool) is 23 years old.

I arrived at that by doing the following, please correct me if you spot an error along the way!

The dating range for any age, t, would be defined as:

  lower limit = .5t + 7
  upper limit = 2t - 14
This agrees with the example in the XKCD strip. The dating range for an 18 year old is from .5(18)+7 = 16 to 2(18)-14 = 22. Because this is linear, the range will always be increasing with age.

Despite the range growing with age, we know that the proportion of singles is decreasing with age. Sigh. That's where the other model comes in. The author of this problem gives:

  S(t) = e^(-0.05*t)
That looks like this: www.wolframalpha.com/input/?i=Plot[E^(-0.05+x),+{x,+85,18}]

I believe the largest dating pool would correspond with the greatest area yielded by taking the definite integral of this function from .5t+7 (the lower age limit) to 2t+14 (the upper age limit). To see this in pretty print, you can visit this link: www.wolframalpha.com/input/?i=integrate+(E^(-.05x))+dx+from+(.5x%2B7)+to+(2*x-14)

Evaluating that for any age would give the area under the curve corresponding to that age.

The next step, then, would be to find the maximum area for any age. To do this, we should be able to take the derivative of that previous equation, and set it equal to 0 in order to maximize it. Again, correct me if I'm wrong, but for the result of that, I get:

  -2000(e^(-0.1t+0.7) - e^(-0.025t+0.35)) = 0
I plotted that to find that the max was located at age t = 23.

This graph illustrates the size of the dating pool corresponding to age along the x axis: www.wolframalpha.com/input/?i=Plot[-2000(e^(-0.1x%2B0.7)-e^(-0.025x%2B0.35)),+{x,+0,+100}]

Comments? Did I approach this totally wrong? Did I miss something along the way? Does that seem reasonable?

Re:Xkcd strip used as a exam question by gmichnikov on Monday November 29, 2010 @11:27AM (#1950783)
The upper age limit is 2t-14 (as you note earlier in your comment) rather than the 2t+14 you mention later.

Integrating, you get -20(e^(-0.05(2x-14)) - e^(-0.05(x/2+7)))

The derivative (eliminating the constant) is: (e^0.7)(-0.1)(e^(-0.1x))+(e^-0.35)(0.025)(e^(-0.025x))

Wolfram gives about 32.5 as the root. You can plot the integral (try www.coolmath.com/graphit) and mouse over to confirm.

Re:Xkcd strip used as a exam question by lgarron on Sunday November 28, 2010 @10:40AM (#1947494)
We had an entire set of programming questions at ProCo (programming contest held at Stanford for high school students) themed with XKCD comics last May: http://cs.stanford.edu/wiki/proco/PastContests/2010Problems
Re:Xkcd strip used as a exam question by die_sekte on Sunday November 28, 2010 @01:57PM (#1947914)
Ideal dating pool seems to be around age 32.

I don't know how to optimize a function with an integral in R yet (unsurprising, just installed it 20 minutes ago), therefore I can't give a better answer. Now I want to learn R.