<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>David Parker | Software, Mobile, and Web Development | Ruby, Rails, Python, Django, JavaScript, jQuery, Java, Android, iOS, Cocos2D, C, OpenGL</title>
 <link href="http://davidwparker.com/atom.xml" rel="self"/>
 <link href="http://davidwparker.com/"/>
 <updated>2019-01-06T17:25:34+00:00</updated>
 <id>http://davidwparker.com/</id>
 <author>
   <name>David W Parker</name>
   <email>davidwparker@gmail.com</email>
 </author>
 
 <entry>
   <title>A Minor Update for 2109</title>
   <link href="http://davidwparker.com/2019/01/06/a-minor-update-for-2019/"/>
   <updated>2019-01-06T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2019/01/06/a-minor-update-for-2019</id>
   <content type="html">&lt;p&gt;tldr; Baby, DWP Redesign, ProgrammingTIL, YouTube, Code&lt;/p&gt;

&lt;h3 id=&quot;neglect&quot;&gt;Neglect&lt;/h3&gt;

&lt;p&gt;First off, just wanted to apologize (mostly to myself) but also any readers who happen to be out there for not updating this blog in 5 years. Yes FIVE. Wow, sad panda. I’m hoping to get back to it more often this year.&lt;/p&gt;

&lt;h3 id=&quot;current-work&quot;&gt;Current Work&lt;/h3&gt;

&lt;p&gt;Over the last several years I’ve worked on Uvize (which we sold a few years ago), then I took some time off, did some contract work, and am now employed with hobbyDB.&lt;/p&gt;

&lt;h3 id=&quot;screencasting-youtube-argentina-and-baby&quot;&gt;Screencasting, YouTube, Argentina, and Baby&lt;/h3&gt;

&lt;p&gt;In 2016 and 2017, I restarted Screencasting, and made over 200 videos. That same year, I took off for 10 weeks to travel to Argentina with the wife. End of 2017, I stopped again, because wife was having a baby. She’s stellar, but obviously been quite a bit of work this last year.&lt;/p&gt;

&lt;h3 id=&quot;site-redesign&quot;&gt;Site Redesign&lt;/h3&gt;

&lt;p&gt;I just finished redesigning this site (minor), but made it much more easy to read and improve its rendering on mobile devices.&lt;/p&gt;

&lt;h3 id=&quot;this-year&quot;&gt;This Year&lt;/h3&gt;

&lt;p&gt;This year will see a refocus on my YouTube channel (ProgrammingTIL) and subsequently, the &lt;a href=&quot;www.programmingtil.com&quot;&gt;ProgrammingTIL website&lt;/a&gt;. I went ahead and built out a simple platform for it, and this year I’ll be expanding it to become a nice, simple, but powerful application to serve video content.&lt;/p&gt;

&lt;h3 id=&quot;lets-go&quot;&gt;Let’s Go!&lt;/h3&gt;

&lt;p&gt;Alright, public post is a go! No turning back now.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book Review: My Job Went to India</title>
   <link href="http://davidwparker.com/2014/01/10/book-review-my-job-went-to-india/"/>
   <updated>2014-01-10T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2014/01/10/book-review-my-job-went-to-india</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: January 2014&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0976694018?tag=parker08-20&quot;&gt;My Job Went to India&lt;/a&gt; by Chad Fowler is a typical book written about things programmers do, and could do, in order to keep their job. While the advice seems pretty generic, I found the book to be very interesting, and they type of information given in the book is great to hear again-and-again. I don’t know that it’s worth buying, but it is definitely worth reading at least once.&lt;/p&gt;

&lt;p&gt;The book is divided into 52 chapters, one for each piece of advice over 6 parts:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Choosing Your Market&lt;/li&gt;
  &lt;li&gt;Investing in Your Product&lt;/li&gt;
  &lt;li&gt;Executing&lt;/li&gt;
  &lt;li&gt;Marketing… Not Just for Suits&lt;/li&gt;
  &lt;li&gt;Maintaining Your Edge&lt;/li&gt;
  &lt;li&gt;If You Can’t Beat ‘em&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ll be covering what I felt were the best pieces of advice within each part.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;choosing-your-market&quot;&gt;Choosing Your Market&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;You can’t afford to compete on price- research current technical skill demand.&lt;/li&gt;
  &lt;li&gt;Learn a new programming language (with a different paradigm).&lt;/li&gt;
  &lt;li&gt;Be a generalist (know a variety of things).&lt;/li&gt;
  &lt;li&gt;Be a specialist (know one thing really well).&lt;/li&gt;
  &lt;li&gt;Work with smart people (be the worst in the room and learn from everyone).&lt;/li&gt;
  &lt;li&gt;Find a job you’re actually passionate about.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;investing-in-your-product&quot;&gt;Investing in Your Product&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Understand business basics.&lt;/li&gt;
  &lt;li&gt;Find a mentor.&lt;/li&gt;
  &lt;li&gt;Be a mentor.&lt;/li&gt;
  &lt;li&gt;Practice. Code all the time.&lt;/li&gt;
  &lt;li&gt;Pick a project, and read it a like a book. Make notes, outline, critique, learn.&lt;/li&gt;
  &lt;li&gt;Automate something.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;executing&quot;&gt;Executing&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Do your long tasks first.&lt;/li&gt;
  &lt;li&gt;Have an accomplishment to report every day.&lt;/li&gt;
  &lt;li&gt;Be where you’re at- be present.&lt;/li&gt;
  &lt;li&gt;Make your job fun.&lt;/li&gt;
  &lt;li&gt;Learn to love maintenance.&lt;/li&gt;
  &lt;li&gt;Projects are marathons, not sprints.&lt;/li&gt;
  &lt;li&gt;Learn how to fail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;marketing-not-just-for-suits&quot;&gt;Marketing… Not Just for Suits&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Perception is reality.&lt;/li&gt;
  &lt;li&gt;Keep a development diary.&lt;/li&gt;
  &lt;li&gt;Learn to type.&lt;/li&gt;
  &lt;li&gt;Build your brand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;maintaining-your-edge&quot;&gt;Maintaining Your Edge&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Carve out weekly time to investigate the bleeding edge.&lt;/li&gt;
  &lt;li&gt;Focus on doing, not on being done.&lt;/li&gt;
  &lt;li&gt;Watch the alpha geeks.&lt;/li&gt;
  &lt;li&gt;Pick a technology you hate most, and do a project in it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;if-you-cant-beat-em&quot;&gt;If You Can’t Beat ‘em&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Lead.&lt;/li&gt;
  &lt;li&gt;Learn from open source.&lt;/li&gt;
  &lt;li&gt;Think globally.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>The 2014 Agenda</title>
   <link href="http://davidwparker.com/2014/01/01/2014-The-2014-Agenda/"/>
   <updated>2014-01-01T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2014/01/01/2014-The-2014-Agenda</id>
   <content type="html">&lt;p&gt;tldr; Grow company, bboying, write an ebook, code.&lt;/p&gt;

&lt;h2 id=&quot;all-the-stuff&quot;&gt;All the Stuff&lt;/h2&gt;

&lt;p&gt;Once again, let’s take a look at the big stuff, additional stuff I want to get done, and the stuff that needs to change in order to successfully get the things that I want done.&lt;/p&gt;

&lt;h3 id=&quot;the-big-stuff&quot;&gt;The Big Stuff&lt;/h3&gt;

&lt;p&gt;2014 looks like it’s going to be a pretty good year, although I don’t really have a lot of life goals this year like I did last year. Instead of accomplishing new life goals this year, I’m going to be focusing my efforts on currently being worked on life goals.&lt;/p&gt;

&lt;h4 id=&quot;uvize&quot;&gt;Uvize&lt;/h4&gt;

&lt;p&gt;The majority of my time this year that I’ll be spending my time on is my tech startup Uvize. Being a co-founder and CTO of a tech startup means I get to do a lot of work. With that being said, I’m a firm believer in work-life balance; I won’t be sinking my entire life into the startup.&lt;/p&gt;

&lt;h4 id=&quot;bboying&quot;&gt;BBoying&lt;/h4&gt;

&lt;p&gt;BBoying will be taking up a good amount of time this year as well. I started to really expand my abilities near the end of last year, and I believe that the 2nd year of breaking will be a great one.&lt;/p&gt;

&lt;h3 id=&quot;additional-stuff-i-want-to-get-done&quot;&gt;Additional Stuff I Want to Get Done&lt;/h3&gt;

&lt;p&gt;In addition to the big stuff above, there’s quite a couple of other things I’m interested in doing.&lt;/p&gt;

&lt;h4 id=&quot;write-an-e-book&quot;&gt;Write an E-book&lt;/h4&gt;

&lt;p&gt;I’m going to be tackling the task of writing an ebook this year. With my great interest in graphics, I’ll be focusing my efforts on doing WebGL. While leading up to the ebook, I’d like to be writing regularl WebGL blog posts, posting at least 2 per month.&lt;/p&gt;

&lt;h4 id=&quot;reading&quot;&gt;Reading&lt;/h4&gt;

&lt;p&gt;Last year I didn’t read much at all. This year, I’ll be getting back to where I’d like, reading 24 over the course of the year.&lt;/p&gt;

&lt;h4 id=&quot;game-development--screecasts&quot;&gt;Game Development | Screecasts&lt;/h4&gt;

&lt;p&gt;As in the past, I’ll be competing in all three &lt;a href=&quot;www.ludumdare.com/compo&quot;&gt;Ludum Dare&lt;/a&gt; competitions.&lt;/p&gt;

&lt;p&gt;Assuming I get to where I need to with the ebook, I’d like to make WebGL screencasts as well.&lt;/p&gt;

&lt;h3 id=&quot;the-stuff-that-needs-to-change&quot;&gt;The Stuff That Needs to Change&lt;/h3&gt;

&lt;p&gt;Oi vey, I spent a lot of time on Hacker News, Facebook, and Youtube last year. That has to change this year, or I definitely won’t be getting around to writing the ebook for sure.&lt;/p&gt;

&lt;p&gt;I said this last year and I’ll say it again. Stricter time management is the main thing that needs to change. My goal is to accomplish a number of Pomodoros each day, along with the focus feature with RescueTime Pro.&lt;/p&gt;

&lt;p&gt;Additionally, I’ll be posting monthly RescueTime updates to keep myself a little more publicly accountable.&lt;/p&gt;

&lt;h3 id=&quot;here-goes-nothing&quot;&gt;Here goes nothing.&lt;/h3&gt;

&lt;p&gt;It’s a new dawn, it’s a new day, it’s a new life! And I’m feeling good.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>2013 in Review</title>
   <link href="http://davidwparker.com/2013/12/31/2013-in-review/"/>
   <updated>2013-12-31T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/12/31/2013-in-review</id>
   <content type="html">&lt;p&gt;This is my second annual review blog post. Below, you’ll see the Awesome Stuff, the Not Awesome Stuff, and The Numbers. Finally, I’ll be comparing these to my &lt;a href=&quot;/2013/01/01/The-2013-Agenda/&quot;&gt;2013 Agenda&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;awesome-stuff&quot;&gt;Awesome Stuff&lt;/h2&gt;

&lt;p&gt;I accomplished three of my life goals this year: I finished my Master’s of Science in Computer Science in May, completed a Sprint Triathlon in June, and lived (and visited) New York in June through September. Arguably, I also (started to complete) a 4th goal of starting a successful tech company (Uvize) in May too, but at this point, it’s still too early to say that we’re really ‘successful’. And one goal that I started last year, bboying (breakdancing) came out of left field as well.&lt;/p&gt;

&lt;h3 id=&quot;masters-of-science-in-computer-science&quot;&gt;Master’s of Science in Computer Science&lt;/h3&gt;

&lt;p&gt;In May this year, I completed my dual-degree program getting both my MBA and my MS in CS. Last year, I had actually finished the MBA portion of my degree. The last year I was able to focus solely on CS, which I personally enjoy much more than business. I spent a majority of my time thinking about and working with algorithms, graphics, software engineering, and startups.&lt;/p&gt;

&lt;h3 id=&quot;sprint-triathlon&quot;&gt;Sprint Triathlon&lt;/h3&gt;

&lt;p&gt;In June I completed my first Triathlon. I wasn’t particulary proud of my results, but I didn’t really train for it at all. In fact, it was the first time I’ve ever swam in open water or in a wet suit. It was also the second swim I’ve completed this year… oh well. This year ended up not being my year for triathlons like I thought it would be… more on that in a second. The stats:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Time: 1:52:17; Swim: 24:27, T1: 7:53, Bike 50:04, T2: 1:09, Run: 28:44&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://edge.raceresults360.com/rr360/race/GIMOj9/#/person:&amp;amp;entry_id=649:1391483995136&quot;&gt;Boulder Tri Sprint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;uvize&quot;&gt;Uvize&lt;/h3&gt;

&lt;p&gt;In May, I co-founded a startup called Uvize. We help military veterans succeed in college. While I wouldn’t call this a ‘successful’ startup (yet!), I really believe in the company, my co-founder, and the mission. In May, we applied for a “Powered by Techstars” program through Kaplan (the education company). To my surprise, we ended getting in! With over 300 applications, we were one of ten accepted into the program. While moving to NYC for three months and away from my wife was less than ideal, it was still a lot of fun and I got to do the NYC thing…&lt;/p&gt;

&lt;p&gt;Techstars was a pretty crazy program. For the first five or six weeks, we didn’t have a designer on the team, and that almost killed us. Fortunately, I was introduced to a great designer who helped pull things together. Simultaneously, we had just hired a design firm to get us a basic start- between the two, we were able to make a ton of progress in the last ten weeks. The entire program seemed to whiz by and just like that, we were back in Denver/Boulder.&lt;/p&gt;

&lt;h3 id=&quot;nyc&quot;&gt;NYC&lt;/h3&gt;

&lt;p&gt;Having been accepted into Techstars, my co-founder Dave and I moved to NYC. Technically, I moved to Jersey City to live with a long-time friend (for super cheap). But I was eight minutes away from PATH and my total commute was only about 25 minutes… which is less than a lot of people in the City to other parts in the City! And even shorter than my 45 commute here in Denver.&lt;/p&gt;

&lt;p&gt;My wife came out to visit me about every other weekend. I would work extra during the week and pretty much every weekend that she wasn’t visiting, so we were able to have three day weekends every other weekend. We did all the typical tourist-y stuff the first weekend: broadway shows, times square, Statue of Liberty, 9/11 Memorial, Grand Central Terminal, Central Park, etc. The second trip out, we went down to Atlantic City and enjoyed the beach and the food there. Her third trip out, we went down to DC/Baltimore to visit some long-time friends. Her last trip out we made it a foodie trip in NYC and went to Per Se and Peter Luger Steakhouse. Every trip was a blast- and while expensive, it was worth it.&lt;/p&gt;

&lt;h3 id=&quot;bboying&quot;&gt;Bboying&lt;/h3&gt;

&lt;p&gt;Due to being in NYC, I didn’t end up doing the Olympic or Half Ironman Triathlons this year. During the Spring I was really getting into bboying and I’ve been enjoying much more than I thought I would. I made certain goals for what I wanted to do on a cruise we were going on in fall, and although I didn’t make those specific goals, I’ve been loving bboying a lot. Next year, and really for the next few years, I plan on doing a lot less running and a lot more breaking. When in NYC, I regularly took lessons and I even made it out to a few workshops at Dynamic Rockers anniversary jam.&lt;/p&gt;

&lt;h3 id=&quot;code&quot;&gt;Code&lt;/h3&gt;

&lt;p&gt;Once again, I competed in all three &lt;a href=&quot;http://www.ludumdare.com&quot;&gt;Ludum Dare&lt;/a&gt; competitions this year. You can find my code and entries on the game dev &lt;a href=&quot;/code&quot;&gt;page&lt;/a&gt;. I taught myself Three.js for the first, and used Angular.js for the latter two. For the second one, I was in NYC during the compo, and so I only worked on the game for about six hours. It was pretty good for only six hours. For the last one, I only took about four hours, as I was doing a lot of work for Uvize (and have been), so I didn’t really do as well as I would have liked. That was also the first compo that I didn’t really take the time to judge others’ games, so I didn’t get a final score. Next time!&lt;/p&gt;

&lt;h3 id=&quot;books&quot;&gt;Books&lt;/h3&gt;

&lt;p&gt;The number one book of the year was by far &lt;a href=&quot;/2013/01/11/book-refuse-to-choose&quot;&gt;Refuse to Choose&lt;/a&gt;. If you think you can’t concentrate on a single project and you’re constantly jumping around in big things in life, then you may be a ‘scanner’ and you should definitely check the book out.&lt;/p&gt;

&lt;h3 id=&quot;travel-and-more-life&quot;&gt;Travel and more Life&lt;/h3&gt;

&lt;p&gt;As above, I went to NYC.&lt;/p&gt;

&lt;p&gt;In Spring, I went to GDC (Game Developer’s Conference) in San Fransisco, after receiving a scholarship to go via the &lt;a href=&quot;http://www.igda.org/&quot;&gt;IGDA&lt;/a&gt;. It was a great trip and I really would love to go again next year (unfortunately, that won’t be happening as I can’t really justify the costs right now).&lt;/p&gt;

&lt;p&gt;Tyler and I also went on a cruise in the Western Caribbean with fantastic friends as well. Oh yeah, on the cruise I turned 30 and I decided to run 30 miles that day. It was kind of a life goal. The first 27 miles or so were actually fine, but I hit a wall like no other for the last 3 miles. Several friends and my wife ran portions of it with me. While I’m a little disappointed it was so hard in the end, I’m glad I did it.&lt;/p&gt;

&lt;h2 id=&quot;not-awesome-stuff&quot;&gt;Not Awesome Stuff&lt;/h2&gt;

&lt;p&gt;I didn’t read nearly enough books (numbers below).
I watched way too much TV.
I spent way too much time on FB.&lt;/p&gt;

&lt;p&gt;I let my blog just sit there, and that really killed the numbers. It was the first year it went down in visits from the previous year ever. I’m hoping to change that this year… more on that in next year’s agenda.&lt;/p&gt;

&lt;h2 id=&quot;the-numbers&quot;&gt;The Numbers&lt;/h2&gt;

&lt;p&gt;I’ve posted 2013’s numbers below. I’ve also included numbers for 2011-2012.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;What \ When&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2013&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Intellect&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Books read&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;10&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;21&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;University Courses Taken&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;12&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Physical&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Total Miles Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;389.125&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;362.47&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;616&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Half-Marathons Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Marathons Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Total Miles Biked&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;289.37&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;422.5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;50&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;14ers climbed&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;BBoy hours&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;144.17&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;31.17&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Number of Workouts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;200&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;311&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;202&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Random&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Emails sent (home)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1476&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;912&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;704&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Emails sent (work)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;489&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Concerts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Songs starred in Spotify&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;158&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;97&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;173&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Travel&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Roundtrip Flights to Montgomery&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Roundtrip Flights elsewhere&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Career&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Networking Events&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;23&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;37&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Conferences attended&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Tech&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Blog Posts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;32&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;22&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;* Visits&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;32247&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;44284&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;41792&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;* Uniques&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;27542&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;36337&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;32509&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;* Pageviews&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;44559&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;61132&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;58891&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Apps Published (total)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Android Apps&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;# Releases (new and old Android)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Games Created (total)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Screencasts Recorded&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;19&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Youtube data&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;# of hours watched on my screencasts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;711.1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;129.97&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;# of views on my screencasts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;20699&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;10841&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2000&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&quot;rescuetime&quot;&gt;RescueTime&lt;/h3&gt;

&lt;p&gt;See % of year for actual comparison in that regard.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;What \ When&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2013&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2013%&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012%&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011%&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Hours Logged&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2424.5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1926.5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;682&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Productivity&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;63%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;57%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;65%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Unproductive Hours Spent…&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Facebook&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;122&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;108&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;37&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.39%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.23%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.31%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Google+&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;15&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;11&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.17%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.13%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.04%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Twitter&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.32%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.05%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.04%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on LinkedIn&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;11&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.13%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Hacker News&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;116&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;115&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;34&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.32%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.31%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.20%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Silverlight (Netflix)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;59&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;143&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.67%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.63%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.99%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Flash (Some % is Youtube)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;146&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;155&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;78&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.67%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.77%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.75%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;TOTAL Unproductive Hours&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;497&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;536&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;179&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;5.67%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;6.11%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;6.32%&lt;/em&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Productive Hours Spent…&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… house chores&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;54&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;90&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;20&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.62%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.03%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.71%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… studying&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;70&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;42&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.00%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.80%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.48%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… writing (gmail)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;249&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;128&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;36&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.84%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.46%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.28%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… writing (google docs)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;55&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;110&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;71&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.63%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.25%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.51%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Emacs)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;333&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;129&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;70&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3.80%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.47%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.47%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (localhost)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;103&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.18%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (github)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;74&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.84%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (stack overflow)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;20&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.23%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Terminal)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;60&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;34&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;14&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.68%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.39%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.49%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Eclipse)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;150&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.00%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.28%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.11%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Xcode)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;25&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.00%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.25%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.00%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;TOTAL Productive Hours&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;948&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;695&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;256&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;10.81%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;7.93%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;9.04%&lt;/em&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;vs-the-agenda&quot;&gt;Vs the Agenda&lt;/h2&gt;

&lt;p&gt;tldr; I accomplished all of The Big Stuff that I wanted to accomplish from 2013. A few changes in plans:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;I didn’t get to do the tri Olympic or tri Half Iron-Man.&lt;/li&gt;
  &lt;li&gt;I didn’t work on design as much as I planned. My designer friend got a job and we stopped doing “Developer meets Designer” shortly after.&lt;/li&gt;
  &lt;li&gt;I read much less than desired.&lt;/li&gt;
  &lt;li&gt;I didn’t do monthly updates for Ideal Tracker (or really, any Android development).&lt;/li&gt;
  &lt;li&gt;I didn’t do one game a month.&lt;/li&gt;
  &lt;li&gt;I didn’t do a single screencast.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that’s it. While it may seem like I failed on quite a few fronts, it’s been a great year overall in terms of overall life goals accomplished- And I’m looking forward to another great year ahead.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Getting Things Done</title>
   <link href="http://davidwparker.com/2013/06/09/book-getting-things-done/"/>
   <updated>2013-06-09T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/06/09/book-getting-things-done</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: March 2013&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0142000280?tag=parker08-20&quot;&gt;Getting Things Done&lt;/a&gt; by David Allen is the classic “getting things done” book. The entire productivity section in bookstores can be summed up by reading this book. That said, I don’t think it’s a perfect system, it is (probably) very hard to implement (due to having to take so much time to get things going, which just takes a lot of upfront time that we don’t all have the time to do), and you’ve probably already heard or read about most of these techniques before.&lt;/p&gt;

&lt;h4 id=&quot;the-book-is-divided-into-three-parts&quot;&gt;The book is divided into three parts:&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;The Art of Getting Things Done&lt;/li&gt;
  &lt;li&gt;Practicing Stress-Free Productivity&lt;/li&gt;
  &lt;li&gt;The Power of the Key Principles&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Part 1 focuses on getting control of everything in your life and project planning.&lt;/p&gt;

&lt;p&gt;Part 2 is all about the actual techniques you’ll use on an ongoing basis to be productive.&lt;/p&gt;

&lt;p&gt;Part 3 introduces a few long-term techniques.&lt;/p&gt;

&lt;p&gt;I still recommend reading it thoroughly, but I’d probably just borrow it from the library rather than buy it.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;2-key-objectives&quot;&gt;2 Key Objectives&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Capture all the things that need to get done.&lt;/li&gt;
  &lt;li&gt;Discipline yourself to make front-end decisions about all of the inputs into your life so you will always have a plan for next actions that you can implement.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A calendar, though important, can really effectively manage only a small portion of what you need to organize.&lt;/p&gt;

&lt;h4 id=&quot;we-fail-because&quot;&gt;We fail because:&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;There is too much distraction at the day-to-day, hour-to-hour level of commitments to allow for appropriate focus on the higher levels.&lt;/li&gt;
  &lt;li&gt;Ineffective personal organizational systems create huge subconscious resistance to undertaking even bigger projects and goal.&lt;/li&gt;
  &lt;li&gt;When loftier levels and values are clarified, it raises the bar of our standards, making us notice that much more that needs changing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Focusing on values does &lt;em&gt;not&lt;/em&gt; simplify your life. It gives meaning and direction- and a lot more complexity.&lt;/p&gt;

&lt;p&gt;Most of the stress people experience comes from inappropriately managed commitments they make or accept.&lt;/p&gt;

&lt;h3 id=&quot;basic-requirements-for-managing-commitments&quot;&gt;Basic Requirements for Managing Commitments&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;If it’s on your mind, your mind isn’t clear. Anything you consider unfinished must be captured in a trusted system outside your mind, a “collection bucket”, that you know you’ll come back to regularly and sort through.&lt;/li&gt;
  &lt;li&gt;You must clarify exactly what your commitment is and decide what you have to do, if anything, to make progress toward fulfilling it.&lt;/li&gt;
  &lt;li&gt;Once you’ve decided on all the actions you need to take, you must keep reminders of them organized in a system you review regularly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Definition of &lt;em&gt;Stuff&lt;/em&gt;: Anything you allowed into your psychological or physical world that doesn’t belong where it is, but for which you haven’t yet determined the desired outcome and the next action step.&lt;/p&gt;

&lt;p&gt;Get in the habit of keeping nothing on your mind.&lt;/p&gt;

&lt;p&gt;The real issue is how to make appropriate choices about what to do at any point in time… the real issue is how we manage actions.&lt;/p&gt;

&lt;p&gt;There is no reason ever to have the same thought twice, unless you like having that thought.&lt;/p&gt;

&lt;h3 id=&quot;five-stages-of-mastering-workflow&quot;&gt;Five Stages of Mastering Workflow&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Collect things that command our attention&lt;/li&gt;
  &lt;li&gt;Process what they mean and what do to about them&lt;/li&gt;
  &lt;li&gt;Organize the results&lt;/li&gt;
  &lt;li&gt;Review as options for what we choose to&lt;/li&gt;
  &lt;li&gt;Do.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When collecting, gather everything you consider incomplete.&lt;/p&gt;

&lt;p&gt;As soon as you attach a “should,” “need to,” or “ought to” to an item, it becomes incomplete.&lt;/p&gt;

&lt;h4 id=&quot;collection-tools&quot;&gt;Collection tools:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Physical in-basket&lt;/li&gt;
  &lt;li&gt;Paper-based note-taking devices&lt;/li&gt;
  &lt;li&gt;Electronic note-taking devices&lt;/li&gt;
  &lt;li&gt;Voice-recording devices&lt;/li&gt;
  &lt;li&gt;E-mail&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;workflow&quot;&gt;Workflow&lt;/h3&gt;

&lt;h4 id=&quot;stuff--in-basket--what-is-it--is-it-actionable&quot;&gt;Stuff –&amp;gt; In-basket –&amp;gt; What is it –&amp;gt; Is it Actionable?&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;–&amp;gt; No
    &lt;ul&gt;
      &lt;li&gt;–&amp;gt; Trash&lt;/li&gt;
      &lt;li&gt;–&amp;gt; Someday/maybe (tickler file; hold for review)&lt;/li&gt;
      &lt;li&gt;–&amp;gt; Reference (retrievable when required)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;–&amp;gt; Yes
    &lt;ul&gt;
      &lt;li&gt;–&amp;gt; What’s the next action?
        &lt;ul&gt;
          &lt;li&gt;–&amp;gt; Multistep projects –&amp;gt; projects folder –&amp;gt; plan and review for actions&lt;/li&gt;
          &lt;li&gt;–&amp;gt; Will it take less than 2 minutes?
            &lt;ul&gt;
              &lt;li&gt;–&amp;gt; Yes –&amp;gt; Do it!&lt;/li&gt;
              &lt;li&gt;–&amp;gt; No
                &lt;ul&gt;
                  &lt;li&gt;–&amp;gt; Delegate it –&amp;gt; Waiting (for someone else to do it)&lt;/li&gt;
                  &lt;li&gt;–&amp;gt; Defer it –&amp;gt; Calendar (do at specific time) or next actions (to do as soon as I can)&lt;/li&gt;
                &lt;/ul&gt;
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A project is any desired result that requires more than one action step.&lt;/p&gt;

&lt;h4 id=&quot;three-things-for-your-calendar&quot;&gt;Three things for your calendar:&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;Time-specific actions&lt;/li&gt;
  &lt;li&gt;Day-specific actions&lt;/li&gt;
  &lt;li&gt;Day-specific information&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No more “daily To-Do” lists! Only the three things above are on the calendar and nothing else.&lt;/p&gt;

&lt;h4 id=&quot;critical-success-factor-the-weekly-review&quot;&gt;Critical success factor: the Weekly Review.&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Gather and process all your “Stuff”&lt;/li&gt;
  &lt;li&gt;Review your system.&lt;/li&gt;
  &lt;li&gt;Update your lists.&lt;/li&gt;
  &lt;li&gt;Get clean, clear, current, and complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;four-criteria-model-for-choosing-actions-in-the-moment&quot;&gt;Four criteria model for choosing actions in the moment&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;Context&lt;/li&gt;
  &lt;li&gt;Time Available&lt;/li&gt;
  &lt;li&gt;Energy Available&lt;/li&gt;
  &lt;li&gt;Priority&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;threefold-model-for-evaluating-daily-work&quot;&gt;Threefold model for evaluating daily work&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Doing predefined work&lt;/li&gt;
  &lt;li&gt;Doing work as it shows up&lt;/li&gt;
  &lt;li&gt;Defining your work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“Don’t just do something. Stand there.” - Rochelle Myer&lt;/p&gt;

&lt;p&gt;Creating a list of what your real projects are and consistently managing your next action for each one will constitute 90 percent of what is generally thought of as project planning.&lt;/p&gt;

&lt;p&gt;How much planning to do? Until you get the project off your mind.&lt;/p&gt;

&lt;h3 id=&quot;getting-started-setting-up-the-time-space-and-tools&quot;&gt;Getting Started: Setting Up the Time, Space, and Tools&lt;/h3&gt;

&lt;p&gt;Basics for a work space is a writing surface and room for an in-basket.&lt;/p&gt;

&lt;p&gt;Don’t share space!&lt;/p&gt;

&lt;p&gt;You can work virtually everywhere if you have a clean, compact system and know how to process stuff rapidly and portably.&lt;/p&gt;

&lt;h4 id=&quot;maintain-your-own-personal-at-hand-a-z-filing-system&quot;&gt;Maintain your own personal, at-hand (A-Z) filing system.&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Have many fresh folders on hand for new projects available all the time.&lt;/li&gt;
  &lt;li&gt;Label your file folders (not the hangers).&lt;/li&gt;
  &lt;li&gt;Get rid of hanging folders if you can.&lt;/li&gt;
  &lt;li&gt;Use only one file folder per hanger.&lt;/li&gt;
  &lt;li&gt;Purge your files at least once a year.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When collecting…&lt;/p&gt;

&lt;h4 id=&quot;put-everything-into-your-in-basket-exceptions&quot;&gt;Put everything into your in-basket. Exceptions:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Supplies&lt;/li&gt;
  &lt;li&gt;Reference material&lt;/li&gt;
  &lt;li&gt;Decoration&lt;/li&gt;
  &lt;li&gt;Equipment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After doing physical stuff, do your mental stuff. Give each thought it’s own separate sheet of paper.&lt;/p&gt;

&lt;p&gt;“Incompletion triggers” list… see book for this massive list of things that may trigger a project you have to do.&lt;/p&gt;

&lt;p&gt;AFTER you have collected everything… PROCESS.&lt;/p&gt;

&lt;h4 id=&quot;when-you-finish-processing-you-will-have&quot;&gt;When you finish processing, you will have:&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;Trashed what you don’t need&lt;/li&gt;
  &lt;li&gt;Completed any less-than-two-minute actions&lt;/li&gt;
  &lt;li&gt;Handed off to others anything that can be delegated&lt;/li&gt;
  &lt;li&gt;Sorted into your own organizing system reminders of actions that require more than two minutes&lt;/li&gt;
  &lt;li&gt;Identified any larger commitments (projects) you now have, based on the input&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;rules-to-processing&quot;&gt;Rules to processing:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Process top item first (LIFO or FIFO is up to you).&lt;/li&gt;
  &lt;li&gt;Process one item at a time.&lt;/li&gt;
  &lt;li&gt;Never put anything back to “in”.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key Processing Question: “What’s the Next Action?”&lt;/p&gt;

&lt;p&gt;No next action –&amp;gt; Trash, items to incubate (tickler), reference material&lt;/p&gt;

&lt;h4 id=&quot;once-you-decide-next-action&quot;&gt;Once you decide next action:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Do it&lt;/li&gt;
  &lt;li&gt;Delegate it&lt;/li&gt;
  &lt;li&gt;Defer it&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;7-types-of-things-to-keep-track-of&quot;&gt;7 Types of Things to Keep Track of:&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;A “projects” list&lt;/li&gt;
  &lt;li&gt;Project support material&lt;/li&gt;
  &lt;li&gt;Calendared actions and information&lt;/li&gt;
  &lt;li&gt;“Next Actions” list&lt;/li&gt;
  &lt;li&gt;A “waiting for” list&lt;/li&gt;
  &lt;li&gt;Reference Material&lt;/li&gt;
  &lt;li&gt;A “someday/maybe” list&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don’t bother creating some external structuring of the priorities on your lists (which will inevitably end up changing)&lt;/p&gt;

&lt;h4 id=&quot;most-common-categories-of-action-reminders-context-for-next-actions&quot;&gt;Most common categories of action reminders (Context for next actions):&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Calls&lt;/li&gt;
  &lt;li&gt;At Computer&lt;/li&gt;
  &lt;li&gt;Errands&lt;/li&gt;
  &lt;li&gt;Office Actions or At Office&lt;/li&gt;
  &lt;li&gt;At Home&lt;/li&gt;
  &lt;li&gt;Agendas (meetings)&lt;/li&gt;
  &lt;li&gt;Read/review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most efficient way to track your action reminders is to add them to lists or folders as they occur to you.&lt;/p&gt;

&lt;p&gt;For email, create labels/folders such as: @tickler, @waitingfor, @action, etc.&lt;/p&gt;

&lt;p&gt;The real value of the “projects” list is in the complete review it can provide (weekly).&lt;/p&gt;

&lt;p&gt;Don’t use support material as reminders. Instead, add the project to projects list, then determine next action. Put support material in folder for project.&lt;/p&gt;

&lt;p&gt;“Someday/maybe” list is for things you may want to reassess in the future.&lt;/p&gt;

&lt;p&gt;NEVER keep a “hold and review” file or pile.&lt;/p&gt;

&lt;p&gt;Tickler file should have 43 folders- one for each day of the month (1-31) and one for each month.&lt;/p&gt;

&lt;h4 id=&quot;checklists&quot;&gt;Checklists:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Great for “fuzzier” items: exercise regularly, quality time with spouse, etc.&lt;/li&gt;
  &lt;li&gt;Clarify the inherent projects and actions from these items.&lt;/li&gt;
  &lt;li&gt;These will generally end up being something more of a core life value (though not always).&lt;/li&gt;
  &lt;li&gt;Be prepared to create and destroy these on the fly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep your system functional by constantly reviewing your system…&lt;/p&gt;

&lt;p&gt;Look at your calendar first… then your action lists.&lt;/p&gt;

&lt;h4 id=&quot;have-a-weekly-review-of-your-system&quot;&gt;Have a weekly review of your system:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Previous calendar data&lt;/li&gt;
  &lt;li&gt;Upcoming calendar&lt;/li&gt;
  &lt;li&gt;Empty your head&lt;/li&gt;
  &lt;li&gt;Review “projects” list&lt;/li&gt;
  &lt;li&gt;Review “next actions” list&lt;/li&gt;
  &lt;li&gt;Review “waiting for” list&lt;/li&gt;
  &lt;li&gt;Review relevant checklists&lt;/li&gt;
  &lt;li&gt;Review “someday/maybe” list&lt;/li&gt;
  &lt;li&gt;Review “pending” and support files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Block out 2-3 hours every Friday afternoon for review.&lt;/p&gt;

&lt;p&gt;The constant sacrifices of not doing the work you have defined on your lists can be tolerated only if you know what you’re not doing.&lt;/p&gt;

&lt;p&gt;Many people use the inevitably of an almost infinite stream of immediately evident things to do as a way to avoid the responsibilities of defining their work and managing their total inventory.&lt;/p&gt;

&lt;p&gt;Feel confident about what you have decided to do.&lt;/p&gt;

&lt;p&gt;Getting Things Done, and feeling good about it, means being willing to recognize, acknowledge, and appropriately manage all the things that have your consciousness engaged.&lt;/p&gt;

&lt;p&gt;Ensure that you take a high-level look at your life too! (10k feet = projects, 20k feet = areas of focus, 30k feet = goals, 40k feet = vision, 50k+ feet = purpose).&lt;/p&gt;

&lt;h4 id=&quot;projects-which-have-some-sort-of-planning-activity&quot;&gt;Projects which have some sort of planning activity:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Those that still have your attention even after determined next actions.&lt;/li&gt;
  &lt;li&gt;Those which potentially useful ideas and supportive detail just show up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sense of anxiety and grief doesn’t come from having too much to do; it’s the automatic result of breaking agreements with yourself.&lt;/p&gt;

&lt;p&gt;Not being aware of all you have to do is much like having a credit card for which you don’t know the balance or the limit– it’s a lot easier to be irresponsible.&lt;/p&gt;

&lt;p&gt;“The secret of getting ahead is getting started. The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks, and then starting on the first one.” - Mark Twain&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Information Dashboard Design</title>
   <link href="http://davidwparker.com/2013/06/07/book-information-dashboard-design/"/>
   <updated>2013-06-07T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/06/07/book-information-dashboard-design</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: April 2013&lt;/li&gt;
  &lt;li&gt;Rating: 8.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0596100167?tag=parker08-20&quot;&gt;Information Dashboard Design&lt;/a&gt; by Stephen Few is a great resource if you’re designing, building, or thinking about dashboards- specifically, if you’re designing a dashboard with business intelligence information. I’m in the process of building a dashboard (continuously) and dashboard design before and after reading this book is like night and day. It’s incredible how many things I got wrong before reading the book (color usage, location of data, types of charts and graphs that I used).&lt;/p&gt;

&lt;p&gt;I’d highly recommend this book to anyone doing anything with dashboards.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My notes&lt;/h2&gt;

&lt;h4 id=&quot;categorizing---role&quot;&gt;Categorizing -&amp;gt; Role:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Strategic - snapshots, high-level, not-interactive&lt;/li&gt;
  &lt;li&gt;Analytical - greater content, comparisons, history, evaluation&lt;/li&gt;
  &lt;li&gt;Operational - dynamic, immediate, specific&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Categorize by whose dashboard it is, type of data, data domain, types of measure, span of data, update frequency, interactivity, mechanism of display, portal functionality&lt;/p&gt;

&lt;h3 id=&quot;13-mistakes-of-dashboard-design&quot;&gt;13 Mistakes of Dashboard Design&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Exceeding the boundaries of a single screen (multi-screen/scrolling)&lt;/li&gt;
  &lt;li&gt;Supplying inadequate context for the data (not including comparisons)&lt;/li&gt;
  &lt;li&gt;Displaying excessive detail and precision&lt;/li&gt;
  &lt;li&gt;Choosing a deficient measure. Communicate meaning  - think about the message from viewer’s needs&lt;/li&gt;
  &lt;li&gt;Choosing inappropriate display media (never use pie charts)&lt;/li&gt;
  &lt;li&gt;Introducing meaningless variety&lt;/li&gt;
  &lt;li&gt;Using poorly designed display media&lt;/li&gt;
  &lt;li&gt;Encoding Quantitative Data inaccurately&lt;/li&gt;
  &lt;li&gt;Arranging the data poorly&lt;/li&gt;
  &lt;li&gt;Highlight important data effectively or not at all&lt;/li&gt;
  &lt;li&gt;Cluttering the display with useless decoration&lt;/li&gt;
  &lt;li&gt;Misusing/overusing color&lt;/li&gt;
  &lt;li&gt;Designing an unattractive visual display&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;power-of-visual-perception&quot;&gt;Power of Visual Perception&lt;/h3&gt;

&lt;p&gt;Limits of short term memory&lt;/p&gt;

&lt;h4 id=&quot;visually-encoding-data-for-rapid-perception&quot;&gt;Visually encoding data for rapid perception:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;preattentive attributes and categories:
    &lt;ul&gt;
      &lt;li&gt;color (hue/intensity)&lt;/li&gt;
      &lt;li&gt;position&lt;/li&gt;
      &lt;li&gt;motion (flicker/movement)&lt;/li&gt;
      &lt;li&gt;form (orientation, length, width, size, shape, added marks, enclosures)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Encoding quantitative data vs. categorical data&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;gesalt-principles-of-visual-perception&quot;&gt;Gesalt Principles of Visual Perception:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Proximity&lt;/li&gt;
  &lt;li&gt;Similarity&lt;/li&gt;
  &lt;li&gt;Enclosure&lt;/li&gt;
  &lt;li&gt;Closure&lt;/li&gt;
  &lt;li&gt;Continuity&lt;/li&gt;
  &lt;li&gt;Connection&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;eloquence-through-simplicity&quot;&gt;Eloquence through simplicity&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Summarize = sums/averages&lt;/li&gt;
  &lt;li&gt;Exceptions = something outside realm of normality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only address one objective/set of objectives&lt;/p&gt;

&lt;p&gt;Data-ink ratio =&amp;gt; maximize!
Reduce non-data pixels; then enhance data pixels&lt;/p&gt;

&lt;h3 id=&quot;effective-dashboard-display-media&quot;&gt;Effective Dashboard Display Media&lt;/h3&gt;

&lt;h4 id=&quot;text-graphic-combination-graphs-images-icons-drawing-objects-text-organizers&quot;&gt;Text, graphic, combination, graphs, images, icons, drawing objects, text, organizers&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Bullet Graphs are the bomb&lt;/li&gt;
  &lt;li&gt;Bar graph =&amp;gt; nominal/ordinal scale&lt;/li&gt;
  &lt;li&gt;Line graphs =&amp;gt; interval scale, used to emphasize trends, cycles, change&lt;/li&gt;
  &lt;li&gt;Scatter plots&lt;/li&gt;
  &lt;li&gt;Treemaps&lt;/li&gt;
  &lt;li&gt;Icons =&amp;gt; alert, up/down, on/off. Ideally only use one, maybe 2 tops.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;designing-dashboards-for-usability&quot;&gt;Designing Dashboards for Usability&lt;/h3&gt;

&lt;p&gt;Organize the information to suport its meaning and use&lt;/p&gt;

&lt;p&gt;Maintain consistency for quick and accurate interpretation&lt;/p&gt;

&lt;p&gt;Make the viewing experience aesthetically pleasing: colors, high resolution, font&lt;/p&gt;

&lt;p&gt;Design for use as a launch pad; design for interaction&lt;/p&gt;

&lt;p&gt;Don’t present users with options or alternatives; you own the design&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Ludum Dare 26 Post Mortem - Minimalist Moe</title>
   <link href="http://davidwparker.com/2013/05/01/ludum-dare-26-post-mortem/"/>
   <updated>2013-05-01T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/05/01/ludum-dare-26-post-mortem</id>
   <content type="html">&lt;p&gt;tldr; I did Ludum Dare 26 last weekend with the theme &lt;a href=&quot;http://www.ludumdare.com/compo/2013/04/24/welcome-to-ludum-dare-26/&quot;&gt;Minimalism&lt;/a&gt;. This time I made a game called Minimalist Moe. I didn’t learn a new framework this time, but used an old framework in a way that’s it’s not meant to be used and was slightly frustrated because of it: I used Three.js to make a 2D game. I also had issues with HTML5’s audio API and GLSL ES shaders.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&amp;amp;uid=7737&quot;&gt;My Ludum Dare Entry&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/ludumdare/ld26/&quot;&gt;The Game (see entry above for how to play)&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;thoughts&quot;&gt;Thoughts&lt;/h3&gt;

&lt;p&gt;Well, another Ludum Dare is over and done. Friday night, as always was mainly used for ideation and sketching out characters and game mechanics. I came up with a bunch of ideas…&lt;/p&gt;

&lt;h4 id=&quot;ideas&quot;&gt;Ideas&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;single guy (circleman) tower defense type - ended up being similar-ish to what I did&lt;/li&gt;
  &lt;li&gt;eraser - erase all the things!&lt;/li&gt;
  &lt;li&gt;furniture thing - moving stuff around to be minimalistic&lt;/li&gt;
  &lt;li&gt;closet - shoe matching to get rid of wives’ shoes&lt;/li&gt;
  &lt;li&gt;puzzle thing - clearing certain types away to a minimum&lt;/li&gt;
  &lt;li&gt;dots to fill up an area&lt;/li&gt;
  &lt;li&gt;dots to make things&lt;/li&gt;
  &lt;li&gt;shapes put together to make bigger shapes&lt;/li&gt;
  &lt;li&gt;wrecking ball to destroy towers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I decided to go with the character of Moe, a circle who relentlessly hates anything that isn’t minimalistic like he is… a flawless circle with no angles or corners. The neighborly shapes of Shapeland have decided to invade Moe’s home to attack him because of his hatred against them.&lt;/p&gt;

&lt;p&gt;Originally, I wasn’t going to use any frameworks or libraries and was going to code directly in WebGL. I had a few frustrations initially, so due to the time constraints I decided to fallback onto Three.js. I had already decided to go with a 2D game again because I wanted to make sure that I had time to work on some art: making 2D art is a lot easier than making 3D art. So, here I was, using a 3D framework to make a 2D game.&lt;/p&gt;

&lt;p&gt;As I started to build out my basic objects (Moe, the bullets, and the enemies), I figured I would leverage Three.js as much as possible in order to avoid rewriting the wheel if I could help it. The main two areas that Three.js and I argued were 1) with the ability to determine where a mouse click was in order to determine the vector from Moe’s point of origin and the mouse and 2) with it’s ability to use Raycasts in order to determine if there was an intersection between two objects.&lt;/p&gt;

&lt;p&gt;For the mouse position, I think a lot of the issues that I had were due to the fact that I was programming based on widths and heights of the overall screen, but I wasn’t making the entire screen playable, as most of the Three.js examples are. If I made the entire thing playable, then I think some of the issues may have gone away… either way, I ended up with something that works really well for my screen size and resolution, but I’m pretty sure (I know) it doesn’t work great for other sizes.&lt;/p&gt;

&lt;p&gt;For the Raycasts, the main issue was due to the fact that I was using 2D geometries (circles) as opposed to spheres. Even though I was placing everything on the Z access with zero as the Z-value, using the built-in functionality didn’t work in finding intersections. So I had to code my own version of intersecting that was far from perfect. I was a little disappointed in the results, especially after spending hours trying to fix the issue with Three.js’ abilities.&lt;/p&gt;

&lt;p&gt;Another issue I had didn’t deal with Three.js, but with the audio APIs provided by HTML5. Long story short, I spent a good amount of time trying to deal with the fact that my audio files wouldn’t always load, so my sound wasn’t always working. I didn’t spend a ton of time making sound effects, but I figured a few different sounds for the collisions would be nice. Whenever the game is created, it’s supposed to preload the sound effects, but they don’t get loaded every single time. Ultimately, it does work… but just not all the time. I think for future reference, I’m going to see how others’ make their preload screens to preload assets so I don’t mess it up next time.&lt;/p&gt;

&lt;p&gt;My final issue dealt with putting a shader on Moe, rather than a static image. I had spent some time starting to create a nice shader with eyeballs that followed the mouse (see &lt;a href=&quot;http://glsl.heroku.com/e#8379.0&quot;&gt;here&lt;/a&gt;), but it didn’t work with a very time resolution for the shader on a circle. I’m thinking I could have built it with a basic canvas drawing instead of trying shaders, but I wanted to learn/do more with shaders. Sadly, this didn’t work out either.&lt;/p&gt;

&lt;p&gt;In all, I’m pleased with the overall code and I’m glad I completed another Ludum Dare, but the product itself was only about a third of what I wanted it to be. Next time, I’m going to familiarize myself entirely with any framework/libraries that I want to use on the warmup weekend- I always wait to do anything until Saturday morning with code, so I don’t really get as far as I want overall. This time, I used Three.js for the second time, but I haven’t used it in a year, and for something it’s not intended.&lt;/p&gt;

&lt;p&gt;Until next time!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>GDC 2013</title>
   <link href="http://davidwparker.com/2013/04/30/GDC-2013/"/>
   <updated>2013-04-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/04/30/GDC-2013</id>
   <content type="html">&lt;p&gt;tldr; GDC was amazing. You should go.&lt;/p&gt;

&lt;p&gt;Last month I attended GDC for the first time. Words can’t even begin to describe the overall week, but I’m going to make an attempt. Before I talk about GDC, let me first give a shoutout to the IGDA and their scholars program.&lt;/p&gt;

&lt;h3 id=&quot;igda&quot;&gt;IGDA&lt;/h3&gt;

&lt;p&gt;Let me start by saying I was honored to be selected by the IGDA for a scholarship to GDC. If you’re unfamiliar with the IGDA, check them out &lt;a href=&quot;http://www.igda.org/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you’re a student and you’re not a member of the IGDA but you’ve been considering joining the IGDA, then stop and join now. It’s a great way to get involved in your local game development community. If you’re a student and you’re already a member of the IGDA, great! Next, make sure you take the time to apply for the student scholarships.&lt;/p&gt;

&lt;p&gt;Heather Decker-Davis, Luke Dicken, and Molly Maloney did a fantastic job at organizing events for the scholars as well as putting each scholar in contact with a mentor who is aligned with what the scholar is interested in. For example, I was paired with David Fox, founder of Double Coconut because I would also like to start my own indie game studio. I would be amiss if I didn’t also thank Sheri Rubin, who also helped organize the scholars and provided us with this fantastic list of ‘recommendations’ for &lt;a href=&quot;http://sheriforigda.org/2013/03/igda-scholar-recommendations-for-gdc-2013-and-beyond/&quot;&gt;GDC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For anyone who has never been to GDC (especially as a student), make sure you read over everyone of those recommendations, because there’s a lot to think about.&lt;/p&gt;

&lt;p&gt;Onto the events of the week…&lt;/p&gt;

&lt;h3 id=&quot;monday&quot;&gt;Monday&lt;/h3&gt;

&lt;p&gt;First thing Monday morning I left my friend’s house on the bus to Moscone Center. It wasn’t my first time in downtown San Francisco, but it was my first time at a weeklong event there. Because I didn’t get in until late on Sunday, I didn’t have the opportunity to hang out with the other scholars on Sunday night, or to get my registration stuff early. Getting my pass took a matter of minutes and I was able to peruse the three Moscone buildings so I would know when I was supposed to be where for each session.&lt;/p&gt;

&lt;p&gt;That morning, all of the scholars got together and walked to Three Rings Studio. We were given a history lesson of the company and a tour by the CEO. It was awesome to hear all about how they started off as a small indie studio and how they grew the company and eventually sold the company to Sega. Their studio was extremely cool (they had their own Tardis and steampunk’d out the facility).&lt;/p&gt;

&lt;p&gt;Next, we went to the scholars/mentors lunch where we were able to sit down and really meet and talk with different mentors. My mentor David Fox was unable to attend the lunch, but I did get to talk to other mentors present, including Robin Hunicke (producer for Journey) which was really cool.&lt;/p&gt;

&lt;p&gt;We were then left to our own so I decided to hit up sessions.&lt;/p&gt;

&lt;p&gt;The first formal session that I went to was the &lt;em&gt;OCD-Retro/Grade Postmortem&lt;/em&gt;. It was beyond amazing, and disheartening. If you haven’t heard Matt Gilgenbach’s story about Retro/Grade, then I’ll give you the short version. Basically, he spent years making a gorgeous game that had fantastic feedback but then failed to make any real money. I can see myself in that exact same place. I’m pretty OCD and I get heavily involved in my projects so it was good to see (and learn) from others’ mistakes. Anyway, Matt’s presentation was well worth it and I wish him all the best in his next project. And if you haven’t already bought Retro/Grade, you should. :)&lt;/p&gt;

&lt;p&gt;That evening, and pretty much every evening, was spent going to various parties. This is where GDC education stops and GDC networking begins. I’m going to summarize the parties, but I’ll basically say this… make sure you’re awake and able to stay out for them. The parties were where I was able to meet (and actually have the time to talk to) 90% of the people that I met at GDC.&lt;/p&gt;

&lt;h3 id=&quot;tuesday&quot;&gt;Tuesday&lt;/h3&gt;

&lt;p&gt;Tuesday morning began much like Monday, but instead of going to Three Rings Studio, we went to Double Fine Adventure. Let me say that again, we went to Double Fine! We had a brief discussion with a developer and designer which was really cool. Tim Schafer also did a Q&amp;amp;A with us which was exciting. Ever since Day of the Tentacle, I’ve been a Tim Schafer fan. Finally, we ended our time at Double Fine with a brief tour.&lt;/p&gt;

&lt;p&gt;After I went to as many indie-related sessions as possible… here’s the short version notes.&lt;/p&gt;

&lt;h4 id=&quot;designing-without-a-pitch---ftl-postmortem&quot;&gt;&lt;em&gt;Designing without a Pitch - FTL Postmortem&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;18 months development&lt;/li&gt;
  &lt;li&gt;Initially thought of as 3-month side project&lt;/li&gt;
  &lt;li&gt;Build… every month: what was fun, what was not fun, where can we go from here?&lt;/li&gt;
  &lt;li&gt;Always iterate and follow the fun&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;spacechem-postmortem&quot;&gt;&lt;em&gt;SpaceChem Postmortem&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Design-based puzzle game&lt;/li&gt;
  &lt;li&gt;It’s a hard thing to do (indie puzzle games with a community)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;indie-soapbox&quot;&gt;&lt;em&gt;Indie Soapbox&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Spyparty - “No one has heard about your game” &amp;amp; “You cannot overhype a game, you can only underdeliver”&lt;/li&gt;
  &lt;li&gt;Fez QA horror&lt;/li&gt;
  &lt;li&gt;Fez and procedural music&lt;/li&gt;
  &lt;li&gt;Tim Rogers - “I am an independent game developer”&lt;/li&gt;
  &lt;li&gt;Emily Short - “Text is not cheap”&lt;/li&gt;
  &lt;li&gt;Noel Llopsis - Why are you making games? Know your intentions&lt;/li&gt;
  &lt;li&gt;Collin - how to travel full time as an indie game developer&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;wednesday&quot;&gt;Wednesday&lt;/h3&gt;

&lt;p&gt;Wednesday morning I was invited to Sheri’s fantastic annual breakfast. While it was a bit crazy to go to bed so late and wake up so early, it did give me the chance to meet with a lot more industry experts… seriously though, network network network.&lt;/p&gt;

&lt;p&gt;After breakfast, I briefly perused the expo floor. Since I’m not there representing a company and I wasn’t applying for any positions, I was able to briskly walk through the entire floor. There was a lot of cool tech out (Oculus Rift, for example), but I wasn’t going to wait in line for an hour to try it. I did take the time to play each of the Independent Game Festival nominee games. That was the best part of the expo for me… probably because I really like indie stuff so much.&lt;/p&gt;

&lt;p&gt;In addition to going to the expo floor, I went to GDC Play, where a lot of indies were presenting their games there too. Most, I believe, were looking to publishers to help them bring their game to the mass market. While I don’t know the industry well enough, I hope that some of them are able to publish their game without an actual publisher (some of the games I played there were a blast).&lt;/p&gt;

&lt;p&gt;For sessions on Wednesday I went to as many roundtables as possible. Per Sheri’s suggestions, I wanted to go to as many non-recorded sessions as possible, and none of the roundtables are recorded. I could later watch the recorded sessions on the GDC Vault. I preferred to go to roundtables that weren’t exactly my expertise (development), but areas that I’m definitely interested in (art, vfx, etc).&lt;/p&gt;

&lt;h4 id=&quot;visual-effects-artist-roundtable&quot;&gt;&lt;em&gt;Visual Effects Artist Roundtable&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Where is the divide between designer and visual effects artist?&lt;/li&gt;
  &lt;li&gt;Lots of talk about communication with others&lt;/li&gt;
  &lt;li&gt;Tricks of the trade&lt;/li&gt;
  &lt;li&gt;Background: understand both the tech and the art, performance profiling, ask a lot of questions&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;animation-roundtable&quot;&gt;&lt;em&gt;Animation Roundtable&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Animators = What/who are we? Designer, problem solver, creatives&lt;/li&gt;
  &lt;li&gt;Lots of interesting discussions on dichotomy between animators and designers&lt;/li&gt;
  &lt;li&gt;Disney pairs animators and engineers together&lt;/li&gt;
  &lt;li&gt;Know the 12 principles of animation&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;art-director-and-lead-artist-roundtable&quot;&gt;&lt;em&gt;Art Director and Lead Artist Roundtable&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;How do you build leaders?&lt;/li&gt;
  &lt;li&gt;What makes a good art lead? And what makes a bad art lead? … very interesting how similar they are to a good engineering leader/manager.&lt;/li&gt;
  &lt;li&gt;Always know “why”… if design wants a button added, find out what the general purpose is so you can make it be exactly what it needs to be.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After those roundtables, I hit up one sessions that dealt entirely with VFX (I really love shaders)…&lt;/p&gt;

&lt;h4 id=&quot;light-based-rendering-for-tomb-raider&quot;&gt;&lt;em&gt;Light-based Rendering for Tomb Raider&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Several different shaders (“lights”): wet lights, dark lights, fire lights, low-res lights, screen space ambient occlusion, light buffer, fog, translucents, and post-processing…&lt;/li&gt;
  &lt;li&gt;I think they said they made 12+ renderings before finally rendering the output per scene&lt;/li&gt;
  &lt;li&gt;250+ lights&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That evening was the Independent Game Festival (IGF) Awards and Game Developers Choice (GDC) Award shows. These are basically the Oscars of awards for the game development community, where the winners are selected from their peers. It’s pretty cool. Both award shows were great. And if you’re wondering who won big? Journey took just about every category…&lt;/p&gt;

&lt;p&gt;My last semi-organized event of the evening was going to the Ludum Dare dinner. I’ve now done 5 Ludum Dares (4 at the time of GDC) and I was eager to meet Mike and Phil since they run the show. It was just a good ol’ time of networking and talking to other indie game (Ludum Dare) developers.&lt;/p&gt;

&lt;h3 id=&quot;thursday&quot;&gt;Thursday&lt;/h3&gt;

&lt;p&gt;A nice long day of sessions…&lt;/p&gt;

&lt;h4 id=&quot;10-questions-am-i-ready-to-go-indie&quot;&gt;&lt;em&gt;10 Questions: Am I ready to go Indie?&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;What game mean most to you as a kid? And now?&lt;/li&gt;
  &lt;li&gt;When thinking about being an indie, what does your b-card say? What will you spend your days doing?&lt;/li&gt;
  &lt;li&gt;Do you have a paying job or are/can you do your game on the side? How much do you need/month? How long can I sustain living that way?&lt;/li&gt;
  &lt;li&gt;Same as #3, but with a team?&lt;/li&gt;
  &lt;li&gt;How many people depend on your income?&lt;/li&gt;
  &lt;li&gt;How does your partner think about risk?&lt;/li&gt;
  &lt;li&gt;If you start up a company and have success, how long a commitment do you think you’ll make?&lt;/li&gt;
  &lt;li&gt;What’s the project from your career that your peers/players gave you most praise?&lt;/li&gt;
  &lt;li&gt;Biggest project start to finish? Shipped successfully? What was your role?&lt;/li&gt;
  &lt;li&gt;How would you feel if everyone said your game sucked? If it didn’t make money?&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;fortnites-shader-based-procedural-animations&quot;&gt;&lt;em&gt;Fortnite’s Shader-based Procedural Animations&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Yay vertex shaders!&lt;/li&gt;
  &lt;li&gt;Several fun shaders: bounce, culling, self-building walls&lt;/li&gt;
  &lt;li&gt;Bounce: discover worldspace and impact location, damage radius and power… use spline effect to bounce back and forth&lt;/li&gt;
  &lt;li&gt;Culling: scale operation from viewpoint of model&lt;/li&gt;
  &lt;li&gt;Self-building structures: built-in-game, structure health, efficient; needed vertex shaders to have one mesh act as many. Used scripting, transformations, animations, and masking&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;sand-rendering-in-journey&quot;&gt;&lt;em&gt;Sand Rendering in Journey&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Used a ton of “hacks” before shipping: sharp mips, anisotropic mask, glittering on/off, specular on, diffuse on, detail heightmaps on&lt;/li&gt;
  &lt;li&gt;Sharp mips: sand is grainy.. real sand looks mushed, not so sharp&lt;/li&gt;
  &lt;li&gt;Reflective sand (terrible in motion)&lt;/li&gt;
  &lt;li&gt;Unrealistic “sun” off of sand… like water- fluid&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;game-designers-and-developers-roundtable&quot;&gt;&lt;em&gt;Game Designers and Developers Roundtable&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Do I want to be a leader?&lt;/li&gt;
  &lt;li&gt;Roles and Titles… very different in every company&lt;/li&gt;
  &lt;li&gt;Designers often but heads with producers… (and discussion why)&lt;/li&gt;
  &lt;li&gt;Many issues of trust (over and over again)… communication, constructive, and understandable&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;working-the-crowd-engaging-players-through-the-ui&quot;&gt;&lt;em&gt;Working the Crowd: Engaging Players through the UI&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Be intuitive on an emotional level… even for UI.&lt;/li&gt;
  &lt;li&gt;2 conflicting goals: 1) present information in way that is easy to use/understand and 2) evoke personality of game&lt;/li&gt;
  &lt;li&gt;Good UI is invisible&lt;/li&gt;
  &lt;li&gt;UI communicates the personality of the game&lt;/li&gt;
  &lt;li&gt;Allow your unique style to come through every aspect of the game&lt;/li&gt;
  &lt;li&gt;Find a guiding influence to unite various parts of interface&lt;/li&gt;
  &lt;li&gt;Help others feel like what they’re using is made by humans&lt;/li&gt;
  &lt;li&gt;Constraints force-creative solutions&lt;/li&gt;
  &lt;li&gt;Start w/a crazy idea&lt;/li&gt;
  &lt;li&gt;Positive emotion trumped all usability concerns&lt;/li&gt;
  &lt;li&gt;Inspiring reaction is better than feeling nothing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;friday&quot;&gt;Friday&lt;/h3&gt;

&lt;p&gt;And another day of sessions…&lt;/p&gt;

&lt;h4 id=&quot;technical-art-roundtable&quot;&gt;&lt;em&gt;Technical Art Roundtable&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Annoying problems for technical artists: different IDEs and switching back and forth between languages, Maya and things that still don’t work with Python, no APIs for production tools (Unreal, Crytek), Remote debugging in Eclipse&lt;/li&gt;
  &lt;li&gt;Tip: sell stuff by “time saved”&lt;/li&gt;
  &lt;li&gt;Be sure to Scotty your producer… always multiply out your time estimates to be more accurate (1.4x, 2x, whatever it is that would be real). This allows you to test and make your code robust and overdeliver instead of underdelivering.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;experimental-gameplay-workshop&quot;&gt;&lt;em&gt;Experimental Gameplay Workshop&lt;/em&gt;&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Over 130 submissions.&lt;/li&gt;
  &lt;li&gt;Some of the games: Castle Doctrine, Mushroom11, Plus Gun, 6180 the Moon, Perspective, Meigakure, Starseed Pilgrim, Kachina, SpaceTeam, Soundodger, Memory of a Broken Dimension, Architecture Games, Mexican Kitchen Workers, Searchlight.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;closing-thoughts&quot;&gt;Closing Thoughts&lt;/h3&gt;

&lt;p&gt;I had a blast at GDC and I’m hoping for many more. I’m extremely thankful to the IGDA for helping make it a reality. I’m already starting to plan for next year: I’d really like to go to the 2-day workshops on Monday-Tuesday.&lt;/p&gt;

&lt;p&gt;Until next year!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Refuse to Choose</title>
   <link href="http://davidwparker.com/2013/01/11/book-refuse-to-choose/"/>
   <updated>2013-01-11T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/01/11/book-refuse-to-choose</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: December 2012 - January 2013&lt;/li&gt;
  &lt;li&gt;Rating: 9.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1594866260?tag=parker08-20&quot;&gt;Refuse to Choose&lt;/a&gt; by Barbara Sher is exactly what I wanted to read. At this point in my life, where I’m getting ready to finish grad school with a double master’s, but with many, many interests in my life, I determined that I wasn’t going to make the right decision. Whatever I chose to do, would ultimately, due to my love of other passions, be wrong. This book helped me to know that isn’t the case, and that I can embrace one, two, or 20 things. It’s a pretty hard concept to grasp, and I’m still working on it. In the coming months, I’ll post my thoughts on being a Scanner. The one thing I wasn’t as keen on is that Barbara had too many personal anecdotes. I think the book could have been 50% shorter and still maintained the same level of quality.&lt;/p&gt;

&lt;p&gt;All things said, if you have any inclination that you might be a Scanner, I recommend this book 100%.&lt;/p&gt;

&lt;h2 id=&quot;the-book&quot;&gt;The Book&lt;/h2&gt;

&lt;p&gt;The book is broken up into 2 parts:&lt;/p&gt;

&lt;h3 id=&quot;all-about-scanners&quot;&gt;All about Scanners&lt;/h3&gt;

&lt;p&gt;Chapters 1-8. These chapters describe everything about what a Scanner is. They discuss what’s wrong with Scanners (nothing!), panic, commitment phobia, busy-ness, not starting anything, and not finishing anything.&lt;/p&gt;

&lt;h3 id=&quot;types-of-scanners&quot;&gt;Types of Scanners&lt;/h3&gt;

&lt;p&gt;Chapters 9-19. These chapters discuss the 9 different types of Scanners that Barbara has catalogued, within the two subtypes of Cyclical Scanners and Sequential Scanners.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;are-you-a-scanner&quot;&gt;Are you a Scanner?&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;I can never stick to anything.&lt;/li&gt;
  &lt;li&gt;I know I should focus on one thing, but which one?&lt;/li&gt;
  &lt;li&gt;I lose interest in things I thought would interest me forever.&lt;/li&gt;
  &lt;li&gt;I keep going off on another tangent.&lt;/li&gt;
  &lt;li&gt;I get bored as soon as I know how to do something.&lt;/li&gt;
  &lt;li&gt;I can’t stand to do anything twice.&lt;/li&gt;
  &lt;li&gt;I keep changing my mind about what I want to do and end up doing nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I literally just said “if only there were five of me, then I’d get to do everything I want to do”. Quote from the book: “If only she were five people instead of just one, she’d do everything, all of it, right now, today.”&lt;/p&gt;

&lt;p&gt;Are you unable to figure out what drives you and why you’re so different from people who made their choices early and followed one path?&lt;/p&gt;

&lt;p&gt;If Scanners didn’t think they should limit themselves to one field, 90% of their problems would cease to exist!&lt;/p&gt;

&lt;p&gt;Many people look like Scanners, but aren’t: depressed people, ADD people (though people with ADD can also be Scanners).&lt;/p&gt;

&lt;h3 id=&quot;lists-of-exercises-in-the-book&quot;&gt;Lists of exercises in the book.&lt;/h3&gt;

&lt;p&gt;I compiled these from different chapters as things I recommend doing.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Creating the Scanner Daybook. This is a blank book devoted to what you do each day. Not a laundry list or general journaling, but anything related to being a Scanner. It’s a place to capture your best ideas and tangents. Think about da Vinci’s books. It’s also a self-study book… without restrictions, what kind of Scanner emerges given you can learn, design, or imagine anything you like? You should always put a date, time, and title. Include as many descriptions as possible- you want others to understand what you were thinking. Draw, and ideate your heart out.
It doesn’t matter if never do what you describe on these pages, because finishing a project is not the issue here.
When you decide to stop a session, catch the thought you had that caused that decision: “I’m losing interest in this” or “I want to continue, but I have to go work out”. Write that description and time down.
Write in your daybook every day for the first few weeks.&lt;/li&gt;
  &lt;li&gt;With your Daybook and sketch your house. Then, walk around each room carefully and list projects within that room. Half-complete, not started, finished, it doesn’t matter. List them.&lt;/li&gt;
  &lt;li&gt;The “What Have I Done So Far?” List. Include all accomplishments, big or small. Include projects that you started and didn’t finish, businesses that didn’t get off the ground, and courses you didn’t complete. Novels you planned but didn’t write. It could be anything that you’ve done over the course of your life.&lt;/li&gt;
  &lt;li&gt;Take your “What Have I done so far?” list and add anything that interested you, even for a short time period. Ask yourself two questions for everything on the list: 1) What was the most exciting or interesting part of the experience? 2) Why did you stop when you did?&lt;/li&gt;
  &lt;li&gt;The Wall Calendar Poster. Grab six blank sheets of paper. Label them for this year and the next five. Right down every project you really long to do (not every one you can think of). Assign a different color to each activity and draw that color and the year in time you hope to do it. This isn’t written in stone, but will help you visualize what you want to get done.&lt;/li&gt;
  &lt;li&gt;Career Tryout. In your Daybook, write a first-person, present-tense fantasy of what you imagine your workday will be like. When contemplating a career, use the LTTL system: Learn, Try, Teach, Leave. Write a one-page plan for every career or interest you’re considering using the LTTL system.&lt;/li&gt;
  &lt;li&gt;The Big List. With four to six blank pages in your Daybook, write a numbered list of anything and everything that interests you, that has ever interested you, or that might ever interest you if you live up to 105 years old. Things you want to learn, to do, learn about, make, collect, create, etc. Include: everything you’ve already done, everything you wish you could do for the first time, everything you wish you’d be being all through the years to come, everything you’d like to do once or twice only. Give yourself a few days to finish this exercise. Think about how long it would take for you to get what you want from each item in this list. Keep the following questions in mind: 1) what do you really want to know about this area of interest? 2) what would you most enjoy doing with that information? 3) who would you love to talk with about this subject if you could talk to anyone?&lt;/li&gt;
  &lt;li&gt;Also, keeping a list of things you don’t want to do is great (The Not List)!&lt;/li&gt;
  &lt;li&gt;If you’re a Scanner who wants to start something but can’t follow these three steps: 1) create a backward planning flowchart, 2) let the flowchart expose any hidden fears you may have, 3) set up a real deadline (a drop-dead date). For step 1, start with the end goal. Then ask yourself “could I achieve that goal right now? If not, what would I need first?” and draw backwards any sub-goals that need to be achieved to get to that goal. Continually do that until you’re at sub-goals that you can complete right now. Always have a target date for each goal and sub-goal.&lt;/li&gt;
  &lt;li&gt;Think back to a project you lost interest in. Pretend you’re there again and have to recreate the experience of having to focus your attention on the task. How do you feel? (bored, anxious, bad, locked away)…&lt;/li&gt;
  &lt;li&gt;Think about how you feel when you’re in full-speed-ahead Scanner mode, when you’re completely captivated by something and want to do it more than anything in else in the world.&lt;/li&gt;
  &lt;li&gt;For Double Agents: Use a two-year calendar, divided into seasons. This can be in conjunction with the six-year calendar or it can replace it.&lt;/li&gt;
  &lt;li&gt;For Sybil’s: Make a Scanner Planner. It’s a daily calendar with an activity for everyday at the top from your Big List.&lt;/li&gt;
  &lt;li&gt;For Plate Spinners: with 10 or 15 minutes and your Daybook, imagine you are alone on a tiny desert isle alone, with nothing to do. You have enough food until the boat comes in two days. Write down what comes to your mind. After, reflect. Did you get bored or find your thinking slip into a different mode?&lt;/li&gt;
  &lt;li&gt;For the Serial Specialist: Create a never ending resume. You won’t send it to a potential employer, but you will have a comprehensive list of your skills.&lt;/li&gt;
  &lt;li&gt;For the Serial Master: Answer the following questions: 1. Describe the moment you first realized you were drawn to each of your interests. 2. Do you see anything these moments had in common? 3. Was there anything you realize as essential in all of them? 4. Can you list areas you know you are definitely not interested in taking up? 5. Do they have anything in common?&lt;/li&gt;
  &lt;li&gt;For the Wanderer: Find a common theme for your interests. Also, see the not list.&lt;/li&gt;
  &lt;li&gt;For the Sampler: Have an annual show-and-tell of your projects and what you learned throughout the year.&lt;/li&gt;
  &lt;li&gt;For the High-Speed Indecisive: Create a catalog of ideas with potential.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Capture ideas while it interests you. This will teach you a lot about what attracts you and for how long. It will allow you to take every idea and every vision at least one step instead of discarding it.&lt;/p&gt;

&lt;p&gt;Respect for ideas is the same as respect for the idea maker: you.&lt;/p&gt;

&lt;p&gt;End the notion that ideas have no value unless they turn into a business or some other practical use.&lt;/p&gt;

&lt;p&gt;Interest is the sincerest form of respect.&lt;/p&gt;

&lt;p&gt;A Scanner must find a way to follow every path that interests her.&lt;/p&gt;

&lt;p&gt;Scanners secretly refuse to choose (they don’t want fewer interests).&lt;/p&gt;

&lt;p&gt;Scanners can, so they must, explore many things.&lt;/p&gt;

&lt;p&gt;Most Scanners aren’t as attached to stability as other people.&lt;/p&gt;

&lt;p&gt;The drive to learn and understand everything they see.&lt;/p&gt;

&lt;p&gt;When you see someone with no tolerance for boredom, who is curious about almost anything new and has the ability to constantly process fresh material, you’re looking at a Scanner.&lt;/p&gt;

&lt;p&gt;You can tell what a Scanner’s reward is by why he’s drawn to something and when he stops.&lt;/p&gt;

&lt;p&gt;Scanners love learning more than anything else.&lt;/p&gt;

&lt;h3 id=&quot;what-reward-draws-you-to-any-activity&quot;&gt;What reward draws you to any activity?&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Knowing how to do lots of things so you can jump in and help; feeling capable&lt;/li&gt;
  &lt;li&gt;Insights, revelations, discoveries, exploration&lt;/li&gt;
  &lt;li&gt;Anything new: people, places, experiences&lt;/li&gt;
  &lt;li&gt;Having impact, being seen&lt;/li&gt;
  &lt;li&gt;Exercising intelligence because it feels good&lt;/li&gt;
  &lt;li&gt;Sensation: hearing, moving, smelling, seeing, touching&lt;/li&gt;
  &lt;li&gt;Using all parts of myself, my logic, my intuition, my empathy, my abilities&lt;/li&gt;
  &lt;li&gt;Challenging myself, testing my limits, seeing how good I can be&lt;/li&gt;
  &lt;li&gt;Studying anything, like how to make sushi&lt;/li&gt;
  &lt;li&gt;Creating something that didn’t exist before, creating solutions to problems&lt;/li&gt;
  &lt;li&gt;Vision: imagining possibilities, planning things&lt;/li&gt;
  &lt;li&gt;Beauty: making things beautiful, having beauty around me&lt;/li&gt;
  &lt;li&gt;Building expertise: a reputation, a body of work&lt;/li&gt;
  &lt;li&gt;Belonging: finding a community where I can be myself&lt;/li&gt;
  &lt;li&gt;Discovering what’s going on, how things run, what’s behind the surface&lt;/li&gt;
  &lt;li&gt;Pulling together the big picture, leaving nothing out, seeing relationships between things&lt;/li&gt;
  &lt;li&gt;Saving the day: being competent and being able to fix things&lt;/li&gt;
  &lt;li&gt;Learning by doing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plain and simple, the worst thing that can be said about a Scanner is that he doesn’t stick to things as long as other people think he should.&lt;/p&gt;

&lt;p&gt;Scanners often forget tomorrow exists (I don’t!)&lt;/p&gt;

&lt;h3 id=&quot;top-obstacles-for-panicked-scanners&quot;&gt;Top obstacles for panicked Scanners:&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;You fear critics
    &lt;ul&gt;
      &lt;li&gt;Perfectionists need to admit source of conflict&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You’ve created a “See, it’s impossible!” list
    &lt;ul&gt;
      &lt;li&gt;Remove some things off see, it’s impossible list&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You’ve inadvertently made the project too big
    &lt;ul&gt;
      &lt;li&gt;Shrink the size of the project to fit reality by keeping only parts you love the most&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You don’t feel entitled to just do whatever you want
    &lt;ul&gt;
      &lt;li&gt;Doing what you love isn’t a privilege, it’s an obligation&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You think you’re the problem
    &lt;ul&gt;
      &lt;li&gt;You’d do everything “right” if you could&lt;/li&gt;
      &lt;li&gt;If you don’t get into action, you’ve failed anyway&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You’re pulled in too many directions
    &lt;ul&gt;
      &lt;li&gt;It doesn’t make the slightest difference where you begin&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Realizing that there’s plenty of time to do everything you love is a very big thing for a Scanner.&lt;/p&gt;

&lt;h3 id=&quot;commitmentphobes-list-of-mistaken-assumptions&quot;&gt;Commitmentphobe’s list of mistaken assumptions:&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;You must choose one and only one path in life.&lt;/li&gt;
  &lt;li&gt;Everything you love has to be a career. Doing something for pleasure doesn’t count.&lt;/li&gt;
  &lt;li&gt;If you’re not in love with your job, it will be a living hell.&lt;/li&gt;
  &lt;li&gt;You have to get it right, because every career choice requires a huge investment of time and money.&lt;/li&gt;
  &lt;li&gt;Once you make your choice, you serve a life sentence with no choice of parole.&lt;/li&gt;
  &lt;li&gt;If you’re not passionate to the point of obsession, you’ll never be content to give up all your other interests.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As a Scanner, do everything that interests you.&lt;/p&gt;

&lt;p&gt;You may discover what you really love is learning itself.&lt;/p&gt;

&lt;p&gt;Scanners must commit to everything that interests them.&lt;/p&gt;

&lt;p&gt;As to careers, love it or leave it.&lt;/p&gt;

&lt;h3 id=&quot;why-you-may-be-busier-than-you-are&quot;&gt;Why you may be busier than you are:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;You pile it on to prove you’re not a bad person.&lt;/li&gt;
  &lt;li&gt;You pile it on to see how much you can handle.&lt;/li&gt;
  &lt;li&gt;You want to push yourself until you collapse.&lt;/li&gt;
  &lt;li&gt;You’re speeding and it feels utterly necessary, but you can’t remember why.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;bag-of-tricks-to-be-less-busy&quot;&gt;Bag of tricks to be less busy:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Make your mental to-do list and cut it in half!&lt;/li&gt;
  &lt;li&gt;Get more help than you need.&lt;/li&gt;
  &lt;li&gt;Grab your time first.&lt;/li&gt;
  &lt;li&gt;Ignore everything but your favorite parts.&lt;/li&gt;
  &lt;li&gt;Learn to sort and dispose of what comes at you, fast.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;i-wont-do-anything-if-i-cant-do-everything&quot;&gt;“I won’t do anything if I can’t do everything”&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Scanners don’t really want (to do) everything.&lt;/li&gt;
  &lt;li&gt;Scanners don’t really want the depth they imagine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scanners often think things take less time than they really do.&lt;/p&gt;

&lt;p&gt;Think about how long it would take for you to get what you want from each one (item in the big list).&lt;/p&gt;

&lt;p&gt;Making lists and plans without actual information is just an extension of the fantasy; for many Scanners, daydreaming with a pencil in your hand is a way of life. In fact, it’s a way to avoid action when your dreams look impossible. Real planning, on the other hand, the kind with facts and appointments and deadlines, is totally different.&lt;/p&gt;

&lt;p&gt;Isolation is the dream killer. It will stop you every time.&lt;/p&gt;

&lt;h4 id=&quot;the-reason-you-stop-and-dont-finish-projects-etc-is-that-when-you-do-you-got-what-you-came-for-already-you-learned-what-you-wanted-to-learn&quot;&gt;The reason you stop (and don’t finish projects, etc) is that when you do, you got what you came for already. You learned what you wanted to learn.&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;You leave a project because staying would feel intolerable.&lt;/li&gt;
  &lt;li&gt;Staying would be intolerable because nothing you want is there.&lt;/li&gt;
  &lt;li&gt;If you stayed, you’d have to accept being unhappy.&lt;/li&gt;
  &lt;li&gt;And trying to accept being unhappy is just crazy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why does every bright idea have to be an opportunity to become accomplished, rich, and famous?&lt;/p&gt;

&lt;h3 id=&quot;the-bored-scanners-bag-of-tricks&quot;&gt;The bored Scanner’s bag of tricks:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Eat your vegetables first but remember that dessert is coming&lt;/li&gt;
  &lt;li&gt;Bring in a buddy&lt;/li&gt;
  &lt;li&gt;Keep track of how far you’ve gotten&lt;/li&gt;
  &lt;li&gt;Invent a fantasy to make it more interesting&lt;/li&gt;
  &lt;li&gt;Take notes on overheard dialogue&lt;/li&gt;
  &lt;li&gt;Work in short sprints&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-life-design-model-ldm&quot;&gt;The Life Design Model (LDM)&lt;/h3&gt;

&lt;p&gt;LDMs are a combination of time management and task organizing.&lt;/p&gt;

&lt;p&gt;Scanners love to learn more than they love to “know.”&lt;/p&gt;

&lt;h3 id=&quot;types-of-scanners-1&quot;&gt;Types of Scanners&lt;/h3&gt;

&lt;h4 id=&quot;cyclical-scanners&quot;&gt;Cyclical Scanners&lt;/h4&gt;

&lt;p&gt;Cyclical Scanners are the first general type of Scanner. They tend to revisit the same projects or activities or passions throughout their lives.&lt;/p&gt;

&lt;h4 id=&quot;double-agent&quot;&gt;Double Agent&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-double-agent&quot;&gt;Are you a double agent?&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Have you given up a dream because it’s unrealistic?&lt;/li&gt;
  &lt;li&gt;Would you love to live in more than one country or have more than one career?&lt;/li&gt;
  &lt;li&gt;Do you believe life is full of hard choices?&lt;/li&gt;
  &lt;li&gt;Do you ever consider just quitting your job and starting over in something you love?&lt;/li&gt;
  &lt;li&gt;Would you hate to be seen as selfish? Are you stuck because a change would cause too much sacrifice for the people you love?&lt;/li&gt;
  &lt;li&gt;Do you sometimes think your problem would be solved if you were two (or more) people?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes&quot;&gt;Notes:&lt;/h5&gt;

&lt;p&gt;Double Agent’s often have either/or mindsets.&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-double-agents&quot;&gt;LDMs for Double Agents:&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Telecommuting: how to be in two places at once&lt;/li&gt;
  &lt;li&gt;Schoolteacher: summers off&lt;/li&gt;
  &lt;li&gt;Others: Farmer, Seasonal&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;dreams-include-travel&quot;&gt;Dreams include travel?&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Find jobs you can easily replace&lt;/li&gt;
  &lt;li&gt;Be an independent worker&lt;/li&gt;
  &lt;li&gt;Find highly paid short-term work to pay for the whole year&lt;/li&gt;
  &lt;li&gt;Follow the sun (move regularly)&lt;/li&gt;
  &lt;li&gt;Find a portable job&lt;/li&gt;
  &lt;li&gt;Find a job with built-in travel&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;want-or-need-more-than-one-career&quot;&gt;Want or need more than one career?&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Do one for the money, the others for love. Find a single “good enough” job, that pays for the rest.&lt;/li&gt;
  &lt;li&gt;Combine your favorite interests with your job (e.g. be a national park employee)&lt;/li&gt;
  &lt;li&gt;Start your own business&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Use a two-year calendar, divided into seasons. This can be in conjunction with the six-year calendar or it can replace it.&lt;/p&gt;

&lt;h5 id=&quot;careers&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Replaceable jobs&lt;/li&gt;
  &lt;li&gt;Independent work&lt;/li&gt;
  &lt;li&gt;Portable jobs&lt;/li&gt;
  &lt;li&gt;Jobs with built-in travel&lt;/li&gt;
  &lt;li&gt;The good enough job&lt;/li&gt;
  &lt;li&gt;Own small business&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;sybil&quot;&gt;Sybil&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-sybil&quot;&gt;Are you a Sybil?&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Did you ever wish you were 20 people?&lt;/li&gt;
  &lt;li&gt;Can you name all the projects that you’d love to work on?&lt;/li&gt;
  &lt;li&gt;Have you been interested in most of them for a long time?&lt;/li&gt;
  &lt;li&gt;Do you have a major clutter problem; do you often mislay important parts of what you’re doing?&lt;/li&gt;
  &lt;li&gt;Would you love to finish a project before you move to another, but you’ve never done that?&lt;/li&gt;
  &lt;li&gt;Do you love insights, revelations, discoveries that make you say “I never knew that!”&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-1&quot;&gt;Notes:&lt;/h5&gt;

&lt;p&gt;Very little tolerance for chaos and have bursts of organizing energy they find very satisfying.&lt;/p&gt;

&lt;p&gt;Not as goal-driven on personal projects.&lt;/p&gt;

&lt;p&gt;Constantly start over, so don’t get very far with projects.&lt;/p&gt;

&lt;p&gt;You wish you could be an authority in one of your areas of interest.&lt;/p&gt;

&lt;p&gt;Sybils need to replace some freedom with structure.&lt;/p&gt;

&lt;p&gt;“Part of the reason I wasn’t doing what I loved was that it always made me feel a little guilty.”&lt;/p&gt;

&lt;p&gt;Create small workstations with everything necessary for a project at that workstation. When you feel like working on a particular project, get that workstation out (or go to it), and work away!&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-sybils&quot;&gt;LDMs for Sybils&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;School Day: work on projects for a limited time every day (like you were in school). Write down this schedule (and stick to it!)&lt;/li&gt;
  &lt;li&gt;Spy: Dress the part of whatever your project is- be that person completely, and then go back to your normal self (be a spy in that field!)&lt;/li&gt;
  &lt;li&gt;Physician: Work on one project Monday and Tuesday, another Wednesday and Thursday, and another on Friday. Divide your week up by days.&lt;/li&gt;
  &lt;li&gt;Random Acts of Passion: Give in to your impulse to interrupt yourself and work on a different project, work on it a little (even in your Daybook), then put it away and get back to working on your current project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Make a Scanner Planner. It’s a daily calendar with an activity for everyday at the top from your Big List.&lt;/p&gt;

&lt;p&gt;More tools: use 20 or 30 Three-ring binders to keep track of projects. If the projects are bigger, than get boxes.&lt;/p&gt;

&lt;h5 id=&quot;careers-1&quot;&gt;Careers:&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Multiple income streams&lt;/li&gt;
  &lt;li&gt;The good enough job&lt;/li&gt;
  &lt;li&gt;A home business&lt;/li&gt;
  &lt;li&gt;Umbrella careers- a career where you do many things you enjoy&lt;/li&gt;
  &lt;li&gt;Consultant&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;plate-spinner&quot;&gt;Plate Spinner&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-plate-spinner&quot;&gt;Are you a Plate Spinner?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Do you often come up with solutions to problems faster than most people?&lt;/li&gt;
  &lt;li&gt;Do you enjoy the challenge of keeping lots of projects going at once?&lt;/li&gt;
  &lt;li&gt;Do you find it hard to say no when people ask you for help?&lt;/li&gt;
  &lt;li&gt;Do you like learning only when it solves problems, not for its own sake?&lt;/li&gt;
  &lt;li&gt;Does it feel good to be needed, to feel you’re make a difference?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-2&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;Use the LTTL system.&lt;/p&gt;

&lt;p&gt;Start all of your businesses. Become an incubator.&lt;/p&gt;

&lt;p&gt;Use a virtual assistant as necessary.&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-plate-spinners&quot;&gt;LDMs for Plate Spinners&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Alternating Current- no calendar or schedule, just be able to go back and forth on theoretical and “real” projects.&lt;/li&gt;
  &lt;li&gt;LTTL.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: with 10 or 15 minutes and your Daybook, imagine you are alone on a tiny desert isle alone, with nothing to do. You have enough food until the boat comes in two days. Write down what comes to your mind. After, reflect. Did you get bored or find your thinking slip into a different mode?&lt;/p&gt;

&lt;h5 id=&quot;careers-2&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Incubator&lt;/li&gt;
  &lt;li&gt;Troubleshooter&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;sequential-scanners&quot;&gt;Sequential Scanners&lt;/h4&gt;

&lt;p&gt;Do you like to get into something new every few days? Weeks? Months? Years? Do you tend to not do the same thing over and over? You may be a sequential scanner.&lt;/p&gt;

&lt;h4 id=&quot;serial-specialist&quot;&gt;Serial Specialist&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-serial-specialist&quot;&gt;Are you a Serial Specialist?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Does your work record look like it should belong to more than one person because you’ve changed directions so often?&lt;/li&gt;
  &lt;li&gt;Do you immerse yourself deeply in a project or job for so long it looks to others like a permanent life choice?&lt;/li&gt;
  &lt;li&gt;Do you find that once you get the hang of what you’re doing, you’re ready to leave and start somewhere else?&lt;/li&gt;
  &lt;li&gt;Do you love exploring the culture inside a corporation, hospital, film production house, or Wall Street financial firm?&lt;/li&gt;
  &lt;li&gt;Do you worry that your career changes will leave you without a body of work or a reputation as an expert in the long run?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-3&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;Tend to think: don’t spend your life making money you don’t nee, and you don’t waste time doing things you already know how to do.&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-serial-specialists&quot;&gt;LDMs for Serial Specialists&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Walter Mitty- Choose an umbrella career (see below) so that you can be entertained while maintaining financial security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Create a never ending resume. You won’t send it to a potential employer, but you will have a comprehensive list of your skills.&lt;/p&gt;

&lt;h5 id=&quot;careers-3&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Umbrella careers: see items below this one.&lt;/li&gt;
  &lt;li&gt;Writer&lt;/li&gt;
  &lt;li&gt;Teacher&lt;/li&gt;
  &lt;li&gt;Historian&lt;/li&gt;
  &lt;li&gt;Public Speaker&lt;/li&gt;
  &lt;li&gt;Trouble Shooter&lt;/li&gt;
  &lt;li&gt;Personal Assistant&lt;/li&gt;
  &lt;li&gt;Consultant&lt;/li&gt;
  &lt;li&gt;Business Skills&lt;/li&gt;
  &lt;li&gt;Your own business&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;serial-master&quot;&gt;Serial Master&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-serial-master&quot;&gt;Are you a Serial Master?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Do you love taking on a learning challenge?&lt;/li&gt;
  &lt;li&gt;Do you look forward to the struggle against your own limits?&lt;/li&gt;
  &lt;li&gt;Is it exhilarating to move from ignorance to competence and to realize you’ve done well because of your own efforts?&lt;/li&gt;
  &lt;li&gt;Do you have less and less available time because you dislike leaving any hard-learned skill behind but continue taking on new ones?&lt;/li&gt;
  &lt;li&gt;Have you ever wished you could clone yourself so you could keep learning new things?&lt;/li&gt;
  &lt;li&gt;Do you get satisfaction from showing people how to do better? Do you wish you could change their view on their own limits?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-4&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;Every scanner should give mastery a try (whether they’re a Serial Master or not).&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-serial-master&quot;&gt;LDMs for Serial Master&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Repertoire- Collect skills. Increase your professional value.&lt;/li&gt;
&lt;/ul&gt;

&lt;h6 id=&quot;exercise-answer-the-following-questions&quot;&gt;Exercise: Answer the following questions:&lt;/h6&gt;
&lt;ul&gt;
  &lt;li&gt;Describe the moment you first realized you were drawn to each of your interests.&lt;/li&gt;
  &lt;li&gt;Do you see anything these moments had in common?&lt;/li&gt;
  &lt;li&gt;Was there anything you realize as essential in all of them?&lt;/li&gt;
  &lt;li&gt;Can you list areas you know you are definitely not interested in taking up?&lt;/li&gt;
  &lt;li&gt;Do they have anything in common?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;careers-4&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Talent Agent&lt;/li&gt;
  &lt;li&gt;Career / Life Coach&lt;/li&gt;
  &lt;li&gt;Athletic Coach&lt;/li&gt;
  &lt;li&gt;Teacher&lt;/li&gt;
  &lt;li&gt;Motivational Speaker&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;jack-of-all-trades&quot;&gt;Jack-of-all-Trades&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-jack-of-all-trades&quot;&gt;Are you a Jack-of-all-Trades?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Are you good at just about everything you try?&lt;/li&gt;
  &lt;li&gt;Have you ever thought your problem would be solved if you were good at only one thing?&lt;/li&gt;
  &lt;li&gt;Do bosses and teachers try to keep you on board?&lt;/li&gt;
  &lt;li&gt;Do you notice that other people are passionate about things you merely like?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-5&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;Tend to be still looking for their great passion, and rarely passionate about career.&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-jack-of-all-trades&quot;&gt;LDMs for Jack-of-all-Trades&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Most Valuable Player- Working hard and becoming extremely necessary in their career.&lt;/li&gt;
  &lt;li&gt;Good Life- Only question to ask, “will this make me happy?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: See career tryout.&lt;/p&gt;

&lt;h5 id=&quot;careers-5&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Contract work&lt;/li&gt;
  &lt;li&gt;Multiple income streams&lt;/li&gt;
  &lt;li&gt;Telecommuter&lt;/li&gt;
  &lt;li&gt;Editor&lt;/li&gt;
  &lt;li&gt;Writer Translations&lt;/li&gt;
  &lt;li&gt;The Good Enough Job&lt;/li&gt;
  &lt;li&gt;Troubleshooter&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;wanderer&quot;&gt;Wanderer&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-wanderer&quot;&gt;Are you a Wanderer?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Have you always gotten interested in unrelated activities for no apparent reason?&lt;/li&gt;
  &lt;li&gt;Are you intrigued by things that people around you find boring?&lt;/li&gt;
  &lt;li&gt;Do you like trying on new jobs and lifestyles?&lt;/li&gt;
  &lt;li&gt;Do you love adventure and new experiences: people, places, sensations?&lt;/li&gt;
  &lt;li&gt;Do you lake a sense of direction in your life and see only the next move?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;ldms-for-wanderer&quot;&gt;LDMs for Wanderer&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Odysseus- Always remember you’re trying to reach home.&lt;/li&gt;
  &lt;li&gt;Itinerant Preacher- What skills would you need / want if you were to work in little towns, traveling constantly between them?&lt;/li&gt;
  &lt;li&gt;I Might Need that Someday- Allow yourself to learn things “just because.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Find a common theme to all of your interests. First try by making an “Everything I don’t want list” (See the not list).&lt;/p&gt;

&lt;h5 id=&quot;careers-6&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Multiple Income Streams&lt;/li&gt;
  &lt;li&gt;Expertise for Sale&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;sampler&quot;&gt;Sampler&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-sampler&quot;&gt;Are you a Sampler?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Have you ever thought you wanted to experience just about everything?&lt;/li&gt;
  &lt;li&gt;If you had your way, would you never do anything twice?&lt;/li&gt;
  &lt;li&gt;Does the idea of being an expert sound narrow and boring to you?&lt;/li&gt;
  &lt;li&gt;Do you prefer to learn by doing, rather than reading or hearing about something?&lt;/li&gt;
  &lt;li&gt;Once you know how something is done, are you ready to move on?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-6&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;Go to Soirees: “Lifelong learning in your living room.”&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-sampler&quot;&gt;LDMs for Sampler&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Smorgasbord- Think of life as a traditional banquet table of things to learn.&lt;/li&gt;
  &lt;li&gt;Quarterly Creative Project- Every quarter, start a new project and work on it all quarter, learning all you can.&lt;/li&gt;
  &lt;li&gt;Everything 101- Go to local universities to learn whatever you desire.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Have an annual show-and-tell of your projects and what you learned throughout the year.&lt;/p&gt;

&lt;h5 id=&quot;careers-7&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;The Good Enough job&lt;/li&gt;
  &lt;li&gt;Temporary jobs&lt;/li&gt;
  &lt;li&gt;Adult education school&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;high-speed-indecisive&quot;&gt;High-Speed Indecisive&lt;/h4&gt;

&lt;h5 id=&quot;are-you-a-high-speed-indecisive&quot;&gt;Are you a High-Speed Indecisive?&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Do you love to bite off more than you can chew?&lt;/li&gt;
  &lt;li&gt;Do you dislike having to finish one thing before you start another?&lt;/li&gt;
  &lt;li&gt;Do you quickly grasp new ideas before others even notice them?&lt;/li&gt;
  &lt;li&gt;Do you feel guilty because you drop new interests so quickly?&lt;/li&gt;
  &lt;li&gt;Do you see potential where others see nothing??&lt;/li&gt;
  &lt;li&gt;Do you secretly suspect you’re not looking for one right thing at all?&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;notes-7&quot;&gt;Notes&lt;/h5&gt;

&lt;p&gt;You probably don’t have ADD (but you might, ha!).&lt;/p&gt;

&lt;h5 id=&quot;ldms-for-high-speed-indecisive&quot;&gt;LDMs for High-Speed Indecisive&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;City Desk Reporter- Dozens of stories to cover, every single day.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exercise: Create a catalog of ideas with potential.&lt;/p&gt;

&lt;h5 id=&quot;careers-8&quot;&gt;Careers&lt;/h5&gt;
&lt;ul&gt;
  &lt;li&gt;Freelancer&lt;/li&gt;
  &lt;li&gt;Researcher&lt;/li&gt;
  &lt;li&gt;Troubleshooter&lt;/li&gt;
  &lt;li&gt;Catalog compiler / Copywriter&lt;/li&gt;
  &lt;li&gt;Inventor&lt;/li&gt;
  &lt;li&gt;Abstract Writer&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;epilogue&quot;&gt;Epilogue&lt;/h3&gt;

&lt;p&gt;You understand now that you have the freedom to explore every interest and the right to drop it whenever you wish.&lt;/p&gt;

&lt;p&gt;You need to throw yourself heart and soul into something you love and give it your very best effort.&lt;/p&gt;

&lt;p&gt;As enthusiastic as you may be about every passion, an active mind doesn’t get refreshment from producing nothing.&lt;/p&gt;

&lt;h4 id=&quot;do-it&quot;&gt;Do it:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Select a project and decide on a goal
    &lt;ul&gt;
      &lt;li&gt;Decide exactly what your finished product will look like.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Schedule a date for a Real Deadline
    &lt;ul&gt;
      &lt;li&gt;Teach a class&lt;/li&gt;
      &lt;li&gt;Schedule a show-and-tell party&lt;/li&gt;
      &lt;li&gt;Set up a contest&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Get to work
    &lt;ul&gt;
      &lt;li&gt;Create tear-off calendar, counting down days to your deadline.&lt;/li&gt;
      &lt;li&gt;Deadlines drive you into action precisely because they create stress.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Attend your Real Deadline / Grand Finale event&lt;/li&gt;
  &lt;li&gt;Return to scanning mode
    &lt;ul&gt;
      &lt;li&gt;You don’t have to finish anything when you’re in scanning mode.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 23 - Tessellation</title>
   <link href="http://davidwparker.com/2013/01/09/opengl-screencast-video-23-tessellation/"/>
   <updated>2013-01-09T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/01/09/opengl-screencast-video-23-tessellation</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to use tessellation in your OpenGL program.&lt;/p&gt;

&lt;p&gt;OpenGL functions used in this screencast:
GLUtesselator, gluNewTess, gluDeleteTess, gluTessBeginPolygon, gluTessEndPolygon, gluBeginContour, gluEndContour, gluTessVertex&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GLU_TESS_WINDING, GLU_TESS_WINDING_ODD, GLU_TESS_WINDING_POSITIVE, GLU_TESS_BEGIN, GLU_TESS_END, GLU_TESS_VERTEX, GLU_TESS_COMBINE, GLU_TESS_ERROR&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-3&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/qt05usvi1f7cwzo/episode-023.mov?dl=1&quot;&gt;Download the screencast (HD), 59.8 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://youtu.be/G6Y2vaPYoTU&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/G6Y2vaPYoTU&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/4495028.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>The 2013 Agenda</title>
   <link href="http://davidwparker.com/2013/01/01/The-2013-Agenda/"/>
   <updated>2013-01-01T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2013/01/01/The-2013-Agenda</id>
   <content type="html">&lt;p&gt;tldr; Finish grad school, start a company, three triathlons, bboying, cruise with friends, launch apps, code, code, code.&lt;/p&gt;

&lt;h2 id=&quot;all-the-stuff&quot;&gt;All the Stuff&lt;/h2&gt;

&lt;p&gt;Let’s take a look at the big stuff, additional stuff I want to get done, and the stuff that needs to change (in order to successfully get the things that I want done).&lt;/p&gt;

&lt;h3 id=&quot;the-big-stuff&quot;&gt;The Big Stuff&lt;/h3&gt;

&lt;p&gt;2013 is already looking to be a great year. I have five different of my lifetime goals on the list, with at least four of them as guaranteed to be complete.&lt;/p&gt;

&lt;p&gt;Specifically, I’m already expecting to finish grad school in May. I’ll be finishing a double master’s: Master’s of Business Administration (MBA) and Master’s of Science in Computer Science (MS in CS).&lt;/p&gt;

&lt;p&gt;June, July, and August, I’ll be completing the &lt;a href=&quot;http://www.ironman.com/triathlon/events/non-ironman/boulder-tri-series.aspx&quot;&gt;Boulder Tri Series&lt;/a&gt;. This entails a triathlon sprint in June, a triathlon Olympic in July, and a half-Ironman (Ironman 70.3) in August.&lt;/p&gt;

&lt;p&gt;Finally, I’m launching a company with a friend. Actually, we’ve already started the company, but next year we’ll be launching our first web-based services.&lt;/p&gt;

&lt;p&gt;Additionally, I’m planning on bboying regularly throughout the year. Unfortunately, balancing my last semester of grad school, training for triathlons, and launching a company will probably mean less time to bboy than I would like.&lt;/p&gt;

&lt;p&gt;In October, I’ll be turning 30, which means I’ll no longer be a 20-something. But, I’ll be turning 30 on a cruise ship with some of my closest friends. I’ll also be running 30-miles the day I turn 30. That should be interesting.&lt;/p&gt;

&lt;h3 id=&quot;additional-stuff-i-want-to-get-done&quot;&gt;Additional Stuff I Want to Get Done&lt;/h3&gt;

&lt;p&gt;In addition to the big stuff above, there’s quite a bit of other things that I’d like to get done throughout the year.&lt;/p&gt;

&lt;h4 id=&quot;design&quot;&gt;Design&lt;/h4&gt;

&lt;p&gt;This is going to be a big year of design for me. A friend of mine and I are starting a vodcast/podcast called “Developer Meets Designer”, where we’ll meet biweekly to discuss aspects of development, design, apps, business, and much more.&lt;/p&gt;

&lt;p&gt;Additionally, I have a couple of really good design books that I’ve been meaning to read, and this year I’m planning on reading them. Next, I’ll have to step up my design skills for my new startup. Finally, I’ll need to work on my design due to one game a month (see below).&lt;/p&gt;

&lt;h4 id=&quot;learning--reading&quot;&gt;Learning | Reading&lt;/h4&gt;

&lt;p&gt;Last year I was very successful at reading a lot of books. This year, I don’t expect that to change. I’ll be aiming for fewer books, the current goal is 24, but the books will be bit meatier, such as programming books.&lt;/p&gt;

&lt;h4 id=&quot;code--apps--game-development&quot;&gt;Code | Apps | Game Development&lt;/h4&gt;

&lt;p&gt;I’ll be getting back into a lot of web development this year, as I’ll be needing to for my startup. I haven’t touched a lot of web in the last three years, as I’ve mostly been in Mobile and Graphics land. So I’m pretty excited about that.&lt;/p&gt;

&lt;p&gt;I’d like to release monthly updates to &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.ideallyapps.IdealTracker&quot;&gt;Ideal Tracker&lt;/a&gt;, and to launch additional apps as well. I’m not 100% sure what those other apps are, but I just know that I’d like to get more out there.&lt;/p&gt;

&lt;p&gt;I’m going to be doing &lt;a href=&quot;http://onegameamonth.com/&quot;&gt;one game a month&lt;/a&gt;, with the intent on publishing 12 games throughout the year. The rules state (there are no rules) that it doesn’t have to be one per month, but just 12 throughout the entire year. Additionally, I’ll doing Ludum Dare just as I have for the past year.&lt;/p&gt;

&lt;p&gt;Finally, I’d like to continue to post new screencasts. I have about 10 more that I want to do with OpenGL and I’d like to re-do my old ones in HD. After, I’d like to do GLSL, Cocos2d-iPhone, Cocos2d-html5, CocosBuilder, Android, and probably many others. I don’t expect to get much further than GLSL or Cocos2d-iPhone over the next year.&lt;/p&gt;

&lt;h3 id=&quot;the-stuff-that-needs-to-change&quot;&gt;The Stuff That Needs to Change&lt;/h3&gt;

&lt;p&gt;In order to make this stuff happen, I’m definitely going to have to make some changes.&lt;/p&gt;

&lt;h4 id=&quot;stricter-time-management&quot;&gt;Stricter Time Management&lt;/h4&gt;

&lt;p&gt;With the abnormally high levels of Youtube and Netflix that I consumed over the last year, I believe that I can use a lot of that time to work on my own business, learning design, and coding… much more coding. Time that my wife and I would normally be watching mindless TV will be used to read aloud to one another, to have intimate conversations, and to just enjoy one another’s company more.&lt;/p&gt;

&lt;p&gt;I’ve upgraded to RescueTime Pro, so I’ll be blocking sites using the get focused feature much more often. I’ll be using RescueTime with a solid Pomodoro app in order to successfully break the habit. This technique will help me to break the habits of checking Facebook and Hacker News all the time as well.&lt;/p&gt;

&lt;h4 id=&quot;better-eating&quot;&gt;Better Eating&lt;/h4&gt;

&lt;p&gt;In general, I don’t eat too much. In fact, I forget to eat a lot of the time, generally when I’m coding all day. But then when I do eat, I don’t eat quality. So this year, I’m planning on stepping up the healthiness level of what I’m putting into my body.&lt;/p&gt;

&lt;p&gt;I don’t tend to drink much, just a glass of Scotch two or three times a week. I think that’s pretty acceptable.&lt;/p&gt;

&lt;h4 id=&quot;bed-time&quot;&gt;Bed Time&lt;/h4&gt;

&lt;p&gt;Once summer hits, I’m going to need to go to bed earlier so that I can train for my triathlons. I could train in the middle of the day, but training first thing in the morning will help my body adjust for the summer ahead. In order to train early, I’m starting now by going to bed earlier (between 10PM and Midnight, as opposed to Midnight and 2AM).&lt;/p&gt;

&lt;h3 id=&quot;here-goes-nothing&quot;&gt;Here goes nothing.&lt;/h3&gt;

&lt;p&gt;In reality, I’ll be giving this my everything. I don’t like to do things at half capacity… so, here we go!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>2012 in Review</title>
   <link href="http://davidwparker.com/2012/12/31/2012-in-review/"/>
   <updated>2012-12-31T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/31/2012-in-review</id>
   <content type="html">&lt;p&gt;This is my first annual review blog post. I wish I had done these previously, but this year, I’m actually making an effort to make it happen. Below, you’ll see the Awesome Stuff, the Not Awesome Stuff, and The Numbers. Tomorrow I’ll be publishing what I’m planning on doing in 2013.&lt;/p&gt;

&lt;h2 id=&quot;awesome-stuff&quot;&gt;Awesome Stuff&lt;/h2&gt;

&lt;p&gt;I accomplished two of my life goals this year: Go on a mission trip overseas and complete an Master’s of Business Administration (MBA).&lt;/p&gt;

&lt;h3 id=&quot;rwanda&quot;&gt;Rwanda&lt;/h3&gt;

&lt;p&gt;In May, I went with a church group and &lt;a href=&quot;http://www.riverspromise.com/&quot;&gt;River’s Promise&lt;/a&gt; this year to Rwanda, Africa. It was an amazing experience. I’m pretty sure that the people there changed my life as much, if not more, than I changed theirs. I went with my wife, and 10 others to a remote Pygmy village in Rwanda. These are probably the poorest people I’ve seen in my life. Not probably. They are the poorest people I’ve seen in my life. The contrast of how poor these people were with the rolling hills of Rwanda was crazy: these were views people in the States would pay hundreds of thousands of dollars for. The life expectancy of these people is extremely short. 95% of all children in the village die before the age of 5. Our team helped to build a house in this village. While we were there, we were able to spend time with the children and give away shoes, blankets, and hats. It was an amazing experience- one that I will never forget. If you have any extra money, I highly recommend sponsoring a child from the village.&lt;/p&gt;

&lt;p&gt;You can see some pictures of the trip at &lt;a href=&quot;http://www.birdseyecreativestudio.com/rwanda-mission-trip-i-may-2012/&quot;&gt;Bird’s Eye Creative&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;mba&quot;&gt;MBA&lt;/h3&gt;

&lt;p&gt;Also in May, before I went to Rwanda, I finished my MBA at the University of Colorado. I’ll be writing a blog post about that entire experience later next year, as I’m still not done at the University- I’m still finishing my Master’s of Science in Computer Science. Spoiler alerts ahead… It’s worth it (for some people).&lt;/p&gt;

&lt;h3 id=&quot;learning&quot;&gt;Learning&lt;/h3&gt;

&lt;p&gt;As always, I’m in love with learning. This year was no exception to learning new stuff.&lt;/p&gt;

&lt;p&gt;This year, I read a ton of books (see numbers below), which has been nothing short of fantastic. No, not every book was fantastic, but the ones that really stood out to me this year were &lt;a href=&quot;/2012/11/19/book-running-lean/&quot;&gt;Running Lean&lt;/a&gt; and &lt;a href=&quot;/2012/10/05/book-crazy-love/&quot;&gt;Crazy Love&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the physique side of learning, I started taking bboy lessons (breakdancing, another life goal). Bboying, of course, isn’t going to be learned overnight, so it’s something I’m expecting to keep up over the next few years. Bboying has been an excellent source of exercise outside of running.&lt;/p&gt;

&lt;h3 id=&quot;code-and-more-learning&quot;&gt;Code (and more Learning)&lt;/h3&gt;

&lt;p&gt;This year I did quite a bit of coding, but I didn’t publish as much as I would have liked. A lot of the code I did was for school projects. However, I did publish my 2nd Android App, &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.ideallyapps.IdealTracker&quot;&gt;Ideal Tracker&lt;/a&gt; via my company &lt;a href=&quot;http://ideallyapps.com/&quot;&gt;Ideally&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While Ideal Tracker isn’t pulling in any real money right now (it’s ad-based, with an extremely small userbase), it did teach me quite a bit about the publish and upgrade process for Android apps.&lt;/p&gt;

&lt;p&gt;I competed in all three &lt;a href=&quot;http://www.ludumdare.com&quot;&gt;Ludum Dare&lt;/a&gt; competitions this year. You can find my code and entries on the game dev &lt;a href=&quot;/code&quot;&gt;link&lt;/a&gt;. I taught myself Three.js, Processing.js, and Cocos2d-html5 (and CocosBuilder) during these events.&lt;/p&gt;

&lt;p&gt;I published 3 more screencasts (and recorded a 4th) on OpenGL. This was a major disappointment this year, as I should have published a lot more. I only recently got inspired as I didn’t realize how much time people were watching my videos over the last year (see numbers below).&lt;/p&gt;

&lt;h3 id=&quot;travel-and-more-life&quot;&gt;Travel and more Life&lt;/h3&gt;

&lt;p&gt;As above, I went to Rwanda, Africa. Additionally, I went to Brussels and Brugge, Belgium (after the mission trip), San Francisco, CA (Startup School via YCombinator), Washington, D.C. (TechStars Patriot Bootcamp), backcountry backpacking in Boulder County, CO (30 miles in 2.5 days), and Las Vegas, NV (to visit my brother and his wife).&lt;/p&gt;

&lt;p&gt;My wife and I moved out of our apartment and into a friend’s townhome, which has been amazing.&lt;/p&gt;

&lt;h2 id=&quot;not-awesome-stuff&quot;&gt;Not Awesome Stuff&lt;/h2&gt;

&lt;p&gt;Last year, I did a Marathon and ran several races. This year, the longest single run I did was run with a friend for 9-10 miles of her marathon.&lt;/p&gt;

&lt;p&gt;My wife and I watched a lot of TV (via Netflix). I watched even more Netflix and an unacceptable amount of Youtube as well. See the numbers below… the definitely speak for themselves.&lt;/p&gt;

&lt;p&gt;And, as I said above, I didn’t publish enough code. Or perhaps, I didn’t write enough code. Or both. Next year, with graduation around the corner, this is going to change.&lt;/p&gt;

&lt;h2 id=&quot;the-numbers&quot;&gt;The Numbers&lt;/h2&gt;

&lt;p&gt;I’ve posted 2012’s numbers below. I’ve also included numbers for 2009-2011, as I haven’t posted those before.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;What \ When&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2010&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2009&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Intellect&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Books read&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;21&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;21&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;10&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;University Courses Taken&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;12&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Physical&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Total Miles Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;362.47&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;616&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;392&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Half-Marathons Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Marathons Ran&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Total Miles Biked&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;422.5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;50&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;14ers climbed&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;BBoy hours&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;31.17&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Number of Workouts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;311&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;202&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;116&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;50&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Random&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Movies/Shows watched on Netflix via Instant&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;347&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;245&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;156&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;170&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Movies/Shows watched on Netflix via DVDs&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;50&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;53&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;100&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;62&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Emails sent&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;912&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;704&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;?&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;?&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Concerts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Songs starred in Spotify&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;97&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;173&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Travel&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Roundtrip Flights to Montgomery&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Roundtrip Flights elsewhere&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Career&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Networking Events&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;37&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Conferences attended&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Tech&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Blog Posts&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;32&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;22&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;16&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;27&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Apps Published (total)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Android Apps&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;# Releases (new and old Android)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Games Created (total)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Screencasts Recorded&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;19&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;# of views on my screencasts (Youtube)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;10841&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2000&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I only started using RescueTime in September of 2011, so some numbers may seem a little low. See % of year for actual comparison in that regard. I didn’t include everything from RescueTime, as there are way too many categories and details. I chose to share the ones that have the most time or relevancy associated with them.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;What \ When&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2012%&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;2011%&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;RescueTime&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Hours Logged&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1926.5&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;682&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Productivity&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;57%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;65%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Unproductive Hours Spent…&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Facebook&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;108&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;37&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.23%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.31%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Google+&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;11&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.13%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.04%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Twitter&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.05%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.04%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Hacker News&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;115&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;34&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.31%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.20%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Silverlight (Netflix)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;143&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;28&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.63%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.99%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… on Flash (Some % is Youtube)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;155&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;78&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.77%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.75%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;TOTAL Unproductive Hours&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;536&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;179&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;6.11%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;6.32%&lt;/em&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;Productive Hours Spent…&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… house chores&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;90&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;20&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.03%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.71%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… studying&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;70&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;42&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.80%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.48%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… writing (gmail- debatable if productive or not)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;128&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;36&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.46%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.28%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… writing (google docs)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;110&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;71&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.25%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.51%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Emacs)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;129&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;70&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.47%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;2.47%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Terminal)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;34&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;14&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.39%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.49%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Eclipse)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;112&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;1.28%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.11%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;… coding (Xcode)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;22&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.25%&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;0.00%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;TOTAL Productive Hours&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;695&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;256&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;7.93%&lt;/em&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;&lt;em&gt;9.04%&lt;/em&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Not included is time spent on my Android device. I’d like to find a “RescueTime of Android” or equivalent, but have yet to look. I’ll be looking shortly though, so I can have more data for next year’s stats. The main things that change is the fact that I hardly play games on my laptop, but do semi-regularly on my Android. I also use Twitter almost exclusively on my Android, but obviously not a lot on my laptop. I also use Google+ more on my Android.&lt;/p&gt;

&lt;p&gt;And that’s it. Tomorrow I’ll be looking at what I would like to achieve next year, and what I can, and will do to meet those goals.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 22 - Fog</title>
   <link href="http://davidwparker.com/2012/12/30/opengl-screencast-video-22-fog/"/>
   <updated>2012-12-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/30/opengl-screencast-video-22-fog</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to use Fog in your OpenGL program.&lt;/p&gt;

&lt;p&gt;OpenGL functions used in this screencast:
glEnable, glFogi, glFogf, glFogfv&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_FOG, GL_EXP, GL_EXP2, GL_LINEAR, GL_FOG_DENSITY, GL_FOG_START, GL_FOG_END, GL_FOG_HINT, GL_FOG_COLOR, GL_DONT_CARE&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-3&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/drlej12vzgaope3/episode-022.mov?dl=1&quot;&gt;Download the screencast (HD), 50.1. MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://youtu.be/94L8_b1QJv8&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/94L8_b1QJv8&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/4414262.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 21 - Skybox</title>
   <link href="http://davidwparker.com/2012/12/26/opengl-screencast-video-21-skybox/"/>
   <updated>2012-12-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/26/opengl-screencast-video-21-skybox</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to create a Skybox in your OpenGL program.&lt;/p&gt;

&lt;p&gt;OpenGL functions used in this screencast:
glBindTexture, glTexCoord2f, glVertex3f&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_TEXTURE_2D, GL_QUADS&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-3&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/fkcq8wc9p9elikh/episode-021.mov?dl=1&quot;&gt;Download the screencast (HD), 40.8. MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://youtu.be/DlOT8MJ7mrc&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/DlOT8MJ7mrc&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/4383192.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 20 - Anti Aliasing</title>
   <link href="http://davidwparker.com/2012/12/21/opengl-screencast-video-20-anti-aliasing/"/>
   <updated>2012-12-21T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/21/opengl-screencast-video-20-anti-aliasing</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to use Anti-Aliasing in your OpenGL program.&lt;/p&gt;

&lt;p&gt;OpenGL functions used in this screencast:
glBlendFunc, glHint&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL_LINE_SMOOTH_HINT, GL_TEXTURE_COMPRESSION_HINT, GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE, GL_NICEST, GL_FASTEST&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/e7wg78giyvcujnn/episode-020.mov?dl=1&quot;&gt;Download the screencast (HD), 27.4 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://youtu.be/I-DjW8OPz10&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/I-DjW8OPz10&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/4354835.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Ludum Dare 25 Post Mortem - Doggie Destroyer</title>
   <link href="http://davidwparker.com/2012/12/20/ludum-dare-25-post-mortem/"/>
   <updated>2012-12-20T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/20/ludum-dare-25-post-mortem</id>
   <content type="html">&lt;p&gt;tldr; I did Ludum Dare 25 last weekend with the theme &lt;a href=&quot;http://www.ludumdare.com/compo/2012/12/08/welcome-to-ludum-dare-25/&quot;&gt;You are the Villain&lt;/a&gt; I made a game called “Doggie Destroyer”: where you take on the role of a dog who is attempting to pee on fire hydrants without getting wet. I used Cocos2d-HTML5, CocosBuilder, InkScape, and Audacity.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.ludumdare.com/compo/ludum-dare-25/?action=preview&amp;amp;uid=7737&quot;&gt;My Ludum Dare Entry&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/ludumdare/ld25/&quot;&gt;The Game (see entry above for how to play)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This past weekend, I just completed my 4th &lt;a href=&quot;http://www.ludumdare.com/compo/&quot;&gt;Ludum Dare&lt;/a&gt; . As per usual, it was a great, frustrating experience. My usual mission for the past 3 Ludum Dares is to teach myself something new as I go. In general, I like to do something web-based, so that the game I end up making is more accessible to others. This time was no exception.&lt;/p&gt;

&lt;p&gt;So the mission for the weekend was to teach myself &lt;a href=&quot;http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Html5&quot;&gt;Cocos2d-HTML5&lt;/a&gt;. I’ve done quite a bit with &lt;a href=&quot;http://www.cocos2d-iphone.org/&quot;&gt;Cocos2d-iPhone&lt;/a&gt; before and I didn’t feel like it was too bad. In fact, for 2d games, it’s a pretty nice framework. The other things that I wanted to do was to not only use Cocos2d-HTML5, but I wanted to use &lt;a href=&quot;http://cocosbuilder.com/&quot;&gt;CocosBuilder&lt;/a&gt; and to only use the JavaScript API, so that I would be able to reuse all of my code for Android and iOS (or ideally, learn how to do that so I could do it for another game).&lt;/p&gt;

&lt;p&gt;The only other tool that I ended up using was &lt;a href=&quot;http://inkscape.org/&quot;&gt;Inkscape&lt;/a&gt; to make my vector-based art and &lt;a href=&quot;http://audacity.sourceforge.net/&quot;&gt;Audacity&lt;/a&gt; to record my one and only sound effect. This was also the first Ludum Dare that I had any sound at all, so that was pretty exciting.&lt;/p&gt;

&lt;h3 id=&quot;friday-night&quot;&gt;Friday Night&lt;/h3&gt;

&lt;p&gt;Friday started out great, I was at a party and started brainstorming ideas there. When I got home, I had picked one, dealing with fire hydrants and people, with the fire chief forcing people back into a burning building by hitting them with the fire hydrants. Of course, this ended up being a little more complex than I knew it would be (while learning Cocos2d-HTML5 at the same time). That night, I ended up changing the theme on the fly and went with being a dog instead. I made the fire hydrant, dog, and water that evening.&lt;/p&gt;

&lt;h3 id=&quot;saturday&quot;&gt;Saturday&lt;/h3&gt;

&lt;p&gt;Saturday started off pretty good. I installed CocosBuilder fine and started getting to work, downloading the example projects and looking at their code. But slowly, just throughout the day, I was discovering a few inconsistencies in what I was attempting to do, and what I actually could do with the program. This is probably when I should have just abandoned CocosBuilder altogether and just used Cocos2d-HTML5 programmatically… but I kept messing with it. By about 4PM, I realized that a lot of functionality was just plain not working. Long-story short, I discovered that CocosBuilder does NOT work with versions of OSX before Lion. I, of course, was still on Snow Leopard. None of the dialogs were working, and none of the documentation worked.&lt;/p&gt;

&lt;p&gt;So, I figured I could get by by manually editing the output .ccb file from CocosBuilder. After all, it’s just an plist (XML) file, so I could edit it easily enough. Of course, XCode doesn’t like .ccb file extensions, so I had to rename it .plist in order for XCode to play well. Moving right along, I made some changes and attempted to work with it here and there for another 2 hours or so.&lt;/p&gt;

&lt;p&gt;6PM. An entire day was almost done and I still hadn’t done any real programming. Oi vey!&lt;/p&gt;

&lt;p&gt;I broke down and went to the App Store and bought Mountain Lion. I backed up what I had (most of my stuff is already backed up), so I went with it. Of course, not really thinking about it, this little stunt ended up costing me another 2 hours- 1 to download, 1 to install.&lt;/p&gt;

&lt;p&gt;After the installation was done, I got right back to work with CocosBuilder and, lo and behold, it worked fantastically! Of course, there were a few minor hiccups here and there, but overall, it was a pretty accessible tool that enhanced my productivity somewhat. This is why you always test your toolset before the competition starts! (Or don’t try to learn something as you go).&lt;/p&gt;

&lt;h3 id=&quot;sunday&quot;&gt;Sunday&lt;/h3&gt;

&lt;p&gt;Sunday had a short break due to doing a Google+ Hangout with my family, but other than that, I ended up getting quite a bit of coding done (starting super late Saturday night) until I finished and submitted my game around 4PM. Did it have all that I wanted? Not even close (see the Ludum Dare submission for things that I wanted to do/bugs/etc). But it was still cool- I have yet another tool in my toolchain and I’ll probably continue to use this one a good bit more.&lt;/p&gt;

&lt;h3 id=&quot;end-thoughts&quot;&gt;End Thoughts&lt;/h3&gt;

&lt;p&gt;So I’d definitely recommend for people to check out the Cocos2d-HTML5 project and see if they can’t use the JavaScript bindings too. It’s pretty cool to be able to push to iOS, Android, Windows Phone, and HTML5 all with the same code base, while still being native.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>On Shipping Product</title>
   <link href="http://davidwparker.com/2012/12/02/on-shipping-product/"/>
   <updated>2012-12-02T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/12/02/on-shipping-product</id>
   <content type="html">&lt;h3 id=&quot;tldr&quot;&gt;tldr;&lt;/h3&gt;

&lt;p&gt;I was scared to ship my second Android app. I believe the fear stems from the fact that this is something of my own, as opposed to being written for an employer somewhere. Additionally, the app is something that I want to be used regularly, with real user data, on potentially a bunch of different devices that I don’t control.&lt;/p&gt;

&lt;h3 id=&quot;long-version&quot;&gt;Long version&lt;/h3&gt;

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;This last week, I shipped my second ever Android app: &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.ideallyapps.IdealTracker&quot;&gt;Ideal Tracker&lt;/a&gt;. I’ll tell you the truth: I was scared shitless. What would people think? What happens if it didn’t work on all 2100 devices that it supposedly runs on? It’s not that I write crappy code (though some of it surely is), or that I’m not confident in my abilities (I’ve shipped a ton of code before), or even that people won’t like it (I practiced Agile&lt;/td&gt;
      &lt;td&gt;Lean and got feedback early and often). For me, I think it’s something deeper.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I’ve written a lot of code in the past. I’ve shipped code on six different products for the US Air Force. I’ve written extremely robust code that’s used by entreprise-level operations. It’s actually really easy to write code for these organizations because they move so slow, it’s incredibly easy to make sure what you ship is actually ‘correct’ (written to the specs). But this time was different- the only specs I had were the ones I got from doing customer interviews before I even had a product.&lt;/p&gt;

&lt;p&gt;The first Android that I wrote was an extremely simple mortgage calculator. It required no permissions and did a very simple thing extremely easily. It didn’t really go deep, and I didn’t use a lot of features of the phone. In fact, it really doesn’t need to be an Android app at all, but I just wanted to learn a little Android as well as ship something of my own. That being said, I wasn’t very nervous about shipping such a simple app- it didn’t even have ads! So I did. It’s had a little over 3,000 downloads and I’m totally okay with that.&lt;/p&gt;

&lt;p&gt;My most recent Android app, though, is different. It’s a workout tracking application. It’s pretty simple at its core: users input their workouts, and the app saves them. Of course, I add a few bells and whistles. For example, in the app, I let users view their recent workouts, add new exercises, and I provide some pretty basic graphs. I use SQLite to keep track of all user input. I have ads view Admob. I use Analytics. I use the Google compatibility library to provide 3.X/4.X themes to 2.X devices. I use ActionBarSherlock. All-in-all, it’s a much bigger application than the first.&lt;/p&gt;

&lt;p&gt;And I think due to the fact that I’m actually letting users store data- that’s a big deal for me. The first version that I published is the ‘free’ version (with ads). I’m not actually expecting this to be a big money maker for me, but it’s more for the experience of shipping actual product that I want people to use on a regular basis. Because this isn’t a Rails app or something that I control 100% (Server-wise, versus different Android devices), I have a possible irrational fear that something isn’t going to work on some device. This, in turn, freaks me out a little bit. I don’t want users to lose their data, so it took me a bit longer than I was hoping to ship the original MVP- so that I could really “work out” (pun intended) the database schema.&lt;/p&gt;

&lt;p&gt;But I shipped it. And I’ve had great feedback so far. Friends and family have enjoyed it. They’ve given me great suggestions on what they would like to see next.&lt;/p&gt;

&lt;p&gt;I’ve also already done my first point release (1.0.0 -&amp;gt; 1.1.0), where I actually had to change the database schema. And my users didn’t freak out or lose any of their data. After I’m comfortable releasing regular updates to the app, I’ll be aiming to create my first paid app: the Pro version of Ideal Tracker with a few more features.&lt;/p&gt;

&lt;p&gt;So, here’s to round 2. I’ll be fighting the good fight, continuing to release product, and hopefully I’ll learn something valuable that I can share with others in the process.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Running Lean</title>
   <link href="http://davidwparker.com/2012/11/19/book-running-lean/"/>
   <updated>2012-11-19T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/11/19/book-running-lean</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: November 2012&lt;/li&gt;
  &lt;li&gt;Rating: 9.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1449305172?tag=parker08-20&quot;&gt;Running Lean&lt;/a&gt; by Ash Maurya is a fantastic book. Basically, Ash takes Osterwalder’s Business Model Generation (pretty much the best business book ever), throws in a bit of Ries’ Lean Startup (which isn’t bad either), then turns it all into an applied exercise that the reader can actually do for their business. It’s a book that you’re going to want to read twice. Or thrice. After you read Business Model Generation (which is a two-hour read), you should read this book.&lt;/p&gt;

&lt;p&gt;While the book is amazing, it’s not without a couple of flaws. First, the book has a high slant towards tech. Doing customer research and getting feedback and pivoting with tech products is easy (easier than with a physical product that you have to manufacture). That being said, everyone should be doing some form of customer research before diving into their business (and spending a lot of money- their own or others’). My second complaint is that it’s still just a book. I think it would be pretty awesome if Ash took his book and converted it into an online “checklist” of sorts for startups. But that may just be me.&lt;/p&gt;

&lt;p&gt;The book is broken up into 3 parts:&lt;/p&gt;

&lt;h3 id=&quot;roadmap&quot;&gt;Roadmap&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 1 - Meta-Principles&lt;/li&gt;
  &lt;li&gt;Chapter 2 - Running Lean Illustrated&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;document-your-plan-a&quot;&gt;Document Your Plan A&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 3 - Create Your Lean Canvas&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;identify-the-riskiest-parts-of-your-plan&quot;&gt;Identify the Riskiest Parts of Your Plan&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 4 - Prioritize Where to Start&lt;/li&gt;
  &lt;li&gt;Chapter 5 - Get Ready to Experiment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;systematically-test-your-plan&quot;&gt;Systematically Test Your Plan&lt;/h3&gt;

&lt;h4 id=&quot;stage-one-understand-problem&quot;&gt;Stage One: Understand Problem&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 6 - Get Ready to Interview Customers&lt;/li&gt;
  &lt;li&gt;Chapter 7 - The Problem Interview&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;stage-two-define-solution&quot;&gt;Stage Two: Define Solution&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 8 - The Solution Interview&lt;/li&gt;
  &lt;li&gt;Chapter 9 - Get to Release 1.0&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;stage-three-validate-qualitatively&quot;&gt;Stage Three: Validate Qualitatively&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 10 - Get Ready to Measure&lt;/li&gt;
  &lt;li&gt;Chapter 11 - The MVP Interview&lt;/li&gt;
  &lt;li&gt;Chapter 12 - Validate Customer Lifecycle&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;stage-four-verify-quantitatively&quot;&gt;Stage Four: Verify Quantitatively&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 13 - Don’t Be a Feature Pusher&lt;/li&gt;
  &lt;li&gt;Chapter 14 - Measure Product/Market Fit&lt;/li&gt;
  &lt;li&gt;Chapter 15 - Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Running Lean is a systematic process for iterating from Plan A to a plan that works, before running out of resources&lt;/p&gt;

&lt;h3 id=&quot;roadmap-1&quot;&gt;Roadmap&lt;/h3&gt;

&lt;p&gt;Optimize utilization of time (our true scarcest resource)&lt;/p&gt;

&lt;h4 id=&quot;three-steps-of-running-lean&quot;&gt;Three steps of Running Lean:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Document your plan A&lt;/li&gt;
  &lt;li&gt;Identify the riskiest parts of your plan&lt;/li&gt;
  &lt;li&gt;Systematically test your plan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;“Customers don’t care about your solution. They care about their problems.” - Dave McClure&lt;/p&gt;

&lt;p&gt;The biggest risk for most startups is building something nobody wants&lt;/p&gt;

&lt;h4 id=&quot;three-stages-of-a-startup&quot;&gt;Three stages of a startup:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Problem/Solution Fit&lt;/li&gt;
  &lt;li&gt;Product/Market Fit&lt;/li&gt;
  &lt;li&gt;Scale&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;document-your-plan-a-1&quot;&gt;Document Your Plan A&lt;/h3&gt;

&lt;h4 id=&quot;brainstorming-list-of-possible-customers-for-your-product&quot;&gt;Brainstorming list of possible customers for your product:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Distinguish betweer customers and users&lt;/li&gt;
  &lt;li&gt;Split broad customer segments into smaller ones&lt;/li&gt;
  &lt;li&gt;Put everyone on the same canvas at first&lt;/li&gt;
  &lt;li&gt;Sketch a Lean Canvas for each customer segment&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;im-not-going-to-get-into-the-details-of-the-lean-canvas-but-you-can-find-all-about-it-pretty-easily-by-googling-lean-canvas-or-business-model-canvas-that-said-heres-a-quick-breakdown&quot;&gt;I’m not going to get into the details of the Lean Canvas, but you can find all about it pretty easily by Googling “Lean Canvas” or “Business Model Canvas”… that said, here’s a quick breakdown:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Problem - Top 3 problems&lt;/li&gt;
  &lt;li&gt;Customer Segments - Target customers&lt;/li&gt;
  &lt;li&gt;Unique Value Proposition - Single, clear, compelling message that states why you are different and worth buying&lt;/li&gt;
  &lt;li&gt;Solution - Top 3 features&lt;/li&gt;
  &lt;li&gt;Unfair Advantage - Can’t be easily copied or bought&lt;/li&gt;
  &lt;li&gt;Revenue Streams - Revenue Model, Lifetime Value, Revenue, Gross Margin&lt;/li&gt;
  &lt;li&gt;Cost Structure - Customer Acquisition Costs, Distributing Costs, Hosting, People, etc&lt;/li&gt;
  &lt;li&gt;Key Metrics - Key activities you measure&lt;/li&gt;
  &lt;li&gt;Channels - Path to customers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your objective is to define an early adopter, not a mainstream customer&lt;/p&gt;

&lt;p&gt;The first battle isn’t selling; it’s getting a prospect’s attention&lt;/p&gt;

&lt;p&gt;Bind a solution to your problem as late as possible&lt;/p&gt;

&lt;p&gt;Initial goal of a startup is to learn, not to scale&lt;/p&gt;

&lt;p&gt;MVP (Minimum Viable Product) is not synonymous with a half-baked or buggy product&lt;/p&gt;

&lt;h4 id=&quot;charge-for-your-product-from-day-one&quot;&gt;Charge for your product from day one:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Price is part of the product&lt;/li&gt;
  &lt;li&gt;Price defines your customers&lt;/li&gt;
  &lt;li&gt;Getting paid is the first form of validation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;identify-the-riskiest-parts-of-your-plan-1&quot;&gt;Identify the Riskiest Parts of Your Plan&lt;/h3&gt;

&lt;p&gt;Incorrect prioritization of risk is one of the top contributors of waste&lt;/p&gt;

&lt;p&gt;Business Model Objective: to find a model with a big enough market you can reach with customers who need your product that you can build a business around&lt;/p&gt;

&lt;h4 id=&quot;prioritize-your-lean-canvas-ashs-recommended-priority-order&quot;&gt;Prioritize your Lean Canvas (Ash’s recommended priority order):&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Customer pain level (Problem)&lt;/li&gt;
  &lt;li&gt;Ease of reach (Channels)&lt;/li&gt;
  &lt;li&gt;Price/Gross Margin (Revenue Streams/Cost Structure)&lt;/li&gt;
  &lt;li&gt;Market Size (Customer Segments)&lt;/li&gt;
  &lt;li&gt;Technical Feasibility (Solution)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Validating hypotheses takes time&lt;/p&gt;

&lt;h4 id=&quot;when-validating-your-business-model-ask-specific-questions&quot;&gt;When validating your Business Model, ask specific questions:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;What do you consider the riskiest aspect of this plan?&lt;/li&gt;
  &lt;li&gt;Have you overcome similar risks? How?&lt;/li&gt;
  &lt;li&gt;How do you go about testing these risks?&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;assemble-a-problem-team-and-a-solution-team&quot;&gt;Assemble a problem team and a solution team:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Problem team = mostly “outside the building” activities (interviews, usability tests, etc)&lt;/li&gt;
  &lt;li&gt;Solution team = mostly “inside the building” activities (coding, releasing, etc)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three must haves (for the team): development, design, and marketing&lt;/p&gt;

&lt;p&gt;Maximize for speed, learning, and focus&lt;/p&gt;

&lt;p&gt;Identify a single key metric or goal - decide on one and ignore the rest&lt;/p&gt;

&lt;p&gt;The first significant milestone of a startup is achieving product/market fit, which isn’t just about building the ‘right’ product but building a scalable business model that works&lt;/p&gt;

&lt;h3 id=&quot;systematically-test-your-plan-1&quot;&gt;Systematically Test Your Plan&lt;/h3&gt;

&lt;p&gt;Don’t do surveys or focus groups&lt;/p&gt;

&lt;p&gt;Do customer interviews - learn what you don’t know you don’t know&lt;/p&gt;

&lt;p&gt;Life is too short to keep building something nobody (or not enough people) want&lt;/p&gt;

&lt;p&gt;Prepare to interview 30 to 60 people over a four to six-week period&lt;/p&gt;

&lt;h4 id=&quot;what-you-need-to-learn-during-the-problem-interview&quot;&gt;What you need to learn during the problem interview:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Product risk: what are you solving? (Problem)&lt;/li&gt;
  &lt;li&gt;Market risk: who is the competition? (Existing Alternatives)&lt;/li&gt;
  &lt;li&gt;Customer risk: who has the pain? (Customer Segments)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;problem-interview-script-follow-a-script&quot;&gt;Problem Interview Script (follow a script!)&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Welcome&lt;/li&gt;
  &lt;li&gt;Collect Demographics&lt;/li&gt;
  &lt;li&gt;Tell a story&lt;/li&gt;
  &lt;li&gt;Problem ranking&lt;/li&gt;
  &lt;li&gt;Explore customer’s worldview&lt;/li&gt;
  &lt;li&gt;Wrapping up&lt;/li&gt;
  &lt;li&gt;Document results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go through each problm in turn- ask interviewees how they address the problem today&lt;/p&gt;

&lt;p&gt;Goal is to distill your product down to one “must-have” problem - one Unique Value Proposition (UVP)&lt;/p&gt;

&lt;h4 id=&quot;what-you-need-to-learn-during-the-solution-interview&quot;&gt;What you need to learn during the solution interview:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Customer risk: Who has the pain? (Early Adopters)&lt;/li&gt;
  &lt;li&gt;Product risk: How will you solve these problems? Minimum feature set needed to launch? (Solution)&lt;/li&gt;
  &lt;li&gt;Market risk: What isthe pricing model? (Revenue Streams)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The demo needs to look real&lt;/p&gt;

&lt;p&gt;“Content preceds design. Design in the absence of content is not design, it’s decoration.” - Jeffrey Zeldman&lt;/p&gt;

&lt;h4 id=&quot;solution-interview-script&quot;&gt;Solution Interview Script&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Welcome&lt;/li&gt;
  &lt;li&gt;Collect Demographics&lt;/li&gt;
  &lt;li&gt;Tell a story&lt;/li&gt;
  &lt;li&gt;Demo&lt;/li&gt;
  &lt;li&gt;Test pricing&lt;/li&gt;
  &lt;li&gt;Wrapping up&lt;/li&gt;
  &lt;li&gt;Document results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reduce scope and shorten the cycle time between requirements and release so that you get to the learning parts faster&lt;/p&gt;

&lt;p&gt;Don’t assume that any features have to be included in your MVP&lt;/p&gt;

&lt;p&gt;Charge on day one, but collect on day 30&lt;/p&gt;

&lt;p&gt;Purpose of your marketing website is to sell your product&lt;/p&gt;

&lt;h4 id=&quot;landing-page&quot;&gt;Landing page:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;UVP&lt;/li&gt;
  &lt;li&gt;Supporting visual&lt;/li&gt;
  &lt;li&gt;Clear call to action&lt;/li&gt;
  &lt;li&gt;Invitation to learn more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An actionable metric is one that ties specific and repeatable actions to observed results&lt;/p&gt;

&lt;p&gt;“Three A’s of metrics: Actionable, Accessible, and Auditable” - Eric Ries&lt;/p&gt;

&lt;p&gt;If you can’t convert a warm prospect in a 20-minute face-to-face interview, it will be much harder to convert a visitor in less than eight seconds on your landing page&lt;/p&gt;

&lt;h4 id=&quot;mvp-interview-script&quot;&gt;MVP Interview Script&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Welcome&lt;/li&gt;
  &lt;li&gt;Show landing page&lt;/li&gt;
  &lt;li&gt;Show pricing page&lt;/li&gt;
  &lt;li&gt;Signup and activation&lt;/li&gt;
  &lt;li&gt;Wrapping up&lt;/li&gt;
  &lt;li&gt;Document results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fastest way to learn from customers is to talk to them&lt;/p&gt;

&lt;p&gt;Get “lost sales” prospects to talk to you&lt;/p&gt;

&lt;p&gt;More features dilutes your UVP&lt;/p&gt;

&lt;p&gt;Try using a Kanban board&lt;/p&gt;

&lt;p&gt;Have the customer sell you on why you should add a feature&lt;/p&gt;

&lt;p&gt;You have early traction when you are retaining 40% of your activated users, month after month&lt;/p&gt;

&lt;p&gt;avoid micro-optimization experiments&lt;/p&gt;

&lt;h4 id=&quot;identify-your-key-engine-of-growth&quot;&gt;Identify your key engine of growth:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Sticky- high retention. Customer acquisition rate &amp;gt; churn rate&lt;/li&gt;
  &lt;li&gt;Viral- high referral. Viral coefficient &amp;gt; 1 (each user brings in at least one other user)&lt;/li&gt;
  &lt;li&gt;Paid- high margins. Customer lifetime value (LTV) &amp;gt; cost of customer acquisition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only having passion for the solution is a problem&lt;/p&gt;

&lt;p&gt;Create canvases for both sides of a multisided product&lt;/p&gt;

&lt;p&gt;Getting funded is not validation&lt;/p&gt;

&lt;h4 id=&quot;daily-flow&quot;&gt;Daily flow:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Planned maker activities (early in the day, uninterrupted)&lt;/li&gt;
  &lt;li&gt;Planned manager activities (late in the day)&lt;/li&gt;
  &lt;li&gt;Unplanned maker/manager activities (be ready all the time)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;weekly-flow&quot;&gt;Weekly flow:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Identify best days for customer development (not Mondays or Fridays)&lt;/li&gt;
  &lt;li&gt;Take advantage of customer downtime&lt;/li&gt;
  &lt;li&gt;Balance face time with customers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Five whys philosophy to get to heart of the problem&lt;/p&gt;

&lt;p&gt;Great book- definitely worth your time.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Culting of Brands</title>
   <link href="http://davidwparker.com/2012/11/06/book-the-culting-of-brands/"/>
   <updated>2012-11-06T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/11/06/book-the-culting-of-brands</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: October 2012&lt;/li&gt;
  &lt;li&gt;Rating: 6.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/B000EPFVJ6?tag=parker08-20&quot;&gt;The Culting of Brands&lt;/a&gt; by Douglas Atkin isn’t a great book. It just isn’t. I’m surprised I pulled so many notes from the book, but I guess there were a few gems in there. I guess I feel as though the book wasn’t great because it just felt a lot like common sense to me. Perhaps a lot of this is revolutionary for marketers… but I feel as though most of this information can be understood just by thinking it over.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Brands are the new religion&lt;/p&gt;

&lt;h4 id=&quot;reasons-for-joining-a-cult&quot;&gt;Reasons for joining a cult:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;urges to belong&lt;/li&gt;
  &lt;li&gt;make meaning&lt;/li&gt;
  &lt;li&gt;feeling secure&lt;/li&gt;
  &lt;li&gt;having order within chaos&lt;/li&gt;
  &lt;li&gt;creating identity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Commitment is exclusionary&lt;/p&gt;

&lt;p&gt;Devotion to one thing implicitly requires rejection of another. There is an opportunity cost to everything and joining an unorthodox belief system often demands a very high expenditure indeed.&lt;/p&gt;

&lt;p&gt;Common belief = people join cults to conform. Actually they join to become more individual&lt;/p&gt;

&lt;p&gt;Your brand actually has to be different, not just say “we’re different”&lt;/p&gt;

&lt;p&gt;Recruits and existing members need to feel that they have a relationship with the others in the cult:
Individuals bought into the group before they bought the idealogy, not the other way around&lt;/p&gt;

&lt;h4 id=&quot;principles-of-primacy-of-the-person&quot;&gt;Principles of primacy of the person&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Focus on the person&lt;/li&gt;
  &lt;li&gt;Get the right membership&lt;/li&gt;
  &lt;li&gt;Create opportunities for meeting and interaction&lt;/li&gt;
  &lt;li&gt;Remove distractions&lt;/li&gt;
  &lt;li&gt;Love-bomb&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“The great American myth of individualism is so pervasive that it requires countering with the more powerful idea of man as a group animal. The rugged frontiersman and heroic entrepreneur are icons of individuality that have informed the driving cultural belief of survival of the fittest.”&lt;/p&gt;

&lt;p&gt;Social interaction are now less formal, demand shorter periods of commitment, and are more focused on specific goals&lt;/p&gt;

&lt;p&gt;People have less time to spare (duh)&lt;/p&gt;

&lt;h4 id=&quot;successful-cults&quot;&gt;Successful cults:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;have high program of contact forcing contact between members&lt;/li&gt;
  &lt;li&gt;keep tabs on members&lt;/li&gt;
  &lt;li&gt;members run the programs themselves&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;two-critical-characteristics-of-cohesive-communities&quot;&gt;Two critical characteristics of cohesive communities:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Shared experience between members&lt;/li&gt;
  &lt;li&gt;Sense of responsibility and mutual dependence&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;People today pay for meaning more than they pray for it&lt;/p&gt;

&lt;p&gt;We adopt the language of our business and, often unconsciously, we measure ourselves and our life’s values against the values and purposes ofthe corporate entity that employs us&lt;/p&gt;

&lt;p&gt;Cults and cult brands must have meaning systems&lt;/p&gt;

&lt;p&gt;Brands are symbols&lt;/p&gt;

&lt;p&gt;The opportunity cost of belonging to a cult is high&lt;/p&gt;

&lt;p&gt;Successful revolutionaries are the ones who have figured out how to seduce the masses by making their proposition appear not so revolutionary (not sure I believe this or not)&lt;/p&gt;

&lt;p&gt;Create a common goal for members- to fight an enemy, to right a wrong, to implement a better way&lt;/p&gt;

&lt;h4 id=&quot;destroyers-of-a-cult&quot;&gt;Destroyers of a cult:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;a lack of perceived mutual investment&lt;/li&gt;
  &lt;li&gt;a decline in the internal cult that sustained the distinctive ideology&lt;/li&gt;
  &lt;li&gt;too much tension&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Few stronger emotions exist than the need to belong and make meaning&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RubyConf 2012</title>
   <link href="http://davidwparker.com/2012/11/04/rubyconf-2012/"/>
   <updated>2012-11-04T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/11/04/rubyconf-2012</id>
   <content type="html">&lt;p&gt;The last three days, I had the pleasure of going to &lt;a href=&quot;http://rubyconf.org/&quot;&gt;RubyConf 2012&lt;/a&gt;. As RubyConf was in Denver this year (where I live!), it made it extremely convenient to go to the conference. This was my second time going to RubyConf, with the last time being in 2007. Back then, I had recently got into Ruby (end of 2006, thank you _why!) and proceeded to use Ruby and Rails for the next few years (until the great Rails/Merb &lt;a href=&quot;http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3/&quot;&gt;merger&lt;/a&gt;). I probably stopped using it full-time in mid-2009, around the time I moved back to Colorado. Since then, I’ve proceeded to do some Django, iOS, and Android development… but Ruby will always hold a special place in my heart (and I keep up with most of the news). Mostly because it’s awesome. I also want to thank &lt;a href=&quot;http://www.rubycentral.org/&quot;&gt;RubyCentral&lt;/a&gt; for providing me with a student scholarship, as I’ve been in grad school since 2010 (and haven’t been making any money). Anyway, here are a few of the things I learned:&lt;/p&gt;

&lt;h2 id=&quot;my-notes-from-the-conference&quot;&gt;My Notes from the conference&lt;/h2&gt;

&lt;h3 id=&quot;matzs-keynote&quot;&gt;Matz’s Keynote&lt;/h3&gt;

&lt;p&gt;Motivation is a programmer’s bottleneck- Matz’s motivation is love for languages&lt;/p&gt;

&lt;p&gt;Diversity is good, though costly and timely&lt;/p&gt;

&lt;p&gt;No one &lt;em&gt;really&lt;/em&gt; understands innovation, but we try&lt;/p&gt;

&lt;p&gt;The world is full of crappy designs&lt;/p&gt;

&lt;p&gt;“We code, so we can change the future”&lt;/p&gt;

&lt;p&gt;“Make the world a better place”&lt;/p&gt;

&lt;h3 id=&quot;maglev---jesse-cooke&quot;&gt;MagLev - Jesse Cooke&lt;/h3&gt;

&lt;p&gt;Note: I remember the MagLev talk at RubyConf 2007… I’m glad to see it wasn’t just a pipe dream&lt;/p&gt;

&lt;p&gt;What is it? Ruby on Smalltalk VM&lt;/p&gt;

&lt;p&gt;(Distributed) Transparent object persistence&lt;/p&gt;

&lt;p&gt;SQL is a leaky abstraction (or can lead to it)&lt;/p&gt;

&lt;h3 id=&quot;implementation-details-of-ruby-20-vm---koichi-sasada&quot;&gt;Implementation details of Ruby 2.0 VM - Koichi Sasada&lt;/h3&gt;

&lt;p&gt;New features are listed in NEWS file… this is all about internals&lt;/p&gt;

&lt;h4 id=&quot;method-dispatch-was-sped-up-a-lot&quot;&gt;Method dispatch was sped up a lot:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Specialized instructions&lt;/li&gt;
  &lt;li&gt;Method Caching&lt;/li&gt;
  &lt;li&gt;Frame building&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;ruby-20-on-rails---akira-matsuda&quot;&gt;Ruby 2.0 (on Rails) - Akira Matsuda&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://speakerdeck.com/a_matsuda/ruby-2-dot-0-on-rails&quot;&gt;Slides&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;refinements&quot;&gt;Refinements&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Cleaner way to do “monkey patching”&lt;/li&gt;
  &lt;li&gt;extremely debated (some love, some hate)&lt;/li&gt;
  &lt;li&gt;Module#refine with Kernel#using&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Module#Prepend&lt;/p&gt;

&lt;h4 id=&quot;whos-creating-ruby&quot;&gt;Who’s creating Ruby???&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Matz =&amp;gt; Designs&lt;/li&gt;
  &lt;li&gt;Ko1 =&amp;gt; Implements&lt;/li&gt;
  &lt;li&gt;Nobu =&amp;gt; Fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;enumerablelazy&quot;&gt;Enumerable#Lazy&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Defer running until .force&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keyword arguments&lt;/p&gt;

&lt;h3 id=&quot;building-data-driven-products-using-ruby---ryan-weald&quot;&gt;Building Data Driven products using Ruby - Ryan Weald&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://speakerdeck.com/rweald/building-data-driven-products-with-ruby&quot;&gt;Slides&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ask the right questions!&lt;/p&gt;

&lt;h4 id=&quot;collect-and-clean-the-data&quot;&gt;Collect and clean the data&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;This will be 90% of your time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Publish results&lt;/p&gt;

&lt;h3 id=&quot;why-jruby-works---charles-nutter-tom-enebo&quot;&gt;Why JRuby Works - Charles Nutter, Tom Enebo&lt;/h3&gt;

&lt;p&gt;Check back at &lt;a href=&quot;http://www.confreaks.com/presenters/35-charles-nutter&quot;&gt;Confreaks&lt;/a&gt; soon, I’m guessing…&lt;/p&gt;

&lt;p&gt;JRuby is Ruby… and then some (the talk is on the “then some”)&lt;/p&gt;

&lt;p&gt;As simple as: rvm install jruby&lt;/p&gt;

&lt;p&gt;The JVM rocks&lt;/p&gt;

&lt;p&gt;JRuby 1.7 targets Java 7, which gets invokeddynamic. invokeddynamic is extremely sexy&lt;/p&gt;

&lt;p&gt;Holy (micro) performance!&lt;/p&gt;

&lt;h3 id=&quot;tokaido---yehuda-katz&quot;&gt;Tokaido - Yehuda Katz&lt;/h3&gt;

&lt;p&gt;It is a pain to build (Rails on OSX), especially if you have to do it regularly
Many problems with external dependencies&lt;/p&gt;

&lt;h3 id=&quot;y-not---jim-weirich&quot;&gt;Y Not - Jim Weirich&lt;/h3&gt;

&lt;p&gt;I’m guessing it’s the same talk given &lt;a href=&quot;http://vimeo.com/51898267&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This talk is highly technical, extremely pointless, and worst Ruby code ever
Note: this is what Jim said, not what I believe. It was an excellent keynote!&lt;/p&gt;

&lt;h4 id=&quot;effectively-computable&quot;&gt;Effectively computable&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;lambda calculus &amp;lt;=&amp;gt; Turing machines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yeah, can’t repeat here… just know my mind exploded.&lt;/p&gt;

&lt;h3 id=&quot;ruby-vs-the-world---matt-aimonetti&quot;&gt;Ruby vs the World - Matt Aimonetti&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://speakerdeck.com/matt_aimonetti/ruby-vs-the-world&quot;&gt;Slides&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;language-affects-behavior&quot;&gt;Language affects behavior&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;“probably” the same with programming languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By studying and learning other languages, you will write your code differently (when you go back to your primary language)&lt;/p&gt;

&lt;p&gt;Looked into Clojure, Scala, and Go&lt;/p&gt;

&lt;h4 id=&quot;use-cases&quot;&gt;Use cases:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Go =&amp;gt; Concurrency&lt;/li&gt;
  &lt;li&gt;Clojure =&amp;gt; Data processing&lt;/li&gt;
  &lt;li&gt;Scala =&amp;gt; SOA&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Functional programming for when data doesn’t change
Object-Oriented programming for when data does change&lt;/p&gt;

&lt;h3 id=&quot;real-time-salami---aaron-patterson&quot;&gt;Real Time Salami - Aaron Patterson&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://speakerdeck.com/tenderlove/real-time-salami&quot;&gt;Slides&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;actioncontrollerlive&quot;&gt;ActionController::Live&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Streaming responses to clients&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DTrace is fantastic&lt;/p&gt;

&lt;h3 id=&quot;next-frontier-of-deployment---dr-nic-williams&quot;&gt;Next Frontier of Deployment - Dr. Nic Williams&lt;/h3&gt;

&lt;p&gt;You need to think about production and production happiness, not just developer happiness&lt;/p&gt;

&lt;p&gt;“Make the right thing easier to do than not to do”&lt;/p&gt;

&lt;p&gt;Look at the BOSH project&lt;/p&gt;

&lt;h3 id=&quot;inside-rubymotion---rich-kilmer&quot;&gt;Inside RubyMotion - Rich Kilmer&lt;/h3&gt;

&lt;p&gt;Ruby on an iOS device&lt;/p&gt;

&lt;p&gt;LLVM Compiler&lt;/p&gt;

&lt;p&gt;Uses Rake for toolchain&lt;/p&gt;

&lt;p&gt;RubyMine EAP is very good for RubyMotion&lt;/p&gt;

&lt;h3 id=&quot;lightning-talks&quot;&gt;Lightning talks&lt;/h3&gt;

&lt;h4 id=&quot;interesting&quot;&gt;Interesting:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;gSchool.it&lt;/li&gt;
  &lt;li&gt;37Signals’ Sub&lt;/li&gt;
  &lt;li&gt;Ruby Hangout&lt;/li&gt;
  &lt;li&gt;@BaneCapital&lt;/li&gt;
  &lt;li&gt;http://sferik.github.com/t/&lt;/li&gt;
  &lt;li&gt;issue triage&lt;/li&gt;
  &lt;li&gt;http://www.textfromxcode.com/&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;insufficiency-of-good-design---sarah-mei&quot;&gt;Insufficiency of Good Design - Sarah Mei&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/3650927&quot;&gt;Abstract&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;write-more-good-code&quot;&gt;Write more good code:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Practice good OO design principles&lt;/li&gt;
  &lt;li&gt;Development practices (agile)&lt;/li&gt;
  &lt;li&gt;Other people (informal communication is huge!)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Conway’s law: “Organizations produce systems equivalent to their informal communication patterns”&lt;/p&gt;

&lt;p&gt;Best predictor of good code? Communication&lt;/p&gt;

&lt;p&gt;Seagull Architect: “Fly in, crap on everything, and fly away”&lt;/p&gt;

&lt;p&gt;Code smell may shed light on invisible communication patterns&lt;/p&gt;

&lt;h3 id=&quot;game-development-and-ruby---andrew-nordman&quot;&gt;Game Development and Ruby - Andrew Nordman&lt;/h3&gt;

&lt;h4 id=&quot;paths-to-building-a-game&quot;&gt;Paths to building a game:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Game libraries&lt;/li&gt;
  &lt;li&gt;Use existing engines&lt;/li&gt;
  &lt;li&gt;Building an engine from scratch&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;3-things&quot;&gt;3 things:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Graphic renderer&lt;/li&gt;
  &lt;li&gt;Game loop&lt;/li&gt;
  &lt;li&gt;Input handler&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Resource manager - creation/deletion of resources&lt;/p&gt;

&lt;p&gt;Game state manager&lt;/p&gt;

&lt;h3 id=&quot;diablo-3-bot-with-jruby---rodrigo-franco&quot;&gt;Diablo 3 bot with JRuby - Rodrigo Franco&lt;/h3&gt;

&lt;p&gt;Aka “Automating interface testing”&lt;/p&gt;

&lt;p&gt;Sikuli - fantastic Java library used to test UI&lt;/p&gt;

&lt;h3 id=&quot;simulating-the-world-with-ruby---bryan-liles&quot;&gt;Simulating the world with Ruby - Bryan Liles&lt;/h3&gt;

&lt;p&gt;I’m guessing it’s the same talk given &lt;a href=&quot;http://vimeo.com/51898786&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why Ruby? We like it&lt;/p&gt;

&lt;p&gt;Blocks of simulation =&amp;gt; Models&lt;/p&gt;

&lt;p&gt;gems: descriptive_statistics, distribution, vose, algorithms&lt;/p&gt;

&lt;h3 id=&quot;machine-learning---chris-nelson&quot;&gt;Machine Learning - Chris Nelson&lt;/h3&gt;

&lt;p&gt;Decision Trees =&amp;gt; ID3 (iterative dichotomiser)&lt;/p&gt;

&lt;p&gt;gems: AI4R, DecisionTree&lt;/p&gt;

&lt;h3 id=&quot;an-intimate-chat-with-matz&quot;&gt;An Intimate Chat with Matz&lt;/h3&gt;

&lt;p&gt;Matz just wanted to make the tool&lt;/p&gt;

&lt;p&gt;Pre-2000, Ruby development was just a hobby, like “fishing”… but Matz didn’t consider it a waste of time&lt;/p&gt;

&lt;p&gt;For 2.0+, wants to keep compatibility as much as possible&lt;/p&gt;

&lt;h3 id=&quot;_why-the-luck-stiff-documentary&quot;&gt;_why, the luck stiff documentary&lt;/h3&gt;

&lt;p&gt;No real notes here, but I thought it was great they showed this documentary. It was about 15-20 minutes, and I loved it. &lt;em&gt;why was the reason I got into Ruby. I think _most&lt;/em&gt; of the people there didn’t know who _why was, which was pretty sad to me. I think _why took off when the engineers took over the artists in Ruby, but I don’t know. Anyway, thanks _why for your contributions.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Startup School 2012</title>
   <link href="http://davidwparker.com/2012/10/26/startup-school-2012/"/>
   <updated>2012-10-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/10/26/startup-school-2012</id>
   <content type="html">&lt;p&gt;Last weekend, I had the priviledge to attend &lt;a href=&quot;http://startupschool.org/&quot;&gt;Startup School&lt;/a&gt;. The lineup for this year’s event was insane:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Patrick Collison, Founder, &lt;a href=&quot;https://stripe.com&quot;&gt;Stripe&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Ron Conway, Partner, &lt;a href=&quot;http://svangel.com&quot;&gt;SV Angel&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Ben Horowitz, Partner, &lt;a href=&quot;http://a16z.com&quot;&gt;Andreessen Horowitz&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Travis Kalanick, Founder, &lt;a href=&quot;https://www.uber.com&quot;&gt;Uber&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Jessica Livingston, Partner, &lt;a href=&quot;http://ycombinator.com&quot;&gt;Y Combinator&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Hiroshi Mikitani, Founder, &lt;a href=&quot;http://global.rakuten.com/en/&quot;&gt;Rakuten&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Tom Preston-Werner, Founder, &lt;a href=&quot;http://github.com&quot;&gt;Github&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;David Rusenko, Founder, &lt;a href=&quot;http://www.weebly.com&quot;&gt;Weebly&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Ben Silbermann, Founder, &lt;a href=&quot;http://pinterest.com&quot;&gt;Pinterest&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Joel Spolsky, Founder, &lt;a href=&quot;http://stackexchange.com&quot;&gt;StackExchange&lt;/a&gt; &lt;a href=&quot;http://www.fogcreek.com&quot;&gt;Fog Creek Software&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Mark Zuckerberg, Founder, &lt;a href=&quot;http://facebook.com&quot;&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was just me, the founders, and 1000 of our closest friends. I arrived in Palo Alto (Stanford) via Caltrain from San Francisco, having stayed with a friend. It was pretty easy to get there. I then took a nice walk up Palm and then on to the event. Before the start, there was some breakfast type foods (fruit, bagels) as well as coffee and juice. I grabbed a little to eat and started talking to others as they arrived. I couldn’t believe how many people were at the event. It was pretty awesome. Registration didn’t go super smoothly, as the scanner couldn’t scan the barcode from my smartphone. Instead I typed in my reservation which somehow blew up the app. Then upon reloading the app, it printed my badge. I’m not entirely sure what happened there. Before the event, and during the breaks, I had the opportunity to talk to a few people, namely Joel Spolsky, Tom Preston-Werner, and Patrick McKenzie (Patio11). I thanked Joel thoroughly for Stack Overflow, Tom for Github, and Patrick for all of his awesome posts on Hacker News.&lt;/p&gt;

&lt;p&gt;Anyway, here are my take aways from each of the presenters (in order of presenting):&lt;/p&gt;

&lt;h3 id=&quot;mark-zuckerberg&quot;&gt;Mark Zuckerberg&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Bootstrap your idea: Facebook used .edu email only&lt;/li&gt;
  &lt;li&gt;You can’t 80/20 everything; you have to be the best at something&lt;/li&gt;
  &lt;li&gt;Scaled college-by-college, which made it easier to grow. Baking helps&lt;/li&gt;
  &lt;li&gt;“I always knew you would drop out of college” - Zuckerberg’s mom. Apparently everyone knew Zuckeberg would drop out of school before he did&lt;/li&gt;
  &lt;li&gt;“Explore what you want to do before committing.”&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;travis-kalanick&quot;&gt;Travis Kalanick&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;“When I’m having a bad day, I go to our revenue graph.” Charge for your product and actually make money&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;jessica-livingston&quot;&gt;Jessica Livingston&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Weapons to fight monsters that kill startpus: determination (resilience and drive)&lt;/li&gt;
  &lt;li&gt;Monsters:
    &lt;ul&gt;
      &lt;li&gt;Rejection&lt;/li&gt;
      &lt;li&gt;Cofounders&lt;/li&gt;
      &lt;li&gt;Investors&lt;/li&gt;
      &lt;li&gt;Distractions&lt;/li&gt;
      &lt;li&gt;HR Acquisitions&lt;/li&gt;
      &lt;li&gt;(Difficulty of) making something people want&lt;/li&gt;
      &lt;li&gt;Rollercoaster (emotions)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;patrick-collison&quot;&gt;Patrick Collison&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;“It probably won’t be all that hard.” - Jon (his cofounder and brother)&lt;/li&gt;
  &lt;li&gt;Turn up the dial on user feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;ben-silbermann&quot;&gt;Ben Silbermann&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;4 months in, only 3000 users&lt;/li&gt;
  &lt;li&gt;Timeline: May 2008 leave job, November 2009 start code, March 2010 launch, June 2010 3000 users&lt;/li&gt;
  &lt;li&gt;Making things can take a long time&lt;/li&gt;
  &lt;li&gt;Committing matters: “do it or stop talking about it” - Silbermann’s wife&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;ben-horowitz&quot;&gt;Ben Horowitz&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;What matters? Do something that’s 10x better&lt;/li&gt;
  &lt;li&gt;Take the number 1 spot in the market; number 2 doesn’t matter&lt;/li&gt;
  &lt;li&gt;Sleep like a baby… wake every 2 hours and cry&lt;/li&gt;
  &lt;li&gt;Two emotions of startup entrepreneur: Euphoria and Terror&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;tom-preston-werner&quot;&gt;Tom Preston-Werner&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;People are the only thing that matters&lt;/li&gt;
  &lt;li&gt;Product is the only thing that matters&lt;/li&gt;
  &lt;li&gt;Philosophy is the only thing that matters&lt;/li&gt;
  &lt;li&gt;“Everything that you add (to your product) dilutes the entire product”&lt;/li&gt;
  &lt;li&gt;“Focus over features” - Kyle Neath&lt;/li&gt;
  &lt;li&gt;Mission (&amp;lt; 10 words): you can change your mission&lt;/li&gt;
  &lt;li&gt;Github’s future? “Fixing collaboration around the world”&lt;/li&gt;
  &lt;li&gt;Don’t squander your opportunity (like the TV Show Lost)
    &lt;ul&gt;
      &lt;li&gt;Note: I personally thought Lost was great. Last season, meh. But you can’t please everybody, especially with a hardcore mystery show like Lost…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;ron-conway&quot;&gt;Ron Conway&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;650+ Investments&lt;/li&gt;
  &lt;li&gt;Misses: Pandora, Salesforce.com, Kickstarter&lt;/li&gt;
  &lt;li&gt;Patterns of why investor miss: being the 1st at something&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;hiroshi-mikitani&quot;&gt;Hiroshi Mikitani&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;38x businesses in Japa&lt;/li&gt;
  &lt;li&gt;Number 1 in ecommerce&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;joel-spolsky&quot;&gt;Joel Spolsky&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Two types of businesses: get big fast and organic growth&lt;/li&gt;
  &lt;li&gt;Both are viable, but you have to choose which type your company is and stick with it&lt;/li&gt;
  &lt;li&gt;Get big Fast versus Organic Growth:
    &lt;ul&gt;
      &lt;li&gt;Land grab/new tech/network effect/lock-in versus established competitor&lt;/li&gt;
      &lt;li&gt;Need to be big to creat value versus break even quickly&lt;/li&gt;
      &lt;li&gt;Solve problems with money versus frugal and cheap&lt;/li&gt;
      &lt;li&gt;Move fast and break things versus mistakes kill you&lt;/li&gt;
      &lt;li&gt;1% chance at big money versus 90% chance at low-mid money&lt;/li&gt;
      &lt;li&gt;VC versus bootstrap&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Failure to decide which type of company you are will kill you&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;david-rusenko&quot;&gt;David Rusenko&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;6 months after launch, only 12 users signed up&lt;/li&gt;
  &lt;li&gt;2% of all websites on web&lt;/li&gt;
  &lt;li&gt;15% of US traffic hits a Weebly site daily&lt;/li&gt;
  &lt;li&gt;Always know your runway&lt;/li&gt;
  &lt;li&gt;Number 1 lesson- you can’t succeed if you quit&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Strategic Student</title>
   <link href="http://davidwparker.com/2012/10/13/book-strategic-student/"/>
   <updated>2012-10-13T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/10/13/book-strategic-student</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: July 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/098388630X?tag=parker08-20&quot;&gt;The Strategic Student&lt;/a&gt; by David Cass is what I wish I had read before I went to college. It contains a lot of useful, applicable information that will help students of any age (high school or later, in my opinion). While the book is specifically written for students that are leaving high school and going to their undergrad college for the first time, a lot of the info given in the book is applicable for students going to any level of college. This is the book I wish I had read before I started my Master’s degrees. While I believe that the students themselves would be best off reading the book, it would also be useful for parents of said students that want to encourage their child as well as providing specific things they can do to help.&lt;/p&gt;

&lt;p&gt;The book starts off discussing the Strategic Student’s mindset. This is generally different than what it was in high school (though some things would be better learned in high school). The book then transitions to specific skills that a student can use such as time management, classroom, studying, test-taking, and paper-writing skills. Finally, the bok discussing stress and technology.&lt;/p&gt;

&lt;p&gt;Disclaimer: I met Dave during my MBA degree and subsequently read the book after I had finished. I’m not sure why he didn’t recommend it earlier in the program.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;The strategic student is a self-reliant student&lt;/p&gt;

&lt;p&gt;Common theme among struggling students = no plan or system for managing resources (time management, study plans, campus support)&lt;/p&gt;

&lt;p&gt;A self-reliant student initiates action without being prompted&lt;/p&gt;

&lt;p&gt;You must be proactive- in college, if you wait for guidance to take action, you’re going to be too late&lt;/p&gt;

&lt;h4 id=&quot;to-manage-your-gpa&quot;&gt;To manage your GPA:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Be a generalist&lt;/li&gt;
  &lt;li&gt;Don’t compete in individual classes&lt;/li&gt;
  &lt;li&gt;Focus on higher credit-hour classes&lt;/li&gt;
  &lt;li&gt;Train more in harder classes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most powerful thing you can do to become an academic ace is to master time management&lt;/p&gt;

&lt;h4 id=&quot;be-ineffective-by&quot;&gt;Be ineffective by:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Event-driven studying (e.g. when you have a test)&lt;/li&gt;
  &lt;li&gt;Sporadic studying&lt;/li&gt;
  &lt;li&gt;Studying until you feel good&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal of a solid time-management strategy is to streamline your work so you spend less time studying&lt;/p&gt;

&lt;h4 id=&quot;strategic-student-time-management-system&quot;&gt;Strategic student time-management system:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Estimate: determine weekly study time per class&lt;/li&gt;
  &lt;li&gt;Execute: carry out and focus on quality study hours&lt;/li&gt;
  &lt;li&gt;Track: calculate the actual study hours per class&lt;/li&gt;
  &lt;li&gt;Repeat: adjust study plan as semester moves forward&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plot your course and track your progress&lt;/p&gt;

&lt;h4 id=&quot;in-class&quot;&gt;In class:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Show up (mentally)&lt;/li&gt;
  &lt;li&gt;Learn what you need to lean&lt;/li&gt;
  &lt;li&gt;Don’t sit in the back&lt;/li&gt;
  &lt;li&gt;Schedule classes strategically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a professor asks a question, write it down&lt;/p&gt;

&lt;h4 id=&quot;find-out-who-writes-the-exams&quot;&gt;Find out who writes the exams:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;The professor&lt;/li&gt;
  &lt;li&gt;The textbook company&lt;/li&gt;
  &lt;li&gt;The department&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowing who writes the exams will tell you where to study the most&lt;/p&gt;

&lt;p&gt;Tracking may sound like a chore, but tracking helps the student to resist procrastinating&lt;/p&gt;

&lt;p&gt;On a test, if you don’t immediately know the answer, skip it and come back to it&lt;/p&gt;

&lt;p&gt;For big papers, establish weekly and daily goals&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Game Theory 101: The Basics</title>
   <link href="http://davidwparker.com/2012/10/06/book-Game-Theory-101-The-Basics/"/>
   <updated>2012-10-06T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/10/06/book-Game-Theory-101-The-Basics</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: July 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/B005DGHV0I?tag=parker08-20&quot;&gt;Game Theory 101: The Basics&lt;/a&gt; by William Spaniel is a great introduction to Game Theory. If you haven’t had any game theory before, then I’d definitely recommend this book. It’s a pretty hard topic to cover, so I’ll let the book do the speaking…&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Strict dominance - Strategy X strictly dominates strategy Y for a player if X provides a greater payoff for that player than Y regardless of what the other players do.&lt;/p&gt;

&lt;p&gt;Iterated Elimination of Strictly Dominated Strategies (IESDS) - (in the prisoner’s dilemma), note that confess strictly dominates keep quiet for player A, so we removed keep quiet. Then, you can pretend that the remaining game matters, and find that confess strictly dominates keep quiet for player B.&lt;/p&gt;

&lt;p&gt;When you are solving complex games and you find a strictly dominated strategy, eliminate it immediately.&lt;/p&gt;

&lt;p&gt;Weak dominance - Strategy X weakly dominates strategy Y for a player if X provides at least as great of a payoff for that player regardless of what the other players do and there is at least one set of opposing strategies for which X pays greater than Y.&lt;/p&gt;

&lt;p&gt;Nash equilibrium - A set of strategies, one for each player, such that no player has incentives to change his or her strategy given what the other players are doing.&lt;/p&gt;

&lt;p&gt;“Outcomes are a function of preferences and not just the strategic environment”&lt;/p&gt;

&lt;p&gt;Best response is simply the optimal strategy for a particular player given what everyone else is doing.&lt;/p&gt;

&lt;p&gt;If IESDS reduces the game to a single outcome, that outcome is a Nash Equilibrium, and the only Nash Eq of that game.&lt;/p&gt;

&lt;p&gt;Mied strategy Nash Equilibrium - mixed strategy refers to how we are randomizing over multiple strategies rathr than playing a single pure strategy&lt;/p&gt;

&lt;p&gt;“Always remember: weak dominance will be the bane of your existence”&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Being Geek</title>
   <link href="http://davidwparker.com/2012/10/05/book-being-geek/"/>
   <updated>2012-10-05T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/10/05/book-being-geek</id>
   <content type="html">&lt;p&gt;Read: July 2012
Rating: 8.0/10&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0596155409?tag=parker08-20&quot;&gt;Being Geek&lt;/a&gt; is a collection of essays written by Michael ‘Rands in Repose’ Lopp to help software developer’s with their careers. The topics are extremely varied, from office politics, to games, to, well, everything. If you already read Rands’ blog, a lot of it may be repeated… if you don’t, then you’ll discover a lot of interesting things in his book.&lt;/p&gt;

&lt;h2 id=&quot;quotes--my-notes&quot;&gt;Quotes / My Notes&lt;/h2&gt;

&lt;p&gt;“What am I doing? What do I do? What matters to me? What do I care about?”&lt;/p&gt;

&lt;p&gt;“In analyzing a potential new gig, you nee to separate the new from the unique”&lt;/p&gt;

&lt;p&gt;“Is it what you want to do?” - the career question&lt;/p&gt;

&lt;p&gt;“Figuring out the unknown is the best way to learn”&lt;/p&gt;

&lt;p&gt;“An excuse is an abdication of responsibility. There are no healthy excuses”&lt;/p&gt;

&lt;h4 id=&quot;people-you-may-deal-with-in-meetings&quot;&gt;People you may deal with (in meetings):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Interrogator - endless questions&lt;/li&gt;
  &lt;li&gt;Prioritizer - todo lists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“An individual’s decision to engage in the impossible starts with the question, ‘do I respect this person enough to tackle the impossible?’”&lt;/p&gt;

&lt;p&gt;“A sigh is associated with despair. We’re screwed. Sigh. My interpretation is different; this long, deep breath is one of preparation”&lt;/p&gt;

&lt;p&gt;“What are you worried about? Here’s what I’m worried about…”&lt;/p&gt;

&lt;p&gt;“A nerd needs a project because a nerd builds stuff. All the time. Those lulls in conversation over dinner. That’s the nerd working on his project in his head.”&lt;/p&gt;

&lt;p&gt;Gather perspective: “What is going to matter today?”&lt;/p&gt;

&lt;p&gt;“Management is the art of choosing what not to do”&lt;/p&gt;

&lt;p&gt;“The correct tool is going to make you exponentially more productive”&lt;/p&gt;

&lt;p&gt;Performance review isn’t about comparing to others; it’s about what you did and what you could do&lt;/p&gt;

&lt;h4 id=&quot;question-to-ask-yourself-when-pursuing-a-career&quot;&gt;Question to ask yourself when pursuing a career:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Question #1) Startup or established?&lt;/li&gt;
  &lt;li&gt;Question #2) Industry and brand?&lt;/li&gt;
  &lt;li&gt;Question #3) Management or development?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where do I want to go?&lt;/p&gt;

&lt;p&gt;What do I want to build?&lt;/p&gt;

&lt;p&gt;How do I want to build it?&lt;/p&gt;

&lt;p&gt;“No one knows what we actually do to build the software, so they assume it’s easy”&lt;/p&gt;

&lt;p&gt;A new job is one of “abstraction, synthesis, and filtering”&lt;/p&gt;

&lt;p&gt;“Just because you’re kicking ass doesn’t mean you’re successful. Misery is productive. Conflict is learning.”&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Venture Deals</title>
   <link href="http://davidwparker.com/2012/10/03/book-venture-deals/"/>
   <updated>2012-10-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/10/03/book-venture-deals</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: August 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0470929820?tag=parker08-20&quot;&gt;Venture Deals&lt;/a&gt; by Brad Feld and Jason Mendelson is a great book on the entire venture capital process. I won’t lie, I had a stigma against VCs, but after reading this book, I’m definitely a lot more open to the value that they provide (I’m also taking Jason Mendelson’s VC class at CU Boulder). My mind is a lot more open to VC now. I would recommend this book to anyone who wants to start a startup, whether they plan on bootstrapping or raising funds. Anyway, on to the book. The book is divided up into different parts or sections or people involved in the VC process.&lt;/p&gt;

&lt;h4 id=&quot;chapters&quot;&gt;Chapters:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;the players&lt;/li&gt;
  &lt;li&gt;how to raise money&lt;/li&gt;
  &lt;li&gt;overview of the term sheet&lt;/li&gt;
  &lt;li&gt;economic terms of the term sheet&lt;/li&gt;
  &lt;li&gt;control terms of the term sheet&lt;/li&gt;
  &lt;li&gt;other terms of the term sheet.&lt;/li&gt;
  &lt;li&gt;the capitalization table&lt;/li&gt;
  &lt;li&gt;how venture capital funds work&lt;/li&gt;
  &lt;li&gt;negotiation tactics&lt;/li&gt;
  &lt;li&gt;raising money the right way&lt;/li&gt;
  &lt;li&gt;issues at different financing stages&lt;/li&gt;
  &lt;li&gt;letters of intent- the other term sheet&lt;/li&gt;
  &lt;li&gt;legal things every entrepreneur should know&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h4 id=&quot;there-are-only-two-things-that-matter-in-the-actual-term-sheet&quot;&gt;There are only two things that matter in the actual term sheet:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Economics&lt;/li&gt;
  &lt;li&gt;Control&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;the-players&quot;&gt;The players:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;The entrepreneur&lt;/li&gt;
  &lt;li&gt;The venture capitalist
    &lt;ul&gt;
      &lt;li&gt;Most senior are called managing director or general partner&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The angel investor&lt;/li&gt;
  &lt;li&gt;The syndicate
    &lt;ul&gt;
      &lt;li&gt;Name for a collection of investors&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The lawyer&lt;/li&gt;
  &lt;li&gt;The mentor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When raising funds, focus on a length of time you want to fund your company&lt;/p&gt;

&lt;p&gt;Don’t use ranges when raising funds&lt;/p&gt;

&lt;p&gt;You can’t predict your revenues, but you should be able to manage your expenses exactly&lt;/p&gt;

&lt;p&gt;Ask the VCs for things like introductions to other founders they’ve backed&lt;/p&gt;

&lt;p&gt;If a VC passes on a deal with you, politely insist on feedback as to why&lt;/p&gt;

&lt;h3 id=&quot;economics&quot;&gt;Economics&lt;/h3&gt;

&lt;p&gt;Economics refers to the return the investors will get in a liquidity event.&lt;/p&gt;

&lt;h4 id=&quot;terms&quot;&gt;Terms:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Price&lt;/li&gt;
  &lt;li&gt;Premoney = valuation what the investor is valuing the company at today (before investment)&lt;/li&gt;
  &lt;li&gt;Postmoney = valuation of premoney + investment amount&lt;/li&gt;
  &lt;li&gt;Option pool = stock available for employees
    &lt;ul&gt;
      &lt;li&gt;A larger option pool effectively lowers the premoney valuation&lt;/li&gt;
      &lt;li&gt;Come to your VC negotiations with an option budget: list all hires planning on making and approximate option grant you think it will take for each hire.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Warrant = right for investor to purchase a certain numbr of shares at a predefined price for a certain number of years&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;some-ways-vcs-value-companies&quot;&gt;Some ways VCs value companies:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Company Stage&lt;/li&gt;
  &lt;li&gt;Competition with other funding sources&lt;/li&gt;
  &lt;li&gt;Team experience&lt;/li&gt;
  &lt;li&gt;VC’s entry point&lt;/li&gt;
  &lt;li&gt;Numbers&lt;/li&gt;
  &lt;li&gt;Current economic climate&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;liquidation-preference&quot;&gt;Liquidation preference&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Actual preference&lt;/li&gt;
  &lt;li&gt;Participation
    &lt;ul&gt;
      &lt;li&gt;Fully participation or capped participation&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In early stage financings, it’s best to have simple liquidation preference and no participation&lt;/p&gt;

&lt;p&gt;Pay-to-play: ensures that all investors agree in advance to rules of engagement concerning future financings (generally a good thing)&lt;/p&gt;

&lt;h3 id=&quot;control&quot;&gt;Control&lt;/h3&gt;

&lt;p&gt;Control refers to the mechanisms that allow the investors to exercise control over the busines or to veto certain decisions&lt;/p&gt;

&lt;h4 id=&quot;terms-1&quot;&gt;Terms:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Board of directors&lt;/li&gt;
  &lt;li&gt;Protective provisions
    &lt;ul&gt;
      &lt;li&gt;Veto rights investors have on certain actions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Drag-along agreement
    &lt;ul&gt;
      &lt;li&gt;Gives subset of investors ability to force (drag-along) other investors and founders to sell the company&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Conversion (normally nonnegotiable)
    &lt;ul&gt;
      &lt;li&gt;Allows buyers of preferred to convert to common&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;other-terms&quot;&gt;Other terms&lt;/h3&gt;

&lt;p&gt;Terms to be aware of: dividends, redemption rights, conditions precedent to financing, information rights, registration rights, right of first refusal, voting rights, restriction on sales, proprietary information and inventions agreement, co-sale agreement, founders’ activities, initial public offering shares purchase, no-shop agreement, indemnification, and assigment&lt;/p&gt;

&lt;h3 id=&quot;how-vc-funds-work&quot;&gt;How VC funds work&lt;/h3&gt;

&lt;p&gt;You need to understand the motivation of the venture capitalist&lt;/p&gt;

&lt;p&gt;There’s a great explanation here of the management company structure, as well as how firms raise money&lt;/p&gt;

&lt;p&gt;Management fees are typically between 1.5 and 2.5 percent&lt;/p&gt;

&lt;p&gt;Carried interest is where VCs make their real money (it’s what they make after they pay back their Limited Partners (LPs))&lt;/p&gt;

&lt;p&gt;The commitment period is when VCs are able to invest, usually the first 5 years of a 10 year fund&lt;/p&gt;

&lt;p&gt;Spot zombie VCs by asking when they made their last investment&lt;/p&gt;

&lt;p&gt;The closer to the end of a VCs fund may potentially mean more pressure for the entrepreneur&lt;/p&gt;

&lt;h3 id=&quot;negotiation-tactics&quot;&gt;Negotiation tactics&lt;/h3&gt;

&lt;p&gt;This is the chapter that everyone needs to read, whether they want to raise funds or not&lt;/p&gt;

&lt;h4 id=&quot;three-things-that-matter-when-negotiating-financing&quot;&gt;Three things that matter when negotiating financing:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Good and fair result&lt;/li&gt;
  &lt;li&gt;Not killing personal relationships getting there&lt;/li&gt;
  &lt;li&gt;Understanding the deal you are making&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;when-you-go-to-negotiate-anything-have-a-plan&quot;&gt;When you go to negotiate (anything), have a plan:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Know what you want&lt;/li&gt;
  &lt;li&gt;Know what you are willing to concede&lt;/li&gt;
  &lt;li&gt;Know when you are willing to walk away&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t present your term sheet to a VC&lt;/p&gt;

&lt;p&gt;You can’t lose a deal point if you don’t open your mouth&lt;/p&gt;

&lt;h3 id=&quot;raising-money-the-right-way&quot;&gt;Raising money the right way&lt;/h3&gt;

&lt;p&gt;Don’t ask for a nondisclosure agreement (NDA)&lt;/p&gt;

&lt;p&gt;Don’t ask for a referral if you get a no&lt;/p&gt;

&lt;p&gt;Don’t be a solo founder&lt;/p&gt;

&lt;p&gt;Don’t overemphasize patents&lt;/p&gt;

&lt;h3 id=&quot;legal-stuff-to-know&quot;&gt;Legal stuff to know&lt;/h3&gt;

&lt;p&gt;Intellectual property&lt;/p&gt;

&lt;h4 id=&quot;employment-issues---make-sure-you-hire-at-will-employees&quot;&gt;Employment issues - make sure you hire at-will employees&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Know at least one good employment lawyer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Incorporate in Delaware&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Hacker Monthly - Issues 1 through 4</title>
   <link href="http://davidwparker.com/2012/05/14/hacker-monthly-1-through-4/"/>
   <updated>2012-05-14T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/05/14/hacker-monthly-1-through-4</id>
   <content type="html">&lt;p&gt;Read: May 2012&lt;/p&gt;

&lt;h2 id=&quot;quotes-from-the-first-four-issues-of-hacker-monthly&quot;&gt;Quotes from the first four issues of Hacker Monthly&lt;/h2&gt;

&lt;h3 id=&quot;2-steps-to-becoming-a-great-developer---eric-davis&quot;&gt;2 Steps to becoming a great developer - Eric Davis&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Write more code&lt;/li&gt;
  &lt;li&gt;Work with great developers&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;7-tips-for-successful-self-learning---bradford-cross-and-hamilton-ulmer&quot;&gt;7 Tips for Successful Self-Learning - Bradford Cross and Hamilton Ulmer&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Longest path is the shortest and the shortest path is the longest&lt;/li&gt;
  &lt;li&gt;Avoid isolation&lt;/li&gt;
  &lt;li&gt;Avoid multitasking&lt;/li&gt;
  &lt;li&gt;You don’t read through textbooks, you work through them&lt;/li&gt;
  &lt;li&gt;Build Eigencourses&lt;/li&gt;
  &lt;li&gt;What to do when you don’t understand&lt;/li&gt;
  &lt;li&gt;There is nothing so practical as good theory - Kurt Lewin&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;leave-the-ad-revenue-and-crazy-business-model-revenue-streams-to-the-startups-with-venture-funding---spencer-fry&quot;&gt;Leave the ad revenue and crazy business model revenue streams to the startups with venture funding. - Spencer Fry&lt;/h3&gt;

&lt;h3 id=&quot;how-to-become-a-millionaire-in-three-years---jason-baptiste&quot;&gt;How to become a millionaire in three years - Jason Baptiste&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Market opportunity&lt;/li&gt;
  &lt;li&gt;Leverage skills you know&lt;/li&gt;
  &lt;li&gt;Look in obscure places&lt;/li&gt;
  &lt;li&gt;Surround yourself with smart people&lt;/li&gt;
  &lt;li&gt;Charge for something&lt;/li&gt;
  &lt;li&gt;Information products are valuable&lt;/li&gt;
  &lt;li&gt;Primary metrics shouldn’t be dollars&lt;/li&gt;
  &lt;li&gt;Get as many distribution channels as possible&lt;/li&gt;
  &lt;li&gt;Do not care about fameballing - become famous with your customers. They’re the ones that truly matter.&lt;/li&gt;
  &lt;li&gt;Be an unrelenting machine - commit to your goals and do not waiver from them one bit regardless of what else is there.&lt;/li&gt;
  &lt;li&gt;Focus on the first $10,000&lt;/li&gt;
  &lt;li&gt;Be a master of information&lt;/li&gt;
  &lt;li&gt;Get out and be social&lt;/li&gt;
  &lt;li&gt;Say No way more than you say Yes&lt;/li&gt;
  &lt;li&gt;Be so good they can’t ignore you&lt;/li&gt;
  &lt;li&gt;Always keep your door/inbox open&lt;/li&gt;
  &lt;li&gt;Stick with it&lt;/li&gt;
  &lt;li&gt;Productize a service&lt;/li&gt;
  &lt;li&gt;Look for something that is required or subsidized by law&lt;/li&gt;
  &lt;li&gt;Don’t be emotional&lt;/li&gt;
  &lt;li&gt;Raise revenue, not funding&lt;/li&gt;
  &lt;li&gt;Don’t get comfortable&lt;/li&gt;
  &lt;li&gt;Look for those who are comfortable&lt;/li&gt;
  &lt;li&gt;Keep the momentum going&lt;/li&gt;
  &lt;li&gt;Learn how to filter&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;dont-worry-about-managing-the-information---clay-johnson&quot;&gt;Don’t worry about managing the information - Clay Johnson&lt;/h3&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Design of Everyday Things</title>
   <link href="http://davidwparker.com/2012/05/13/book-the-design-of-everyday-things/"/>
   <updated>2012-05-13T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/05/13/book-the-design-of-everyday-things</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: April-May 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0465067107?tag=parker08-20&quot;&gt;The Design of Everyday Things&lt;/a&gt; (DOET) by Donald Norman is a classic book on, well, design. It wasn’t exactly what I was expecting, and I think it was different in a good way. The book pertains mostly to what people would think of as “usability” rather than “design,” especially for those of us working with software, where we think of design as rounded corners, and other aesthetics like that. This book doesn’t mention that stuff at all. Rather, it discusses what makes a good design and how a good design solves problems for those using the everyday object. I really think that the original name of the book, The Psychology of Everyday Things (POET), is an excellent name for the book. All said, I’d highly recommend this book.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Topics:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;It’s not your fault&lt;/li&gt;
  &lt;li&gt;Design Principles
    &lt;ul&gt;
      &lt;li&gt;Conceptual Models&lt;/li&gt;
      &lt;li&gt;Feedback&lt;/li&gt;
      &lt;li&gt;Constraints&lt;/li&gt;
      &lt;li&gt;Affordances&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The Power of Observations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One of the most important principles of design: visibility&lt;/p&gt;

&lt;p&gt;Natural signals = natural design&lt;/p&gt;

&lt;p&gt;When simple things need pictures, labels, or instructions, the design has failed&lt;/p&gt;

&lt;p&gt;When an action has no apparent result, you may conclude that the action was ineffective&lt;/p&gt;

&lt;h3 id=&quot;principles-of-design-for-understanding-and-usability-conceptual-models&quot;&gt;Principles of Design for Understanding and Usability (Conceptual Models)&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Provide a good conceptual model
    &lt;ul&gt;
      &lt;li&gt;Allows us to predict the effects of our actions&lt;/li&gt;
      &lt;li&gt;Three mental models: Design model (designer), User’s model (user), and System image (system)&lt;/li&gt;
      &lt;li&gt;People form mental models through experience, training, and instruction&lt;/li&gt;
      &lt;li&gt;When the system image is incoherent or inappropriate, as in the case of the refrigerator, then the user cannot easily use the device&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Make things visible
    &lt;ul&gt;
      &lt;li&gt;Whenever the number of possible actions exceeds the number of controls, there is apt to be difficulty&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;principle-of-mapping&quot;&gt;Principle of Mapping&lt;/h3&gt;

&lt;p&gt;Mapping is a technical term meaning the relationship between two things, in this case beteen the controls and their movements and the results in the world&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Additive dimensions: add more to show incremental increases&lt;/li&gt;
  &lt;li&gt;Substitutive dimensions: substitute one value for another to make a change&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;principle-of-feedback&quot;&gt;Principle of Feedback&lt;/h3&gt;

&lt;p&gt;Feedback– sending back to the user information about what action has actually been done, what result has been accomplished– is a well known concept in the science of control and information theory&lt;/p&gt;

&lt;p&gt;The paradox of technology should never bee used as an excuse for poor design&lt;/p&gt;

&lt;h3 id=&quot;psychology-of-everyday-actions&quot;&gt;Psychology of Everyday Actions&lt;/h3&gt;

&lt;p&gt;Falsely blaming yourself: if a design is faulty and the task &lt;i&gt;appears&lt;/i&gt; simple or trivial, then people blame themselves&lt;/p&gt;

&lt;p&gt;“If an error is possible, someone will make it. The designer must assume that all possible errors will occur and design so as to minimize the chance of the error in the first place, or its effects once it gets made. Errors should be easy to detect, they should have minimal consequences, and, if possible, their effects should be reversible.”&lt;/p&gt;

&lt;p&gt;In general, it has been found that people attribute their own problems to the environment, those of other people to their personalities&lt;/p&gt;

&lt;p&gt;When things go right, people credit their own forceful personalities and intelligence&lt;/p&gt;

&lt;h4 id=&quot;to-get-something-done&quot;&gt;To get something done:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;start with a goal that is to be achieved&lt;/li&gt;
  &lt;li&gt;do something to the world; take action to move yourself or manipulate someone or something&lt;/li&gt;
  &lt;li&gt;finally, check to see that your goal was made&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;4-things-to-consider&quot;&gt;4 things to consider:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;the goal&lt;/li&gt;
  &lt;li&gt;what is done to the world&lt;/li&gt;
  &lt;li&gt;the world itself&lt;/li&gt;
  &lt;li&gt;the check of the world&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An intention is a specific action taken to get to the goal&lt;/p&gt;

&lt;h3 id=&quot;seven-stages-of-action-one-for-goals-three-for-execution-three-for-evaluation&quot;&gt;Seven stages of action: one for goals, three for execution, three for evaluation&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Forming the goal&lt;/li&gt;
  &lt;li&gt;Forming the intention&lt;/li&gt;
  &lt;li&gt;Specifying an action&lt;/li&gt;
  &lt;li&gt;Executing the action&lt;/li&gt;
  &lt;li&gt;Perceiving the state of the world&lt;/li&gt;
  &lt;li&gt;Interpreting the state of the world&lt;/li&gt;
  &lt;li&gt;Evaluating the outcome&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;knowledge-in-the-head-and-in-the-world&quot;&gt;Knowledge in the Head and in the World&lt;/h3&gt;

&lt;p&gt;Precise behavior can emerge from imprecise knowledge for four reasons&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Information is in the world&lt;/li&gt;
  &lt;li&gt;Great precision is not required&lt;/li&gt;
  &lt;li&gt;Natural constraints are present&lt;/li&gt;
  &lt;li&gt;Cultural constraints are present&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;information-is-in-the-world&quot;&gt;Information is in the World&lt;/h4&gt;

&lt;p&gt;Whenever information needed to do a task is readily available in the world, the need for us to learn it diminishes&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Knowledge of: declarative knowledge. Facts and rules&lt;/li&gt;
  &lt;li&gt;Knowledge how: procedural knowledge. Enables people to perform music, play tennis, etc - best taught by demonstration and best learned through practice&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;memory-is-knowledge-in-the-head&quot;&gt;Memory is knowledge in the Head&lt;/h4&gt;

&lt;h4 id=&quot;people-use-their-memories-and-how-they-retrieve-information&quot;&gt;People use their memories and how they retrieve information:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Memory for arbitrary things&lt;/li&gt;
  &lt;li&gt;Memory for meaningful relationships&lt;/li&gt;
  &lt;li&gt;Memory through explanation&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;memory-is-also-knowledge-in-the-world&quot;&gt;Memory is also knowledge in the World&lt;/h4&gt;

&lt;h4 id=&quot;reminders---to-do-something-in-the-world-at-a-later-time-or-date&quot;&gt;Reminders - to do something in the world, at a later time or date&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Two aspects of a reminder: signal and message&lt;/li&gt;
  &lt;li&gt;The ideal reminder has to have both components&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;test-products-before-you-buy-them&quot;&gt;Test products before you buy them!&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;think stove burners, and if they must include labels and reminders, then they may have a faulty design, as there isn’t a natural mapping&lt;/li&gt;
  &lt;li&gt;Often the purchaser is not the user&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;tradeoff-between-knowledge-in-the-world-and-in-the-head&quot;&gt;Tradeoff between Knowledge in the World and in the Head&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Retreivability
    &lt;ul&gt;
      &lt;li&gt;World: whenever visible or audible&lt;/li&gt;
      &lt;li&gt;Head: not readily retrievable. Requires memory search or reminding&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Learning
    &lt;ul&gt;
      &lt;li&gt;World: learning not required. Interpretation substitutes for learning. How easy it is to interpret information in the world depends upon how well it exploits natural mappings and constraints&lt;/li&gt;
      &lt;li&gt;Head: requires learning, which can be considerable. Learning is made easier if there is meaning or structure to the material.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Efficiency of use
    &lt;ul&gt;
      &lt;li&gt;World: tends to be slowed up by need to find and interpret the external information&lt;/li&gt;
      &lt;li&gt;Head: can be very efficient&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Ease of use at first encounter
    &lt;ul&gt;
      &lt;li&gt;World: high&lt;/li&gt;
      &lt;li&gt;Head: low&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Aesthetics
    &lt;ul&gt;
      &lt;li&gt;World: can be unaesthetic and inelegant, especially if there is a need to maintain a lot of information. This can lead to clutter. In the end, aesthetic appeal depends upon the skill of the designer&lt;/li&gt;
      &lt;li&gt;Head: nothing need be visible, which gives more freedom to the designer, which in turn can lead to better aesthetics&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;knowing-what-to-do&quot;&gt;Knowing what to do&lt;/h3&gt;

&lt;p&gt;Problems occur whenever there is more than one possibility&lt;/p&gt;

&lt;p&gt;Types of constraints:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Physical
    &lt;ul&gt;
      &lt;li&gt;Example: most keys&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Semantic
    &lt;ul&gt;
      &lt;li&gt;Rely upon the meaning of the situation to control set of possibly actions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Cultural
    &lt;ul&gt;
      &lt;li&gt;Example: Red lights and Green lights&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Logical
    &lt;ul&gt;
      &lt;li&gt;Think natural mappings&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;visibility-and-feedback&quot;&gt;Visibility and Feedback&lt;/h4&gt;

&lt;ol&gt;
  &lt;li&gt;Visibility: make the relevant parts visible&lt;/li&gt;
  &lt;li&gt;Feedback: give each action an immediate and obvious effect&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;to-err-is-human&quot;&gt;To Err is Human&lt;/h3&gt;

&lt;p&gt;Categories of errors: slips and mistakes&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Slip = automatic behavior&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Mistakes = conscious deliberation&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Mosty everyday errors are slips&lt;/li&gt;
  &lt;li&gt;Slips show up most frequently in skilled behavior&lt;/li&gt;
  &lt;li&gt;Slips result from a lack of attention&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;types-of-slips&quot;&gt;Types of slips:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Capture errors - frequently done activity suddenly takes change instead of (captures) the one intended&lt;/li&gt;
  &lt;li&gt;Description errors - intended action has much in common with the others that are possible (correct action on wrong object)&lt;/li&gt;
  &lt;li&gt;Data-driven errors - automatic actions are data-driven&lt;/li&gt;
  &lt;li&gt;Associative activation errors - you think something that ought not to be said and then you said it (Freudian slips)&lt;/li&gt;
  &lt;li&gt;Loss-of-activition errors - simply forgetting to do something&lt;/li&gt;
  &lt;li&gt;Mode errors - when devices have different modes of operation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Asking for confirmation cannot catch all slips&lt;/p&gt;

&lt;p&gt;Mistakes result from the choice of inappropriate goals&lt;/p&gt;

&lt;h4 id=&quot;structure-of-tasks&quot;&gt;Structure of tasks:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Wide and deep - most games (chess)&lt;/li&gt;
  &lt;li&gt;Shallow - menu of an ice cream store&lt;/li&gt;
  &lt;li&gt;Narrow - cookbook recipe&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is not an everyday activity? Those with wide and deep structures&lt;/p&gt;

&lt;p&gt;Error is often thought of as something to be avoided or something done by unskilled or unmotivated people. But everyone makes errors&lt;/p&gt;

&lt;h4 id=&quot;forcing-functions&quot;&gt;Forcing functions:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Interlock - force operations to take place in proper sequence&lt;/li&gt;
  &lt;li&gt;Lockins - keeps an operation active, preventing someone from prematurely stopping it&lt;/li&gt;
  &lt;li&gt;Lockouts - prevents someone from entering a place that is dangerous, or prevents an event from occurring&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;a-design-philosophy&quot;&gt;A design philosophy&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Put the required knowledge in the world. Don’t require all the knowledge to be in the head. Yet do allow for more efficient operation when the user has learned the operations, has gotten the knowledge in the head&lt;/li&gt;
  &lt;li&gt;Use the power of natural and artificial constraints: physical, logical, semantic, and cultural. Use forcing functions and natural mappings&lt;/li&gt;
  &lt;li&gt;Narrow the gulfs of execution and evaluation. Make things visible, both for execution and evaluation. On the execution side, make the options readily available. On the evaluation side, make the results of each action apparent. Make it possible to determine the system state readily, easily, and accurately, and in a form consistent with the person’s goals, intentions, and expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-design-challenge&quot;&gt;The design challenge&lt;/h3&gt;

&lt;h4 id=&quot;forces-that-work-against-evolutionary-design&quot;&gt;Forces that work against evolutionary design&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Demands of time&lt;/li&gt;
  &lt;li&gt;Curse of individuality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Donald Norman uses EMACS! … and he mentions that Dvorak keyboard layout is superior… I must be doing something right.&lt;/p&gt;

&lt;p&gt;Designers are not typical users&lt;/p&gt;

&lt;p&gt;There is no such thing as the average person&lt;/p&gt;

&lt;p&gt;The ability of conscious attention is limited: focus on one thing and you reduce your attention to others&lt;/p&gt;

&lt;h4 id=&quot;two-deadly-temptations-for-the-designer&quot;&gt;Two deadly temptations for the designer:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Creeping featurism
    &lt;ul&gt;
      &lt;li&gt;Tendency to add to the number of features that a device can do, often extending the number beyond all reason&lt;/li&gt;
      &lt;li&gt;With each additional feature compes extra complexity&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Worshipping of false images
    &lt;ul&gt;
      &lt;li&gt;Most expensive does not mean best for the job&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One important method to make systems easier to learn and to use is to make them explorable, to encourage the user to experiment and learn the possibilities through active exploration&lt;/p&gt;

&lt;h4 id=&quot;exploration&quot;&gt;Exploration&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;In each state of the system, the user must readily see and be able to do the allowable actions&lt;/li&gt;
  &lt;li&gt;The effect of each action must be both visible and easy to interpret&lt;/li&gt;
  &lt;li&gt;Actions should be without cost&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;user-centered-design&quot;&gt;User Centered Design&lt;/h3&gt;

&lt;h4 id=&quot;design-should&quot;&gt;Design should:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Make it easy to determine what actions are possible at any moment&lt;/li&gt;
  &lt;li&gt;Make things visible, including the conceptual model of the system, the alternativee actions, and the results of actions&lt;/li&gt;
  &lt;li&gt;Make it easy to evaluate the current state of the system&lt;/li&gt;
  &lt;li&gt;Follow natural mappings between intentions and the required actions; between actions and the resulting effect; and between the information that is visible and the interpretation of the system state&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;seven-principles-for-transforming-difficult-tasks-into-simple-ones&quot;&gt;Seven Principles for Transforming Difficult Tasks into Simple Ones&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Use both knowledge in the world and knowledge in the head&lt;/li&gt;
  &lt;li&gt;Simplify the structure of tasks&lt;/li&gt;
  &lt;li&gt;Make things visible: bridge the gulfs of execution and evaluation&lt;/li&gt;
  &lt;li&gt;Get the mappings right&lt;/li&gt;
  &lt;li&gt;Exploit the power of constraints, both natural and artificial&lt;/li&gt;
  &lt;li&gt;Design for error&lt;/li&gt;
  &lt;li&gt;When all else fails, standardize&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Crossing the Chasm</title>
   <link href="http://davidwparker.com/2012/04/14/book-crossing-the-chasm/"/>
   <updated>2012-04-14T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/04/14/book-crossing-the-chasm</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: April 2012&lt;/li&gt;
  &lt;li&gt;Rating: 7.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0060517123?tag=parker08-20&quot;&gt;Crossing the Chasm&lt;/a&gt; by Geoffrey Moore is a classic book about marketing and selling disruptive products to mainstream customers. You’ve inevitably heard of the adoption curve: innovators, early adopters, early majority, late majority, and laggards. Geoffrey is the guy that came up with the stuff. This book should be read by anyone who wants to market dispruptive technology, whether in high-tech or not. I’m only giving the book a 7.5, mostly because I think I’ve read too much of this stuff during business school already- but it’s inevitably the source of many other materials by a number of authors and still worth reading. The book isn’t all theory- Geoffrey also provides valuable information in actually implementing things to cross the chasm without failing.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;The point of greatest peril in the development of high-tech market lies in making the transition from an early market dominated by a few visionary customers to a mainstream market dominated by a large block of customers who are predominantly pragmatists in orientation.&lt;/p&gt;

&lt;p&gt;Discontinuous (disruptive) innovations versus continuous (sustainable) innovations&lt;/p&gt;

&lt;p&gt;Innovators -&amp;gt; Early Adopters -&amp;gt; Early Majority -&amp;gt; Late Majority -&amp;gt; Laggards&lt;/p&gt;

&lt;h4 id=&quot;cracks-between&quot;&gt;Cracks between:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Innovators and Early Adopters&lt;/li&gt;
  &lt;li&gt;Early Majority and Late Majority: The early majority is willing and able to become technologically competent, where necessary; the late majority, much less so&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;chasm-between&quot;&gt;Chasm between:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Early Adopters and Early Majority&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;The early adopter is buying a change agent- they want to be the first to implement this change in their industry&lt;/li&gt;
  &lt;li&gt;The early majority want to buy a productivity improvement for existing operations- evolution, not revolution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When promoters of high-tech products try to make the transition from a market base made up of visionary early adopters to penetrate the next adoption segment, the pragmatist early majority, they are effectively operating without a reference base and without a support base within a market that is highly reference oriented and highly support oriented&lt;/p&gt;

&lt;p&gt;Managers need to recognize that there is something fundamentally different between a sale to an early adopter and a sale to the early majority, even when the company name on the check reads the same&lt;/p&gt;

&lt;p&gt;Marketing = taking actions to create, grow, maintain, or defend markets&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Early market = Innovators and early adopters&lt;/li&gt;
  &lt;li&gt;Mainstream market = Early majority and late majority&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;innovators---technology-enthusiasts&quot;&gt;Innovators - Technology Enthusiasts&lt;/h3&gt;

&lt;p&gt;Ones who really appreciate your product, will spend hours with it, will forgive its terrible documentation, slow performance, and more&lt;/p&gt;

&lt;h4 id=&quot;the-need&quot;&gt;The need:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;the truth, without tricks&lt;/li&gt;
  &lt;li&gt;access to knowledgeable person(s) to answer their questions&lt;/li&gt;
  &lt;li&gt;ability to be first to get the new stuff&lt;/li&gt;
  &lt;li&gt;want to get it cheap&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Easy to do business with, assuming you have latest and greatest technology and don’t need to make much money&lt;/p&gt;

&lt;h3 id=&quot;early-adopters---visionaries&quot;&gt;Early Adopters - Visionaries&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Driven by a dream, not the technology itself&lt;/li&gt;
  &lt;li&gt;Looking for breakthroughs, not improvements&lt;/li&gt;
  &lt;li&gt;Derives value from the strategic leap forward technology enables, but not the technology itself&lt;/li&gt;
  &lt;li&gt;Least price-sensitive segment&lt;/li&gt;
  &lt;li&gt;Hard to please&lt;/li&gt;
  &lt;li&gt;In a hurry&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You must be able to have management of expectations with them&lt;/p&gt;

&lt;h3 id=&quot;problems-of-early-market&quot;&gt;Problems of Early Market&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Company has no expertise&lt;/li&gt;
  &lt;li&gt;Company sells the visionary before it has a product (vaporware)&lt;/li&gt;
  &lt;li&gt;Failure to communicate leap in benefits&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;early-majority---pragmatists&quot;&gt;Early Majority - Pragmatists&lt;/h3&gt;

&lt;p&gt;Risk is a negative word in their vocabulary&lt;/p&gt;

&lt;h4 id=&quot;when-buying&quot;&gt;When buying:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;They care about the company&lt;/li&gt;
  &lt;li&gt;They care about the quality of the product&lt;/li&gt;
  &lt;li&gt;They care about the infrastructure of supporting products and system interfaces&lt;/li&gt;
  &lt;li&gt;They care about the reliability of the service they are going to get&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Want a market-leading product, due to its aftermarket vendors services&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Price sensitive&lt;/li&gt;
  &lt;li&gt;Requires patience&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;late-majority---conservatives&quot;&gt;Late Majority - Conservatives&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;They find something that works for them, and stick with it&lt;/li&gt;
  &lt;li&gt;Fear high tech a little&lt;/li&gt;
  &lt;li&gt;Like preassembled packages, with everything bundled, at a heavily discounted price&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;how-to-lose-a-mainstream-market&quot;&gt;How to lose a mainstream market&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Stop investing in the market, cease R&amp;amp;D to match the competition, and milk it for money to invest elsewhere&lt;/li&gt;
  &lt;li&gt;Shoot yourself in the flagship product&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;laggards---skeptics&quot;&gt;Laggards - Skeptics&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;They exist to block purchases&lt;/li&gt;
  &lt;li&gt;Neutralize their influence&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;four-fundamental-characteristics-of-visionaries-that-alienate-pragmatists&quot;&gt;Four fundamental characteristics of visionaries that alienate pragmatists&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Lack of respect for the value of colleagues’ experiences&lt;/li&gt;
  &lt;li&gt;Greater interest in technology than industry&lt;/li&gt;
  &lt;li&gt;Failure to recognize the importance of existing product infrastructure&lt;/li&gt;
  &lt;li&gt;Overall disruptiveness&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;perils-of-the-chasm&quot;&gt;Perils of the Chasm&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Lack of new customers&lt;/li&gt;
  &lt;li&gt;To enter the mainstream market is an act of aggression&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cross the chasm by targeting a very specific niche market where you can dominate from the outset, force your competitors out of that market niche, and then use it as a base for broader operations&lt;/p&gt;

&lt;p&gt;Most companies fail to cross the chasm because they lose their focus, chasing every opportunity that presents itself, but finding themselves unable to deliver a salable proposition to any true pragmatist buyer&lt;/p&gt;

&lt;p&gt;The consequences of being sales-driven during the chasm period are fatal&lt;/p&gt;

&lt;p&gt;Achieve market leadership&lt;/p&gt;

&lt;p&gt;Applications are naturally vertical&lt;/p&gt;

&lt;p&gt;Platforms are naturally horizontal&lt;/p&gt;

&lt;p&gt;Make a total commitment to the niche, and then do your best to meet everyone else’s needs with whatever resources you have left over&lt;/p&gt;

&lt;p&gt;When markets go mass, platforms have the advantage&lt;/p&gt;

&lt;p&gt;“If you don’t know where you are going, you probably aren’t going to get there”&lt;/p&gt;

&lt;p&gt;You have to make a high-risk, low data decision&lt;/p&gt;

&lt;p&gt;You need to understand that informed intuition, rather than analytical reason, is the most trustworthy decision-making tool to use&lt;/p&gt;

&lt;p&gt;Use characterizations&lt;/p&gt;

&lt;h3 id=&quot;market-development-strategy-checklist&quot;&gt;Market Development Strategy Checklist&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Target customer&lt;/li&gt;
  &lt;li&gt;Compelling reason to buy&lt;/li&gt;
  &lt;li&gt;Whole product&lt;/li&gt;
  &lt;li&gt;Partners and allies&lt;/li&gt;
  &lt;li&gt;Distribution&lt;/li&gt;
  &lt;li&gt;Pricing&lt;/li&gt;
  &lt;li&gt;Competition&lt;/li&gt;
  &lt;li&gt;Positioning&lt;/li&gt;
  &lt;li&gt;Next target customer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Commit to one- and only one- beachhead target&lt;/p&gt;

&lt;h4 id=&quot;show-stopper-issues-for-crossing-the-chasm&quot;&gt;Show stopper issues for crossing the chasm:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Target customer&lt;/li&gt;
  &lt;li&gt;Compelling reason to buy&lt;/li&gt;
  &lt;li&gt;Whole Product&lt;/li&gt;
  &lt;li&gt;Competition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Chasm-crosing is not the end, but rather the beginning, of mainstream market development&lt;/p&gt;

&lt;h3 id=&quot;target-market-selection-process&quot;&gt;Target Market Selection Process&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Develop a library of target-customer scenarios&lt;/li&gt;
  &lt;li&gt;Appoint subcommittee to make the target market selection&lt;/li&gt;
  &lt;li&gt;Number and publish the scenarios in a one-page per scenario format&lt;/li&gt;
  &lt;li&gt;Each member of the subcommittee to privately rate each scenario&lt;/li&gt;
  &lt;li&gt;Rank order the results&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;the-whole-product-model&quot;&gt;The Whole Product Model&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Generic Product&lt;/li&gt;
  &lt;li&gt;Expected Product&lt;/li&gt;
  &lt;li&gt;Augmented Product&lt;/li&gt;
  &lt;li&gt;Potential Product&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think about anything you would need to achieve your compelling reason to buy&lt;/p&gt;

&lt;p&gt;Any force can defeat any other force- if it can define the battle&lt;/p&gt;

&lt;p&gt;Your goal is to position your product as the indisputable correct buying choice&lt;/p&gt;

&lt;h4 id=&quot;four-domains-of-value-in-high-tech-marketing&quot;&gt;Four domains of value in high-tech marketing:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Technology - technology enthusiasts&lt;/li&gt;
  &lt;li&gt;Product - visionaries&lt;/li&gt;
  &lt;li&gt;Market - pragmatist&lt;/li&gt;
  &lt;li&gt;Company - conservative&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make products easier to buy, rather than easier to sell&lt;/p&gt;

&lt;h4 id=&quot;positioning&quot;&gt;Positioning:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;is a noun, not a verb&lt;/li&gt;
  &lt;li&gt;single largest influence on the buying decision&lt;/li&gt;
  &lt;li&gt;exists in people’s heads, not in your words&lt;/li&gt;
  &lt;li&gt;people are highly conservative about changes in positioning&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;positioning-process&quot;&gt;Positioning process:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Claim&lt;/li&gt;
  &lt;li&gt;Evidence&lt;/li&gt;
  &lt;li&gt;Communications&lt;/li&gt;
  &lt;li&gt;Feedback and adjustment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Positioning with an elevator pitch&lt;/p&gt;

&lt;h4 id=&quot;high-tech-distribution-channels&quot;&gt;High-tech distribution channels:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Direct sales&lt;/li&gt;
  &lt;li&gt;Two-tier retail&lt;/li&gt;
  &lt;li&gt;One-tier retail&lt;/li&gt;
  &lt;li&gt;Internet retail&lt;/li&gt;
  &lt;li&gt;Two-tier value-added reselling&lt;/li&gt;
  &lt;li&gt;National roll-ups&lt;/li&gt;
  &lt;li&gt;OEMs&lt;/li&gt;
  &lt;li&gt;System Integrators&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;distribution-oriented-pricing&quot;&gt;Distribution-oriented Pricing&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Customer-oriented pricing&lt;/li&gt;
  &lt;li&gt;Vendor-oriented pricing&lt;/li&gt;
  &lt;li&gt;Distribution-oriented pricing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;beyond-the-chasm&quot;&gt;Beyond the Chasm&lt;/h3&gt;

&lt;p&gt;Hockey stick curves are created by spreadsheets, a software tool that many have argued has driven some of the worst investment decisions of the past two decades&lt;/p&gt;

&lt;p&gt;The discipline of profitability teaches you to “just say no” early and often&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: 59 Seconds</title>
   <link href="http://davidwparker.com/2012/04/08/book-59-seconds/"/>
   <updated>2012-04-08T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/04/08/book-59-seconds</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: April 2012&lt;/li&gt;
  &lt;li&gt;Rating: 7.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0307273407?tag=parker08-20&quot;&gt;59 Seconds&lt;/a&gt; by Richard Wiseman is a different take on psychology, self-help, and productivity-type books. Rather than saying “you’re wrong, you should be doing X,” Richard shows through actual scientific studies what the best things to do for a variety of things. Imagine that- using science rather than just making up stuff. Additionally, Richard gives the reader actual things that they can implement in order to take the information to heart. This is definitely worth the read if you’re into this kind of stuff.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;happiness&quot;&gt;Happiness&lt;/h3&gt;

&lt;p&gt;Happiness doesn’t just flow from success; it actually causes it&lt;/p&gt;

&lt;p&gt;Expressing gratitude, thinking about a perfect future, and affection writing have been scientifically proven to work (improve happiness)&lt;/p&gt;

&lt;p&gt;Buy experiences, not goods&lt;/p&gt;

&lt;p&gt;Smile&lt;/p&gt;

&lt;h3 id=&quot;persuasion&quot;&gt;Persuasion&lt;/h3&gt;

&lt;p&gt;Excessive rewards can even have a detrimental effect on tasks that people don’t enjoy&lt;/p&gt;

&lt;p&gt;Those offered a carrot tend not to perform as well as those who don’t expect to receive anything&lt;/p&gt;

&lt;p&gt;Job interviews =&amp;gt; did the candidate appear to be a pleasant person?&lt;/p&gt;

&lt;p&gt;Presenting weaknesses can be seen as a sign of openness, but say them earlier, not later&lt;/p&gt;

&lt;p&gt;Be generous with your time, resources, and skills&lt;/p&gt;

&lt;p&gt;Spontaneous trait transference = when you gossip about another person, listeners unconsciously associate you with the characteristics you are describing, ultimately leading to those characteristics’ being “transferred” to you&lt;/p&gt;

&lt;p&gt;Bystander effect = the more people who around when a person is apparently in need of assistance, the lower the likelihood that any one person will actually help&lt;/p&gt;

&lt;h3 id=&quot;motivation&quot;&gt;Motivation&lt;/h3&gt;

&lt;p&gt;Fantasizing your perfect world may make you feel better (happiness, see above), but it is unlikely to help you transform your dreams into reality&lt;/p&gt;

&lt;p&gt;Having the perfect plan, knowing how to beat procrastination, and employing a strange form of double think will help (motivate)&lt;/p&gt;

&lt;p&gt;Break goals into subgoals, with step-by-step processes&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Remove Fear and hesitation&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;subgoals-should-be&quot;&gt;Subgoals should be:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Concrete&lt;/li&gt;
  &lt;li&gt;Measurable&lt;/li&gt;
  &lt;li&gt;Time-based&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tell your friends, family, and colleagues about your goals&lt;/p&gt;

&lt;p&gt;Remind yourself frequently of the benefits associated with achieving your goals&lt;/p&gt;

&lt;p&gt;Issue yourself a reward for being successful in your goals (and subgoals)&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Ensure the reward doesn’t conflict with the goal itself (no cake when dieting successfully, for example)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Express goals, plans, benefits, and rewards in writing&lt;/p&gt;

&lt;h4 id=&quot;chronic-procrastinators-me-causes&quot;&gt;Chronic procrastinators (me!) causes:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Fear of failure&lt;/li&gt;
  &lt;li&gt;Perfectionism&lt;/li&gt;
  &lt;li&gt;Low levels of self-control&lt;/li&gt;
  &lt;li&gt;Tendency to see projects as a whole rather than breaking them into smaller parts&lt;/li&gt;
  &lt;li&gt;Being prone to boredom&lt;/li&gt;
  &lt;li&gt;Feeling that life is too short to worry about seemingly unimportant tasks&lt;/li&gt;
  &lt;li&gt;Inability to accurately estimate how long it takes to do things&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Starting an activity causes your mind to experience a kind of psychic anxiety (to finish the activity)&lt;/p&gt;

&lt;p&gt;Visualize the process of doing a task&lt;/p&gt;

&lt;h4 id=&quot;process&quot;&gt;Process&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Think about something you want to achieve&lt;/li&gt;
  &lt;li&gt;Spend a few moments thinking about reaching the goal and the top two benefits of the achievement&lt;/li&gt;
  &lt;li&gt;Same, with top two barriers and problems&lt;/li&gt;
  &lt;li&gt;Doublethink: reflect on the first benefit&lt;/li&gt;
  &lt;li&gt;Immediately think of biggest hurdle to success and what you can do if you encounter the hurdle&lt;/li&gt;
  &lt;li&gt;Same with second benefit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think about how much you will regret not accomplishing your goal&lt;/p&gt;

&lt;h3 id=&quot;creativity&quot;&gt;Creativity&lt;/h3&gt;

&lt;p&gt;Work alone, not in groups&lt;/p&gt;

&lt;p&gt;Think about your problem, then jump to a different hard, analytic task (Sudoku, etc), then go back to list possible solutions to your problem&lt;/p&gt;

&lt;p&gt;Add flowers and plants (real ones!) to your office&lt;/p&gt;

&lt;p&gt;Visually prime yourself&lt;/p&gt;

&lt;h3 id=&quot;attraction&quot;&gt;Attraction&lt;/h3&gt;

&lt;p&gt;How much we desire and treasure an object depends, in part, on how easy it is to obtain&lt;/p&gt;

&lt;p&gt;If you want to get someone to help you out, try the briefest of touches on the upper arm&lt;/p&gt;

&lt;p&gt;Want bigger tips? Repeat the order back to your customers&lt;/p&gt;

&lt;h3 id=&quot;relationships&quot;&gt;Relationships&lt;/h3&gt;

&lt;p&gt;Activities associated with early courtship can help rekindle past passions&lt;/p&gt;

&lt;p&gt;Do novel and exciting joint activities&lt;/p&gt;

&lt;p&gt;Cover her eyes and lead her to a lovely surprise; whisk her away somewhere exciting for the weekend&lt;/p&gt;

&lt;p&gt;“A woman’s flattery may inflate a man’s head a little, but her criticism goes straight to his heart, and contracts it so that it can never again hold quite so much love for her” - Helen Rowland&lt;/p&gt;

&lt;p&gt;Positive comments have to outweight negative remarks by five to one&lt;/p&gt;

&lt;p&gt;Surround yourself with objects that remind you of your partner&lt;/p&gt;

&lt;h3 id=&quot;stress&quot;&gt;Stress&lt;/h3&gt;

&lt;p&gt;The venting of anger does not extinguish the flame&lt;/p&gt;

&lt;p&gt;Behave in a way that is incompatible with being angry&lt;/p&gt;

&lt;p&gt;Benefit finding = focus on the benefits that flowed from the experience&lt;/p&gt;

&lt;p&gt;Pray for others&lt;/p&gt;

&lt;p&gt;Get out in the Sun&lt;/p&gt;

&lt;p&gt;Get a dog&lt;/p&gt;

&lt;h3 id=&quot;decision-making&quot;&gt;Decision Making&lt;/h3&gt;

&lt;p&gt;Being in a group exaggerates people’s opinions, causing them to make a more extreme decision than they would on their own&lt;/p&gt;

&lt;p&gt;When being marketed to, or while marketing, remember “that’s not all…” (+free)&lt;/p&gt;

&lt;p&gt;Get your foot in the door (start small and build up)&lt;/p&gt;

&lt;p&gt;People who are shown the options but then kept busy working on a difficult mental activity make better decisions than others do&lt;/p&gt;

&lt;h4 id=&quot;containing-regret-of-a-missed-opportunity&quot;&gt;Containing regret (of a missed opportunity):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Adapt a will do attitude&lt;/li&gt;
  &lt;li&gt;Remedy the situation (if possible)&lt;/li&gt;
  &lt;li&gt;Use the regret as a wake-up call&lt;/li&gt;
  &lt;li&gt;Think about the negative things that could have happened if you did the activity (or didn’t) and focus on the positives that came from the missed opportunity&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;lying-isnt-like-it-is-in-the-movies-instead-look-for&quot;&gt;Lying isn’t like it is in the movies. Instead, look for:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;not moving arms and legs&lt;/li&gt;
  &lt;li&gt;cutting down of gestures&lt;/li&gt;
  &lt;li&gt;repeating the same phrases&lt;/li&gt;
  &lt;li&gt;short and less detailed answers&lt;/li&gt;
  &lt;li&gt;taking longer to answer&lt;/li&gt;
  &lt;li&gt;pauses and hesitation&lt;/li&gt;
  &lt;li&gt;more uses of him and her, and less of I, me, and mine&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;parenting&quot;&gt;Parenting&lt;/h3&gt;

&lt;p&gt;Listening to Mozart won’t make your kid smarter long-term&lt;/p&gt;

&lt;p&gt;Self-discipline and thinking through music lessons will (help with intelligence)&lt;/p&gt;

&lt;p&gt;Watch out for naming your kid with letters C or D, which are correlated to lower grades than those named with A or B&lt;/p&gt;

&lt;p&gt;Children told they were intelligent are less likely to do challenging activities, and perform worst
Instead, praise your children on their effort and how hard they try&lt;/p&gt;

&lt;h3 id=&quot;personality&quot;&gt;Personality&lt;/h3&gt;

&lt;h4 id=&quot;the-big-five-ocean&quot;&gt;The big five (OCEAN):&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Openness
    &lt;ul&gt;
      &lt;li&gt;Appreciates new, interesting, and unusual experiences&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Conscientiousness
    &lt;ul&gt;
      &lt;li&gt;Organization, persistence, and self-discipline to achieve goals&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Extroversion
    &lt;ul&gt;
      &lt;li&gt;Need for stimulation from the outside world and other people&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Agreeableness
    &lt;ul&gt;
      &lt;li&gt;Degree to which a person cares about others&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Neuroticism
    &lt;ul&gt;
      &lt;li&gt;Emotionally stability and ability to cope with potentially stressful situations&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;ten-techniques-in-59-seconds&quot;&gt;Ten techniques in 59 seconds:&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Develop the gratitude attitude&lt;/li&gt;
  &lt;li&gt;Be a giver&lt;/li&gt;
  &lt;li&gt;Hang a mirror in your kitchen&lt;/li&gt;
  &lt;li&gt;Buy a potted plant for the office&lt;/li&gt;
  &lt;li&gt;Touch people lightly on th upper arm&lt;/li&gt;
  &lt;li&gt;Write about your relationship&lt;/li&gt;
  &lt;li&gt;Deal with potential liars by closing your eyes and asking for an email&lt;/li&gt;
  &lt;li&gt;Praise children’s effort over their ability&lt;/li&gt;
  &lt;li&gt;Visualize yourself doing, not achieving&lt;/li&gt;
  &lt;li&gt;Consider your legacy&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Pro Git</title>
   <link href="http://davidwparker.com/2012/03/30/book-pro-git/"/>
   <updated>2012-03-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/03/30/book-pro-git</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: March 2012&lt;/li&gt;
  &lt;li&gt;Rating: 9.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1430218339?tag=parker08-20&quot;&gt;Pro Git&lt;/a&gt; by Scott Chacon is the best way to really learn Git. Scott has obviously been using Git for a very long time, and he knows the internals, backwards and forwards. If you don’t know the difference between rebase and merge or when to use what command, then you should read this book. Knowing how to use your tools to the best of your ability is incredibly important, and Git is no exception. The book can also be read free online at: &lt;a href=&quot;http://progit.org/book/&quot;&gt;http://progit.org/book/&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;I’m not really going to get into the pros/cons or the history of Git here, mostly just technical notes. Feel free to check out “why Git is better than X”:http://whygitisbetterthanx.com/ if you’re interested in pros/cons.&lt;/p&gt;

&lt;h3 id=&quot;setting-up-git&quot;&gt;Setting up Git:&lt;/h3&gt;

&lt;h4 id=&quot;modify-configuration-file&quot;&gt;Modify configuration file:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;~/.gitconfig OR .gitconfig in $HOME on Windows&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;identity&quot;&gt;Identity:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git config –global user.name “David Parker”&lt;/li&gt;
  &lt;li&gt;git config –global user.email davidwparker@gmail.com&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;editor&quot;&gt;Editor:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git config –global core.editor emacs&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;check-settings&quot;&gt;Check Settings&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git config –list&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;getting-help&quot;&gt;Getting Help:&lt;/h3&gt;

&lt;h4 id=&quot;any-of-the-following-commands-work&quot;&gt;Any of the following commands work:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git help &lt;verb&gt;&lt;/verb&gt;&lt;/li&gt;
  &lt;li&gt;git &lt;verb&gt; --help&lt;/verb&gt;&lt;/li&gt;
  &lt;li&gt;man git-&lt;verb&gt;&lt;/verb&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;creating-a-repository&quot;&gt;Creating a repository:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git init&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;cloning-a-repository&quot;&gt;Cloning a repository:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git clone &lt;url&gt; &lt;optional different=&quot;&quot; directory=&quot;&quot;&gt;&lt;/optional&gt;&lt;/url&gt;&lt;/li&gt;
  &lt;li&gt;git clone https://github.com/davidwparker/opengl-3defense.git &lt;optional different=&quot;&quot; directory=&quot;&quot;&gt;
&lt;/optional&gt;    &lt;ul&gt;
      &lt;li&gt;This will clone a git repository into your working directory in directory opengl-3defense&lt;/li&gt;
      &lt;li&gt;Or add a different directory by adding the directory name after the &lt;url&gt;&lt;/url&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;checking-the-status-of-files&quot;&gt;Checking the status of files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git status&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;lifecycle-status-of-files&quot;&gt;Lifecycle (status) of files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;untracked&lt;/td&gt;
          &lt;td&gt;unmodified&lt;/td&gt;
          &lt;td&gt;modified&lt;/td&gt;
          &lt;td&gt;staged&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;untracked =&amp;gt; add =&amp;gt; unmodified&lt;/li&gt;
  &lt;li&gt;unnmodified =&amp;gt; remove =&amp;gt; untracked&lt;/li&gt;
  &lt;li&gt;unmodified =&amp;gt; edit =&amp;gt; modified&lt;/li&gt;
  &lt;li&gt;modified =&amp;gt; stage =&amp;gt; staged&lt;/li&gt;
  &lt;li&gt;staged =&amp;gt; commit =&amp;gt; unmodified&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;adding-files&quot;&gt;Adding files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git add &lt;filename&gt; OR git add *.&lt;type&gt;&lt;/type&gt;&lt;/filename&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;commit-new-files&quot;&gt;Commit new files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git commit&lt;/li&gt;
  &lt;li&gt;git commit -m ‘inline commit message’&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;staged-files&quot;&gt;Staged files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;A staged file is a file that has previously been committed and has since been changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;commit-staged-files&quot;&gt;Commit staged files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Same as commit new files&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;ignoring-files&quot;&gt;Ignoring files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;touch .gitignore&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;the-rules-for-the-patterns-of-what-can-be-in-the-gitignore-file&quot;&gt;The rules for the patterns of what can be in the .gitignore file:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Blank lines or lines starting with # are ignored&lt;/li&gt;
  &lt;li&gt;Standard glob patterns work&lt;/li&gt;
  &lt;li&gt;You can end patterns with a forward slash (/) to specify a directory&lt;/li&gt;
  &lt;li&gt;You can negate a pattern by starting with an exclamation point (!)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;diffing-files&quot;&gt;Diff’ing files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git diff
    &lt;ul&gt;
      &lt;li&gt;git diff is used for multiple reasons, but the most common is to see what has changed but not yet staged.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;git diff –staged
    &lt;ul&gt;
      &lt;li&gt;If you’ve added files to staging, and you’d like to see what the diff of those changes, simply use the following:&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;removing-files&quot;&gt;Removing files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git rm &lt;file&gt;
&lt;/file&gt;    &lt;ul&gt;
      &lt;li&gt;Note that the file is removed from the filesystem as well (can be kept with –cached flag)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;move-files&quot;&gt;Move files:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git mv &lt;file&gt; &lt;newfile&gt;
&lt;/newfile&gt;&lt;/file&gt;    &lt;ul&gt;
      &lt;li&gt;This is the same as running the commands: git rm –cached orig; mv orig new; git add new&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;logging&quot;&gt;Logging:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git log
    &lt;ul&gt;
      &lt;li&gt;By default, git log lists commits in a repository in reverse chronological order.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;other-awesome-logging-stuff&quot;&gt;Other awesome logging stuff:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;–pretty=format:”YOUR FORMAT”
    &lt;ul&gt;
      &lt;li&gt;Very powerful way to specify own log output format&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;-p =&amp;gt; shows diff introduced in each commit&lt;/li&gt;
  &lt;li&gt;-# =&amp;gt; shows only the last # commits.&lt;/li&gt;
  &lt;li&gt;–oneline =&amp;gt; shows commits one one line
    &lt;ul&gt;
      &lt;li&gt;git log –oneline&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;many, many more!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;undoing-changes&quot;&gt;Undoing changes:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Changing last commit:
    &lt;ul&gt;
      &lt;li&gt;git commit –amend&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Unstaging a staged file:
    &lt;ul&gt;
      &lt;li&gt;git reset HEAD &lt;filename&gt;&lt;/filename&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Unmodify a modified file:
    &lt;ul&gt;
      &lt;li&gt;git checkout – &lt;filename&gt;&lt;/filename&gt;&lt;/li&gt;
      &lt;li&gt;Warning: this overwrites the file, so you will lose any changes that you made. You sparingly.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;working-with-remote&quot;&gt;Working with remote:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git remote
    &lt;ul&gt;
      &lt;li&gt;You can also see the URL git has stored:&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;git remote -v&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;add-remote&quot;&gt;Add remote:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git remote add &lt;shortname&gt; &lt;url&gt;&lt;/url&gt;&lt;/shortname&gt;&lt;/li&gt;
  &lt;li&gt;git remote add origin git@github.com:davidwparker/git.git&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;push-remote&quot;&gt;Push remote:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git push &lt;remote name=&quot;&quot;&gt; &lt;branch name=&quot;&quot;&gt;&lt;/branch&gt;&lt;/remote&gt;&lt;/li&gt;
  &lt;li&gt;git push origin master
    &lt;ul&gt;
      &lt;li&gt;Pushing will be rejected if someone else has since pushed upstream&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;fetch-remote&quot;&gt;Fetch remote:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git fetch origin
    &lt;ul&gt;
      &lt;li&gt;Fetching from a remote will pull down data you don’t have yet.&lt;/li&gt;
      &lt;li&gt;It pulls the data into your local repository, but it doesn’t automatically merge it with any of your work, or modify what you’re currently working on.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;changing-remote&quot;&gt;Changing remote:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git remote rename &lt;old&gt; &lt;new&gt;
&lt;/new&gt;&lt;/old&gt;    &lt;ul&gt;
      &lt;li&gt;You can easily rename a remote&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;git remote rm &lt;name&gt;
&lt;/name&gt;    &lt;ul&gt;
      &lt;li&gt;Or remove a remote&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;tagging&quot;&gt;Tagging:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Tagging allows Git to forever remember a snapshot of a repository.&lt;/li&gt;
  &lt;li&gt;There are two types of tags in Git:&lt;/li&gt;
  &lt;li&gt;Lightweight: a pointer to a specific commit&lt;/li&gt;
  &lt;li&gt;Annotated: full objects in the Git database&lt;/li&gt;
  &lt;li&gt;It is recommended to use annotated tags.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;annotated-tag&quot;&gt;Annotated tag:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git tag -a &lt;tagname&gt; -m 'a message'&lt;/tagname&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;list-tags&quot;&gt;List tags:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git tag&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;signed-tag&quot;&gt;Signed tag:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git tag -s &lt;tagname&gt; -m 'a message'
&lt;/tagname&gt;    &lt;ul&gt;
      &lt;li&gt;This uses GPG (GNU Privacy Guard)&lt;/li&gt;
      &lt;li&gt;The GPG signature can be seen using:&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;git show &lt;tagname&gt;&lt;/tagname&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;you-can-verify-a-signed-tag-as-long-as-you-have-the-signers-public-key&quot;&gt;You can verify a signed tag as long as you have the signer’s public key:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git tag -v &lt;tagname&gt;&lt;/tagname&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;lightweight-tag&quot;&gt;Lightweight tag:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git tag &lt;tagname&gt;
&lt;/tagname&gt;    &lt;ul&gt;
      &lt;li&gt;This will create a lightweight tag. Lightweight tags cannot use the -a, -s, or -m flags.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;tagging-later&quot;&gt;Tagging later:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git log –pretty=oneline
    &lt;ul&gt;
      &lt;li&gt;If you forgot to tag, you can check your commits with:&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;git tag -a &lt;tagname&gt; &lt;checksum&gt;
&lt;/checksum&gt;&lt;/tagname&gt;    &lt;ul&gt;
      &lt;li&gt;And then tag using the checksum:&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;pushing-tags&quot;&gt;Pushing tags:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Tags aren’t pushed when doing a push, you need to specify them
    &lt;ul&gt;
      &lt;li&gt;git push origin &lt;tagname&gt;&lt;/tagname&gt;&lt;/li&gt;
      &lt;li&gt;git push origin –tags&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Use the latter to push all tags&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;branching&quot;&gt;Branching:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;One of Git’s most powerful features is its branches.&lt;/li&gt;
  &lt;li&gt;Git’s branches are incredibly lightweight, and it is nearly instantaneous to switch back and forth between branches.&lt;/li&gt;
  &lt;li&gt;Git encourages a workflow that branches and merges often, even multiple times a day.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;why-branch&quot;&gt;Why Branch?&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;A realistic workflow may be as follows:
    &lt;ul&gt;
      &lt;li&gt;Working on an app&lt;/li&gt;
      &lt;li&gt;Create a branch for a story you’re working on&lt;/li&gt;
      &lt;li&gt;Do some work&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Then, you get a call for critical hotfix needed:
    &lt;ul&gt;
      &lt;li&gt;Revert back to production branch&lt;/li&gt;
      &lt;li&gt;Create branch for hotfix&lt;/li&gt;
      &lt;li&gt;Test hotfix and merge the branch, push to production&lt;/li&gt;
      &lt;li&gt;Switch back to original story and continue work&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;creating-a-branch&quot;&gt;Creating a branch:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git branch &lt;branch name=&quot;&quot;&gt;
&lt;/branch&gt;    &lt;ul&gt;
      &lt;li&gt;This creates a pointer to the same commit you’re currently on.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;list-branches&quot;&gt;List branches:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git branch&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;switching-branches&quot;&gt;Switching branches:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git checkout &lt;branch name=&quot;&quot;&gt;&lt;/branch&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;checkout-a-branch-when-creating&quot;&gt;Checkout a branch when creating:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git checkout -b &lt;branch name=&quot;&quot;&gt;&lt;/branch&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;delete-branches&quot;&gt;Delete branches:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git branch -d &lt;branch name=&quot;&quot;&gt;&lt;/branch&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;merging-branches-fast-forward&quot;&gt;Merging branches (fast forward):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;git merge &lt;branch name=&quot;&quot;&gt;&lt;/branch&gt;&lt;/li&gt;
  &lt;li&gt;If you don’t edit a branch, and then merge another branch where you have changed things, then Git performs a fast forward.&lt;/li&gt;
  &lt;li&gt;If you do edit a branch, and then merge another branch where you also have made edits, then Git performs a three-way merge: the common ancestor snapshot, the merged branch, and the merging branch.&lt;/li&gt;
  &lt;li&gt;If you edit a branch, and attempt to merge another branch where you have edited the same part of the same file, you may end up with a conflict.
    &lt;ul&gt;
      &lt;li&gt;You can see what has changes with git status&lt;/li&gt;
      &lt;li&gt;Open this file in your editor and you can see where the conflict is:&lt;/li&gt;
      &lt;li&gt;Changes made in HEAD are above ======= and changes made in branch are below.&lt;/li&gt;
      &lt;li&gt;After you change the file as you like, remove thing «««&amp;lt;, =======, and »»»&amp;gt; lines, then you can add the file normally with git add.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;branching-log&quot;&gt;Branching (log):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Now that we have merged, if we do a log, we can actually see the branches (in ASCII, on the left):&lt;/li&gt;
  &lt;li&gt;git log –pretty=oneline –graph&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;branching-tricks&quot;&gt;Branching tricks:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;You can easily see what branches you have already merged with your current branch:
    &lt;ul&gt;
      &lt;li&gt;git branch –merged&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Or not merged:
    &lt;ul&gt;
      &lt;li&gt;git branch –no-merged&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;remote-branches&quot;&gt;Remote branches:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Remote branches work similarly to local branches, except that they take the form &lt;origin&gt;/&lt;branch&gt;.&lt;/branch&gt;&lt;/origin&gt;&lt;/li&gt;
  &lt;li&gt;In general, you must remember to “git fetch” from remote to get the latest.&lt;/li&gt;
  &lt;li&gt;From there, you don’t get that work in your working directory, but you can merge it with “git merge origin/&lt;new branch=&quot;&quot;&gt;&quot;&lt;/new&gt;&lt;/li&gt;
  &lt;li&gt;And you must “git push” to push the latest to the remote repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;rebasing&quot;&gt;Rebasing:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Rebasing is another tool that allows you to integrate changes from one branch to another.&lt;/li&gt;
  &lt;li&gt;Rebasing allows you to take all the changes that were committed on one branch and replay them on another branch.&lt;/li&gt;
  &lt;li&gt;At this point, you can go back to master and fast forward.&lt;/li&gt;
  &lt;li&gt;Flow:
    &lt;ul&gt;
      &lt;li&gt;git checkout rebased&lt;/li&gt;
      &lt;li&gt;git rebase master&lt;/li&gt;
      &lt;li&gt;git merge rebased&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The most often usecase for rebase is to make sure your commits apply cleanly to a remote branch.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Rebasing is great for cleaning up when you have made a ton of ‘unnecessary’ commits.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;If you follow the previous workflow, you’ll be ok.&lt;/li&gt;
  &lt;li&gt;Otherwise, a warning: do not rebase commits that you have pushed to a public repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you rebase, you’re abandoning existing commits and creating new ones that are similar but different.&lt;/p&gt;

&lt;p&gt;Only rebase commits that you haven’t push publicly.&lt;/p&gt;

&lt;h4 id=&quot;git-on-the-server&quot;&gt;Git on the Server:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;To run a Git server, all you need is to choose protocols you want your server to communicate with:
    &lt;ul&gt;
      &lt;li&gt;Local&lt;/li&gt;
      &lt;li&gt;SSH&lt;/li&gt;
      &lt;li&gt;Git&lt;/li&gt;
      &lt;li&gt;HTTP(S)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s much more on specific Git tools, including revision selection, interactive staging, stashing, rewriting history, debugging, submodules, subtree merging, Git configuration, Git attributes, and Git hooks, which I won’t be blogging about here. I personally don’t use a lot of these (right now), with the exception of stashing.&lt;/p&gt;

&lt;p&gt;The chapter on Git internals is also very interesting, which discusses plumbing and porcelain, Git Objects, Git References, packfiles, and more. It’s also worth checking out if you’d like to see what the git commands are really doing.&lt;/p&gt;

&lt;p&gt;In all, I can’t recommend the book enough, especially for those interested in, or those who use but don’t really understand, Git.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: No B.S. Time Management for Entrepreneurs</title>
   <link href="http://davidwparker.com/2012/03/27/book-no-bs-time-management-for-entrepreneurs/"/>
   <updated>2012-03-27T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/03/27/book-no-bs-time-management-for-entrepreneurs</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: March 2012&lt;/li&gt;
  &lt;li&gt;Rating: 7.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1932156852?tag=parker08-20&quot;&gt;No B.S. Time Management for Entrepreneurs&lt;/a&gt; by Dan Kenney is a very practical book on time management for entrepreneurs. That said, I can’t say that the book is for everyone. While I enjoyed it, Dan isn’t exactly all there in terms of what’s going on today (Internet, smart phones, etc) and he can come across as very unequitable. But I’d be willing to bet he is extremely productive due to ignoring said technologies, and he doesn’t make up excuses if and when life isn’t fair to him. Enough about Dan, let’s get into some notes from the actual book.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;You need your own philosophy of valuing time&lt;/p&gt;

&lt;p&gt;Is what I’m doing worth $XYZ an hour to do it?&lt;/p&gt;

&lt;p&gt;It helps you quantify what is going on in your life&lt;/p&gt;

&lt;p&gt;Leverage is the difference between the base cost for your hour and the amount of money you get for it or from it&lt;/p&gt;

&lt;p&gt;Base earnings target / 1,760 hours worked per year = base hourly number&lt;/p&gt;

&lt;p&gt;Base hourly number x times productivity vs nonproductivity = what your time must be worth per hour&lt;/p&gt;

&lt;p&gt;Times productivity ~ 3x&lt;/p&gt;

&lt;p&gt;Most people will find ways to avoid confrontive productivity and will waste their time, even if they have to work at it&lt;/p&gt;

&lt;h4 id=&quot;put-a-stop-to-interruptions-multiply-your-productivity&quot;&gt;Put a stop to interruptions: multiply your productivity&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Get lost
    &lt;ul&gt;
      &lt;li&gt;Be inaccessible&lt;/li&gt;
      &lt;li&gt;Have a closed door policy&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Don’t answer the phone (or text, email, or IM)
    &lt;ul&gt;
      &lt;li&gt;You have absolutely no legal, moral, or other responsibility to answer the phone or take a call unless you want to&lt;/li&gt;
      &lt;li&gt;If you take inbound calls as they come, you are constantly stopping work on a task of known priority in favor of something or someone of unknown priority&lt;/li&gt;
      &lt;li&gt;Train your clientele&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Fix the fax (or email)
    &lt;ul&gt;
      &lt;li&gt;You are not obligate to respond to inbound email (or other communication) instantly, quickly, or ever&lt;/li&gt;
      &lt;li&gt;With each easier, faster means of communication, the quantity of dumb, junk communication has multiplied&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Set the timer on the bomb
    &lt;ul&gt;
      &lt;li&gt;When someone communicates with you (via phone), let them know you have a meeting in 15 minutes. Then they’re forced to get right to the point&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Be busy and be obvious about it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;“There cannot be a crisis next week. My schedule is already full” - Henry Kissinger&lt;/p&gt;

&lt;p&gt;Be punctual&lt;/p&gt;

&lt;p&gt;You cannot reasonably hope to have others treat your time with respect if you show little or no respect for theirs&lt;/p&gt;

&lt;p&gt;People who can’t be punctual, can’t be trusted&lt;/p&gt;

&lt;p&gt;Self-discipline is the magic power that makes you virtually unstoppable&lt;/p&gt;

&lt;p&gt;Take few, if any, incoming calls&lt;/p&gt;

&lt;p&gt;Minimize meetings&lt;/p&gt;

&lt;h4 id=&quot;make-and-use-lists&quot;&gt;Make and use lists:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Schedule&lt;/li&gt;
  &lt;li&gt;Things to do&lt;/li&gt;
  &lt;li&gt;People to call&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fight to link everything to your goals&lt;/p&gt;

&lt;p&gt;The only real reason more people do not become millionaires is that they don’t have enough reasons to&lt;/p&gt;

&lt;p&gt;Block your time&lt;/p&gt;

&lt;p&gt;Minimize unplanned activities&lt;/p&gt;

&lt;p&gt;Focus on work that directly produces wealth&lt;/p&gt;

&lt;p&gt;Decide what “wealth” means to you. Find your “enough is enough” number&lt;/p&gt;

&lt;p&gt;Establish yearly, monthly, and weekly targets and benchmarks (for your wealth)&lt;/p&gt;

&lt;p&gt;When dealing with information overload, get only the information you really want and need&lt;/p&gt;

&lt;p&gt;You must read a lot to succeed&lt;/p&gt;

&lt;p&gt;Set aside and bulk material that is not time sensitive&lt;/p&gt;

&lt;p&gt;Don’t let noninformation consume your time&lt;/p&gt;

&lt;h4 id=&quot;answer-these-questions-weekly&quot;&gt;Answer these questions weekly:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;What do you know this week, that you didn’t know last week, about…
    &lt;ol&gt;
      &lt;li&gt;Your business?&lt;/li&gt;
      &lt;li&gt;Your industry as a whole?&lt;/li&gt;
      &lt;li&gt;Your competitors?&lt;/li&gt;
      &lt;li&gt;Your customers?&lt;/li&gt;
      &lt;li&gt;Your top 1, 5, 10, or 20 customers?&lt;/li&gt;
      &lt;li&gt;A client, individually?&lt;/li&gt;
      &lt;li&gt;One of the top leaders in your field?&lt;/li&gt;
      &lt;li&gt;Societal, cultural, or economic trends that may affect your business?&lt;/li&gt;
      &lt;li&gt;A “success” topic, such as personal finance, self-motivation, or time management?&lt;/li&gt;
      &lt;li&gt;A marketing topic, such as direct response advertising, direct mail, Internet?&lt;/li&gt;
      &lt;li&gt;A person, event, or topic in the current news of great interest or importance to your clientele?&lt;/li&gt;
      &lt;li&gt;A method, a means, process, or technique of doing something useful to you?&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For information, the trick is to be able to quickly find what you need when you need it&lt;/p&gt;

&lt;h4 id=&quot;seven-steps-to-proper-delegation&quot;&gt;Seven steps to proper delegation:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Define what is to be done&lt;/li&gt;
  &lt;li&gt;Be certain the delegatee understands what is to be done&lt;/li&gt;
  &lt;li&gt;Explain why it is to be done as you are prescribing it to be done&lt;/li&gt;
  &lt;li&gt;Teach how it is to be done without the micro-micro-managing&lt;/li&gt;
  &lt;li&gt;Be sure the delegatee understands the how-to process&lt;/li&gt;
  &lt;li&gt;Set the deadline for completion or progress report&lt;/li&gt;
  &lt;li&gt;Be sure you have agreement to the date or time and method&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Who you hang out with matters&lt;/p&gt;

&lt;p&gt;Work expands to fill the time available to do it&lt;/p&gt;

&lt;p&gt;Determine what NOT to do today&lt;/p&gt;

&lt;p&gt;Some people just can’t stand prosperity&lt;/p&gt;

&lt;p&gt;If you can’t control your thoughts and manage your mind, you can’t control or manage your time&lt;/p&gt;

&lt;p&gt;Set up psychological triggers to help you think a certain (productive) way&lt;/p&gt;

&lt;p&gt;What we are after is effectiveness, not necessarily efficiency&lt;/p&gt;

&lt;p&gt;People manage to focus their time, energy, and resources on everything but the few vital things in their business that really have to do with directly making money&lt;/p&gt;

&lt;p&gt;If you’re having trouble getting focused, identify and write down the three most important, most significant, most productive, most valuable things you can do to foster success in your particular enterprise&lt;/p&gt;

&lt;p&gt;Translate these into three actions you can take each and everyday&lt;/p&gt;

&lt;p&gt;I’ve never known or met a successful entrepreneur who wasn’t a list maker&lt;/p&gt;

&lt;p&gt;In order to sell, speak to someone’s self-interest&lt;/p&gt;

&lt;h4 id=&quot;no-bs-time-truths&quot;&gt;No B.S. Time Truths:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;If you don’t know what your time is worth, you can’t expect the world to know it either&lt;/li&gt;
  &lt;li&gt;Time vampires will suck as much blood out of you as you permit. If you’re drained dry at day’s end, it’s your fault&lt;/li&gt;
  &lt;li&gt;If they can’t find you, they can’t interrupt you&lt;/li&gt;
  &lt;li&gt;Punctuality provides personal power&lt;/li&gt;
  &lt;li&gt;By all means, judge. But know that you too, will be judged&lt;/li&gt;
  &lt;li&gt;Self-discipline is magnetic&lt;/li&gt;
  &lt;li&gt;If you don’t manage information, you can’t profit from information&lt;/li&gt;
  &lt;li&gt;Good enough is good enough&lt;/li&gt;
  &lt;li&gt;Liberation is the ultimate entrepreneurial achievement&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Logicomix: An Epic Search For Truth</title>
   <link href="http://davidwparker.com/2012/03/17/book-logicomix/"/>
   <updated>2012-03-17T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/03/17/book-logicomix</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: March 2012&lt;/li&gt;
  &lt;li&gt;Rating: 9.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0747597200?tag=parker08-20&quot;&gt;Logicomix: An Epic Search For Truth&lt;/a&gt; by Apostolos Doxiadis and Christos Papadimitriou is a graphic novel that presents itself as historical fiction, or fictional history of the logic behind mathematics. The book is fantastic and definitely worth a read by anyone who is a lover of logic, math, graphic novels, programming, computer science, or anything else, really. Apostolos and Christos did an excellent job in introducing a lot of basic concepts and how some of those concepts came to being. Of course, some of the material is fictionalized, but that doesn’t stop the book at being an good resource on getting started to know some of the people who made things happen in the principles of mathematics.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;I don’t really have a lot of notes. Instead, I’ll list here some of the topics and people in the book.&lt;/p&gt;

&lt;h3 id=&quot;topics&quot;&gt;Topics&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Algorithms
    &lt;ul&gt;
      &lt;li&gt;Methodical, step-by-step procedure described in terms of totally unambiguous instructions, which starts at a specified initial condition and terminates with the desired outcome.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Axiom
    &lt;ul&gt;
      &lt;li&gt;Agreed-upon first principles that don’t require proof.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Foundations of Mathematics&lt;/li&gt;
  &lt;li&gt;Incompleteness Theorem
    &lt;ul&gt;
      &lt;li&gt;The two theorems by Kurt Godel which show that:
        &lt;ul&gt;
          &lt;li&gt;1) Any consistent axiomatic system for arithmetic, in the form developed in the Principia, must of necessity by incomplete.&lt;/li&gt;
          &lt;li&gt;2) If such a system were to prove its own consistency it would be inconsistent.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Intuitionism
    &lt;ul&gt;
      &lt;li&gt;Philosophy of mathematics that is based on the belief that intuition and time are fundamental to mathematics.&lt;/li&gt;
      &lt;li&gt;The belief that logic is founded on mathematics, and not the other way around.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Logic
    &lt;ul&gt;
      &lt;li&gt;The study of methodical thinking, deduction, and demonstration.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Predicate Calculus
    &lt;ul&gt;
      &lt;li&gt;Synonym with predicate logic and first-order logic.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Principia Mathematica
    &lt;ul&gt;
      &lt;li&gt;Extremely influential but controversial work by Alfred Whitehead and Bertrand Russell. It attempted to salvage Frege’s work which was decimated by Russell’s Paradox.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Proof
    &lt;ul&gt;
      &lt;li&gt;The process of arriving at the logical verification of a mathematical or logical statement, starting from a set of agreed-upon first principles.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Russell’s Paradox
    &lt;ul&gt;
      &lt;li&gt;A flaw in Cantor’s Set Theory. Using the definition of a set of all sets which don’t contain themselves, it is Russell’s question: “does this set contain itself or not?”
        &lt;ul&gt;
          &lt;li&gt;If it does contain itself, it follows that it is one of the sets which don’t contain themselves, and thus cannot contain itself.&lt;/li&gt;
          &lt;li&gt;If it doesn’t contain itself, then it does not have the property of not containing itself, and thus does contain itself.&lt;/li&gt;
          &lt;li&gt;Which is to say it is a paradox&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;His paradox deals with self-reference, like Euboulides’ statement “I am now lying to you”&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Self-reference
    &lt;ul&gt;
      &lt;li&gt;The quality of a statement of referring to itself.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Set theory
    &lt;ul&gt;
      &lt;li&gt;The study of collections of objects united by a common property.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Tractatus Logico-Philosophicus
    &lt;ul&gt;
      &lt;li&gt;Ludwig Wittgenstein’s solution of “all the problems of philosophy”.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;people&quot;&gt;People&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Aristotle
    &lt;ul&gt;
      &lt;li&gt;One of Greek’s most influential philosophers.&lt;/li&gt;
      &lt;li&gt;Contributed greatly to systematization and exposition of logic.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;George Boole
    &lt;ul&gt;
      &lt;li&gt;Great contributor to logic in mathematics.&lt;/li&gt;
      &lt;li&gt;Developed the idea that logical propositions can be expressed in a purely symbolic language which allows them to be manipulated by operations similaty to the operations of elementary arithmetic.&lt;/li&gt;
      &lt;li&gt;“and”, “or”, and “not” can be traced back to his work.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Georg Cantor
    &lt;ul&gt;
      &lt;li&gt;Made a great deal of progress in set theory.&lt;/li&gt;
      &lt;li&gt;Theorem that set of all real numbers is uncountable, but set of all rational numbers is countable.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Euclid
    &lt;ul&gt;
      &lt;li&gt;Greek mathematician&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Gottlob Frege
    &lt;ul&gt;
      &lt;li&gt;Considered the father of modern logic&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Kurt Godel
    &lt;ul&gt;
      &lt;li&gt;Proved Completeness Theorem&lt;/li&gt;
      &lt;li&gt;Later proved Incompleteness Theorem&lt;/li&gt;
      &lt;li&gt;Proved that Cantor’s Contiuum Hypothesis is consistent with the axioms of set theory.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;David Hilbert
    &lt;ul&gt;
      &lt;li&gt;One of the greatest mathematicians in history.&lt;/li&gt;
      &lt;li&gt;Pioneered many methods of proofs.&lt;/li&gt;
      &lt;li&gt;Famous cries of “In mathematics, there is no ignorabimus” (no “we shall not know”).&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Gottfried Leibniz
    &lt;ul&gt;
      &lt;li&gt;Most important logician after Aristotle and before Boole.&lt;/li&gt;
      &lt;li&gt;Discovered calculus ratiocinator.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Giuseppe Peano
    &lt;ul&gt;
      &lt;li&gt;Created a notation for first-order logic and a system of axioms for arithmetic, that is still in use.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Henri Poincare
    &lt;ul&gt;
      &lt;li&gt;The greatest mathematician of his time, and the last universal mathematician.&lt;/li&gt;
      &lt;li&gt;Made many contributions to many different fields in mathematics.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Bertrand Russell
    &lt;ul&gt;
      &lt;li&gt;Main character in the book (or one of).&lt;/li&gt;
      &lt;li&gt;One of the greatest contributors in mathematical logic, along Aristotle, Boole, Frege, and Godel.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Alan Turing
    &lt;ul&gt;
      &lt;li&gt;The father of computer science.&lt;/li&gt;
      &lt;li&gt;Creator of Turing Machines - whether, given a logical system, there is an algorithm for deciding whether a proposition is provable within the system or not (his answer is “no”).&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;John Von Neumann
    &lt;ul&gt;
      &lt;li&gt;Contributor to many areas of mathematics.&lt;/li&gt;
      &lt;li&gt;Called “the last of the great mathematicians”.&lt;/li&gt;
      &lt;li&gt;One of the first great computer scientists.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Ludwig Wittgenstein
    &lt;ul&gt;
      &lt;li&gt;Writer of Tractatus Logico-Philosophicus.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Innovator's Dilemma</title>
   <link href="http://davidwparker.com/2012/03/16/book-the-innovators-dilemma/"/>
   <updated>2012-03-16T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/03/16/book-the-innovators-dilemma</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: February-March 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.0/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0062060244?tag=parker08-20&quot;&gt;The Innovator’s Dilemma&lt;/a&gt; by Clayton Christensen was an alright book. I really liked the concept, and how as companies and organizations become more successful, they’re actually incapable of dealing with disruptive technologies. Clayton makes great cases for why this is true, and his thesis is well backed. I would definitely recommend this book to managers of any level of every size organization. Worth a read through at least once.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;The book is about well-managed companies that have their competitive antennae up, listen astutely to their customers, invest aggressively in new technologies, and yet still lose market dominance&lt;/p&gt;

&lt;h4 id=&quot;failure-framework&quot;&gt;Failure Framework&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;there is strategically important distinction between sustaining and disruptive technologies.&lt;/li&gt;
  &lt;li&gt;pace of technological progress can and does outstrip what the markets need&lt;/li&gt;
  &lt;li&gt;customers and financial structures of successful companies color heavily the sorts of investments that appear to be attractive to them&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;sustaining-technologies&quot;&gt;Sustaining Technologies&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Foster improved product performance (of established products)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;disruptive-technologies&quot;&gt;Disruptive Technologies&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Innovations that result in worse product performance (at least in the near-term)&lt;/li&gt;
  &lt;li&gt;Simpler and cheaper&lt;/li&gt;
  &lt;li&gt;Lower margins, not greater profits&lt;/li&gt;
  &lt;li&gt;First commercialized in emerging or insignificant markets&lt;/li&gt;
  &lt;li&gt;Leading firms’ most profitable customers generally don’t want or need disruptive technologies&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;five-laws-or-principles-of-disruptive-technology&quot;&gt;Five laws or principles of disruptive technology&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Companies depend on customers and investors for resources
    &lt;ul&gt;
      &lt;li&gt;Creating an independent organization, with a cost structure honed to achieve profitability at the low margins characteristic of most disruptive technologies, is the only viable way for established firms to harness this principle&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Small markets don’t solve the growth needs of large companies
    &lt;ul&gt;
      &lt;li&gt;Disruptive technologies typically enable new markets to emerge&lt;/li&gt;
      &lt;li&gt;Small organizations can most easily respond to the opportunities for growth in a small market&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Markets that don’t exist can’t be analyzed
    &lt;ul&gt;
      &lt;li&gt;It is in disruptive innovations, where we know least about the market, that there are such first-mover advantages&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;An organization’s capabilities define its disabilities
    &lt;ul&gt;
      &lt;li&gt;Managers assume once they’ve found the right people (for an innovation problem), that the organization in which they’ll work will also be capable of succeeding at that task&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Technology supply may not equal market demand
    &lt;ul&gt;
      &lt;li&gt;When the performance of two or more competing products has improved beyond what the market demands, customers can no longer base their choice upon which is the higher performing product&lt;/li&gt;
      &lt;li&gt;The basis of product choice often evolves from functionality to reliability, then to convenience, and ultimately, to price&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The innovator’s dilemma: Blindly following the maxim that good managers should keep close to their customers can sometimes be a fatal mistake&lt;/p&gt;

&lt;h4 id=&quot;third-theory-of-why-good-companies-can-fail-value-network&quot;&gt;Third theory of why good companies can fail: value network&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;The context within a firm identifies and responds to customers’ needs, solves problems, procures input, reacts to competitors, and strives for profit&lt;/li&gt;
  &lt;li&gt;Within a value network, each firm’s competitive strategy, and particularly its past choices of markets, determines its perceptions of the economic value of a new technology&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;value-network-characteristics-one-value-network-characteristic-is-different-from-another&quot;&gt;Value network characteristics (one value network characteristic is different from another):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Difference of valuation of attributes&lt;/li&gt;
  &lt;li&gt;Overhead cost structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The attractiveness of a technological opportunity is determined by the firm’s position in the relevant value network&lt;/p&gt;

&lt;p&gt;Good managers do what makes sense, and what makes sense is primarily shaped by their value network&lt;/p&gt;

&lt;h4 id=&quot;six-step-decision-making-pattern&quot;&gt;Six-step decision-making pattern:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Disruptive technologies were first developed within established firms&lt;/li&gt;
  &lt;li&gt;Marketing personnel then sought reactions from their lead customers&lt;/li&gt;
  &lt;li&gt;Established firms set up the pace of sustaining technological development&lt;/li&gt;
  &lt;li&gt;New technologies were formed, and markets for the disruptive technologies were found by trial and error&lt;/li&gt;
  &lt;li&gt;Entrants moved upmarket&lt;/li&gt;
  &lt;li&gt;Established firms belatedly jumped on the bandwagon to defend their customer base&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When will the disruptive technology’s trajectory intersect with what the market needs?&lt;/p&gt;

&lt;h4 id=&quot;five-implications-of-the-value-network-framework&quot;&gt;Five implications of the value network framework:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;The value network in which a firm competes has a profound influence on its ability to marshal and focus the necessary resources and capabilities to overcome the technological and organizational hurdles that impede innovation&lt;/li&gt;
  &lt;li&gt;Key determinant of the probability of innovative effort’s success is degree it addresses the well-understood needs of known actors within the value network&lt;/li&gt;
  &lt;li&gt;Established firms’ decisions to ignore technologies that do not address their customers’ needs can become fatal&lt;/li&gt;
  &lt;li&gt;Entrant firms have an attacker’s advantage with innovations because such technologies generate no value within the established value network&lt;/li&gt;
  &lt;li&gt;Attacker’s advantage is in ease with which entrants can identify and make strategic commitments to attack and develop emerging market applications… it’s all about changing strategies and cost structures, not just technologies&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Leading firms in established technology remain financially strong until the disruptive technology is in the midst of their mainstream market&lt;/p&gt;

&lt;p&gt;It is by resource allocation processes that direct resources toward new product proposals that promise higher margins and larger markets&lt;/p&gt;

&lt;p&gt;Established firms are captive to the financial structure and organizational culture inherent in the value network in which they compete&lt;/p&gt;

&lt;p&gt;Resource dependence: companies’ freedom of action is limited to satisfying the needs of those entities outside the firm (customers and investors) that give it the resources it needs to survive&lt;/p&gt;

&lt;p&gt;Firms that sought growth by entering small, emerging markets logged twenty times the revenues of the firms pursuing growth in larger markets&lt;/p&gt;

&lt;p&gt;Market applications for disruptive technologies are unknown at the time of their development, and they are also unknowable&lt;/p&gt;

&lt;p&gt;Experts’ forecasts will always be wrong&lt;/p&gt;

&lt;p&gt;Rightly or wrongly, individual managers in most organizations believe that they cannot fail&lt;/p&gt;

&lt;p&gt;Plan to learn rather than plan to execute&lt;/p&gt;

&lt;p&gt;Agnostic Marketing: marketing under an explicit assumption that no one- not us, not our customers- can know whether, how, or in what quantities a disruptive product can or will be used&lt;/p&gt;

&lt;p&gt;Think rigorously whether your organization has the capability to successfully execute jobs that may be given to it&lt;/p&gt;

&lt;h4 id=&quot;organizational-capabilities-framework&quot;&gt;Organizational Capabilities Framework:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Resources
    &lt;ul&gt;
      &lt;li&gt;Most visible factor of what an organization can and cannot do&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Processes
    &lt;ul&gt;
      &lt;li&gt;Patterns of interaction, coordination, communication, and decision making&lt;/li&gt;
      &lt;li&gt;Capability in executing a certain task concurrently defines disabilities in executing other tasks&lt;/li&gt;
      &lt;li&gt;Normally meant not to change- this means that the very mechanism through which organizations create value are intrinsically inimical to change&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Values
    &lt;ul&gt;
      &lt;li&gt;Criteria by which decisions about priorities are made&lt;/li&gt;
      &lt;li&gt;One of the bittersweet rewards of success is, in fact, that as companies become large, they literally lose the capability to enter small emerging markets&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;product-evolution-model-aka-the-buying-hierarchy-four-phases&quot;&gt;Product Evolution model: aka the buying hierarchy… four phases:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Functionality - when no available product satisfies the functionality requirements by which product choice is made&lt;/li&gt;
  &lt;li&gt;Reliability - when two or or products credibly satisfy the market’s demand for functionality&lt;/li&gt;
  &lt;li&gt;Convenience - when two or more vendors improve to the point that they more than satisfy reliability demanded&lt;/li&gt;
  &lt;li&gt;Price - when multiple vendors offer a package of convenient products or services&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Future of Management</title>
   <link href="http://davidwparker.com/2012/02/17/book-the-future-of-management/"/>
   <updated>2012-02-17T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/02/17/book-the-future-of-management</id>
   <content type="html">&lt;p&gt;Read: February 2012
Rating: 8.0/10&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1422102505?tag=parker08-20&quot;&gt;The Future of Management&lt;/a&gt; by Gary Hamel is a pretty interesting concept. Rather than focusing on business model innovation or product innovation, this book discusses how companies need to start focusing on management innovation. It’s a pretty novel idea and Gary makes a pretty good case. Unfortunately, I don’t know how much of it is immediately applicable. It seems like a lot of the things the book discusses is pretty much what people in my generation expect anyway. Only time will tell, I guess.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;“Technology” of management has now reached a local peak&lt;/p&gt;

&lt;p&gt;Question: whether we actually need a new management model&lt;/p&gt;

&lt;p&gt;Today, it’s not just the occasional company that gets caught out by the future, but entire industries.&lt;/p&gt;

&lt;p&gt;Digitization of anything not nailed down&lt;/p&gt;

&lt;p&gt;New companies (globally) exploit the legacy costs of the old guard&lt;/p&gt;

&lt;p&gt;Modern management isn’t just a suite of useful tools and techniques; it’s a paradigm. More than a way of thinking- it’s a worldview, a deeply held belief, about what types of problems are worth solving, or are even solvable&lt;/p&gt;

&lt;p&gt;Real progress demands a revolution&lt;/p&gt;

&lt;p&gt;Management Innovation = anything that substantially alters the way in which the work of management is carried out, or significantly modifies customary organizational forms, and, by doing so, advances organizational goals&lt;/p&gt;

&lt;h4 id=&quot;management-innovation-yield-competitive-advantage&quot;&gt;Management Innovation yield competitive advantage&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;innovation is based on a novel management principle that challenges some long-standing orthodoxy&lt;/li&gt;
  &lt;li&gt;innovation is systemic, encompassing a range of processes and methods&lt;/li&gt;
  &lt;li&gt;innovation is part of an ongoing program of rapid-fire invention where progress compounds over time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Management dogmas are often so deeply ingrained as to be nearly invisible&lt;/p&gt;

&lt;h4 id=&quot;the-innovation-stack&quot;&gt;The Innovation Stack:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Management Innovation - difficult to duplicate due to the fact that some heresies are more heretical than others&lt;/li&gt;
  &lt;li&gt;Strategic Innovation - bold new business models&lt;/li&gt;
  &lt;li&gt;Product/Service Innovation - ever-accelerating pace of technological progress gives upstarts the opportunity to leapfrog yesterday’s pioneers&lt;/li&gt;
  &lt;li&gt;Operational Innovation - heavily depends on the quality of a company’s IT infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Innovation is always a numbers game&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Most managers don’t see themselves as inventors&lt;/li&gt;
  &lt;li&gt;No one expects managers to be innovators&lt;/li&gt;
  &lt;li&gt;Many executives doubt that bold management innovation is actually possible&lt;/li&gt;
  &lt;li&gt;Most managers see themselvels as pragmatic doers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dull or piffling problems yield dull or piffling answers&lt;/p&gt;

&lt;p&gt;“We can see and feel the waste of material thing. Awkward, inefficient, or ill-directed movements of men, however, leave nothing visible or tangible behind them.” - Frederick Taylor&lt;/p&gt;

&lt;p&gt;Maximize changes of precedent-breaking management innovation = devote yourself to problem that is consequential and inspiring, essential and laudable&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;What’s the “tomorrow problem” that you need to start working on right now?&lt;/li&gt;
  &lt;li&gt;What’s the frustrating “either/or” you’d like to turn into an “and”?&lt;/li&gt;
  &lt;li&gt;What’s the espoused ideal you’d like to turn into an embedded capability?&lt;/li&gt;
  &lt;li&gt;What’s the “can’t do” that needs to become a “can do”?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Are we changing as fast as the world around us?&lt;/p&gt;

&lt;p&gt;Goal is to build organizations capable of continual, trauma-free renewal&lt;/p&gt;

&lt;h4 id=&quot;strategic-inertia&quot;&gt;Strategic Inertia:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Deny strategy reboot
    &lt;ul&gt;
      &lt;li&gt;Every business is successful until it’s not&lt;/li&gt;
      &lt;li&gt;Top management is surprised when “not” happens&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Dearth of compelling alternatives to status quo (strategic paralysis)
    &lt;ul&gt;
      &lt;li&gt;Resist the temptation to prematurely focus their resources on one or two ideas&lt;/li&gt;
      &lt;li&gt;Worry less about weeding out low-probability ideas, and more about building a diverse portfolio of nonincremental strategic options&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Allocation rigidities: difficult to redeploy
    &lt;ul&gt;
      &lt;li&gt;Legacy programs get richly funded year after year&lt;/li&gt;
      &lt;li&gt;Most companies have monopsony on new ideas (one buyer)&lt;/li&gt;
      &lt;li&gt;Resource allocation is typically biased against new ideas, since it demands a level of certainty about volumes, costs, timelines, and profits&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If folks don’t appear to be creative at work, it’s not because they lack imagination, it’s because they lack the opportunity&lt;/p&gt;

&lt;p&gt;Creativity is a human aptitude- it can be strengthened through instruction and practice&lt;/p&gt;

&lt;p&gt;Yesterday’s heresies become tomorrow’s dogmas (and innovation stalls)&lt;/p&gt;

&lt;p&gt;Real brake on innovation is the drag of old mental models&lt;/p&gt;

&lt;p&gt;Deeply held belief about inherent superiority of a business model&lt;/p&gt;

&lt;p&gt;It’s hard for founders to credit ideas that threaten the foundations of the business models they invented&lt;/p&gt;

&lt;p&gt;Innovation takes time&lt;/p&gt;

&lt;h4 id=&quot;whole-foods&quot;&gt;Whole Foods:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Critical decisions should be made by those most directly impacted by the consequences of those decisions&lt;/li&gt;
  &lt;li&gt;Peer pressure substitutes for bureaucracy&lt;/li&gt;
  &lt;li&gt;Open books are the only way to build a company that is bound by trust&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The biggest obstacle to management innovation may be what you already believe about management&lt;/p&gt;

&lt;p&gt;First ask: is this consistent with our unique values and our sense of mission&lt;/p&gt;

&lt;p&gt;Willing commitment is many times more valuable to an organization than resigned compliance&lt;/p&gt;

&lt;h4 id=&quot;management-innovation-often-redistributes-power&quot;&gt;Management Innovation often redistributes power&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Most managers support the idea of empowerment, but to empower employees you must disenfranchise managers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google: evolutionary advantage over time&lt;/p&gt;

&lt;p&gt;All of us are held hostage by our axiomatic beliefs&lt;/p&gt;

&lt;p&gt;Distinguish between beliefs that describe the world as is and the world as it is and must forever remain&lt;/p&gt;

&lt;p&gt;Too much authority has been vested in too few people&lt;/p&gt;

&lt;p&gt;Management Orthodoxy: If you allow people the freedom to innovate, discipline will take a beating&lt;/p&gt;

&lt;p&gt;Whose interests does this belief serve?&lt;/p&gt;

&lt;p&gt;Is this belief true because we have made it true?&lt;/p&gt;

&lt;p&gt;Employees need managers for the same reason 13-year-olds need parents: they are incapable of self-regulation&lt;/p&gt;

&lt;h4 id=&quot;principles-of-modern-management&quot;&gt;Principles of modern management:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Principle / Application / Goal&lt;/li&gt;
  &lt;li&gt;Standardization / Minimize variances from standards around inputs, outputs, and work methods / Cultivate economies of scale, manufacturing efficiency, reliability, and quality&lt;/li&gt;
  &lt;li&gt;Specialization (of tasks and functions) / Group like activities together in modular organizational units / Reduce complexity and accelerate learning&lt;/li&gt;
  &lt;li&gt;Goal alignment / Establish clear objectives through a cascade of subsidiary goals and supporting metrics / Ensure that individual efforts are congruent with top-down goals&lt;/li&gt;
  &lt;li&gt;Hierarchy / Create a pyramid of authority based on a limited span of control / Maintain control over a broad scope of operations&lt;/li&gt;
  &lt;li&gt;Planning and Control / Forecast demand, budget resources, and schedule tasks, then track and correct deviations form plan / Establish regularity and predictability in operations; conformance to plans&lt;/li&gt;
  &lt;li&gt;Extrinsic Rewards / Provide financial rewards to individuals and teams for achieving specified outcomes / Motivate effort and ensure compliance with policies and standards&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;set-the-benchmark-for-adaptability&quot;&gt;Set the benchmark for adaptability:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Life, markets, democracies, religious faith, and the world’s most vibrant cities&lt;/li&gt;
  &lt;li&gt;Life -&amp;gt; Variety&lt;/li&gt;
  &lt;li&gt;Markets -&amp;gt; Flexibility&lt;/li&gt;
  &lt;li&gt;Democracy -&amp;gt; Activism&lt;/li&gt;
  &lt;li&gt;Faith -&amp;gt; Meaning&lt;/li&gt;
  &lt;li&gt;Cities -&amp;gt; Serendipity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Experimentation beats planning&lt;/p&gt;

&lt;p&gt;All mutations are mistakes&lt;/p&gt;

&lt;p&gt;Markets are all about allocational efficiency&lt;/p&gt;

&lt;p&gt;Operational efficiency is not the same as strategic efficiency&lt;/p&gt;

&lt;p&gt;In democracy, power flows up and accountability flows down (note: that’s what we would like to believe)&lt;/p&gt;

&lt;p&gt;Diversity begets creativity&lt;/p&gt;

&lt;p&gt;The most essential work of the leader is to create more leaders&lt;/p&gt;

&lt;p&gt;Anomalies are discomforting&lt;/p&gt;

&lt;p&gt;What does it mean to be in charge if your views have to compete with everyone else’s views?&lt;/p&gt;

&lt;p&gt;Senior management fears a snowball of dissent&lt;/p&gt;

&lt;p&gt;It is through creativity that each of us asserts our humanity and individuality&lt;/p&gt;

&lt;p&gt;Let people set their own direction&lt;/p&gt;

&lt;p&gt;To be adaptable, a company must be capable of spawning new businesses&lt;/p&gt;

&lt;p&gt;There is no surer way to undermine a new business venture than to measure it by the profits generated, rather than by the learning accumulated&lt;/p&gt;

&lt;p&gt;If you want to test a new idea, test it first on yourself&lt;/p&gt;

&lt;p&gt;Iterate: experiment, learn, experiment, learn&lt;/p&gt;

&lt;p&gt;Give “ordinary” employees the ability to hack management processes&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Free</title>
   <link href="http://davidwparker.com/2012/02/03/book-free/"/>
   <updated>2012-02-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/02/03/book-free</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: February 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8.5/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/B0043RT912?tag=parker08-20&quot;&gt;Free&lt;/a&gt; by Chris Anderson provides a lot of interesting thoughts on the ‘free’ economy and its interactions with current and past business models. Chris does a great job at showing the history of free and the why of free. The book shows how to use free in order to make money and does a fantastic job at sparking the imagination of how free can best be used for the reader.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;You can have unlimited shelf space if the shelf space costs nothing. This is the digital world.&lt;/p&gt;

&lt;p&gt;The critics of free are in two opposite camps: “it’s totally wrong” and “it’s so obvious”&lt;/p&gt;

&lt;p&gt;Free is a word with an extraordinary ability to reset consumer psychology, create new markets, break old ones, and make almost any product more attractive. It doesn’t mean profitless.&lt;/p&gt;

&lt;h4 id=&quot;four-broad-kinds-of-free&quot;&gt;Four broad kinds of free:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Direct Cross-Subsidy
    &lt;ul&gt;
      &lt;li&gt;What’s free: Any product that entices you to pay for something else&lt;/li&gt;
      &lt;li&gt;Free to whom: Everyone willing to pay eventually, one way or another&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The Three-Party Market
    &lt;ul&gt;
      &lt;li&gt;What’s free: Content, services, software, and more&lt;/li&gt;
      &lt;li&gt;Free to whom: Everyone&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Freemium
    &lt;ul&gt;
      &lt;li&gt;What’s free: Anything that’s matched with a premium paid version&lt;/li&gt;
      &lt;li&gt;Free to whom: Basic users&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Nonmonetary Markets
    &lt;ul&gt;
      &lt;li&gt;What’s free: Anything that people choose to give away with no expectation of payment&lt;/li&gt;
      &lt;li&gt;Free to whom: Everyone&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In China, some doctors are paid monthly when their patients are healthy&lt;/p&gt;

&lt;p&gt;Free is hard to grasp because it is the absence of a thing&lt;/p&gt;

&lt;p&gt;Best way to enter a market: vaporize economics of existing business models&lt;/p&gt;

&lt;p&gt;Once something becomes abundant, we tend to ignore it&lt;/p&gt;

&lt;p&gt;Computers made information abundant&lt;/p&gt;

&lt;p&gt;If you pay a price, any price, we are forced to ask ourselves if we really want to open our wallets&lt;/p&gt;

&lt;p&gt;Mental transaction costs = the toll of thinking&lt;/p&gt;

&lt;p&gt;Two markets: free and anything else&lt;/p&gt;

&lt;p&gt;The enemy of free is waste&lt;/p&gt;

&lt;p&gt;Free can encourage gluttony, hoarding, thoughtless consumption, waste, guilt, and greed&lt;/p&gt;

&lt;p&gt;With digital goods, pirates don’t take anything- the reproduce it. It isn’t a loss, but a lesser gain&lt;/p&gt;

&lt;p&gt;In a digital marketplace, free is almost always a choice&lt;/p&gt;

&lt;p&gt;Ideas are the ultimate abundance commodity, which propagates at zero marginal cost&lt;/p&gt;

&lt;h4 id=&quot;seven-principles-of-the-hacker-ethic-steven-levy&quot;&gt;Seven principles of the hacker ethic (Steven Levy):&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Access to computers- and anything that might teach you something about the way the world works should be unlimited and total&lt;/li&gt;
  &lt;li&gt;Always yield to the hands-on imperative&lt;/li&gt;
  &lt;li&gt;All information should be free&lt;/li&gt;
  &lt;li&gt;Mistrust authority- promote decentralization&lt;/li&gt;
  &lt;li&gt;Hackers should be judged by their hacking, not bogus criteria such as degrees, age, race, or position&lt;/li&gt;
  &lt;li&gt;You can create art and beauty on a computer&lt;/li&gt;
  &lt;li&gt;Computers can change your life for the better&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;“as long as they’re going to steal it, we want them to steal ours” - Bill Gates&lt;/p&gt;

&lt;p&gt;Default to free to achieve mass adoption&lt;/p&gt;

&lt;p&gt;Free turns billion-dollar industries into million-dollar industries&lt;/p&gt;

&lt;p&gt;Medial model of free: third party (advertiser) subsidizes content so that the second party (listener/viewer) can get it at no charge&lt;/p&gt;

&lt;p&gt;Fighting digital economics isn’t going to work- free will win&lt;/p&gt;

&lt;p&gt;Advertising can’t support everything&lt;/p&gt;

&lt;p&gt;Is the global supply of attention fixed?&lt;/p&gt;

&lt;p&gt;In a competitive market, price falls to the marginal cost&lt;/p&gt;

&lt;p&gt;Increasing returns: high fixed cost of development, low marginal costs = the more you make, the higher the profit margin&lt;/p&gt;

&lt;p&gt;Free is just another version&lt;/p&gt;

&lt;h4 id=&quot;free-riders&quot;&gt;Free riders:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;consume more than fair share of a resource&lt;/li&gt;
  &lt;li&gt;shoulder less than a fair share of the costs of resources’ production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every abundance creates a new scarcity&lt;/p&gt;

&lt;h4 id=&quot;online-economies-attention-and-reputation&quot;&gt;Online economies: attention and reputation&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;reputation = Google’s PageRank algorithm&lt;/li&gt;
  &lt;li&gt;attention = Traffic to a given site, app, etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is one ultimate scarcity = time&lt;/p&gt;

&lt;p&gt;Morality of waste: we feel bad about unloved toy or uneaten food&lt;/p&gt;

&lt;p&gt;Nature wastes life in search of better life&lt;/p&gt;

&lt;p&gt;Crap is in the eye of the beholder&lt;/p&gt;

&lt;p&gt;A little artificial scarcity is the best way to make money&lt;/p&gt;

&lt;h4 id=&quot;scarcity&quot;&gt;Scarcity&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Rules: Everything is forbidden unless it is permitted&lt;/li&gt;
  &lt;li&gt;Social model: Paternalism (we know what’s best)&lt;/li&gt;
  &lt;li&gt;Profit plan: Business model&lt;/li&gt;
  &lt;li&gt;Decision process: Top-down&lt;/li&gt;
  &lt;li&gt;Management style: Command and control&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;abundance&quot;&gt;Abundance&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Rules: Everything is permitted unless it is forbidden&lt;/li&gt;
  &lt;li&gt;Social model: Egalitarianism (you know what’s best)&lt;/li&gt;
  &lt;li&gt;Profit plan: We’ll figure it out&lt;/li&gt;
  &lt;li&gt;Decision process: Bottom-up&lt;/li&gt;
  &lt;li&gt;Management style: Out of control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Piracy is a for of zero-cost marketing, which brings their work to largest possible audience&lt;/p&gt;

&lt;p&gt;Pirates are you best marketers&lt;/p&gt;

&lt;p&gt;“China will become a model for the world music industry” - Shen Lihui&lt;/p&gt;

&lt;p&gt;Replacement effect: pirated versions take demand that authentic version might have tapped (keyword “might”)&lt;/p&gt;

&lt;p&gt;Stimulus effect: pirated versions create brand awareness that can be tapped elsewhere&lt;/p&gt;

&lt;p&gt;Pirated dgital products are as good as the originals. But pirated physical products usually aren’t&lt;/p&gt;

&lt;p&gt;When the machines do all the work, what motivates us?&lt;/p&gt;

&lt;p&gt;Is it inevitable that the end of scarcity also means the end of discipline and drive?&lt;/p&gt;

&lt;p&gt;Our minds are wired for scarcity: we are motivated by what we don’t have, not what we do have&lt;/p&gt;

&lt;h4 id=&quot;objections-to-the-notion-of-free&quot;&gt;Objections to the notion of free:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;There ain’t no such thing as a free lunch&lt;/li&gt;
  &lt;li&gt;Free always has hidden costs/free is a trick&lt;/li&gt;
  &lt;li&gt;The Internet isn’t really free because you’re paying for access
    &lt;ul&gt;
      &lt;li&gt;People forget/don’t know the difference between content and carriage&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Free is just about advertising&lt;/li&gt;
  &lt;li&gt;Free means more ads, and that means less privacy
    &lt;ul&gt;
      &lt;li&gt;Privacy is a moving target&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;No cost = no value
    &lt;ul&gt;
      &lt;li&gt;Fallacy: the only way to measure value is with money&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Free undermines innovation&lt;/li&gt;
  &lt;li&gt;Depleted oceans, filthy public toilets, and global warming are the real costs of free
    &lt;ul&gt;
      &lt;li&gt;Tragedy of the commons: if we don’t have to pay for things, we tend to consume them to excess&lt;/li&gt;
      &lt;li&gt;Free can lead to gorging, and thus ruin the party for everyone&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Free encourages piracy&lt;/li&gt;
  &lt;li&gt;Free is breeding a generation that doesn’t value anything
    &lt;ul&gt;
      &lt;li&gt;They value different things&lt;/li&gt;
      &lt;li&gt;The question is not “what does it cost?” but “why should I pay?”&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;You can’t compete with free&lt;/li&gt;
  &lt;li&gt;I gave away my stuff and didn’t make much money
    &lt;ul&gt;
      &lt;li&gt;Free is not a magic bullet&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Free is only good if someone else is paying for it&lt;/li&gt;
  &lt;li&gt;Free drives out professionals in favor of amateurs, at a cost of quality&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The standard business model for web companies without a business model is advertising&lt;/p&gt;

&lt;h4 id=&quot;free-rules&quot;&gt;Free rules:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;If it’s digital, sooner or later it’s going to be free&lt;/li&gt;
  &lt;li&gt;Atoms would like to be free, too, but they’re not so pushy about it&lt;/li&gt;
  &lt;li&gt;You can’t stop free&lt;/li&gt;
  &lt;li&gt;You can make money from free&lt;/li&gt;
  &lt;li&gt;Redefine your market&lt;/li&gt;
  &lt;li&gt;Round down&lt;/li&gt;
  &lt;li&gt;Sooner or later you will compete with free&lt;/li&gt;
  &lt;li&gt;Embrace waste&lt;/li&gt;
  &lt;li&gt;Free makes other things more valuable&lt;/li&gt;
  &lt;li&gt;Manage for abundance, not scarcity&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;freemium-tactics&quot;&gt;Freemium tactics:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Time limited&lt;/li&gt;
  &lt;li&gt;Feature limited&lt;/li&gt;
  &lt;li&gt;Seat limited&lt;/li&gt;
  &lt;li&gt;Customer type limited&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Wisdom of Crowds</title>
   <link href="http://davidwparker.com/2012/01/26/book-wisdom-of-crowds/"/>
   <updated>2012-01-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/01/26/book-wisdom-of-crowds</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: January 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0385721706?tag=parker08-20&quot;&gt;The Wisdom of Crowds&lt;/a&gt; by James Surowiecki is an interesting take on how crowds can or cannot be wise. I’ll admit, I’m still a little skeptical as I’ve never been apart of the experiments listed in the book (of which there are plenty). James also said he was skeptical after writing the book, before doing experiments himself. Overall, I thought the concepts were pretty fascinating. I don’t think the book warrants 280 pages, but a lot of the book is stories of the experiments, with lots of documentation of what the results were. Overall, it’s definitely worth a read. $0.02 takeaway: best group results are individual decisions made all at once, aggregated together, and averaged.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Under the right circumstances, groups are remarkably intelligent&lt;/p&gt;

&lt;h4 id=&quot;types-of-problems&quot;&gt;Types of Problems:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Cognition problem - problems that have or will have definitive solutions&lt;/li&gt;
  &lt;li&gt;Coordination problem - problems that require members of a group to figure out how to coordinate their behavior with each other&lt;/li&gt;
  &lt;li&gt;Cooperation problem - problems that deal with the challenge of getting self-interested, distrustful people to work together&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;conditions-necessary-for-the-crowd-to-be-wise&quot;&gt;Conditions necessary for the crowd to be wise:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Diversity&lt;/li&gt;
  &lt;li&gt;Independence&lt;/li&gt;
  &lt;li&gt;Decentralization&lt;/li&gt;
  &lt;li&gt;Aggregation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For best group results: Individual guesses, aggregated together and averaged&lt;/p&gt;

&lt;p&gt;Don’t first rationally consider all alternatives and determine ideal pattern- send out scouts to each alternative and let them bring back data which can be compared&lt;/p&gt;

&lt;p&gt;What makes a system successful is its ability to recognize losers and kill them quickly&lt;/p&gt;

&lt;p&gt;Expertise and accuracy are unrelated&lt;/p&gt;

&lt;p&gt;It is unlikely that one person, over time, will do better than the group&lt;/p&gt;

&lt;p&gt;People have bad intuitions about averaging&lt;/p&gt;

&lt;h4 id=&quot;homogenous-groups-especially-small-ones-suffer-from-groupthink&quot;&gt;Homogenous groups, especially small ones, suffer from groupthink&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Much like politics!
    &lt;ul&gt;
      &lt;li&gt;Illusion of invulnerability&lt;/li&gt;
      &lt;li&gt;Willingess to rationalize away possible counterarguments&lt;/li&gt;
      &lt;li&gt;Conviction that dissent is not useful&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s often easier to change your opinion than to challenge the group&lt;/p&gt;

&lt;p&gt;People are willing to conform even against their own better judgement&lt;/p&gt;

&lt;p&gt;Independence doesn’t mean isolation, but it does mean relative freedom from the influence of others&lt;/p&gt;

&lt;p&gt;Social Proof: if a lot of people are doing something or believe something, there must be a good reason why&lt;/p&gt;

&lt;p&gt;Paying attention to what others do should make you smarter, not dumber (which doesn’t always happen)&lt;/p&gt;

&lt;h4 id=&quot;information-cascade&quot;&gt;Information Cascade:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;As more and more people do something, more and more people believe it is right decision&lt;/li&gt;
  &lt;li&gt;Problem is due to people not making decisions all at once, but rather in sequence&lt;/li&gt;
  &lt;li&gt;People fall in line because the believe they’re learning something important&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;People are generally overconfident&lt;/p&gt;

&lt;p&gt;The more important the decision, the less likely a cascade is to take hold&lt;/p&gt;

&lt;p&gt;The closer a person is to a problem, the more likely he or she is to have a good solution to it&lt;/p&gt;

&lt;h4 id=&quot;decentralization&quot;&gt;Decentralization&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Strength: encourages independence and specialization whil still allowing people to coordinate their activities to solve difficult problems&lt;/li&gt;
  &lt;li&gt;Weakness: no guarantee that valuable information will find its way through the rest of the system
    &lt;ul&gt;
      &lt;li&gt;It’s easy for decentralization to become disorganized&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Coordination problems also involve the fact that people often think not only about what they believe, but also what other people believe&lt;/p&gt;

&lt;p&gt;Culture enables coordination by establishing norms and conventions&lt;/p&gt;

&lt;p&gt;Conventions maintain order and stability&lt;/p&gt;

&lt;p&gt;Prices are the main vehicle by which information gets transmitted from buyers to sellers and vice versa&lt;/p&gt;

&lt;p&gt;Watching a flock move through the air “spontaneous order”&lt;/p&gt;

&lt;p&gt;Most important coordination problem: getting resources to the right places at the right cost&lt;/p&gt;

&lt;p&gt;In America, the people whom inequality bothers most are the rich&lt;/p&gt;

&lt;p&gt;People who repeatedly deal with each other over time recognize the benefits of cooperation, and they do not try to take advantage of each other&lt;/p&gt;

&lt;p&gt;The higher the degree to which a culture was integrated with the market, the greater the level of prosociality.&lt;/p&gt;

&lt;p&gt;We think of taxpaying as a matter of cooperation&lt;/p&gt;

&lt;p&gt;Most people will participate as long as they believe that everyone else is participating&lt;/p&gt;

&lt;p&gt;Selfish: 25%&lt;/p&gt;

&lt;p&gt;Altruists: conditional consenters&lt;/p&gt;

&lt;h4 id=&quot;collective-problem-on-taxes&quot;&gt;Collective Problem (on taxes)&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;People have to trust&lt;/li&gt;
  &lt;li&gt;Trust in the govenrment&lt;/li&gt;
  &lt;li&gt;Trust the state will find and punish the guilty and avoid punishing the innocent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scientists publish results and make data available for inspection&lt;/p&gt;

&lt;p&gt;Society will end up knowing more if information is diffused as widely as possible&lt;/p&gt;

&lt;p&gt;Scientists compete for recognition and attention&lt;/p&gt;

&lt;p&gt;You can’t listen to or read everyone, so you only listen to the best&lt;/p&gt;

&lt;p&gt;In unstructured, free-flowing discussions, the information that tends to be talked about the most is the information that everyone already knows&lt;/p&gt;

&lt;p&gt;Ideas often do not succeed simply on their own merits&lt;/p&gt;

&lt;p&gt;Transactions costs: search and information costs, bargaining and decisions costs, policing and enforcement costs&lt;/p&gt;

&lt;p&gt;Search for consensus encourages tepid, lowest-common-denominator solutions&lt;/p&gt;

&lt;p&gt;People rely on “anchors” when they make decisions&lt;/p&gt;

&lt;p&gt;Anchors are arbitrary numbers that people seize on and allow to affect the way they make choices&lt;/p&gt;

&lt;p&gt;Once everyone starts piggybacking on the wisdom of crowds, no one is doing anything to add to the wisdom of the crowd&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: How To Prove It: A Structured Approach</title>
   <link href="http://davidwparker.com/2012/01/24/book-how-to-prove-it/"/>
   <updated>2012-01-24T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/01/24/book-how-to-prove-it</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: January 2012&lt;/li&gt;
  &lt;li&gt;Rating: 9/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0521675995?tag=parker08-20&quot;&gt;How To Prove It: A Structured Approach&lt;/a&gt; by Daniel Kelleman is a fantastic book on how to write mathematical proofs. It’s also a fantastic resource on set theory and general logic. I read this book in preparation for some of my forthcoming grad school computer science classes, but I wish I read it years ago. The level of detail is perfect. The book starts off very simply, and teaches individual things about simple problems. It slowly shows harder and harder proofs and introduces different techniques for writing proofs. Each section has very clear details about how to use that technique as well as several great examples of the technique in action. The book shows a great amount of scratch work, as well as final proofs. This is a must read for any Mathematics or Computer Science or other engineering major, and a must read for those interested in logic.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Deductive Reasoning: Reduce and Solve a problem&lt;/li&gt;
  &lt;li&gt;Conjecture: Guess
    &lt;ul&gt;
      &lt;li&gt;Once proven, it is a theorem&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Primes of 2^n - 1 = Mersenne Primes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;chapter-1---sequential-logic&quot;&gt;Chapter 1 - Sequential Logic&lt;/h3&gt;

&lt;p&gt;Valid argument: premises cannot all be true withot the conclusion being true as well&lt;/p&gt;

&lt;h4 id=&quot;truth-table&quot;&gt;Truth Table:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Demorgan’s Laws
    &lt;ul&gt;
      &lt;li&gt;¬(P∧Q) = ¬P∨¬Q&lt;/li&gt;
      &lt;li&gt;¬(P∨Q) = ¬P∧¬Q&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Commutative Laws
    &lt;ul&gt;
      &lt;li&gt;P∧Q = Q∧P&lt;/li&gt;
      &lt;li&gt;P∨Q = Q∨P&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Associate Laws
    &lt;ul&gt;
      &lt;li&gt;P∧(Q∧R) = (P∧Q)∧R&lt;/li&gt;
      &lt;li&gt;P∨(Q∨R) = (P∨Q)∨R&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Idempotent Laws
    &lt;ul&gt;
      &lt;li&gt;P∧P = P&lt;/li&gt;
      &lt;li&gt;P∧P = P&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Distributive Laws
    &lt;ul&gt;
      &lt;li&gt;P∧(Q∨R) = (P∧Q) ∨ (P∧R)&lt;/li&gt;
      &lt;li&gt;P∨(Q∧R) = (P∨Q) ∧ (P∨R)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Double Negation Law
    &lt;ul&gt;
      &lt;li&gt;¬¬P = P&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Tautology Laws (always true)
    &lt;ul&gt;
      &lt;li&gt;P∧(a tautology) = P&lt;/li&gt;
      &lt;li&gt;P∨(a tautology) = tautology&lt;/li&gt;
      &lt;li&gt;¬(a tautology) = contradiction&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Contradiction Laws (always false)
    &lt;ul&gt;
      &lt;li&gt;P∧(a contradiction) = contradiction&lt;/li&gt;
      &lt;li&gt;P∨(a contradiction) = P&lt;/li&gt;
      &lt;li&gt;¬(a contradiction) = tautology&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;13---variables-and-sets&quot;&gt;1.3 - Variables and Sets&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Set = collection of objects {}&lt;/li&gt;
  &lt;li&gt;Object are called elements of the set&lt;/li&gt;
  &lt;li&gt;∈ = “is an element of”&lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;y ∈ { x&lt;/td&gt;
          &lt;td&gt;x^2 &amp;lt; 9 } =&amp;gt; elementhood test&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;y = free variable&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;x = dummy or bound variable&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Truth set of P(x) = {x&lt;/td&gt;
          &lt;td&gt;P(x)}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;Common universes of discourse:
    &lt;ul&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;R = {x&lt;/td&gt;
              &lt;td&gt;x is a real number}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Q = {x&lt;/td&gt;
              &lt;td&gt;x is a rational number}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Ζ = {x&lt;/td&gt;
              &lt;td&gt;x is an integer}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Ν = {x&lt;/td&gt;
              &lt;td&gt;x is a natural number}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∅ = empty or null set = {}&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;14---set-operations&quot;&gt;1.4 - Set Operations&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;A ∩ B = {x&lt;/td&gt;
          &lt;td&gt;x ∈ A and x ∈ B} = intersection of sets A and B&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;A ∪ B = {x&lt;/td&gt;
          &lt;td&gt;x ∈ A or x ∈ B} = union of sets A and B&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;A \ B = {x&lt;/td&gt;
          &lt;td&gt;x ∈ A and x ∉ B} = difference of sets A and B&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Often we use Venn Diagrams to represent&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A ⊆ B = A is a subset of B = all elements in A are in B&lt;/li&gt;
  &lt;li&gt;A ∩ B = ∅ = disjoint = no same elements&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;15---conditional-and-biconditional-connectives&quot;&gt;1.5 - Conditional and Biconditional Connectives&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;P→Q = If P then Q = conditional&lt;/li&gt;
  &lt;li&gt;P = Antecedent&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Q = Consequent&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;¬P∨Q = P→Q = ¬P∨¬Q = ¬(P∧¬Q)&lt;/li&gt;
  &lt;li&gt;Q→P = Converse of P→Q&lt;/li&gt;
  &lt;li&gt;¬Q→¬P = contrapositive of P→Q = P→:&lt;/li&gt;
  &lt;li&gt;Q↔P = biconditional = if and only if (iff) = P→Q and Q→P are true = (P→Q)∧(Q→P)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;chapter-2---quantificational-logic&quot;&gt;Chapter 2 - Quantificational Logic&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;∀ xP(x) = “for all x, P(x)” = universal quantifier&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;∃ xP(x) = “there exists an x such that P(x)” = existential quantifier&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Order of quantifiers makes a difference:
    &lt;ul&gt;
      &lt;li&gt;¬∃ xP(x) = ∀ x ¬ P(x)&lt;/li&gt;
      &lt;li&gt;¬∀ xP(x) = ∃ x ¬ P(x)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Can reorder same types ∃∃ ∀∀
    &lt;ul&gt;
      &lt;li&gt;∃ y ∃ x or ∃ x ∃ y = “there are objects x and y such that …”&lt;/li&gt;
      &lt;li&gt;∀ x ∀ y or ∀ y ∀ x = “for all objects x and y …”&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;∃! xP(x) = “there is exactly one value of x such that P is true”&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;The universal quantifier distributes over conjunction (the existential quantifier doesn’t!)
    &lt;ul&gt;
      &lt;li&gt;∀ x (E(x) ∧ T(x)) = ∀ xE(x) ∧ ∀ xT(x)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Indexed set
    &lt;ul&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Power set of A = ℘(A) = {x&lt;/td&gt;
              &lt;td&gt;x ≤ A}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Intersection of family = ∩F = {x&lt;/td&gt;
          &lt;td&gt;∀ A (A ∈ F → x ∈ A)}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Union of family = ∪F = {x&lt;/td&gt;
          &lt;td&gt;∃ A (A ∈ F ∧ x ∈ A)}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;chapter-3---proofs&quot;&gt;Chapter 3 - Proofs&lt;/h3&gt;

&lt;p&gt;A proof is simply a deductive argument whose premises are the hypothesis of the theorem and whose conclusion is the conclusion of the theorem&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Never assert anything until you can justify it completely&lt;/li&gt;
  &lt;li&gt;To prove a conclusion of the form P→Q
    &lt;ul&gt;
      &lt;li&gt;assume P is true and then prove Q&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Givens = statements known or assumed true&lt;/li&gt;
  &lt;li&gt;Goal = statement that remains to be proven&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;32---proofs-involving-negations-and-conditionals&quot;&gt;3.2 - Proofs Involving Negations and Conditionals&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Goal = ¬P
    &lt;ul&gt;
      &lt;li&gt;instead of a goal that says what shouldn’t be true, see if you can rephrase as a goal that says what should be true&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;By contradiction, suppose P is true, proof of contradiction, thus P is false
    &lt;ul&gt;
      &lt;li&gt;assume conclusion is false&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;33---proofs-involving-quantifiers&quot;&gt;3.3 - Proofs Involving Quantifiers&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;If you can prove arbitrary P(x), then ∀P(x)
    &lt;ul&gt;
      &lt;li&gt;x must be arbitrary (not assumed equal to any other object)&lt;/li&gt;
      &lt;li&gt;don’t say “all”, “every”, etc&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When solving ∃x, then pick an x that solves the equation - it doesn’t matter how you find it (the ‘how’ is not part of the proof)&lt;/p&gt;

&lt;h4 id=&quot;34---proofs-involving-conjunctions-and-biconditionals&quot;&gt;3.4 - Proofs Involving Conjunctions and Biconditionals&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;iff ↔ proofs
    &lt;ul&gt;
      &lt;li&gt;solve → then solve ← (must do both)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;35---proofs-involving-disjunctions&quot;&gt;3.5 - Proofs Involving Disjunctions&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;P ∨ Q = P or Q is true, you’re not sure which
    &lt;ul&gt;
      &lt;li&gt;called “cases” = must solve 2 proofs&lt;/li&gt;
      &lt;li&gt;if proof broken down to cover full proof with 2+ cases, then it called exhaustive&lt;/li&gt;
      &lt;li&gt;they can both be true&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;36---existence-and-uniqueness-proofs&quot;&gt;3.6 - Existence and Uniqueness Proofs&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;∃! x P(x)&lt;/li&gt;
  &lt;li&gt;Existence = [proof of ∃ x P(x)]&lt;/li&gt;
  &lt;li&gt;Uniqueness = [proof of ∀ y ∀ z (P(y) ∧ P(z)) → y = z]&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;chapter-4---relations&quot;&gt;Chapter 4 - Relations&lt;/h3&gt;

&lt;h4 id=&quot;41---ordered-pairs-and-cartesian-products&quot;&gt;4.1 - Ordered Pairs and Cartesian Products&lt;/h4&gt;

&lt;p&gt;P(x,y) = two free variables = pair(a,b)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cartesian product
    &lt;ul&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;AxB = {(a,b)&lt;/td&gt;
              &lt;td&gt;a ∈A and b ∈B}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
      &lt;li&gt;order matters&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Truth set of p(x,y) = {(a,b) ∈ AxB&lt;/td&gt;
      &lt;td&gt;p(a,b)}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h4 id=&quot;42---relations&quot;&gt;4.2 - Relations&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;R ⊆ AxB is called a relation from A to B&lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Domain of R = Dom(R) = {a ∈ A&lt;/td&gt;
          &lt;td&gt;∃ b ∈ B ((a,b) ∈ R)}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Range of R = Ran(R) = {b ∈ B&lt;/td&gt;
          &lt;td&gt;∃ a ∈ A ((a,b) ∈ R)}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Inverse of R = R^-1 = {(b,a) ∈ BxA&lt;/td&gt;
          &lt;td&gt;(a,b) ∈ R}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;Composition
    &lt;ul&gt;
      &lt;li&gt;
        &lt;table&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;TºE = {(s,p) ∈ SxP&lt;/td&gt;
              &lt;td&gt;∃ c ∈ C ((s,c) ∈ E and (c,p) ∈ T)}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/li&gt;
      &lt;li&gt;Example. If Joe is in Bio 12 and Bio 12 is taught by Prof X, then:
        &lt;ul&gt;
          &lt;li&gt;(Joe, Bio 12) ∈ E and (Bio 12, Prof X) ∈ T&lt;/li&gt;
          &lt;li&gt;So (Joe, Prof X) ∈ TºE&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;43---more-about-relations&quot;&gt;4.3 - More about Relations&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;R is a relation on A:
    &lt;ul&gt;
      &lt;li&gt;R is reflexive if ∀ x ∈ A (xRx) = ∀ x ∈ A ((x,x) ∈ R)
        &lt;ul&gt;
          &lt;li&gt;iff iA ⊆ R (note: iA = identity relation on A)&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;R is symmetric if ∀ x ∈ A ∀ y ∈ A (xRy → yRx)
        &lt;ul&gt;
          &lt;li&gt;iff R = R^-1&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;R is transitive if ∀ x ∈ A ∀ y ∈ A ∀ z ∈ A ((xRy∧yRz) → xRz)
        &lt;ul&gt;
          &lt;li&gt;iff RºR ⊆ R&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;44---ordering-relations&quot;&gt;4.4 - Ordering Relations&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;R is partial order on A if it is reflexive, transitive, and antisymmetrical.&lt;/li&gt;
  &lt;li&gt;R is total order if partial order and:&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;∀ x ∈ A ∀ y ∈ A (xRy ∨ yRx)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;R minimal element&lt;/li&gt;
  &lt;li&gt;R largest and maximal element&lt;/li&gt;
  &lt;li&gt;Upp and lower bound&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;45---closures&quot;&gt;4.5 - Closures&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;L is an element of F and it’s a subset of every element of F&lt;/li&gt;
  &lt;li&gt;Then it (L) is the reflexive closure of M&lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;L = {(x,y) ∈ RxR&lt;/td&gt;
          &lt;td&gt;x ≤ y }&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;Reflexive closure of strict partial order is always partial order&lt;/li&gt;
  &lt;li&gt;Reflexive closure of strict total order is always total order&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;46---equivalence-relations&quot;&gt;4.6 - Equivalence Relations&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Equivalence relations on A if it is reflexive, symmetric, and transitive.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Pairwise disjoint = all elements of f are disjoint = ∀ x ∈ f ∀ y ∈ f (x ≠ y → x ∧ y = 0)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;f is a partition of A if:
    &lt;ul&gt;
      &lt;li&gt;∪ƒ = A&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;f is pairwise disjoint if:
    &lt;ul&gt;
      &lt;li&gt;∀ x ∈ ƒ(x ≠ 0)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Facts proven primarily of using them to prove a theorem = lemma&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;∃ k ∈ Ζ (x - y = km) = x is congruent to y modulo m
    &lt;ul&gt;
      &lt;li&gt;x ≡ y mod m&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;chapter-5---functions&quot;&gt;Chapter 5 - Functions&lt;/h3&gt;

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Suppose P is the set of all people. Let H = {(p,n) ∈ P X Ν&lt;/td&gt;
      &lt;td&gt;person p has n children}. The H is relation from P to Ν. For every p ∈ P, there is exactly one n ∈ Ν s.t. (p,n) ∈ H. H is a fuction from P to Ν.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;ul&gt;
  &lt;li&gt;F is a function from A to B:
    &lt;ul&gt;
      &lt;li&gt;∀ a ∈ A ∃! b ∈ B((a,b) ∈ F)&lt;/li&gt;
      &lt;li&gt;represented as ƒ:A→B&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Suppose ƒ:A→B
    &lt;ul&gt;
      &lt;li&gt;Unique b = “value of ƒ at a” = “image of a under ƒ”&lt;/li&gt;
      &lt;li&gt;f(a) = b&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Theorem 5.1.4. Suppose f and g are functions from A to B. If ∀ a ∈ A(f(a) = g(a)), then f=g.&lt;/p&gt;

&lt;h5 id=&quot;515&quot;&gt;5.1.5&lt;/h5&gt;

&lt;p&gt;Suppose ƒ:A→B and g:B→C. The gºf:A→C for any a ∈ A, the value of gºf at a is given by the formula (gºf)(a) = g(f(a))&lt;/p&gt;

&lt;h4 id=&quot;52---one-to-one-and-onto&quot;&gt;5.2 - One-to-One and Onto&lt;/h4&gt;

&lt;p&gt;One-to-one (1-1) “injection”: ¬∃ a1 ∈ A ∃ a2 A(f(a1) = f(a2) ∧ a1 ≠ a2)&lt;/p&gt;

&lt;p&gt;Onto “surjection”: ∀ b ∈ B ∃ a ∈ A(f(a) = b)&lt;/p&gt;

&lt;p&gt;If both 1-1 and onto, then called “Bijection” or “1-1 correspondence”&lt;/p&gt;

&lt;h4 id=&quot;53---inverses-of-functions&quot;&gt;5.3 - Inverses of Functions&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Suppose ƒ: A→B. If ƒ is 1-1 and onto, then ƒ^-1:B→A&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;ƒ^-1ºƒ = iA and ƒºƒ^-1 = iB. (for ƒ:A→B and ƒ^-1:B→A)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Suppose ƒ:A→B
    &lt;ul&gt;
      &lt;li&gt;If function g:B→A s.t. gºƒ = iA then ƒ is 1-1&lt;/li&gt;
      &lt;li&gt;If function g:B→A s.t. ƒ*ordm;g = iB then ƒ is onto&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;534&quot;&gt;5.3.4&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;Suppose ƒ:A→B. Then the following are equal:
    &lt;ul&gt;
      &lt;li&gt;ƒ is 1-1 and onto&lt;/li&gt;
      &lt;li&gt;ƒ^-1:B→A&lt;/li&gt;
      &lt;li&gt;There is a function g:B→A s.t. gºƒ = iA and ƒºg = iB&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Example. 10^log x = x = log 10^x (base 10)
    &lt;ul&gt;
      &lt;li&gt;f(x) = 10^x&lt;/li&gt;
      &lt;li&gt;g(x) = log x&lt;/li&gt;
      &lt;li&gt;g(f(x)) = log 10^x = x … f(g(x)) = 10^log x = x&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So log is the inverse of “raise 10 to the power” function&lt;/p&gt;

&lt;h3 id=&quot;chapter-6---mathematical-induction&quot;&gt;Chapter 6 - Mathematical Induction&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Form of proof:
    &lt;ul&gt;
      &lt;li&gt;Base Case: [Proof of P(0) goes here]&lt;/li&gt;
      &lt;li&gt;Induction step: [Proof of ∀ n ∈ Ν(P(n) → P(n+1) goes here]&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;63-recursion&quot;&gt;6.3 Recursion&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Prove ƒ(0), then ƒ(n), therfore ƒ(n+1)&lt;/li&gt;
  &lt;li&gt;If we use “…”, then we may be able to use recursion&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;64-65-strong-induction-and-closures-again&quot;&gt;6.4-6.5 Strong Induction and Closures Again&lt;/h4&gt;

&lt;p&gt;Some interesting proofs in the book here.&lt;/p&gt;

&lt;h3 id=&quot;chapter-7---infinite-sets&quot;&gt;Chapter 7 - Infinite Sets&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;A and B are sets. A is equinumerous w/B if ƒ: A→B is 1-1 and onto (shown as A~B)&lt;/li&gt;
  &lt;li&gt;Suppose A~B and C~D, then:
    &lt;ul&gt;
      &lt;li&gt;AxC ~ BxD&lt;/li&gt;
      &lt;li&gt;if A and C are disjoint and B and D are disjoint, then A∪C~B∪D&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Sets A, B, and C:
    &lt;ul&gt;
      &lt;li&gt;A~A&lt;/li&gt;
      &lt;li&gt;if A~B, then B~A&lt;/li&gt;
      &lt;li&gt;if A~B and B~C, then A~C&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;summary-of-proof-techniques&quot;&gt;Summary of Proof Techniques&lt;/h3&gt;

&lt;h4 id=&quot;to-prove-a-goal-of-the-form&quot;&gt;To prove a goal of the form:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;P → Q:
    &lt;ul&gt;
      &lt;li&gt;Assume P is true and prove Q&lt;/li&gt;
      &lt;li&gt;Prove the contrapositive; that is, assume Q is false and prove that P is false&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;¬Q:
    &lt;ul&gt;
      &lt;li&gt;Reexpress as a positive statement&lt;/li&gt;
      &lt;li&gt;Use proof by contradiction; that is, assume that P is true and try to reach a contradiction&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ∧ Q:
    &lt;ul&gt;
      &lt;li&gt;Prove P and Q separately. In other words, treat this as two separate goals: P and Q.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ∨ Q:
    &lt;ul&gt;
      &lt;li&gt;Use proof by cases. In each case, either prove P or prove Q.&lt;/li&gt;
      &lt;li&gt;Assume P is false and prove Q, or assume Q is false and prove P.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ↔ Q:
    &lt;ul&gt;
      &lt;li&gt;Prove P → Q and Q → P, using methods listed under 1.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∀x P(x):
    &lt;ul&gt;
      &lt;li&gt;Let x stand for an arbitrary object and prove P(x).&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∃x P(x):
    &lt;ul&gt;
      &lt;li&gt;Find a value of x that makes P(x) true. Prove P(x) for this value of x.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∃!x P(x):
    &lt;ul&gt;
      &lt;li&gt;Prove ∃x P(x) (existence) and ∀y ∀z ((P(y) ∧ P(z)) → y=z) (uniqueness)&lt;/li&gt;
      &lt;li&gt;Prove the equivalent statement ∃x (P(x) ∧ ∀y (P(y) → y = x))&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∀n ∈ ΝP(n);
    &lt;ul&gt;
      &lt;li&gt;Mathematical Induction: Prove P(0) (base case) and ∀n ∈ Ν (P(n) → P(n+1)) (induction step)&lt;/li&gt;
      &lt;li&gt;Strong induction: Prove ∀n ∈ Ν[(∀k &amp;lt; nP(k)) → P(n)]&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;to-use-a-given-of-the-form&quot;&gt;To use a given of the form:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;P → Q:
    &lt;ul&gt;
      &lt;li&gt;If you are also given P, or you can prove that P is true, then you can conclude that Q is true&lt;/li&gt;
      &lt;li&gt;Use the contrapositive: if you are given or can prove that Q is false, you can conclude that P is false&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;¬P:
    &lt;ul&gt;
      &lt;li&gt;Reexpress as a positive statement&lt;/li&gt;
      &lt;li&gt;In a proof by contradiction, you can reach a contradiction by proving P&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ∧ Q:
    &lt;ul&gt;
      &lt;li&gt;Treat this as two givens, P, and Q&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ∨ Q:
    &lt;ul&gt;
      &lt;li&gt;Use proof by cases. In case 1 assume P is true, and in case 2 assume Q is true&lt;/li&gt;
      &lt;li&gt;If you are also given that P is false, or you can prove that P is false, you can conclude that Q is true. Similarly, if you know that Q is false you can conclude that P is true.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;P ↔ Q:
    &lt;ul&gt;
      &lt;li&gt;Treat this as two givens: P → Q and Q → P&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∀x P(x):
    &lt;ul&gt;
      &lt;li&gt;You may plug in any value, say a, for x, and conclude that P(a) is true&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∃x P(x):
    &lt;ul&gt;
      &lt;li&gt;Introduce a new variable, say x0, into the proof, to stand for a particular object for which P(x0) is true&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;∃!x P(x):
    &lt;ul&gt;
      &lt;li&gt;Introduce a new variable, say x0, into the proof, to stand for a particular object for which P(x0) is true. You may also assume that ∀y ∀z ((P(y) ∧ P(z)) → y=z)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;techniques-that-can-be-used-in-any-proof&quot;&gt;Techniques that can be used in any proof:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Proof by contradiction: assume the goal is false and derive a contradiction.&lt;/li&gt;
  &lt;li&gt;Proof by cases: consider several cases that are exhaustive, that is, that include all possibilities. Prove the goal in each case.&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Programming Concurrency on the JVM</title>
   <link href="http://davidwparker.com/2012/01/13/book-programming-concurrency-on-the-jvm/"/>
   <updated>2012-01-13T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/01/13/book-programming-concurrency-on-the-jvm</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: January 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/193435676X?tag=parker08-20&quot;&gt;Programming Concurrency on the JVM&lt;/a&gt; by Venkat Subramaniam is an excellent introduction to exactly what its title says “programming concurrency on the JVM.” This book is for people who want to learn a little about concurrency and don’t know much. It’s for people who are using Java and can’t get away from it and want to know how to take advantage of their multicore computers. The book focuses mostly on Java, but also shows a good bit of the Scala equivalent code. It also shows a little Groovy, JRuby, and Clojure, but those languages definitely aren’t the focus. Additionally, the book mostly uses the Akka library for a majority of the Software Transactional Memory (STM) and Actors code.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;3-forms-of-concurrency-on-the-jvm&quot;&gt;3 Forms of concurrency on the JVM:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;“Synchronize and Suffer” model&lt;/li&gt;
  &lt;li&gt;Software Transactional Memory (STM) model&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Actor-based model&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;A thread is a flow of execution in a process&lt;/li&gt;
  &lt;li&gt;A concurrent application makes use of multiple threads or concurrent flows of execution&lt;/li&gt;
  &lt;li&gt;Concurrency can make apps responsive, reduce latency, and increase throughput&lt;/li&gt;
  &lt;li&gt;Concurrency issues include starvation, deadlocks, and race conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core problem is shared mutability&lt;/p&gt;

&lt;p&gt;Generally want at least as many threads as number of available cores:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;Runtime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getRuntime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;availableProcessors&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;We want:&lt;/li&gt;
  &lt;li&gt;Number of threads = Number of available cores / (1 - blocking coefficient)&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The blocking coefficient (0 to 1) is approximately how often we utilize blocking behavior (such as I/O)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Use a thread pool&lt;/li&gt;
  &lt;li&gt;Use java.util.concurrent, not the older threading APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;best-to&quot;&gt;Best to:&lt;/h4&gt;
&lt;ol&gt;
  &lt;li&gt;Use shared immutability (pure immutability) where possible&lt;/li&gt;
  &lt;li&gt;Use isolated mutability- ensure only one thread can access a mutable variable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For computationally intensive applications, limit number of threads to number of cores&lt;/p&gt;

&lt;p&gt;Immutable and persistent data structures are your friends&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Threads in Java are not reusable&lt;/li&gt;
  &lt;li&gt;Use ExecutorService for your thread pool&lt;/li&gt;
  &lt;li&gt;Use Exchanger to exchange data between threads&lt;/li&gt;
  &lt;li&gt;For a lot of data that needs to switch between threads, using BlockingQueues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Java 7 offers the Fork-Join API, which dynamically manages threads based on available processors and task demand&lt;/p&gt;

&lt;p&gt;Use Concurrent Collections, and not just synchronized collections&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Shared mutability is not restricted to public fields&lt;/li&gt;
  &lt;li&gt;Don’t create threads from within constructors. Use Static factory methods instead&lt;/li&gt;
  &lt;li&gt;When working with multiple mutable fields, ensure that the access to these variables is atomic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the real world, state does not change, identity does&lt;/p&gt;

&lt;p&gt;Ensure code within transactions is idempotent&lt;/p&gt;

&lt;h3 id=&quot;stm-based-concurrency&quot;&gt;STM-based concurrency&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;STM provides explicit lock-free programming with good thread safety and high concurrent performance&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;No explicit lock leads to deadlock free concurrency&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Akka offers Akka Refs which are immutable types that manage mutable identity&lt;/li&gt;
  &lt;li&gt;Wrap your transactions in an atomically() {} method and the Atomic class&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Set a transaction as readonly to gain performance&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Use the deferred method and the compensating method to pass code block to run when a transaction succeeds or fails&lt;/li&gt;
  &lt;li&gt;Deferred is good for completing work&lt;/li&gt;
  &lt;li&gt;Compensating is good for logging failures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Akka does not avoid write skew&lt;/p&gt;

&lt;p&gt;STM is best for when write collisions are infrequent&lt;/p&gt;

&lt;h3 id=&quot;actor-based-concurrency&quot;&gt;Actor-based concurrency&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Event-based essage passing&lt;/li&gt;
  &lt;li&gt;Treat tasks as lightweight processes, internal to application/JVM&lt;/li&gt;
  &lt;li&gt;While the application is multithreaded, the actors themselves are single-threaded&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An actor is a free-running activity that can receive messages, process requests, and send responses&lt;/p&gt;

&lt;p&gt;Actor libraries decouple actors from threads&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Akka library uses ActorRefs which are created via a call to actorOf() and the start() methods&lt;/li&gt;
  &lt;li&gt;Send messages in Java using sendOneWay() or in Scala using !&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can coordinate Actors to work together&lt;/p&gt;

&lt;p&gt;Think of a typed actor as an active object, which runs in its own single lightweight event-driven thread, with an intercepting proxy to turn normal-looking method calls into asynchronous nonblocking messages&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;You can mix Actors and STM&lt;/li&gt;
  &lt;li&gt;Actors don’t provide a way to manage consensus across tasks= that is, having all of them succeed or all of them fail&lt;/li&gt;
  &lt;li&gt;Akka provides Transactors for this purpose&lt;/li&gt;
  &lt;li&gt;Transactors are useful, just like STM, when write collisions are infrequent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s possible to use Remote Actors to different JVMs&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;You must ensure to propogate error messages to actors awaiting responses&lt;/li&gt;
  &lt;li&gt;Actors don’t prevent deadlock&lt;/li&gt;
  &lt;li&gt;Make sure to use timeouts to ensure you don’t endlessly wait for a response from an actor&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Lean Startup</title>
   <link href="http://davidwparker.com/2012/01/05/book-the-lean-startup/"/>
   <updated>2012-01-05T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2012/01/05/book-the-lean-startup</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: January 2012&lt;/li&gt;
  &lt;li&gt;Rating: 8/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0307887898?tag=parker08-20&quot;&gt;The Lean Startup&lt;/a&gt; by Eric Ries is a good introduction to lean philosophies. While the book is a good starting point, I do believe that there were definitely some lacking areas and it could have been a little more actionable. It’s still worth a read, if you get a chance. Otherwise, just take a look at my notes below.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;h3 id=&quot;five-lean-startup-principles&quot;&gt;Five Lean Startup Principles:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Entrepreneurs are Everywhere&lt;/li&gt;
  &lt;li&gt;Entrepreneurship is Management&lt;/li&gt;
  &lt;li&gt;Validated Learning&lt;/li&gt;
  &lt;li&gt;Build-Measure-Learn&lt;/li&gt;
  &lt;li&gt;Innovation Accounting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Avoid the “just do it” entrepreneurship attitude&lt;/p&gt;

&lt;p&gt;Civilization’s precious resources = time, passion, and skill&lt;/p&gt;

&lt;h4 id=&quot;how-to-measure&quot;&gt;How to measure:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;code/product is easy/tangible, but may not be what you want&lt;/li&gt;
  &lt;li&gt;learning, frustratingly intangible, but much better&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Goal = Figure out the right thing to build&lt;/p&gt;

&lt;p&gt;Follow the build-measure-learn feedback loop (more later)&lt;/p&gt;

&lt;p&gt;“A startup is a human institution designed to create a new product or service under conditions of extreme uncertainty”&lt;/p&gt;

&lt;p&gt;“Innovation is a bottoms-up, decentralized, and unpredictable thing, but that doesn’t mean it cannot be managed”&lt;/p&gt;

&lt;h4 id=&quot;measure-innovations&quot;&gt;Measure (innovations):&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;number of customers using product that didn’t exist X years ago&lt;/li&gt;
  &lt;li&gt;percentage of revenue coming from offerings that didn’t exist X years ago&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;what-if-we-build-something-that-nobody-wants&quot;&gt;What if we build something that nobody wants?&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;What did it matter if we did it on time and on budget?&lt;/li&gt;
  &lt;li&gt;Learn what customers really want&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Startup productivity = systematically figuring out the right thing to build&lt;/p&gt;

&lt;p&gt;If you cannot fail, you cannot learn&lt;/p&gt;

&lt;p&gt;Value Hypothesis = test whether product or service really delivers value to customer&lt;/p&gt;

&lt;p&gt;Growth Hypothesis = how new customers will discover a product or service&lt;/p&gt;

&lt;h4 id=&quot;4-questions&quot;&gt;4 questions:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Do consumers recognize that they have a problem you are trying to solve?&lt;/li&gt;
  &lt;li&gt;If there was a solution, would they buy it?&lt;/li&gt;
  &lt;li&gt;Would they buy it from us?&lt;/li&gt;
  &lt;li&gt;Can we build a solution for that problem?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Identify elements of plan that are assumptions and not facts = riskiest elements = leap of faith&lt;/p&gt;

&lt;h4 id=&quot;build-measure-learn-feedback-loop-more&quot;&gt;Build-Measure-Learn feedback loop (MORE)&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Build =&amp;gt; (Product) =&amp;gt; Measure =&amp;gt; (Data) =&amp;gt; Learn =&amp;gt; (Ideas)&lt;/li&gt;
  &lt;li&gt;Try to minimize the total time in the feedback loop&lt;/li&gt;
  &lt;li&gt;This helps to create learning milestones&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Strategy is based on assumptions&lt;/p&gt;

&lt;p&gt;Identify facts clearly&lt;/p&gt;

&lt;p&gt;Steve Blank’s “Get Out of the Building”&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Customers are breathing, thinking, buying individuals&lt;/li&gt;
  &lt;li&gt;Customer Archetype = humanize the proposed target customer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MVP = Minimum Viable Product = Note “Viable”. Any additional work beyond what was required to start learning is waste&lt;/p&gt;

&lt;p&gt;“Wizard of Oz testing” = fake it&lt;/p&gt;

&lt;h4 id=&quot;often-we-are-not-sure-who-the-customer-is&quot;&gt;Often we are not sure who the customer is:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;“If we do not know who the customer is, we do not know what quality is”&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;“Customer’s don’t care how much time something takes to build. They care only if it serves their needs”&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Are you making your product better?&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;How do you know?&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Innovation Accounting enables startups to prve objectively they are learning to grow sustainable business:
    &lt;ul&gt;
      &lt;li&gt;Establish a baseline&lt;/li&gt;
      &lt;li&gt;Tune the engine = every change must improve customer behaviour for the better&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building the wrong thing, optimizing the product or its marketing will not yield significant results.&lt;/p&gt;

&lt;p&gt;Use A/B (also called Split) Testing&lt;/p&gt;

&lt;p&gt;Kanban, or capacity constraint. User stories are not complete until they lead to validated learning.&lt;/p&gt;

&lt;h4 id=&quot;metrics-must-have-the-three-as&quot;&gt;Metrics must have the three A’s:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Actionable = demonstrate clear cause and effect&lt;/li&gt;
  &lt;li&gt;Accessible = “metrics are people too”&lt;/li&gt;
  &lt;li&gt;Auditable = data is credible to employees&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;ignore-vanity-metrics&quot;&gt;Ignore vanity metrics:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;total number of users&lt;/li&gt;
  &lt;li&gt;total revenue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As they can distract from real metrics, such as growth rate&lt;/p&gt;

&lt;p&gt;A startup’s runway is the number of pivots it can still make.&lt;/p&gt;

&lt;p&gt;Pivot or persevere&lt;/p&gt;

&lt;p&gt;Don’t throw everything out in a pivot, just repurpose it&lt;/p&gt;

&lt;h4 id=&quot;catalog-of-pivots&quot;&gt;Catalog of pivots&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Zoom in pivot = single feature becomes full product&lt;/li&gt;
  &lt;li&gt;Zoom out pivot = full product becomes single feature&lt;/li&gt;
  &lt;li&gt;Customer segment pivot = change your customers&lt;/li&gt;
  &lt;li&gt;Customer need pivot = discover different customer needs&lt;/li&gt;
  &lt;li&gt;Platform pivot = change from an application to a platform or vice versa&lt;/li&gt;
  &lt;li&gt;Business architecture pivot = high margin, low volume to low margin, high volume or vice versa&lt;/li&gt;
  &lt;li&gt;Value capture pivot = monetization and capturing value other ways&lt;/li&gt;
  &lt;li&gt;Engine growth pivot = viral, sticky, and paid growth model&lt;/li&gt;
  &lt;li&gt;Channel pivot = switching how product reaches customers&lt;/li&gt;
  &lt;li&gt;Technology pivot = changing technology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Small batches allow quality problems to be identified sooner&lt;/p&gt;

&lt;p&gt;Watch out for the large-batch death spiral&lt;/p&gt;

&lt;p&gt;Pull = Just-in-time what you need&lt;/p&gt;

&lt;h4 id=&quot;new-customers-come-from-the-actions-of-past-customers&quot;&gt;New customers come from the actions of past customers:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Word of Mouth&lt;/li&gt;
  &lt;li&gt;As a side effect of product usage = think luxury goods&lt;/li&gt;
  &lt;li&gt;Through funded advertising&lt;/li&gt;
  &lt;li&gt;Through repeat purchase or use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“If the rate of new customer acquisition exceeds the churn rate, the product will grow”&lt;/p&gt;

&lt;h4 id=&quot;viral-coefficient--how-many-new-customers-will-use-a-product-as-a-consequence-of-each-new-customer-who-signs-up&quot;&gt;Viral Coefficient = how many new customers will use a product as a consequence of each new customer who signs up&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;You want this to be greater than 1, in order to grow&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;dont-just-tack-on-bureaucracies-as-you-grow&quot;&gt;Don’t just tack on bureaucracies as you grow:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Be an adaptive organization and adjust your process and performance based on your current conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;five-whys&quot;&gt;Five whys:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Utilize the five “Whys?” in order to get to the root of problems&lt;/li&gt;
  &lt;li&gt;Watch out for the five “blames,” which can arise from people not understanding how to use the five whys&lt;/li&gt;
  &lt;li&gt;The five whys require mutual trust and empowerment&lt;/li&gt;
  &lt;li&gt;Use them to determine new problems, not old baggage&lt;/li&gt;
  &lt;li&gt;Everyone connected to the problem should be at the five whys session&lt;/li&gt;
  &lt;li&gt;Explain the five whys process to those unfamiliar at every meeting&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;startups-require-three-attributes&quot;&gt;Startups require three attributes:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Scarce but secure resources&lt;/li&gt;
  &lt;li&gt;Independent authority to develop their business&lt;/li&gt;
  &lt;li&gt;Personal stake in the outcome&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For bigger companies, you may want to utilize a sandbox approach&lt;/p&gt;

&lt;p&gt;Let the sandbox grow, don’t just move the team out of the sandbox&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: The Agile Samurai</title>
   <link href="http://davidwparker.com/2011/12/31/book-the-agile-samurai/"/>
   <updated>2011-12-31T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/12/31/book-the-agile-samurai</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;Read: December 2011&lt;/li&gt;
  &lt;li&gt;Rating: 9/10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/1934356581?tag=parker08-20&quot;&gt;The Agile Samurai&lt;/a&gt; by Jonathan Rasmusson is a great introduction to Agile Software Development. Whether you’re working for a megacorp or at your own startup, whether you’re a project manager, a programmer, or a customer, this book provides great detail on what most software development should look like.&lt;/p&gt;

&lt;h2 id=&quot;my-notes&quot;&gt;My Notes&lt;/h2&gt;

&lt;p&gt;Deliver something of value every week. Break big problems into small ones. Focus on important things and forget everything else. Get constant feedback. If and when you are going the wrong direction, change direction.&lt;/p&gt;

&lt;p&gt;Most software is believing an unrealistic plan + random miracle will result in working software.&lt;/p&gt;

&lt;p&gt;You cannot ever gather all requirements at the beginning of a software project, and the ones you do gather will change. You will never have enough time or money to do everything you want to do.&lt;/p&gt;

&lt;p&gt;The customer must be engaged. If they don’t even want to show up, then the project must not be important to them and it’ll inevitably fail. Set expectations with the customer. They must set priorities. They must also decide what not to build.&lt;/p&gt;

&lt;p&gt;The agile analyst will help write user stories. The agile programmer will turn user stories into software, make technical decisions, and help make estimates. The agile tester will write tests for stories and confirm stories work as expected. The project manager will track how the team is doing and communicate the state of the project. They will also help remove roadblocks that are in the team’s way.&lt;/p&gt;

&lt;h4 id=&quot;a-great-way-to-start-the-project-is-by-asking-four-questions-to-the-whole-team&quot;&gt;A great way to start the project is by asking four questions to the whole team:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;What am I good at?&lt;/li&gt;
  &lt;li&gt;How do I perform?&lt;/li&gt;
  &lt;li&gt;What do I value?&lt;/li&gt;
  &lt;li&gt;What results can you expect me to deliver?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The assumption of consensus where none exists is what kills most projects.&lt;/p&gt;

&lt;h4 id=&quot;a-majority-of-the-book-is-about-creating-an-inception-deck-an-inception-deck-answers-these-simple-questions-and-is-generally-a-great-way-to-get-consensus-about-the-software&quot;&gt;A majority of the book is about creating an inception deck. An inception deck answers these simple questions and is generally a great way to get consensus about the software:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Why are we here?&lt;/li&gt;
  &lt;li&gt;Elevator pitch&lt;/li&gt;
  &lt;li&gt;Product box (what would it look like?)&lt;/li&gt;
  &lt;li&gt;NOT list (what are we not doing?)&lt;/li&gt;
  &lt;li&gt;Meet the neighbors (who is involved in the project in the broadest form?)&lt;/li&gt;
  &lt;li&gt;Show solution (blueprints)&lt;/li&gt;
  &lt;li&gt;Up at night (what do we lose sleep over?)&lt;/li&gt;
  &lt;li&gt;Size it up (how long will it take?)&lt;/li&gt;
  &lt;li&gt;What’s going to give? (time, scope, budget, quality– choose 3)&lt;/li&gt;
  &lt;li&gt;What’s it going to take?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask questions as if you were the customer.&lt;/p&gt;

&lt;p&gt;Remember the furious four: time, budget, quality, scope. You will always have to limit one or more of these. Be sure that there is agreement about which should be sacrificed first. Generally, time, budget, and quality are fixed, whereas scope should be flexible.&lt;/p&gt;

&lt;p&gt;Creating user stories is hard. Make sure you have the correct emphasis on the correct syllable. Good stories should be independent, negotiable, valuable, estimatable, small, and testable (INVEST).&lt;/p&gt;

&lt;p&gt;Use a point-based system to size tasks. Size them based on previous, similar work. If there is none, then be sure to figure it out as you go- and be flexible on what you’re actually doing. Measuring your team’s speed is the team velocity.&lt;/p&gt;

&lt;p&gt;When reality sets in, and you’re not doing things as well as you’d like, then you have to be able to adjust your plan quickly and efficiently.&lt;/p&gt;

&lt;h4 id=&quot;your-first-plan&quot;&gt;Your first plan:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Create your master story list&lt;/li&gt;
  &lt;li&gt;Size it up&lt;/li&gt;
  &lt;li&gt;Prioritize&lt;/li&gt;
  &lt;li&gt;Estimate your team’s velocity&lt;/li&gt;
  &lt;li&gt;Pick some dates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The burn-down chart and burn-up chart are ways to track how much you have remaining (down) and how much you have accomplished (up).&lt;/p&gt;

&lt;p&gt;Create personas for your stories. If you have different users (and you always do), then create some different personas for each of them, and understand what their role is and how they interact with the software.&lt;/p&gt;

&lt;p&gt;Make sure the code matches the language the customers use.&lt;/p&gt;

&lt;h4 id=&quot;four-things-to-do-during-any-iteration&quot;&gt;Four things to do during any iteration:&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Make sure next iteration’s work is ready&lt;/li&gt;
  &lt;li&gt;Get feedback on last iteration’s stories&lt;/li&gt;
  &lt;li&gt;Plan the next iteration’s work&lt;/li&gt;
  &lt;li&gt;Continuously look for areas of improvement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a visual workspace. Have a story wall, a release wall, a velocity and burn-down graph, and an inception deck.&lt;/p&gt;

&lt;p&gt;When fixing code, write a unit test before fixing the bug. This will help in the future to make sure the bug doesn’t come back. Unit tests give instant feedback, lower regression testing costs, reduce debugging time, and let you deploy with confidence.&lt;/p&gt;

&lt;p&gt;Refactor your code constantly. Don’t wait multiple iterations.&lt;/p&gt;

&lt;p&gt;Practice Test-Driven Development… Red, Green, Refactor: Test fails, Test passes, refactor.&lt;/p&gt;

&lt;p&gt;Always have your software at a production-readiness state. Software spends more time in production than development.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 19 - Blending</title>
   <link href="http://davidwparker.com/2011/12/16/opengl-screencast-video-19-blending/"/>
   <updated>2011-12-16T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/12/16/opengl-screencast-video-19-blending</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to use blending in your OpenGL program.&lt;/p&gt;

&lt;p&gt;OpenGL functions used in this screencast:
glBlendFunc(), glDepthMask()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_TRUE, GL_FALSE, GL_BLEND, GL_ZERO, GL_ONE, GL_DST_COLOR, GL_SRC_COLOR, GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA_SATURATE&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/ipv4rwl6nhomjgk/episode-019.mov?dl=1&quot;&gt;Download the screencast (HD), 67.9 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=dx929y43x4M&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/dx929y43x4M?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1487718.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast video tutorial HD 18 - Overlays</title>
   <link href="http://davidwparker.com/2011/12/02/opengl-screencast-video-18-overlays/"/>
   <updated>2011-12-02T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/12/02/opengl-screencast-video-18-overlays</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to add an overlay to your OpenGL window. I also explain how to use glPushAttrib().&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glPushAttrib()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_TRANSFORM_BIT, GL_ENABLE_BIT&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/j0ihi3o9much2l0/episode-018.mov?dl=1&quot;&gt;Download the screencast (HD), 35.3 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=q80r0HJVZq8&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/q80r0HJVZq8&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1424169.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 17 - Animation Part 2</title>
   <link href="http://davidwparker.com/2011/11/24/opengl-screencast-17-animation-part-2/"/>
   <updated>2011-11-24T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/11/24/opengl-screencast-17-animation-part-2</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I explain how to create animations using timers. Timers are generally much more robust than using typical idle functions. I also introduce using C structs to enhance the code.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glutTimerFunc()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
N/A&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/v4t8bos9m9oqr6g/episode-017.mov?dl=1&quot;&gt;Download the screencast (HD), 24.0 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=gbAL7Ufku80&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/gbAL7Ufku80?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1391933.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 16 - Animation Part 1</title>
   <link href="http://davidwparker.com/2011/11/21/opengl-screencast-16-animation-part-1/"/>
   <updated>2011-11-21T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/11/21/opengl-screencast-16-animation-part-1</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video Tutorial), I explain how to do simple animations using the glut idle function. The function given as a callback to the idle function can be used to do interesting things (more than just animations)! I also talk about how to use the glut visibility function.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glutGet(), glutIdleFunc(), glutVisibilityFunc()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GLUT_ELAPSED_TIME, GLUT_NOT_VISIBLE, GLUT_VISIBLE&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/rpjw4ixc4wuk5le/episode-016.mov?dl=1&quot;&gt;Download the screencast (HD), 28.8 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=FafIFv8LEak&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/FafIFv8LEak&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1385020.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 15 - Textures Part 2</title>
   <link href="http://davidwparker.com/2011/11/18/opengl-screencast-15-textures-part-2/"/>
   <updated>2011-11-18T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/11/18/opengl-screencast-15-textures-part-2</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video Tutorial), I create a few more shapes with their corresponding textures. I also explain several specific OpenGL texture methods and parameters.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glutInitWindowPosition(), glBindTexture(), glTexParameteri(), glTexParameterfv(), glTexEnvi(), glTexEnvfv()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_TEXTURE_2D, GL_NEAREST, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_REPEAT, GL_CLAMP, GL_CLAMP_TO_BORDER, GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE, GL_BLEND, GL_MODULATE, GL_DECAL, GL_COMBINE, GL_ADD, GL_TEXTURE_ENV_COLOR, GL_TEXTURE_BORDER_COLOR&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/q25tidvs8agoyws/episode-015.mov?dl=1&quot;&gt;Download the screencast (HD), 58.9 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=BniHaCsvrDU&amp;amp;feature=colike&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/BniHaCsvrDU&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1378211.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 14 - Textures Part 1</title>
   <link href="http://davidwparker.com/2011/10/30/opengl-screencast-14-textures-part-1/"/>
   <updated>2011-10-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/10/30/opengl-screencast-14-textures-part-1</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I discuss using textures. I start by explaining loading a texture into texture memory from a bmp image. Next, I talk about how a texture is used a tied to a specific vertex.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glGenTextures(), glBindTextures(), glTexImage2D(), glTexParameteri(), glTexCoord2f()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_TEXTURE_2D, GL_RGB, GL_UNSIGNED_BYTE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_LINEAR&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/az0yvrg8qaewk3y/episode-014.mov?dl=1&quot;&gt;Download the screencast, 34.6 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=jK6sfbw5oYQ&amp;amp;feature=colike&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/jK6sfbw5oYQ&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code-this-is-not-all-of-the-code--please-see-the-github-link-above-for-all-of-it&quot;&gt;Code (this is not all of the code- please see the github link above for all of it)&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1326745.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 13 - Lighting and Material Part 2 - Materials</title>
   <link href="http://davidwparker.com/2011/10/21/opengl-screencast-13-lighting-and-material-part-2/"/>
   <updated>2011-10-21T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/10/21/opengl-screencast-13-lighting-and-material-part-2</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I discuss materials and explain the difference between using glColorMaterial and glMaterial.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glDisable(), glEnable(), glColorMaterial(), glMaterial()&lt;/p&gt;

&lt;p&gt;OpenGL parameters used in this screencast:
GL_COLOR_MATERIAL, GL_FRONT, GL_FRONT_AND_BACK, GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_SHININESS, GL_EMISSION, GL_AMBIENT_AND_DIFFUSE&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/efigqztedp317t9/episode-013.mov?dl=1&quot;&gt;Download the screencast, 20.9 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Yb2XK-cwwBM&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/Yb2XK-cwwBM?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1304935.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 12 - Lighting and Material Part 1 - Setup and Normals</title>
   <link href="http://davidwparker.com/2011/10/10/opengl-screencast-12-lighting-and-material-part-1/"/>
   <updated>2011-10-10T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/10/10/opengl-screencast-12-lighting-and-material-part-1</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I discuss using lighting in OpenGL. I discuss setting up lighting, as well as how normals work. Additionally, I mention how to determine if a user is pressing a modifier such as shift.&lt;/p&gt;

&lt;p&gt;OpenGL commands used in this screencast:
glDisable(), glEnable(), glColorMaterial(), glutGetModifiers(), glLightfv(), glNormal3f(),&lt;/p&gt;

&lt;p&gt;Different OpenGL parameters used: GL_LIGHTING, GL_NORMALIZE, GL_COLOR_MATERIAL, GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, GL_LIGHT0, GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_POSITION, GLUT_ACTIVE_SHIFT&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/1az80hk9ssng73f/episode-012.mov?dl=1&quot;&gt;Download the screencast, 28.5 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=geebJz2XSAU&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/geebJz2XSAU?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1276355.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://gist.github.com/1276359.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 11 - Code Organization</title>
   <link href="http://davidwparker.com/2011/09/27/opengl-screencast-11-code-organization/"/>
   <updated>2011-09-27T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/09/27/opengl-screencast-11-code-organization</id>
   <content type="html">&lt;p&gt;In this screencast (OpenGL video tutorial), I discuss organizing OpenGL code. In general, this is how I have my code organized. I’m always up for change and better ways to do things though, so if you do things differently, please give me feedback.&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-2&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/tds7gkvfux1kykm/episode-011.mov?dl=1&quot;&gt;Download the screencast, 13.1 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=QNIv7x0X5eg&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/QNIv7x0X5eg?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1246364.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://gist.github.com/1246381.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://gist.github.com/1246389.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 10 - Push and Pop Matrix, and Complex Objects</title>
   <link href="http://davidwparker.com/2011/09/21/opengl-screencast-10-push-pop-matrix-and-complex-objects/"/>
   <updated>2011-09-21T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/09/21/opengl-screencast-10-push-pop-matrix-and-complex-objects</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss using glPushMatrix, glPopMatrix, and how they work. I also show how to create complex objects using push and pop.&lt;/p&gt;

&lt;p&gt;OpenGL Functions used include:
glPushMatrix(), glPopMatrix()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/c341zc9j9itfjom/episode-010.mov?dl=1&quot;&gt;Download the screencast, 21.2 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=RzYW1mIh72E&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/RzYW1mIh72E?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1233400.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 9 - Scaling, Rotation, and Translation</title>
   <link href="http://davidwparker.com/2011/09/12/opengl-screencast-9-scaling-rotation-and-translation/"/>
   <updated>2011-09-12T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/09/12/opengl-screencast-9-scaling-rotation-and-translation</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss scaling, rotation, and translation.&lt;/p&gt;

&lt;p&gt;OpenGL Functions used include:
glTranslated(), glRotated(), glScaled()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/ercczwg659j0kto/episode-009.mov?dl=1&quot;&gt;Download the screencast, 21.3 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=u-LoUvilIIQ&quot;&gt;Youtube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/u-LoUvilIIQ?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1212485.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 8 - Drawing in 3D part 3 - Spheres, Cylinders, and Cones</title>
   <link href="http://davidwparker.com/2011/09/05/opengl-screencast-8-drawing-in-3d-part-3-spheres/"/>
   <updated>2011-09-05T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/09/05/opengl-screencast-8-drawing-in-3d-part-3-spheres</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss drawing spheres, cylinders, and cones in 3D. I also introduce another convenience method for checking errors.&lt;/p&gt;

&lt;p&gt;OpenGL Functions used include:
GL_QUAD_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, glGetError(), gluErrorString()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/3356ly3q24ii8tq/episode-008.mov?dl=1&quot;&gt;Download the screencast, 21.2 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Kujd0RTsaAQ&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/Kujd0RTsaAQ?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1195852.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Android: How to float a row above the soft keyboard</title>
   <link href="http://davidwparker.com/2011/08/30/android-how-to-float-a-row-above-keyboard/"/>
   <updated>2011-08-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/30/android-how-to-float-a-row-above-keyboard</id>
   <content type="html">&lt;p&gt;Last time, I explained how to fix resizing and scrolling on Android (see “blog post here”:/2011/08/25/android-fixing-window-resize-and-scrolling/).&lt;/p&gt;

&lt;p&gt;Now, I wanted to have a fixed “menu” row on the screen at all times, similar to how the contacts app works:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_contacts_app.png&quot; alt=&quot;Android Contacts App&quot; title=&quot;Android Contacts App&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Not too hard. I knew that I would want a &lt;code&gt;RelativeLayout&lt;/code&gt; with a &lt;code&gt;ScrollView&lt;/code&gt; inside as well as another view which would contain my buttons.&lt;/p&gt;

&lt;p&gt;When the soft keyboard is closed, I want the app to look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_good_closed.png&quot; alt=&quot;My App Good Closed&quot; title=&quot;My App Good Closed&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And when an &lt;code&gt;EditText&lt;/code&gt; is selected, I want it to look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_good_open.png&quot; alt=&quot;My App Good Open&quot; title=&quot;My App Good Open&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Well, with my code as it currently is suggested, I would have a &lt;code&gt;RelativeLayout&lt;/code&gt; containing a &lt;code&gt;ScrollView&lt;/code&gt; and a &lt;code&gt;TableLayout&lt;/code&gt;. So far so good. However, this is what it ends up looking like:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_bad_both.png&quot; alt=&quot;My App Bad&quot; title=&quot;My App Bad&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Searching around, I ultimately discovered that I needed to add two different tags. The first to my &lt;code&gt;ScrollView&lt;/code&gt; was &lt;code&gt;android:layout_above=&quot;@+id/myID&quot;&lt;/code&gt;. The other, on the &lt;code&gt;TableLayout&lt;/code&gt; was &lt;code&gt;android:layout_alignParentBottom=&quot;true&quot;&lt;/code&gt;. Using both of these, you get the correct effect. However, if either are missing, you can end up with some stuff you don’t want.&lt;/p&gt;

&lt;p&gt;No &lt;code&gt;layout_above&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_bad_no_layout_above.png&quot; alt=&quot;No layout above&quot; title=&quot;No layout above&quot; /&gt;&lt;/p&gt;

&lt;p&gt;No &lt;code&gt;align_parentBottom&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_bad_no_align_parentBottom.png&quot; alt=&quot;No align parent bottom&quot; title=&quot;No align parent bottom&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And some code:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/1182279.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OpenGL screencast 7 - Drawing in 3D part 2 - Perspective and Orthogonal Projections and Cubes</title>
   <link href="http://davidwparker.com/2011/08/28/opengl-screencast-7-drawing-in-3d-part-2-projections/"/>
   <updated>2011-08-28T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/28/opengl-screencast-7-drawing-in-3d-part-2-projections</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss drawing cubes in 3D. More importantly, I cover perspective and orthogonal projections and discuss when you would want to use each.&lt;/p&gt;

&lt;p&gt;Functions used include:
gluPerspective(), gluLookAt()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/b8w1ccnqcqwlkxn/episode-007.mov?dl=1&quot;&gt;Download the screencast, 26.8 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=BgIsTZiyvvU&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/BgIsTZiyvvU?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1176938.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Android: fixing window resizing and scrolling</title>
   <link href="http://davidwparker.com/2011/08/25/android-fixing-window-resize-and-scrolling/"/>
   <updated>2011-08-25T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/25/android-fixing-window-resize-and-scrolling</id>
   <content type="html">&lt;p&gt;Recently, when I was working on an my forthcoming Exercise Android App, I was having an issue. When I clicked into a EditText box, then the soft keyboard would come up. So far, so good. But what was happening was the keyboard was covering a good portion of the EditText box until the user began to type.&lt;/p&gt;

&lt;p&gt;Basically, it looked like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_bad_scroll.png&quot; alt=&quot;Android Bad Scroll&quot; title=&quot;Android Bad Scroll&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Obviously, this wasn’t what I wanted. After scouring the Internet, I found out about the property &lt;code&gt;android:windowSoftInputMode&lt;/code&gt; that you put into an &lt;code&gt;application&lt;/code&gt; tag in your Manifest file. This has a few options. The ultimately correct one was &lt;code&gt;adjustResize&lt;/code&gt;. However, that wasn’t the end of it.&lt;/p&gt;

&lt;p&gt;Next, I needed to add an actual scrollable area, as a &lt;code&gt;TableLayout&lt;/code&gt; is not scrollable by default. This was easy enough, as I surrounded my TableLayout with a &lt;code&gt;ScrollView&lt;/code&gt; tag and gave it the property &lt;code&gt;android:isScrollContainer=&quot;true&quot;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This fixed my layout to look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/android_good_scroll.png&quot; alt=&quot;Android Good Scroll&quot; title=&quot;Android Good Scroll&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Which was what I wanted. Good times.&lt;/p&gt;

&lt;p&gt;Some code:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/1172700.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;Hopes this helps.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 6 - Drawing in 3D part 1 - GLUT objects</title>
   <link href="http://davidwparker.com/2011/08/20/opengl-screencast-6-drawing-in-3d-part-1-glut-objects/"/>
   <updated>2011-08-20T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/20/opengl-screencast-6-drawing-in-3d-part-1-glut-objects</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss drawing in 3D using GLUT objects. I also show how to add a menu in GLUT.&lt;/p&gt;

&lt;p&gt;Functions used include:
glutCreateMenu(), glutAddMenuEntry(), glutAttachMenu(), glRasterPos3d(), glutWireSphere(), glutSolidSphere(), glutWireCube(), glutSolidCube(), glutWireCone(), glutSolidCone(), glutWireTorus(), glutSolidTorus(), glutWireIcosahedron(), glutSolidIcosahedron(), glutWireOctahedron(), glutSolidOctahedron(), glutWireTetrahedron(), glutSolidTetrahedron(), glutWireDodecahedron(), glutSolidDodecahedron(), glutWireTeapot(), glutSolidTeapot()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/2jrkkmrvanjelrj/episode-006.mov?dl=1&quot;&gt;Download the screencast, 20.7 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=D-tefNPQmaM&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/D-tefNPQmaM?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;p&gt;Try modifying objSlices and objStacks to see how the objects change!&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/1159834.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 5 - Using GLUT for OpenGL interaction</title>
   <link href="http://davidwparker.com/2011/08/16/opengl-screencast-5-using-glut-for-opengl-interaction/"/>
   <updated>2011-08-16T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/16/opengl-screencast-5-using-glut-for-opengl-interaction</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss using GLUT for different OpenGL interactions, including the mouse and keyboard.&lt;/p&gt;

&lt;p&gt;Functions used include:
glutKeyboardFunc(), glutSpecialFunc(), glutMouseFunc(), glutPassiveMotionFunc(), glutGetModifiers(), glutPostRedisplay()&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/3g8qgorfykujqs0/episode-005.mov?dl=1&quot;&gt;Download the screencast, 13.5 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=NNgRm-EqAmM&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/NNgRm-EqAmM?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1150282.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 4 - Drawing in 2D: Triangles, Quads, and Polygons</title>
   <link href="http://davidwparker.com/2011/08/11/opengl-screencast-4-drawing-in-2d-triangles-quads-and-polygons/"/>
   <updated>2011-08-11T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/11/opengl-screencast-4-drawing-in-2d-triangles-quads-and-polygons</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss drawing triangles, quads, and polygons in OpenGL.&lt;/p&gt;

&lt;p&gt;Functions used include:
GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS, GL_QUAD_STRIP, GL_POLYGON&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/9n23c1ru24ztkr4/episode-004.mov?dl=1&quot;&gt;Download the screencast, 17.5 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Fllti0OwMRA&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/Fllti0OwMRA?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/1141208.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 3 - Drawing in 2D: Points and Lines</title>
   <link href="http://davidwparker.com/2011/08/08/opengl-screencast-3-drawing-in-2d-points-and-lines/"/>
   <updated>2011-08-08T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/08/08/opengl-screencast-3-drawing-in-2d-points-and-lines</id>
   <content type="html">&lt;p&gt;In this screencast, I discuss drawing points and lines in OpenGL. I also introduce the vector format for supplying variables to OpenGL functions.&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/aqnhe8z7030hzkj/episode-003.mov?dl=1&quot;&gt;Download the screencast, 19.5 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=wKoCx0Gy8PY&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/wKoCx0Gy8PY?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;p&gt;file: 003.c&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include &quot;screencasts.h&quot;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*  Poor man's approximation of PI */&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define PI 3.1415926535898
&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/*  Determine number of elements in an array  */&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define Length(x) (sizeof (x) / sizeof *(x))
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*  Globals */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* dimension of orthogonal box */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;OpenGL screenscasts 3: Drawing points and lines&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;windowWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;windowHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Display the scene
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
			  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;GLfloat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Clear the image */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glClear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/*  Reset previous transforms */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Draw something here */&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// GL_POINTS
&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;//  glPointSize(4.0);
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_POINTS);
  glColor3fv( color1 );
  glVertex2fv( vert1 );
  glColor3fv( color23[0] );
  glVertex2fv( vert2 );
  glColor3fv( color23[1] );
  glVertex2fv( vert3 );
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// GL_LINES
&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// 3 vertexes =&amp;gt; 1 lines
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINES);
  glColor3f(1.0,1.0,1.0);
  glVertex2f( 0.0, 0.5);
  glColor3f(0.0,1.0,0.0);
  glVertex2f( 0.5,-0.5);
  glColor3f(0.0,0.0,1.0);
  glVertex2f(-0.5,-0.5);
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// 4 vertexes =&amp;gt; 2 lines
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINES);
  glColor3f(1.0,1.0,1.0);
  glVertex2f( 0.5, 0.5);
  glColor3f(0.0,1.0,0.0);
  glVertex2f( 0.5,-0.5);
  glColor3f(0.0,0.0,1.0);
  glVertex2f(-0.5,-0.5);
  glColor3f(0.0,1.0,1.0);
  glVertex2f(-0.5,0.5);
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// GL_LINE_STRIP
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINE_STRIP);
  glColor3f(1.0,1.0,1.0);
  glVertex2f( 0.5, 0.5);
  glColor3f(0.0,1.0,0.0);
  glVertex2f( 0.5,-0.5);
  glColor3f(0.0,0.0,1.0);
  glVertex2f(-0.5,-0.5);
  glColor3f(0.0,1.0,1.0);
  glVertex2f(-0.5,0.5);
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// GL_LINE_LOOP
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINE_LOOP);
  glColor3f(1.0,1.0,1.0);
  glVertex2f( 0.5, 0.5);
  glColor3f(0.0,1.0,0.0);
  glVertex2f( 0.5,-0.5);
  glColor3f(0.0,0.0,1.0);
  glVertex2f(-0.5,-0.5);
  glColor3f(0.0,1.0,1.0);
  glVertex2f(-0.5,0.5);
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// Other constructs between glBegin and glEnd
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINE_LOOP);
  for (i = 0; i &amp;lt; Length(color4); i++) {
    glColor3fv(color4[i]);
    glVertex3fv(vert4[i]);
  }
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*
  glBegin(GL_LINE_LOOP);
  for (i = 0; i &amp;lt; 180; i++) {
    angle = 2*PI*i/180;
    glVertex2f(cos(angle), sin(angle));
  }
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// additional functions
&lt;/span&gt;  &lt;span class=&quot;cm&quot;&gt;/*
  glLineWidth(3.0);
  glEnable(GL_LINE_STIPPLE);
  glLineStipple(1, 0x00FF);
  //glLineStipple(2, 0x00FF);
  //glLineStipple(3, 0x00FF);
  glBegin(GL_LINE_LOOP);
  glColor3f(1.0,1.0,1.0);
  glVertex2f( 0.5, 0.5);
  glColor3f(0.0,1.0,0.0);
  glVertex2f( 0.5,-0.5);
  glColor3f(0.0,0.0,1.0);
  glVertex2f(-0.5,-0.5);
  glColor3f(0.0,1.0,1.0);
  glVertex2f(-0.5,0.5);
  glEnd();
  */&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Flush and swap */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glFlush&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutSwapBuffers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  GLUT calls this routine when the window is resized
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_PROJECTION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glOrtho&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_MODELVIEW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  windowKey
 *  ------
 *  GLUT calls this routine when a non-special key is pressed
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;windowKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/*  Exit on ESC */&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Start up GLUT and tell it what to do
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitDisplayMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GLUT_RGB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GLUT_DOUBLE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitWindowSize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowWidth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutCreateWindow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;glutDisplayFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutReshapeFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutKeyboardFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;glutMainLoop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 2 - Bitmap Characters</title>
   <link href="http://davidwparker.com/2011/07/29/opengl-screencast-2-bitmap-characters/"/>
   <updated>2011-07-29T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/07/29/opengl-screencast-2-bitmap-characters</id>
   <content type="html">&lt;p&gt;Bitmap Characters are great because they allow us to display text information. We’ll be using these convenience methods in future episodes moving forward so that we have easy access to specific data.&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/uh9rez74f3wp2su/episode-002.mov?dl=1&quot;&gt;Download the screencast, 49.3 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=sSRxY7UC54Q&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/sSRxY7UC54Q?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;p&gt;file: screencasts.h&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#ifndef SCREENCASTS
#define SCREENCASTS
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/* standard headers */&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdarg.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;math.h&amp;gt;
#include &amp;lt;time.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/* OpenGL and friends */&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#ifdef USEGLEW
#include &amp;lt;GL/glew.h&amp;gt;
#endif
#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include &amp;lt;GLUT/glut.h&amp;gt;
#else
#include &amp;lt;GL/glut.h&amp;gt;
#endif
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include &quot;prototypes.h&quot;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#endif&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;file: prototypes.h&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/*  Printing convenience (print.c) */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;printv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;va_list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;...);&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;printAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;...);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;file: print.c&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include &quot;screencasts.h&quot;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LEN 8192
&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;printv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;va_list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;buf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;vsnprintf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;glutBitmapCharacter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GLUT_BITMAP_HELVETICA_10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;...)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;va_list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;va_start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;printv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;va_end&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;printAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;...)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;va_list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glWindowPos2i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;va_start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;printv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;va_end&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;file: 002.c&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include &quot;screencasts.h&quot;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*  Globals */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* dimension of orthogonal box */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Bitmap chars&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Display the scene
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/*  Clear the image */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glClear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/*  Reset previous transforms */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Draw something here */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glBegin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_POLYGON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glEnd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Bitmap chars */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;printAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;hello bitmap characters&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glWindowPos2i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;and again&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/*  Flush and swap */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glFlush&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutSwapBuffers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  GLUT calls this routine when the window is resized
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_PROJECTION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glOrtho&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_MODELVIEW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Start up GLUT and tell it what to do
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitDisplayMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GLUT_RGB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GLUT_DOUBLE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitWindowSize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutCreateWindow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutDisplayFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutReshapeFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutMainLoop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>OpenGL Screencast 1 - Hello World (Glut)</title>
   <link href="http://davidwparker.com/2011/07/22/opengl-screencast-hello-world-glut/"/>
   <updated>2011-07-22T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2011/07/22/opengl-screencast-hello-world-glut</id>
   <content type="html">&lt;p&gt;I’ve spent a good bit of time recently doing quite a bit of C and OpenGL and I figured this would be a good time to post some OpenGL screencasts. This first screencast is an introduction to OpenGL 2.1 and GLUT.&lt;/p&gt;

&lt;p&gt;The code is available to download on &lt;a href=&quot;https://github.com/davidwparker/opengl-screencasts-1&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://dl.dropboxusercontent.com/s/q96n5eyd9cvlrpb/episode-001.mov?dl=1&quot;&gt;Download the screencast, 51.7 MB .mov&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;watch-the-screencast&quot;&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=QO4NTBWJQLg&quot;&gt;YouTube&lt;/a&gt;&lt;/p&gt;

&lt;iframe width=&quot;425&quot; height=&quot;349&quot; src=&quot;http://www.youtube.com/embed/QO4NTBWJQLg?hl=en&amp;amp;fs=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.opengl.org/&quot;&gt;OpenGL&lt;/a&gt; main site&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.opengl.org/documentation/&quot;&gt;OpenGL Documentation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.opengl.org/wiki/Main_Page&quot;&gt;OpenGL wiki&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.opengl-redbook.com/&quot;&gt;OpenGL Programming Guide&lt;/a&gt; (Red Book)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;great-tutorials&quot;&gt;Great tutorials&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.swiftless.com/&quot;&gt;Swiftless&lt;/a&gt; Gaming Tutorials&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.lighthouse3d.com/&quot;&gt;Lighthouse 3d&lt;/a&gt; OpenGL Tutorials&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://nehe.gamedev.net/&quot;&gt;Nehe&lt;/a&gt; Various OpenGL Tutorials&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;other-libraries-than-glut&quot;&gt;Other libraries (than GLUT)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.libsdl.org/&quot;&gt;SDL&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://qt.nokia.com/&quot;&gt;QT&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.sfml-dev.org/&quot;&gt;SFML&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;code&quot;&gt;Code&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdarg.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*  OpenGL with prototypes for glext */&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include &amp;lt;GLUT/glut.h&amp;gt;
#else
#include &amp;lt;GL/glut.h&amp;gt;
#endif
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*  Globals */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* dimension of orthogonal box */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Hello OpenGL&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Display the scene
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glClear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;cm&quot;&gt;/* draw something */&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glBegin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_POLYGON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glColor3f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glVertex2f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glEnd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;glFlush&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutSwapBuffers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  GLUT calls this routine when the window is resized
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_PROJECTION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glOrtho&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;w2h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glMatrixMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GL_MODELVIEW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glLoadIdentity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/*
 *  Start up GLUT and tell it what to do
 */&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitDisplayMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GLUT_RGB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GLUT_DOUBLE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutInitWindowSize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutCreateWindow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutDisplayFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutReshapeFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reshape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;glutMainLoop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>Any Metadata Bookmarklet</title>
   <link href="http://davidwparker.com/2010/04/10/any-metadata-bookmarklet/"/>
   <updated>2010-04-10T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/04/10/any-metadata-bookmarklet</id>
   <content type="html">&lt;p&gt;I spent yesterday creating a bookmarklet that can be used to add metadata to any web domain.  I wanted to learn how to create bookmarklets and I want to learn a little about &lt;code&gt;html5&lt;/code&gt; localStorage so this little one-day project was perfect.&lt;/p&gt;

&lt;h2 id=&quot;see-it-in-action&quot;&gt;See it in action&lt;/h2&gt;

&lt;p&gt;Drag the following bookmarklet to you bookmarks and use it whenever you want to save metadata to any web domain you would like.  If you don’t like the idea of running a script off someone else’s server, then feel free to download it via &lt;a href=&quot;http://github.com/davidwparker/anymetadata-bookmarklet-js&quot;&gt;github&lt;/a&gt; and put it on your server.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;javascript:(function(){_amd=document.createElement('SCRIPT');_amd.type='text/javascript';_amd.src='http://davidwparker.com/js/anymetadata.bookmarklet.js';document.getElementsByTagName('head')[0].appendChild(_amd);})();&quot;&gt;Any Metadata&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;fork-it-and-make-it-better&quot;&gt;Fork it and make it better&lt;/h2&gt;

&lt;p&gt;The code is on &lt;a href=&quot;http://github.com/davidwparker/anymetadata-bookmarklet-js&quot;&gt;github&lt;/a&gt;.  There are some things which I would like to see changed/added:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Load json2, jQuery, and jQuery-ui and theme in a better manner.&lt;/li&gt;
  &lt;li&gt;Make it so I don’t need to use intervals to check that the scripts/css were inserted into the dom before using them.&lt;/li&gt;
  &lt;li&gt;Allow the bookmarklet to save to a specific URL and not just the domain.&lt;/li&gt;
  &lt;li&gt;Allow the bookmarklet to save to a server and not just localStorage (for cross-browser metadata).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’m sure the list could go on and on.  If you have any comments, questions, etc.  Feel free to ask via &lt;a href=&quot;http://twitter.com/davidwparker&quot;&gt;twitter&lt;/a&gt; or &lt;a href=&quot;http://github.com/davidwparker&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Simple API in Rails 3 using respond_to and respond_with</title>
   <link href="http://davidwparker.com/2010/03/09/api-in-rails-respond-to-and-respond-with/"/>
   <updated>2010-03-09T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/03/09/api-in-rails-respond-to-and-respond-with</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://davidwparker.com/2010/03/08/simple-json-api-in-django/&quot;&gt;Yesterday&lt;/a&gt; I showed you how to create a simple JSON API in &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;.  Today I’m going to show you how to do the same thing in Rails 3.&lt;/p&gt;

&lt;p&gt;Whereas in Django, by default you have to check for the specific &lt;code&gt;HTTP_ACCEPT&lt;/code&gt; header you want to work with, in Rails, you don’t.  This is known as &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_negotiation&quot;&gt;Content Negotiation&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;content-negotiation-in-rails&quot;&gt;Content Negotiation in Rails&lt;/h2&gt;

&lt;p&gt;So rather than having an &lt;code&gt;if&lt;/code&gt; statement checking for the specific accept header, you just use &lt;code&gt;respond_to&lt;/code&gt; and &lt;code&gt;respond_with&lt;/code&gt;.  In Rails 2.X, you would do something like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;UsersController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ApplicationController&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;index&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@users&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;all&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@users&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;json&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:json&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@users&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redirect_to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;users_url&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@user&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;json&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:json&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@user&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Notice the &lt;code&gt;respond_to&lt;/code&gt; block.  In it, you just tell Rails which format to use when expecting a certain format.&lt;/p&gt;

&lt;p&gt;In Rails 3, it’s even easier.  Using &lt;code&gt;respond_with&lt;/code&gt;, you can now do:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;UsersController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ApplicationController&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:json&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;index&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;respond_with&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@users&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;respond_with&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:location&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;users_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can read more details on how to use &lt;code&gt;respond_with&lt;/code&gt; on Ryan Daigle’s &lt;a href=&quot;http://ryandaigle.com/articles/2009/8/6/what-s-new-in-edge-rails-cleaner-restful-controllers-w-respond_with&quot;&gt;blog&lt;/a&gt; and about ActiveModel on the Engine Yard &lt;a href=&quot;http://www.engineyard.com/blog/2010/rails-and-merb-merge-orm-agnosticism-part-5-of-6/&quot;&gt;blog&lt;/a&gt;.  In detail, Yehuda explains that the “available providable formats are transparently determined by introspecting the object”.  To me, this is great as it’s one less &lt;code&gt;require&lt;/code&gt; or &lt;code&gt;import&lt;/code&gt; statement to worry about.&lt;/p&gt;

&lt;h2 id=&quot;content-negotiation-in-django&quot;&gt;Content Negotiation in Django&lt;/h2&gt;

&lt;p&gt;James Bennett wrote an excellent article on doing content negotiation in Django &lt;a href=&quot;http://www.b-list.org/weblog/2008/nov/29/multiresponse/&quot;&gt;here&lt;/a&gt;.  It is based on Daniel Lindsley’s work &lt;a href=&quot;http://toastdriven.com/fresh/multiresponse/&quot;&gt;here&lt;/a&gt;, which was “loosely based around similar functionality, called &lt;code&gt;respond_to&lt;/code&gt; in Rails”.  I haven’t tried the code in the articles yet, but the idea looks very good and will probably provide me with what I want in Django without having my code splattered with &lt;code&gt;if&lt;/code&gt; statements for the sake of content negotiation.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Simple JSON API in Django</title>
   <link href="http://davidwparker.com/2010/03/08/simple-json-api-in-django/"/>
   <updated>2010-03-08T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/03/08/simple-json-api-in-django</id>
   <content type="html">&lt;p&gt;For the Bible API, I made the decision early on that I was going to be using &lt;a href=&quot;http://www.json.org/&quot;&gt;JSON&lt;/a&gt; for the API.&lt;/p&gt;

&lt;p&gt;Creating a JSON API in Django is extremely simple.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;views&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;py&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;django.core&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;serializers&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;django.http&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HttpResponse&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;verses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;'''Returns a list of verses for a given version, book, chapter, and optional verses'''&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_verses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;'application/json'&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;META&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'HTTP_ACCEPT'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HttpResponse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serializers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;json&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mimetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'application/json'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;#do some non-json stuff here&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;First, we make sure to import serializers from &lt;code&gt;django.core&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the verses method, we get the verses from the model.  Next, we check if the &lt;code&gt;HTTP_ACCEPT&lt;/code&gt; header contains &lt;code&gt;application/json&lt;/code&gt;.  If so, then we return an HttpResponsewith the verses serialized to “json” with a &lt;code&gt;mimetype&lt;/code&gt; of &lt;code&gt;application/json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can then test your API using &lt;a href=&quot;http://curl.haxx.se/&quot;&gt;curl&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;curl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;header&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Accept: application/json&quot;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;your&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And that’s it.  You can also do the same with XML if you so choose.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Parsing Bible Searches</title>
   <link href="http://davidwparker.com/2010/03/04/parsing-bible-searches/"/>
   <updated>2010-03-04T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/03/04/parsing-bible-searches</id>
   <content type="html">&lt;p&gt;My most recent endeavor is to make stellar Bible API. This post is to explain some of the pains I took to handle some different searches for the API.&lt;/p&gt;

&lt;p&gt;When searching the Bible, there’s a lot of different input that a user may provide. For example, a user may type:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Jesus&lt;/li&gt;
  &lt;li&gt;John&lt;/li&gt;
  &lt;li&gt;Jesus John&lt;/li&gt;
  &lt;li&gt;Jesus John Peter&lt;/li&gt;
  &lt;li&gt;Jesus John 1&lt;/li&gt;
  &lt;li&gt;Jesus 1 John 2&lt;/li&gt;
  &lt;li&gt;Jesus 1 John 2 sin&lt;/li&gt;
  &lt;li&gt;Jesus 1 John 2:1-10&lt;/li&gt;
  &lt;li&gt;John 1&lt;/li&gt;
  &lt;li&gt;John 1:1&lt;/li&gt;
  &lt;li&gt;John 1:1-10&lt;/li&gt;
  &lt;li&gt;John 1:1-10 love&lt;/li&gt;
  &lt;li&gt;the love&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And on and on the list goes. So basically, we’re looking at the following different input:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Keyword&lt;/li&gt;
  &lt;li&gt;Common word&lt;/li&gt;
  &lt;li&gt;Bible book&lt;/li&gt;
  &lt;li&gt;Chapter&lt;/li&gt;
  &lt;li&gt;Leading number on a Bible book (the ‘1’ in 1 John)&lt;/li&gt;
  &lt;li&gt;Chapter:Verse combo&lt;/li&gt;
  &lt;li&gt;Chapter:Verse-Verse range combo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My Bible database with verses contains a single table which contains the version, book, book order, chapter, verse, and verse text. Rather than having multiple tables with version has many books, which has many chapters, which has many verses, I decided to go with a single table. I mainly did this for speed, as the extra lookup are unnecessary.  Additionally, the verses table would have to have the chapter, book, and version foreign keys in them anyway, so it’s kind of pointless to separate it all out. That said, let’s take a look at how I’m parsing the data. The code builds two different searches, one for passages, and one based on all input as keywords. Here’s the code, and we’ll dissect it below.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;common_words&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'e'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'i'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'o'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'u'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'an'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'and'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'as'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'is'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'it'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'of'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'or'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'the'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;terms&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;The following words are too common and were not included in the search: &quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;'&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;' &quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;notices&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;errors&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Enter a search term.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;enumerate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;notices&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;The word '&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;' is too short and was not included in the search.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_next&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;prev_term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;prev_term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;next_term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_next&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot; &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;next_term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r'^(?P&amp;lt;chapter&amp;gt;\d+)(:)?(?P&amp;lt;verse&amp;gt;\d+)?(\-)?(?P&amp;lt;verse2&amp;gt;\d+)?$'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'chapter'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'verse'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'verse2'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chapter__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse__in&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book__in&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;errors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;keyverses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;So let’s break it down:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;common_words&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'an'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'and'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'as'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'is'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'it'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'of'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'or'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'the'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;terms&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here we’re just defining the variables and splitting up q, which was the search criteria in the &lt;code&gt;GET&lt;/code&gt; request.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;The following words are too common and were not included in the search: &quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;'&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;' &quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;notices&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;notice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Next, we pull out the common words and add a notice for the user.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;errors&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Enter a search term.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;First we make sure that they provided a search term after removing common words.
Last check before the real parsing, we see if the length is one and it’s not a number and it’s length is 3 or more, we find any books that it may be, and we assign the term as a something we’re going to search for in the keyword search. The &lt;code&gt;else&lt;/code&gt; is where the real meat begins.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;enumerate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;common_words_used&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;notices&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;The word '&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;' is too short and was not included in the search.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In the &lt;code&gt;for&lt;/code&gt; loop, we check if any word is not numeric and it’s length is shorter than 3. I throw out any searches for these super short words, or partial words. I also add these to &lt;code&gt;common_words_used&lt;/code&gt;, for checking against.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isnumeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_next&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;prev_term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_prev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;prev_term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;next_term&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_next&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_terms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot; &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;next_term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In this chunk, I first assign the term as a keyword, for the keyword search.&lt;/p&gt;

&lt;p&gt;Next, I determine if it’s a number. This means that the character could be a chapter or a leading number on a Bible book. In that case, we need to look at the previous and next term. I find the previous and next number in the index, and then find the previous terms. As Python’s &lt;code&gt;list&lt;/code&gt; wraps index lookup (&lt;code&gt;list[-1]&lt;/code&gt; is valid and returns the last item in the list), I make sure the previous index number is greater or equal to 0 first. Once I find the previous term, I look up all book names from that term. If there are any, I assign the current term as the chapter number.&lt;/p&gt;

&lt;p&gt;If I haven’t found a book yet, then I check on the next term. I find book names based on the next term, but I also include the current term, which would be a leading number on a book. If there are any books (which should only ever return 1 or 0), then I assign it to book.&lt;/p&gt;

&lt;p&gt;For the next term I have to wrap in &lt;code&gt;try&lt;/code&gt; and &lt;code&gt;except&lt;/code&gt; statements for when the index is out of bounds. Similarly, I could get the length of new_terms and compare that to make sure I’m within bounds too.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_book_names_from_abbr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r'^(?P&amp;lt;chapter&amp;gt;\d+)(:)?(?P&amp;lt;verse&amp;gt;\d+)?(\-)?(?P&amp;lt;verse2&amp;gt;\d+)?$'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'chapter'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'verse'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'verse2'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verseText__icontains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If the term was not numeric, then it was a keyword, common word, Bible book, or a chapter:verse(-verse range) combo. I already removed the common/short words, so it will either be a Bible book, a keyword, or a chapter+.&lt;/p&gt;

&lt;p&gt;First, we get all the books based on the term. Second, we run a regular expression on the term, in the expected chapter:verse-verse2 format, where only chapter is required. If there’s a result from the regular expression, then we assign the appropriate variables (chapter, verse, and verse2, if it’s a range search).&lt;/p&gt;

&lt;p&gt;If there were no results from the regex, and the length of the books is 0, then it must be a keyword. Finally if there are any books, we add them to our book array.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chapter__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse__in&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verse2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;chapter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;verses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Q&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book__in&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;errors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;keyverses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Verse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version__iexact&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;For the last piece of the puzzle, we finalize building the criteria arguments and then do the actual lookups.&lt;/p&gt;

&lt;p&gt;First we assign the given book. Next we assign the chapter. Last, we assign verse if there is no verse 2 or verse 2 is before verse 1. If that’s not the case, then we assign a range search.&lt;/p&gt;

&lt;p&gt;For the passage search, we never do a passage search if there’s only one term given. So if you search for “John”, then you’ll only get keyword searches, but you will get the books with John in the title listed (John, 1 John, 2 John, 3 John). If you did a search for “1 John”, we won’t do a passage search without a chapter. We need to have several arguments, so &lt;code&gt;args&lt;/code&gt; must be greater than 1, and we should have an array of all the books we want to look in, so that must be greater than 1 as well. We include this even if we have an exact book, which will override the IN statement.&lt;/p&gt;

&lt;p&gt;For the keyword search, we first check that we don’t have any errors and that there’s at least one keyword argument. If so, then we find all the keyword passages based on these.&lt;/p&gt;

&lt;p&gt;And that’s pretty much it. Overall, it ended up being quite a bit of work to figure out the exact intracies of how a Bible search may work, but it ended up being worth it. I can guarantee there are some crazy searches that won’t work with my parsing, but it solves 95% of my use-cases. With search finished, the API is almost finished now.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Django Raw and Raw SQL</title>
   <link href="http://davidwparker.com/2010/03/02/django-raw-and-raw-sql/"/>
   <updated>2010-03-02T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/03/02/django-raw-and-raw-sql</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://djangoadvent.com/1.2/smoothing-curve/&quot;&gt;Django Raw&lt;/a&gt; is pretty sweet.  Basically, you use it like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;models&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;SELECT * FROM model&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;models&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;raw&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This is fan-freaking-tastic for most scenarios.  However, it does have a limitations: first, it can only use SELECT statements, and second (and more importantly for me), the ID column must be apart of the SELECT statement.  This second limitation wasn’t listed on Django Advent, so I wanted to share this for all of you in Google-land.  The reason that it requires the ID column is because raw is meant to get back working model instances, as Sean told me on &lt;a href=&quot;http://twitter.com/theSeanOC/status/9020160524&quot;&gt;Twitter&lt;/a&gt;.  It really make sense.  You have a model, you want to get the data back for them, modify it in some shape or fashion, then commit back to the database.&lt;/p&gt;

&lt;p&gt;Unfortunately, this doesn’t allow for SELECT statements such as &lt;code&gt;SELECT DISTINCT field FROM model&lt;/code&gt;.  On my current project, I have several fields where there may be repeated data, but I want to get the distinct values of those fields.  Unfortunately, I can’t use the new hotness in Django Raw, so I’ve had to work on a different solution:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;models&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;py&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_chapter_numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;'''Returns a list of unique chapter numbers'''&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;chapters&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SELECT DISTINCT chapter FROM models WHERE book = &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;s ORDER BY chapter&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get_first_col&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chapters&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;'''Returns an array based on the keyword arguments'''&lt;/span&gt;
  &lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;django.db&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;connection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transaction&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;cursor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;connection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;query&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;params&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fetchall&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_first_col&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;results&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;results&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;It might not be the best example (as chapter numbers are &lt;em&gt;normally&lt;/em&gt; unique, but bear with me).  Basically, the method &lt;code&gt;get_array&lt;/code&gt; is the meat of the example.  In the example, &lt;code&gt;get_array&lt;/code&gt; will run any query given to it (UPDATE, SELECT, etc), binding the params array to the parameters in the query.  This won’t return Model Objects, but rather an array of rows, which contains an array of columns.  Any manipulation that I want to do on the results happens in another method: in my example, I’m creating a new array with the actual column value in the method &lt;code&gt;get_first_col&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you want to work more with “real raw SQL”, see the &lt;a href=&quot;http://docs.djangoproject.com/en/1.1/topics/db/sql/#topics-db-sql&quot;&gt;django docs&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Where are the Django Standards?</title>
   <link href="http://davidwparker.com/2010/02/27/where-are-the-django-standards/"/>
   <updated>2010-02-27T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/02/27/where-are-the-django-standards</id>
   <content type="html">&lt;p&gt;I guess the title is my question.  Really not more to say than that.  I’m really trying to find a standard way that Django does things: specifically, I’d like to know where the majority of my business/domain logic goes?&lt;/p&gt;

&lt;p&gt;So far, I’ve read and looked at &lt;a href=&quot;http://djangobook.com&quot;&gt;Django Book&lt;/a&gt;, &lt;a href=&quot;http://pinaxproject.com&quot;&gt;Pinax Project&lt;/a&gt;, and &lt;a href=&quot;http://docs.djangoproject.com/en/1.1/&quot;&gt;The Django Documentation&lt;/a&gt;, and to my dismay, they’ve all been a little bit different.  I also tried posting to the &lt;a href=&quot;http://groups.google.com/group/django-users&quot;&gt;Django Google Group&lt;/a&gt; and I didn’t receive any help there either.  I really just want to conform to the standard here…&lt;/p&gt;

&lt;p&gt;As I come from a &lt;a href=&quot;http://rubyonrails.org&quot;&gt;Rails&lt;/a&gt; background, I’ve decided to use that as my standard until I find something in the Django realm.  I’ve been placing as much business logic as possible in the models, to maintain a &lt;a href=&quot;http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model&quot;&gt;skinny controller&lt;/a&gt; (Views in Django).  It’s worked out extremely well and I feel the code is a lot more “Testable” as well.&lt;/p&gt;

&lt;p&gt;Anyway, if anyone who’s a stellar Django developer wants to let me know that I’m doing it wrong, feel free to e-mail me or message me on &lt;a href=&quot;http://twitter.com/davidwparker&quot;&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Converted Blog To Html5</title>
   <link href="http://davidwparker.com/2010/02/26/converted-blog-to-html5/"/>
   <updated>2010-02-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2010/02/26/converted-blog-to-html5</id>
   <content type="html">&lt;p&gt;As promised, I’ve converted this blog to HTML5.  Now this doesn’t mean that I just converted the doctype… no, actually, if you &lt;code&gt;view source&lt;/code&gt;, then you will see that I actually am using the new tags such as &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, etc.  It’s actually kind of exciting, as I feel like I’m ahead of the game for once.&lt;/p&gt;

&lt;p&gt;That said, to make the changes, I followed Mark Pilgram’s book &lt;a href=&quot;http://diveintohtml5.org&quot;&gt;Dive Into HTML5&lt;/a&gt;.  If you’re a developer, programmer, designer, whatever, then I fully recommend checking out the book.  It’s extremely detailed, and if you think that it’s as helpful as I have (so far), then you’ll undoubtedly be giving Mark your money when the dead-tree version comes out.&lt;/p&gt;

&lt;p&gt;Today marks my second day of actually learning Emacs as well.  So far, I’ve gone through the entire “basic” tutorial provided with Emacs and made it my default text-editor.  So far, I haven’t really gotten into the whole macros thing yet, but I’m pretty excited about it.  I modified a good bit of code for my changes today (I had stuff spread out) and I was really quick to learn the basic keybindings.  I’m getting pretty decent at understanding the Emacs buffer and switching files/buffers very quick.  I’m pretty sure that I’ll be sticking with it- especially once I learn the awesomeness that is macro-building.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>My Jekyll Rake File</title>
   <link href="http://davidwparker.com/2009/12/01/my-jekyll-rake-file/"/>
   <updated>2009-12-01T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/12/01/my-jekyll-rake-file</id>
   <content type="html">&lt;p&gt;Perhaps once I get off my lazy butt, I’ll upload my Jekyll setup to Github.  In the meantime, I want to show off my Rake file, which I use to deploy this blog.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:&quot;site:deploy:dev&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:site&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deletes _site&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:delete&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deleting _site&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'rm -r _site'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deleting _site complete&quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;build _site&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:build&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;build and deploy dev&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:dev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:delete&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;building _site&quot;&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'jekyll --server'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;build pro&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pro&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:delete&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;building production _site&quot;&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'jekyll'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;building _site complete&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  
  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;change environment&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:env&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;change to development environment&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:dev&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;change to dev environment&quot;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;updateConfig&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;env: dev&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;change to production environment&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pro&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;change to pro environment&quot;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;updateConfig&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;env: pro&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;rsync _site&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:rsync&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:&quot;build:pro&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'rsync -avrz _site/ nemo7467@www.davidwparker.com:davidwparker.com'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;rsync _site's CSS&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:rsync_css&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:&quot;build:pro&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'rsync -avrz _site/css nemo7467@www.davidwparker.com:static.davidwparker.com'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;deploy the application&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:deploy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;builds the development _site&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:dev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:&quot;env:dev&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:&quot;build:dev&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;dev site deployed&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;builds the production _site and deploys it&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pro&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:&quot;env:pro&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:rsync&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:rsync_css&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;pro site deployed&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;kp&quot;&gt;private&lt;/span&gt; 
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;updateConfig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;IO&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;readlines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;_config.yml&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rep&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;_config.yml&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;w&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Basically, the overall gist is that I have ssh keys setup with Dreamhost and I can use a single command to deploy to production &lt;code&gt;rake site:deploy:pro&lt;/code&gt;.  I haven’t seen too many sites that have a difference for development versus production, but I went ahead and added an env variable in my _config.yml so that I could distinguish where I was working.  The main reason for this is for: 1) google-analytics are not deployed in development and 2) CSS is served from a subdomain within my domain on production.  I really like this approach and it works well for me.  If you have something similar, let me know, as I’d definitely be interested.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>What happened to all the major Ruby bloggers?</title>
   <link href="http://davidwparker.com/2009/11/23/what-happened-to-all-the-major-ruby-bloggers/"/>
   <updated>2009-11-23T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/11/23/what-happened-to-all-the-major-ruby-bloggers</id>
   <content type="html">&lt;p&gt;I first got into Rails several years back, and via Rails, I got into Ruby.  Ruby has been a blast for me to use, but I’m curious to know what happened to all the Ruby bloggers?  More specifically, when was the last time they actually did something technical in a blog post?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://brainspl.at&quot;&gt;Ezra Zygmuntowicz?&lt;/a&gt;
Last tech updated: April 30, 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.chadfowler.com&quot;&gt;Chad Fowler&lt;/a&gt;
Last Ruby update: ???&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dablog.rubypal.com&quot;&gt;David Black&lt;/a&gt;
Last Ruby update: January 16, 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.davidchelimsky.net&quot;&gt;David Chelimsky&lt;/a&gt;
Last Ruby update: February 2, 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://drnicwilliams.com&quot;&gt;Dr Nic&lt;/a&gt;
Last Ruby update: November 15, 2009 (good job Dr Nic!)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://errtheblog.com&quot;&gt;Err the Blog&lt;/a&gt;
Last Ruby update: May 14, 2008&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.fallingsnow.net&quot;&gt;Evan Phoenix&lt;/a&gt;
Last tech update: May 23, 2008&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.hasmanythrough.com&quot;&gt;Josh Susser&lt;/a&gt;
Last tech update: August 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.loudthinking.com/&quot;&gt;David Heinemeier Hansson&lt;/a&gt;
Last Ruby update: May 11, 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://nubyonrails.com&quot;&gt;Geoffrey Grosenbach&lt;/a&gt;
Last Ruby update: May 20, 2009&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.obiefernandez.com/content&quot;&gt;Obie Fernandez&lt;/a&gt;
Last tech update: ???&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Why_the_lucky_stiff&quot;&gt;_why&lt;/a&gt;
Disappeared&lt;/p&gt;

&lt;p&gt;There are a bunch of others, but I think that’s enough to get my point across… So what’s going on?  I have a few theories..&lt;/p&gt;

&lt;h3 id=&quot;lots-of-work&quot;&gt;Lots of Work&lt;/h3&gt;

&lt;p&gt;My first theory is that everybody just has a lot on their plate.  They’re constantly doing work, so they don’t necessarily want or have time to blog about something technological that they thought was interesting.  Obviously, after a long day at the office, the first thing they can think of is how quickly to avoid getting on the computer… and with good reason.  I can’t blame them!&lt;/p&gt;

&lt;h3 id=&quot;github&quot;&gt;&lt;a href=&quot;http://github.com&quot;&gt;Github&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Since Github’s inception, it quickly took root as THE central repository for Ruby Open Source projects.  Many of these people may not be blogging about technical stuff, but they’re doing plenty of technical work as seen by their commit logs on Github.  Perhaps they think if other people want to see what they’re working on (OSS-wise), then people can check out their commits.&lt;/p&gt;

&lt;h3 id=&quot;rubyrails-inside&quot;&gt;&lt;a href=&quot;http://rubyinside.com&quot;&gt;Ruby/Rails Inside&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;With Ruby Inside “aggregating” all the best Ruby information from across the Internet, it may not seem like the major bloggers need to blog little technical issues anymore… someone else out there will probably blog about it and save them the effort.  Perhaps?&lt;/p&gt;

&lt;h3 id=&quot;lots-of-new-entrantsbloggers&quot;&gt;Lots of new Entrants/Bloggers&lt;/h3&gt;

&lt;p&gt;Myself included, there are a lot of new bloggers out there.  It seems to me that perhaps the old hat is just letting the new come in and get their chance at building credibilty, etc.  Or they’re just letting us come in and at least blog some stuff so they don’t have to.&lt;/p&gt;

&lt;h3 id=&quot;different-interestspeople-person-people&quot;&gt;Different Interests/People-Person People&lt;/h3&gt;

&lt;p&gt;Perhaps the major players are just interested in different things?  Perhaps they’re more “People-Person” people and they would rather talk to others in person.  A lot of the blogs above do have recent activity, but the posts are about business, among other things.&lt;/p&gt;

&lt;h3 id=&quot;life-happens&quot;&gt;Life Happens&lt;/h3&gt;

&lt;p&gt;Or perhaps they’ve just realized that life happens, and they don’t necessarily have time to do everything everyday.  Whatever the reason is, I have to say Thanks for all the blogging that you’ve done so far, and I can’t wait until you do it again!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Scrollable Table with jQuery</title>
   <link href="http://davidwparker.com/2009/11/19/scrollable-table-with-jquery/"/>
   <updated>2009-11-19T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/11/19/scrollable-table-with-jquery</id>
   <content type="html">&lt;p&gt;h2. aka jQuery Fixed Table Headers.&lt;/p&gt;

&lt;p&gt;I created this jQuery plugin a little while back.  Basically, it’s headers that don’t move while the table becomes scrollable.&lt;/p&gt;

&lt;p&gt;Demo: &lt;a href=&quot;/demos/jqueryScrollableTable/&quot;&gt;jQuery scrollable table&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Usage:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#t1&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;scrollableTable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#t2&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;scrollableTable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;th&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Only two things to note.  First, the default is to make the table scrollable based on the &lt;code&gt;thead&lt;/code&gt; tag rather than the &lt;code&gt;th&lt;/code&gt;, but the latter is an option (see example above).  Second, thing to note is that the &lt;code&gt;table&lt;/code&gt; tag is surrounded by a &lt;code&gt;div&lt;/code&gt; tag, which has a fixed height and &lt;code&gt;overflow-y:scroll&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Eventually, I’ll go back and add those as options and dynamically create them rather than having to manually do it… but for now it works.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Forgetting the Milk</title>
   <link href="http://davidwparker.com/2009/11/16/forgetting-the-milk/"/>
   <updated>2009-11-16T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/11/16/forgetting-the-milk</id>
   <content type="html">&lt;p&gt;I’ve been using &lt;a href=&quot;http://www.rememberthemilk.com&quot;&gt;Remember the Milk&lt;/a&gt; for a couple of years now, but the last few months I haven’t been using it at all.  Rather than using it as a regular to-do list(s), I was using it kind of like a feature-request repository for my web applications.  Over time, this become too overwhelming.  Instead of working on features listed (or not), I would avoid the work completely.&lt;/p&gt;

&lt;p&gt;A couple of months ago, I decided to remedy this.  First, I deleted all my tasks that I had listed.  Today, I finally removed the (empty) gadget from my iGoogle page and finally closed/deleted the account.  I’ve noticed in the last few months that I’ve done a lot better about coding regularly.  Additionally, I’ve started a queue system using a good old whiteboard, with a maximum of three things on the queue.  The queue system isn’t just for my features though; the queue is for everything in my life (like getting grad school essays written), and I &lt;a href=&quot;http://zenhabits.net/2007/02/how-not-to-multitask-work-simpler-and/&quot;&gt;single-task&lt;/a&gt; until each item is done.  I also have a simple table on my whiteboard with dates on the horizontal and tasks on the vertical for tasks that need to be done daily (such as working out).&lt;/p&gt;

&lt;p&gt;Using this system, I’ve been immensely more productive and I don’t plan on stopping any time soon.&lt;/p&gt;

&lt;p&gt;That said, for those who are looking for a great to-do list application, I can’t recommend &lt;a href=&quot;http://www.rememberthemilk.com&quot;&gt;Remember the Milk&lt;/a&gt; enough.  The integration with iGoogle/gmail/etc as well as the web application itself are all extremely well made, and I’m sure the &lt;a href=&quot;http://www.rememberthemilk.com/services/&quot;&gt;twitter/blackberry/iphone/android/etc&lt;/a&gt; integration is good too.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sinatra Base Static File Issue</title>
   <link href="http://davidwparker.com/2009/11/13/sinatra-base-static-file-issue/"/>
   <updated>2009-11-13T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/11/13/sinatra-base-static-file-issue</id>
   <content type="html">&lt;p&gt;I’m currently working on a fun project in &lt;a href=&quot;http://sinatrarb.com&quot;&gt;Sinatra&lt;/a&gt; and I came across something that was an issue.&lt;/p&gt;

&lt;p&gt;Summary: using &lt;code&gt;sinatra/base&lt;/code&gt;, you have to be sure to &lt;code&gt;set :static, true&lt;/code&gt; and &lt;code&gt;set :public, 'public'&lt;/code&gt; or your CSS and JavaScript files will not be found (404 errors).&lt;/p&gt;

&lt;p&gt;On to the code… I have two projects, each with their own app.rb and config.ru:&lt;/p&gt;

&lt;h3 id=&quot;app-1&quot;&gt;App 1&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;app.rb&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sinatra'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'mustache/sinatra'&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:views&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;     &lt;span class=&quot;s1&quot;&gt;'templates/'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:mustaches&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'views/'&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;jQuery + Sinatra + Mustache&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;mustache&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:index&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;config.ru&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'app2'&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Rack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;ShowExceptions&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sinatra&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;application&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;app-2&quot;&gt;App 2&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;app.rb&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sinatra'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sinatra/base'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'mustache/sinatra'&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sinatra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;register&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Mustache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Sinatra&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:views&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;     &lt;span class=&quot;s1&quot;&gt;'templates/'&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:mustaches&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'views/'&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;jQuery + Sinatra + Mustache&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;mustache&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:index&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;config.ru&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'app'&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Rack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;ShowExceptions&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;App&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Obviously, the big difference is that one is a Sinatra application, and the other is an Sinatra extension.  My issue came about because the Sinatra extension would not find the corresponding CSS and JavaScript files in the &lt;code&gt;public&lt;/code&gt; folder for that extension.&lt;/p&gt;

&lt;p&gt;The fix is quite simple and is applied to App 2’s &lt;strong&gt;app.rb&lt;/strong&gt; file.  Just add these two lines:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:static&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:public&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'public'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;like so: &lt;strong&gt;app.rb&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sinatra'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sinatra/base'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'mustache/sinatra'&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sinatra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;register&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Mustache&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Sinatra&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:views&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;     &lt;span class=&quot;s1&quot;&gt;'templates/'&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:mustaches&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'views/'&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;#these are both required by Sinatra::Base&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# to find static files&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:static&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:public&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'public'&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;jQuery + Sinatra + Mustache&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;mustache&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:index&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now the extension will be able to see the public folder and pull files from it.  In case you’re interested, the code in Sinatra that tests these two attributes is at approximately &lt;code&gt;line 1000&lt;/code&gt;, after the comment &lt;code&gt;# static files route&lt;/code&gt;, where it tests &lt;code&gt;pass unless options.static? &amp;amp;&amp;amp; options.public?&lt;/code&gt;.  I’m not sure if this is the desired behaviour or not and I have not found anything in the documentation about this.  I plan on contacting the Sinatra authors though to find out, or to at least be sure that they put this up in their documentation.&lt;/p&gt;

&lt;p&gt;In the meantime, I hope this helps.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jekyll is up and running</title>
   <link href="http://davidwparker.com/2009/11/12/jekyll-is-up-and-running/"/>
   <updated>2009-11-12T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/11/12/jekyll-is-up-and-running</id>
   <content type="html">&lt;p&gt;Finished my conversion of my website from WordPress to Jekyll.  I didn’t get around to figuring out the .htaccess as much as I would have liked (I initially had default permalinks, but changed them due to the fact that I couldn’t figure out how to have my Redirect 301’s point from the old links to the new ones).  So instead, I just kept the old links (now in Jekyll!).&lt;/p&gt;

&lt;p&gt;I did spend a good amount of time looking into .htaccess and figuring out how to raise my YSlow score.  I started with about a 90 (I don’t have too much going on anyway) and ended up with a 97 on the post pages and a 94 on my example pages (I don’t include javascript unless I actually use it, with the exception of Google-analytics).&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Last WordPress Post</title>
   <link href="http://davidwparker.com/2009/10/26/last-wordpress-post/"/>
   <updated>2009-10-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/10/26/last-wordpress-post</id>
   <content type="html">&lt;p&gt;This is going to be my last &lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt; blog post, and after that I’m moving to &lt;a href=&quot;http://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;.  I may eventually get around to making my own publishing system, but for right now I think that Jekyll does pretty much everything that I would want.&lt;/p&gt;

&lt;p&gt;I don’t know when I’ll be doing this, but hopefully I’ll get everything situated in the next couple of weeks.  I also plan on setting up some permanent redirects too, so the Internet doesn’t break.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Europe and jQuery Editable Field</title>
   <link href="http://davidwparker.com/2009/05/11/europe-and-jquery-editable-field/"/>
   <updated>2009-05-11T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/05/11/europe-and-jquery-editable-field</id>
   <content type="html">&lt;p&gt;I’ll be in Europe for the next 2.5 weeks, so my awesome blog will continue to be ignored for a while.  Sorry.&lt;/p&gt;

&lt;p&gt;In the meantime, check out a plugin I’m working on (of many) for jQuery.  Introducing: jQuery Editable Field.  With this plugin, you can make anything editable.&lt;/p&gt;

&lt;p&gt;Demo: &lt;a href=&quot;/demos/editableField-v1.0/jqueryEditableField/&quot;&gt;jQuery Editable Field Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Usage:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;h2.edit&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editableField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onSubmit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Something changed!'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.edit&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;editableField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;It still has a little bit of work, but it mostly does what I need it to… check out the source if you want to explore further.&lt;/p&gt;

&lt;p&gt;Hopefully shortly after I get back from Europe, I’ll be able to post a couple of the other plugins that I’ve been working on.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Re-acquiring Focus</title>
   <link href="http://davidwparker.com/2009/04/17/re-acquiring-focus/"/>
   <updated>2009-04-17T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/04/17/re-acquiring-focus</id>
   <content type="html">&lt;p&gt;It’s been a while since I’ve had regular technical posts here, and I thought that I’d address my remedy to that really quick.&lt;/p&gt;

&lt;p&gt;I recently wanted to become a bit better at JavaScript so I began solving some of the &lt;a href=&quot;http://projecteuler.net/index.php?section=problems&quot;&gt;Project Euler&lt;/a&gt; problems.  Well, that was fine and all, but what I really wanted was to learn the JavaScript language/API.  I didn’t necessarily just want to flex my math skills.  Well, that’s what I felt like I was doing.  Sure, I didn’t get very far and I may go back to it, but until then…&lt;/p&gt;

&lt;p&gt;I’m planning on learning Ruby.  Now, I’ve been doing Rails for nearly 2.5 years now, but I never took the time to formerly &lt;em&gt;learn&lt;/em&gt; the language.  So, that’s where my primary focus will be in the near future.  I just started reading &lt;a href=&quot;http://www.amazon.com/gp/product/0596516177?tag=parker08-20&quot;&gt;The Ruby Programming Language&lt;/a&gt; (Amazon) and I’ll be solving some of the Project Euler problems in &lt;a href=&quot;http://github.com/davidwparker/project_euler/tree/5e5e1d76fe84443d1d583cc56c5bacc9fe2e2ed6/ruby&quot;&gt;Ruby&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;My secondary focus will still be on JavaScript.  I recently installed &lt;a href=&quot;http://couchdb.apache.org/&quot;&gt;CouchDB&lt;/a&gt; and &lt;a href=&quot;http://github.com/jchris/couchapp/tree/master&quot;&gt;CouchApp&lt;/a&gt; on Ubuntu 9.04 and I’m enjoying playing with &lt;a href=&quot;http://github.com/jchris/sofa/tree/master&quot;&gt;Sofa&lt;/a&gt;.  When I’m not feeling like reading up on Ruby, I’ll be working on my own CouchApp.&lt;/p&gt;

&lt;p&gt;Most likely, I’ll be leaving for a weekend in early May and I’ll be gone for 2.5 weeks in May in Europe, but expect regular updates before and after then.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>div float tests</title>
   <link href="http://davidwparker.com/2009/04/17/div-float-tests/"/>
   <updated>2009-04-17T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/04/17/div-float-tests</id>
   <content type="html">&lt;p&gt;Even though I’ve been doing web-related work for seven or eight years now, I still wouldn’t consider myself a &lt;a href=&quot;http://www.csszengarden.com/&quot;&gt;CSS&lt;/a&gt; &lt;a href=&quot;http://meyerweb.com/&quot;&gt;master&lt;/a&gt;.  But that doesn’t mean it’s not too late to start.&lt;/p&gt;

&lt;p&gt;Anyway, I was having a bit of an issue dealing with floats, so I created a quick div float test html to help me figure out exactly what was going on.&lt;/p&gt;

&lt;p&gt;You can check it out &lt;a href=&quot;/demos/divblocktest/&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #8</title>
   <link href="http://davidwparker.com/2009/03/04/project-euler-8/"/>
   <updated>2009-03-04T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/03/04/project-euler-8</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//assign the whole thing into a string&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//convert the string into an array&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//loop through the array&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//starting with the first 5, add up the values of the array and store it&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//compare the next set with the previous set, if it's bigger, store it, it smaller, toss it out&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//99879 - 42&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;charAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;shift&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;five&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0008.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #7</title>
   <link href="http://davidwparker.com/2009/03/03/project-euler-7/"/>
   <updated>2009-03-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/03/03/project-euler-7</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;c1&quot;&gt;//this takes a long time to run to the 10001, change below for correct answer&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;//change to primes[10001] and have patience&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;101&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;findNextPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;//similar to euler3&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;findNextPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot; - &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0007.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #6</title>
   <link href="http://davidwparker.com/2009/03/02/project-euler-6/"/>
   <updated>2009-03-02T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/03/02/project-euler-6</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sumSq&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sqSum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;101&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
       &lt;span class=&quot;nx&quot;&gt;sumSq&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
       &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;sqSum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Square of the Sums: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sqSum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Sum of the Squares: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sumSq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Difference: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sqSum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sumSq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0006.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #5</title>
   <link href="http://davidwparker.com/2009/03/01/project-euler-5/"/>
   <updated>2009-03-01T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/03/01/project-euler-5</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//this is some ugly looking code&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//real number is 232792560&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//js takes forever to find the right answer, so changed num to the answer minus 1.&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//Change low to watch in action&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;232792559&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isNotDivisible&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentDivisible&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isNotDivisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentDivisible&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;testDivisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentDivisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;isNotDivisible&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentDivisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;testDivisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0005.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #4</title>
   <link href="http://davidwparker.com/2009/02/28/project-euler-4/"/>
   <updated>2009-02-28T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/28/project-euler-4</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pal&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePalindrome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePalindrome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//determine the number of pairs and loop through each pair to compare values&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;first&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;charAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;last&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;charAt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;first&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sorted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sorted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;});&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;palindromes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0004.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #3</title>
   <link href="http://davidwparker.com/2009/02/27/project-euler-3/"/>
   <updated>2009-02-27T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/27/project-euler-3</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;c1&quot;&gt;//this script takes a long time to run for the real number, and&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//you may need to make the browser continue the script several times,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//modified number to make it quicker... change back to see in action&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;37&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;456&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//real num = 600851475143;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//take the first prime number 2, and divide the number by it&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//if it is modulus 0, then use it&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//if the current value is higher than the largest prime we currently have,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//then find next prime and go again&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;findByPrimes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;findNextPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;findByPrimes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePrimeFactor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;determinePrimeFactor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;findNextPrime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;primes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;highest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;largest prime factor: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;factors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0003.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #2</title>
   <link href="http://davidwparker.com/2009/02/26/project-euler-2/"/>
   <updated>2009-02-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/26/project-euler-2</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;one&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;two&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fibNums&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4000000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;one&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;two&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fibNums&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;fibNums&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;high&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;one&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;two&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;two&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fibNums&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fibNums&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;total= &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br /&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0002.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler #1</title>
   <link href="http://davidwparker.com/2009/02/25/project-euler-1/"/>
   <updated>2009-02-25T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/25/project-euler-1</id>
   <content type="html">&lt;p&gt;In JavaScript:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;on &lt;a href=&quot;http://github.com/davidwparker/project_euler/blob/b1206536f8c25af9f18a7010ff49d89606f68e06/javascript/0001.html&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Project Euler</title>
   <link href="http://davidwparker.com/2009/02/18/project-euler/"/>
   <updated>2009-02-18T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/18/project-euler</id>
   <content type="html">&lt;p&gt;Recently, I discovered a gem of a website: &lt;a href=&quot;http://projecteuler.net/&quot;&gt;Project Euler&lt;/a&gt;.  Basically, the site has a bunch of mathematic/programming problems for people to solve.  The idea is great and it’s an excellent way to learn how to program in a new language.  Though I’m sure most of the problems can be solved using a “pure math” methodology, they can equally be solved using a programming language.&lt;/p&gt;

&lt;p&gt;My current goal is to become extremely familiar in JavaScript (beyond being a JQuery ninja), so I plan on solving one-two of these a week in JavaScript.  Perhaps later I will move on to other languages as well.  I’ll be posting up my solutions to my blog here and you can also choose to watch my &lt;a href=&quot;http://www.github.com/davidwparker/project_euler&quot;&gt;github&lt;/a&gt; repository as well.  Of course I’m a bit late to the party again, so you may want to check out other peoples’ solutions at &lt;a href=&quot;http://github.com/search?q=euler&amp;amp;type=Repositories&amp;amp;x=0&amp;amp;y=0&quot;&gt;github&lt;/a&gt; as well.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rails Cross-Cutting Concerns - Filters, Observers, and Aspect-Oriented Programming</title>
   <link href="http://davidwparker.com/2009/02/16/rails-cross-cutting-concerns-filters-observers-and-aspect-oriented-programming/"/>
   <updated>2009-02-16T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2009/02/16/rails-cross-cutting-concerns-filters-observers-and-aspect-oriented-programming</id>
   <content type="html">&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;

&lt;p&gt;I’m already a little bit late to the party, as &lt;a href=&quot;http://gilesbowkett.blogspot.com/2008/02/rails-aspect-oriented-programming-use.html&quot;&gt;Giles Bowkett&lt;/a&gt;, &lt;a href=&quot;http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture&quot;&gt;Charlie Savage&lt;/a&gt;, and &lt;a href=&quot;http://blog.new-bamboo.co.uk/2007/10/9/aspects-of-aop&quot;&gt;Matt Ford&lt;/a&gt; have discussed AOP in Rails previously.&lt;/p&gt;

&lt;p&gt;While I enjoy coding Ruby at night, I still code Java during my day job.  So far, every project at work has used Struts.  As there’s a lot of momentum behind Spring in the Java community lately, I decided to do a bit of reading to keep up.  A couple of days ago, I just finished reading Spring in Action (Manning).  Overall, Spring seemed pretty nice, but the one thing that stuck out to me was &lt;a href=&quot;http://en.wikipedia.org/wiki/Aspect-oriented_programming&quot;&gt;Aspect-Oriented Programming&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I had never seen AOP in use before reading the Spring book, but it seems to make a lot of sense for &lt;a href=&quot;http://en.wikipedia.org/wiki/Separation_of_concerns&quot;&gt;separation&lt;/a&gt; of &lt;a href=&quot;http://en.wikipedia.org/wiki/Cross-cutting_concern&quot;&gt;cross-cutting&lt;/a&gt; concerns.  The main concerns that seem to come up in nearly every project I’ve worked on are &lt;a href=&quot;http://en.wikipedia.org/wiki/Information_security&quot;&gt;security&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Transaction_processing&quot;&gt;transactions&lt;/a&gt;, and logging.&lt;/p&gt;

&lt;h2 id=&quot;current-concerns&quot;&gt;Current Concerns&lt;/h2&gt;

&lt;p&gt;In Rails, security is generally performed through a before_filter in a controller for certain methods.  So you generally end up with code that looks something like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;someController&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:login_required&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;anotherController&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:login_required&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:only&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:edit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:destroy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;andAnotherController&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:login_required&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:only&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;adminController&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:admin_login_required&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;While this works, I often feel as though the security is tacked on.   I’m also afraid that if I change my underlying security API (either by changing libraries or if the public API is changed), then I have to update every single controller in my application to reflect those changes.  Finally, the calls to each of the before_filters is a lot of duplicate code.&lt;/p&gt;

&lt;h2 id=&quot;possible-solutions&quot;&gt;Possible Solutions&lt;/h2&gt;

&lt;p&gt;Note: these solutions don’t use AOP, though I do try to keep to separation of concerns.&lt;/p&gt;

&lt;h4 id=&quot;filtering-earlier&quot;&gt;Filtering earlier&lt;/h4&gt;

&lt;p&gt;My first thought is that I’d like to pull out all of the security code into one place.  An initial thought of mine would be to use ApplicationController and have a single filter there.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;Before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:perform_security&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Private&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;perform_security&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#add case statement or list or something/etc here for controller/action to do login_required&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Another thought would be to pull out this altogether and have a SecurityController that extends Base::Controller and which ApplicationController extends.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;SecurityController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Controller&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;Before_filter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:perform_security&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;Private&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;perform_security&lt;/span&gt;
     &lt;span class=&quot;c1&quot;&gt;#add case statement or list or something/etc here for controller/action to do login_required&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;ApplicationController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;SecurityController&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Of these two solutions, I like the second solution better.  This keeps the security stuff all together and it can be easily changed.  If the API changes then only one controller would have to be updated.&lt;/p&gt;

&lt;h4 id=&quot;observer-pattern&quot;&gt;Observer Pattern&lt;/h4&gt;

&lt;p&gt;Rails has a solid Observer Pattern implemented for ActiveRecord.  Just like having observers for the models, we could have observers for the controllers.  This would allow us to call a method before another method is implemented within a controller.  I haven’t done too much research into the Observers within Rails, though I do know that they are specific to ActiveRecord.  If possible, we could extend their base class to be an observer for the controller, like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;SecurityObserver&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;SomeBaseObserverClass&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;
  observes :someController, :anotherController, :andAnotherController, :adminController

perform_security,
  :only =&amp;gt;
    [{:someController},
     {:anotherController, :only=&amp;gt;[:update, :edit, :destroy]},
     {:andAnotherController, :only=&amp;gt;[:new, :create]}]

perform_admin_security,
   :only =&amp;gt; [{:adminController}]

private
  def perform_security
    login_required
  end

  def perform_admin_security
    admin_login_required
  end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;new-concerns&quot;&gt;New Concerns&lt;/h2&gt;

&lt;p&gt;The nice thing about leaving code as it is now is that I know that it works pretty quick.  If we change the filter to occur earlier in its own controller, then the code is called for every controller/action, versus a case-by-case check within each controller.  This is a lot of overhead and could definitely impact performance.  This is less than desirable.  Though slightly different, the Observer Pattern still has to check every controller/action that may have been called.&lt;/p&gt;

&lt;h2 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;/h2&gt;

&lt;p&gt;As of right now, I don’t have any plans on implementing anything with AOP yet.  I like the thought, but I don’t really had the time.  There does seem to be a pretty good AOP ruby gem &lt;a href=&quot;http://aquarium.rubyforge.org/&quot;&gt;Aquarium&lt;/a&gt; which I may look into integrating with Rails at a later date.&lt;/p&gt;

&lt;p&gt;Until then, what have you tried implementing with AOP?  Do you use AOP on any of your Rails projects?&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Dynamic, Search-based RSS feeds</title>
   <link href="http://davidwparker.com/2008/12/10/dynamic-search-based-rss-feeds/"/>
   <updated>2008-12-10T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/12/10/dynamic-search-based-rss-feeds</id>
   <content type="html">&lt;p&gt;For the current application I am working on, I needed the ability to generate RSS feeds on the fly.  Users have the ability to search for a lot of different information, and I needed to provide them with a way to save that search via an RSS feed.  To see how I went about performing basic search, see &lt;a href=&quot;http://davidwparker.com/2008/09/27/simple-multi-form-field-search-with-thinking-sphinx/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my controller, I started by adding the ability to respond_to rss:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# GET /search&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@models&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_page&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;rss&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:layout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Next, in my routes.rb file, I added a specific route for the dynamic search.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_rss&lt;/span&gt;  &lt;span class=&quot;s1&quot;&gt;'/search.rss'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;    &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'models'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:format&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'rss'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This provided me with the method search_rss_path, which I was able to use in my view.  I attempted to use the route that I already had:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;With something along the lines of search_path(params, :format =&amp;gt; ‘rss’), and that ended up being a very bad thing.  This was a bit ago, and I can’t recall at the moment why that wasn’t working, but I do recall that it just ended up being easier and nicer to just add one more route in my routes.rb file.&lt;/p&gt;

&lt;p&gt;Continuing on, in my search.html.haml file, I have both a direct link and the auto_discovery link for the search generated RSS:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;link_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;RSS for this Search&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;search_rss_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content_for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:extra_header&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;auto_discovery_link_tag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:rss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'models'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:format&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'rss'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'RSS for Search Result Model Listings'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The content_for :extra header is just an “extra header” area in my application.html.haml file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:extra_header&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Finally, don’t forget to include the search.rss.builder file in your view folder:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;instruct!&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:version&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;1.0&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;rss&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;version&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;2.0&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;channel&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Search results&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;search_rss_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Description here&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;language&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'en-us'&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@models&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;empty?&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@models&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;lastBuildDate&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;posted_at_rss&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@models&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;pubDate&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;posted_at_rss&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;author&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;some author&quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;guid&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;All-in-all, it ended up being very easy to implement dynamic, search-based RSS feeds.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rails text_field tag with datetime data gotcha</title>
   <link href="http://davidwparker.com/2008/11/15/rails-text_field-tag-with-datetime-data-gotcha/"/>
   <updated>2008-11-15T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/11/15/rails-text_field-tag-with-datetime-data-gotcha</id>
   <content type="html">&lt;p&gt;Another quick gotcha that I just discovered.  If you have a model that has a time on the backend, be careful which tags you use.  In my case, I have an app that is outside UTC:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;time_zone&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Central Time (US &amp;amp; Canada)'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;On my form, when editing the model, everything appears fine.  But when you check out the difference in these two tags, you’ll see that text_field renders the incorrect time, whereas datetime_select renders the correct time.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;datetime_select&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:posted_at&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;text_field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:posted_at&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I put in a defect ticket for this &lt;a href=&quot;http://rails.lighthouseapp.com/projects/8994/tickets/1380-text_field-tag-has-incorrect-time#ticket-1380-1&quot;&gt;here&lt;/a&gt;.  Hopefully the Rails team will be able to knock that out quick.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>named_scope and Thinking Sphinx gotcha</title>
   <link href="http://davidwparker.com/2008/11/13/named_scope-and-thinking-sphinx-gotcha/"/>
   <updated>2008-11-13T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/11/13/named_scope-and-thinking-sphinx-gotcha</id>
   <content type="html">&lt;p&gt;I was working with named_scope earlier today and I was have an issue getting it to work properly with a Thinking Sphinx search that I had.  This makes sense, as named_scope is not completely supported yet by Thinking Sphinx.  Read below for the gotcha and a short-term work around.&lt;/p&gt;

&lt;p&gt;I had a named_scope something like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;named_scope&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:not_expired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;expiration_date &amp;gt;= ?&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I was calling it in a chain to another method which just called a Thinking Sphinx search:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;not_expired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;My problem came from what came back in my @posts:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;Sphinx&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;85&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;44&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Load&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.003232&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;no&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`posts`&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`posts`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;` IN (85,44,26)) AND (expiration_date &amp;gt;= '2008-11-14 04:15:08') &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;All looks fine.  But then I would hit a nil object error… huh?&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;ActionView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;TemplateError&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;You&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;have&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;you&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;didn&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;expect&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;it!&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;The&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;occurred&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;evaluating&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;on&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#5 of posts.html.haml&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Loading up a script/console, I was finally able to see the problem.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;not_expired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Param&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;size&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Somehow combining named_scope with Thinking Sphinx decided to load three posts into my @posts object even though it only found one.  So I had something like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;id: &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;title: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;something&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And here was my fix (after the query):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@posts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;compact&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This throws out the nil results.
Hopefully this will help out those out in Google land.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Simple non-model checkbox in Rails</title>
   <link href="http://davidwparker.com/2008/11/12/simple-non-model-checkbox-in-rails/"/>
   <updated>2008-11-12T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/11/12/simple-non-model-checkbox-in-rails</id>
   <content type="html">&lt;p&gt;I recently needed to do search in Rails with several checkboxes.  The search itself was not model backed, so the check_box tag was out.  I decided to use the check_box_tag instead.  The problem I had with that was that the check_box_tag had no real easy way of maintaining the state as to whether or not the boxes were checked from search to search.&lt;/p&gt;

&lt;p&gt;If I had params[:a] and params[:b], they may both be set, but I wouldn’t know it based off my GET request.  So I came up with a simple check_box_tag modification to retain the state of the checkboxes based on an identifier (in my case, I use the params)&lt;/p&gt;

&lt;p&gt;In my application_helper.rb:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;check_box_tag_new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;options&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{})&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;html_options&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;type&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;checkbox&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;id&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;stringify_keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;html_options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;check&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;nil?&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;html_options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;checked&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;checked&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;html_options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;check&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;html_options&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Usage in a Haml file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;check_box_tag_new&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;check_box_tag_new&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here’s what I came up with for specs:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;should create a check_box tag with the proper checked based on params:&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;if check is nil, it should not be checked&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;helper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;check_box_tag_new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;me&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;input id=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; name=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; type=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;checkbox&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;if check is not 1, it should not be checked&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;helper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;check_box_tag_new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;me&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;input check=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; id=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; name=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; type=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;checkbox&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;if check is 1, it should be checked&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;helper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;check_box_tag_new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;me&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;tag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;input check=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; checked=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;checked&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; id=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; name=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;me&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; type=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;checkbox&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>Facebook style, unobtrusive ajax pagination for will_paginate with jQuery</title>
   <link href="http://davidwparker.com/2008/09/30/facebook-style-unobtrusive-ajax-pagination-for-will_paginate-with-jquery/"/>
   <updated>2008-09-30T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/09/30/facebook-style-unobtrusive-ajax-pagination-for-will_paginate-with-jquery</id>
   <content type="html">&lt;p&gt;I really like the ‘pagination’ that Facebook provides on their status tab.  It’s not true ‘pagination’ in that the result set is changed, but it does add additional results to the bottom of the set.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/fb_bottomless_pagination.png&quot; alt=&quot;Facebook Bottomless Pagination&quot; title=&quot;Facebook Bottomless Pagination&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you want to just change the result set and not add to it (with will_paginate), then I suggest checking out Chris’ solution &lt;a href=&quot;http://ozmm.org/posts/ajax_will_paginate_jq_style.html&quot;&gt;here&lt;/a&gt;, otherwise, read on…&lt;/p&gt;

&lt;p&gt;Anyway, I went ahead and created a plugin for jQuery based on the wonder Rails plugin &lt;a href=&quot;http://github.com/mislav/will_paginate/tree/master&quot;&gt;will_paginate&lt;/a&gt;.  Introducing, jquery-bottomless-pagination.&lt;/p&gt;

&lt;p&gt;Usage:
You should already be using the will_paginate plugin.
Then, be sure to include the javascript plugin:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javascript_include_tag&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'jquery.bottomlesspagination.js'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here are the optional settings (displayed below are the defaults):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;ajaxLoaderPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'../images/ajax-loader.gif'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'.results'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;objName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;ajaxLoaderPath&lt;/strong&gt; is the path to your image which will be displayed while the ajax call is being made.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;results&lt;/strong&gt; is the CSS selector that jQuery will use to append the results of the ajax call to.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;objName&lt;/strong&gt; is the name of the object that you would like displayed in the phrase “Show more (objName)…” and “There are no more (objName) to add…”&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;callback&lt;/strong&gt; is a function which you can provide to perform extra functions after the objects are appended, such as adding highlight or zebra effects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these settings can be utilized similarly to the following (this would be in your application.js file or something):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bottomlessPagination&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;objName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'rows'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;//highlight current row&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.results li&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hover&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;hover&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;hover&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You may need to provide something like the following for Rails.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ajaxSetup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'beforeSend'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Accept&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;On the rails side of things, in your controller, just return the partial which iterates through your returned objects:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;index&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@objects&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;paginate&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#ajax response&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;js&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:template&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'objects/_index_objects.html.haml'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and the partial:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@object&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;result_row&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;Your&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stuff&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;here&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;That’s it.  Be sure to check out the plugin in its entirety on &lt;a href=&quot;http://github.com/davidwparker/jquery-bottomless-pagination/tree/master&quot;&gt;Github&lt;/a&gt;.  Feedback is always welcome.  Enjoy!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Simple filterered search using drop downs with Thinking Sphinx</title>
   <link href="http://davidwparker.com/2008/09/27/simple-multi-form-field-search-with-thinking-sphinx/"/>
   <updated>2008-09-27T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/09/27/simple-multi-form-field-search-with-thinking-sphinx</id>
   <content type="html">&lt;p&gt;Sometimes you may need to offer your users the ability to perform a filtered search using drop down selects.  I had already settled on using Thinking Sphinx based on past experience, so I just needed to figure out how to offer ‘filters’.&lt;/p&gt;

&lt;p&gt;For the sake of this tutorial I’ll be using a very basic example.  Let’s start with the index that is defined for Thinking Sphinx in the model:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;define_index&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;city&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Not too much going on here.  The city will provide a textbox for the user to perform basic searches on, and the state will be drop down list, or one of many ‘filters’ in a real world app.&lt;/p&gt;

&lt;p&gt;Onto my routes.rb file, I have defined a search path:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'search'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;My haml template looks like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h2&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Search&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;form_tag&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;search_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:method&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'get'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;refine&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;label_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;city&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;br&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text_field_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;refine&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;label_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;State&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;br&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;select_tag&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;st&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options_from_collection_for_select&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;STATE_LIST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;to_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;to_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;refine&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;label_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Results Per Page&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;br&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;select_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options_from_collection_for_select&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;PER_PAGE_LIST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;to_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;to_s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;refine&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;submit_tag&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Search&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Nothing out of the ordinary here.  For this demonstration, suppose that I have previously defined STATE_LIST and PER_PAGE_LIST to be the list of states and the numbers for results per page that I want to offer my users the ability to select from.  In general your application will probably store the information for the drop downs in the database but if you just want to try something really quick, this will do the trick.  The PER_PAGE_LIST is only required if you’re using the wonderful &lt;a href=&quot;http://github.com/mislav/will_paginate/tree/master&quot;&gt;will_paginate&lt;/a&gt; plugin.&lt;/p&gt;

&lt;p&gt;Anyway, onto the controller:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# GET /search&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@models&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_page&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Very basic search here.  I’ve declared a search_page method in my model and I pass it the params.  Then I simply do a respond_to.&lt;/p&gt;

&lt;p&gt;Here is the search_page method in the model:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search_page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:state&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;ss&quot;&gt;:per_page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_i&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;ss&quot;&gt;:page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I use the text field for the city as what I’m actually searching.  The state gets assigned to a condition.  This allows us to add several drop downs in the future as long as we know what values from which the user can select.  Next, you’ll note that we assign the :per_page and :page which are used for will_paginate.  If you want to give your users a very easy way to define how many results they want per page, then this is an easy way to do just that.&lt;/p&gt;

&lt;p&gt;That’s it!  You can now define several drop down select filters!&lt;/p&gt;

&lt;p&gt;Required additional reading/watching:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Pat Allan’s concise &lt;a href=&quot;http://freelancing-gods.com/posts/a_concise_guide_to_using_thinking_sphinx&quot;&gt;guide&lt;/a&gt; to Thinking Sphinx.&lt;/li&gt;
  &lt;li&gt;Ryan Bate’s Railscasts &lt;a href=&quot;http://railscasts.com/episodes/120-thinking-sphinx on Thinking Sphinx&quot;&gt;episode&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Rein’s &lt;a href=&quot;http://reinh.com/blog/2008/07/14/a-thinking-mans-sphinx.html&quot;&gt;comparison&lt;/a&gt; of UltraSphinx and Thinking Sphinx.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Site wide announcements in Rails using jQuery (jGrowl)</title>
   <link href="http://davidwparker.com/2008/09/17/site-wide-announcements-in-rails-using-jquery-jgrowl/"/>
   <updated>2008-09-17T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/09/17/site-wide-announcements-in-rails-using-jquery-jgrowl</id>
   <content type="html">&lt;p&gt;I like it when a site tells me that they’re going to do some maintenance, so I wanted to implement similar features for a web application that I’m working on.  I based my announcements on Ryan Bates’ &lt;a href=&quot;http://railscasts.com/episodes/103-site-wide-announcements&quot;&gt;Railscasts episode 103&lt;/a&gt; and updated code based on avarhirion’s post on the &lt;a href=&quot;http://railsforum.com/post.php?tid=18705&quot;&gt;Rails Forum&lt;/a&gt;.  The major changes are the added changes for cookie support, graceful degradation, and jQuery (jGrowl).&lt;/p&gt;

&lt;p&gt;If you’d rather, check out all the files on &lt;a href=&quot;http://gist.github.com/11359&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;announcement.rb:&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Announcement&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;named_scope&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:active&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'starts_at &amp;lt;= ? AND ends_at &amp;gt;= ?'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;named_scope&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:since&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'updated_at &amp;gt; ? OR starts_at &amp;gt; ?'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;active&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;since&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;application.html.haml:&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;empty?&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;#announcements_box&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;announcement&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;current_announcements&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'announcement_'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;message&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;link_to&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hide Announcements&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hide_announcements_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'hideAnn'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;routes.rb:&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;hide_announcements&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/hide_announcements'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:controller&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'javascripts'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'hide_announcements'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here’s the first of the important ones: &lt;strong&gt;javascripts_controller.rb&lt;/strong&gt;.  Note that I’m setting the session and a cookie.  Also see my TODO.  I’d like to set the expiration date of the cookie to the oldest expiring active announcement.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;JavascriptsController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ApplicationController&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;hide_announcements&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;set_session&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;set_cookies&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;respond_to&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redirect_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;root_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;js&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;redirect_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;root_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;kp&quot;&gt;private&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;set_session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#TODO change expiration time to be the expiration&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;#date from the list in current_announcements&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;set_cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;ss&quot;&gt;:value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_datetime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;ss&quot;&gt;:expires&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;next_week&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In the &lt;strong&gt;application_helper.rb&lt;/strong&gt;, we check the session first and set the announcements, otherwise, we check the cookies.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;current_announcements&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;nil?&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_datetime&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:announcement_hide_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;nil?&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@current_announcements&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Finally, to make it with the cool-kids, we need to add some jQuery.  So I decided to use the &lt;a href=&quot;http://stanlemon.net/projects/jgrowl.html&quot;&gt;jGrowl&lt;/a&gt; plugin because it’s awesome.  This code goes in your &lt;strong&gt;application.js&lt;/strong&gt; file (somewhere in $(function){ //here })&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;  &lt;span class=&quot;c1&quot;&gt;//jgrowl announcements. ajax GET to hide ann/store cookie&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;jGrowl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;defaults&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;closer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#announcements_box&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;css&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;display&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;none&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#announcements_box .announcement&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;jGrowl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;sticky&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hide_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hide_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'/hide_announcements'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#announcements_box&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fadeOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Obviously, you’ll need to include jGrowl js and css files.&lt;/p&gt;

&lt;p&gt;I like this solution because it provides a great looking way to do site-wide announcements.  The solution degrades gracefully if the user does not have javascript enabled.  Finally, by saving to a cookie, users can leave, close their browsers, and come back as the please and not see the same announcements over and over again.&lt;/p&gt;

&lt;p&gt;I’d like to leave you with a couple of specs that I wrote.  I attempted to do TDD/BDD and do the specs first, but it was tough.  I didn’t get too far, as I was having some cookie/session problems.  They’re in some serious need of help, so if you know cool stuff, help me out in the comments, thanks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;application_helper_spec.rb:&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;c1&quot;&gt;#TODO these are weak/inaccurate specs.  These are more-or-less stubs&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;should find the current announcements&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;when the session['announcement_hide_time'] is not nil&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;when the session['announcement_hide_time'] is nil and cookies['announcement_hide_time'] is not nil&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#      cookies['announcement_hide_time'] = CGI::Cookie.new('announcement_hide_time', Time.now.utc.to_datetime.to_s)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:value&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_datetime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                                   &lt;span class=&quot;ss&quot;&gt;:expires&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;next_week&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#      current_announcements.should == Announcement.current_announcements(cookies['announcement_hide_time'].value.first.to_datetime)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;when the session['announcement_hide_time'] and cookies['announcement_hide_time'] are not nil&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;cookies&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'announcement_hide_time'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;current_announcements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;announcement_spec.rb:&lt;/strong&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;  &lt;span class=&quot;c1&quot;&gt;#TODO these are weak/inaccurate specs.  These are more-or-less stubs&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;the current_announcements&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;should return announcements that are active&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;active&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'starts_at &amp;lt;= ? AND ends_at &amp;gt;= ?'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;should return announcements since a time provided&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;since&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'updated_at &amp;gt; ? OR starts_at &amp;gt; ?'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;should return announcements since a time provided (nil)&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;since&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;should&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Announcement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'updated_at &amp;gt; ? OR starts_at &amp;gt; ?'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Any feedback is appreciated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Lovin Ubiquity</title>
   <link href="http://davidwparker.com/2008/09/07/lovin-ubiquity/"/>
   <updated>2008-09-07T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/09/07/lovin-ubiquity</id>
   <content type="html">&lt;p&gt;So Mozilla’s &lt;a href=&quot;http://labs.mozilla.com/2008/08/introducing-ubiquity/&quot;&gt;Ubiquity&lt;/a&gt; project is extremely cool.  If you haven’t checked it out yet, do it now.  Ubiquity is an extremely efficient way to get around the web.&lt;/p&gt;

&lt;p&gt;I wanted an easy way to search rspec documentation.  Not wanting to work too hard, I just forked Jack Dempsey’s code (which searched the Ruby documentation) and changed it to handle rspec instead.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;CmdUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CreateCommand&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;        &lt;span class=&quot;s2&quot;&gt;&quot;rspec&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;takes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;       &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;function&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;noun_arb_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;icon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;        &lt;span class=&quot;s2&quot;&gt;&quot;http://ruby-doc.org/favicon.ico&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;    &lt;span class=&quot;s2&quot;&gt;&quot;http://davidwparker.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;author&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Jack Dempsey, fork by David Parker&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;davidwparker@gmail.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;     &lt;span class=&quot;s2&quot;&gt;&quot;MPL,GPL&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Search rspec functions documentation&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;        &lt;span class=&quot;s2&quot;&gt;&quot;Select a rspec function&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;directObject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;http://apidock.com/rspec/search?query={QUERY}&amp;amp;commit=Search&quot;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;urlString&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{QUERY}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;Utils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;openUrlInBrowser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;urlString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pblock&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;searchText&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;jQuery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;directObject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;searchText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;pblock&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Search rspec function documentation&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;previewTemplate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Search rspec function documentation of ${query}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;previewData&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;searchText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;pblock&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CmdUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;renderTemplate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;previewTemplate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;previewData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can find it &lt;a href=&quot;http://gist.github.com/9310&quot;&gt;here&lt;/a&gt; on Github if you want to subscribe to it.&lt;/p&gt;

&lt;p&gt;Edit: I also just created a decent one for searching on Colourlovers.com.  You can search for colors by colors.  And you can search for palettes by colors/hex.  Here it is:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cs_pa&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;colors&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;noun_type_cs_pa&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CmdUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;NounType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;colors or palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cs_pa&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;CmdUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CreateCommand&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;color&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Find colors and palettes on Colour Lover.  Search by colors or search by colors or hex for palettes.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Try issuing &quot;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;blue&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; or &quot;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;005&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;F6B&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; by palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;icon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;http://colourlovers.com.s3.amazonaws.com/favicon.ico&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;takes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;color or hex&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;noun_arb_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;modifiers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;by&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;noun_type_cs_pa&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;modifier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;modifier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;http://www.colourlovers.com/colors/search?hsv=&amp;amp;sortType=rank&amp;amp;sortBy=asc&amp;amp;query={QUERY}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/colors/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;amp;hex={HEX}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{HEX}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{QUERY}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{HEX}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{QUERY}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;{QUERY}&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Utils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;openUrlInBrowser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;preview&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pblock&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;modifier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;directObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;modifier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Searches Colour Lover Colors by color and search Palettes by color/hex.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Lover Colors&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Lover Palettes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;by color and search Palettes by color/hex&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;by the hex value: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;by color and search Palettes by color/hex&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;by the color: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Colour Lovers cannot search Colors by hex.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;by color and search Palettes by color/hex&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;by the color: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;pblock&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and on &lt;a href=&quot;http://gist.github.com/9332&quot;&gt;here&lt;/a&gt; on Github&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Book: Don't Make Me Think</title>
   <link href="http://davidwparker.com/2008/08/03/book-dont-make-me-think/"/>
   <updated>2008-08-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/08/03/book-dont-make-me-think</id>
   <content type="html">&lt;p&gt;At RubyConf 2007 &lt;a href=&quot;http://blog.zenspider.com&quot;&gt;Ryan Davis&lt;/a&gt; said that we, as developers, should be reading one book a month about software development, etc.  Additionally, while reading Jeff Atwood’s &lt;a href=&quot;http://www.codinghorror.com/blog/archives/001108.html&quot;&gt;blog&lt;/a&gt; I only reaffirmed the habit. Although I haven’t exactly hit a rate of one technical book per month yet (I read some fiction and other books in there too), I have enjoyed continuing my education, especially beyond school and reading blogs.  I’ve read quite a few books this year, but this is the first pseudo review that I’ve ever written.  Actually, it’s much less review and much more “things that I really enjoyed” and want to remember.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/dp/0321344758?tag=parker08-20&quot;&gt;Don’t Make Me Think&lt;/a&gt; by Steve Krug is an excellent book.  The second edition was published in 2006, which although may seem ancient by technology standards, is still quite up-to-date on everything critical for a website.  Yes, I’m sure there are plenty of things in the book that I should be changing on this site, but at the moment, I rather like this theme (Hemingway).  Anyway, on with the book.&lt;/p&gt;

&lt;p&gt;First off, I really like the concept of the book.  Using the web is not about thinking.  It’s about lack of thought and clicking on what sparks my interest, whether I thought about it or not.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chapter 5&lt;/em&gt;: Omit &lt;del&gt;needless&lt;/del&gt; words was the first major instruction that I hadn’t heard before.  In fact, I’m sure this blog post is full of needless words, but I’m sure it’s going to stay that way.  But for a pure business-type/selling something website I can see how important this may be.  I love the point Steve makes about removing Happy talk and Instructions must die.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chapter 6&lt;/em&gt;: Street Signs and Breadcrumbs, I never thought about the total various “utility” links that I site may have and I found his list rather helpful.  I’ve never driven in LA or in Boston, but I really enjoyed Steve using the street signs in those places as an example of what to do and what not to do.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chapter 7&lt;/em&gt;: The Home Page is Beyond Your Control was rather informative in regards to pull-down/drop-down menus.  I’ve worked on and used many applications that utilized drop-down menus and some have worked well and some haven’t.  For example, I’m not too fond of the Facebook dropdown for the friends section (more), especially after reading Steve’s book:&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Facebook Drop-Down&quot; src=&quot;/media/facebook_dropdown.png&quot; title=&quot;Facebook Drop-Down&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Sorry about the crappy picture: first Ubuntu screenshot ever, no photo editing skills with GiMP /excuse&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chapter 9&lt;/em&gt;: Usability Testing on 10 Cents A Day was an excellent chapter as well.  Over the last couple of years, I’ve really enjoyed Unit testing my code, specifically with BDD-type testing (rSpec is my current favorite in the Rails world), but I haven’t done much with usability testing.  Generally, I would just go do the usability testing of “can my wife use it?”  If she can, then I generally feel alright.  If not, then there’s more work to be done.  Anyway, I liked what Steve had to say about testing with just a few people, iteratively.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chapter 10&lt;/em&gt;: Usability as a Common Courtesy introduced several things that can diminish goodwill with the customer.  Specifically, a few that I really liked were:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Punishing me for not doing things your way&lt;/li&gt;
  &lt;li&gt;Asking me for information you don’t really need&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To me, I can’t stand it when a site kicks back an error message for how I put my phone number into their textfield.  Personally, I like to do XXX.XXX.XXXX.  Much more common is (XXX) XXX-XXXX.  Also common is XXX-XXX-XXXX.  I generally use the periods and I think it’s rather amateurish when I website can’t accept any of the common formats.  I’ve worked on many business applications where specific instructions were to not accept other formats.  Reasoning?  None other than, because I’m the boss, or because it’s too much code.  It’s really not, but that’s besides the point.&lt;/p&gt;

&lt;p&gt;Asking for too much information is another peave of mine.  I especially hate when you’re signing up for a website and it’s asking for way too much… generally, for about 90% of the websites out there, all you need to ask for is username, password, and e-mail.  Even then, you may only need e-mail to “confirm” the user, or to send them a reset password and it may not be required at all.  This was all stated in Chapter 12: Help! My boss wants me to &lt;em&gt;__&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Overall, I thought the book was excellent and I’d highly recommend to anyone doing anything on the web.  Building straight html?  E-commerce sites?  Business intranets?  Social networking sites?  Something else?  No matter what it is, reading this book will help you to understand the usability a little bit better.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Installed Rockbox</title>
   <link href="http://davidwparker.com/2008/06/26/installed-rockbox/"/>
   <updated>2008-06-26T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/06/26/installed-rockbox</id>
   <content type="html">&lt;p&gt;Last night I finally got around to installing Rockbox on my iPod.  I’ve been meaning to do it for a while now, as I’m trying to transition to as many open source alternatives as possible*.  Anyway, it wasn’t too much hassle, though it did end up taking a bit more time than I thought it should, and I did run into a few snags.&lt;/p&gt;

&lt;p&gt;So I went to Rockbox’s &lt;a href=&quot;http://rockbox.org&quot;&gt;website&lt;/a&gt; and went to the documentation for my 30gb iPod Video.  Reading through the instructions, I thought it would be simple enough, so I decided to try the automated installer (rbutilqt) rather than the manual install.&lt;/p&gt;

&lt;p&gt;So I download rbutilqt, throw it in a folder, then I run it.  The user interface was very nice.  I select the autodetect button and it detects my iPod.  So far so good.  Then I click on the complete install and I get the nice &lt;em&gt;BOOM&lt;/em&gt;  “No iPod could be found” error message.  Excellent.  Except for the fact that it was autodetected and I was able to drag and drop songs to and from it in RhythmBox.  Looking again at the manual, I go the check out the manual route.  I download the bootloader and run it.  Bam, once again, nothing.  Nice “No iPod could be found” error again.&lt;/p&gt;

&lt;p&gt;So then I thought about permissions.  I go throw rbutilqt into my $HOME directory and chmod +x it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;chmod +x rbutilqt&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Run the program again, this time using sudo and had no problems detecting and installing.  So now I have Rockbox on my iPod and I can play .ogg files to my heart’s content (as well as playing Doom).&lt;/p&gt;

&lt;p&gt;Question for all the *nux gurus out there:
Why could I easily transfer files to and from the iPod in RhythmBox but the autoloader wouldn’t detect it (without running as root)?  I would think that they’re the same user, so it shouldn’t matter either way.&lt;/p&gt;

&lt;p&gt;Note: if I had the money, then my main computer would probably be a 15” Macbook Pro.  But I don’t, so it’s not.  Instead, I’m currently running Ubuntu 8.04 (which, so far, has been awesome).&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Slicehost setup scripts on github</title>
   <link href="http://davidwparker.com/2008/06/25/slicehost-setup-scripts-on-github/"/>
   <updated>2008-06-25T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/06/25/slicehost-setup-scripts-on-github</id>
   <content type="html">&lt;p&gt;My Slicehost account provided my first real “on-my-own” server, outside of work, where I was able to do whatever I want.  I’ve been using Ubuntu for a couple of years now, and while I know my way around my system, I’ve never completely automated anything.  At a minimum, I wanted a way to do a scratch install of all the major software that I wanted for my Slicehost account to get up-and-running with a Rails app (through nginx anyway).&lt;/p&gt;

&lt;p&gt;I initially compiled a list of scripts from Slicehost’s &lt;a href=&quot;http://articles.slicehost.com/&quot;&gt;tutorials&lt;/a&gt; last December.  They may need to be updated as I was extremely busy all Spring.  Anyway, they’re pretty crude, but they may be useful for somebody out there.  You can get them all here at &lt;a href=&quot;http://github.com/davidwparker/slicehost_scripts/tree/master&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Using WordPress</title>
   <link href="http://davidwparker.com/2008/06/03/using-wordpress/"/>
   <updated>2008-06-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/06/03/using-wordpress</id>
   <content type="html">&lt;p&gt;I’ve decided to use WordPress for my blogging needs.  As the &lt;a href=&quot;http://nubyonrails.com/articles/about-this-blog-memcached&quot;&gt;challenge&lt;/a&gt; went out, I did indeed build myself a nice little blogging engine in Rails.  And when I say nice, I mean, working.  Also, when I say little, I mean very little.  I’ll open source it soon.&lt;/p&gt;

&lt;p&gt;The reason I decided to use WordPress is because I wanted to move this domain to Dreamhost from Slicehost.  Since I have a Dreamhost account that doesn’t support Rails very well (it may now with Passenger), and I was constantly tweaking my Slicehost account, I wanted a place where I could publish regularly without bringing down my server.  As I also wanted to start sharing with others what I have learned technologically, whether it’s Rails-related or not; I just wanted a consistent place to do so.  This is it.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Announcing ilt3u.com (i&lt;3)</title>
   <link href="http://davidwparker.com/2008/06/03/announcing-ilt3ucom-i/"/>
   <updated>2008-06-03T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/06/03/announcing-ilt3ucom-i</id>
   <content type="html">&lt;p&gt;I’ve registered &lt;a href=&quot;http://ilt3u.com&quot;&gt;ilt3u.com&lt;/a&gt; (i&amp;lt;3u) to use as my Slicehost guinea pig domain.  Right now it’s a static site with a tad design inspiration from &lt;a href=&quot;http://twistori.com&quot;&gt;twistori.com&lt;/a&gt;.  Enjoy!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Coming Soon</title>
   <link href="http://davidwparker.com/2008/05/31/coming-soon/"/>
   <updated>2008-05-31T00:00:00+00:00</updated>
   <id>http://davidwparker.com/2008/05/31/coming-soon</id>
   <content type="html">&lt;p&gt;Nothing to see here.  Please move along.&lt;/p&gt;
</content>
 </entry>
 
</feed>
