<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James Pine Has A Blog</title>
	<atom:link href="http://www.madpickles.org/rokjoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madpickles.org/rokjoo</link>
	<description>A Collection of Thoughts and Ideas</description>
	<lastBuildDate>Sun, 22 Jan 2012 19:14:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Blacking Out Your Website</title>
		<link>http://www.madpickles.org/rokjoo/2012/01/22/blacking-out-your-website/</link>
		<comments>http://www.madpickles.org/rokjoo/2012/01/22/blacking-out-your-website/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 19:14:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[knowledge]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=610</guid>
		<description><![CDATA[On January 18, 2012 a number of websites &#8220;went dark&#8221; to protest the United States House of Representatives Stop Online Piracy Act and Senate Protect IP Act, more commonly known as SOPA and PIPA. Like many things, there are many way to go about &#8220;blacking out&#8221; one&#8217;s website. Wikipedia used JavaScript and CSS to overlay [...]]]></description>
			<content:encoded><![CDATA[<p>On January 18, 2012 a number of websites &#8220;went dark&#8221; to protest the United States House of Representatives <a href="http://thomas.loc.gov/cgi-bin/bdquery/z?d112:HR03261:@@@L&#038;summ2=m&#038;" title="Stop Online Piracy Act" target="_blank">Stop Online Piracy Act</a> and Senate <a href="http://thomas.loc.gov/cgi-bin/bdquery/z?d112:SN00968:@@@L&#038;summ2=m&#038;" title="Protect IP Act" target="_blank">Protect IP Act</a>, more commonly known as SOPA and PIPA. Like many things, there are many way to go about &#8220;blacking out&#8221; one&#8217;s website.</p>
<p>Wikipedia used JavaScript and CSS to overlay their message on every page, so users saw the content of the page for a second or so and then it was completely obscured. BoingBoing returned a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4" title="HTTP 503" target="_blank">HTTP 503</a> &#8220;service unavailable&#8221; for every URL on their domain. Mozilla returned a 503 for their main URL. Imgur and Craigslist simply changed the content on their main pages and continued to return <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" title="HTTP 200s" target="_blank">HTTP 200s</a>. reddit redirected every URL on their domain to their protest message via a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3" title="HTTP 302" target="_blank">HTTP 302</a> &#8220;temporary redirect&#8221;. So which, if any of these is &#8220;correct&#8221;?</p>
<p>In this case, the HTTP 503 is the best option because it conveys two important bits of information:</p>
<ol>
<li>The server is unable to handle the request</li>
<li>The situation is temporary</li>
</ol>
<p>The HTTP 302 is dangerous because it conveys two bits of information, one which is correct and the other which is a lie:</p>
<ol>
<li>The requested resource was found, but under a different URI</li>
<li>The situation is temporary</li>
</ol>
<p>The difference likely doesn&#8217;t matter much to a person using a web browser, as in the worst case it might cache the 302 response. If the redirect changes on the server a user re-requests the URI, the cached response might be returned. At this point if the user thinks the page isn&#8217;t valid e.g. seeing a January 18th SOPA protest page on January 19th, it&#8217;s easy enough for the user to reload the page and retrieve the new redirect target.</p>
<p>However, a web crawlers like <a href="http://support.google.com/webmasters/bin/answer.py?hl=en&#038;answer=182072" title="Googlebot" target="_blank">Googlebot</a>, <a href="http://duckduckgo.com/duckduckbot.html" title="DuckDuckGo Bot" target="_blank">DuckDuckGo Bot</a> etc. will store the contents of the page for consideration in their respective search index and may not visit a given URI very often. So if one were to configure their site to issue a 302 or 200 with alternative content during the time a web crawler visited the URI, it could render one&#8217;s page virtually inaccessible via a search as the bot would think the temporary content fetched was valid and not retry again until it is scheduled to visit the URI again. In contrast, returning 503 will likely cause the bot to break out of it&#8217;s normal scheduling cycle for a given URL such that it retries it sooner rather than later.</p>
<p>So next time you decide to stage a blackout, remember there are clients other than humans with web browsers accessing your site!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2012/01/22/blacking-out-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AI Class</title>
		<link>http://www.madpickles.org/rokjoo/2012/01/09/ai-class/</link>
		<comments>http://www.madpickles.org/rokjoo/2012/01/09/ai-class/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 01:13:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[knowledge]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=596</guid>
		<description><![CDATA[Towards the end of last year I signed up for the &#8220;basic&#8221; track of the Stanford Engineering Introduction To Artificial Intelligence class, mainly out of curiosity, but also because the instructors (Sebastian Thrun and Peter Norvig) and I share the same employer. I intended to follow along at a leisurely pace, unsure if I would [...]]]></description>
			<content:encoded><![CDATA[<p>Towards the end of last year I signed up for the &#8220;basic&#8221; track of the Stanford Engineering <a href="http://www.ai-class.com/" target="_blank">Introduction To Artificial Intelligence</a> class, mainly out of curiosity, but also because the instructors (<a href="http://www.stanford.edu/~thrun/" target="_blank">Sebastian Thrun</a> and <a href="http://www.norvig.com/" target="_blank">Peter Norvig</a>) and I share the same employer. I intended to follow along at a leisurely pace, unsure if I would be able to commit the time necessary to watch all the lectures and go through the homework problems. However, during the first week I found the homework assignments unavailable to &#8220;basic&#8221; track participants until after they were due (this was later changed) so I switched to the &#8220;advanced&#8221; track and made a concerned effort to adhere to the class schedule.</p>
<p>It&#8217;s similar in style to the <a href="http://www.khanacademy.org/" target="_blank">Khan Academy</a>, and it definitely took my understanding of <a href="http://en.wikipedia.org/wiki/Bayes'_rule" target="_blank" rel="nofollow">Bayes&#8217; Rule</a>, <a href="http://en.wikipedia.org/wiki/Hidden_Markov_model" target="_blank" rel="nofollow">Hidden Markov Models</a>, etc. to another level. Sure there are tons of books and tutorials out there, but I feel there&#8217;s a limit to what one can learn without practice. One form of practice is to create a toy programming project, the main downside of which is never knowing if you&#8217;re doing it &#8220;right&#8221;. Contests ala <a href="http://www.netflixprize.com/" target="_blank" rel="none">Netflix Prize</a> are another which at least provides better/worse feedback. The main benefit of online courses though is one can practice solving problems and know whether or not an answer is correct.</p>
<p>I didn&#8217;t participate in any of the discussions, though I did find the group website useful for clarification on a few of the problem statements. Even so, there were still a couple of questions throughout the homework and exams which I misinterpreted, leading to an incorrect answer; however, the largest cause of incorrect answers seemed to be my inability to punch numbers into a calculator correctly&#8230;I guess I haven&#8217;t gotten any better at that since I was last in school :S</p>
<p>An unexpected realization was how much I value flexibility in scheduling. There were definitely a few weeks I had to scramble in order to make it through the videos and homework before the deadline. Funny how the addition of one more deadline per week caused me so much grief. I was interested in the material, but some of it took quite a bit of time to get through (especially once I slowed down after rushing through a couple of homework assignments and doing poorly).</p>
<p>While one could certainly write programs to solve some of the quiz/homework/exam problems, all of them were solvable with pen and paper. The lack of problems requiring writing code was one of the top complaints. They held an AI competition; I didn&#8217;t participate as I feared that would take up too much of my time. However, towards the end of the class, the instructors provided an optional quiz which required writing some code: <a href="https://www.ai-class.com/course/video/quizquestion/296" target="_blank" rel="none">Optional Natural Language Processing Problems</a>. This seemed like a much less time consuming set of questions and I would also get instant feedback.</p>
<p>The first problem was easily solved with brute force. My basic idea was to try every possible rotation and see which one yielded the most words which appear in an English dictionary.</p>
<pre>
#!/usr/bin/python

import sys
import string

# Problem text, all lowercase, no punctuation.
SENTENCE = 'esp qtcde nzyqpcpynp zy esp ezatn zq lcetqtntlw tyepwwtrpynp hld spwo le olcexzfes nzwwprp ty estd jplc'

# Parse the system's English dictionary into a set.
def WordsToSet():
  word_set = set()
  for w in open('/usr/share/dict/words'):
    word_set.add(w.strip().lower())
  return word_set

def p1(word_set):
  # Setup character position lookup table.
  chars = string.ascii_lowercase
  num_chars = len(chars)
  letter_positions = dict([(c, i) for i, c in enumerate(chars)])

  # Track the rotation that yields the most real words.
  max_word_count = 0
  best_i = 1
  sentences = {}

  # Try each rotation.
  for i in xrange(1, 25):
    temp_word_count = 0
    decoded = []

    # Build up a decoded sentence.
    for char in SENTENCE:
      if char == ' ':
        decoded.append(char)
      else:
        decoded.append(chars[(letter_positions[char.lower()] - i) % num_chars])
    sentences[i] = ''.join(decoded)

    # See how many words in the sentence exist in the word set.
    for word in sentences[i].split(' '):
      if word in word_set:
        temp_word_count += 1
    if temp_word_count > max_word_count:
      best_i = i
      max_word_count = temp_word_count

  # Output our best guess.
  print best_i, sentences[best_i]

def main(argv):
  word_set = WordsToSet()
  p1(word_set)

if __name__ == '__main__':
  main(sys.argv)
</pre>
<p>The second problem proved to be a bit more difficult. It couldn&#8217;t be brute forced since there were 18 &#8220;strips&#8221; of characters and thus 18! possible combinations (6,402,373,705,728,000 so if one could generate 1 every millisecond, it&#8217;d take 200,000+ years and that doesn&#8217;t even factor in the evaluation of whether the combination is gibberish). To make life easier, I first got rid of all the punctuation, lowercased all the characters, and converted the &#8220;strips&#8221; of characters into a Python list of lists. My idea was to pick the first strip, try the remaining 17 to see which one &#8220;fit&#8221; best before or after strip 0, then try the remaining 16 on the joined strips, etc. For best &#8220;fit&#8221; I would try to maximize the number of legitimate words which could be composed by the left or right most series of characters (whitespace delimited).</p>
<p>Initially it seemed like counting a partial word match with fewer than 3 characters wouldn&#8217;t be useful e.g. &#8220;er&#8221; appears in tens of thousands of words. That wasn&#8217;t good enough to keep my program on track though, as it would get a few strips aligned correcting and then veer off track creating sequences of characters that were found in many words, but ended up being gibberish in this example. So I had to augment the solution to detect when a sequence of characters should appear at the beginning of a word (whitespace before the sequence, but not after) or when a sequence of characters should be matched exactly (whitespace before and after the sequence). In this case, I didn&#8217;t have to detect whether a sequence of characters should appear at the end of a word (whitespace after the sequence, but not before), but it would be trivial to add.</p>
<p>Another necessary feature of my model was the ability to short-circuit if more than 1 row of characters would result in zero possible words. At first I had the threshold set at more than 0, but &#8220;shannon&#8221;, a last name as it turns out, is not in the dictionary. The code below takes about 90 seconds to solve the problem and could easily be optimized to reduce the number of loops or lookups in the dictionary, but I think those changes obscure the heart of the algorithm. Below is the code as well as a copy of the output generated by the program as it solved the problem.</p>
<pre>
#!/usr/bin/python

import sys
import string

STRIPS = [
  ['de',' ',' f','cl','nf','ed','au',' i','ti',' ','ma','ha','or','nn','ou',' s','on','nd','on'],
  ['ry',' ','is','th','is',' b','eo','as',' ',' ','f ','wh',' o','ic',' t',' ',' ','he','h '],
  ['ab',' ','la','pr','od','ge','ob',' m','an',' ','s ','is','el','ti','ng','il','d ','ua','c '],
  ['he',' ','ea','of','ho',' m',' t','et','ha',' ',' t','od','ds','e ','ki',' c','t ','ng','br'],
  ['wo','m ','to','yo','hi','ve','u ',' t','ob',' ','pr','d ','s ','us',' s','ul','le','ol','e '],
  [' t','ca',' t','wi',' m','d ','th',' a','ma','l ','he',' p','at','ap','it','he','ti','le','er'],
  ['ry','d ','un','th',' ','io','eo','n ','is',' ','bl','f ','pu','co','ic',' o','he','at','mm'],
  ['hi',' ',' ','in',' ',' ',' t',' ',' ',' ',' ','ye',' ','ar',' ','s ',' ',' ',' ']
]

def WordsToSet():
  word_set = set()
  for w in open('/usr/share/dict/words'):
    word_set.add(w.strip().lower())
  return word_set

# Determine whether word is, starts with or contins prospective_word.
def WordMatch(word, prospective_word, exact, startswith):
  if exact and prospective_word == word:
    return 1
  elif startswith and word.startswith(prospective_word):
    return 1
  elif not exact and not startswith and prospective_word in word:
    return 1
  return 0

def ProspectiveWord(i, j, row, prefix):
  # Construct a new result based on the current result row, the ith row and,
  # jth column of STRIPS and whether the new set of characters should be
  # positioned before or after the current result row.
  if prefix:
    prospective_result = STRIPS[i][j] + row
  else:
    prospective_result = row + STRIPS[i][j]

  words = prospective_result.split(' ')
  prospective_word = ''
  exact = False
  startswith = False
  if prefix:
    if words[0] == '':  # There was a leading space.
      prospective_word = words[1]
      if len(words) > 2:  # And a space after prospective_word.
        exact = True
      else:
        startswith = True
    else:
      prospective_word = words[0]
  else:
    if words[-1] == '':  # There was a trailing space.
      prospective_word = words[-2]
      if len(words) > 2:  # And a space before prospective_word.
        exact = True
    else:
      prospective_word = words[-1]
      if len(words) > 1:
        startswith = True
  return prospective_word, exact, startswith

def p2(word_set):
  # Set the first column of STRIPS as the current result.
  result = [row[0] for row in STRIPS]
  # The order of j's, not used to solve the problem, but useful to print at the
  # end. i.e. the order of the STRIPS.
  strip_order = [0]
  # Keep track of the unused j's i.e. columns of STRIPS
  remaining_strips = set([j for j in xrange(1, len(STRIPS[0]))])

  while len(remaining_strips) > 0:
    # Make one pass placing column j of STRIPS before the current result and
    # then another pass placing it after.
    for prefix in [True, False]:
      # Keep track of the best j and highest possible probablistic word count.
      best_j = 0
      best_word_count = 0
      for j in remaining_strips:  # Columns
        word_count = 0
        # Keep track of the number of rows without probable words. Rows which are
        # not checked i.e. without a prospective word of length > 2 or where
        # STRIPS[i][j] is a space (doesn't add any new information) do not count.
        rows_without_words = 0
        for i, row in enumerate(result):  # Rows
          # More than one row without probable words means this column is likely
          # in the wrong position.
          if rows_without_words > 1:
            break
          if STRIPS[i][j] == ' ':  # No new information, continue to next row.
            continue
          prospective_word, exact, startswith = ProspectiveWord(i, j, row, prefix)
          # Too short a word/word fragment, continue to next row.
          if len(prospective_word) < 3:
            continue

          # Total up all the prospective word matches and update the state.
          temp_word_count = 0
          for word in word_set:
            temp_word_count += WordMatch(word, prospective_word, exact, startswith)

          if temp_word_count == 0:
            rows_without_words += 1
          else:
            word_count += temp_word_count

        # More than one row without probable words means this column is likely
        # in the wrong position.
        if rows_without_words > 1:
          continue

        if word_count > best_word_count:
          best_word_count = word_count
          best_j = j

      if best_j != 0:
        if prefix:
          strip_order.insert(0, best_j)
        else:
          strip_order.append(best_j)
        for i in xrange(len(result)):
          if prefix:
            result[i] = STRIPS[i][best_j] + result[i]
          else:
            result[i] = result[i] + STRIPS[i][best_j]
        remaining_strips.remove(best_j)
        print 'strip_order: ', strip_order
        for row in result:
          print row
          print ' '

def main(argv):
  word_set = WordsToSet()
  p2(word_set)

if __name__ == '__main__':
  main(sys.argv)
</pre>
<p>Here&#8217;s what the output looks like so you can see it building up the solution:</p>
<p>strip_order:  [6, 0]<br />
aude<br />
eory<br />
obab<br />
 the<br />
u wo<br />
th t<br />
eory<br />
 thi</p>
<p>strip_order:  [6, 0, 15]<br />
aude s<br />
eory<br />
obabil<br />
 the c<br />
u woul<br />
th the<br />
eory o<br />
 this </p>
<p>strip_order:  [3, 6, 0, 15]<br />
claude s<br />
theory<br />
probabil<br />
of the c<br />
you woul<br />
with the<br />
theory o<br />
in this </p>
<p>strip_order:  [3, 6, 0, 15, 11]<br />
claude sha<br />
theory wh<br />
probabilis<br />
of the cod<br />
you would<br />
with the p<br />
theory of<br />
in this ye</p>
<p>strip_order:  [3, 6, 0, 15, 11, 13]<br />
claude shann<br />
theory whic<br />
probabilisti<br />
of the code<br />
you would us<br />
with the pap<br />
theory of co<br />
in this year</p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18]<br />
claude shannon<br />
theory which<br />
probabilistic<br />
of the code br<br />
you would use<br />
with the paper<br />
theory of comm<br />
in this year </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2]<br />
claude shannon f<br />
theory which is<br />
probabilistic la<br />
of the code brea<br />
you would use to<br />
with the paper t<br />
theory of commun<br />
in this year  </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14]<br />
claude shannon fou<br />
theory which is t<br />
probabilistic lang<br />
of the code breaki<br />
you would use to s<br />
with the paper tit<br />
theory of communic<br />
in this year   </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17]<br />
claude shannon found<br />
theory which is the<br />
probabilistic langua<br />
of the code breaking<br />
you would use to sol<br />
with the paper title<br />
theory of communicat<br />
in this year    </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5]<br />
claude shannon founded<br />
theory which is the b<br />
probabilistic language<br />
of the code breaking m<br />
you would use to solve<br />
with the paper titled<br />
theory of communicatio<br />
in this year     </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7]<br />
claude shannon founded i<br />
theory which is the bas<br />
probabilistic language m<br />
of the code breaking met<br />
you would use to solve t<br />
with the paper titled  a<br />
theory of communication<br />
in this year      </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4]<br />
claude shannon founded inf<br />
theory which is the basis<br />
probabilistic language mod<br />
of the code breaking metho<br />
you would use to solve thi<br />
with the paper titled  a m<br />
theory of communication<br />
in this year       </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12]<br />
claude shannon founded infor<br />
theory which is the basis o<br />
probabilistic language model<br />
of the code breaking methods<br />
you would use to solve this<br />
with the paper titled  a mat<br />
theory of communication  pu<br />
in this year        </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12, 10]<br />
claude shannon founded informa<br />
theory which is the basis of<br />
probabilistic language models<br />
of the code breaking methods t<br />
you would use to solve this pr<br />
with the paper titled  a mathe<br />
theory of communication  publ<br />
in this year         </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12, 10, 8]<br />
claude shannon founded informati<br />
theory which is the basis of<br />
probabilistic language models an<br />
of the code breaking methods tha<br />
you would use to solve this prob<br />
with the paper titled  a mathema<br />
theory of communication  publis<br />
in this year          </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12, 10, 8, 16]</p>
<p>theory which is the basis of<br />
probabilistic language models and<br />
of the code breaking methods that<br />
you would use to solve this proble<br />
with the paper titled  a mathemati<br />
theory of communication  publishe<br />
in this year           </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12, 10, 8, 16, 1]<br />
claude shannon founded information<br />
theory which is the basis of<br />
probabilistic language models and<br />
of the code breaking methods that<br />
you would use to solve this problem<br />
with the paper titled  a mathematica<br />
theory of communication  published<br />
in this year            </p>
<p>strip_order:  [3, 6, 0, 15, 11, 13, 18, 2, 14, 17, 5, 7, 4, 12, 10, 8, 16, 1, 9]<br />
claude shannon founded information<br />
theory which is the basis of<br />
probabilistic language models and<br />
of the code breaking methods that<br />
you would use to solve this problem<br />
with the paper titled  a mathematical<br />
theory of communication  published<br />
in this year             </p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2012/01/09/ai-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Other 99% of Halloween Candy Distributors</title>
		<link>http://www.madpickles.org/rokjoo/2011/11/02/the-other-99-of-halloween-candy-distributors/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/11/02/the-other-99-of-halloween-candy-distributors/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 01:16:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Domestic]]></category>
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=592</guid>
		<description><![CDATA[Here&#8217;s another 1% vs. 99% that I believe has been overlooked in the media; I posit each year 1% of the population gets to give out over 20% of the candy (and 10% of the population gets to give out more than 70% of the candy) on Halloween. In cities across America, there has been [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another 1% vs. 99% that I believe has been overlooked in the media; I posit each year 1% of the population gets to give out over 20% of the candy (and 10% of the population gets to give out more than 70% of the candy) on Halloween. In cities across America, there has been a growing trend where parents drive their children to a specific street on which to go trick-or-treating because a number of houses in that area will go all out in terms of decorations and &#8220;atmosphere&#8221; e.g. building haunted houses, ransacking the local Spirit store for the latest in animatronic ghouls, etc. Houses on these streets will give out hundreds, if not <a href="http://www.berkeleyside.com/2009/10/23/berkeleys-halloween/" rel="nofollow" target="_blank">thousands of pieces of candy</a> and the streets will be overrun with kids and parents alike. I do not live on one of those streets and just like <a href="http://www.madpickles.org/rokjoo/2010/10/31/halloween/">last Halloween</a>, our visitation rate this year was abysmal.</p>
<p>6:23p bee musketeer<br />
6:56p butterfly and skeleton<br />
7:11p airplane<br />
7:30p spider girl?<br />
7:35p fireman<br />
7:40p 2 cowboys<br />
7:41p 3 teenagers, no costumes<br />
8:42p 3 teenagers (different ones), no costumes</p>
<p>I left our lit Halloween decorations along the 8ft path to our front door out until 10p and our porch light on until 11p. One can walk to 2 elementary, 1 middle and 1 high school within 0.7mi of my house; I don&#8217;t live on a busy street and there is a sidewalk. Many of the kids don&#8217;t even like to go to the mega-trick-or-treat zones; my wife works at an afterschool program and they complain it&#8217;s too crowded and easy to get separated from their friends; however, the parents feel it&#8217;s &#8220;the thing to do&#8221;. Our neighbors also seem to think the number of trick-or-treaters dropped from last year and I&#8217;m sure they have a bunch of excess candy just as we do. There&#8217;s a clear market inefficiency.For the first month+ of the <a href="http://en.wikipedia.org/wiki/Occupy_Wall_Street" rel="nofollow" target="_blank">Occupy Wall Street</a> protests, I managed to turn a blind eye, blissfully occupying myself with baseball pennant chases, painting close to 1,000 sqft of outdoor fencing, Stanford&#8217;s Online Class &#8211; <a href="https://www.ai-class.com/" rel="nofollow" target="_blank">Introduction to Artificial Intelligence</a>, etc. One evening, while walking back from the grocery store I expressed interest in seeing what one of these Occupy <insert place here> camps looked like and my wife mentioned if we walked down Martin Luther King Jr. Way (in Berkeley, CA) we&#8217;d pass by Occupy Berkeley. There wasn&#8217;t much activity, granted it was a Thursday night, just a handful of tents and some signs.</p>
<p>The next day I took a stroll by Occupy San Francisco along the Embarcadero, and it looked as if a number of homeless people decided to hang out together. I have nothing against homeless people, but I don&#8217;t think the many of the Occupy San Francisco population were &#8216;protesters&#8217;. Perhaps homelessness is a by-product of the state of affaires the Occupy Wall Street movement wants addressed; but I imagine most of the people I saw at Occupy San Francisco were homeless first and protestors second, if at all. I passed on visiting the Occupy Oakland camp due to the violence. Meanwhile the topic of &#8220;the other 99%&#8221; kept coming up more and more in conversation, such that I could no longer ignore it.</p>
<p>Based on the <a href="http://www.irs.gov/taxstats/indtaxstats/article/0,,id=96981,00.html" rel="nofollow" target="_blank">IRS Adjusted Gross Income Statistics</a> my yearly income has put me in the top quintile (20%) ever since I graduated from college. This is not a result of me being especially brilliant or even lucky as if I were either of those I would probably have dropped out of college and joined the 1% during the dot-com bubble instead of catching the crash at the end. The two dominant factors are likely that I live in one of the most expensive areas of the country (San Francisco Bay Area) and work in an industry (computer software) which has higher than average salaries. In the last few yea<br />
rs I&#8217;ve probably moved up into the top 10% and routinely interact with people who are currently in the top 1%, or have been in the past (you can check yourself for the current year via the <a href="http://blogs.wsj.com/economics/2011/10/19/what-percent-are-you/">Wall Street Journal&#8217;s &#8220;what percent are you?&#8221;</a> calculator).</p>
<p>So in a sense, the current system works for me i.e. I can work within its constraints to do most of what I want to do. Note I do not aspire to have a Gulfstream 500 (I haven&#8217;t even ever flown first-class), houses in 5 different countries, or even retire early at this point. However, I realize the system has also failed many people, myself included to a degree as I am reluctantly a landlord due the the mortgage lending situation swinging wildly from giving loans to anyone who can breath to only giving loans to people with nearly perfect credit and a whole bunch of assets. Of course it could be much worse, I could not have a place to live or the ability to feed myself, but at the same time I&#8217;m contributing (proportionally) a great deal financially back into the system via taxes, charitable donations, etc. And I&#8217;m willing to contribute more because I know that not all work is valued appropriately and infrastructure is important to ev<br />
eryone&#8217;s well-being whether they use it directly or not.</p>
<p>It frustrates me the more I think about the Occupy* movement because while I agree with their general sentiment that what has happened with the economy recently sucks and should not have happened, I fail to see how they&#8217;re changing anything for the better. I suppose the current system of mass congregation to Halloween trick-or-treat zones works for the people on those streets who enjoy handing out disproportionate amounts of candy, but it doesn&#8217;t work for me. Maybe I should have tried occupying some of their front porches trying highlight the inequalities.</p>
<p>Instead, next year I will attempt to increase the demand in my area. I&#8217;m thinking about either stepping up to handing out full size (or perhaps king size?) candy bars and/or fancier Ghirardelli chocolate; perhaps word will spread that our street is worth visiting. Another thought I had was to put up neon orange signs, much like is done for a garage sale, advertising the bounty that awaits those willing to broaden their horizons. Perhaps our neighbors would be willing to join us in increasing the Halloween value of our block.</p>
<p>As silly as it sounds within the context of handing out Halloween candy, the general ideas i.e. increasing one&#8217;s value to society, making people aware of it and attempting to get others to join your cause seem like the only legitimate ways to change the situation. I wish the Occupy* movement would focus their efforts on something more productive than civil disobedience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/11/02/the-other-99-of-halloween-candy-distributors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tarantula Hunting</title>
		<link>http://www.madpickles.org/rokjoo/2011/10/16/tarantula-hunting/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/10/16/tarantula-hunting/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 00:41:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hiking]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=578</guid>
		<description><![CDATA[For the last 5+ years I have been thinking about heading to Mt. Diablo to look for tarantulas during their October mating season (usually in November after realizing I missed it&#8230;again). Some years I had a good excuse for forgetting e.g. travelling to New York twice to watch Yankees win the ALCS and World Series [...]]]></description>
			<content:encoded><![CDATA[<p>For the last 5+ years I have been thinking about heading to Mt. Diablo to look for tarantulas during their October mating season (usually in November after realizing I missed it&#8230;again).  Some years I had a good excuse for forgetting e.g. travelling to New York twice to watch Yankees win the ALCS and <a href="http://www.madpickles.org/rokjoo/2009/11/14/thuhuhuhuhuh-yankees-win/" target="_blank">World Series in 2009</a>; Halloween has also taken place over the weekend in recent years, sometimes the weather isn&#8217;t cooperative, etc. This year the Yankees exited the postseason early and even though I was too late to sign up for the <a href="http://www.mdia.org/events.htm" target="_blank">guided hikes</a>, decided take a shot at finding some spiders.</p>
<p>The male tarantulas come out around dusk towards the end of September and throughout October. We rolled up to the <a href="http://maps.google.com/maps/place?q=Parks+%26+Recreation&#038;cid=16229065464992484770" target="_blank">Mitchell Canyon entrance</a> in <a href="http://www.parks.ca.gov/?page_id=517" target="_blank">Mt. Diablo State Park</a> a bit before 6p and headed up the trail towards Deer Flat. After about 10 minutes, we came across our first tarantula, getting harassed by two families. Tarantulas in general, and especially the species found on Mt. Diablo, Aphonopelma smithi, are not very dangerous or aggressive. Because of this, many people attempt to handle the spiders. The recommended method is to place your hand on the ground in the spider&#8217;s path and allow it to walk over it. Raising it off the ground or attempting to touch it directly will likely scare the tarantula causing it to fling its urticating hairs and/or bite. Neither this group, or the next one we saw 10 minutes later seemed to heed this recommendation.</p>
<p>It&#8217;s actually quite tiring to continuously scan the trail trying to spot a brown tarantula at dusk on the brown dirt trail, amid the dirt covered rocks and poop. At 6:30p we turned around to head back, the possibility of seeing a spider outside of a tarantula jam (see <a href="http://www.thefreedictionary.com/bear+jam" target="_blank" rel="nofolow">bear jam</a>) fading fast with the declining light. About 5 minutes later we happened upon a tarantula resting on the side of the trail. After snapping a few photos we hustled back to the car.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6251200737/" title="Aphonopelma smithi by madpickles, on Flickr" target="_blank"><img src="http://farm7.static.flickr.com/6036/6251200737_e864b027bf.jpg" width="500" height="333" alt="Aphonopelma smithi"></a><br />
Shot at f2.0 due to the very low light conditions.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6251729096/" title="Dinosaur and Tarantula by madpickles, on Flickr" target="_blank"><img src="http://farm7.static.flickr.com/6043/6251729096_9337a24378.jpg" width="500" height="333" alt="Dinosaur and Tarantula"></a><br />
Dinosaur for scale.</p>
<p>If you decide to go, there is a $6 entrance fee and even though the sign says the park closes at sunset, you don&#8217;t have to worry about getting locked in the parking lot (the entrance gate is locked but the exit has no gate, just the &#8220;don&#8217;t reverse or your tires will pop spikes&#8221;). You shouldn&#8217;t have to walk far, we probably only walked a bit more than 1 mi up the trail. On the off chance you fail to spot any spiders, you will still be treated to some nice fall foliage.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6251200025/" title="Fall Colors by madpickles, on Flickr" target="_blank"><img src="http://farm7.static.flickr.com/6238/6251200025_34afea3d59.jpg" width="333" height="500" alt="Fall Colors"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/10/16/tarantula-hunting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scamazon Credit Card</title>
		<link>http://www.madpickles.org/rokjoo/2011/09/15/scamazon-credit-card/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/09/15/scamazon-credit-card/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 20:10:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Domestic]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=573</guid>
		<description><![CDATA[Amazon.com has a no annual fee rewards Visa card with a simple points earning structure: 3 Points: For every $1 spent on Amazon.com 2 Points: For every eligible $1 spent at gas stations, restaurants, drug stores, and office supply stores 1 Point: For every other $1 spent On the plus side the card doesn&#8217;t charge [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon.com has a no annual fee rewards Visa card with a simple points earning structure:</p>
<ul>
<li>3 Points: For every $1 spent on Amazon.com</li>
<li>2 Points: For every eligible $1 spent at gas stations, restaurants, drug stores, and office supply stores</li>
<li>1 Point: For every other $1 spent</li>
</ul>
<p>On the plus side the card doesn&#8217;t charge an annual fee; on the minus side, the rewards certainly do not rank amongst the best in terms of points conversion i.e. most rewards convert at a value of $1 per 100 points e.g. $50 statement credit is 5,000 points. The only ones which convert at a higher rate are airline tickets e.g. a roundtrip continental U.S. flight up to $400 in value is 25,000 points or a roundtrip flight anywhere up to $1,600 is 90,000 points. It&#8217;s lame that some of the rewards are gift cards to restaurants or gas stations since it&#8217;d be better to charge those purchases on the card, get 2 points per $1 and then convert them into a statement credit. Even worse are the Amazon.com gift cards as money spent on Amazon.com purchases converts at a 3-to-1 ratio.</p>
<p>Lately Amazon has been pushing &#8220;pay with points&#8221; when during checkout which allows one to convert points at the 100 to $1 rate to pay for purchases. Anyone who does this loses money just as they would with the restaurant and gas station gift card redemption. The worst part is Amazon makes it so easy to lose money as there is no waiting for a gift card to arrive in the mail. If it isn&#8217;t clear why this is such a bad deal, here&#8217;s an example.</p>
<p>Let&#8217;s say someone spends $5,000 each year on an Amazon.com Visa card, $2,000 of which was on Amazon.com, $1,000 on gas and restaurants and $2,000 on other purchases. At the end of the first year that person would have (2,000 x 3) + (1,000 x 2) + 2,000 = 10,000 points. That could be redeemed for a $100 statement credit or $100 restaurant gift card or spent on $100 worth of Amazon.com purchases.</p>
<p>If the person pays with points on Amazon.com, then the next year they have still acquired $5,000 worth of products but only have (1,900 x 3) + (1,000 x 2) + 2,000 = 9,700 points, good for $97 worth of rewards. Granted that&#8217;s only $3 but why give away $3 or reframed, 3% of one&#8217;s rewards for no reason? Even more importantly, why would a company that in so many other ways focuses on what&#8217;s best for the consumer, provide an option that clearly doesn&#8217;t benefit the consumer?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/09/15/scamazon-credit-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My 7 Links</title>
		<link>http://www.madpickles.org/rokjoo/2011/09/08/my-7-links/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/09/08/my-7-links/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 03:05:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=564</guid>
		<description><![CDATA[My friend Meliha invited me to take part in the Tripbase My 7 Links Project which asks me to identify: My most beautiful post My most popular post My most controversial post My most helpful post A post whose success surprised me A post I feel didn’t get the attention it deserved The post that [...]]]></description>
			<content:encoded><![CDATA[<p>My friend <a href="http://travel.desiblonde.com/" target="_blank">Meliha</a> invited me to take part in the <a href="http://blog.tripbase.com/blog/my-7-links-the-rules/" target="_blank" rel="nofollow">Tripbase My 7 Links Project</a> which asks me to identify:</p>
<ul>
<li>My most beautiful post</li>
<li>My most popular post</li>
<li>My most controversial post</li>
<li>My most helpful post</li>
<li>A post whose success surprised me</li>
<li>A post I feel didn’t get the attention it deserved</li>
<li>The post that I am most proud of</li>
</ul>
<p>Even though <a href="http://blog.tripbase.com/blog/" target="_blank">Tripbase</a> is focused on travel, I won&#8217;t necessarily restrict my selections to travel related posts.</p>
<p><strong>My most beautiful post</strong><br />
I think that would have to be the <a href="http://www.madpickles.org/rokjoo/2010/06/23/final-launch-of-space-shuttle-atlantis/" target="_blank" title="Final Launch of Space Shuttle Atlantis">Final Launch of Space Shuttle Atlantis</a> (well as it turned out, the penultimate launch). Not only are the photos beautiful, but the opportunity to experience a launch of a space shuttle has sadly gone the way of the Dodo.</p>
<p><strong>My most popular post</strong><br />
According to Google Analytics it&#8217;s <a href="http://www.madpickles.org/rokjoo/2011/04/21/predicting-when-derek-jeters-3000th-career-hit-will-occur/" title="Predicting When Derek Jeter's 3000th Hit Will Occur" target="_blank">Predicting When Derek Jeter&#8217;s 3000th Hit Will Occur</a>. I was completely wrong, mainly due to Jeter going on the disabled list and missing 20 or so games.</p>
<p><strong>My most controversial post</strong><br />
Definitely <a href="http://www.madpickles.org/rokjoo/2011/02/14/ibm-watson-vs-google-search/" title="IBM Watson Vs. Google Search" target="_blank">IBM Watson Vs. Google Search</a>. In addition to the comments on my blog, &#8220;kenjackson&#8221; <a href="http://news.ycombinator.com/item?id=2227042" target="_blank" rel="nofollow">slighted me on Hacker News</a>. What cracks me up the most is how people who don&#8217;t work at Google think they authoritatively know how Google works and what it does and doesn&#8217;t do with regard to A.I. and natural language processing.</p>
<p><strong>My most helpful post</strong><br />
Most likely <a href="http://www.madpickles.org/rokjoo/2010/08/11/gpx-elevation-profile-plotting-with-the-google-chart-api/" title="GPX Elevation Profile Plotting With The Google Chart API" target="_blank">GPX Elevation Profile Plotting With The Google Chart API</a>. Based on the traffic and when my page shows up in search results I think most people find the GPX parsing/elevation calculation code useful as when I wrote it there weren&#8217;t many examples that just worked e.g. people would describe calculations or enumerate the mathematical formulas, but didn&#8217;t commit them to code.</p>
<p><strong>A post whose success surprised me</strong><br />
I don&#8217;t really know if any of my posts can be considered a &#8220;success&#8221; but maybe my research into some <a href="http://www.madpickles.org/rokjoo/2010/12/19/art-history/" title="Art History" target="_blank">Art History</a> after a visit to the musée du Louvre fits the bill. </p>
<p><strong>A post I feel didn’t get the attention it deserved</strong><br />
After re-reading my waxing philosophical post about <a href="http://www.madpickles.org/rokjoo/2009/09/30/giants/" title="Redwood Trees" target="_blank">Redwood Trees</a> surprised me. According to Google Analytics not many people have read this post, but I think it&#8217;s probably one of my best.</p>
<p><strong>The post that I am most proud of</strong><br />
Idea-wise, the previous post may be the one I&#8217;m most proud of; however, in terms of travel and personal achievements I&#8217;d have to say my <a href="http://www.madpickles.org/rokjoo/2011/01/31/great-expectations/" title="Great Expectations" target="_blank">Great Expectations</a> post takes the cake as I wove together 3 mentally and physically challenging endeavors and question why I do the things I do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/09/08/my-7-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bench Building</title>
		<link>http://www.madpickles.org/rokjoo/2011/08/15/bench-building/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/08/15/bench-building/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 01:16:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Domestic]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=555</guid>
		<description><![CDATA[Sometimes my DIY ethos gets the best of me, case in point being the need for a bench so we could host 7 guests at a BBQ in our back yard last month. For less than $50, and probably an hour of my time I could have built one with a bench kit and a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes my DIY ethos gets the best of me, case in point being the need for a bench so we could host 7 guests at a BBQ in our back yard last month. For less than $50, and probably an hour of my time I could have built one with <a href="http://www.amzn.com/B000BDG7UI" title="a bench kit" target="_blank" rel="nofollow">a bench kit</a> and a bunch of 2x4s. Instead I decided to design my own which ended up costing twice as much and probably took 10 times longer :S.</p>
<p>With rough target dimensions of 18&#8243; high, 12&#8243; wide and 6&#8242; in length, I went to our local Home Depot to check out the available lumber and cost. One of the many things in my life classifiable as &#8220;obvious but overlooked&#8221; is <a href="http://www.engineeringtoolbox.com/wood-density-d_40.html" title="wood density varies by species" target="_blank">wood density varies by species</a>. This became readily apparent after picking up a piece of Poplar, deciding it didn&#8217;t look nice and then picking up the same size piece of Oak which weighed twice as much.</p>
<p>After walking around and around searching for light wood that looked nice and would fit in the car without having to run down an employee to cut it down to size, I ended up with Redwood. An additional upside with Redwood is its <a href="http://www.nps.gov/history/history/online_books/shirley/sec6.htm" title="resistance to insects, fungi and fire" target="_blank">resistance to insects, fungi and fire</a>. A downside is its additional cost. I mitigated that by using some rough cut fence pickets in on the underside of the seating area which were 1/4 the price of the nicely finished planks.</p>
<p>Here&#8217;s a photo of the raw wood, 4 finished 1&#215;6 boards, 3 1&#215;6 fence pickets, 1 4&#215;4 post and 3 2&#215;2 posts (I actually ended up not using one of the 2&#215;2 posts).</p>
<p><a href="http://www.flickr.com/photos/madpickles/6047933686/" title="Raw Pieces by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6193/6047933686_625bb4e236.jpg" width="500" height="375" alt="Raw Pieces"></a></p>
<p>And here is a photo of all the pieces of wood cut down to size.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6047381973/" title="Pieces Cut to Size by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6088/6047381973_6b2f100793.jpg" width="375" height="500" alt="Pieces Cut to Size"></a></p>
<p>Here are the assembled &#8220;legs&#8221;.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6047934144/" title="Legs by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6191/6047934144_c1cf9f9f7e.jpg" width="500" height="375" alt="Legs"></a></p>
<p>This is a shot of the legs and seating area cross supports getting attached to the fence pickets.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6047934494/" title="Attaching Legs and Cross Supports by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6073/6047934494_c1a214ced7.jpg" width="500" height="375" alt="Attaching Legs and Cross Supports"></a></p>
<p>And here are a few shots of the finished product.</p>
<p><a href="http://www.flickr.com/photos/madpickles/6047933758/" title="Finished 2 by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6204/6047933758_8f3d29a969.jpg" width="375" height="500" alt="Finished 2"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/6047933966/" title="Finished 1 by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6090/6047933966_8350dc8b41.jpg" width="500" height="375" alt="Finished 1"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/6047933730/" title="Finished 3 by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6189/6047933730_1257bd951a.jpg" width="375" height="500" alt="Finished 3"></a></p>
<p>If I had to do it over I probably would have spent more for 2x6s instead of layered 1x6s for the seating area mainly for aesthetic reasons i.e. I wouldn&#8217;t have had to use so many visible screws. Other than that, the bench has performed well, having been used 3 times with no casualties.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/08/15/bench-building/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halfway To Hawaii</title>
		<link>http://www.madpickles.org/rokjoo/2011/07/06/halfway-to-hawaii/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/07/06/halfway-to-hawaii/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 16:58:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=544</guid>
		<description><![CDATA[During a recent United flight from San Francisco to Maui, I played the &#8220;Halfway to Hawaii Game&#8221;. The objective, determine the exact time the airplane would reach the geographical midpoint of the flight to Hawaii. Shortly after takeoff, the crew provided this flight data: Departure &#8211; 6:07a Hawaii time Duration &#8211; 4hrs 42min Distance &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>During a recent United flight from San Francisco to Maui, I played the &#8220;Halfway to Hawaii Game&#8221;. The objective, determine the exact time the airplane would reach the geographical midpoint of the flight to Hawaii. Shortly after takeoff, the crew provided this flight data:</p>
<p>Departure &#8211; 6:07a Hawaii time<br />
Duration &#8211; 4hrs 42min<br />
Distance &#8211; 2076mi<br />
Cruising speed &#8211; 485mph<br />
Headwinds &#8211; 30mph during the first half and 25mph during the second</p>
<p>Participating passengers were asked to make their estimate accurate to the second (for tiebreak purposes), nevermind the fact that neither the departure time, nor duration provided that level of granularity or that pilots are human and don&#8217;t necessarily stay true to the flight plan or weather predictions are not very accurate etc The first thought that crossed my mind was, why such a low top speed? The speed of sound through air at sea level is 768mph and I am pretty sure the last few flights I&#8217;ve been on all had top speeds of 500+mph. <a href="http://www.msnbc.msn.com/id/24410809/ns/business-us_business/t/airlines-slow-down-flights-save-fuel/">Airlines have been slowing down flights to save fuel</a> for a while now, but 485mph seems a bit extreme.</p>
<p>Getting back to formulating a guess, in addition to all the issues listed above, clearly not enough information had been provided e.g. what was the rate of acceleration/deceleration during takeoff and landing? Other information had been pre-processed in some manner e.g. the headwinds were likely averages over each half of the flight. Using just the duration, one could of course come up with a naive guess figuring the first half of the flight would take 2hrs 21min. However, one might suspect the headwind data should be taken into account as they were supposed to be stronger during the first half of the flight. If we&#8217;d be travelling at 455mph during the first half vs. 460mph during the second, ignoring take-off and landing, it would take 2.281hrs to cover the first half and 2.257hrs for the second. The total flight time was supposed to be 4.7hrs so the remaining 0.162hrs needed to be distributed.<br />
<span id="more-544"></span><br />
At this point, I could have just split the time 50/50 yielding a first half travel time of 2.362hrs or 2hrs 21min 43.2sec, but my gut told me that going from 0-cruising speed happens faster than cruising-0, maybe something like a 40/60 ratio. So I only added 40% of the 0.162hrs to the first half time and ended up with 2.346hrs or 2hrs 20min 46sec yielding a guess of 8:27:46a. The actual time? 8:27:47a (typical programmer off by one error?). No one else&#8217;s guess was closer than mine, so I won a <a href="http://jakeshimabukuro.com/music/peace_love_ukulele/">Peace Love Ukulele</a> CD by <a href="http://jakeshimabukuro.com/">Jake Shimabukuro</a>. I wonder if anyone just halved the duration as that would have been pretty darn close, 8:21:00a, likely a winning guess if it weren&#8217;t for someone like me completely over-thinking the problem and probably getting lucky in the process.</p>
<p>When I got home I checked the Internet to see what others had said about this game and didn&#8217;t realize United had been a &#8220;thing&#8221; on United for many years (message board posts asking how to win date back to at least 2002). Apparently past prizes have been bottles of champagne or 3 cans of macadamia nuts; sometimes tailwind in addition to headwind information is provided and/or the distance is given in knots vs mph. People have posted their formulas online, most of them don&#8217;t try to account for takeoff or landing but do take into account windspeed. On this flight, those would have resulted in a worse guess than just halving the travel time. Anyway with one win in one attempt and only being off by one second, clearly my formula is the best right <img src='http://www.madpickles.org/rokjoo/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>s1 = speed &#8211; first half headwind OR speed + first half tailwind<br />
s2 = speed &#8211; second half headwind OR speed + second half tailwind<br />
t1 = distance / 2 / s1<br />
t2 = distance / 2 / s2<br />
t3 = total time &#8211; t1 &#8211; t2<br />
first half travel time = t1 + .4 * t3<br />
first half arrival time = first half travel time + departure time</p>
<p>Note the first half travel time will need to be converted to hours/minutes/seconds. And because no one really cares about this stuff and really just wants to see a photo from Hawaii, here&#8217;s a Maui sunset taken via a Nexus S.</p>
<p><a href="http://www.flickr.com/photos/madpickles/5909404590/" title="Maui Sunset from Lahaina by madpickles, on Flickr"><img src="http://farm7.static.flickr.com/6015/5909404590_1f7f627fca.jpg" width="500" height="375" alt="Maui Sunset from Lahaina"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/07/06/halfway-to-hawaii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Big Double Cheddar Mac Beef Down</title>
		<link>http://www.madpickles.org/rokjoo/2011/06/27/big-double-cheddar-mac-beef-down/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/06/27/big-double-cheddar-mac-beef-down/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 17:16:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Domestic]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=502</guid>
		<description><![CDATA[Every now and then it&#8217;s useful to challenge oneself, to grow, to stretch. A couple of months ago, a friend of mine noticed a McDonalds, Kentucky Fried Chicken and Arby&#8217;s within spitting distance of each other, a trifecta of sorts. Then came the eureka moment, where he envisioned combining a Big Mac, Double Down and [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then it&#8217;s useful to challenge oneself, to grow, to stretch. A couple of months ago, a friend of mine noticed a McDonalds, Kentucky Fried Chicken and Arby&#8217;s within spitting distance of each other, a trifecta of sorts. Then came the eureka moment, where he envisioned combining a Big Mac, Double Down and Beef &#8216;n Cheddar into the greatest fast food sandwich imaginable.</p>
<p><a title="Supplies by madpickles, on Flickr" href="http://www.flickr.com/photos/madpickles/5866439651/"><img src="http://farm7.static.flickr.com/6036/5866439651_1dfef9d001.jpg" alt="Supplies" width="339" height="500" /></a></p>
<p>The supplies (we put some fries into the sandwich for good measure).</p>
<p><a title="Three Main Ingredients by madpickles, on Flickr" href="http://www.flickr.com/photos/madpickles/5866439693/"><img src="http://farm6.static.flickr.com/5240/5866439693_2c16bae588.jpg" alt="Three Main Ingredients" width="500" height="208" /></a></p>
<p>The main ingredients, from left to right, Big Mac, Double Down, Beef &#8216;n Cheddar.<br />
<span id="more-502"></span><br />
<a title="Big Double Cheddar Mac Beef Down by madpickles, on Flickr" href="http://www.flickr.com/photos/madpickles/5866439735/"><img src="http://farm4.static.flickr.com/3076/5866439735_4249d2b27f.jpg" alt="Big Double Cheddar Mac Beef Down" width="233" height="500" /></a></p>
<p>Assembly complete.</p>
<p>At this point, you might be wondering what nutritional value this behemoth contains, so I&#8217;ve compiled it below using the official <a rel="nofollow" href="http://www.arbys.com/menu/roast-beef/regular-beef-ncheddar.html" target="_blank">Arby&#8217;s Menu</a>, <a rel="nofollow" href="http://nutrition.mcdonalds.com/nutritionexchange/nutritionfacts.pdf" target="_blank">McDonalds Nutrition Facts</a> and <a rel="nofollow" href="http://www.kfc.com/nutrition/pdf/kfc_nutrition.pdf" target="_blank">KFC Nutrition Information</a>. The % daily values are based off of the <a href="http://www.fda.gov/Food/GuidanceComplianceRegulatoryInformation/GuidanceDocuments/FoodLabelingNutrition/FoodLabelingGuide/ucm064928.htm" target="_blank">US FDA Reference Daily Intake</a> of a 2,000 calorie diet.</p>
<p><iframe src="https://spreadsheets.google.com/spreadsheet/pub?hl=en_US&#038;hl=en_US&#038;key=0AithY_dqztjXdG1BNGROcHFNWnZxSnVNUV9hZXg2dlE&#038;single=true&#038;gid=0&#038;output=html" width="1255" height="230" style="border: 0px;"></iframe></p>
<p>I was shocked, I figured I would at least be consuming 1,500 calories and more than 100% of the daily value in several categories. As it turns out, compared to the <a href="http://www.dailyspark.com/blog.asp?post=top_10_list_the_worst_restaurant_salads_you_may_be_eating" target="_blank">10 Worst Restaurant Salads</a>, this sandwich would rank 2nd by sodium, but only 5th by calories and 10th by total fat! In fact, with a bit less sodium I would consider the Beef &#8216;n Cheddar healthy. Percentage wise, it&#8217;s actually the protein content which is furthest from the norm.</p>
<p><a title="One Bite At A Time by madpickles, on Flickr" href="http://www.flickr.com/photos/madpickles/5866992386/"><img src="http://farm6.static.flickr.com/5069/5866992386_128ded3b1b.jpg" alt="One Bite At A Time" width="375" height="500" /></a></p>
<p>An action shot.</p>
<p><a title="In Progress by madpickles, on Flickr" href="http://www.flickr.com/photos/madpickles/5866992468/"><img src="http://farm4.static.flickr.com/3082/5866992468_3f37da9697.jpg" alt="In Progress" width="375" height="500" /></a></p>
<p>Slow and steady.</p>
<p>My friend finished his sandwich quite a few minutes before I did. The final 5 bites or so were tough, but in the end I too prevailed. However, a part of me still felt empty inside&#8230;we had not come up with a good name for the creation. I thought some permutation of the words in the sandwich names would pop out as an obvious choice, but that didn&#8217;t happen. In the end I decided to write a script to generate all the permutations (leaving out the &#8216;n &#8220;word&#8221;) which left me with 6! (720) possibilities. My first version was recursive and looked like this:</p>
<pre>#!/usr/bin/python

import sys

def permute(l):
  if len(l) == 2:
    original = list(l)
    l.reverse()
    return [original, l]

  accumulated_permutations = []
  for x in xrange(len(l)):
    element = l[0]
    permutations = permute(l[1:])
    for permutation in permutations:
      permutation.append(element)
    accumulated_permutations.extend(permutations)

  return accumulated_permutations

def main(argv):
  name_permutations = permute(['big', 'mac', 'double', 'down', 'beef', 'cheddar'])
  for x in name_permutations:
    print ' '.join(x)

if __name__ == '__main__':
  main(sys.argv)</pre>
<p>That certainly worked, but a part of me wasn&#8217;t happy with the algorithm. It created an awful lot of new lists and generated the entire result set in memory before returning. If I ever wanted to push myself and combine 5 sandwiches where each name was a bigram (permute 10 words) it would take my computer 23 seconds (and 600M+ of RAM) to generate all 10! combinations. With 6 sandwiches (12 words) after 21 minutes my computer had used up 8GB of RAM and still wasn&#8217;t finished. Clearly it would be better to create some sort of iterator or generator to yield permutations as needed. Even better would be to have a method of requesting ranges of permutations as I could then use multiple computers in parallel to generate them and merge the results at the end.</p>
<p>After some more thought I remembered reading about an interesting method of computing permutations based on patterns in <a href="http://hop.perl.plover.com/book/" target="_blank">Higher-Order Perl</a> and after a little more tweaking I had a parallelizable set of functions:</p>
<pre>
#!/usr/bin/python

import sys

def nth_pattern(n, size):
  """Get the Nth pattern for a permutation of a given size."""
  pattern = []
  for i in xrange(1, size + 1):
    pattern.insert(0, n % i)
    n = n / i
  if n:
    return []
  else:
    return pattern

def pattern_to_permutation(pattern, items):
  """Generate a permutation of items based on the pattern."""
  items = items[:]
  r = []
  for x in pattern:
    r.append(items.pop(x))
  return r

def permute(items, start_n, end_n):
  """Generate the range of permutations of items between start_n and end_n."""
  size = len(items)
  while start_n &lt; end_n:
     pattern = nth_pattern(start_n, size)
     if not pattern:
       break
     result = pattern_to_permutation(pattern, items)
     yield result
    start_n += 1

def factorial(n):
  """Compute n!."""
  total  = 1
  while n > 1:
    total = total * n
    n -= 1
  return total

def main(argv):
  """Main driver which could be easily transformed into a MapReduce."""
  names = ['big', 'mac', 'double', 'down', 'beef', 'cheddar']
  num_permutations = factorial(len(names))
  num_machines = argv[1]  # Number of machines to use in parallel.
  end_n = 0
  for machine in xrange(num_machines):
    size = num_permutations / num_machines
    start_n = machine * size
    end_n = (machine + 1) * size
    # This would be an asynchronus  RPC if truely running in parallel.
    p = permute(names, start_n, end_n)

  # In case we have some leftover work
  if end_n &lt; num_permutations:
   p = permute(names, end_n + 1, num_permutations)

if __name__ == '__main__':
  main(sys.argv)
</pre>
<p>The parallizeable version also lends itself to random permutation requests e.g. should I ever visit McDonalds, Kentucky Fried Chicken, Arby&#8217;s, Taco Bell, Burger King, Carl&#8217;s Jr. and In-N-Out:</p>
<pre>
names = ['big', 'mac', 'double', 'down', 'beef', 'cheddar', 'gordita', 'supreme', 'whopper', 'western', 'bacon', 'animal', 'style']
num_permutations = factorial(len(names))
x = random.randint(0, num_permutations)
p = permute(names, x, x + 1)[0]
for permutation in p:
  print permutation
</pre>
<p>I might order a: Double Bacon Down Whopper Gordita Mac Animal Big Cheddar Supreme Western Beef Style!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/06/27/big-double-cheddar-mac-beef-down/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BMW M Coupe</title>
		<link>http://www.madpickles.org/rokjoo/2011/06/15/bmw-m-coupe/</link>
		<comments>http://www.madpickles.org/rokjoo/2011/06/15/bmw-m-coupe/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 16:11:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Domestic]]></category>
		<category><![CDATA[knowledge]]></category>

		<guid isPermaLink="false">http://www.madpickles.org/rokjoo/?p=481</guid>
		<description><![CDATA[In college, I got by without a car. Whether it was going to the grocery store, a punk rock show, the airport etc. I walked, skateboarded, took public transportation or bummed a ride from a friend. Cars were an unnecessary expense and parking was a pain in the ass. When I got a job, I [...]]]></description>
			<content:encoded><![CDATA[<p>In college, I got by without a car. Whether it was going to the grocery store, a punk rock show, the airport etc. I walked, skateboarded, took public transportation or bummed a ride from a friend. Cars were an unnecessary expense and parking was a pain in the ass. When I got a job, I made sure it was convenient to take mass transit. In 2001 my girlfriend&#8217;s 1984 Honda Accord was on its last legs so I decided it was time to buy a replacement; the utility and styling of a hatchback resonated with me; Ford had this new car called a Focus; it came in yellow with a sunroof; I was sold.</p>
<p>That car was totalled less than a year later. I was behind a car at a stop light that had just turned green. A car came crashing into me from behind at 30+ MPH as I was lifting my foot off the brake to accelerate, thereby sending my car crashing into the car ahead (my wife will tell you I had ample time to react and slam on the brakes, but I was in too much shock from the impact). I still liked the styling of the Focus, it had served us well over the last 8 months and they had just come out with a 4 door version; so without much thought I took the money from the insurance company and bought another one.</p>
<p>We had no need for two cars and only had one parking space where we lived, so getting a second car wasn&#8217;t a priority. Fast forwarding to 2009, we still had the Focus, approaching 100k miles and it seemed like a viable replacement in the form of an electric might be just around the corner. Tesla&#8217;s <a href="http://www.tesla.com/roadster" rel="nofollow" target="_blank">roadster</a>, while neither affordable nor practical as a replacement for a 5 seater, proved electric cars could be built with ranges of 250+mi and their <a href="http://www.tesla.com/models" rel="nofollow" target="_blank">Model S</a> was slated for a 2010 release. We purchased a house complete with a driveway, ready to install a high voltage charging circuit. In 2010 our Focus passed 100k miles, but the Model S had been delayed until 2011.<br />
<span id="more-481"></span><br />
As 2010 rolled on, it appeared both the <a href="http://www.nissanusa.com/leaf-electric-car/index" rel="nofollow" target="_blank">Nissan Leaf</a> and <a href="http://www.chevrolet.com/volt/" target="_blank" rel="nofollow">Chevy Volt</a> would be available to the public before the Model S. Unfortunately the Leaf&#8217;s specs just didn&#8217;t cut it (80mi average on a single charge put overnight trips to places like Santa Cruz and Sacramento into questionable territory and Yosemite and Tahoe completely out of reach). The Chevy Volt remained a viable option, but also ran into production delays. Then in early 2011, my wife mentioned she had seen &#8220;one of those cars I liked&#8221; meaning a <a href=http://en.wikipedia.org/wiki/Bmw_z3#Coup.C3.A9" rel="nofollow">BMW Z3 or M Coupe</a> (note this is not an M1 or M3 Coupe even though it shares many of the same parts from the M3 Coupes produced around 2000) . I realized I hadn&#8217;t seen one of them on the road in several years. Only <a href="http://www.e38.org/BMWProductionData.pdf">17,751 Z3 Coupes + M Coupes were produced world wide between 1998 and 2002</a>, of which <a href="http://forum.roadfly.com/threads/6684743">4,746 sold in the US</a> (2, 695 of which were M Coupes). Over the last decade I had casually looked into acquiring one, but the combination of no place to park it as well as the steep prices kept me away.</p>
<p>Now that most of the cars were 10 or more years old and we had a driveway along with ample, relatively safe street parking, I decided to check on the market. Pre-2001 Z3 Coupes were fairly cheap, but the 2.8L 193hp/207ft-lb engine left something to be desired. 2001-2002 Z3 Coupes with the 3.0L 228hp/220ft-lb engines were in short supply and commanded a premium, but could still likely be had for < $10k. However, finding one within driving distance proved challenging. A high milage one turned up in Danville, CA so I took it for a test drive. It seemed to run fine but the owner was hesitant to take it to a mechanic for a pre-sale inspection; so I put in a low offer and got outbid.</p>
<p>At nearly the same time a 2000 M Coupe showed up in Redwood City, CA for sale by Evan of <a href="http://www.artudrive.com/" target="_blank">Art-U-Drive</a>. The asking price was quite a bit higher, it being a M with a 3.2L 240hp/236ft-lb engine, a more performance tuned suspension, larger cross-drilled brake rotors etc. It had significantly fewer miles on it, but didn&#8217;t look to be maintained as well and the previous owners had removed things like the rear windshield wiper, roof mounted antenna (replaced by one behind the rearview mirror) which are common &#8220;deletes&#8221; and as I found out later, the windshield washer fluid tank, wtf? After taking it for a couple of test drives, going nuts over used car pre-purchase checklists, having it inspected by a <a href="http://www.carrera-motors.com/">Carrera Motors</a>, talking to Ken at <a href="http://mycardoctor.com/">Nippon European Motors</a> about the items in noted in the inspection and receiving assurance that it would pass the smog inspection otherwise my deposit would be refunded, I decided to purchase it. It&#8217;s possible I could have waited for a car in better shape, but for the price and convenience of not having to fly somewhere for a test drive, then ship it back to California and hope it passed the smog test, it seemed like a good deal.</p>
<p>I took it to <a href="http://www.bmwrepairberkeley.com/">German Auto Sport</a> and had them fix a couple of the issues from the pre-purchase inspection needing immediate attention. They also did an inspection of their own and gave me a laundry list of items which they recommended be replaced/tended to in the near term as well as their opinion of some of the pre-purchase inspection items. I picked up a couple of books, the first being a <a href="http://www.amazon.com/dp/0837616174" rel="nofollow" target="_blank">BMW Z3 Service Manual</a> which has proved to be mostly useless as it seems geard towards professional mechanics i.e. not many photos, very light on descriptions and step-by-step instructions. The second, and so far much more useful, was <a href="http://www.101projects.com/BMW/index.htm">101 Performance Projects For your BMW 3-Series</a> by <a href="http://www.101projects.com/BMW/about_wayne.htm">Wayne R. Dempsy</a> one of the founders of <a href="http://www.pelicanparts.com">Pelican Parts Online</a>  (if you don&#8217;t want to purchase the book it turns out <a href="http://www.pelicanparts.com/bmw/techarticles/tech_main.htm">most of the articles and photos are online</a>). After reading through it I figured many of the tasks were within my abilities to complete provided I was willing to invest in some tools e.g. car jack, jack stands, metric wrenches, pressure bleeder etc.</p>
<p>So far the book has helped me replace the <a href="http://www.pelicanparts.com/bmw/techarticles/E36-Fuel-Filter/E36-Fuel-Filter.htm">fuel filter</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/E36-Spark-Plugs/E36-Spark-Plugs.htm">spark plugs</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/E36-valve-cover/E36-Valve-Cover.htm">valve cover gasket</a>, front <a href="http://www.pelicanparts.com/bmw/techarticles/E36-Brake_Pads/E36-Brake_Pads.htm">brake pads</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/101-Projects-57-Brake-Disc/101-Projects-57-Brake-Disc.htm">brake discs</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/101-Projects-56-Brake-Lines/101-Projects-56-Brake-Lines.htm">brake lines</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/101-Projects-52-Caliper-Rebuild/101-Projects-52-Caliper-Rebuild.htm">rebuild the brake calipers</a>, <a href="http://www.pelicanparts.com/bmw/techarticles/Mult-Bleeding_Brakes/Mult-Bleeding_Brakes.htm">bleed the brake lines</a> and <a href="http://www.pelicanparts.com/bmw/techarticles/101-Projects-69-Hood-Shocks/101-Projects-69-Hood-Shocks.htm">replace the trunk lid shocks</a>. I&#8217;ve also removed the external amp and speaker that were jankily bolted down in the trunk and replaced the shift boot.</p>
<p>Here are some photos I took while performing the work (<a href="http://www.flickr.com/photos/madpickles/sets/72157626968647632/" target="_blank" rel="nofollow">view full set</a>)<br />
<a href="http://www.flickr.com/photos/madpickles/5836510706/" title="On Jack Stands by madpickles, on Flickr"><img src="http://farm4.static.flickr.com/3510/5836510706_174667a461.jpg" width="500" height="375" alt="On Jack Stands"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/5835954805/" title="New Fuel Filter in Place by madpickles, on Flickr"><img src="http://farm4.static.flickr.com/3631/5835954805_8c9459e53c.jpg" width="500" height="375" alt="New Fuel Filter in Place"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/5835968141/" title="S52 Engine by madpickles, on Flickr"><img src="http://farm6.static.flickr.com/5143/5835968141_f27f1f608b.jpg" width="500" height="375" alt="S52 Engine"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/5835976933/" title="Old and New Spark Plugs by madpickles, on Flickr"><img src="http://farm4.static.flickr.com/3055/5835976933_8921ac0620.jpg" width="375" height="500" alt="Old and New Spark Plugs"></a></p>
<p><a href="http://www.flickr.com/photos/madpickles/5836014275/" title="New Front Brake Rotor by madpickles, on Flickr"><img src="http://farm6.static.flickr.com/5317/5836014275_842f2c72e8.jpg" width="500" height="375" alt="New Front Brake Rotor"></a></p>
<p>Not everything has gone smoothly e.g. I broke off a brake fluid bleeder valve that had rusted shut in one of the calipers and I had to drill out the brake disc rotor screws which were also rusted in place (lesson learned, buy all the little parts that could brake [no pun intended] before working on a project). I couldn&#8217;t get the brake calipers clean enough to paint them, even after using a steel wire brush attached to a drill. One of the brake discs didn&#8217;t mount flush on the wheel hub and required some grinding to fit properly. In addition while crawling around under the car I noticed the front passenger fender liner was busted (which I was able to replace myself, thanx <a href="http://parts.bmwofsouthatlanta.com/">BMW of South Atlanta</a>!), there were some screws missing where the rear and front bumpers were attached. When I replaced two of the bulbs in the center console (found a new use for shish kebab skewers in the process&#8230;if you ever see someone walking down the street with a pair of them it&#8217;s likely they&#8217;re looking to steal some car stereos) a different one (albiet much less important) went out that I was unable to successfully swap. The check engine light also came on during the first week but after taking it to <a href="http://mycardoctor.com/">Nippon European Motors</a>, it appears to be the result of me not tightening the gas cap and/or the car having a cheap after market gas cap. Just to be (since replaced with a &#8220;genuine BMW&#8221; part) and the light hasn&#8217;t come on since.</p>
<p>The car has made several trips to Sacramento, one to Yosemite, several down to the South Bay as well as numerous shorter trips around the East Bay. Aside from a few rattles here and there it seems to be running fine. Both mechanics I&#8217;ve taken it to rave about the condition of the engine so I&#8217;m hoping the next few years will just consist of routine maintenance and replacement of minor things like door handle seals, head lights, etc. A small part of me wishes I had waited until finding a good deal on a lower milage car with a well documented history, but then I&#8217;d likely still be waiting as only a handful of those probably exist amongst the 2,000 or so M Coupes in the US. Not only that but they&#8217;d cost twice as much and I&#8217;d be 10 times as mad when something went wrong or someone nicked my bumper (which has already happened).</p>
<p>So if you&#8217;re in the market for a unique car with some oomph without breaking the bank or just curious to learn more about these cars, check out Jon Martin&#8217;s excellent <a href="http://www.mcoupebuyersguide.com/">M Coupe Buyers Guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madpickles.org/rokjoo/2011/06/15/bmw-m-coupe/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

