<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="presenter.xsl"?>
<slideshow>
	<title> HackDay '06 </title>
	<slide> <!-- title slide -->
		<body>
			<h1 style="color:blue;margin-top:100px;margin-left: 100px; font-size: 36pt;margin-bottom:0px">
			TastyDrive and BSFTMAK(?!?!)
			</h1>

			<div style="position: absolute; right: 0px; bottom: 0px; margin: 50px;"> 
			Jordan Sissel<br/>
			jls@semicomplete.com
			</div>

		</body>
	</slide>

	<slide> <title> BSFTMAK(?!?!)  </title>
		<body>
      Binary Search For The Mouse And Keyboard (wtf?)

      <p/>

      Project page: <a href="http://www.semicomplete.com/projects/keynav">http://www.semicomplete.com/projects/keynav</a>
    </body>
  </slide>

  <slide> <title> Problem: I'm lazy </title>
    <body>
      Moving the mouse is hard work. I'm lazy. 

      <p/>

      Let's give focus to windows without the mouse.

      <p/>

      Steps:
      <ol>
        <li> Realize I want focus another window </li>
        <li> Find the mouse with my right hand (time wasted) </li>
        <li> Move the mouse on top of my desired window, Click? </li>
        <li> Enjoy my new window focus. </li>
      </ol>
    </body>
  </slide>

  <slide> <title> Solution </title>
    <body>
      Stop using the mouse. Let's zoom using binary search.

      Steps:
      <ol>
        <li> Continuously split the screen in halves. </li>
        <li> Stop when you're in your desired area. </li>
        <li> Have a beer! </li>
      </ol>
    </body>
  </slide>

  <slide> <title> Speed </title>
    <body>
      <ul>
        <li> Splitting by half gives us logarithmic scaling </li>
        <li> Worst case for a 1920x1200 resolution screen: 
          <p/>
          log2(1920) + log2(1200) = 21.13
          <br/>
          <small>log2 is log base 2</small>
          <p/>
          21 moves to select any pixel on the screen.
        </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Speed!? </title>
    <body>
      <ul>
        <li> 21 moves? That sucks. </li>
        <li> Good things I don't want to select pixels. </li>
        <li> Best I want is a 60x60 piece and move there. </li>
        <li> This cuts the maximum number of moves to about 10. </li>
        <li> On my laptop, I average 2.2 moves </li>
        <li> On my normal workstation, predict average of 5 moves each time. </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Why is this cool? </title>
    <body>
      <ul>
        <li> I can focus any window on my screen with 5 keystrokes or less. </li>
        <li> I'm a fast typist, so moves are very fast. </li>
      </ul>
    </body>
  </slide>

  <slide> <title> How do you use it? </title>
    <body>
      <ul>
        <li> 4 directions: up, down, left, right.</li>
      </ul>
    </body>
  </slide>

  <slide> <title> Screenshot demo </title>
    <body> <img src="images/zoom0.png" /> </body>
  </slide>

  <slide> <title> Screenshot demo </title>
    <body> <img src="images/zoom1.png" /> </body>
  </slide>

  <slide> <title> Screenshot demo </title>
    <body> <img src="images/zoom2.png" /> </body>
  </slide>

  <slide> <title> Screenshot demo </title>
    <body> <img src="images/zoom3.png" /> </body>
  </slide>

  <slide> <title> What about a real demo? </title>
    <body>
      Ok. Let's do a real demo.
      Project page: <a href="http://www.semicomplete.com/projects/keynav">http://www.semicomplete.com/projects/keynav</a>
    </body>
  </slide>

  <slide>
    <body>
      <h1 style="color:blue;margin-top:100px;margin-left: 100px; font-size: 36pt;margin-bottom:0px">
        TastyDrive
      </h1>
      <h4> or, how to make del.icio.us engineers cry </h4>
    </body>
  </slide>

  <slide> <title> The Idea </title>
    <body>
      Leverage a Yahoo! property to store and tag audio files
    </body>
  </slide>

  <slide> <title> Options (part one) </title>
    <body>
      Reasonable options:

      <ul>
        <li> QuickTime uploads to video.yahoo.com </li>
        <li> Upload audio files to GeoCities? </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Options (part deux) </title>
    <body>
      Unreasonable options:
      <ul>
        <li> Use 'data:' urls and upload the data to del.icio.us.</li>
      </ul>
    </body>
  </slide>

  <slide> <title> Decision </title>
    <body>
      Encoding the data into giant url strings?

      <p/>

      Perfect! Let's do it.
    </body>
  </slide>

  <slide> <title> Solution </title>
    <body>
      <ul>
        <li> Use delicious posting api to push data. </li>
        <li> Use FUSE and Python to create a delicious-backed filesystem </li>
        <li> Write files to the filesystem and have them uploaded to delicious </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Difficulty: data urls </title>
    <body>
      Delicious will not make any posts public that are not http:// urls (with a few exceptions).

      <p/>
      Solution: Prefix data urls with 'http://'

      <p/>
      Example: http://blah/data:text/plain,hello+there
    </body>
  </slide>

  <slide> <title> Difficulty: File Sizes </title>
    <body>
      Maximum URL size in delicious is 65536 characters (64kb).

      <p/>
      Solution:
      <ul>
        <li> Split files into 64kb chunks and upload separately </li>
        <li> How do we join all the files together? </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Special Sauce: Bootstrap code</title>
    <body>
      <ol>
        <li> Need some sort of boot-strap code to pull and join chunks.
          <p/>
          Easy. Craft HTML and use a data url pointing at html+javascript as bootstrap code
        </li>
        <li> Remember, data urls are not public, how do we execute our bootstrap code?
          <p/>
          ask.com has a blind redirector. Use it as a real http url and redirect to our bootstrap code
          <p/>
          Example: <![CDATA[http://wzus.ask.com/r?t=p&url=&u=data:text/plain,Greetings, Hackers!]]>
        </li>
      </ol>
    </body>
  </slide>

  <slide> <title> Statistics </title>
    <body>
      <ul>
        <li> What kind of files? <b>Any</b> </li>
        <li> What's the maximum file size? <b>Probably 3 megs (for now?) </b> </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Max file size </title>
    <body>
      Why a max file size?
      <ul>
        <li> Delicious JSON api only returns a maximum of 100 links to a tag query. This means a maximum of 100 chunks.
        </li>
        <li> Solution: Split files across tags and chunks. Result: infinite storage </li>
      </ul>
    </body>
  </slide>

  <slide> <title> Demo </title>
    <body> Shut me up. Time to demo. 

    </body>
  </slide>
</slideshow>
