Thursday, May 23, 2013

Monday, May 20, 2013

IMDB Ratings

They are remastering Star Trek TNG and releasing them on bluray.  They just released season 3 and I was looking through them.  One of the first things that I noticed was how many great episodes were in that season.  Seasons 1 and 2 had some good episodes, but it felt like most of the season 3 ones were great.

This wasn't that surprising; I've often stated that in each Star Trek series the first two seasons tend to be the worst.  As I constantly feel the need to evangelize Star Trek I wanted to see what the top episodes were and list them here.  I found that the IMDB had individual user ratings for each episode.  I almost didn't notice they had a simple page with all the ratings on there and was about to write a script to scrape them from the season pages.

I copied that data and began to work on ways to present it.  I wrote some gnuplot scripts for a few graphs.  I wanted to ultimately make graphs for each of the five series.  The problem was preparing the data for each plot was rather time consuming.  I decided to write a perl script to do that.

The script went well, and I decided I was on roll so I might as well make it download the data itself.  I ended up with likely my most robust script ever.  Every show has a IMDB id like: tt0092455.  You can either put that in the file, or pass it to the script as an argument.  It generates a directory for each show, and puts all the raw data files in there, along with 3 graphs.  I suppose I could have made it so that it takes multiple ids and runs each, but it's so easy to just paste them into a file and just type 'perl imdb.pl ' down the column and save that as a shell script.

I'm pretty happy with the script.  It handled the real word data of a variety of shows quite well.  Which is frankly amazing considering this regex is in it:
$fileline =~ m/\s+(\d+)\.(\d+)\s+(.+?)\s+(\d+\.\d+)\s+(\d+,?\d*)\n/

Here's the script, and the source for the 0 of you that are interested.

I ended up compiling a list of 32 shows, both my own favorites and popular ones from the internet.  Here is a gallery of all the graphs.

http://imgur.com/a/gO68p

This one is a straight forward scatter plot of every episode.  There is a linear regression line plotted showing the general trend.  Note that in all the graphs the seasons fall entirely to the right of the grid line they are labeled at.  In other words the first episode of season 5 is directly on that dotted line, the rest of season 5 is to the right.

The average rating of each season.  Not weighted by number of reviews.  Also note that none of these graphs start the y axis at 0, which exaggerates difference between points.

Here I took the top quarter of best episodes and bottom quarter of worst episodes and counted how many of each were in each season.


I still will have to do some comparison between the Star Trek series and post that.

Sunday, May 5, 2013

Chaos Theory

I wrote this overview of chaos theory for a class, and figured I'd post it here.  It's written for the audience of my professor, but you can gloss over the more technical parts.  The first half is mostly a historical overview.


Chaos is a condition where a deterministic system, governed by a set of simple rules, can lead to erratic, seemingly random results.  This is because tiny variations in the starting conditions are amplified many times and become significant.  While this may seem like a logical thing, it was only recently discovered and accepted.  The history of science is about discovering the laws that govern the natural world, and it was long accepted that simple laws lead to simple consequences.  The idea of chaos as an innate property of natural systems was so revolutionary that even its discoverer avoided the idea.

Chaos theory was discovered largely by accident.  The story begins with the ancient Greek philosophers who came up with the term chaos as a contrast to cosmos, their name for order in the universe.  The word chaos meant an empty abyss that existed before creation.  The term was used at the start of the Bible which is translated to "without form and void" to describe the state of the universe before God created the world, and with it order.

In the late 16th century, Galileo developed his laws of motion.  These laws seemed to govern all the motion in the world.  This set off a series of discoveries of simple laws that explained a wide range of phenomena.  Galileo was followed by Kepler who came up with laws that very accurately described orbital mechanics.  Kepler described orbits as ellipses that had the planets speed up as they moved in closer to the Sun.  After Kepler, Newton arrived and drew the connection between earthly phenomenon and the heavenly movements of planets.  His insight was that the same set of laws described all motion.  The same force that pulled an object to the ground on Earth kept the Moon in orbit in space.

Newton also cast the die for all modern science.  He invented calculus as a tool to help explain the constant change that governs nature.  He came up with a differential equation that described all motion:
`F = ma = m cdot {dv}/{dt} = m cdot {d^2s}/{dt^2}`
where: `F` is force, `m` is mass, `a` is acceleration, `v` is velocity, `s` is displacement, and `t` is time.

Newton's few simple laws described the vast array of motion observed.  His technique of finding a differential equation to describe a system, and then integrating it was the prototype for science for hundreds of years.  With this technique scientists could predict future states based on known initial conditions.  Following Newton's lead gave rise to whole new fields: Fluid mechanics, elasticity theory, kinetic theory, thermodynamics, and electricity & magnetism are all examples of fields that resulted from Newton's way of doing science.

Newton published his blueprint for science, the Principia Mathematica, in 1687.  For the next 200 years it described all motion observed in the universe.  However, in the late 19th century flaws with Newtonian physics began to emerge.  One flaw was the fact that light could only exist as a propagation of a wave.  Yet, Newtonian physics said that on observer riding at the speed of light should see light standing still, but still oscillating as a wave.  Einstein explained this paradox by developing special relativity.  Special relativity said that time and length are relative, and not unchanging as dictated by Newton.  This was the first of three major challenges to Newton's world view of absolute laws.

The second challenge came from the study of electrons in the atom.  It was shown that electrons could only exist in discrete orbits.  When the electron changed from one orbit to another it made a quantum leap, never existing in the space between.  While these two revolutions took place early on in the 20th century, the third took longer to be accepted.

The story of the third revolution begins with the same orbital mechanics that were so instrumental in creating Newtonian physics to begin with.  Describing the orbit of one body around another is known as the two body problem.  The differential equation describing it was solved by Newton by converting it from a nonlinear to a linear problem.

The similar problem involving three bodies was, however, unsolved for many years.  Mathematicians eventually simplified the three body problem into a problem with two large bodies in a circular orbit, and a small particle-like third body.  This was known as the restricted circular three body problem.  Unfortunately, even the simplified problem proved intractable.

In the late 19th century a mathematician and physicist named Henri PoincarĂ© attempted a novel, and largely geometric, solution to the three body problem.  He invented a concept called state space.  A state was all the information one needed to calculate the future of a system.  State space was the collection of all possible states.  Using state space, PoincarĂ© could map a system and study its behavior from a fresh perspective.  Additionally, Newton's differential equation, F=ma, gives a vector field in state space.  This vector fields shows what an object at any given location will do from there.  By following the vector arrows one can start an object in state space and follow its path to learn how it will behave.

PoincarĂ© attempted to plot the three body problem through state space but discovered a shocking revelation.  He found that the paths of the bodies crossed each other infinitely many times.  This meant that a given starting location had two possible paths that would lead to very different behaviors.  Which path a body would take depended on tiny variations in the exact starting location.  Here was a deterministic system where tiny changes to the initial conditions would lead to wildly different behaviors, the first glimpse of chaos.

