<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Binary Dolphin</title><link href="https://www.binarydolphin.com/" rel="alternate"/><link href="https://www.binarydolphin.com/feeds/all.atom.xml" rel="self"/><id>https://www.binarydolphin.com/</id><updated>2019-06-30T13:00:00-05:00</updated><subtitle>Computer Science, Software Engineering, Society, and Kitchen Sinks</subtitle><entry><title>Lotteries, Logarithms, and Immortal Socrates</title><link href="https://www.binarydolphin.com/lotteries.html" rel="alternate"/><published>2018-10-08T18:00:00-05:00</published><updated>2018-10-09T15:23:00-05:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2018-10-08:/lotteries.html</id><summary type="html">&lt;p&gt;You aren&amp;rsquo;t going to win the lottery and I can simulate it&lt;/p&gt;</summary><content type="html">&lt;p&gt;Back in January of 2017 (yes, this blog has a large and distinguished backlog),
we went to an art exhibition at &lt;a href="http://www.dixon.org/" title="Dixon Gallery &amp;amp; Gardens"&gt;The Dixon&lt;/a&gt; here in &lt;a href="https://en.wikipedia.org/wiki/Memphis,_Tennessee" title="Memphis, TN Wikipedia Page"&gt;Memphis,
TN&lt;/a&gt;. It was the debut of a special exhibition organized by &lt;a href="http://crystalbridges.org/" title="Crystal Bridges Museum of American Art"&gt;The
Crystal Bridges Museum&lt;/a&gt; in Arkansas.  There was a great little
&lt;a href="http://www.memphisflyer.com/memphis/state-of-the-art-at-the-dixon/Content?oid=5203984" title="'State of the Art' at the Dixon"&gt;write-up&lt;/a&gt; in a local, independent paper.&lt;/p&gt;
&lt;p&gt;And when I say great, I mean both that it was well-written &lt;em&gt;and&lt;/em&gt; that it
mentioned two of my favorite pieces in the exhibition. To be fair, there were
a LOT of pieces that I found clever, funny, moving, wow-inducing, and often
a mixture of all of those.&lt;/p&gt;
&lt;p&gt;However, one piece in particular jumped out at me: &lt;em&gt;End of the Spectrum&lt;/em&gt; by
“Ghost of a Dream”.  &lt;a href="https://www.ghostofadream.com/" title="Ghost of a Dream"&gt;Ghost of a Dream&lt;/a&gt; is a collaboration of the
artists Lauren Was and Adam Eckstrom.  I haven’t placed an image of the piece
here out of respect for the artists, but you can see an image at their website
under the &lt;a href="https://www.ghostofadream.com/more-collage" title="More Collages from Ghost of a Dream"&gt;More Collages&lt;/a&gt; section.&lt;/p&gt;
&lt;p&gt;As most savvy readers have guessed by now, it’s a collage. What you might not
know (unless you cheated) is that Was and Eckstrom created the collage using
nothing but lottery tickets.  Since this is the blog of a math/data/tech nerd, you
probably know where this going…&lt;/p&gt;
&lt;h2&gt;You aren’t going to win the lottery&lt;/h2&gt;
&lt;p&gt;How do I know that? Well, I don’t, but I’m pretty damn certain. How certain?
Let’s do some math. Actually, let’s not. There are plenty of mathy
explanations about lotteries and winning and what not out there. (There’s a
complete but dense read over at &lt;a href="https://en.wikipedia.org/wiki/Lottery_mathematics" title="Lottery Math @ Wikipedia"&gt;Wikipedia&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;Instead, let’s actually use our computers for something besides reading blogs.&lt;/p&gt;
&lt;p&gt;In fact, I believe one enormous advantage we ultra-modern geeks have over the
nerds of yore is the ability to quickly simulate models with a computer. And
I’m not talking about freely available software packages to simulate
complicated fluid dynamics over rigid objects, &lt;em&gt;although those exist&lt;/em&gt;! No, I’m
talking about starting with some simple assumptions and working out some
consequences.&lt;/p&gt;
&lt;p&gt;So how do we do that? To start with we do some googling to find out the
odds of winning the &lt;a href="https://en.wikipedia.org/wiki/Powerball" title="Powerball @ Wikipedia"&gt;Powerball&lt;/a&gt;. We’ll go with 1 chance to 292 million.
From there we can cobble together a function to keep simulating a lottery
draw until we win in Python:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;scipy&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;rand&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;one_chance&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;CHANCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;292000000.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;CHANCE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So every time we call &lt;code&gt;one_chance&lt;/code&gt;, we get a single simulated answer: how many
lottery tickets we bought before we won the Powerball. The problem is that this
is one single, solitary simulation. How do we know if we’re close? Without
doing any math, we need to simulate a lot. To start, how about we just simulate
10,000 wins?  Uh, don’t do that. On my reasonable-ish computer the above
simulation spit out &lt;code&gt;414,883,780&lt;/code&gt; after about 5 minutes. 10,000 times 5 minutes
is almost 2 weeks.&lt;/p&gt;
&lt;p&gt;Now sure, there are ways to speed up our simulation, and there also ways to use
multiple cores. But we violated one of the cardinal rules of simulation before
we started… Namely, do all the analytical work you can up front.  Sadly for
you, dear reader, that’s means doing math. Luckily for you, though, I tend to
use a slightly different rule. I do analytical work until I get annoyed, and
then I start coding. Well, not always, but in this case yes.&lt;/p&gt;
&lt;p&gt;In this case, let’s think about what we really want to know. I’m going to
reframe “How many times do I need to buy a lottery ticket” as “If I buy X
lottery tickets a week, how long until I win?”. That’s tough, too. So how
about, “If I know that every lottery ticket I buy increases my chances of winning,
how long until I have a 50-50 shot?”&lt;/p&gt;
&lt;p&gt;So now things are about to get a little more complicated… Let’s define &lt;span class="math"&gt;\(W\)&lt;/span&gt; as
the probability of winning the Powerball on a single draw.  Recall that above
we set &lt;span class="math"&gt;\(W = \frac{1}{292,000,000}\)&lt;/span&gt;. What do know about &lt;span class="math"&gt;\(W\)&lt;/span&gt;?  I mean, other than
it’s teeny-tiny? Well, we know that it’s a &lt;em&gt;binary&lt;/em&gt; variable: either we won or
we didn’t. So the probability of &lt;em&gt;not&lt;/em&gt; winning the lottery on a single draw is
&lt;span class="math"&gt;\(1 - W\)&lt;/span&gt;. If this doesn’t make sense, think of it this way: probabilities are
like percentages. They always add up to &lt;span class="math"&gt;\(100\%\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Let’s call &lt;span class="math"&gt;\(L\)&lt;/span&gt; the chance of losing the lottery.  So if &lt;span class="math"&gt;\(W\)&lt;/span&gt; is 1 in 292
million, then &lt;span class="math"&gt;\(L = 1 - W = 1 - \frac{1}{292,000,000} = 0.9999999965753424\)&lt;/span&gt;.  Or
if you prefer, &lt;span class="math"&gt;\(99.99999965753424\%\)&lt;/span&gt;. That’s a pretty good chance at not
winning the lottery.&lt;/p&gt;
&lt;p&gt;So what are the chance that you’ll lose 3 times in a row? We’re going to assume
that any two lottery tickets are independent; that is, it doesn’t matter where
or when you buy them, they all have the same chance of winning. If that’s the
case, then we know that multiplying two probabilities gives us the chance of
them both happening. So the probability of losing 2 times in a row is &lt;span class="math"&gt;\(L \times
L\)&lt;/span&gt; and the probability of losing 3 times in a row is &lt;span class="math"&gt;\(L \times L \times L =
0.9999999897260273\)&lt;/span&gt; or &lt;span class="math"&gt;\(99.99999897260273\%\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I’ll save your eyeballs the work of checking: that’s &lt;span class="math"&gt;\(0.00000000684931511508\)&lt;/span&gt;
lower than buying one ticket. Not much of a change, but it &lt;em&gt;is&lt;/em&gt; a change. So we
can keep multiplying &lt;span class="math"&gt;\(L\)&lt;/span&gt; until we get to &lt;span class="math"&gt;\(50\%\)&lt;/span&gt;!&lt;/p&gt;
&lt;p&gt;But wait - there’s a problem. &lt;s&gt;Old&lt;/s&gt; Experienced software engineers all
know what’s coming… the dreaded floating point lecture. The most common way
of representing numbers with decimal parts is called “floating point”. It’s so
common that pretty much every major CPU on the market comes with special
hardware for working with floating point numbers. But they aren’t perfect.
Because they have to estimate decimal numbers, multiplying lots of small
floating points together can cause you to get wrong (and in some cases strange)
answers. Ideally we would rather add numbers instead of multiply, and we would
like the numbers to be similar in size.&lt;/p&gt;
&lt;p&gt;Which brings us to…&lt;/p&gt;
&lt;h2&gt;Logarithms&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Logarithm" title="Logarithms @ Wikipedia"&gt;Logarithms&lt;/a&gt; power &lt;a href="https://en.wikipedia.org/wiki/Slide_rule" title="Slide Rules"&gt;slide rules&lt;/a&gt;. If you don’t know what a slide
rule is, watch &lt;a href="https://www.themoviedb.org/movie/568-apollo-13" title="Apollo 13 @ themoviedb.org"&gt;Apollo 13&lt;/a&gt;. When the NASA math peeps grab something that
looks like a ruler to do math? That’s a slide rule. Before electronic
calculators or computers, engineers and other mathy folks used slide rules to
handle lots of computations.  How do logarithms help with that?&lt;/p&gt;
&lt;p&gt;If you’re not familiar with logarithms, forget what you were probably told
in school about exponents. That was all true, but for the moment, just think
about them as a transformation. A unit conversion as it were, like converting
from Fahrenheit to Celsius so that you can explain to your European friends how
freaking &lt;em&gt;hot&lt;/em&gt; is gets in &lt;a href="https://choose901.com/memphis-summer-bucket-list/" title="The Memphis Summer Bucket List"&gt;Memphis&lt;/a&gt;. But instead you’re converting
from normal numbers to easy-to-multiply numbers. Our usual numbers are easy to
add, but a little more complicated to multiply.&lt;/p&gt;
&lt;p&gt;You’re probably already used to logarithms. The pH measure as in “pH Balanced”,
the dB (decibel) rating for audio, and the Richter scale for earthquakes are
all numbers in these special easy-to-multiply number units. Logarithms are
incredibly handy and come in different sizes.  Those of us who use them refer to
these sizes as the base. The most common bases are &lt;span class="math"&gt;\(e\)&lt;/span&gt; (the natural number),
10, and 2 (a favorite for computer scientists). For all of our examples we’ll
be using base &lt;span class="math"&gt;\(e\)&lt;/span&gt;.  One advantage of this is that most computing environments
have a function to convert from logarithms back to normal numbers: &lt;span class="math"&gt;\({\exp}\)&lt;/span&gt;
&lt;sup id="sf-lotteries-1-back"&gt;&lt;a href="#sf-lotteries-1" class="simple-footnote" title="Short for “exponential”, \(\exp(x) = e^x\)"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;When you convert a regular numbers with logarithms, adding the new numbers is the
same as multiplying the original numbers. So let’s start with the numbers
&lt;span class="math"&gt;\((2,3,4)\)&lt;/span&gt;. If we multiply them all together we get &lt;span class="math"&gt;\(2 \times 3 \times 4 = 24\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If we convert these numbers to logarithms we get&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\log(2), \log(3), \log(4) = (0.69314718, 1.09861229, 1.38629436)\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And just like magic,&lt;/p&gt;
&lt;p&gt;&lt;span class="math"&gt;\(\exp(0.69314718 + 1.09861229 + 1.38629436) = 24\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That’s much easier to work with, amirite!
Well, it’s not for you, but it &lt;em&gt;is&lt;/em&gt; for computers. It’s easier to see if the
numbers are far apart. What about:&lt;/p&gt;
&lt;div class="math"&gt;$$\log(2), \log(3000), \log(4000000000) = (0.69314718, 8.69951475, 30.80907495)$$&lt;/div&gt;
&lt;p&gt;Those numbers are much closer to each other… and the closer they are the less
error we introduce when we perform floating point operations. Adding numbers
that are close together is much, much better than multiplying lots of tiny numbers
that get progressively tinier (or larger). Now that we have that trick under our
belt, we can actually do some calculating.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;scipy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;sp&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;keep_buying&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;MILLION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1000000.0&lt;/span&gt;
    &lt;span class="n"&gt;CHANCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;292&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;MILLION&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;LOSER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;CHANCE&lt;/span&gt;

    &lt;span class="n"&gt;LOG_LOSER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LOSER&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;TICKETS_BOUGHT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;
    &lt;span class="n"&gt;curr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LOG_LOSER&lt;/span&gt;
    &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.50&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;TICKETS_BOUGHT&lt;/span&gt;
        &lt;span class="n"&gt;curr&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LOG_LOSER&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;TICKETS_BOUGHT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You’ll note that instead of evaluating every single purchase of a lottery
ticket, we increment by &lt;code&gt;TICKETS_BOUGHT&lt;/code&gt;. You can play around with that
parameter: smaller numbers will make our tiny function run longer but give us
more accurate answers.&lt;/p&gt;
&lt;h2&gt;If Only Socrates Hadn’t Drank That&lt;/h2&gt;
&lt;p&gt;I’ll save you the suspense: our function returns
&lt;span class="math"&gt;\((202400000, 0.4999982431545981)\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;That’s a lot of tickets! &lt;span class="math"&gt;\(\frac{202400000}{365.25} \approx 554141\)&lt;/span&gt;, so
purchasing one ticket a day for &lt;em&gt;&lt;em&gt;554 thousand years&lt;/em&gt;&lt;/em&gt; will get us a &lt;span class="math"&gt;\(50\%\)&lt;/span&gt;
chance at winning the Powerball. That’s… a long time. So we need to buy more
tickets per day.  Let’s imagine that &lt;a href="https://plato.stanford.edu/entries/socrates/" title="Socrates @ Stanford Encyclopedia of Philosophy"&gt;Socrates&lt;/a&gt; starts buying 50
Powerball tickets &lt;em&gt;every, single day&lt;/em&gt; in 450 BCE (he would be around 19-20
years old then).  His odds of winning the Powerball would hit 50% some time
after 10,000 AD.  And, of course, because everything is better with an
xkcd-style graph…&lt;/p&gt;
&lt;p&gt;&lt;img alt="Winning the Lottery" class="webfeedsFeaturedVisual makeBlock forceFull printHalf" src="https://www.binarydolphin.com/images/lottery.png"&gt;&lt;/p&gt;
&lt;p style="clear:both;"&gt; &lt;/p&gt;

&lt;p&gt;We can now state that unless you’re Socrates, immortal, have endless wealth,
and want to buy lottery tickets every day for &lt;span class="math"&gt;\(10,000\)&lt;/span&gt; years, maybe don’t play
the lottery. Or do - at least in Tennessee it supports education.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used in this article (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Crystal Bridges Museum of American Art: &lt;a href="http://crystalbridges.org/"&gt;http://crystalbridges.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dixon Gallery &amp;amp; Gardens: &lt;a href="http://www.dixon.org/"&gt;http://www.dixon.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Ghost of a Dream: &lt;a href="https://www.ghostofadream.com/"&gt;https://www.ghostofadream.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Logarithms @ Wikipedia: &lt;a href="https://en.wikipedia.org/wiki/Logarithm"&gt;https://en.wikipedia.org/wiki/Logarithm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Lottery Math @ Wikipedia: &lt;a href="https://en.wikipedia.org/wiki/Lottery_mathematics"&gt;https://en.wikipedia.org/wiki/Lottery_mathematics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Memphis, TN Wikipedia Page: &lt;a href="https://en.wikipedia.org/wiki/Memphis,_Tennessee"&gt;https://en.wikipedia.org/wiki/Memphis,_Tennessee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;More Collages from Ghost of a Dream: &lt;a href="https://www.ghostofadream.com/more-collage"&gt;https://www.ghostofadream.com/more-collage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Powerball @ Wikipedia: &lt;a href="https://en.wikipedia.org/wiki/Powerball"&gt;https://en.wikipedia.org/wiki/Powerball&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Slide Rules: &lt;a href="https://en.wikipedia.org/wiki/Slide_rule"&gt;https://en.wikipedia.org/wiki/Slide_rule&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Socrates @ Stanford Encyclopedia of Philosophy: &lt;a href="https://plato.stanford.edu/entries/socrates/"&gt;https://plato.stanford.edu/entries/socrates/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;‘State of the Art’ at the Dixon: &lt;a href="http://www.memphisflyer.com/memphis/state-of-the-art-at-the-dixon/Content?oid=5203984"&gt;http://www.memphisflyer.com/memphis/state-of-the-art-at-the-dixon/Content?oid=5203984&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Memphis Summer Bucket List: &lt;a href="https://choose901.com/memphis-summer-bucket-list/"&gt;https://choose901.com/memphis-summer-bucket-list/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-lotteries-2-back"&gt;&lt;a href="#sf-lotteries-2" class="simple-footnote" title="&amp;quot;Winning the Lottery&amp;quot; graph was created using matplotlib's xkcd mode"&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
    var align = "center",
        indent = "0em",
        linebreak = "false";

    if (false) {
        align = (screen.width &lt; 768) ? "left" : align;
        indent = (screen.width &lt; 768) ? "0em" : indent;
        linebreak = (screen.width &lt; 768) ? 'true' : linebreak;
    }

    var mathjaxscript = document.createElement('script');
    mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
    mathjaxscript.type = 'text/javascript';
    mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';

    var configscript = document.createElement('script');
    configscript.type = 'text/x-mathjax-config';
    configscript[(window.opera ? "innerHTML" : "text")] =
        "MathJax.Hub.Config({" +
        "    config: ['MMLorHTML.js']," +
        "    TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'none' } }," +
        "    jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
        "    extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
        "    displayAlign: '"+ align +"'," +
        "    displayIndent: '"+ indent +"'," +
        "    showMathMenu: true," +
        "    messageStyle: 'normal'," +
        "    tex2jax: { " +
        "        inlineMath: [ ['\\\\(','\\\\)'] ], " +
        "        displayMath: [ ['$$','$$'] ]," +
        "        processEscapes: true," +
        "        preview: 'TeX'," +
        "    }, " +
        "    'HTML-CSS': { " +
        "        availableFonts: ['STIX', 'TeX']," +
        "        preferredFont: 'STIX'," +
        "        styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
        "        linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
        "    }, " +
        "}); " +
        "if ('default' !== 'default') {" +
            "MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
                "var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
                "VARIANT['normal'].fonts.unshift('MathJax_default');" +
                "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
                "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
                "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
            "});" +
            "MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
                "var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
                "VARIANT['normal'].fonts.unshift('MathJax_default');" +
                "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
                "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
                "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
            "});" +
        "}";

    (document.body || document.getElementsByTagName('head')[0]).appendChild(configscript);
    (document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}
&lt;/script&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-lotteries-1"&gt;Short for “exponential”, &lt;span class="math"&gt;\(\exp(x) = e^x\)&lt;/span&gt; &lt;a href="#sf-lotteries-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-lotteries-2"&gt;"Winning the Lottery" graph was created using matplotlib's &lt;a href="https://matplotlib.org/xkcd/"&gt;xkcd mode&lt;/a&gt; &lt;a href="#sf-lotteries-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Modeling"/><category term="society"/><category term="simulation"/><category term="code"/><category term="learning"/></entry><entry><title>No Knead Bread</title><link href="https://www.binarydolphin.com/bread.html" rel="alternate"/><published>2018-03-21T14:00:00-05:00</published><updated>2019-06-30T13:00:00-05:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2018-03-21:/bread.html</id><summary type="html">&lt;p&gt;My No Knead Bread Recipe, adapted from Bittman, which was adapted from Lahey.&lt;/p&gt;</summary><content type="html">&lt;p&gt;This recipe is nothing a but simplification of Mark Bittman’s
&lt;a href="https://cooking.nytimes.com/recipes/11376-no-knead-bread" title="No-Knead Bread"&gt;recipe&lt;/a&gt;, which is from &lt;a href="http://www.sullivanstreetbakery.com/jimlahey/" title="Jim Lahey's Sullivan Street Bakery"&gt;Jim Lahey&lt;/a&gt;. Their idea is simple: use
time instead of lots of kneading.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Bread" class="webfeedsFeaturedVisual forceHalfOrFull printHalf" src="https://www.binarydolphin.com/images/bread.jpg" title="Homemade Bread -- see below for attribution"&gt;&lt;/p&gt;
&lt;p&gt;I highly recommend Bittman’s recipe (and his work in general), and Jim Lahey’s
book is marvelous. But, but, but… I don’t think the towel coverage is
necessary and I’ve adjusted the bread recipe ever so slightly. Since people
have asked me for it, and I’d like to remember the way I made it last, here we
are.&lt;/p&gt;
&lt;p&gt;The only real secret for this bread is the cooking container. You need a &lt;span class="math"&gt;\(6-8\)&lt;/span&gt;
quart dutch oven or pot with a lid. Preferably made of cast iron (with or
without enamel). If you don’t have one, they’re great and you should get
one immediately. As a Tennessee resident, might I recommend &lt;a href="http://www.lodgemfg.com/" title="Lodge"&gt;Lodge&lt;/a&gt;?
Their pots and pans are good and low-cost, and the raw cast-iron comes
pre-seasoned.  &lt;sup id="sf-bread-1-back"&gt;&lt;a href="#sf-bread-1" class="simple-footnote" title="I have no affiliation with Lodge, although I do have a couple pieces from them. I also love my Le Creuset."&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;h2&gt;Ingredients&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="math"&gt;\(3\)&lt;/span&gt; cups (&lt;span class="math"&gt;\(340\)&lt;/span&gt; grams) King Arthur Bread Flour, plus extra during prep&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(\frac{3}{8}\)&lt;/span&gt; teaspoon (&lt;span class="math"&gt;\(2-3\)&lt;/span&gt; grams) instant yeast&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(1 \frac{1}{4}\)&lt;/span&gt; teaspoons (&lt;span class="math"&gt;\(7\)&lt;/span&gt; grams) table salt (if using Kosher salt, use &lt;span class="math"&gt;\(9-10\)&lt;/span&gt; grams)&lt;/li&gt;
&lt;li&gt;&lt;span class="math"&gt;\(1 \frac{5}{8}\)&lt;/span&gt; cups (&lt;span class="math"&gt;\(385\)&lt;/span&gt; grams) of water&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Yes&lt;/em&gt;, I specify the brand and type of flour. Feel free to use whatever
flour you want. Fair warning, though – you’ll probably
want &lt;em&gt;bread flour&lt;/em&gt; and not &lt;em&gt;all-purpose flour&lt;/em&gt;. Rather than buy multiple
flours, I tend to use King Arthur Bread Flour for everything unless it’s
a special baking occasion. But that’s because I rarely bake desserts,
although I &lt;em&gt;have&lt;/em&gt; made some fantastic cookies using bread flour instead
of AP flour.&lt;/p&gt;
&lt;h2&gt;Stir and Wait&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Combine the flour, salt, yeast, and water in a bowl&lt;/li&gt;
&lt;li&gt;Stir until you have a dough. It will be “shaggy and sticky” (&lt;a href="https://cooking.nytimes.com/recipes/11376-no-knead-bread" title="No-Knead Bread"&gt;Bittman&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Cover the bowl with plastic wrap and stick the bowl somewhere at room temperature.
  The wrap doesn’t need to be air tight, and you don’t need to worry too much about
  an exact temperature.&lt;/li&gt;
&lt;li&gt;Now you wait 12 - 24 hours.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key ingredient here is time: you’re letting it do all the work for you.
You want the dough to at least double in size and be covered with bubbles, but
don’t stress too much. Give yourself somewhere between 12 and 24 hours and
you’ll be fine. Alright, fine, if you need a real target, shoot for 18.&lt;/p&gt;
&lt;h2&gt;Prep and Proof&lt;/h2&gt;
&lt;p&gt;If you’re following the Bittman recipe, now is when you would have to mess with
the dough twice and use some flour-infused towels. Well, I ain’t got time for all
that.&lt;/p&gt;
&lt;p&gt;Throw some flour on a work surface (that’s a fancy name for a counter or table),
throw some flour on top of the dough, and then cover your hands in flour. Then
get the dough out of the bowl and on to the floured work surface. You might need
to scrape the bowl, and you might need to add extra flour to your hands.
&lt;sup id="sf-bread-2-back"&gt;&lt;a href="#sf-bread-2" class="simple-footnote" title="All that flour keeps the dough from sticking. Bonus points for using less flour, but use what you need to be able to work with the dough easily."&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Work the dough (push, pull, smack, roll, whatever) and try and roll it into a
ball-ish shape. It might be a little difficult, but we’re not trying to make a
perfect &lt;a href="https://en.wikipedia.org/wiki/Sphere" title="Sphere"&gt;sphere&lt;/a&gt;.  The easiest way is kind of mush it down with your
hands until you’ve got a round shape, fold the sides in, and then roll it
around until it’s more like a ball. This should only take a few minutes (5
tops).&lt;/p&gt;
&lt;p&gt;Throw some more flour in the bottom of the bowl, drop the dough on top of that,
and loosely cover the bowl (you can reuse your plastic wrap from before).&lt;/p&gt;
&lt;p&gt;In theory, you want to wait about 2 hours before putting the dough in the over,
but if you’re in a hurry, you should be able to get by with an hour. I recommend
waiting the whole 2 hours, but I’ll note that if you’re only going to wait an
hour you can go ahead and start the pre-heating now (that’s in the next
section).&lt;/p&gt;
&lt;h2&gt;Bake&lt;/h2&gt;
&lt;p&gt;About an hour before you’re going to bake the bread, put your covered pot in
your oven and set it to 450F. We want to preheat &lt;em&gt;both&lt;/em&gt; the oven and the pot.
You need to preheat for at least 45 minutes, but you can preheat longer if you
wish.&lt;/p&gt;
&lt;p&gt;When everything is ready to go, carefully take the pot out of the oven.
(Seriously, be careful. I’ve burned myself multiple times at this point.) Take
your dough and drop it into the pot, and then shake the pot a little to try and
center the dough. Don’t try too hard. The dough is not going to be
picture-perfect at this point. In fact, it might look downright scary. That’s
OK.&lt;/p&gt;
&lt;p&gt;Put the lid on the pot, put the whole thing in the oven, and wait 30 minutes.&lt;/p&gt;
&lt;p&gt;After 30 minutes, remove the lid and bake another 15-30 minutes until the bread
is golden brown.&lt;/p&gt;
&lt;p&gt;Take the bread out of the pot and put it on a rack to cool. If you’re worried
that the bread isn’t finished, thump the top and the bottom. It should sound
hollow.&lt;/p&gt;
&lt;p&gt;The bread needs at least 15 minutes to cool. But if your self-control fails and
you dive in before that, no one will blame you.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jim Lahey’s Sullivan Street Bakery: &lt;a href="http://www.sullivanstreetbakery.com/jimlahey/"&gt;http://www.sullivanstreetbakery.com/jimlahey/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Lodge: &lt;a href="http://www.lodgemfg.com/"&gt;http://www.lodgemfg.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;No-Knead Bread: &lt;a href="https://cooking.nytimes.com/recipes/11376-no-knead-bread"&gt;https://cooking.nytimes.com/recipes/11376-no-knead-bread&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sphere: &lt;a href="https://en.wikipedia.org/wiki/Sphere"&gt;https://en.wikipedia.org/wiki/Sphere&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-bread-3-back"&gt;&lt;a href="#sf-bread-3" class="simple-footnote" title='"Homemade Bread" image courtesy Valeria Donovan'&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
    var align = "center",
        indent = "0em",
        linebreak = "false";

    if (false) {
        align = (screen.width &lt; 768) ? "left" : align;
        indent = (screen.width &lt; 768) ? "0em" : indent;
        linebreak = (screen.width &lt; 768) ? 'true' : linebreak;
    }

    var mathjaxscript = document.createElement('script');
    mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
    mathjaxscript.type = 'text/javascript';
    mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';

    var configscript = document.createElement('script');
    configscript.type = 'text/x-mathjax-config';
    configscript[(window.opera ? "innerHTML" : "text")] =
        "MathJax.Hub.Config({" +
        "    config: ['MMLorHTML.js']," +
        "    TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'none' } }," +
        "    jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
        "    extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
        "    displayAlign: '"+ align +"'," +
        "    displayIndent: '"+ indent +"'," +
        "    showMathMenu: true," +
        "    messageStyle: 'normal'," +
        "    tex2jax: { " +
        "        inlineMath: [ ['\\\\(','\\\\)'] ], " +
        "        displayMath: [ ['$$','$$'] ]," +
        "        processEscapes: true," +
        "        preview: 'TeX'," +
        "    }, " +
        "    'HTML-CSS': { " +
        "        availableFonts: ['STIX', 'TeX']," +
        "        preferredFont: 'STIX'," +
        "        styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
        "        linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
        "    }, " +
        "}); " +
        "if ('default' !== 'default') {" +
            "MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
                "var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
                "VARIANT['normal'].fonts.unshift('MathJax_default');" +
                "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
                "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
                "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
            "});" +
            "MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
                "var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
                "VARIANT['normal'].fonts.unshift('MathJax_default');" +
                "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
                "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
                "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
            "});" +
        "}";

    (document.body || document.getElementsByTagName('head')[0]).appendChild(configscript);
    (document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}
&lt;/script&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-bread-1"&gt;I have no affiliation with Lodge, although I do have a
couple pieces from them. I also love my Le Creuset. &lt;a href="#sf-bread-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-bread-2"&gt;All that flour keeps the dough from sticking. Bonus points for using less
flour, but use what you need to be able to work with the dough easily. &lt;a href="#sf-bread-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-bread-3"&gt;"Homemade Bread" image courtesy Valeria Donovan &lt;a href="#sf-bread-3-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Recipes"/><category term="everyone"/><category term="recipes"/></entry><entry><title>Quasi-Minestrone</title><link href="https://www.binarydolphin.com/minestrone.html" rel="alternate"/><published>2018-01-08T14:00:00-06:00</published><updated>2018-01-08T14:00:00-06:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2018-01-08:/minestrone.html</id><summary type="html">&lt;p&gt;A hearty turkey and vegetable Soup inspired by Kenji&amp;rsquo;s minestrone&lt;/p&gt;</summary><content type="html">&lt;p&gt;This recipe is based almost entirely on the great &lt;a href="http://www.seriouseats.com/editors/j-kenji-lopez-alt" title="J. Kenji López-Alt, Chief Culinary Consultant"&gt;Kenji’s&lt;/a&gt;
&lt;a href="http://www.seriouseats.com/" title="Serious Eats: the Destination for Delicious"&gt;SeriousEats&lt;/a&gt; &lt;a href="http://www.seriouseats.com/recipes/2016/09/the-best-minestrone-soup-recipe.html" title="The Best Minestrone Soup Recipe"&gt;Minestrone recipe&lt;/a&gt;. I made a few alterations
to speed up and simplify the process. One way I did this was to use Kenji’s
&lt;a href="http://www.seriouseats.com/2013/02/the-vegan-experience-how-to-make-great-vegan-soups.html" title="Hearty Vegetable Stock (Vegan) Recipe"&gt;Veggie Stock&lt;/a&gt; recipe&lt;sup id="sf-minestrone-1-back"&gt;&lt;a href="#sf-minestrone-1" class="simple-footnote" title="it’s the only stock I make at home. But be warned, it includes kombu and dried mushrooms which can get pricey."&gt;1&lt;/a&gt;&lt;/sup&gt;.
Another was to remove the bacon/pancetta at the start, but add ground turkey
and liquid smoke.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Minestrone" class="webfeedsFeaturedVisual forceHalfOrFull printHalf" src="https://www.binarydolphin.com/images/minestrone.jpg" title="Chopped Minestrone Vegetables -- see below for attribution"&gt;&lt;/p&gt;
&lt;p&gt;If you don’t feel like making your own stock, you can always use store bought.
You’ll need to deal with the usual issue of too much salt, but you’ll also save
a lot of time. The other (far better) option is use Kenji’s technique of
creating a stock while cooking dried beans. You won’t get the ease of canned
beans, but you can’t have everything.&lt;/p&gt;
&lt;p&gt;I’ll repeat Kenji’s Minestrone motto here: “This recipe is more of a blueprint for
soup than a set of rules”.  You should feel free to add and remove ingredients
at will. For instance, I use cannellini beans and fresh orechiette pasta.
That’s because I love both, and I can get fresh orechiette at a nearby store.
Use black beans, drop the pasta entirely, add some farro. Go wild!&lt;/p&gt;
&lt;p&gt;Some might quibble with my use of liquid smoke. The me of yesteryear certainly
did. This was mainly because I thought of liquid smoke as some kind of bizarre
manufactured ingredient, probably a combination of petroleum and the scent
gland of some poor, obscure mammal. &lt;a href="http://www.seriouseats.com/2013/11/pantry-essentials-liquid-smoke.html" title="Pantry Essentials: All About Liquid Smoke"&gt;But no!&lt;/a&gt; Liquid smoke is exactly
that: wood smoke captured in a bottle. Now I frequently use it in recipes where
I might have used bacon or &lt;a href="https://en.wikipedia.org/wiki/Fatback" title="Fatback"&gt;fatback&lt;/a&gt;. For instance, when I make black
eyed peas, I toss in salt, olive oil, and liquid smoke instead of a big hunk of
fatty, salty, smoked pork. Or if I feel like splurging I go ahead and use the
pork :)&lt;/p&gt;
&lt;h2&gt;Ingredients&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Salt&lt;/li&gt;
&lt;li&gt;Pepper&lt;/li&gt;
&lt;li&gt;Olive Oil&lt;/li&gt;
&lt;li&gt;1 onion, diced&lt;/li&gt;
&lt;li&gt;1 carrot, diced&lt;/li&gt;
&lt;li&gt;1 bell pepper diced (or use a poblano if you can find one!)&lt;/li&gt;
&lt;li&gt;2-3 celery stalks&lt;/li&gt;
&lt;li&gt;1 leek, only the white part, diced (but save the greens for the stock recipe!)&lt;/li&gt;
&lt;li&gt;Pound of diced turkey (grab one package at the store - no need to measure)&lt;/li&gt;
&lt;li&gt;Liquid smoke&lt;/li&gt;
&lt;li&gt;5-6 cloves of garlic (or use all the cloves you can get from a head of garlic if you like garlic as much as I do)&lt;/li&gt;
&lt;li&gt;Can of diced tomatoes&lt;/li&gt;
&lt;li&gt;8 cups of vegetable stock (see above) - if you have less than 8 cups, you can supplement with water&lt;/li&gt;
&lt;li&gt;2-3 Yukon gold potatoes (3 if small, 2 if bigger), cut into pieces (½ inch - 1 inch, your call)&lt;/li&gt;
&lt;li&gt;3-6 sprigs of fresh green herbs like parsley, rosemary, thyme, etc (optional)&lt;/li&gt;
&lt;li&gt;1 bay leaf (optional)&lt;/li&gt;
&lt;li&gt;Parmesan rind (optional)&lt;/li&gt;
&lt;li&gt;Can of cannellini beans, drained&lt;/li&gt;
&lt;li&gt;1 package frozen green beans, ends trimmed and cut into 1 inch pieces&lt;/li&gt;
&lt;li&gt;1 cup small pasta&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Over medium heat in a Dutch over, stockpot, or whatever big round cooking
  vessel you have, heat some olive oil and then cook the onion, carrot, celery,
  bell pepper, and leek with some salt until all the vegetables are heated
  through (about five minutes). If the pot dries out or the vegetables start
  to stick add a little more olive oil.&lt;/li&gt;
&lt;li&gt;Add the ground turkey, a little more salt, and some pepper. Continue cooking
  until the turkey is cooked and the vegetables are completely soft. You’re not
  trying to brown anything. This will probably be around 10 minutes.&lt;/li&gt;
&lt;li&gt;Add the garlic, and stir until heated - around 30 seconds.&lt;/li&gt;
&lt;li&gt;Add the tomatoes, stir, and continue to cook until most of their liquid has
  been cooked off. To quote Kenji: “The sound should change from a sputtering
  simmering sound to a sharper crackle as vegetables start to fry”&lt;/li&gt;
&lt;li&gt;Add the stock, herbs, bay leaf, Parmesan rind, drained beans, and potatoes. Simmer
  for 10 minutes.&lt;/li&gt;
&lt;li&gt;Add the green beans and simmer for another 10 minutes.&lt;/li&gt;
&lt;li&gt;At this point, all you need to do is finish the soup. &lt;strong&gt;&lt;em&gt;OR&lt;/em&gt;&lt;/strong&gt; you could simmer
  the another 2-3 hours if you want a heartier soup. When you’re ready, add the
  pasta and simmer until done (5 minutes for fresh, small pasta or as long as
  15 minutes for large dried macaroni).&lt;/li&gt;
&lt;li&gt;Remove the bay leaf, herb sprigs, and Parmesan rind (if you used any of those).&lt;/li&gt;
&lt;li&gt;Sserve! You can put some fresh diced herbs on top if you like.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fatback: &lt;a href="https://en.wikipedia.org/wiki/Fatback"&gt;https://en.wikipedia.org/wiki/Fatback&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hearty Vegetable Stock (Vegan) Recipe: &lt;a href="http://www.seriouseats.com/2013/02/the-vegan-experience-how-to-make-great-vegan-soups.html"&gt;http://www.seriouseats.com/2013/02/the-vegan-experience-how-to-make-great-vegan-soups.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;J. Kenji López-Alt, Chief Culinary Consultant: &lt;a href="http://www.seriouseats.com/editors/j-kenji-lopez-alt"&gt;http://www.seriouseats.com/editors/j-kenji-lopez-alt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Pantry Essentials: All About Liquid Smoke: &lt;a href="http://www.seriouseats.com/2013/11/pantry-essentials-liquid-smoke.html"&gt;http://www.seriouseats.com/2013/11/pantry-essentials-liquid-smoke.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Serious Eats: the Destination for Delicious: &lt;a href="http://www.seriouseats.com/"&gt;http://www.seriouseats.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Best Minestrone Soup Recipe: &lt;a href="http://www.seriouseats.com/recipes/2016/09/the-best-minestrone-soup-recipe.html"&gt;http://www.seriouseats.com/recipes/2016/09/the-best-minestrone-soup-recipe.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-minestrone-2-back"&gt;&lt;a href="#sf-minestrone-2" class="simple-footnote" title='"Chopped Minestrone Vegetables" image from kaktuslampan and is an unmodified work distributed under the Creative Commons Attribution-Share Alike 2.0 Generic license.'&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-minestrone-1"&gt;it’s the only stock I make at home. But be
warned, it includes kombu and dried mushrooms which can get pricey. &lt;a href="#sf-minestrone-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-minestrone-2"&gt;"Chopped Minestrone Vegetables" image from &lt;a href="https://www.flickr.com/photos/kaktuslampa/4153642440"&gt;kaktuslampan&lt;/a&gt; and is an unmodified work distributed under the Creative Commons Attribution-Share Alike 2.0 Generic license. &lt;a href="#sf-minestrone-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Recipes"/><category term="everyone"/><category term="recipes"/></entry><entry><title>AUC, ROC, and Classifying Stuff</title><link href="https://www.binarydolphin.com/auc-roc.html" rel="alternate"/><published>2017-06-15T15:00:00-05:00</published><updated>2016-07-01T12:23:00-05:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2017-06-15:/auc-roc.html</id><summary type="html">&lt;p&gt;A Gentle Introduction to AUC Scoring&lt;/p&gt;</summary><content type="html">&lt;p&gt;So let’s get real about classifying things for a second. When you decide to
create some kind of machine learning model (even something as simple as
logistic regression or a decision tree), you need some kind of metric to
decide if your shiny new classifier is, well, classifying stuff. There’s
plenty to consider, especially data issues like imbalanced classes. If you
start googling around, you will often find advice about using an “AUC Score”,
“AUC”, “ROC”, or some strange combination, especially if your classes are
unbalanced.&lt;/p&gt;
&lt;p&gt;So you look google those terms, look at your favorite machine learning and
data science web sites, do a little digging, and… (If you’re like me) You
end up more confused. I admit, while most metrics make intuitive sense, I
always found the whole AUC/ROC thing confusing. I think I went back to the
standard descriptions and text tons of times over a couple of years before it
started to sink in.&lt;/p&gt;
&lt;p&gt;Go ahead and read the
&lt;a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic" title="Receiver Operating Characteristic on Wikipedia"&gt;Wikipedia article on the Receiver Operating Characteristic&lt;/a&gt;. I’ll wait.
Good, all done? Totally clear? Actually, the last time I checked it was a
pretty good article &lt;em&gt;if&lt;/em&gt; you already knew what it was talking about and needed
a quick brush up on the topic. But if you’re still reading, you’re probably
trying to figure out what in the world it means.&lt;/p&gt;
&lt;p&gt;Let’s start with some terms we’ll use below. Let’s assume that you’ve got some
stuff (or rather, data about some stuff) that you want to classify. For each
instance in your data set, you want to apply one of two labels: GOOD and BAD.
These aren’t random labels; you’ll see paired terms like positive/negative in
the literature. It’s handy to think in terms that you’ll see in the literature,
where disease detection and similar tasks are discussed in terms of good/bad.
But remember that these label are no more than useful abstractions. If you’re
attempting to differentiate between Star Wars and Star Trek, you aren’t
building anything that can claim one is inherently better than the other
(although we all know that ONE of those is better, amirite?).&lt;/p&gt;
&lt;p&gt;An instance with the label GOOD is a “positive” instance. If your classifier
correctly labels it GOOD, that’s a True Positive. If you label it BAD, that’s a
false negative. Like traditional 2x2 confusion matrix you’ll see everyone write
out at some point (there’s even an example at the &lt;a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic" title="Receiver Operating Characteristic on Wikipedia"&gt;Wikipedia ROC page&lt;/a&gt;).
Quick pro tip: terminology for that 2x2 matrix changes across field – so if you
see someone refer to Sensitivity and someone else use Recall, don’t freak out.
Personally, I always re-google the terms since I can’t keep them all straight
😉&lt;/p&gt;
&lt;p&gt;So let’s look at the helpful image we’ve got here.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ROC Space" class="webfeedsFeaturedVisual makeBlock forceFull printHalf" src="https://upload.wikimedia.org/wikipedia/commons/3/36/ROC_space-2.png" title="ROC Space -- see below for attribution"&gt;&lt;/p&gt;
&lt;p&gt;Looking at the axes on our great big graph:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The X axis is the “false positive rate” (FPR) - the number of false
  positives (you labeled the GOOD but they’re actually BAD) divided by the
  number of actual BAD instances&lt;/li&gt;
&lt;li&gt;the Y axis is the “true positive rate” (TPR) - the number of true
  positives (labeled GOOD and actually GOOD) divided by the number of actual
  GOOD instances&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The intuition here is that these are conflicting measurements: the more you
make your model work to detect GOOD instances (higher true positive rate), the
more false positives you end up catching in your net (the false positive rate).
The legal axiom “innocent until proven guilty” is a great example of a policy
designed to drive down the false positive rate (where positive means a guilty
verdict in a court of law).  As pointed out ad nauseum by seemingly thousands
of American legal dramas, this also leads to a lower true positive rate (guilty
people going free). The other end of the spectrum is the &lt;del&gt;scumbag&lt;/del&gt;
&lt;del&gt;evil&lt;/del&gt; spam purveyor. A spammer classifies every potential email
address as a positive, where positive means a human who read and respond to the
email by purchasing something. If you’re spamming a bazillion people, a true
positive rate of even 0.001% results in financial gain. &lt;sup id="sf-auc-roc-1-back"&gt;&lt;a href="#sf-auc-roc-1" class="simple-footnote" title="God, I hate spammers."&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Let’s take some easy example models and some concrete numbers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jerk Pessimist Model – If your model always guesses BAD, then
  you have no positives. Your TPR and FPR are both 0 and your model is a point
  at (0,0) on the graph&lt;/li&gt;
&lt;li&gt;Silly Optimist Model – If your model always guesses “GOOD”, then
  everything is a positive. In this case your model is a point at (1,1) at the
  top right&lt;/li&gt;
&lt;li&gt;Coin Flipper – If you model randomly flips a coin to decide, both
  rates will be 0.5 (50-50) and therefore smack in the middle of the graph.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So let’s get the guessing out of the way: if you change the probability of
guessing from a coin, that will move your model up or down that diagonal red
line in the graph. &lt;em&gt;We want to be above that line&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The next thing to realize is that we don’t want to find a single point for your
model. We want to see all the points your model can occupy. Luckily, most
classification models don’t give a thumbs up or thumbs down: they usually
give a score from 0.0 – 1.0 where 0.5 is “shrug”, 0.0 is 100% BAD, and 1.0 is
100% sure that it’s GOOD. Models meant for multi-label classification might
give a single 0-1 score for every possible label, but in our simple binary
instance the score for BAD would be 1-GOOD.&lt;/p&gt;
&lt;blockquote&gt;
the more you make your model work to detect GOOD instances (higher true
positive rate), the more false positives you end up catching in your net (the
false positive rate)
&lt;/blockquote&gt;

&lt;p&gt;That setup gives us a final dial to turn. Once we have a model spitting out
GOOD scores, we can choose what threshold we want to use to actually predict a
label. As our threshold goes up, we drive down the false positive rate, but
we’ll also miss some true positives. If we move the threshold down, our true
positive rate will go up but we’ll inevitably get false positives. Depending
on what you’re trying to do (and the cost of a false positive), you will choose
different settings for that dial. Who cares about false positives for a
coupon-mailing algorithm? But if your death robot is about to open fire on an
intruder, you better be sure.&lt;/p&gt;
&lt;p&gt;&lt;img alt="robot" class="rightPic printHalf" src="https://www.binarydolphin.com/images/robot.jpg" title="Robot -- see below for attribution"&gt;&lt;/p&gt;
&lt;p&gt;Regardless, all those possible points form a curve. AUC is Area Under that
Curve. It’s a straight Calc I (or is it Calc II?) integral, although it’s
estimated empirically.&lt;/p&gt;
&lt;p&gt;Back to our examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Our coin flipper models have an AUC of 0.50&lt;/li&gt;
&lt;li&gt;If you had a magically perfect algorithm that was always right, it’s AUC would be 1.0&lt;/li&gt;
&lt;li&gt;Lots of medical people want an AUC of 0.99 or better for some applications&lt;/li&gt;
&lt;li&gt;For a lot of applications, an AUC of 0.75 or better would have people dancing in the streets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It all depends on what you’re trying to do.&lt;/p&gt;
&lt;blockquote&gt;
Who cares about false positives for a coupon-mailing algorithm? But if your
death robot is about to open fire on an intruder, you better be sure.
&lt;/blockquote&gt;

&lt;p&gt;There are some nice advantages to AUC. Namely:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;People want to report accuracy, but they frequently mean TPR. Sometimes
   that’s fine, but it’s seldom the whole picture&lt;/li&gt;
&lt;li&gt;Lots of training and scoring algorithms assume that the classes are balanced
   (in our case that means that we would have about 50% GOOD and 50% BAD in
   both our training and testing sets). AUC doesn’t have this requirement,
   which makes it an especially nice metric for unbalanced data sets (like most
   medical detection applications)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So let’s day you don’t have much domain knowledge about that data you’ve been
handed. It’s a bunch of flibberty-gibbit data, and you’re supposed to build a
model to discriminate between the wo-wo and ya-ya classes. You build a model
and get an AUC score of 0.73. What does than even mean? Keep in mind that often
the best way to look at AUC is as a relative score. If there’s an existing
model (or this is a &lt;a href="https://www.kaggle.com" title="Kaggle"&gt;Kaggle&lt;/a&gt; contest), the real question is where your
0.73 lands with other models/competitors.  It’s a good way to compare model
performance for classification. This might also be a good time to create some
“baseline” models to see how your hard work compares with the simplest
(silliest) models possible. When there’s a binary classification task like our
fictional flibberty-gibbit dataset, a good starting set of baselines would be:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;“Constant” model that always outputs “wo-wo”&lt;/li&gt;
&lt;li&gt;“Constant” model that always outputs “ya-ya”&lt;/li&gt;
&lt;li&gt;“Random” model that always classifies based on a coin toss (where the
   probability is based on the frequency of each class).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If your model’s AUC score is right in there with these baselines, then your
model, your data, or your evaluation criteria is broken. In case you’re
wondering, it’s no coincidence that these were the “easy example models” above.
As silly as these models might seem, they can give you a good idea of the bare
minimum that any model should accomplish.&lt;/p&gt;
&lt;p&gt;Pretty easy right? The number we’ve been calling “AUC” is also known as the
“AUC Score”. So now you’re probably wondering “what’s with all this ROC
business?”&lt;/p&gt;
&lt;p&gt;Well, our AUC score is the area under a curve. That curve is named… wait for
it… the “Receiver Operating Characteristic Curve”, aka ROC or ROC Curve.&lt;/p&gt;
&lt;p&gt;Go forth and classify!&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used in this article (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kaggle: &lt;a href="https://www.kaggle.com"&gt;https://www.kaggle.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Receiver Operating Characteristic on Wikipedia: &lt;a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic"&gt;https://en.wikipedia.org/wiki/Receiver_operating_characteristic&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-auc-roc-2-back"&gt;&lt;a href="#sf-auc-roc-2" class="simple-footnote" title='"ROC Space" image from Wikipedia and is a modified work distributed under the Creative Commons Attribution-Share Alike 3.0 Unported license.'&gt;2&lt;/a&gt;&lt;/sup&gt;
    &lt;sup id="sf-auc-roc-3-back"&gt;&lt;a href="#sf-auc-roc-3" class="simple-footnote" title='"Robot" image from Unsplash courtesy of Siyan Ren'&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-auc-roc-1"&gt;God, I hate
spammers. &lt;a href="#sf-auc-roc-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-auc-roc-2"&gt;"ROC Space" image from &lt;a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic#/media/File:ROC_space-2.png"&gt;Wikipedia&lt;/a&gt; and is a modified work distributed under the Creative Commons Attribution-Share Alike 3.0 Unported license. &lt;a href="#sf-auc-roc-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-auc-roc-3"&gt;"Robot" image from &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt; courtesy of &lt;a href="https://unsplash.com/photos/qLiFcanSpuA?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Siyan Ren&lt;/a&gt; &lt;a href="#sf-auc-roc-3-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Data Science"/><category term="classification"/><category term="learning"/></entry><entry><title>Yes, Machines Can Learn</title><link href="https://www.binarydolphin.com/what-is-ml.html" rel="alternate"/><published>2016-12-15T18:35:00-06:00</published><updated>2016-12-15T18:35:00-06:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2016-12-15:/what-is-ml.html</id><summary type="html">&lt;p&gt;Machine Learning is cool and so can you&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you’ve been reading the news, you’ve almost certainly seen something that
involved &lt;a href="https://en.wikipedia.org/wiki/Machine_learning" title="Machine Learning"&gt;Machine Learning&lt;/a&gt;. You might not have recognized the phrase, but
it was there. Trust me. In fact, you’re already affected by Machine Learning
whether you realize it or not. When you hear about automated decision making
algorithms, they are often Machine Learning. Self-driving cars? Siri, Cortana,
Google Assistant? Yep - all powered somewhere, somehow by Machine Learning.&lt;/p&gt;
&lt;p&gt;&lt;img alt="XKCD Tasks" class="webfeedsFeaturedVisual makeBlock forceFull printHalf" src="https://imgs.xkcd.com/comics/tasks.png"&gt;&lt;/p&gt;
&lt;p&gt;At it’s core, ML (Machine Learning) is pretty simple. It’s mainly about
algorithms that learn from the data we have and then make predictions about
data we haven’t seen yet. There’s theory:  what can we say with mathematical
certainty about what our algorithms can do, how much data do we need, how
right or wrong will we be? There’s also practice: predicted earthquakes,
create computers to beat humans at board games, and driving cars.&lt;/p&gt;
&lt;p&gt;You might have heard of AI (Artificial Intelligence): the field dedicated to
making computers do smart things (or act as silly as humans if you’re talking
about Artificial General Intelligence). ML is a subset of AI. One way to think
about them is that AI covers all manner of intelligence, while ML is about
training programs that are almost as smart as a dog. Of course, it’s not always
that easy: some ML programs are better than the humans they compete against,
and some are dumber than bumblebees.&lt;/p&gt;
&lt;p&gt;However, you don’t need a robot as smart as you to get lots of interesting
work done. Imagine if your web browser was smart enough to hide the horrible
comments you might see on a blog with a “High Jerk Probability” warning. You
could override the warning and read the comment, but by and large you wouldn’t
and large chunks of your soul would be spared the searing fire of Internet
commenters’ rage.&lt;/p&gt;
&lt;p&gt;In fact, the future of ML might be creating smart devices and programs that we
learn to use. Humans are pretty adaptable and it’s no stretch to imagine that
we would learn to work around the deficiencies of intelligent helpers. We
already work with plenty of robots that manage parts of our lives for us: dish
washers, clothes washers, heating and air conditioning, the cruise control on
your car, and on and on. The oldest and cheapest of these has at least
some “intelligence” baked in, even if it’s a timer that shuts the appliance
off.&lt;/p&gt;
&lt;blockquote&gt;
ML is about training programs that are almost as smart as a dog
&lt;/blockquote&gt;

&lt;p&gt;One example is algorithmic diagnosis. A fancy AI robot doctor could talk to
you about your symptoms and then give you your diagnosis. Unfortunately, it’s
hard to get humans to list all their relevant symptoms, so we need a human for
that. It also turns out that the intuition and diagnostic skills of
experienced doctors is pretty hard to match. Pattern matching and learning
over time is something we humans excel at.&lt;/p&gt;
&lt;p&gt;What’s left for our poor AI robot? Well, not much - but there’s plenty for a
humble ML diagnosing program. Doctors could take the patient history and
record all the relevant symptoms. Experienced physicians could use the ML
diagnosis to double check their own. If the ML diagnosis turns out to be
wrong, that missed diagnosis helps the program make a better prediction next
time.&lt;/p&gt;
&lt;p&gt;Which is great, but it kind of sounds like we’re getting doctors to train
ML devices for no reason, doesn’t it? However, you need to remember where
experienced, trained physicians come from. We hatch them from novice medical
students. While a doctor with twenty years of experience might not use ML
diagnostics much, we can imagine a teaching hospital that requires medical
students to record what an ML program told them - and why they decided to
ignore it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="robot doctor" class="rightPic printHalf" src="https://www.binarydolphin.com/images/robot-doctor.jpg"&gt;&lt;/p&gt;
&lt;p&gt;But wait, there’s more. Doctors frequently consult specialists. Medicine is
difficult and ever-changing, so specialty consultations are often necessary to
get someone with the right experience in front of the patient. It wouldn’t be
as good, but what if your family physician could run your symptoms through the
complete battery of ML specialty programs? Your swollen left ear and orange
eyes might be curable after all!&lt;/p&gt;
&lt;p&gt;Recently at the 2016 International Symposium of Biomedical Imaging in Prague,
there was a cancer detection contest. The best ML-based diagnostic program
(based on something called Deep Learning) did pretty darn well. However, the
top human team in the competition did even better. At first blush, it looks
like humans win again. Except that when humans worked together with the ML
program, their combined accuracy was 85 percent better than the humans alone.
This may well be the future of diagnostic medicine: ML technology assisting
and augmenting highly trained physicians. You can read all about the details
in the paper published &lt;a href="http://arxiv.org/abs/1606.05718" title="Detecting Cancer Paper"&gt;here&lt;/a&gt;. If you don’t want to read the
paper, there was also a Yahoo &lt;a href="https://www.yahoo.com/news/ai-boosts-cancer-screens-nearly-100-percent-accuracy-161645260.html" title="Detecting Cancer News Story"&gt;news article&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Which brings us to an important point. Like a lot of technology and science,
that cancer news story at Yahoo uses some numbers (“92 percent accuracy” and so
on) that are &lt;strong&gt;&lt;em&gt;not true&lt;/em&gt;&lt;/strong&gt;. The results were not judged with accuracy (“what
percentage of my guess were correct”). They were judged with “AUC” or “Area
Under the Curve”, or more accurately “Area of Under the Receiver Operating
Characteristic Curve Score”. So what in the world is AUC? Let’s not get in to
that right now - we’ll say that it’s a score that looks like accuracy, but it
takes into account both how right you are (the “true positive rate”) &lt;em&gt;and&lt;/em&gt; how
wrong you are (the “false positive rate”). &lt;sup id="sf-what-is-ml-1-back"&gt;&lt;a href="#sf-what-is-ml-1" class="simple-footnote" title="See our article for more details on AUC"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Why does accuracy versus AUC matter? Well, it matters a lot if you’re working
in Machine Learning. But if you’re an interested layperson reading about
a cancer detection contest, should you care? Yes, you should. Math, science,
computers, and, yes, machine learning is becoming more and more important to
society. Demand accuracy from journalists when it comes to science. Especially
when it comes to science!&lt;/p&gt;
&lt;p&gt;Stepping off the soapbox now.&lt;/p&gt;
&lt;p&gt;But before we conclude, there’s one term above that gets a &lt;strong&gt;&lt;em&gt;LOT&lt;/em&gt;&lt;/strong&gt; of press
that you should probably know. &lt;a href="https://en.wikipedia.org/wiki/Deep_learning" title="Deep Learning"&gt;Deep learning&lt;/a&gt; is all the rage now.
You can a good introduction over at &lt;a href="http://deeplearning.net/" title="DeepLearning.net"&gt;DeepLearning.net&lt;/a&gt; if you’re
interested in the technical nitty gritty. When we’re talking about machine
learning or AI or algorithmic decision making, “deep learning” does &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt;
refer to any theory from educational psychology or some kind of inherently
better learning. The “deep” in Deep Learning refers to &lt;a href="https://en.wikipedia.org/wiki/Artificial_neural_network" title="Artificial Neural Networks"&gt;artificial neural
networks&lt;/a&gt;. The idea behind neural nets were developed as early as the
&lt;a href="https://en.wikipedia.org/wiki/Donald_O._Hebb" title="Donald Hebb"&gt;1940s&lt;/a&gt;, fell out of favor in the late &lt;a href="https://en.wikipedia.org/wiki/Perceptrons_(book)" title="Perceptrons"&gt;1960s&lt;/a&gt;, and briefly
came back into vogue in the &lt;a href="https://en.wikipedia.org/wiki/Backpropagation" title="Backpropagation"&gt;1980s&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
Demand accuracy from journalists when it comes to science. Especially when it comes to science!
&lt;/blockquote&gt;

&lt;p&gt;After the 1980s, a few researchers continued work on neural networks. They made
a few improvements and breakthroughs. Eventually they made enough progress, and
computers got fast enough. The result was a slew of victories for neural
networks. There are different architectures used by different researchers for
different problems, but they generally share one trait: lots of layers. The
“advanced” neural nets of the 80s usually had 3 layers, sometimes 2 layers, and
occasionally 4 layers if you had fancy computers and lots of time on your
hands. Today’s “deep” networks might have a dozen layers doing different
things. Using “deep neural networks” to do machine learning became known as
“deep learning”.&lt;/p&gt;
&lt;p&gt;If you’ve heard about Alpha Go, that uses deep learning. Facebook, Google,
Microsoft, Baidu, and lots of other high tech companies are using deep learning
for all kinds of things, including image recognition, language translation, and
voice recognition. The current crop of self-driving cars all use some form of
deep learning.&lt;/p&gt;
&lt;p&gt;Which brings us to the end of our little introduction to Machine Learning.
There’s plenty to cover in the future. If you’ve heard terms like regression,
clustering, supervised learning, and unsupervised learning, those are all under
the machine learning umbrella. Stay tuned for more!&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used in this article (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Artificial Neural Networks: &lt;a href="https://en.wikipedia.org/wiki/Artificial_neural_network"&gt;https://en.wikipedia.org/wiki/Artificial_neural_network&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Backpropagation: &lt;a href="https://en.wikipedia.org/wiki/Backpropagation"&gt;https://en.wikipedia.org/wiki/Backpropagation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deep Learning: &lt;a href="https://en.wikipedia.org/wiki/Deep_learning"&gt;https://en.wikipedia.org/wiki/Deep_learning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;DeepLearning.net: &lt;a href="http://deeplearning.net/"&gt;http://deeplearning.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Detecting Cancer News Story: &lt;a href="https://www.yahoo.com/news/ai-boosts-cancer-screens-nearly-100-percent-accuracy-161645260.html"&gt;https://www.yahoo.com/news/ai-boosts-cancer-screens-nearly-100-percent-accuracy-161645260.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Detecting Cancer Paper: &lt;a href="http://arxiv.org/abs/1606.05718"&gt;http://arxiv.org/abs/1606.05718&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Donald Hebb: &lt;a href="https://en.wikipedia.org/wiki/Donald_O._Hebb"&gt;https://en.wikipedia.org/wiki/Donald_O._Hebb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Machine Learning: &lt;a href="https://en.wikipedia.org/wiki/Machine_learning"&gt;https://en.wikipedia.org/wiki/Machine_learning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Perceptrons: &lt;a href="https://en.wikipedia.org/wiki/Perceptrons_(book)"&gt;https://en.wikipedia.org/wiki/Perceptrons_(book)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-what-is-ml-2-back"&gt;&lt;a href="#sf-what-is-ml-2" class="simple-footnote" title='"Robot Doctor" image from PublicDomainPictures.net and has been dedicated to the public domain.'&gt;2&lt;/a&gt;&lt;/sup&gt;
    &lt;sup id="sf-what-is-ml-3-back"&gt;&lt;a href="#sf-what-is-ml-3" class="simple-footnote" title='"Tasks" image from XKCD under a Creative Commons Attribution-NonCommercial 2.5 License.'&gt;3&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-what-is-ml-1"&gt;See our
&lt;a href="https://www.binarydolphin.com/auc-roc.html"&gt;article&lt;/a&gt; for more details on AUC &lt;a href="#sf-what-is-ml-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-ml-2"&gt;"Robot Doctor" image from &lt;a href="http://www.publicdomainpictures.net/"&gt;PublicDomainPictures.net&lt;/a&gt; and has been dedicated to the public domain. &lt;a href="#sf-what-is-ml-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-ml-3"&gt;"Tasks" image from &lt;a href="http://www.xkcd.com"&gt;XKCD&lt;/a&gt; under a Creative Commons Attribution-NonCommercial 2.5 License. &lt;a href="#sf-what-is-ml-3-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Computer Science"/><category term="everyone"/><category term="learning"/><category term="science"/></entry><entry><title>This Has Nothing To Do With Computers</title><link href="https://www.binarydolphin.com/friends.html" rel="alternate"/><published>2016-06-30T15:28:00-05:00</published><updated>2016-06-30T15:28:00-05:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2016-06-30:/friends.html</id><summary type="html">&lt;p&gt;An old dog, a young cat, and a video&lt;/p&gt;</summary><content type="html">&lt;p&gt;This post has absolutely nothing to do with Computer Science or Software
Engineering or Machine Learning. I just wanted to post a video of my old dog
and my young cat. It&amp;rsquo;s my blog, and I&amp;rsquo;ll do what I want.&lt;/p&gt;
&lt;video controls class="webfeedsFeaturedVisual"&gt;
    &lt;source src="https://bart.binarydolphin.com/friends.webm" type="video/webm"&gt;
    &lt;source src="https://bart.binarydolphin.com/friends.mp4" type="video/mp4"&gt;
    Sorry, your browser doesn't support embedded videos.
    Try this link instead: &lt;a href="https://bart.binarydolphin.com/friends.mp4"&gt;Video!&lt;/a&gt;
&lt;/video&gt;

&lt;p&gt;(Technical note: there&amp;rsquo;s both a WEBM and an MP4 so it should work in most browsers that support HTML5.)&lt;/p&gt;</content><category term="Non Sequitur"/><category term="everyone"/><category term="random"/></entry><entry><title>What is Computer Science?</title><link href="https://www.binarydolphin.com/what-is-cs.html" rel="alternate"/><published>2016-02-29T14:45:00-06:00</published><updated>2016-03-30T15:52:00-05:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2016-02-29:/what-is-cs.html</id><summary type="html">&lt;p&gt;What is the field of Computer Science? And what is it not?&lt;/p&gt;</summary><content type="html">&lt;p&gt;So if we keep talking about &lt;a href="https://en.wikipedia.org/wiki/Computer_science" title="Computer Science"&gt;Computer Science&lt;/a&gt;, I suppose we should get
around to defining it. This is tricky because it’s a new field. Much like the
English major of the nineteenth century, you could argue that Computer Science
is the sum total of the knowledge of computing, and we have a major
because now there’s too much of it to assume that an “educated person” would
know everything you need to know about computing because they have an
advanced degree.&lt;/p&gt;
&lt;p&gt;To make matters worse, the field spreads itself over the mighty STEM trinity
of Math, Science, and Engineering. For most scientific fields, the practice is
actually split on these lines. If you study partial differential equations in
all their frustrating abstract glory, then you are a mathematician. If you
apply them to a model of a physical system that you are trying to observe or
predict, then you’re probably a physicist. If you’re using that empirically
verified mathematical model to launch a rocket into orbit, then you’re an
engineer.&lt;/p&gt;
&lt;p&gt;&lt;img alt="XKCD Purity" class="webfeedsFeaturedVisual makeBlock forceFull printWhole" src="https://imgs.xkcd.com/comics/purity.png"&gt;&lt;/p&gt;
&lt;p&gt;Today Computer Science departments are covering all possible topics in
computing including the theoretical math underpinning computation, the
empirical science of computing, software engineering, and hardware
engineering. There is an old saw that if you need to put “science” in the name
of your fields, then it isn’t science. That’s clever, but we plan to
dispel that particular view of Computer Science. Our opinion is that Computer
Science as practiced today is a science - and a whole lot more.&lt;/p&gt;
&lt;p&gt;Let’s begin with the math. One of the astonishing properties of
&lt;a href="https://en.wikipedia.org/wiki/Theoretical_computer_science" title="Theoretical Computer Science"&gt;theoreticalcomputer science&lt;/a&gt; (often referred to by the initialism TCS by
the computerati) is that, well, there &lt;em&gt;is&lt;/em&gt; such a thing as a mathematical basis
for computation. When David Hilbert proposed the now famous &lt;a href="https://en.wikipedia.org/wiki/Hilbert's_program" title="Hilbert's Program"&gt;Hilbert
Program&lt;/a&gt;, it wasn’t universally acknowledged that there was such a
thing. We now have formal theories of what it means to compute something and
what it means for a computation to be complex (or difficult). If you’ve heard
names like &lt;a href="https://en.wikipedia.org/wiki/Kurt_G%C3%B6del" title="Godel"&gt;Gödel&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Alan_Turing" title="Turing"&gt;Turing&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Peter_Shor" title="Shor"&gt;Shor&lt;/a&gt;,
&lt;a href="https://en.wikipedia.org/wiki/Shafi_Goldwasser" title="Goldwasser"&gt;Goldwasser&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Claude_Shannon" title="Shannon"&gt;Shannon&lt;/a&gt;, or &lt;a href="https://en.wikipedia.org/wiki/Stephen_Cook" title="Cook"&gt;Cook&lt;/a&gt; (and this is
a small sampling) then you know how famous the field has become. Heck,
there’s even been a critically acclaimed, award winning, box office hit
&lt;a href="http://www.imdb.com/title/tt2084970/" title="Turing movie"&gt;movie&lt;/a&gt; made about Alan Turing (who helped found the entire field
of TCS &lt;sup id="sf-what-is-cs-1-back"&gt;&lt;a href="#sf-what-is-cs-1" class="simple-footnote" title="See what I did there?"&gt;1&lt;/a&gt;&lt;/sup&gt; in general and Computability in
particular).&lt;/p&gt;
&lt;blockquote&gt;
We now have formal theories of what is means to compute something and
what it means for a computation to be complex (or difficult).
&lt;/blockquote&gt;

&lt;p&gt;Theoretical computer science is deeply related to other fields of mathematics.
In fact, one of the seven &lt;a href="https://en.wikipedia.org/wiki/Millennium_Prize_Problems" title="millennium Prize"&gt;millennium Prize Problems&lt;/a&gt; is also the
big question in TCS. (That’s the “P vs. NP Problem”, and it needs it’s own
blog post.) Graph theory, discrete math, combinatorics, polynomials, and a
glut of other mathematical disciplines are so intertwined with TCS that the
computer scientists doing the most theoretical work are indistinguishable from
mathematicians (in a good way).&lt;/p&gt;
&lt;p&gt;Like physics, an undergraduate education in computer science requires a bit of
math. Your average university major in CS will require Calculus, Discrete
Math, Linear Algebra, Probability, and Statistics. That’s on top of the
application of those mathematical disciplines in the CS-specific classes.
After all that, students are generally also required to a theoretical computer
science that focuses on Computability and Complexity.&lt;/p&gt;
&lt;p&gt;That’s all great, but what does it &lt;em&gt;mean&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;It means that the theoretical foundations of computer science are pretty cool.
Computer science, when stripped down to it’s theoretical core, is the study of
information. That might not sound exciting at first, but try and give a
thorough, rigorous definition of information. Go ahead, I’ll wait…&lt;/p&gt;
&lt;p&gt;Pretty tough isn’t it? You have an intuitive idea of what that word means, but
try defining it with math and without using words like “data” or “knowledge”.
And while we’re at it, what is computation anyway? Without going in to
details, TCS starts with the idea that we want to concern ourselves with
computation. We want a question that we can encode as a &lt;em&gt;finite&lt;/em&gt; series of
zeros and ones, we should be able to find an answer to the question in a
&lt;em&gt;finite&lt;/em&gt; number of steps, and we should be able to report that answer encoded
like the question (in a &lt;em&gt;finite&lt;/em&gt; series of zeros and ones). This is what the
seminal works of &lt;a href="https://en.wikipedia.org/wiki/Alan_Turing" title="Turing"&gt;Alan Turing&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Alonzo_Church" title="Church"&gt;Alonzo Church&lt;/a&gt; got us
(there were other researchers involved, but that’s a story for another day).&lt;/p&gt;
&lt;p&gt;Let’s connect some of that to terms a modern audience might recognize. For our
purposes, let’s call the question “input”, the process for finding an answer a
“program”, and the answer itself “output”. Starting to sound pretty familiar,
right?&lt;/p&gt;
&lt;p&gt;How complicated can it all get? More than you might imagine after we described
the whole setup in a couple sentences. For instance, it turns out that you can
think of problems that you can’t answer given our paltry constraints. In fact,
one of the most famous is Turing’s halting problem: given some input and a
program, will the program actually stop and give us some output? Remember that
we’re talking about being able to handle any possible input/program
combination, and that means that some programs won’t ever stop processing.
Turing provided a proof that there is no general purpose way to provide an
answer for any given input/program pair.&lt;/p&gt;
&lt;p&gt;Some programs won’t ever stop. But what about all the processes that
&lt;em&gt;will&lt;/em&gt; stop? Well, it turns out that if we rephrase our question we can do
something about those. The trick is to ask “can you please list every problem
solving process and question pair that will stop?”. Why, yes I can!&lt;/p&gt;
&lt;blockquote&gt;
Turing provided a proof that there is no general purpose way to provide an
answer for any given input/program pair.
&lt;/blockquote&gt;

&lt;p&gt;Let’s think about that for a second. We have a mathematically sound proof that
says you can’t give a “yes or no” answer to some questions (“does this thing
halt?”). We also know that you can alter some of these yes/no questions and
list all the possible “yes” instances.&lt;/p&gt;
&lt;p&gt;We can organize these programs into teams. We’re going to call these teams
“sets” (that’s what the math people do). So we have three kinds of sets:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Sets for which we can write a program that can take any input and tell us
if that input belongs to the set. Let’s call these sets identifiable.
&lt;sup id="sf-what-is-cs-2-back"&gt;&lt;a href="#sf-what-is-cs-2" class="simple-footnote" title="In TCS, we actually call these recursive, computable, or decidable."&gt;2&lt;/a&gt;&lt;/sup&gt;
This would include sets like odd numbers and words with 7 letters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sets that aren’t identifiable but that are still describable somehow. These
are the sets whose members we can list with a program. We’ll call them list-able
&lt;sup id="sf-what-is-cs-3-back"&gt;&lt;a href="#sf-what-is-cs-3" class="simple-footnote" title="In TCS, we call these recursively enumerable, computably enumerable, semi-decidable, provable, or Turing-recognizable"&gt;3&lt;/a&gt;&lt;/sup&gt;. This includes the set
of programs that halt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set that are neither identifiable nor list-able. This includes the set of
programs that &lt;em&gt;don’t&lt;/em&gt; halt.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I don’t know about you, but that blows my mind. We can describe problems and
sets that we all understand and agree about BUT that no computer program can
identify or list. They’re aren’t even that esoteric by most standards. Ask any
programmer if they’d like a way to identify all programs that get hung in an
infinite loop. You know what’s even crazier? We found those sets with nothing
but math and logic, and they don’t depend on what kind of computing we’re
talking about. Nope, not even your super fancy new Mac can handle some sets.&lt;/p&gt;
&lt;p&gt;The astute reader might be asking “well, can’t we list the processes that
don’t halt as well”? That would be nice, but no. If we could you would be able
to list everything until you found a program that matched one list or the
other - and that would make the set identifiable! We already have a proof
stating that this is impossible, so even listing programs that don’t halt is
out of the question.&lt;/p&gt;
&lt;blockquote&gt;
We can describe problems and sets that we all understand and agree about BUT
that no computer program can identify or list.
&lt;/blockquote&gt;

&lt;p&gt;These are mathematical truths we’re dealing with - I mean, we DO call it
Theoretical Computer Science. What about the science part? Let’s begin with
the so-called &lt;a href="http://cacm.acm.org/magazines/2010/9/98038-science-has-only-two-legs/fulltext" title="Science Two Legs"&gt;“two legs of science”&lt;/a&gt; – theory and experimentation.
Let’s also assume that Computer Science has plenty of theory. (On top of all
the mathematical basis we’ve been talking about, there are all kinds of other
theoretical parts of computer science like networking, programming languages,
and on and on.) But what about experimentation?&lt;/p&gt;
&lt;p&gt;There is certainly a lot of empirical work in Computer Science these days, but
the real question is “how much is scientific experimentation and how much is
engineering?” The fact that the computer science researchers tend to describe
themselves as either “theory people” or “systems people” doesn’t help since
“systems” could go either way. How about we start with if empirical
experimentation would be a good thing for computer science?&lt;/p&gt;
&lt;!--alex disable her-him he-she --&gt;

&lt;p&gt;Imagine Bob, the theoretical CS researcher. Bob has been working on a proof
about a special kind of networking. Let’s not get in details, so we’ll say
that his proof says that for certain kinds of networks there is a certain kind
of algorithm that guarantees a certain amount of performance. Bob is super
excited because his new performance bound is now the best for this kind of
network. But there’s something missing there - did you notice? We didn’t
mention an actual algorithm - his proof says that a certain kind of algorithm
is out there somewhere. This kind of existence proof happens in TCS often.&lt;/p&gt;
&lt;p&gt;Enter Alice, the algorithms researcher. She sees Bob’s paper and actually
comes up with an algorithm of the kind Bob describes. At that point she has
actually advanced the theoretical state of the art, but she doesn’t stop there
&lt;sup id="sf-what-is-cs-4-back"&gt;&lt;a href="#sf-what-is-cs-4" class="simple-footnote" title="although she might pause there and publish a paper"&gt;4&lt;/a&gt;&lt;/sup&gt;. Since there’s
now a specific algorithm, Alice decides to &lt;em&gt;implement&lt;/em&gt; that algorithm by
writing a program in a specific computer programming language. And now we have
an experiment. Alice can run her program, test it’s performance in a variety
of settings, and compare her results to exhaustively studied algorithms
&lt;sup id="sf-what-is-cs-5-back"&gt;&lt;a href="#sf-what-is-cs-5" class="simple-footnote" title="Yes, here is where practicing computer people will start explaining about benchmarks and how they’re hard or impossible. It’s my hypothetical example - lay off"&gt;5&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;!--alex enable her-him he-she --&gt;

&lt;p&gt;This is the kind of empirical work that happens all the time in computer
science. It turns out that humans are bad at knowing what will happen in
complicated systems. Really, really bad. That’s why experimentation is so
important in all the sciences. When it comes to a new computer system, we
often need to build them to know how (and if) they’ll actually function.&lt;/p&gt;
&lt;p&gt;Computer science can also offer new forms of experimentation. Namely, computer
simulations. There’s a cadre of computer scientists that feel computational
modeling is something separate from theory and experimentation. Let’s sidestep
that issue for right now. What’s important is that there are some scientific
theories that you will never be able to reproduce and almost certainly will
never observe. Like, say, everything in cosmology. No one wants cosmologists to
create two black holes and smash them together, and no one knows how to launch
cosmologists a million light years away to observe something like that. It
turns out that they can create and “observe” computer models of two black holes
running in to each other, so no one has to get dropped into a black hole.&lt;/p&gt;
&lt;p&gt;Is that even helpful? Well, yes. First it allows them to verify expected
outcomes. If the outcome from the computer model doesn’t seem right, and
they’ve double-checked the computer model, then it’s possible they’ve
discovered a new insight. If the model works out as expected then they’ve got a
little closer to confirming their hypothesis. This might not sound important,
but computer modeling and simulation is now a core practice in most (if not
all) scientific communities. In fact, one of the first uses for computers was
something called &lt;a href="https://en.wikipedia.org/wiki/Monte_Carlo_method" title="Monte Carlo"&gt;Monte Carlo simulations&lt;/a&gt; used by the &lt;a href="http://www.atomicheritage.org/history/computing-and-manhattan-project" title="Computing and the Manhattan Project"&gt;United
States&lt;/a&gt; to help design atomic weapons.&lt;/p&gt;
&lt;p&gt;If that’s the science part, what’s left for the engineers? We’ve leave a great
deal of that for another post, but the engineering side of Computer Science is
generally what everyone interacts with every day. Even if we dump all hardware
into electrical and mechanical engineering (which a lot of computer engineers
would disagree with), you still have all the software around you. If something
in your life plugs in to a wall, uses batteries, or has a solar panel, then it
almost certainly has some software. When you google, IM, email, kik, slack,
text, snapchat, instagram, or tweet you’re using software. And software
engineers &lt;sup id="sf-what-is-cs-6-back"&gt;&lt;a href="#sf-what-is-cs-6" class="simple-footnote" title="Yes, some would dispute the use of the term engineer, but that’s a topic for another day"&gt;6&lt;/a&gt;&lt;/sup&gt; built it all.&lt;/p&gt;
&lt;p&gt;Which brings us to the end of our quick summary of computer science. It’s a
pretty big topic, and we’ve merely scratched the surface. We’ll get a chance
to explore some more in coming posts.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used in this article (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Church: &lt;a href="https://en.wikipedia.org/wiki/Alonzo_Church"&gt;https://en.wikipedia.org/wiki/Alonzo_Church&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Computer Science: &lt;a href="https://en.wikipedia.org/wiki/Computer_science"&gt;https://en.wikipedia.org/wiki/Computer_science&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Computing and the Manhattan Project: &lt;a href="http://www.atomicheritage.org/history/computing-and-manhattan-project"&gt;http://www.atomicheritage.org/history/computing-and-manhattan-project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cook: &lt;a href="https://en.wikipedia.org/wiki/Stephen_Cook"&gt;https://en.wikipedia.org/wiki/Stephen_Cook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Godel: &lt;a href="https://en.wikipedia.org/wiki/Kurt_G%C3%B6del"&gt;https://en.wikipedia.org/wiki/Kurt_G%C3%B6del&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Goldwasser: &lt;a href="https://en.wikipedia.org/wiki/Shafi_Goldwasser"&gt;https://en.wikipedia.org/wiki/Shafi_Goldwasser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hilbert’s Program: &lt;a href="https://en.wikipedia.org/wiki/Hilbert's_program"&gt;https://en.wikipedia.org/wiki/Hilbert’s_program&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;millennium Prize: &lt;a href="https://en.wikipedia.org/wiki/Millennium_Prize_Problems"&gt;https://en.wikipedia.org/wiki/Millennium_Prize_Problems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Monte Carlo: &lt;a href="https://en.wikipedia.org/wiki/Monte_Carlo_method"&gt;https://en.wikipedia.org/wiki/Monte_Carlo_method&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Science Two Legs: &lt;a href="http://cacm.acm.org/magazines/2010/9/98038-science-has-only-two-legs/fulltext"&gt;http://cacm.acm.org/magazines/2010/9/98038-science-has-only-two-legs/fulltext&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Shannon: &lt;a href="https://en.wikipedia.org/wiki/Claude_Shannon"&gt;https://en.wikipedia.org/wiki/Claude_Shannon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Shor: &lt;a href="https://en.wikipedia.org/wiki/Peter_Shor"&gt;https://en.wikipedia.org/wiki/Peter_Shor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Theoretical Computer Science: &lt;a href="https://en.wikipedia.org/wiki/Theoretical_computer_science"&gt;https://en.wikipedia.org/wiki/Theoretical_computer_science&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Turing: &lt;a href="https://en.wikipedia.org/wiki/Alan_Turing"&gt;https://en.wikipedia.org/wiki/Alan_Turing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Turing movie: &lt;a href="http://www.imdb.com/title/tt2084970/"&gt;http://www.imdb.com/title/tt2084970/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-what-is-cs-7-back"&gt;&lt;a href="#sf-what-is-cs-7" class="simple-footnote" title='"Purity" image from XKCD under a Creative Commons Attribution-NonCommercial 2.5 License.'&gt;7&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-what-is-cs-1"&gt;See what I did there? &lt;a href="#sf-what-is-cs-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-2"&gt;In TCS, we actually call these recursive, computable, or decidable. &lt;a href="#sf-what-is-cs-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-3"&gt;In TCS, we call these recursively enumerable, computably enumerable,
semi-decidable, provable, or Turing-recognizable &lt;a href="#sf-what-is-cs-3-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-4"&gt;although she might &lt;em&gt;pause&lt;/em&gt; there and publish a paper &lt;a href="#sf-what-is-cs-4-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-5"&gt;Yes, here is where practicing computer people will start explaining about
benchmarks and how they’re hard or impossible. It’s my hypothetical example -
lay off &lt;a href="#sf-what-is-cs-5-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-6"&gt;Yes, some would dispute the use of the term engineer, but
that’s a topic for another day &lt;a href="#sf-what-is-cs-6-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-what-is-cs-7"&gt;"Purity" image from &lt;a href="http://www.xkcd.com"&gt;XKCD&lt;/a&gt; under a Creative Commons Attribution-NonCommercial 2.5 License. &lt;a href="#sf-what-is-cs-7-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="Computer Science"/><category term="everyone"/><category term="science"/><category term="learning"/></entry><entry><title>Hello World</title><link href="https://www.binarydolphin.com/hello-world.html" rel="alternate"/><published>2016-01-26T13:00:00-06:00</published><updated>2016-02-04T13:00:00-06:00</updated><author><name>Craig Kelly</name></author><id>tag:www.binarydolphin.com,2016-01-26:/hello-world.html</id><summary type="html">&lt;p&gt;Welcome to the Binary Dolphin blog&lt;/p&gt;</summary><content type="html">&lt;p&gt;Welcome to the inaugural post of the BinaryDolphin blog. Yes, it’s a silly
name. Yes, we’re about to explain it. No, it doesn’t make a lot of sense.&lt;/p&gt;
&lt;p&gt;Before we give an insufficient explanation of the name, perhaps we should talk
about why this isn’t a blog named after the sole author. Is it because we hope
that one day this blog will be a dominant force in the world of tech blogs with
lots of authors? That would be nice, but no. It has more to do with &lt;a href="https://en.wikipedia.org/wiki/The_Economist" title="The Economist"&gt;The
Economist&lt;/a&gt;. Namely, the byline practices…&lt;/p&gt;
&lt;p&gt;&lt;img alt="old school hello world" class="webfeedsFeaturedVisual forceFull printHalf" src="https://www.binarydolphin.com/images/hello-world.png"&gt;&lt;/p&gt;
&lt;p&gt;The Economist almost never gives a byline for articles. Those articles have a
specific point of view, offer opinions and analysis, and often assume a
particular level of knowledge about the subject matter. Because the specific
author is never named, the resulting publication is one with a coherent
position. Of course that position is fluid, flexible, often contradictory, and
sometimes wrong. But it’s the position of The Economist, and not journalists
Alice and Bob.&lt;/p&gt;
&lt;p&gt;Binary Dolphin doesn’t necessarily agree with anything that The Economist
publishes, but the idea that you should consider the editorial voice of the
publication (or blog) where your writing is visible seems like a pretty good
practice. The solo author of this blog is pretty far from a professional
writer. Perhaps the cover of a named blog will remove some of the self- imposed
impostor syndrome.&lt;/p&gt;
&lt;p&gt;What does the name mean? Ha, if that’s all you want to know you’re going to
disappointed. I like dolphins, and I wanted a name that conveyed both computer
science (binary) and nature (dolphin). That’s it. Nothing about numerology,
AI-enhanced porpoises, or reductionist classifications of marine life. I mean,
we all agree that the relative coolness of mammals must be continuous and not
discrete - amirite?&lt;/p&gt;
&lt;p&gt;Which bring us to what the blog intends to be about. Well, it should come as no
surprise, but computer science pretty much sums it up. We love the assumptions,
theories, proofs, facts, and practice that all make up computing. We’re also
big fans of making computers do things by writing code. And sometimes when you
write code, you need to get serious about it - and that’s software engineering.&lt;/p&gt;
&lt;p&gt;Bored yet?&lt;/p&gt;
&lt;p&gt;That’s all well and good, but should that interest anyone other than computer
geeks and mathematicians? It doesn’t matter if you’re a &lt;a href="http://amturing.acm.org/" title="Turing Award winner"&gt;Turing Award
winner&lt;/a&gt; or &lt;a href="http://www.slate.com/blogs/bad_astronomy/2015/10/26/global_warming_lamar_smith_wants_to_tie_noaa_in_knots.html" title="an anti-science luddite"&gt;an anti-science luddite&lt;/a&gt; &lt;sup id="sf-hello-world-1-back"&gt;&lt;a href="#sf-hello-world-1" class="simple-footnote" title="Yes, we went there. Pro Tip: if you disagree with every major scientific organization on the planet, then the burden of proof lies squarely on you. You need a bunch of evidence, and some actual physics would be nice. Deal with it."&gt;1&lt;/a&gt;&lt;/sup&gt;
Technology in general and computing in particular are shaping the society
around you. That’s important because ordinary citizens can inspect, examine,
and change a large part of the computing doing all that shaping. &lt;strong&gt;&lt;em&gt;If&lt;/em&gt;&lt;/strong&gt;
those citizens are technically savvy. Those kinds of citizens are also
prepared to ask the important question “why isn’t the &lt;strong&gt;rest&lt;/strong&gt; of computing
open to that kind of inspection?”&lt;/p&gt;
&lt;blockquote&gt;
Technology in general and computing in particular are shaping the society around you.
&lt;/blockquote&gt;

&lt;p&gt;Ever wondered what those &lt;a href="http://www.fsf.org/about/what-is-free-software" title="Free Software"&gt;open source zealots&lt;/a&gt; were on about? Or what the
big deal about software patents is all about? Well, that’s what geeks who talk
about “computing and society” are talking about. That and other issues that are
hard to reason about if you don’t have at least a cursory grasp of the terms.
We plan to dedicate some time to these kinds of questions. In a future (that
some think is already here), knowledge about these kinds of questions can be
the difference between prosperous citizens and a second-class group excluded
from all the possibilities we’re trying to give everyone.&lt;/p&gt;
&lt;p&gt;Computing can benefit the world in plenty of other ways.  In fact, a lot of us
in computing now feel strongly that &lt;a href="https://en.wikipedia.org/wiki/Computational_thinking" title="Computational Thinking"&gt;“computational thinking”&lt;/a&gt; is a way of
approaching the world that is valuable and distinct from other fields. Of
course, all the &lt;a href="https://en.wikipedia.org/wiki/Science,_Technology,_Engineering,_and_Mathematics" title="STEM"&gt;STEM&lt;/a&gt; fields would claim a unique way of getting at
truth in the world. The best of those approaches end up spreading to all the
STEM fields. The analytic approaches in math, the mathematical model-building
in physics, the statistical equilibrium approach in chemistry, the systems
thinking in biology, the statistic design of experiments in the social
sciences, and other approaches are all at the core of modern scientific
practices. What’s so special about computing?&lt;/p&gt;
&lt;p&gt;Computer scientists and software engineers specialize in recursive patterns,
algorithmic approaches, combinatorial analysis, abstractions, compositionality,
data modeling, and plenty of other cool terms in our word salad. Taken together
the field of computing provides an impressive array of intellectual tools for
understanding and exploring the world around us. That doesn’t mean that you get
to skip analytical calculus to do physics, and you don’t get to skip statistics
to do, well, anything. It &lt;em&gt;does&lt;/em&gt; mean that you can find ways to explore
scientific phenomena when “traditional” analytic techniques let you down. Ask
anyone that’s ever tried to model &lt;a href="https://en.wikipedia.org/wiki/N-body_problem" title="N Body Problem"&gt;all the planetary motion in a solar
system&lt;/a&gt;. In fact, we’ll go one step further and claim that &lt;a href="http://software-carpentry.org/" title="Software Carpentry"&gt;you already
need at least some computing skills to do any kind of serious science&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And that kind of thinking isn’t one way. Nature informs our computational
models, and the act of building our computational models can improve our
understanding of those natural phenomena. We won’t try and teach you all the
math underlying &lt;a href="https://en.wikipedia.org/wiki/Maxwell's_equations" title="Maxwell's Equations"&gt;Maxwell’s equations&lt;/a&gt;, but we can show you how to create
a simple computational model of a system of differential equations. And you’ll
understand it.&lt;/p&gt;
&lt;p&gt;Perhaps at least some of all that will appeal to some of our readers. If
not, well, we’re going to have fun writing about it anyway.&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Links used in this article (or that you might want to check out):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;an anti-science luddite: &lt;a href="http://www.slate.com/blogs/bad_astronomy/2015/10/26/global_warming_lamar_smith_wants_to_tie_noaa_in_knots.html"&gt;http://www.slate.com/blogs/bad_astronomy/2015/10/26/global_warming_lamar_smith_wants_to_tie_noaa_in_knots.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Computational Thinking: &lt;a href="https://en.wikipedia.org/wiki/Computational_thinking"&gt;https://en.wikipedia.org/wiki/Computational_thinking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Free Software: &lt;a href="http://www.fsf.org/about/what-is-free-software"&gt;http://www.fsf.org/about/what-is-free-software&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Maxwell’s Equations: &lt;a href="https://en.wikipedia.org/wiki/Maxwell's_equations"&gt;https://en.wikipedia.org/wiki/Maxwell’s_equations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;N Body Problem: &lt;a href="https://en.wikipedia.org/wiki/N-body_problem"&gt;https://en.wikipedia.org/wiki/N-body_problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Software Carpentry: &lt;a href="http://software-carpentry.org/"&gt;http://software-carpentry.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;STEM: &lt;a href="https://en.wikipedia.org/wiki/Science,_Technology,_Engineering,_and_Mathematics"&gt;https://en.wikipedia.org/wiki/Science,_Technology,_Engineering,_and_Mathematics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Economist: &lt;a href="https://en.wikipedia.org/wiki/The_Economist"&gt;https://en.wikipedia.org/wiki/The_Economist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Turing Award winner: &lt;a href="http://amturing.acm.org/"&gt;http://amturing.acm.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="credits"&gt;Image credits:
    &lt;sup id="sf-hello-world-2-back"&gt;&lt;a href="#sf-hello-world-2" class="simple-footnote" title='"Hello World" image created by binarydolphin.com has been dedicated to the public domain.'&gt;2&lt;/a&gt;&lt;/sup&gt;
&lt;/div&gt;&lt;ol class="simple-footnotes"&gt;&lt;li id="sf-hello-world-1"&gt;Yes, we went there.
Pro Tip: if you disagree with every major scientific organization on the
planet, then the burden of proof lies squarely on you. You need a bunch of
evidence, and some actual physics would be nice. Deal with it. &lt;a href="#sf-hello-world-1-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;li id="sf-hello-world-2"&gt;"Hello World" image created by binarydolphin.com has been dedicated to the public domain. &lt;a href="#sf-hello-world-2-back" class="simple-footnote-back"&gt;↩︎&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</content><category term="General"/><category term="society"/><category term="everyone"/></entry></feed>