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

<channel>
	<title>Bob Belderbos</title>
	<atom:link href="http://bobbelderbos.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bobbelderbos.com</link>
	<description>Software &#124; Coding &#124; Building cool stuff</description>
	<lastBuildDate>Sun, 29 Nov 2015 21:23:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.3.1</generator>
	<item>
		<title>How to programatically get a youtube movie trailer</title>
		<link>http://bobbelderbos.com/2015/11/how-to-programatically-get-a-youtube-movie-trailer/</link>
		<comments>http://bobbelderbos.com/2015/11/how-to-programatically-get-a-youtube-movie-trailer/#comments</comments>
		<pubDate>Fri, 20 Nov 2015 22:47:47 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[gdata]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sharemovi.es]]></category>
		<category><![CDATA[themoviedb]]></category>
		<category><![CDATA[trailer]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2764</guid>
		<description><![CDATA[I really liked Youtube&#8217;s Gdata API, I had it all working nicely. As you can see from that post I had a nice popup overlay on Sharemovi.es with the movie trailer video embedded. Till it broke &#8230; Gdata is gone. So needed to fix it &#8230; Alternative Turns out that you can get the trailer via themoviedb [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/youtube_trailer_themoviedb1.png"><img class="alignleft size-full wp-image-2772" src="http://bobbelderbos.com/wp-content/uploads/2015/11/youtube_trailer_themoviedb1.png" alt="youtube_trailer_themoviedb" width="200" height="200" /></a></p>
<p>I really liked Youtube&#8217;s Gdata API, <a href="http://bobbelderbos.com/2011/01/build-movie-trailer-api-using-gdata/" target="_blank">I had it all working nicely</a>. As you can see from that post I had a nice popup overlay on <a href="http://sharemovi.es">Sharemovi.es</a> with the movie trailer video embedded. Till it broke &#8230; <a href="https://support.google.com/youtube/answer/6098135?hl=en" target="_blank">Gdata is gone</a>. So needed to fix it &#8230;</p>
<h4>Alternative</h4>
<p>Turns out that you can get the trailer via <a href="https://www.themoviedb.org/documentation/api?language=en">themoviedb API</a>. See <a href="https://www.themoviedb.org/talk/5451ec02c3a3680245005e3c" target="_blank">here</a>: you need themoviedb&#8217;s movieID and call the /videos method. When testing it gave me 5 trailers. I will show you the PHP code I use to query the API and how to convert the youtube to HMTL you can embed into your page. I use the <a href="http://onehackoranother.com/projects/jquery/boxy/" target="_blank">Jquery boxy plugin</a> for the overlay (see printscreen at the bottom).</p>
<h4>Code</h4>
<pre> $ more trailer.php 
&lt;?php
if (!isset($_GET["id"])){
  echo "Please call with movie ID";
  return;
}
include 'libs/functions.php';
$id = $_GET["id"];
if(!is_numeric($id)){
  echo "Need numeric ID";
  return;
}
// Gdata died, themoviedb is your friend though
// https://www.themoviedb.org/talk/5451ec02c3a3680245005e3c
$res = queryApi3("movie", $id, "videos");
//print_r($res); -- stdClass Object notation
$youtubeId = $res-&gt;results[0]-&gt;key; // monitor if first trailer is always OK enough
echo getTrailerSnippet($youtubeId, '640', '385', 1, 1);                                                                                                                  
?&gt;</pre>
<p>Below the functions I use. Essentially you need to curl this URL: http://api.themoviedb.org/3/movie/&lt;movieID&gt;/videos?api_key=&lt;YOUR_API_KEY&gt; and json_decode the results. The function args make it more generic so you can use it for other API calls too (as I do for my movie site).</p>
<pre>$ more libs/functions
..
..
function queryApi3($category, $id, $method) {
  // query and lang optional, only needed for search
  $key = getKey();
  $query = "http://api.themoviedb.org/3"; 
  if($category != '') $query .= "/$category"; 
  if($id != '') $query .= "/$id";
  if($method != '') $query .= "/$method"; 
  $query .= "?api_key=$key";
  // use curl, not file_get_contents
  // http://stackoverflow.com/questions/555523/file-get-contents-vs-curl-what-has-better-performance
  $results = useCurl($query);
  return json_decode($results);
}
..
..
function useCurl($url) {  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  $results = curl_exec($ch);
  $headers = curl_getinfo($ch);
  $error_number = curl_errno($ch);
  $error_message = curl_error($ch);
  curl_close($ch);
  return $results;
}
..
..
function getTrailerSnippet($youtubeId, $width, $height) {
  if( $youtubeId ) {
    echo "&lt;iframe class='youtube-player' type='text/html' width='$width' height='$height' src='http://www.youtube.com/embed/$youtubeId?autoplay=1' frameborder='0'&gt;";               
  } else {
    echo "No Trailer found";
  }
}</pre>
<pre></pre>
<p>&nbsp;</p>
<hr />
<p>On the main page I have a link to this script with a GET variable called &#8220;id&#8221; that receives the movieID. The class &#8220;boxy&#8221; is required to make the Jquery boxy overlay work.</p>
<pre>echo "&lt;a href='<strong>trailer.php?id=$movieId</strong>' class='boxy trailerOverlay' title='Trailer of ".str_replace("'","",$dataMovie['title'])."'&gt;&lt;img src='i/youtube.png'&gt;&lt;/a&gt;";</pre>
<pre></pre>
<hr />
<h4>Result</h4>
<p>And we&#8217;re good again:</p>
<p><a href="http://sharemovi.es/movie/206647-spectre" target="_blank">http://sharemovi.es/movie/206647-spectre</a></p>
<p>I. see red trailer button</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-20-at-23.24.141.png"><img class="size-medium wp-image-2767" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-20-at-23.24.141-300x162.png" alt="Screen Shot 2015-11-20 at 23.24.14" width="300" height="162" /></a></p>
<p>II. when clicked:</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-20-at-23.41.04.png"><img class="alignnone wp-image-2768 size-large" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-20-at-23.41.04-1024x484.png" alt="Screen Shot 2015-11-20 at 23.41.04" width="735" height="347" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/11/how-to-programatically-get-a-youtube-movie-trailer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better alternative for PHP sleep: use a dotted progress bar with Javascript</title>
		<link>http://bobbelderbos.com/2015/11/alternative-php-sleep-progress-bar-javascript/</link>
		<comments>http://bobbelderbos.com/2015/11/alternative-php-sleep-progress-bar-javascript/#comments</comments>
		<pubDate>Thu, 19 Nov 2015 21:47:59 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[progressbar]]></category>
		<category><![CDATA[sharemovies]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2745</guid>
		<description><![CDATA[Last week I developed a playing/upcoming movie HTML newsletter. I just added a feature to add the movies to your watch list on sharemovi.es. You have to be authenticated to FB. If not I am redirecting from the adder script to the main page: The problem with PHP sleep This taught me a cool trick: you need to pause a bit so [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Last week I developed a <a href="http://bobbelderbos.com/2015/11/project-weekly-movie-email-with-tmdbsimple-python/" target="_blank">playing/upcoming movie HTML newsletter</a>. I just added a feature to add the movies to your watch list on <a href="http://sharemovi.es" target="_blank">sharemovi.es</a>. You have to be authenticated to FB. If not I am redirecting from the adder script to the main page:</p>
<p style="text-align: justify;"><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-19-at-22.33.35.png"><img class="size-medium wp-image-2749" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-19-at-22.33.35-300x106.png" alt="Screen Shot 2015-11-19 at 22.33.35" width="300" height="106" /></a></p>
<h4>The problem with PHP sleep</h4>
<p>This taught me a cool trick: you need to pause a bit so the user can read the message before being redirected. My first approach was PHP&#8217;s sleep function, but that would show the initial echo only after the sleep, rendering it useless.</p>
<p><img class="alignleft size-full wp-image-2750" src="http://bobbelderbos.com/wp-content/uploads/2015/11/javascript_dotted_progress_bar.png" alt="javascript_dotted_progress_bar" width="200" height="200" />Then I <a href="http://stackoverflow.com/questions/3078867/php-output-text-before-sleep" target="_blank">read about</a> ob_start() and ob_flush(). This did not work either, <a href="http://stackoverflow.com/questions/3685760/php-output-data-before-and-after-sleep" target="_blank">reason</a>: browsers also contain their own buffers. I realized that apart from sleeping I wanted to show some sort of progress bar.</p>
<p>Here we enter JavaScript which is great for this kind of asynchronous stuff. I used <a href="http://stackoverflow.com/questions/3049553/simple-jquery-second-counter" target="_blank">this solution</a>. As explained at <a href="http://www.w3schools.com/jsref/met_win_setinterval.asp" target="_blank">w3schools</a>: &#8220;the setInterval() method calls a function or evaluates an expression at specified intervals (in milliseconds). The setInterval() method will continue calling the function until <a href="http://www.w3schools.com/jsref/met_win_clearinterval.asp">clearInterval()</a> is called&#8221;.</p>
<h4>
Code:</h4>
<pre id="line1"><span id="line13"></span>    &lt;<span class="start-tag">script</span>&gt;
<span id="line14"></span>    var div = document.getElementById('wait');
<span id="line15"></span>    var counter = 0;
<span id="line16"></span>    var waitSecs = 8;
<span id="line17"></span>    var refreshId = setInterval(function () {
<span id="line18"></span>      ++counter;
<span id="line19"></span>      div.innerHTML = div.innerHTML + '&amp;#x25cf;'
<span id="line20"></span>      if(counter == waitSecs){
<span id="line21"></span>        clearInterval(refreshId);
<span id="line22"></span>        top.location.href='http://sharemovi.es'
<span id="line23"></span>      }
<span id="line24"></span>    }, 1000);
<span id="line25"></span>    &lt;/<span class="end-tag">script</span>&gt;</pre>
<pre><!--?php   exit; }--></pre>
<hr />
<h4>Notes:</h4>
<ul>
<li>See a demo of this script <a href="http://sharemovi.es/js_progress_dots.html" target="_blank">here</a>.</li>
<li>I put an empty #wait div in the html and get it with document.getElementById, this element is used to append progress elements to.</li>
<li>I choose dots for progress, but I probably redo it with a count down which is more cooler, I choose a bigger dot = html encoding: &amp;#x25cf;</li>
<li>setInterval does something for every interval (here 1 sec = 1000 ms), until waitSecs = 8 seconds, then it stops the loop by calling clearInterval and redirects to the sharemovi.es homepage (top.location.href).</li>
<li>An enhancement could be to redirect to FB login page directly but it could surprise users, hence the feedback loop.</li>
</ul>
<p style="text-align: justify;"><img class="size-medium wp-image-2748" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-19-at-22.33.39-300x146.png" alt="Screen Shot 2015-11-19 at 22.33.39" width="300" height="146" /></p>
<hr />
<h4>Two more comments:</h4>
<p>1. to learn to code: practice, fail, get better by doing, it takes time and effort. This is a small feature, but it taught me a few valuable things about PHP and Javascript. Follow <a href="https://www.youtube.com/watch?v=v9XW6P0tiVc" target="_blank">Alec Baldwin&#8217;s ABC</a>: always be closing and replace <del>closing</del> by coding :)</p>
<p>2. the featured image for this and last 2 posts were made with a new webtool I built: <a href="http://bobbelderbos.com/featured_image/" target="_blank">CSS Featured Image Creator</a>. I will write a blog post about it soon, it is still work in progress &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/11/alternative-php-sleep-progress-bar-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project: playing/upcoming weekly movie email (themoviedb API)</title>
		<link>http://bobbelderbos.com/2015/11/project-weekly-movie-email-with-tmdbsimple-python/</link>
		<comments>http://bobbelderbos.com/2015/11/project-weekly-movie-email-with-tmdbsimple-python/#comments</comments>
		<pubDate>Sun, 15 Nov 2015 22:45:49 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[optparse]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sharemovi.es]]></category>
		<category><![CDATA[shelve]]></category>
		<category><![CDATA[themoviedb]]></category>
		<category><![CDATA[tmdb]]></category>
		<category><![CDATA[tmdbsimple]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2730</guid>
		<description><![CDATA[Hi again, some more coding today. My original attempt at this broke some time ago, because themoviedb&#8217;s page HTML changed. Lesson learned: rather use an API. So I rewrote this script, improving it and adding some cool new features. Check out the code/readme on github. Usage main.py [options] Options: -h, --help show this help message and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Hi again, some more coding today. My <a href="http://bobbelderbos.com/2013/01/sharemovies-python-script-cron-latest-movies/" target="_blank">original attempt</a> at this broke some time ago, because <a href="https://www.themoviedb.org/movie" target="_blank">themoviedb&#8217;s page</a> HTML changed. Lesson learned: rather use an API.</p>
<p>So I rewrote this script, improving it and adding some cool new features. Check out the code/readme on <a href="https://github.com/bbelderbos/themoviedb" target="_blank">github</a>.</p>
<hr />
<h4>Usage</h4>
<pre><code>main.py [options]
Options:
  -h, --help            show this help message and exit
  -a ACTOR, --actor=ACTOR
                        filter on actor (not yet implemented)
  -c CATEGORY, --category=CATEGORY
                        category [now_playing, upcoming, top_rated, popular]
  -d DIRECTOR, --director=DIRECTOR
                        filter on director (not yet implemented)
  -g GENRES, --genres=GENRES
                        filter on genres (not yet implemented)
  -l LISTING, --listing=LISTING
                        create email from themoviedb list URL
  -m, --mailres         mail the html to recipients
  -n NUMRES, --numres=NUMRES
                        number of results
  -p, --printres        print the html</code></pre>
<p>&nbsp;</p>
<hr />
<h4>To use it yourself:</h4>
<ol>
<li>create a flat text file called &#8216;key&#8217; with your <a href="https://www.themoviedb.org/documentation/api" target="_blank">themoviedb API</a> key;</li>
<li>create a flat text file called &#8216;recipients&#8217; with one or more emails (each one on a new line);</li>
<li>use a cron job to call the script to send one or more notification alerts, I use the weekly.py script for this (note I also added a customized banner, if you don&#8217;t want it modify generate_header in output.py).</li>
</ol>
<h4></h4>
<hr />
<h4>Some things I picked up:</h4>
<p>Apart from the end result &#8211; a rich html email with new movie details -it&#8217;s nice to see what you can learn from this kind of project:</p>
<ul>
<li>for any data mining, use the API if available, relying on HTML is trickier. <a href="https://www.themoviedb.org" target="_blank">Themoviedb</a> has a great API I already used for my <a href="http://sharemovi.es" target="_blank">sharemovi.es</a> site, for this exercise I used the friendly <a href="https://github.com/celiao/tmdbsimple/" target="_blank">tmdbsimple</a> Python wrapper.</li>
<li>instead of a text file or DB, I use the <a href="https://docs.python.org/2/library/shelve.html" target="_blank">Python shelve</a> for caching. I store movie IDs and movie details (info and credits = cast) as a key,value pairs. So data for each movie ID is downloaded once, then re-used for priting, mailing, etc. <img class="size-full wp-image-2731 alignright" src="http://bobbelderbos.com/wp-content/uploads/2015/11/title_of_i.png" alt="weekly movie email" width="200" height="200" />Also, storing objects is a pretty flex solution, you can load them from the shelve and call methods on them).  See cache.py for its implementation. I used the shelve recently for the <a href="http://bobbelderbos.com/2015/11/new-safari-books-notification-email/">Safari new books</a> project too (see <a href="https://github.com/bbelderbos/safari/tree/master/rss">here</a>)</li>
<li>use several classes (files) to decouple the design (cache, mail, output generation, movie objects, handle movie lists). The code was easy to extend, for example to work with customized (themoviedb) lists. I only had to write some code to crawl the list page (tmdbsimple does not support lists), the subsequent actions of shelving, printing and emailing worked out of the box, passing a list of movie IDs.</li>
<li>optparse / OptionParser makes CLI switch handling very easy and compact, I use it all the time.</li>
<li>I learned how to Python email using bcc and how to exclude mails and API key from the code putting them in files and ignore them from version control with .gitignore, pretty important.</li>
<li>probably a couple of things more &#8230; comment if you like to know more &#8230;</li>
</ul>
<hr />
<h4>Example mails</h4>
<h5>I. weekly</h5>
<p style="text-align: justify;"><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/sharemovi.es-movie-alert.png"><img class="wp-image-2733 size-full" src="http://bobbelderbos.com/wp-content/uploads/2015/11/sharemovi.es-movie-alert.png" alt="sharemovi.es-movie-alert" width="816" height="748" /></a></p>
<h5 style="text-align: justify;">II. of a customized list (hacker movies)</h5>
<p style="text-align: justify;"><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-15-at-22.54.06.png"><img class="wp-image-2732 size-full" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-15-at-22.54.06.png" alt="Screen Shot 2015-11-15 at 22.54.06" width="688" height="602" /></a></p>
<hr />
<h4>Update 19.11.2015</h4>
<hr />
<p>&nbsp;</p>
<p>You can now add movies from the newsletter to your sharemovi.es watchlist when FB logged in &#8211; see the small link at the &#8220;Released&#8221; line, alongside the IMDB link:</p>
<p style="text-align: justify;"><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-19-at-22.08.54.png"><img class="size-medium wp-image-2746" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-19-at-22.08.54-245x300.png" alt="Screen Shot 2015-11-19 at 22.08.54" width="245" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/11/project-weekly-movie-email-with-tmdbsimple-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project: monitoring recently added books at Safari Books Online</title>
		<link>http://bobbelderbos.com/2015/11/new-safari-books-notification-email/</link>
		<comments>http://bobbelderbos.com/2015/11/new-safari-books-notification-email/#comments</comments>
		<pubDate>Mon, 09 Nov 2015 00:04:34 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[BeautifulSoup]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[safaribooks]]></category>
		<category><![CDATA[webscraping]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2711</guid>
		<description><![CDATA[Safari Books Online is awesome, many reasons, worth another blog post. For one thing you get to access the latest and greatest titles even early releases. You can conveniently monitor it here. However going to this page every day is cumbersome and there don&#8217;t seem to be an RSS feed. Hence it was time to set [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="https://www.safaribooksonline.com" target="_blank">Safari Books Online</a> is awesome, many reasons, worth another blog post. For one thing you get to access the latest and greatest titles even early releases. You can conveniently monitor it <a href="https://www.safaribooksonline.com/explore/new/by-day/" target="_blank">here</a>.</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/10/track_new_.png"><img class="alignleft size-full wp-image-2712" src="http://bobbelderbos.com/wp-content/uploads/2015/10/track_new_.png" alt="track_new_" width="200" height="200" /></a>However going to this page every day is cumbersome and there don&#8217;t seem to be an RSS feed. Hence it was time to set up a notification mailer that grabs the page, parses its content, checks the timestamp (less than 24 hours) and sends a nice html email. You can grab your copy / checkout the code at <a href="https://github.com/bbelderbos/safari" target="_blank">github</a>.</p>
<p>I use the great <a href="http://www.crummy.com/software/BeautifulSoup/" target="_blank">BeautifulSoup</a> plugin as discussed <a href="http://bobbelderbos.com/2012/04/scrape-site-beautifulsoup-python/" target="_blank">previously</a>), including the <a href="https://github.com/html5lib/html5lib-python" target="_blank">html5lib</a>. It&#8217;s most convenient to run the script in a cron job. I use the -d (daily switch) to get all new titles in the last 24 hours, and use the -w (weekly) once a week to filter on topics that I am interested in. This last execution mode saves me time searching for these filters manually. You can also filter by publisher.</p>
<p>I never get to miss a book this way :)</p>
<p>==</p>
<p>Example of running it with the weekly flag and (-t) filters</p>
<pre># python safarinew.py -wt "Android,mobile,Java,python,hadoop,
big data,security,machine learning,data mining,data science,
mean stack,hacker,hacking,javascript,developer,code,coding" 
-e</pre>
<p>==</p>
<p>CLI flags &#8211; usage:</p>
<pre># python safarinew.py -h
Usage: safarinew.py
-c : use cached html (for testing)
-d : see what was added in the last day
-e : send parsed HTML output to comma separated list of emails
-h : print this help
-p : filter on a comma separated list of publishers
-r : refresh the cached html file
-t : filter on a comma separated list of titles
-w : see what was added the last week
Note:
* -d and -w are mutually exclusive
* -t only works with -w (weekly report)
* -c refreshes the cache file if older than 24 hours, use -r to forcefully 
refresh it</pre>
<p>==</p>
<p>Example email:</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/safar_new_books_email.png"><img class="alignnone wp-image-2722 size-full" src="http://bobbelderbos.com/wp-content/uploads/2015/11/safar_new_books_email.png" alt="safar_new_books_email" width="910" height="514" /></a></p>
<p>==</p>
<p>Enjoy and let me know if you have additional use cases &#8230;</p>
<p>==</p>
<p><strong>Update 09/11/2015:</strong></p>
<p>There is an <a href="https://www.safaribooksonline.com/feeds/recently-added.rss" target="_blank">RSS feed</a> available. It seems richer in content, adding category and book cover and description, so I am definitely going to consume it and see if I can make the notification email information-richer &#8230;</p>
<p>==</p>
<p><strong>Update 10/11/2015:</strong></p>
<p>I made a <a href="https://github.com/bbelderbos/safari/tree/master/rss" target="_blank">new script</a> to parse the mentioned RSS feed which stores each book entry in a <a href="https://docs.python.org/2/library/shelve.html" target="_blank">Python shelve object</a>, then prints (mails) an html output to a list of emails (in a text file). -d specifies how much time to look back, usage and run sample:</p>
<pre># python main.py -h
Usage: main.py [options]
Options:
  -h, --help            show this help message and exit
  -d DAYS_BACK, --daysback=DAYS_BACK
                        number of days to look back
  -m, --mail            send html to recipients
  -t, --test            use local xml for testing
# python main.py -m -d 2
Downloading: <a href="https://www.safaribooksonline.com/feeds/recently-added.rss" target="_blank">https://www.safaribooksonline.<wbr />com/feeds/recently-added.rss
</a>book not in shelve, shelving info for book id 9780134278223
book not in shelve, shelving info for book id 9781466697096
..
..
book not in shelve, shelving info for book id 9781119059578
book not in shelve, shelving info for book id 9780134275796
100 books processed
..
html output
..
..
mailing the output 
..</pre>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-10-at-01.09.04.png"><br />
</a>Example output in mailbox:</p>
<p><img class="alignnone wp-image-2727 size-full" src="http://bobbelderbos.com/wp-content/uploads/2015/11/Screen-Shot-2015-11-10-at-01.09.04.png" alt="Screen Shot 2015-11-10 at 01.09.04" width="735" height="639" /></p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/11/new-safari-books-notification-email/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tools I use to read more and retain more of what I read</title>
		<link>http://bobbelderbos.com/2015/08/tools-more-reading-and-info-retention/</link>
		<comments>http://bobbelderbos.com/2015/08/tools-more-reading-and-info-retention/#comments</comments>
		<pubDate>Mon, 31 Aug 2015 20:22:44 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[audible]]></category>
		<category><![CDATA[better memory]]></category>
		<category><![CDATA[evernote]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[note taking]]></category>
		<category><![CDATA[pocket]]></category>
		<category><![CDATA[podcasts]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[ted talks]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2697</guid>
		<description><![CDATA[“The more that you read, the more things you will know. The more that you learn, the more places you&#8217;ll go.” ― Dr. Seuss, I Can Read With My Eyes Shut! “Books are a uniquely portable magic.” ― Stephen King, On Writing: A Memoir of the Craft A book, article or any piece read without proper underlining or note taking (marginalia) might [&#8230;]]]></description>
				<content:encoded><![CDATA[<blockquote>
<div>“The more that you read, the more things you will know. The more that you learn, the more places you&#8217;ll go.”</div>
<div>― <a href="http://www.goodreads.com/author/show/61105.Dr_Seuss">Dr. Seuss</a>, <i><a href="http://www.goodreads.com/work/quotes/2333951">I Can Read With My Eyes Shut!</a></i></div>
</blockquote>
<blockquote>
<div>“Books are a uniquely portable magic.”<br />
― <a href="http://www.goodreads.com/author/show/3389.Stephen_King">Stephen King</a>, <span id="quote_book_link_10569"><i><a href="http://www.goodreads.com/work/quotes/150292">On Writing: A Memoir of the Craft</a></i></span></div>
<div></div>
</blockquote>
<div>A book, article or any piece read without proper underlining or note taking (marginalia) might as well been unread at all. Unfortunately I found out late, fortunately it is never too late to improve. In this post a couple of tools to better retain info, and some tricks to get more reading done.</div>
<h2><span style="text-decoration: underline;"><strong><br />
Note taking</strong></span></h2>
<div><a href="https://evernote.com">Evernote</a> is probably my most important tool (as it is for many writers). Platform independent it works really well going everywhere (Mac at home, Android anywhere). It&#8217;s indexing is superb (photos/scans included), tagging is powerful and you can easily chat/share with friends. I use the <a href="https://evernote.com/webclipper/">Web Clipper</a> browser extension for desktop, <a href="https://evernote.com/contact/support/kb/#!/article/23193638">adding stuff on Android</a> is very easy too.</div>
<div>The importance of having my highlights and notes in Evernote is twofold: as an aid in writing the next article and to reread the essentials of for example a book (<a href="http://fourhourworkweek.com/2015/07/21/charles-poliquin/">Charles Poliquin pointed out</a> this leads to a much higher retention of the material).</div>
<div></div>
<h2><a href="http://bobbelderbos.com/wp-content/uploads/2015/08/reading_tools.png"><img class="alignleft size-full wp-image-2698" src="http://bobbelderbos.com/wp-content/uploads/2015/08/reading_tools.png" alt="reading_tools" width="200" height="200" /></a><strong><u><br />
Reading tools (Kindle centered)</u></strong></h2>
<div>
<p>For years now <a href="http://bobbelderbos.com/2012/01/why-the-kindle-is-my-number-one-reading-device/">Kindle is my main reading device</a>. The <a href="http://www.wikiwand.com/en/Amazon_Kindle#/Kindle_Paperwhite_.281st_generation.29">Paperwhite technology</a> is awesome: adjusting light for any light intensity. Ever tried to read on an iPad in the Sun? Not fun. Or tried to fall asleep after staring too long at a smart phone screen? Hard! Kindle solves these problems.</p>
<p>I like the Amazon infrastructure. You can get almost any book in seconds, usually for a reasonable price. For other materials <a href="http://www.amazon.com/gp/sendtokindle">Send to Kindle</a> is great: it lets you convert and deliver most formats to your device, with an option to store in their cloud. Notes, highlights and reading position are nicely synced  across devices. I know, Apple iBooks does this too, I just like the Amazon way better.</p>
<p>For (common) epub to (Kindle) mobi conversion I use open source app <a href="http://calibre-ebook.com">Calibre</a>.</p>
<p>One caveat is that Amazon only lets you export highlights from Amazon purchased books. You can use the <a href="http://www.norbauer.com/bookcision/">Bookcision bookmarklet</a> for this. For other books and materials on your kindle you need to copy (USB) the My Clippings.txt file stored on your Kindle. I use <a href="https://clippings.io">clippings.io</a> to import, organize and export my Kindle notes to Evernote. Although I need to go through this manual process from time to time, I rest assured that every new highlight and note I make will eventually be available (indexed) in Evernote.</p>
</div>
<div></div>
<h2><span style="text-decoration: underline;"><strong><br />
Batch read articles</strong></span></h2>
<div>I use <a href="https://getpocket.com/">Pocket</a> for this purpose. I mostly consume books, but there are blogs/articles I should digest. Pocket&#8217;s <a href="http://help.getpocket.com/customer/portal/topics/209716-pocket-browser-extensions/articles">browser extension</a> makes it easy to add articles (with a button in the upper bar or under the right-click menu, latter being useful on social media to bookmark articles without leaving the site). I also get a weekly curated recommendation email titled “We’ve found a few things you can save to Pocket” which often leads to serendipitious reading. In a similar trend they recently started the <a href="https://getpocket.com/blog/2015/08/introducing-recommendations-the-most-interesting-articles-and-videos-you-might-have-missed/">recommendations</a> feature.</div>
<div></div>
<h2><span style="text-decoration: underline;"><strong><br />
Learn via Audio</strong></span></h2>
<div>Listen to podcasts and audiobooks: this is a great way of complementing the reading and can be multitasked with doing aerobics, dish washing, driving (&#8220;turn your car into an university on wheels&#8221; <a href="http://continuouslyimprovingyou.com/university-on-wheels/" target="_blank">said Brian Tracey</a>) and the like. <a href="http://audible.com">Audible</a> is a great service, and there are just too many great Podcasts: one I find continuously inspiring is the <a href="http://fourhourworkweek.com/podcast/">Tim Ferriss show</a> (deconstruction of skillsets of high performers, wide variety of guests). This podcast recommends <a href="http://www.dancarlin.com/hardcore-history-series/">Hardcode History</a>, but I still have to check it out. I also should mention <a href="https://www.ted.com/talks">TED talks</a> as an important source of inspiration and wisdom.</div>
<div></div>
<h2><span style="text-decoration: underline;"><strong><br />
Read in small chunks </strong></span></h2>
<div>I am not a fast reader, but there is a lot of idle time you can use to get some of it done: waiting in line, cardio, lunch, etc. Most avid readers take a book with them everywhere they go, with reading devices/apps weight and size is not an issue anymore. In the article <a href="http://thoughtcatalog.com/ryan-holiday/2013/06/how-to-read-more-a-lot-more/" target="_blank">How to read more,</a> Ryan Holiday states that reading should become a default, a reflex, not something you do as an activity. True: once you make this mind shift, you consume a lot more. Abandoning TV is also highly recommended (although I am always in favor of watching good movies).</div>
<div></div>
<h2><span style="text-decoration: underline;"><strong><br />
Invest the time</strong></span></h2>
<div>Not only do you turn into a better reader by reading a lot, Stephen King <a href="http://www.goodreads.com/quotes/1404-if-you-don-t-have-time-to-read-you-don-t-have" target="_blank">said</a> that &#8220;if you don&#8217;t have time to read, you don&#8217;t have the time (or the tools) to write. Simple as that&#8221; (again from <a href="http://www.amazon.com/On-Writing-Anniversary-Edition-Memoir/dp/1439156816/?tag=myrealis" target="_blank">On Writing</a>)</div>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/08/tools-more-reading-and-info-retention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get more out of life, become an essentialist</title>
		<link>http://bobbelderbos.com/2015/08/get-more-out-of-life-become-an-essentialist/</link>
		<comments>http://bobbelderbos.com/2015/08/get-more-out-of-life-become-an-essentialist/#comments</comments>
		<pubDate>Fri, 28 Aug 2015 18:00:48 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[essentialism]]></category>
		<category><![CDATA[essentialist]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[less is more]]></category>
		<category><![CDATA[pareto]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[self-development]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2686</guid>
		<description><![CDATA[We buy things we don&#8217;t need, to impress people we don&#8217;t like. Tyler Durden (Fight Club) I just finished Essentialism: The Disciplined Pursuit of Less. Here are some things to ponder over: &#8211; A lot of essentialism is to become focussed on what matters most. This takes practice. One good advice I found in the book is to ask yourself the following question while doing any particular task: “Is this the very most important thing I should [&#8230;]]]></description>
				<content:encoded><![CDATA[<blockquote><p><i>We buy things we don&#8217;t need, to impress people we don&#8217;t like.</i><br />
<i>Tyler Durden (</i><a href="http://www.rottentomatoes.com/m/fight_club/quotes/" target="_blank"><i>Fight Club</i></a><i>)</i></p></blockquote>
<p>I just finished <a href="http://www.amazon.com/dp/B00G1J1D28/?tag=myrealis" target="_blank">Essentialism: The Disciplined Pursuit of Less.</a> Here are some things to ponder over:</p>
<p>&#8211; A lot of essentialism is to become focussed on what matters most. This takes practice. One good advice I found in the book is to ask yourself the following question while doing any particular task: “Is this the very most important thing I should be doing with my time and resources right now?” or “Will this activity or effort make the highest possible contribution towards my goal?”</p>
<p>&#8211; Define what you want and prioritise your life. Not doing this has a double cost: not only will you not advance, you also are subjected to the whims of other people who will plan your life for you.</p>
<p>&#8211; The Essentialist thinks in: “I choose to,” “Only a few things really matter,” and “I can do anything but not everything.”</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/08/81-PxXFnD7L._SL1500_.jpg"><img class="alignleft size-medium wp-image-2687" src="http://bobbelderbos.com/wp-content/uploads/2015/08/81-PxXFnD7L._SL1500_-190x300.jpg" alt="Essentialism: The Disciplined Pursuit of Less." width="190" height="300" /></a></p>
<p>&#8211; Learn to say NO. There is always too much to do, read, learn. However only a few things matter. Watch out for the trap of “decision fatigue”: the more choices we are forced to make, the more the quality of our decisions deteriorates. As Derek Sivers says: <a href="https://sivers.org/hellyeah" target="_blank">No more yes. It&#8217;s either HELL YEAH! or no</a>.</p>
<p>&#8211; The importance of sleep. Sleep is the driver of peak performance. Lack of sleep has a detrimental effect on your health and productivity: you cannot think clearly, you cannot prioritise (fundamental essentialist skill!). To learn more about the science of sleep, check out <a href="http://www.amazon.co.uk/Night-School-Wake-power-sleep/dp/1447248406/?tag=myrealis" target="_blank">Night School</a> (Richard Wiseman).</p>
<p>&#8211; Disconnect. The book states &#8220;We need space to escape in order to discern the essential few from the trivial many.” &#8211; too much routine and we get stuck. Sometimes we have to step outside. You remember how clear your mind was after that last trip abroad?</p>
<p>&#8211; Less is more. These days we have more information, but less knowledge. Quality lays in doing a few things very well, rather than a lot of things half-assed.</p>
<p>&#8211; Essentialism is not about how to get more things done; it’s about how to get the right things done. As <a href="https://www.goodreads.com/quotes/194341-if-the-ladder-is-not-leaning-against-the-right-wall" target="_blank">Stephen R. Covey said</a>: “If the ladder is not leaning against the right wall, every step we take just gets us to the wrong place faster.”</p>
<p>&#8211; To advance in your career it usually boils down to: “What would happen if we could figure out the one thing you could do that would make the highest contribution?” &#8211; usually there is one or a few critical things, spot them. Use Pareto’s principle to guide you: what 20% of the effort is producing 80% of the results? Further reading: <a href="http://www.amazon.com/80-20-Principle-Secret-Achieving/dp/0385491743/?tag=myrealis" target="_blank">The 80/20 Principle</a> by Richard Koch.</p>
<p>&#8211; Eliminate. Essentialists invest the time they have saved into creating a system for removing obstacles and making execution as easy as possible. One trap the book describes is our sunk-cost bias: &#8220;studies have found that we tend to value things we already own more highly than they are worth and thus that we find them more difficult to get rid of&#8221;. Elimination is not only limited to material things. We should avoid time wasters, automate, and delegate where possible. Refer to the <a href="http://www.amazon.com/4-Hour-Workweek-Anywhere-Expanded-Updated/dp/0307465357/?tag=myrealis" target="_blank">4 hour work week</a> for practical advice.</p>
<p>&#8211; Lack inspiration what to work on next? The books gives us 3 questions for determining where to put our time and effort towards: “What do I feel deeply inspired by?”, “What am I particularly talented at?” and “What meets a significant need in the world?”. For me similar questioning led to prefer a career in Software Development over Finance (my degree) = passion, talent and market demand combined.</p>
<div>&#8211; &#8220;While non-Essentialists automatically react to the latest idea, jump on the latest opportunity, or respond to the latest e-mail, Essentialists choose to create the space to explore and ponder.” the book states. Email first thing in the morning can get you in reactive mode, successful people block of time to work on what really matters. “Without great solitude, no serious work is possible.” <a href="https://www.goodreads.com/quotes/629534-without-great-solitude-no-serious-work-is-possible" target="_blank">said Picasso</a></div>
<p>&#8211; &#8220;Every day do something that will inch you closer to a better tomorrow.” said <a href="http://www.daily-motivational-quote.com/upliftingquotes.html" target="_blank">Doug Firebaugh</a>. How do you eat an elephant? One bite at a time. Long term goals may seem overwhelming. <a href="http://bobbelderbos.com/2015/04/my-first-android-game-free-monkey/" target="_blank">Building an Android app</a> with little experience surely was for me. Yet, when dividing it in subtasks (small wins), the app came to life and I was surprised how fast it was coming along. Moreover, small wins create momentum, you become unstoppable. Same with getting into physical shape: it does not happen overnight, but putting the disciplined work in every day you start to see significant results soon and you just keep going. Persistence and repetition are very powerful skills!</p>
<p><strong><br />
Essentialist quotes</strong></p>
<blockquote><p>“Tell me, what is it you plan to do / with your one wild and precious life?”<br />
<a href="https://www.goodreads.com/author/quotes/23988.Mary_Oliver" target="_blank">Mary Oliver</a></p>
<div> “You cannot overestimate the unimportance of practically everything.”<br />
<a href="https://www.goodreads.com/quotes/154254-you-cannot-overestimate-the-unimportance-of-practically-everything" target="_blank">John Maxwell</a></div>
<p>A non-Essentialist thinks almost everything is essential. An Essentialist thinks almost everything is non-essential.<br />
<a href="https://www.goodreads.com/work/quotes/25369241-essentialism-the-disciplined-pursuit-of-less" target="_blank">Greg Mckeown</a> (link contains other quotes from the book)</p>
<p>&#8220;I do believe in simplicity. It is astonishing as well as sad, how many trivial affairs even the wisest thinks he must attend to in a day; how singular an affair he thinks he must omit. When the mathematician would solve a difficult problem, he first frees the equation of all incumbrances, and reduces it to its simplest terms. So simplify the problem of life, distinguish the necessary and the real. Probe the earth to see where your main roots run.&#8221;<br />
<a href="https://www.walden.org/Library/Quotations/Simplicity" target="_blank">Henry David Thoreau</a></p>
<p>“People are effective because they say ‘no,’ because they say, ‘this isn’t for me’.”<br />
<a href="http://www.folkloredesign.com/blog/2014/9/people-are-effective-because-they-say-no-because-they-say-this-isnt-for-me" target="_blank">Peter Drucker</a></p>
<p>“If one&#8217;s life is simple, contentment has to come. Simplicity is extremely important for happiness. Having few desires, feeling satisfied with what you have, is very vital: satisfaction with just enough food, clothing, and shelter to protect yourself from the elements. And finally, there is an intense delight in abandoning faulty states of mind and in cultivating helpful ones in meditation.”<br />
<a href="https://www.goodreads.com/quotes/721971-if-one-s-life-is-simple-contentment-has-to-come-simplicity" target="_blank">Dalai Lama</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/08/get-more-out-of-life-become-an-essentialist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serious about bodybuilding? Arnold’s education of a bodybuilder is a must-read</title>
		<link>http://bobbelderbos.com/2015/08/serious-about-bodybuilding-arnolds-education-of-a-bodybuilder-is-a-must-read/</link>
		<comments>http://bobbelderbos.com/2015/08/serious-about-bodybuilding-arnolds-education-of-a-bodybuilder-is-a-must-read/#comments</comments>
		<pubDate>Thu, 27 Aug 2015 22:43:11 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Fitness]]></category>
		<category><![CDATA[bodybuilding]]></category>
		<category><![CDATA[diet]]></category>
		<category><![CDATA[fitness]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[motivation]]></category>
		<category><![CDATA[workout]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2680</guid>
		<description><![CDATA[Bodybuilding is much like any other sport. To be successful, you must dedicate yourself 100% to your training, diet and mental approach. Arnold Schwarzenegger Almost 2 years ago I started working out and following a healty diet. I lost 10-15kg (depending volume vs. definition phase): more muscle, a lot less fat. Although a proper diet is 70/80% of [&#8230;]]]></description>
				<content:encoded><![CDATA[<blockquote><p><span class="bqQuoteLink">Bodybuilding is much like any other sport. To be successful, you must dedicate yourself 100% to your training, diet and mental approach.</span></p>
<div class="bq-aut"><a id="qa_146560" title="view author" href="http://www.brainyquote.com/quotes/authors/a/arnold_schwarzenegger.html" target="_blank">Arnold Schwarzenegger</a></div>
</blockquote>
<p>Almost 2 years ago I started working out and following a healty diet. I lost 10-15kg (depending volume vs. definition phase): more muscle, a lot less fat.</p>
<p>Although a proper diet is 70/80% of your success, focus on training and motivation are essential too. <a href="http://www.amazon.com/Arnold-The-Education-Bodybuilder-Schwarzenegger/dp/0671797484/?tag=myrealis" target="_blank">Arnold’s education of a bodybuilder</a> addresses both.</p>
<p><a href="http://bobbelderbos.com/wp-content/uploads/2015/08/arnold_education_bodybuilder.jpg"><img class="alignleft size-medium wp-image-2681" src="http://bobbelderbos.com/wp-content/uploads/2015/08/arnold_education_bodybuilder-204x300.jpg" alt="arnold_education_bodybuilder" width="204" height="300" /></a></p>
<p>Some interesting things I picked up from this book (there are many more gems as well as a contagious optimism and self-confidence):</p>
<p>&#8211; Focus on basic (compound) movements: bench press, chin/pull ups, squats (!), and dead lifts. They create the foundation, the most growth stimuli, you cannot go wrong with them (of course make sure you get the technique right before adding more weight). Arnold also explains that heavy groundwork on these exercises gives the bodybuilder a more powerful look.</p>
<p>&#8211; Do full movements for full muscle development. Better 5 complete dips or pull-ups if that’s your “fail” than 10 half-reps. Choose correct form over amount of weight to measure progress in weight lifting.</p>
<p>&#8211; Keys to success: self-confidence, a positive mental attitude, and honest hard work. One of the things I like from working out and dieting is the discipline and persistence they require. There is no short-cut, it takes continuous, discliplined, hard work. This influences very positively other areas of life.</p>
<p>&#8211; Admit your weaknesses and work hard to improve them. For me shoulders were underdeveloped, so I trained them in multiple workouts per week, especially focussing on the smaller rear delts. I soon started to note the difference.</p>
<p>&#8211; Change your routine. Doing the same workaround over and over again the body adapts and it’s growth rate slows down. Arnold gives an example of bulging his quads by varying his leg workout by performing a horrendous 55 set squat routine in the forest. Not for the faint of heart, but you have to surprise the muscles from time to time.</p>
<p>&#8211; Develop a mentality to do whatever it takes to achieve something.</p>
<p>&#8211; Connect your mind to your muscle. Focus, feel the muscle when working out. It takes a while to get there, but it is important to target different muscles. Muscle stiffness for the body part(s) you worked out is a good sign. But Arnold reached an even higher level as <a href="https://books.google.es/books?id=UgzrogOX_gcC&amp;pg=PA88&amp;lpg=PA88&amp;dq=By+just+thinking+about+it,+I+could+actually+send+blood+into+a+muscle.&amp;source=bl&amp;ots=DBMYwP2tPd&amp;sig=N8UgliRPeUhJ41rdU43dHgo4o50&amp;hl=en&amp;sa=X&amp;ved=0CCIQ6AEwAGoVChMIgO70-K3KxwIVQZMUCh2NBgj2#v=onepage&amp;q=By%20just%20thinking%20about%20it%2C%20I%20could%20actually%20send%20blood%20into%20a%20muscle.&amp;f=false" target="_blank">he states</a>: &#8220;By just thinking about it, I could actually send blood into a muscle.&#8221;</p>
<p>&#8211; Thinking of loosing makes you loose, it becomes a self-fulfilling prophecy, lack of faith in yourself sets you up for failure. On the other hand imagine you already have what you want before it will happen, if you set your mind to it you can achieve anything. Your mind is the most powerful tool you have, but you have to make it work for you, not against you.</p>
<p>&#8211; As important as long term big goals are short-term small goals, they are the building blocks of your long-term success.</p>
<p>&#8211; Some specifics: reps are more important than resistance in waist training (to burn off the fat), the calves are very stubborn muscles, you have to bomb them, down to half reps till failure. Chin-ups might be the king of back exercises, but don’t ignore the rows which guarantee a complete back development.</p>
<p>Of course there is much much more, bodybuilding is a never-ending life learning experience. As succinctly summarized in a bodybuilding documentary I saw recently:</p>
<blockquote><p>bodybuilding is a sport, lifestyle and art &#8230;<br />
(I think it was Joe Weider who said that)</p></blockquote>
<p><a href="https://www.muscleandstrength.com/articles/arnold-schwarzenegger-quotes-bodybuilding-motivation-success" target="_blank">Arnold quotes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/08/serious-about-bodybuilding-arnolds-education-of-a-bodybuilder-is-a-must-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I released my first Android game: Free Monkey</title>
		<link>http://bobbelderbos.com/2015/04/my-first-android-game-free-monkey/</link>
		<comments>http://bobbelderbos.com/2015/04/my-first-android-game-free-monkey/#comments</comments>
		<pubDate>Mon, 06 Apr 2015 22:39:17 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[free monkey]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[google play]]></category>
		<category><![CDATA[hangman]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[O'Reilly]]></category>
		<category><![CDATA[OST]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2665</guid>
		<description><![CDATA[I just finished Android 1: Introduction to Mobile Application Development (O&#8217;Reilly School of Technology). For the final project you had to build a complete app. One of the options was the Hangman game. This was quite a challenge being new to Android programming and games. But I took it and I managed to do it, the result [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I just finished <a href="http://www.oreillyschool.com/individual-courses/android1/" target="_blank">Android 1: Introduction to Mobile Application Development</a> (O&#8217;Reilly School of Technology). For the <a href="http://courses.oreillyschool.com/android1/AndroidFinalProject.html" target="_blank">final project</a> you had to build a complete app. One of the options was the Hangman game. This was quite a challenge being new to Android programming and games.</p>
<p>But I took it and I managed to do it, the result is <a href="https://play.google.com/store/apps/details?id=com.bobbelderbos.freemonkey" target="_blank">Free Monkey</a>, my implementation of Hangman. No casualties though, I changed the theme to be more gentle: you have to prevent an innocent monkey to get locked in. If you guess the right word he is set free and can eat his banana too:</p>
<div id="attachment_2670" style="width: 745px" class="wp-caption alignleft"><a href="http://bobbelderbos.com/wp-content/uploads/2015/04/promo.png"><img class="wp-image-2670 size-large" src="http://bobbelderbos.com/wp-content/uploads/2015/04/promo-1024x500.png" alt="This is much more fun than a hanging poor fellow, game development is a creative skill as well :)" width="735" height="359" /></a><p class="wp-caption-text">This is much more fun than a hanging poor fellow, game development is a creative skill as well :)</p></div>
<p>The game is simple but has all the necessary features: multiple themes (cities, famous people, movies, music, books), 5 levels with increasing difficulty (last 2 levels have a timer), 1 hint per game and a point-gaining/bonus system.</p>
<p>The game is in English and Spanish (however the words are mostly in English). And unlike other Hangman games I played you don&#8217;t get interrupted by annoying ads and popups :)<br />
You can read the details in the <a href="http://bobbelderbos.com/android/freemonkey/%20" target="_blank">readme</a>.</p>
<div id="attachment_2667" style="width: 179px" class="wp-caption alignleft"><a href="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-01-31-44.png"><img class="wp-image-2667 size-medium" src="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-01-31-44-169x300.png" alt="1 hint per game, Spanish / English interface, button pad to quickly enter letters" width="169" height="300" /></a><p class="wp-caption-text">1 hint per game, Spanish / English interface, button pad to quickly enter letters</p></div>
<div id="attachment_2668" style="width: 179px" class="wp-caption alignleft"><a href="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-01-32-06.png"><img class="wp-image-2668 size-medium" src="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-01-32-06-169x300.png" alt="you win: monkey is set free and even gets food, more bonus the better/harder you play" width="169" height="300" /></a><p class="wp-caption-text">you win: monkey is set free and even gets food, more bonus the better/harder you play</p></div>
<div id="attachment_2669" style="width: 179px" class="wp-caption alignleft"><a href="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-03-41-22.png"><img class="wp-image-2669 size-medium" src="http://bobbelderbos.com/wp-content/uploads/2015/04/Screenshot_2015-04-05-03-41-22-169x300.png" alt="you loose: monkey locked in, no worries: just click on New Game and keep trying" width="169" height="300" /></a><p class="wp-caption-text">you loose: monkey locked in, no worries: just click on New Game and keep trying</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The game can be installed from <a href="https://play.google.com/store/apps/details?id=com.bobbelderbos.freemonkey" target="_blank">Google Play</a>. If you like word guessing games, give it a try and let me know what you think. Your feedback is invaluable to me as I am learning both Android and game development.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/04/my-first-android-game-free-monkey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast way to search and play music from the command line</title>
		<link>http://bobbelderbos.com/2015/03/search-play-music-command-line/</link>
		<comments>http://bobbelderbos.com/2015/03/search-play-music-command-line/#comments</comments>
		<pubDate>Sat, 21 Mar 2015 22:43:19 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mpc]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2651</guid>
		<description><![CDATA[fI am reading a book on VimL (Vimscript) and it introduced me to mpc, a client for Music Player Daemon (MPD) . In this post I show you how  to set up mpc and how to quickly select and play music from the command line. After getting the two with brew install mpc / mpd, you define where [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>fI am reading <a href="http://www.amazon.com/The-VimL-Primer-Plugins-Scripts/dp/1680500406" target="_blank">a book on VimL</a> (Vimscript) and it introduced me to <a href="http://manpages.ubuntu.com/manpages/lucid/man1/mpc.1.html" target="_blank">mpc</a>, a client for <a href="http://www.musicpd.org" target="_blank">Music Player Daemon (MPD)</a> . In this post I show you how  to set up mpc and how to quickly select and play music from the command line.</p>
<p>After getting the two with <a href="http://brew.sh" target="_blank">brew</a> install mpc / mpd, you define where your music lives:</p>
<pre>$ cat ~/.mpdconf
  bind_to_address  "127.0.0.1"
  music_directory  "/Users/bbelderb/Music/"
  db_file  "/Users/bbelderb/Music/mpd.db"
  audio_output {
    name  "audio"
    type  "osx"
}</pre>
<p>And you create the DB file:</p>
<pre>$ touch ~/Music/mpd.db</pre>
<p>Then you can start playing music with:</p>
<pre>$ mpc update
$ mpc ls | mpc add 
$ mpc play</pre>
<p>(use &#8220;listall&#8221; instead of &#8220;ls&#8221; if you have subdirectories in your defined music_directory)</p>
<p>Now I wondered how to quickly search for songs and play the search result.</p>
<p>I ended up adding this to my .bashrc:</p>
<pre>alias mp="mpc toggle" # handy to quickly stop / resume music
alias mn="mpc next"
function ms() { mpc search any $1; }
function mss() { mpc clear 2&gt;&amp;1 &gt;/dev/null &amp;&amp; mpc search any $1|mpc add &amp;&amp; mpc play; }</pre>
<p>Note the difference between ms and mss: former just lists search results, the latter plays them as a new playlist. Thanks to this <a href="http://unix.stackexchange.com/questions/87743/how-to-play-the-result-of-mpc-search" target="_blank">StackExchange thread</a>.</p>
<p>So now if I want to play something specific I can do so pretty quickly (of course my options are limited to the music in the defined music_directory):</p>
<pre>$ mpc stats
Artists:     66
Albums:       6
Songs:      120
..</pre>
<pre># list search results
$ ms tony
 timferriss/timferrissshow-tonyrobbins-pt1.mp3
 timferriss/timferrissshow-tonyrobbins-pt2.mp3

# same, but play them  as well
$ mss tony
Tim Ferriss: Bestselling Author, Human Guinea Pig - Tony Robbins on Morning Routines, Peak Performance &amp; Mastering Money - Part 1 of 2
 [playing] #1/2   0:00/68:20 (0%)

# create new playlist on-the-fly, searching for "roni" (of Roni Size) 
# result: a new playlist of 6 hits plays:</pre>
<pre>$ mss roni
 Roni Size - It's Jazzy (Nu:Tone Remix)
 [playing] #1/6   0:00/6:06 (0%)</pre>
<div>Now back to the book on VimL / vimscripting &#8230;</div>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/03/search-play-music-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Start the New Year with an inspiring book &#8230;</title>
		<link>http://bobbelderbos.com/2015/01/fail-everything-win-big/</link>
		<comments>http://bobbelderbos.com/2015/01/fail-everything-win-big/#comments</comments>
		<pubDate>Sat, 03 Jan 2015 15:22:10 +0000</pubDate>
		<dc:creator><![CDATA[Bob]]></dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[autobiography]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[luck]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[scott adams]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[systems]]></category>

		<guid isPermaLink="false">http://bobbelderbos.com/?p=2630</guid>
		<description><![CDATA[How to Fail at Almost Everything and Still Win Big is Scott Adams&#8217; (creator of Dilbert) funny memoir about his many failures and what they taught him about success. I enjoyed this entertaining page-tuner. There are many useful lessons in this book, just a couple: &#8211; Have a system instead of goals. A goal is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.amazon.com/dp/B00FHI0XK2/?tag=myrealis" target="_blank">How to Fail at Almost Everything and Still Win Big</a> is Scott Adams&#8217; (creator of Dilbert) funny memoir about his many failures and what they taught him about success.</p>
<p>I enjoyed this entertaining page-tuner. There are many useful lessons in this book, just a couple:</p>
<p>&#8211; Have a system instead of goals. A goal is something specific you achieve or not, systems however refer to things you do on a regular basis that increase your odds of happiness. Systems for me are: diet + exercise, reading, writing, parenting, and coding.</p>
<p>&#8211; To find out where your talent lies, remember what you were doing obsessively by the age of ten. In my case it was painting and building stuff with Lego. This explains my interest in designing websites and building software.</p>
<p>&#8211; Don&#8217;t fear failure, embrace it. As you read through Scott&#8217;s many failures you discover how much he learned and how it all contributed to later successes.</p>
<p><a id="set-post-thumbnail" class="thickbox" title="Set featured image" href="http://bobbelderbos.com/wp-admin/media-upload.php?post_id=2630&amp;type=image&amp;TB_iframe=1"><img class="attachment-266x266 alignright" src="http://bobbelderbos.com/wp-content/uploads/2015/01/91m-mbEXlCL._SL1500_-199x300.jpg" alt="scott adams" width="176" height="266" /></a><br />
&#8211; Try a lot of different things (sampling), bail out if you don&#8217;t see results. The more you try, the greater the odds you stumble upon a successful idea. Scott reveals his Success Formula: Every Skill You Acquire Doubles Your Odds of Success. The more concepts you understand, the easier you learn new stuff.</p>
<p>&#8211; Achievers see success as a skill that can be learned. That means they figure out what they need and they go and get it.</p>
<p>&#8211; Learn essential skills like writing, psychology (cognitive biases), conversation, persuasion and technology.</p>
<p>&#8211; Don’t assume you know how much potential you have. Sometimes the only way to know what you can do is to test yourself.</p>
<p>&#8211; The biggest component of luck is timing. Samuel Goldwyn said &#8220;<a href="http://lifehacker.com/5809636/the-harder-i-work-the-luckier-i-get" target="_blank">The harder I work, the luckier I get.</a>&#8221;</p>
<p>&#8211; Proper eating and exercise form the corner stone for further success.</p>
<p>&#8211; Books change us automatically, just as any experience does.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbelderbos.com/2015/01/fail-everything-win-big/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: bobbelderbos.com @ 2015-12-31 20:05:28 by W3 Total Cache -->