Chaos theory is inherently interdisciplinary, and has seen application to a wide array of different problems in unrelated fields.  Fractals are a well known visualization of chaos.  The Mandelbrot set is the most well known fractal.  The rules for generating it are simple.  Begin with the complex number plane.  For any given complex number c in the plane, follow the iteration:
zn+1 = zn2 + c, with z0 = 0.  If this sequence remains bounded then c is a member of the Mandelbrot set.  By coloring the Mandelbrot set black against a white background one can see a border of infinite complexity.  Zooming in on any portion of the border only shows more complexity.  The difference between a number falling inside or outside the Mandelbrot set is infinitely small.

Fractals also show another sign of chaos.  When zooming in on the border, the same patterns appear at every level.  The same distinctive Mandelbrot shape is visible no matter how far one zooms in.  The same is true of other areas where chaos governs systems.  Graphs of heart rate variations and Internet traffic flow show the same overall pattern when one zooms in, a result of chaos.

The double pendulum is another simple example of chaos in action.  A pendulum is described exactly by Newton's F=ma.  Given the position and velocity of a pendulum one can predict exactly how it will behave in time.  Adding a second pendulum to the end of the first, however, brings chaos into the problem and makes it intractable.  When started from a high position, the double pendulum behaves erratically, with the second pendulum swinging around the first seemingly at random.  However, the double pendulum is governed by the same F=ma as the single variety.  It is simply a result of chaos that tiny imperceptible differences in the starting conditions lead to wildly different behaviors.

Another example of the practical benefits of chaos are cryptographic hashes which are used in storing passwords, and just about every other use of cryptography in computers.  Cryptographic hashes take a piece of data as an input and then output a small, random, but deterministic, key.  In effect, they give a fingerprint to data.  To be useful, they must have something called the avalanche effect, which says that any tiny change to the input should result in a large change to the output.  Changing a single bit in the input data will result in a totally different hash.  This allows hashes to serve as proof that data hasn't been tampered with.

Chaos theory had a long journey from a mythical concept, to something that was deemed to only represent the unknown aspects of nature, to an accepted innate quality of the universe.  The man considered to be the discoverer of chaos in its modern form, PoincarĂ©, found the idea so shocking that he largely ignored it.  It was decades before his discovery would begin to turn up useful results.  However, it is now indisputable that chaos is a fact of nature.  Further, it is indisputable that chaos theory has been invaluable, having applications from weather prediction to computer security.  It deserves its title of the third revolution of the 20th century.

Saturday, May 4, 2013

President Obama Can Shut Guantanamo Whenever He Wants

http://www.slate.com/articles/news_and_politics/view_from_chicago/2013/05/president_obama_can_shut_guantanamo_whenever_he_wants_to.html
If Obama declared hostilities at an end, the Guantanamo detainees would be no different from people who were washed up on U.S. territory by accident, like shipwrecked sailors. Those who pose no danger to the United States (about 86 of the 166), and cannot be returned to their countries, could receive refugee status under existing laws. Those who are known to be dangerous could be arrested under criminal law. If I am correct that section 1027 is unconstitutional, both groups could be brought to the United States. The detainees we cannot convict would be released. That may be politically unpalatable but it is legally unimpeachable.

Thursday, May 2, 2013

12 Million Americans Believe Lizard People Run Our Country

http://www.theatlanticwire.com/national/2013/04/12-million-americans-believe-lizard-people-run-our-country/63799/
Do you believe that shape-shifting reptilian people control our world by taking on human form and gaining political power to manipulate our societies, or not?
Are there seriously people that don't know this?

Tuesday, April 30, 2013

What If We Never Run Out of Oil?

http://www.theatlantic.com/magazine/archive/2013/05/what-if-we-never-run-out-of-oil/309294/?single_page=true
From the beginning, it was evident that the Kern River field was rich with oil, millions upon millions of barrels. (A barrel, the unit of oil measurement, is 42 gallons; depending on the grade, a ton of oil is six to eight barrels.) Wildcatters poured into the area, throwing up derricks, boring wells, and pulling out what they could. In 1949, after 50 years of drilling, analysts estimated that just 47 million barrels remained in reserves—a rounding error in the oil business. Kern River, it seemed, was nearly played out. Instead, oil companies removed 945 million barrels in the next 40 years. In 1989, analysts again estimated Kern reserves: 697 million barrels. By 2009, Kern had produced more than 1.3 billion additional barrels, and reserves were estimated to be almost 600 million barrels.

Sunday, April 28, 2013

How Long to Suffocate in Space

I previously looked at how long it would take to freeze in space.  In this post, I'm going to look at the other side of the losing life support coin: how long would it take to run out of air in space?

Since the heat being lost is dependent on the temperature, which is changing, we needed a differential equation before (well actually since it's all been worked out before we didn't, but where's the fun in that?).  This time, oxygen use is constant, so the math is much simpler.  On the other hand, there are still plenty of variables to introduce uncertainty.

To begin, if you are sealed in a room with a normal mix of air you will not run out of oxygen.  Rather CO2 will build up to toxic levels, and you will die.  It is possible to scrub CO2 from the air.  In fact, we currently do it on our spaceships.  A major issue Apollo 13 faced was getting circular CO2 filters to work with a square hole.

What this means for us is we need to look at time for CO2 to build up to lethal levels, and for how long it would take to run out of O2 if the CO2 is being removed.

We also need to consider that people consume O2 at different rates, and even at different rates at different times.  VO2 is how a measure of what rate a person is consuming O2.  Unfortunately, it is almost always used in the context of measuring peak VO2 during exercise (as a measure of fitness).  It was hard to get good numbers for a resting person, but I settled on about 0.018 cubic meters per hour.  For the active rate, I still couldn't just use typical VO2 numbers because they are for the max consumption rate during bursts of exercise.  A person moving around attempting to repair a ship wouldn't be using as much air as a person sprinting.  I found some good numbers from scuba diving forums and settled on 0.1 cubic meters per hour.

On the subject of the variation of people, different people will be able to tolerate different concentrations of CO2 or levels of O2.  It was hard finding a good number for lethal CO2 concentration.  Most sites were concerned with long term exposure at a work environment (years), or short term accidental exposure (minutes).  I settled on 5% which is probably a bit low.

As for minimum O2 concentration, similar problems apply.  Here I settled on 11%, compared to about 21% normally.  Ships could use slightly higher O2 concentrations to begin with to help with loss of life support situations, but high O2 levels have their own problems.

Additional issues are things like fires or venting atmosphere reducing the time.  Also, the number of people on a ship is harder to estimate.  On larger ships it is probably more constant.  But on small shuttles it could vary quite a bit.

Working in our favor is the fact that the respiration equation:
`"C"_6"H"_12"O"_6 + 6"O"_2 to 6"CO"_2 + 6"H"_2"O"`
Has a one to one mole ratio between O2 and CO2.  Additonaly, a mole of any gas takes up about 24 liters at normal temperature and pressure.  This means we can use the same formula for both O2 consumption and CO2 build up:
`t={V cdot Delta r}/{n cdot R}` Where: V is volume, `Delta r` is the change in the ratio of the gas, n is the number of people, and R is the rate that gas is changed.  As an example:
`t = 1.5 "hours" = {26 "m"^3 cdot 0.05}/{2 cdot 0.018 "m"^3/"hour"}`
This is the formula for a 26 cubic meter shuttle craft, with 2 people.  The change in concentration is 0.05 because CO2 is effectively 0 normally.  0.018 cubic meters/hour is the resting CO2 production rate.

I decided to give a range with worst case and best case scenarios.  The best case is resting, and not worrying about CO2 (because it's being scrubbed).  The worst case is CO2 build up will working to fix the ship.

As you can see there were some cases where heat loss was faster than the best case scenario.  I didn't expect it to even be close.

NameVolume (`"m"^3`)CrewHeat (days)Oxygen, Resting (days)CO2, Doing Work (days)
Death Star II2,144,000,000,000,0002,500,000437,837218,370,37017,866,667
Super Star Destroyer12,645,900,000300,00096710,733878
Borg Cube28,000,000,000130,00025,58554,8434,487
Enterprise-D5,820,9831,2004561,235101
Enterprise211,248430161.0125.110.2
Runabout569311.348.34.0
Type 6 Shuttlecraft26212.83.30.3
TIE Fighter810.72.00.2


Thursday, April 25, 2013

Cat in a Shark Suit Riding a Roomba and Chasing a Duck

http://www.youtube.com/watch?v=OFro7RlKzE8

We might as well close up shop now.  This video is clearly the ultimate culmination of the internet.

Thursday, April 18, 2013

The Geopolitics of the United States, Part 1: The Inevitable Empire

http://www.stratfor.com/analysis/geopolitics-united-states-part-1-inevitable-empire

This is very long, and nothing in it is revolutionary, but I found it an interesting overview of the United States' expansion.

Tuesday, April 16, 2013

The Size of Pizza

Pizza is likely the most important substance ever created.  As such, it is crucial that we have adequate information for our various pizza dealings.  In civilized society a pizza is 16 inches in diameter.  However, one must occasionally deal with the barbarians of the pizza word: Fast food pizza, eg, Pizza Hut, Dominoes, Papa John's.

To begin, they have had the audacity to make pizzas in sizes in less than the scientifically proven optimal size.  However, they add insult to injury by calling these smaller sizes "large".  Since pizza size increases as the square of half the diameter, decreasing the diameter doesn't have an intuitive effect on the actual reduction in pizza.

To help illustrate the atrocity being done here, I've compiled this table of various pizza sizes.  I've included the name Pizza Hut (or the others) call them, as well as their name to rational humans.  Next, is the diameter and the area.  The slices equivalent lets you know how many slices of a normal 16" pizza you would be getting at the other sizes; they likely are all cut into 8 slices.  % of a real pizza is exactly what it sounds like.

Pizza Hut NameActual NameDiameter (in)Area (in^2)Slices Equivalent% of a Real Pizza
PersonalJoke628.31.1314%
Small?1078.53.1339%
MedOffensively Small12113.14.5056%
LargeSmall14153.96.1377%
X LargePizza16201.18.00100%
X Large18254.510.13127%
Wonderful20314.212.50156%

Monday, April 15, 2013

Tuesday, April 9, 2013

Leonard v. Pepsico, Inc.

http://en.wikipedia.org/wiki/Leonard_v._Pepsico,_Inc
Leonard v. Pepsico, Inc., 88 F. Supp. 2d 116, (S.D.N.Y. 1999), aff'd 210 F.3d 88 (2d Cir. 2000), more widely known as the Pepsi Points Case, is a contracts case tried in the United States District Court for the Southern District of New York in 1999, in which the plaintiff, John Leonard, sued PepsiCo, Inc. in an effort to enforce an "offer" to redeem 7,000,000 Pepsi Points for an AV-8 Harrier II jump jet, which PepsiCo had shown in a portion of a televised commercial that PepsiCo argued was intended to be humorous. The plaintiff did not collect 7,000,000 Pepsi Points through the purchase of Pepsi products, but instead sent a certified check for $700,008.50 as permitted by the contest rules. Leonard had 15 existing points, paid $0.10 a point for the remaining 6,999,985 points, and a $10 shipping and handling fee.

Among other claims made, Leonard claimed that a federal judge was incapable of deciding on the matter, and that instead the decision had to be made by a jury consisting of members of the "Pepsi Generation" to whom the advertisement would allegedly constitute an offer.

In justifying its conclusion that the commercial was "evidently done in jest" and that "The notion of traveling to school in a Harrier Jet is an exaggerated adolescent fantasy," the court made several observations regarding the nature and content of the commercial. These included (among others) that:
  • "The callow youth featured in the commercial is a highly improbable pilot, one who could barely be trusted with the keys to his parents' car, much less the prize aircraft of the United States Marine Corps."
  • "The teenager's comment that flying a Harrier Jet to school 'sure beats the bus' evinces an improbably insouciant attitude toward the relative difficulty and danger of piloting a fighter plane in a residential area."
  • "No school would provide landing space for a student's fighter jet, or condone the disruption the jet's use would cause."

Sunday, April 7, 2013

So Crates

Two great legal advice threads:

Invoking Socrates to get out of running a red light

Fighting for his "rights"

The Labyrinth of Genre

This uses last.fm genre data to show an endless branching of genres.  Every genre you click shows the 6 closest related ones (not necessarily sub-genres).

Note: It plays a band from the currently selected genre.

http://static.echonest.com/LabyrinthOfGenre/GenreMaze.html

Wednesday, April 3, 2013

The trouble with using police informants in the US

http://www.bbc.co.uk/news/magazine-21939453
Whatever the case, under Florida law Horner now faced a minimum sentence of 25 years, if found guilty.

"My public defender told me, 'They got you dead to rights.' So I thought, 'OK, I guess there's no need taking this to trial.'"

Prosecutors offered a plea bargain of 15 years if Horner accepted a guilty plea.

"I said, 'My youngest daughter will be 25 years old when I get out. I can't do that.'"

That left him with only one option - to become an informant himself.

Under the deal he signed with prosecutors, he agreed to plead guilty. But if he helped make prosecutable cases against five other people on drug-trafficking charges - charges carrying 25-year minimum terms - his own sentence could be reduced from 25 years to 10.

Horner failed to make cases against drug traffickers.

As a result, he was sentenced to the full 25 years in October last year and is now serving his sentence in Liberty Correctional Institution, outside Tallahassee. He will be 72 by the time he is released.

The irony is that if Horner been an experienced drug dealer, he may well now be serving a much shorter term than 25 years.

"What snitching does is it rewards the informed, so the lower you are on the totem pole of criminal activity, the less useful you are to the government," says Natapoff. "The higher up in the hierarchy you are, the more you have to offer."

Court records show that Matt, the person who informed on Horner, had a lengthy record of drug offences. At the point he informed on Horner, he was facing a minimum sentence of 15 years for trafficking. He was ultimately sentenced to just 18 months and is now free.
I believe there's a term for this.

Thursday, March 21, 2013

Shoe monument for man who threw footwear at Bush

http://www.reuters.com/article/2009/01/30/us-iraq-shoe-odd-idUSTRE50T54M20090130

The video is so good.  It was probably the peak of Bush's presidency.  He dodged it like he had been training his entire life for that moment.

https://www.youtube.com/watch?v=_RFH7C3vkK4

Thursday, March 14, 2013

Errors from Rounding Pi

In honor of Pi Day, I did some calculations on the error introduced by rounding pi.  This has been done plenty of times already, but it was fun.

The key point is that rather crude approximations are still plenty accurate.  Just using 3 only leads to a 4.5% error, and the common 3.14 is good for 0.05%, which is a better tolerance than anything you're likely to do.

I also list the absolute errors when calculating circumferences of circles with various radii.  If you are calculating a circle with a radius of the observable universe, you'll need about 62 digits (first calculated in 1699) to get the error below 1 Planck length.  That ought to be enough for anybody.


 Relative error:
DigitsValueError
134.5070342%
23.11.3239353%
33.140.0506958%
43.142-0.0129662%
53.1416-0.0002338%
63.141590.0000845%
73.141593-0.0000110%
83.1415927-0.0000015%
93.141592650.0000001%
103.1415926540.0000000%

Absolute error in calculating the circumference of a circle with the given radius:
DigitsMeterMileEarthAstronomical UnitLight YearGalaxyObservable Universe
128.32 cm0.46 km1,804.17 km42,363,900 km17,908.56 AU14,159.27 ly3,993.87 Mpc
28.32 cm133.87 m529.97 km12,444,300 km5,260.62 AU4,159.27 ly1,173.19 Mpc
33.19 mm5.13 m20.29 km476,500 km201.44 AU159.27 ly44.92 Mpc
40.81 mm1.31 m5.19 km121,900 km51.52 AU40.73 ly11.49 Mpc
514.69 µm2.36 cm93.61 m2,198.01 km0.93 AU0.73 ly675,900 ly
65.31 µm0.85 cm33.81 m793.94 km50,208,700 km16,781.23 AU244,100 ly
70.69 µm1.11 mm4.41 m103.64 km6,554,400 km2,190.69 AU31,869.74 ly
892.82 nm149.38 µm0.59 m13.89 km878,100 km293.5 AU4,269.74 ly
97.18 nm11.55 µm4.57 cm1.07 km67,922.68 km22.7 AU330.26 ly
100.82 nm1.32 µm0.52 cm122.73 m7,761.55 km2.59 AU37.74 ly
1120.41 pm32.85 nm130.05 µm3.05 m193.12 km9,656,100 km0.94 ly
120.41 pm0.67 nm2.63 µm6.19 cm3.91 km195,600 km1,202.95 AU
130.41 pm0.67 nm2.63 µm6.19 cm3.91 km195,600 km1,202.95 AU
1413.52 fm21.76 pm86.16 nm2.02 mm127.94 m6,396.77 km39.34 AU
156.48 fm10.42 pm41.26 nm0.97 mm61.28 m3,063.76 km18.84 AU
160.48 fm0.77 pm3.04 nm71.35 µm4.51 m225.6 km1.39 AU
1776,925,300 ym123.8 fm0.49 nm11.51 µm0.73 m36.39 km33,476,700 km
183,074,700 ym4.95 fm19.59 pm0.46 µm2.91 cm1.45 km1,338,100 km
19925,300 ym1.49 fm5.9 pm138.42 nm0.88 cm0.44 km402,700 km
2074,713.23 ym120,239,000 ym0.48 pm11.18 nm0.71 mm35.34 m32,514.03 km
215,286.77 ym8,508,200 ym33.68 fm0.79 nm50.02 µm2.5 m2,300.72 km
22713.23 ym1,147,800 ym4.54 fm106.7 pm6.75 µm33.74 cm310.39 km
2386.77 ym139,600 ym0.55 fm12.98 pm0.82 µm4.1 cm37.76 km
246.77 ym10,889.69 ym43,109,700 ym1.01 pm64.02 nm3.2 mm2.94 km
250.77 ym1,233.65 ym4,883,700 ym114.68 fm7.25 nm362.6 µm333.59 m
262,069,113,700 pl53.82 ym213,100 ym5 fm316.37 pm15.82 µm14.55 m
27405,829,100 pl10.56 ym41,787.43 ym0.98 fm62.05 pm3.1 µm2.85 m
2834,587,700 pl0.9 ym3,561.43 ym83,626,100 ym5.29 pm264.42 nm24.33 cm
292,536,500 pl4,082,025,600 pl261.17 ym6,132,600 ym0.39 pm19.39 nm1.78 cm
3061,516.66 pl99,001,200 pl6.33 ym148,700 ym9.41 fm0.47 nm0.43 mm
3161,516.66 pl99,001,200 pl6.33 ym148,700 ym9.41 fm0.47 nm0.43 mm
32356.91 pl574,400 pl2,273,880,900 pl862.94 ym54,572,100 ym2.73 pm2.51 µm
33356.91 pl574,400 pl2,273,880,900 pl862.94 ym54,572,100 ym2.73 pm2.51 µm
3414.33 pl23,062.27 pl91,298,100 pl34.65 ym2,191,100 ym109.56 fm100.79 nm
351.96 pl3,147.15 pl12,458,800 pl4.73 ym299,000 ym14.95 fm13.75 nm
360.52 pl835.87 pl3,309,000 pl1.26 ym79,414.88 ym3.97 fm3.65 nm
370.02 pl39.27 pl155,400 pl3,650,060,700 pl3,730.65 ym186,532,700 ym171.61 pm
380 pl0.56 pl2,231.63 pl52,401,000 pl53.56 ym2,677,900 ym2.46 pm
390 pl0.56 pl2,231.63 pl52,401,000 pl53.56 ym2,677,900 ym2.46 pm
400 pl0.03 pl133.55 pl3,136,000 pl3.21 ym160,300 ym147.44 fm
410 pl0.01 pl24.13 pl566,500 pl0.58 ym28,949.81 ym26.63 fm
420 pl0 pl0.47 pl11,118.95 pl703,159,600 pl568.22 ym0.52 fm
430 pl0 pl0.31 pl7,393.36 pl467,553,800 pl377.83 ym347,603,600 ym
440 pl0 pl0 pl11.57 pl731,600 pl0.59 ym543,900 ym
450 pl0 pl0 pl11.57 pl731,600 pl0.59 ym543,900 ym
460 pl0 pl0 pl6.94 pl439,100 pl21,957,068,900 pl326,500 ym
470 pl0 pl0 pl0.46 pl29,143.95 pl1,457,197,300 pl21,667.11 ym
480 pl0 pl0 pl0.09 pl5,729.68 pl286,484,000 pl4,259.74 ym
490 pl0 pl0 pl0 pl123.89 pl6,194,300 pl92.1 ym
500 pl0 pl0 pl0 pl6.81 pl340,700 pl5.07 ym
510 pl0 pl0 pl0 pl4.89 pl244,600 pl3.64 ym
520 pl0 pl0 pl0 pl0.21 pl10,479.35 pl9,641,002,700 pl
530 pl0 pl0 pl0 pl0.02 pl1,227.78 pl1,129,559,800 pl
540 pl0 pl0 pl0 pl0 pl57.07 pl52,503,500 pl
550 pl0 pl0 pl0 pl0 pl1.47 pl1,349,300 pl
560 pl0 pl0 pl0 pl0 pl1.47 pl1,349,300 pl
570 pl0 pl0 pl0 pl0 pl0.29 pl266,300 pl
580 pl0 pl0 pl0 pl0 pl0 pl2,983.86 pl
590 pl0 pl0 pl0 pl0 pl0 pl2,401.42 pl
600 pl0 pl0 pl0 pl0 pl0 pl247.31 pl
610 pl0 pl0 pl0 pl0 pl0 pl21.96 pl
620 pl0 pl0 pl0 pl0 pl0 pl0.41 pl
630 pl0 pl0 pl0 pl0 pl0 pl0.12 pl
640 pl0 pl0 pl0 pl0 pl0 pl0.02 pl
650 pl0 pl0 pl0 pl0 pl0 pl0 pl

Wednesday, March 13, 2013

Project Prevention

Project Prevention says their main goal is to promote awareness of the dangers of using drugs during pregnancy. They are better known, however, for paying drug addicts cash for volunteering for long-term birth control, including sterilization. The organization offers US$300 (£200 in the UK) to each participant. The New York Times reports that the organization initially offered more money to women who chose tubal ligations and men who chose vasectomies than to those who chose long-term birth control like intrauterine devices, but criticism forced them to adopt a flat rate. To receive the money, clients have to show evidence they have been arrested on a drug-related offence, or provide a doctor's certificate saying they use drugs, and further evidence is needed confirming that the birth-control procedure has taken place. The organization keeps statistics on its activities through survey forms that all participants fill out, before any procedure is completed. As of August 2011 based on survey forms from 3,848 clients it had paid: 1,996 (51.9%) were Caucasian; 956 (24.8%) African American; 484 (12.6%) Hispanic; 412 (10.7%) other.

Sunday, March 10, 2013

How Long to Freeze in Space

A common Sci-Fi trope is a ship losing power and the crew slowly freezing to death.  I decided to do some calculations to see how long this would take to happen.  This turns out to be pretty hard to actually do, mainly due to the large number of unknowns.

In the vacuum of space, only one of the three types of heat transfer applies: radiation.  The formula for heat output of a body is:
`P = {dE}/{dt} = epsilon sigma A (T^4 - T_a^4)`
Where: P is power in watts, E is energy in Joules, t is time in seconds, A is surface area in square meters, and T is temperature of the object, `T_a` is ambient temperature in Kelvin.  `sigma` is a constant which is `5.67 times 10^-8 {"w"}/{"m"^2 "K"}`.  `epsilon` is the emissivity of the object, which ranges from 0-1. 

The energy contained by an object is given by:
`E = mCT`
Where E is energy, m is mass, C is specific heat, and T is temperature.  If you're going to do any calculations be careful with specific heat, as it is usually given in J/(g K), not J/(kg K).

Luckily, it's pretty easy to estimate just with a spreadsheet.  We can put each degree from say 70F to 32F and use the first formula to find the heat power output (the change between each degree is less than 1%).  That output is just in joules per second.  We can find the total heat energy of an object at a given temperature in joules.  Then you can find how long it will take to drop one degree.

However, I wanted to to solve it algebraically and get a general formula.  I played around with making a differential equation of these for a while.  Eventually I came up with a solution that ignores the ambient temperature (which at 3K in space is pretty ignorable).

Take the derivative with respect to time of the heat energy:
`{dE}/{dt} = mC {dT}/{dt}`

Now note that we already have a formula for `{dE}/{dt}` (and ignore the ambient temperature):
`epsilon sigma A T^4 = mC {dT}/{dt}`

Now we have one of those separable differential equations all the kids are always talking about:
`int {mC}/{epsilon sigma A} {dT}/{T^4} = int dt`

Evaluating the definite integral gives the formula:
`t(T_f) = {- m C}/{3 cdot A sigma epsilon}(1/T_0^3 - 1/T_f^3)`
Where: `T_0` is initial temperature, and `T_f` is final temperature, both in Kelvin.

Four of the above variables need to be estimated.  To give some idea how accurate the estimates are, all the variables are liner.  This means if you double one it'll double the time (or half it).  Most of the variables are hard to estimate to within even an order of magnitude.  The formula also mainly serves as a worst case estimate.

Being near a star would add enough heat that the problem could be over heating (indeed it is for the ISS).  As noted on that page, our current spacecraft have mylar insulating layers which reduce the effective emissivity to 0.03.  This increases the cooling time by a factor of 33 over what one would assume with a simple dull paint.

The formula also assumes the object is of uniform material and temperature.  In reality the specific heat of materials varies quite a bit.  Most metals are < 0.5, compared to water at 4.2.  It's probably fair to assume most the thermal mass comes from the metal in the ship, so I've used 0.5 in my estimates.

The formula also ignores the fact that as the outside of the ship cools heat must be transfered from the interior (via conduction and convection) before it can radiate into space.  This slows the process down more, by an amount that I don't even want to estimate.  If the ship is designed to passively hold heat (which seems like it might be a good idea), it could easily be several orders of magnitude.

Mass and surface area of a fictional ship are pretty hard to estimate, to say the least.  I got my estimates from the infamous Star Trek vs Star Wars site.  If you think the estimates are wrong, feel free to head over there and start an argument about it.

Finally, it's also worth noting here these all assume there is no internal power generated.  The power output of the runabout is about 150 kW.  Anything generating power inside would subtract from that rate and increase the time to freeze.  A human body only gives off about 100 watts each, and lights would probably be around 1 kW max.  So, it would seem that in a situation where a small ship loses all power, freezing to death would be a serious concern.  Of course humans can survive temperatures well below freezing.  It would seem like a good idea to equip small ships with survival suits with an internal power source.

The time it takes to go from 70F to 0F varies from hours to months.  The general trend is larger the object the longer it takes.  A human body would only take a few hours.  A small ship (runabout, max crew: 15) could be anywhere from 12 hours to a couple weeks.  A large ship (galaxy class, crew: about 1200) would take months to years.

I made a table with some estimates, keep in mind these are probably underestimates.  I used 0F as the final temp because I think it's reasonable for a clothed human to survive down to that.


NameLength (m)CrewSurface Area (`"m"^2`)Metric TonsTime 70F to 0F
Death Star II160,0002,500,00080,400,000,0001,500,000,000,000,0001199 years
Super Star Destroyer17,600300,000201,911,0008,322,000,0002.65 years
Borg Cube3,036130,00055,325,23560,000,000,00070 years
Enterprise-D6421,200524,74210,200,0001.25 years
Enterprise310430145,9011,000,000161 days
Runabout2382,0821,00011.3 days
Type 6 Shuttlecraft62925012.8 days
TIE Fighter61190617.8 hours
Naked Human211.800.0900.96 hours (98.6F to 84F)

Sunday, March 3, 2013

Friday, February 15, 2013

Infomercial Gifs

http://www.buzzfeed.com/julianbrand/40-gifs-of-stupid-infomercial-people-6eof


100 Cats In Ikea

http://www.youtube.com/watch?&v=vCB7RqGS684

"Let's take 100 cats, release them in Ikea, and see what happens."

Greatest thing the human race has ever done.

Thursday, February 14, 2013

Massive Police Shootout in Cleveland Despite Lack of Criminals

http://www.schneier.com/blog/archives/2013/02/massive_police.html
A November car chase ended in a "full blown-out" firefight, with glass and bullets flying, according to Cleveland police officers who described for investigators the chaotic scene at the end of the deadly 25-minute pursuit.

But when the smoky haze -- caused by rapid fire of nearly 140 bullets in less than 30 seconds -- dissipated, it soon became clear that more than a dozen officers had been firing at one another across a middle school parking lot in East Cleveland.

At the end of the scene, both unarmed -- and presumably innocent -- people in the car were dead.

Tuesday, February 12, 2013

Florida Man

https://twitter.com/_floridaman

"Real-life headlines about the world's worst superhero."

Friday, February 1, 2013

Blank screen if kids yell too much

http://superuser.com/questions/545329/blank-screen-if-kids-yell-too-much
My kids (4 and 5) yell a lot when playing games on our Linux box. I found an effective cure for this: I've told them that the computer doesn't like loud noises. So when they get loud, I ssh into the box and run:
chvt 3;  sleep 15;  chvt 7
This turns off the screen for 15 seconds. They get quiet, but not to the level that I would be happy with. So I need to continue this educational process, but I'm getting tired of doing this manually.

Thursday, January 31, 2013

Kentucky man sentenced to attend church

http://www.wkyt.com/home/headlines/Kentucky-man-sentenced-to-attend-church-188915001.html
Go to jail or go to church. That was the choice for a Kentucky man arrested in a theft case.

As part of his plea deal, a judge sentenced 23-year-old James Talbot Nickell to attend Sunday services for six weeks at the First Baptist Church in Sandy Hook.
Well this is certainly interesting.  Unfortunately, all the articles are very short local news, so we don't know the details.  From the phrasing of one report it made it seem like the church agreed to not press charges if he attended church, and I'm not really sure if that would make it legal or not.

I also don't know if we'll hear anything else about it, as I don't know if anyone else could challenge it without standing.  Clearly, he won't challenge it.

In the comments on that site 90% of the people are defending the choice, since "he had a choice".  As a quick rebuttal, what if he had been convicted of armed robbery and the judge gave him the choice of 1 year in prison or 50 lashes?  Or if the judge gave him the choice of the guy paying the judge $10k on the side or go to jail?  Or if it had been a girl and the judge gave the choice of jail or sex?

Or as one of the commenters pointed out, I wonder how the people that think this is ok would feel if the choice had been between jail or attending a mosque.

A choice doesn't make it legal.  I think people are just being blinded to that by the fact that they personally feel that attending church is a positive thing.

Tuesday, January 22, 2013

Due Process When Everything is a Crime

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2203713
Overall, the problem stems from a dynamic in which those charged with crimes have a lot at risk, while those doing the charging have very little skin in the game.  One source of imbalance is prosecutorial immunity.  The absolute immunity of prosecutors – like the absolute immunity of judges – is a judicial invention, a species of judicial activism that gets less attention than many other less egregious examples.  Although such immunity no doubt prevents significant mischief, it also enables significant mischief by eliminating one major avenue of accountability.  Even a shift to qualified, good-­faith immunity for prosecutors would change the calculus significantly.

Another remedy might be a "loser pays" rule for criminal defense costs.  After all, when a person is charged with a crime, the defense – for which non-­indigent defendants bear the cost – is an integral part of the criminal justice process.10  For guilty defendants, one might view this cost as part of the punishment.   But for those found not guilty, it looks more like a taking:  Spend this money in the public interest, to support a public endeavor, or go to jail.  To further discipline the process, we might pro‐rate things:  Charge a defendant with 20 offenses, but convict on only one, and the prosecution must bear 95% of the defendant’s legal fees.  This would certainly discourage overcharging.

Monday, January 21, 2013

How one man escaped from a North Korean prison camp

http://www.utsalumni.org/news/how-one-man-escaped-from-a-north-korean-prison-camp-3549/
“By the way,” Shin asked, “where is Pyongyang?”

Shin’s question stunned Park. He explained that Pyongyang, located about 50 miles south of Camp 14, was the capital of North Korea, the city where the country’s powerful people lived. Park said he had grown up there, studying in East Germany and the Soviet Union. After returning home, he had become chief of a taekwondo training centre. Park explained what life was like outside Camp 14. He told Shin about money, television, computers and mobile phones. He explained that the world was round.

Much of what Park talked about was difficult for Shin to understand, believe or care about. What delighted him – what he kept begging for – were stories about eating. Park described chicken, pork and beef in China, Hong Kong, Germany, England and the former Soviet Union. Intoxicated, Shin made perhaps the first free decision of his life. He chose not to snitch.

Friday, January 18, 2013

Raccoon Pizza Party

http://www.youtube.com/watch?v=pfwr-mYVJiw

Marathon Man

http://www.newyorker.com/reporting/2012/08/06/120806fa_fact_singer?currentPage=all
Kursh had a blog, and on August 6, 2010, he posted a blind item about Litton titled “Another Rosie Ruiz?”—a reference to the scammer who was briefly heralded as the winner of the women’s division of the 1980 Boston Marathon, before it was determined that she’d jumped onto the course less than a mile from the finish. Kursh wrote in a follow-up that he had been exchanging concerns with other race directors, adding, “I smell a rat.”

In an e-mail exchange initiated by Kursh, Litton claimed that photographs of him would be hard to find, because his shirt had covered his racing bib. He added, “Wasn’t there a timing mat at the turnaround?” Kursh ultimately decided to disqualify him, explaining, “From your comment here it is pretty obvious that you have NO idea where the timing mats were on route. They definitely were not at this turn-around point.”

On occasions when Litton responded to such pointed challenges, he never did so in a hostile or nakedly defensive manner. After a disqualification, he simply deleted the result and the recap from his Web site, as if he had never registered for the race. His default demeanor was equable mystification.

Monday, January 14, 2013

On the Evolution of Memes

http://www.gocomics.com/tomthedancingbug/2012/11/30

Here on the internet, we have things called memes.  They are essentially insides jokes that separate those of us that live in the internet from those of you that don't.

However, every once in an while a ornery old man will come along and point out that memes don't just mean 'stupid internet joke'.  The term meme was actually coined by Richard Dawkins in his book the Selfish Gene in 1976.

The meme was a type of memory gene (hence the name).  The idea being that ideas spread through a culture and evolve over time to more persistent forms.  I seem to recall he gave as an example some song that he sang at his school as a kid that his father had known from his time as a kid and that was still sung, perhaps with minor changes. 

The key point was that in any system where things are copied, but with occasional mistakes, 'better' forms will tend to replace other forms.  Here, 'better' simply means more likely to be copied for whatever reason.  This is frankly, pretty obvious in retrospect, and is the central idea of evolution.

As another example I like to use the line "Luke, I am your father." from Star Wars.  If you are a pedantic nerd like me, you likely know that line never appears in the movies.  This is the exchange:
Darth Vader: Obi-Wan never told you what happened to your father.
Luke Skywalker: He told me enough! He told me you killed him!
Darth Vader: No. I am your father.

If you examine the actual dialogue it should be clear why the modified version is more well known.  Simply saying "No. I am your father." might not be a clear enough reference to Star Wars, and people might not get the joke.  By replacing 'no' with 'luke' it makes it clear that it's the Star Wars quote.

Another example is the line "Beam me up, Scotty", which never appears in the original Star Trek Series.  Similar version were used on the show, and I won't speculate as to why that one become most prevalent.  Regardless, the wiki page has this interesting set of examples:
"Beam me up, Scotty" is similar to the phrase, "Just the facts, ma'am", attributed to Jack Webb's character of Joe Friday on Dragnet, "It's elementary, my dear Watson", attributed to Sherlock Holmes, "Luke, I am your father", attributed to Darth Vader, or "Play it again, Sam", attributed to Ilsa Lund in Casablanca and "We don't need no stinkin' badges!" attributed to Gold Hat in The Treasure of the Sierra Madre. All five lines are the best known quotations from these works for many viewers, but not one is an actual, direct quotation.
It doesn't matter why any of these are used instead of the originals.  What matters is that they are all examples of ideas evolving to more persistent forms.

If you were alive prior to 5 years ago, you are probably aware that the word meme is a recent addition to most people's vocabularies.  This, despite the fact that we know it has existed for close to 40 years.

The point I'm getting at here, is that the word meme itself is a perfect example of memes in action.  Originally it had a specific meaning with respect to this idea of cultural evolution, but now it has evolved to simply mean 'repeated, sometimes modified joke'.  This form is clearly better adapted to flourish in culture.  Those who oppose it in favor of the original meaning clearly never understood the point.

Ancient Roman Graffiti

http://www.pompeiana.org/resources/ancient/graffiti%20from%20pompeii.htm

"Weep, you girls.  My penis has given you up.  Now it penetrates men’s behinds.  Goodbye, wondrous femininity!"

Wednesday, January 9, 2013

Mailinator Inbox Generator

Yesterday, I wrote about Mailinator.  This was spurred by my writing a simple page to help generate random Mailinator inboxes.

Mailinator is super useful for websites that force you to register just to see content.  Usually I just use the same simple username/pass combo on all these.  Sometimes, that is already taken so I have to use a random one.  The mailinator homepage gives a random inbox name, but it's annoying to select it, and to select just the username part.  I made a page that uses the 1000 most common first and last names and generates a random combo and gives all the fields you would need to register in easy to copy fashion.

http://daleswanson.org/things/mail.htm

Some notes:  It generates the password based on the md5 hash of the username, limited to whatever password requirements you give it.  Nice for sites that force digits or upper case letters.  It also means you can find the password in the future if you need it by recalculating the md5 hash yourself.  If you find out the requirements after putting in the other info you can change the parameters without it updating new random info.

There is also a checkbox to add a random 3 digit number to the end of the usernames.  This is nice for sites where every username is taken.  I tested the gmail registration and every single combo given was taken, none of the ones with random numbers were though.

It also gives an alternative domain to use if mailinator.com is blocked.  If the alternative is blocked as well it lets you get another one without changing all the other info.

Mailinator

Apparently, I've never written here about Mailinator before.  It is a great service for those websites that force you to register to see content.  The idea is simple.  Enter any random email address @mailinator.com in the registration, and then any emails sent to it are publicly viewable for 24 hours, allowing you to click to confirmation link.  For example here are some inboxes:
monkeys@mailinator.com
MileyCyrus@mailinator.com 
StinkyDog@mailinator.com

Just to be clear, you don't have to set up anything before hand.  Just enter anything you want and end it with @mailinator.com and then you (or anyone else) can check the mail.

There are some additional useful features.  First, it has alternate domain names, which still go to the same inboxes, but allow you got get around admins who block @mailinator.com.  For example monkeys@devnullmail.com will go to the same inbox as monkeys@mailinator.com.  Here is an amusing story about how the guy who runs mailinator handled people trying to scrape all the alternate domains to block them.

Another interesting feature is that you can point the mx record of any domain you own to mailinator, and it will function the same as the above alternative domains.  In other words, I could set up daleswanson.org's mx record such that emails to monkeys@daleswansonson.org go to the same inbox as above.

Lastly, there are alternative inbox names.  This means that every inbox has an alternative "secret" name, which is displayed on the inbox's page.  For example the alternative for monkeys@mailinator.com is M8R-b8esq@mailinator.com.  Emails sent there will go to the same monkeys@mailinator.com inbox that I've been using as an example.  The point of this is to allow you to think up a somewhat long and random inbox name, and then only give out the alternate one.  This, in effect, makes your inbox name a password, and gives you some privacy. 

Friday, December 28, 2012

Federal prisoners use snitching for personal gain

http://www.usatoday.com/story/news/nation/2012/12/14/jailhouse-informants-for-sale/1762013/
Snitching has become so commonplace that in the past five years at least 48,895 federal convicts -- one of every eight -- had their prison sentences reduced in exchange for helping government investigators, a USA TODAY examination of hundreds of thousands of court cases found. The deals can chop a decade or more off of their sentences.

How often informants pay to acquire information from brokers such as Watkins is impossible to know, in part because judges routinely seal court records that could identify them. It almost certainly represents an extreme result of a system that puts strong pressure on defendants to cooperate. Still, Watkins' case is at least the fourth such scheme to be uncovered in Atlanta alone over the past 20 years.

Those schemes are generally illegal because the people who buy information usually lie to federal agents about where they got it. They also show how staggeringly valuable good information has become --­ prices ran into tens of thousands of dollars, or up to $250,000 in one case, court records show.

Friday, December 21, 2012

Great Minds

I recently read Nate Silver's newest book, The Signal and the Noise: Why Most Predictions Fail – But Some Don't, which was good if you're wondering.  Chapter 11 is about the stock market, and he points out that there is some correlation between one day's rise or fall and the next's.  He then calculates that one could make quite a bit of money investing based on this fact, but that fees would kill it.  Finally, he notes that the correlation has disappeared recently, making the whole plan worthless.

Assuming you've memorized all my posts, you should now be realizing I made a post about the same thing.  His book came out September 27, and my post was on October 13, so it would seem pretty obvious that I read the book and got the idea from there (even though I didn't).  I'm surprised no one pointed this out in the comments.  I can only assume that this is due to a lack of readership of his book.

In another case, I recently discovered this post on the expected value of a Mega Millions ticket.  He calculates the expected value of the lesser prizes, calculates the amount of the jackpot one would actually get after taxes, and then uses the Poisson Distribution to calculate the expected value of the jackpot.  He then fits a polynomial model to the past data in order to predict what various jackpot's values will be.  In other words, exactly what I did.

The key difference is he didn't spread his through 3 long posts, filled with math, and no visual breaks in the wall of text.  Also, he didn't include an unnecessary free lesson on the guts of Linear Algebra. I'll leave it to the masses to decide which approach is better.

I made my first post on the subject in April 2012, and he made his in January 2011.  So it's debatable who copied who.

Time-machine-assisted plagiarism aside, it is interesting to see someone else tackle the same problem, and do it largely the same way, and produce very similar results.  One example of a difference is he calculated an expected value from the non jackpot prizes of $0.10, whereas I calculated $0.15.  The difference is he applied taxes to all the prizes, whereas I exempted the $150 and below prizes from taxes.  It is interesting how much of a difference that makes.

Saturday, December 1, 2012

Friday, November 30, 2012

North Korea Says Its Archaeologists Discovered A 'Unicorn Lair'

http://www.npr.org/blogs/thetwo-way/2012/11/30/166265699/north-korea-says-its-archaeologists-discovered-a-unicorn-lair?ft=1&f=1001
"The lair is located 200 meters from the Yongmyong Temple in Moran Hill in Pyongyang City. A rectangular rock carved with words "Unicorn Lair" stands in front of the lair. The carved words are believed to date back to the period of Koryo Kingdom (918-1392).

"Jo Hui Sung, director of the Institute, told KCNA:

"'Korea's history books deal with the unicorn, considered to be ridden by King Tongmyong, and its lair."

Thursday, November 15, 2012

Why Donald Rumsfeld Can’t Be Sued for Torture

http://www.slate.com/articles/news_and_politics/jurisprudence/2012/11/new_ruling_donald_rumsfeld_can_t_be_sued_for_torture.html
The facts are a case study in system failure. Donald Vance and Nathan Ertel were Americans working for a private security firm in Iraq. When Vance became suspicious that his employer was selling weapons to groups hostile to the United States, he went to the FBI. Vance and Ertel were then fingered as arms dealers. Military personnel arrested them in 2006 and held them for several weeks.

According to the complaint, Vance and Ertel were held in solitary confinement and subjected to violence, sleep deprivation, extremes of temperature and sound, denial of food, water, and medical care, and other abuses. Though the Army Field Manual (and four judges) calls this torture, the majority opinion prefers the euphemism “harsh interrogation techniques.”
http://en.wikipedia.org/wiki/Donald_Vance
Vance was a 29-year-old Navy veteran from Chicago when he went to Iraq as a security contractor. Vance became an unpaid informant for the F.B.I., passing them evidence that seemed to suggest that the Iraqi security firm at which he worked might be engaged in illegal weapons trading, particularly to officials from the Iraqi Interior Ministry.

 However, when American soldiers raided the firm, he was treated as a suspect. Another American who worked for the company, but had resigned over the alleged weapons trading, was also detained. Vance was held for three months at Camp Cropper, America’s maximum security prison site in Baghdad.

Tuesday, November 13, 2012

The Growth Of Monopoly Power

http://thesocietypages.org/socimages/2012/11/13/the-growth-of-monopoly-power/
Percentage of Sales for Four Largest Firms in Selected U.S. Retail Industries:
Industry (NAICS code)  1992    1997    2002    2007
Food & beverage stores (445)  15.4    18.3    28.2    27.7
Health & personal care stores (446)  24.7    39.1    45.7    54.4
General merchandise stores (452)  47.3    55.9    65.6    73.2
Supermarkets (44511)  18.0    20.8    32.5    32.0
Book stores (451211)  41.3    54.1    65.6    71.0
Computer & software stores (443120)  26.2    34.9    52.5    73.1

Get ready for the last site you'll need for the rest of your life.

http://catoverflow.com/

I love every one of these.  I want to post each one of these individually.

Saturday, November 10, 2012

Odds of jumping into a star

In an attempt to be more like Dwight Schrute I just finished watching the new Battlestar Galactica.  Overall, it was a good show.  I did, however, have a problem with it.  Its particular answer to faster than light (FTL) travel was a jump drive.  The practical effect was that coordinates could be entered and then the ship would be more or less instantly transported to those coordinates, without covering the area between.  The coordinates were relative to the current location, so they had to be calculated for each jump at the time.  At several points during the series, in order to escape an enemy, an unexpected jump was needed immediately.  Each time a jump to anywhere was ordered, and the response was that it could land them into a star.  The jump was performed anyway and they beat the odds.

The problem is space is almost entirely empty space (hence the name).  I knew the odds of actually jumping into something would be remote, and decided to calculate them.

Before I start, a quick note: I seem to recall a similar objection in Star Wars.  However, in Star Wars FTL travel was via hyperdrive, which did seem to cover the area between the start and end point.  This would greatly increase the odds of actually hitting something.  I'm assuming the jumps in BSG don't cover the area in between, which I feel is justified by the name, dialogue, and jumps that were made surrounded by matter.

Volume of the Milky Way:
The series is purposly coy about if it involves our Earth, but without spoilers it's safe to say it takes place in a galaxy very similar to the Milky Way.  Wikipedia tells me that the Milky Way is a disk 100,000 light years across, and about 1000 light years thick on average.
`V = \pi \cdot r^2 \cdot h`
`V = \pi \cdot (50,000" ly") ^2 \cdot 1000" ly" = 7,854,000,000" ly"^3`

Volume of stars:
Estimates for stars in the Milky Way are 300-400 billion.  I'll round that up to 500 billion.  I'll also assume stars are Sun like.  While there is a lot of stars larger and smaller than the Sun, it's an alright average.
`V = 4/3 \cdot \pi \cdot r^3 \cdot n`
`V = 4/3 \cdot \pi \cdot (1.47 \times 10^-7" ly")^3 \cdot 500 \times 10^9 = 6.69 \times 10^-9" ly"^3`

Odds:
As you can see, the stars occupy a very tiny volume of the Milky Way.  The odds of a random point being inside a star are about 1 in 1,174,000,000,000,000,000.

Larger stars:
Some of you may be protesting that there is other matter in the galaxy besides stars.  However, this stuff is as rare relative to stars as stars are relative to the galaxy as a whole.  Still, it could be argued that jumping in close to a star would be a problem.  So let's increase the size of the average star we are using to the size of the orbit of Mercury.  Jumping in at the distance of Mercury from the Sun shouldn't pose a threat for a ship in BSG.  This also more than allows for all the other non-star matter.

`V = 4/3 \cdot \pi \cdot (7.38 \times 10^-6" ly")^3 \cdot 500 \times 10^9 = 8.42 \times 10^-4" ly"^3`

Still a pretty small chance at about 1 in 9,330,000,000,000.

Entire star systems:
Let's go ahead and say that the entire star system is off limits to a jump.  Pluto orbits at a max of 50 AU.  The Voyager probes are just shy of 100 AU and are currently at the heliopause, considered the edge of the solar system.  Using 100 AU radius spheres gives:
`V = 4/3 \cdot \pi \cdot (1.59 \times 10^-3" ly")^3 \cdot 500 \times 10^9 = 8348" ly"^3`

 Which gives odds of about 1 in 940,876.

So there is only about a 1 in a million chance of jumping into a star system, which itself is almost entirely empty.

Tuesday, October 16, 2012

Alpha Centauri has a planet

In this case, the planet is low mass but very close in. The Doppler shift in the starlight amounts to a mere half meter per second – slower than walking speed! When I read that I was stunned; that low of a signal is incredibly hard to detect. Heck, the star’s rotation is three times that big. But looking at the paper, it’s pretty convincing. They did a fantastic job teasing that out of the noise. 

The graph displayed shows the effect of the planet on the star. RV means "radial velocity", the speed toward and away from us as the star gets tugged by the planet. The x-axis is time, measured in units of the period of the planet (in other words, where it reads as 1 that means 3.24 days). The dots look like they’re just scattered around, but when you average them together – say, taking all the dots in a one hour time period – you get the red dots shown (the vertical lines are the error bars). The signal then pops right out, and you can see the tell-tale sine wave of a planet pulling its star.