<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>I Prefer Jim</title>
	
	<link>http://www.ipreferjim.com</link>
	<description>Developer James Schubert shares his code and his thoughts.</description>
	<lastBuildDate>Thu, 23 Feb 2012 02:18:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ipreferjim" /><feedburner:info uri="ipreferjim" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nd/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nd/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/ipreferjim" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fipreferjim" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>My Review of Accessible EPUB 3</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/g_BETnzBJH4/</link>
		<comments>http://www.ipreferjim.com/2012/02/my-review-of-accessible-epub-3/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 02:16:54 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=815</guid>
		<description><![CDATA[Originally submitted at O'Reilly Best Practices for Creating Universally Usable Content Accessible EPUB 3 Good content about a new standard By Jim Schubert from Richmond, VA on 2/22/2012 &#160; 4out of 5 Pros: Accurate, Concise Cons: "however" Best Uses: Novice, Student Describe Yourself: Software Engineer I reviewed Accessible EPUB 3 as part of the O'Reilly [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://shop.oreilly.com/product/0636920025283.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/05/49/15318982_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">Best Practices for Creating Universally Usable Content</p>
</div>
<p><a href="http://shop.oreilly.com/product/0636920025283.do" style="display: none;" class="url fn"><span class="fn">Accessible EPUB 3</span></a></div>
<p><br clear="left">
<p><strong class="summary">Good content about a new standard</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="2012222T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">2/22/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -144px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">4</span>out of 5</div>
<p><strong>Pros: </strong>Accurate, Concise</p>
<p><strong>Cons: </strong>"however"</p>
<p><strong>Best Uses: </strong>Novice, Student</p>
<p><strong>Describe Yourself: </strong>Software Engineer</p>
<p style="margin-top:1em" class="description">I reviewed Accessible EPUB 3 as part of the O'Reilly Blogger program.  This book is actually an excerpt from the upcoming EPUB 3 Best Practices.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />The content of this excerpt is undeniably rich. The first 25 pages or so may be 'review' material if you're already pretty familiar with HTML5. If so, skim these pages for the EPUB-specific additions.</p>
<p>Knowing very little about the changes in EPUB 3, I was very intrigued by the audio and video capabilities that mirror those of HTML5. I would have liked to see more discussion about the support of these elements in readers on the market.  There were a few places where the author warned about new features not being fully available in many readers, but the lack of statistics made me wonder if this is merely speculation or if any readers currently support the new features.</p>
<p>I thought the Text-to-Speech section was very informative. The concept of having a lexicon as a pronunciation index coupled with inline SSML will make EPUB 3 very usable on readers. I sometimes turn on a screen reader just to see how elements are read aloud, laughing at mispronounced words or phrases. If authors and publishers put in the effort to add these features of EPUB 3, text-to-speech engines will make only a fraction of the pronunciation mistakes.</p>
<p>I would have given this excerpt five stars, but the language was occasionally difficult to read.  For instance, the author really enjoys ending sentences with "however" as if it is a filler word. After encountering this a few times, I ended up reading over sentences (sometimes spanning 2-3 lines of a paragraph) and replacing the ending "however" with synonyms to see if it made sense. Mostly, it didn't. I think this really detracted from the overall content, because I found myself retracing so much text to understand how the disjointed conjunctive adverb made sense that the content ended up feeling choppy.</p>
<p>Since the end result is still in production, I would imagine this text has already gone through a few rounds of editing.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=815&amp;md5=cb0121781d2060e7d7c915b07c197e31" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/tEG9i_Yo-I-O9YkhS-K9b0mcrCk/0/da"><img src="http://feedads.g.doubleclick.net/~a/tEG9i_Yo-I-O9YkhS-K9b0mcrCk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tEG9i_Yo-I-O9YkhS-K9b0mcrCk/1/da"><img src="http://feedads.g.doubleclick.net/~a/tEG9i_Yo-I-O9YkhS-K9b0mcrCk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/g_BETnzBJH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/my-review-of-accessible-epub-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmy-review-of-accessible-epub-3%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+Accessible+EPUB+3&amp;description=Originally+submitted+at+O%27ReillyBest+Practices+for+Creating+Universally+Usable+ContentAccessible+EPUB+3Good+content+about+a+new+standardBy+Jim+Schubert+from+Richmond%2C+VA+on+2%2F22%2F2012%26nbsp%3B4out+of+5Pros%3A+Accurate%2C+ConciseCons%3A+%22however%22Best+Uses%3A+Novice%2C+StudentDescribe+Yourself%3A+Software+EngineerI+reviewed+Accessible+EPUB+3+as+part+of+the+O%27Reilly+Blogger+program.++This+book+is+actually+an+excerpt+from+the+upcoming+EPUB+3+Best+Practices.%0AThe+content+of+this+excerpt+is+undeniably+rich.+The+first+25+pages+or+so+may+be+%27review%27+material+if+you%27re+already+pretty+familiar+with+HTML5.+If+so%2C+skim+these+pages+for+the+EPUB-specific+additions.%0A%0AKnowing+very+little+about+the+changes+in+EPUB+3%2C+I+was+very+intrigued+by+the+audio+and+video+capabilities+that+mirror+those+of+HTML5.+I+would+have+liked+to+see+more+discussion+about+the+support+of+these+elements+in+readers+on+the+market.++There+were+a+few+places+where+the+author+warned+about+new+features+not+being+fully+available+in+many+readers%2C+but+the+lack+of+statistics+made+me+wonder+if+this+is+merely+speculation+or+if+any+readers+currently+support+the+new+features.%0A%0AI+thought+the+Text-to-Speech+section+was+very+informative.+The+concept+of+having+a+lexicon+as+a+pronunciation+index+coupled+with+inline+SSML+will+make+EPUB+3+very+usable+on+readers.+I+sometimes+turn+on+a+screen+reader+just+to+see+how+elements+are+read+aloud%2C+laughing+at+mispronounced+words+or+phrases.+If+authors+and+publishers+put+in+the+effort+to+add+these+features+of+EPUB+3%2C+text-to-speech+engines+will+make+only+a+fraction+of+the+pronunciation+mistakes.%0A%0AI+would+have+given+this+excerpt+five+stars%2C+but+the+language+was+occasionally+difficult+to+read.++For+instance%2C+the+author+really+enjoys+ending+sentences+with+%22however%22+as+if+it+is+a+filler+word.+After+encountering+this+a+few+times%2C+I+ended+up+reading+over+sentences+%28sometimes+spanning+2-3+lines+of+a+paragraph%29+and+replacing+the+ending+%22however%22+with+synonyms+to+see+if+it+made+sense.+Mostly%2C+it+didn%27t.+I+think+this+really+detracted+from+the+overall+content%2C+because+I+found+myself+retracing+so+much+text+to+understand+how+the+disjointed+conjunctive+adverb+made+sense+that+the+content+ended+up+feeling+choppy.%0A%0ASince+the+end+result+is+still+in+production%2C+I+would+imagine+this+text+has+already+gone+through+a+few+rounds+of+editing.%28legalese%29&amp;tags=Review%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/my-review-of-accessible-epub-3/</feedburner:origLink></item>
		<item>
		<title>git push: fatal: unable to read SHA1</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/CZCVzYP0Y54/</link>
		<comments>http://www.ipreferjim.com/2012/02/git-push-fatal-unable-to-read-sha1/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 01:46:00 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=808</guid>
		<description><![CDATA[Today, I was faced with an interesting error in a git repository. I am backing up a lot of old projects from during and after college into a private git repo. In doing so, I moved some folders around which disconnected a couple of binary files. After pushing, I received an error: unable to read [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I was faced with an interesting error in a git repository.  I am backing up a lot of old projects from during and after college into a private git repo.  In doing so, I moved some folders around which disconnected a couple of binary files.  After pushing, I received an error: <strong>unable to read [SHA1]</strong>.</p>
<p>The fixes, in short:</p>
<pre class="brush: bash; title: ; notranslate">
$ git fsck
$ git log --raw --all --full-history | grep SHA1-HERE
$ git hash-object -w OBJECT-PATH-HERE
$ git push
</pre>
<p>Here is the error and a walk-through of coming up with the fixes above:</p>
<pre class="brush: bash; title: ; notranslate">
jim at schubert in /media/16GB/projects/school on master
$ git push
Password:
Counting objects: 1945, done.
error: unable to find 2978ec4d75abb8c6bab225d8adfbd2bef064338a
error: unable to unpack bddbd13afd698e5ba7d572c9270e52bcac862661 header
error: inflateEnd: failed
Delta compression using up to 2 threads.
Compressing objects: 100% (1854/1854), done.
fatal: unable to read 2978ec4d75abb8c6bab225d8adfbd2bef064338a
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
fatal: write error: Bad file descriptor
</pre>
<p>After running <em>git fsck</em>, I found that I had two missing blobs:</p>
<pre class="brush: bash; title: ; notranslate">
jim at schubert in /media/16GB/projects/school on master*
$ git fsck
dangling tree dbe9172996edbb7df517b0305c38891d78b72f66
dangling tree fbf7d8336b5f2347da23eb8a3938de5ab18f783c
missing blob 2978ec4d75abb8c6bab225d8adfbd2bef064338a
missing blob bddbd13afd698e5ba7d572c9270e52bcac862661
</pre>
<p>To fix this, I had to get the filenames of these blobs and write them back into the repository:</p>
<pre class="brush: bash; title: ; notranslate">
jim at schubert in /media/16GB/projects/school on master*
$ git log --raw --all --full-history | grep bddbd13
:000000 100644 0000000... bddbd13... A	INFO 465/Project2/UseCase/Diagrams/Leader - Time &amp; Mileage.vsd

jim at schubert in /media/16GB/projects/school on master*
$ git log --raw --all --full-history | grep 2978ec4
:000000 100644 0000000... 2978ec4... A	INFO 465/Project2/Prototype/WebPrototype/WebPrototype/bin/WebPrototype.dll
</pre>
<p>Writing these files back into the repository, the push was successful.  To write these back, do the following:</p>
<pre class="brush: bash; title: ; notranslate">
jim at schubert in /media/16GB/projects/school on master
$ git hash-object -w INFO\ 465/Project2/UseCase/Diagrams/Leader\ -\ Time\ \&amp;\ Mileage.vsd
bddbd13afd698e5ba7d572c9270e52bcac862661
jim at schubert in /media/16GB/projects/school on master
$ git hash-object -w INFO\ 465/Project2/Prototype/WebPrototype/WebPrototype/bin/WebPrototype.dll
2978ec4d75abb8c6bab225d8adfbd2bef064338a
</pre>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=808&amp;md5=9727c12eefecd3576868957e3dc63837" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/XQ-FpVmZ1XvslGhppLwEOVbjBTA/0/da"><img src="http://feedads.g.doubleclick.net/~a/XQ-FpVmZ1XvslGhppLwEOVbjBTA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XQ-FpVmZ1XvslGhppLwEOVbjBTA/1/da"><img src="http://feedads.g.doubleclick.net/~a/XQ-FpVmZ1XvslGhppLwEOVbjBTA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/CZCVzYP0Y54" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/git-push-fatal-unable-to-read-sha1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fgit-push-fatal-unable-to-read-sha1%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=git+push%3A+fatal%3A+unable+to+read+SHA1&amp;description=Today%2C+I+was+faced+with+an+interesting+error+in+a+git+repository.++I+am+backing+up+a+lot+of+old+projects+from+during+and+after+college+into+a+private+git+repo.++In+doing+so%2C+I+moved+some+folders+around+which+disconnected+a+couple+of+binary+files.++After+pushing%2C+I+received+an+error%3A+unable+to+read+%5BSHA1%5D.%0D%0A%0D%0AThe+fixes%2C+in+short%3A%0D%0A%0D%0A%5Bbash%5D%0D%0A%24+git+fsck%0D%0A%24+git+log+--raw+--all+--full-history+%7C+grep+SHA1-HERE%0D%0A%24+git+hash-object+-w+OBJECT-PATH-HERE%0D%0A%24+git+push%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AHere+is+the+error+and+a+walk-through+of+coming+up+with+the+fixes+above%3A%0D%0A%0D%0A%5Bbash%5D%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%0D%0A%24+git+push%0D%0APassword%3A+%0D%0ACounting+objects%3A+1945%2C+done.%0D%0Aerror%3A+unable+to+find+2978ec4d75abb8c6bab225d8adfbd2bef064338a%0D%0Aerror%3A+unable+to+unpack+bddbd13afd698e5ba7d572c9270e52bcac862661+header%0D%0Aerror%3A+inflateEnd%3A+failed%0D%0ADelta+compression+using+up+to+2+threads.%0D%0ACompressing+objects%3A+100%25+%281854%2F1854%29%2C+done.%0D%0Afatal%3A+unable+to+read+2978ec4d75abb8c6bab225d8adfbd2bef064338a%0D%0Afatal%3A+The+remote+end+hung+up+unexpectedly%0D%0Afatal%3A+The+remote+end+hung+up+unexpectedly%0D%0Afatal%3A+write+error%3A+Bad+file+descriptor%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AAfter+running+git+fsck%2C+I+found+that+I+had+two+missing+blobs%3A%0D%0A%0D%0A%5Bbash%5D%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%2A%0D%0A%24+git+fsck+%0D%0Adangling+tree+dbe9172996edbb7df517b0305c38891d78b72f66%0D%0Adangling+tree+fbf7d8336b5f2347da23eb8a3938de5ab18f783c%0D%0Amissing+blob+2978ec4d75abb8c6bab225d8adfbd2bef064338a%0D%0Amissing+blob+bddbd13afd698e5ba7d572c9270e52bcac862661%0D%0A%5B%2Fbash%5D%0D%0A%0D%0ATo+fix+this%2C+I+had+to+get+the+filenames+of+these+blobs+and+write+them+back+into+the+repository%3A%0D%0A%0D%0A%5Bbash%5D%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%2A%0D%0A%24+git+log+--raw+--all+--full-history+%7C+grep+bddbd13%0D%0A%3A000000+100644+0000000...+bddbd13...+A%09INFO+465%2FProject2%2FUseCase%2FDiagrams%2FLeader+-+Time+%26amp%3B+Mileage.vsd%0D%0A%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%2A%0D%0A%24+git+log+--raw+--all+--full-history+%7C+grep+2978ec4%0D%0A%3A000000+100644+0000000...+2978ec4...+A%09INFO+465%2FProject2%2FPrototype%2FWebPrototype%2FWebPrototype%2Fbin%2FWebPrototype.dll%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AWriting+these+files+back+into+the+repository%2C+the+push+was+successful.++To+write+these+back%2C+do+the+following%3A%0D%0A%0D%0A%5Bbash%5D%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%0D%0A%24+git+hash-object+-w+INFO%5C+465%2FProject2%2FUseCase%2FDiagrams%2FLeader%5C+-%5C+Time%5C+%5C%26amp%3B%5C+Mileage.vsd%0D%0Abddbd13afd698e5ba7d572c9270e52bcac862661%0D%0Ajim+at+schubert+in+%2Fmedia%2F16GB%2Fprojects%2Fschool+on+master%0D%0A%24+git+hash-object+-w+INFO%5C+465%2FProject2%2FPrototype%2FWebPrototype%2FWebPrototype%2Fbin%2FWebPrototype.dll%0D%0A2978ec4d75abb8c6bab225d8adfbd2bef064338a%0D%0A%5B%2Fbash%5D&amp;tags=Errors%2Cgithub%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/git-push-fatal-unable-to-read-sha1/</feedburner:origLink></item>
		<item>
		<title>My Review of Learning Perl, 5th Edition</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/RsPwTAO4O3A/</link>
		<comments>http://www.ipreferjim.com/2012/02/my-review-of-learning-perl-5th-edition/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 22:00:33 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=805</guid>
		<description><![CDATA[Originally submitted at O'Reilly Making Easy Things Easy and Hard Things Possible Learning Perl, 5th Edition Great intro to Perl By Jim Schubert from Richmond, VA on 2/18/2012 &#160; 5out of 5 Pros: Helpful examples, Easy to understand, Concise, Well-written, Accurate Best Uses: Novice, Student Describe Yourself: Software Engineer I picked up this book on [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://oreilly.com/product/9780596520113.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/06/14/5204063_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">Making Easy Things Easy and Hard Things Possible</p>
</div>
<p><a href="http://shop.oreilly.com/product/9780596520113.do" style="display: none;" class="url fn"><span class="fn">Learning Perl, 5th Edition</span></a></div>
<p><br clear="left">
<p><strong class="summary">Great intro to Perl</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="2012218T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">2/18/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -180px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">5</span>out of 5</div>
<p><strong>Pros: </strong>Helpful examples, Easy to understand, Concise, Well-written, Accurate</p>
<p><strong>Best Uses: </strong>Novice, Student</p>
<p><strong>Describe Yourself: </strong>Software Engineer</p>
<p style="margin-top:1em" class="description">I picked up this book on a whim to learn Perl. I was extremely impressed, especially by the three chapters on Regular Expressions.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />If you have used Perl, this book may be fairly basic.  There are whole chapters on Scalars, Arrays, Hashes, etc. I have a lot of experience in a lot of languages and technologies, and I can tell you this book is well-written and well-organized to ease you into the Perl mindset.</p>
<p>First of all, most languages are like mathematics.  1+1=2 is a rule. If that rule didn't work, math wouldn't work.  Similarly, 'int x = 1;' in C-style languages will always point the variable 'x' to the memory location storing the value of '1'. Rules are rules.  However, Perl is contextual.  When you do one thing in Perl, you may have a different result depending on the context of the code.  For example (extremely-generalized example), hashes can be considered an array of values in which every even index is the key and every odd index is the value.  So, an array of ["first", "1st", "second", "2nd" ] could easily become a hash with the keys and values related as expected.  Weird? Yes. Basic, not really. I think that can be a very difficult concept for a lot of people... too meta.</p>
<p>The book does a great job of easing a lot of the Perl concepts onto the reader.  Interestingly, the part of the book I found the most useful are the three Regular Expressions chapters.  I have recommended this book to students in the past solely for the three Regular Expressions chapters.  They are clearly and concisely written in a way that presents the Perl syntax very well.</p>
<p>If you're familiar with Perl already, this book probably isn't for you.  You would probably be better off with the Intermediate Perl book also available by O'Reilly.  Even after reading both books and working a bit with the Catalyst framework, I found myself coming back to the last chapter of this book to fully understand eval blocks.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=805&amp;md5=68f26f34fc24dd906270edd61b46f50e" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/aFFnivDksBzJ7H5iOv8kCigD7pA/0/da"><img src="http://feedads.g.doubleclick.net/~a/aFFnivDksBzJ7H5iOv8kCigD7pA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/aFFnivDksBzJ7H5iOv8kCigD7pA/1/da"><img src="http://feedads.g.doubleclick.net/~a/aFFnivDksBzJ7H5iOv8kCigD7pA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/RsPwTAO4O3A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/my-review-of-learning-perl-5th-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmy-review-of-learning-perl-5th-edition%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+Learning+Perl%2C+5th+Edition&amp;description=Originally+submitted+at+O%27ReillyMaking+Easy+Things+Easy+and+Hard+Things+PossibleLearning+Perl%2C+5th+EditionGreat+intro+to+PerlBy+Jim+Schubert+from+Richmond%2C+VA+on+2%2F18%2F2012%26nbsp%3B5out+of+5Pros%3A+Helpful+examples%2C+Easy+to+understand%2C+Concise%2C+Well-written%2C+AccurateBest+Uses%3A+Novice%2C+StudentDescribe+Yourself%3A+Software+EngineerI+picked+up+this+book+on+a+whim+to+learn+Perl.+I+was+extremely+impressed%2C+especially+by+the+three+chapters+on+Regular+Expressions.%0AIf+you+have+used+Perl%2C+this+book+may+be+fairly+basic.++There+are+whole+chapters+on+Scalars%2C+Arrays%2C+Hashes%2C+etc.+I+have+a+lot+of+experience+in+a+lot+of+languages+and+technologies%2C+and+I+can+tell+you+this+book+is+well-written+and+well-organized+to+ease+you+into+the+Perl+mindset.%0A%0AFirst+of+all%2C+most+languages+are+like+mathematics.++1%2B1%3D2+is+a+rule.+If+that+rule+didn%27t+work%2C+math+wouldn%27t+work.++Similarly%2C+%27int+x+%3D+1%3B%27+in+C-style+languages+will+always+point+the+variable+%27x%27+to+the+memory+location+storing+the+value+of+%271%27.+Rules+are+rules.++However%2C+Perl+is+contextual.++When+you+do+one+thing+in+Perl%2C+you+may+have+a+different+result+depending+on+the+context+of+the+code.++For+example+%28extremely-generalized+example%29%2C+hashes+can+be+considered+an+array+of+values+in+which+every+even+index+is+the+key+and+every+odd+index+is+the+value.++So%2C+an+array+of+%5B%22first%22%2C+%221st%22%2C+%22second%22%2C+%222nd%22+%5D+could+easily+become+a+hash+with+the+keys+and+values+related+as+expected.++Weird%3F+Yes.+Basic%2C+not+really.+I+think+that+can+be+a+very+difficult+concept+for+a+lot+of+people...+too+meta.%0A%0AThe+book+does+a+great+job+of+easing+a+lot+of+the+Perl+concepts+onto+the+reader.++Interestingly%2C+the+part+of+the+book+I+found+the+most+useful+are+the+three+Regular+Expressions+chapters.++I+have+recommended+this+book+to+students+in+the+past+solely+for+the+three+Regular+Expressions+chapters.++They+are+clearly+and+concisely+written+in+a+way+that+presents+the+Perl+syntax+very+well.%0A%0AIf+you%27re+familiar+with+Perl+already%2C+this+book+probably+isn%27t+for+you.++You+would+probably+be+better+off+with+the+Intermediate+Perl+book+also+available+by+O%27Reilly.++Even+after+reading+both+books+and+working+a+bit+with+the+Catalyst+framework%2C+I+found+myself+coming+back+to+the+last+chapter+of+this+book+to+fully+understand+eval+blocks.%28legalese%29&amp;tags=Review%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/my-review-of-learning-perl-5th-edition/</feedburner:origLink></item>
		<item>
		<title>My Review of CLR via C#, 3rd Edition</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/6-8YI3kNpH0/</link>
		<comments>http://www.ipreferjim.com/2012/02/my-review-of-clr-via-c-3rd-edition/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 21:44:45 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=801</guid>
		<description><![CDATA[Originally submitted at O'Reilly CLR via C#, 3rd Edition CLR via C#, 3rd Edition One of the best C# books available. By Jim Schubert from Richmond, VA on 2/18/2012 &#160; 5out of 5 Pros: Helpful examples, Accurate, Concise, Easy to understand, Well-written Best Uses: Expert, Intermediate, Student Describe Yourself: Software Engineer It has been a [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://oreilly.com/catalog/9780735627048">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/00/88/7284232_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">CLR via C#, 3rd Edition</p>
</div>
<p><a href="http://oreilly.com/catalog/9780735627048" style="display: none;" class="url fn"><span class="fn">CLR via C#, 3rd Edition</span></a></div>
<p><br clear="left">
<p><strong class="summary">One of the best C# books available.</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="2012218T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">2/18/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -180px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">5</span>out of 5</div>
<p><strong>Pros: </strong>Helpful examples, Accurate, Concise, Easy to understand, Well-written</p>
<p><strong>Best Uses: </strong>Expert, Intermediate, Student</p>
<p><strong>Describe Yourself: </strong>Software Engineer</p>
<p style="margin-top:1em" class="description">It has been a while since I read this book.  I never reviewed it because I didn't realize Microsoft Press was sold on the O'Reilly site.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />I can not tell you how many times I have been asked an interview question which I answered quickly and concisely thanks to this book.  It covers a lot of material.  When I say "a lot", I don't mean the average amount of material in a book this length, I mean the average amount of material in a book that is three times the size of this book.  Seriously, it goes over some topics that other books don't touch on: like why strings are interned the way they are, string comparison optimizations, globalization gotchas, assembly structure, and a lot more.</p>
<p>I recommended this book to a friend a few days ago.  I would gladly recommend it to anyone who is a professional .NET developer or a student using .NET technologies. It thoroughly discusses the how, why, and when the CLR performs the way it does.</p>
<p>A note for beginners: I think this book is geared more toward intermediate-to-advanced developers.  If you find some of the content too difficult, skim it and come back to it later. You won't be let down.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=801&amp;md5=448dfe72e4052058503f653abd163a39" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/DaWkOdRw1piyef1RfaslwQU1Bvo/0/da"><img src="http://feedads.g.doubleclick.net/~a/DaWkOdRw1piyef1RfaslwQU1Bvo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/DaWkOdRw1piyef1RfaslwQU1Bvo/1/da"><img src="http://feedads.g.doubleclick.net/~a/DaWkOdRw1piyef1RfaslwQU1Bvo/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/6-8YI3kNpH0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/my-review-of-clr-via-c-3rd-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmy-review-of-clr-via-c-3rd-edition%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+CLR+via+C%23%2C+3rd+Edition&amp;description=Originally+submitted+at+O%27ReillyCLR+via+C%23%2C+3rd+EditionCLR+via+C%23%2C+3rd+EditionOne+of+the+best+C%23+books+available.By+Jim+Schubert+from+Richmond%2C+VA+on+2%2F18%2F2012%26nbsp%3B5out+of+5Pros%3A+Helpful+examples%2C+Accurate%2C+Concise%2C+Easy+to+understand%2C+Well-writtenBest+Uses%3A+Expert%2C+Intermediate%2C+StudentDescribe+Yourself%3A+Software+EngineerIt+has+been+a+while+since+I+read+this+book.++I+never+reviewed+it+because+I+didn%27t+realize+Microsoft+Press+was+sold+on+the+O%27Reilly+site.%0AI+can+not+tell+you+how+many+times+I+have+been+asked+an+interview+question+which+I+answered+quickly+and+concisely+thanks+to+this+book.++It+covers+a+lot+of+material.++When+I+say+%22a+lot%22%2C+I+don%27t+mean+the+average+amount+of+material+in+a+book+this+length%2C+I+mean+the+average+amount+of+material+in+a+book+that+is+three+times+the+size+of+this+book.++Seriously%2C+it+goes+over+some+topics+that+other+books+don%27t+touch+on%3A+like+why+strings+are+interned+the+way+they+are%2C+string+comparison+optimizations%2C+globalization+gotchas%2C+assembly+structure%2C+and+a+lot+more.%0A%0AI+recommended+this+book+to+a+friend+a+few+days+ago.++I+would+gladly+recommend+it+to+anyone+who+is+a+professional+.NET+developer+or+a+student+using+.NET+technologies.+It+thoroughly+discusses+the+how%2C+why%2C+and+when+the+CLR+performs+the+way+it+does.%0A%0AA+note+for+beginners%3A+I+think+this+book+is+geared+more+toward+intermediate-to-advanced+developers.++If+you+find+some+of+the+content+too+difficult%2C+skim+it+and+come+back+to+it+later.+You+won%27t+be+let+down.%28legalese%29&amp;tags=Review%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/my-review-of-clr-via-c-3rd-edition/</feedburner:origLink></item>
		<item>
		<title>My Review of Node for Front-End Developers</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/EXvI_cu--Wk/</link>
		<comments>http://www.ipreferjim.com/2012/02/my-review-of-node-for-front-end-developers/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 18:00:54 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=788</guid>
		<description><![CDATA[Originally submitted at O'Reilly Writing Server-Side JavaScript Applications Node for Front-End Developers Or... Prototyping with Node.js By Jim Schubert from Richmond, VA on 2/11/2012 &#160; 4out of 5 Pros: Well-written, Easy to understand, Concise, Accurate, Helpful examples Cons: Too short Best Uses: Student, Novice Describe Yourself: Software Engineer I've reviewed "Node for Front-End Developers" for [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://shop.oreilly.com/product/0636920023258.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/05/49/14267351_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">Writing Server-Side JavaScript Applications</p>
</div>
<p><a href="http://shop.oreilly.com/product/0636920023258.do" style="display: none;" class="url fn"><span class="fn">Node for Front-End Developers</span></a></div>
<p><br clear="left">
<p><strong class="summary">Or... Prototyping with Node.js</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="2012211T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">2/11/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -144px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">4</span>out of 5</div>
<p><strong>Pros: </strong>Well-written, Easy to understand, Concise, Accurate, Helpful examples</p>
<p><strong>Cons: </strong>Too short</p>
<p><strong>Best Uses: </strong>Student, Novice</p>
<p><strong>Describe Yourself: </strong>Software Engineer</p>
<p style="margin-top:1em" class="description">I've reviewed "Node for Front-End Developers" for the O'Reilly blogger program.  Because I've been contributing to an open-source Node.js ebook, I was very excited to read this book. I must warn you-- this book is less about Node.js than it is about prototyping web applications using modules available in Node.js.  If you begin reading this from that perspective and you have little knowledge of Node.js in general, you will gain a lot from reading this.  If, however, you have experience with Node.js and have used frameworks such as Express and Connect, there is not much more covered in these 58 pages.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />Garann Means has written this book in a great way.  She doesn't start off explaining the Express framework like most introductions to Node.js would have done. Instead, she shows how to create a minimal http server, add templating and middleware, and then discusses Express and separating concerns into an MVC or MVC-like pattern.  </p>
<p>There are a few times where I think the terminology could be misleading.  For example, at the beginning she talks about 'scaffolding'. Scaffolding in general implies code generation and the only bit of true scaffolding discussed in the book occurs on one line in one of the last few chapters when the Express framework generates an empty application.  I would have liked to see some true 'scaffolding' examples, either with code specific to the book or with third-party modules.  Aside from one or two other terminology issues (which is probably just me being picky), the content is spot-on.  </p>
<p>Garann does talk about asynchronous operations a little, but this is a huge area of concern for front-end and back-end developers when migrating to Node.js because the asynchronous and event-driven nature of common tasks (files, database) can often increase the complexity of a simple task.  Had she expanded on the asynchronous nature of Node.js more, I would have given this book five stars. She does offer a caveat in the Postscript that this book doesn't cover all there is to know about Node.js, and she's right. Before or after reading this, you should read the introduction in the Node.js documentation and the Express framework's documentation.  </p>
<p>In conclusion, this is an excellent introduction to prototyping web applications using Node.js. I would recommend this book to people who are familiar with JavaScript programming and want to being prototyping without the need to learn additional languages and frameworks like Ruby on Rails, Catalyst, ASP.NET MVC, etc.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=788&amp;md5=f85e651b695e773466f4319b4e668c85" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/9Kkrr4GDeVVT16SPzB0RKFkBJM4/0/da"><img src="http://feedads.g.doubleclick.net/~a/9Kkrr4GDeVVT16SPzB0RKFkBJM4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9Kkrr4GDeVVT16SPzB0RKFkBJM4/1/da"><img src="http://feedads.g.doubleclick.net/~a/9Kkrr4GDeVVT16SPzB0RKFkBJM4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/EXvI_cu--Wk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/my-review-of-node-for-front-end-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmy-review-of-node-for-front-end-developers%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+Node+for+Front-End+Developers&amp;description=Originally+submitted+at+O%27ReillyWriting+Server-Side+JavaScript+ApplicationsNode+for+Front-End+DevelopersOr...+Prototyping+with+Node.jsBy+Jim+Schubert+from+Richmond%2C+VA+on+2%2F11%2F2012%26nbsp%3B4out+of+5Pros%3A+Well-written%2C+Easy+to+understand%2C+Concise%2C+Accurate%2C+Helpful+examplesCons%3A+Too+shortBest+Uses%3A+Student%2C+NoviceDescribe+Yourself%3A+Software+EngineerI%27ve+reviewed+%22Node+for+Front-End+Developers%22+for+the+O%27Reilly+blogger+program.++Because+I%27ve+been+contributing+to+an+open-source+Node.js+ebook%2C+I+was+very+excited+to+read+this+book.+I+must+warn+you--+this+book+is+less+about+Node.js+than+it+is+about+prototyping+web+applications+using+modules+available+in+Node.js.++If+you+begin+reading+this+from+that+perspective+and+you+have+little+knowledge+of+Node.js+in+general%2C+you+will+gain+a+lot+from+reading+this.++If%2C+however%2C+you+have+experience+with+Node.js+and+have+used+frameworks+such+as+Express+and+Connect%2C+there+is+not+much+more+covered+in+these+58+pages.%0AGarann+Means+has+written+this+book+in+a+great+way.++She+doesn%27t+start+off+explaining+the+Express+framework+like+most+introductions+to+Node.js+would+have+done.+Instead%2C+she+shows+how+to+create+a+minimal+http+server%2C+add+templating+and+middleware%2C+and+then+discusses+Express+and+separating+concerns+into+an+MVC+or+MVC-like+pattern.++%0A%0AThere+are+a+few+times+where+I+think+the+terminology+could+be+misleading.++For+example%2C+at+the+beginning+she+talks+about+%27scaffolding%27.+Scaffolding+in+general+implies+code+generation+and+the+only+bit+of+true+scaffolding+discussed+in+the+book+occurs+on+one+line+in+one+of+the+last+few+chapters+when+the+Express+framework+generates+an+empty+application.++I+would+have+liked+to+see+some+true+%27scaffolding%27+examples%2C+either+with+code+specific+to+the+book+or+with+third-party+modules.++Aside+from+one+or+two+other+terminology+issues+%28which+is+probably+just+me+being+picky%29%2C+the+content+is+spot-on.++%0A%0AGarann+does+talk+about+asynchronous+operations+a+little%2C+but+this+is+a+huge+area+of+concern+for+front-end+and+back-end+developers+when+migrating+to+Node.js+because+the+asynchronous+and+event-driven+nature+of+common+tasks+%28files%2C+database%29+can+often+increase+the+complexity+of+a+simple+task.++Had+she+expanded+on+the+asynchronous+nature+of+Node.js+more%2C+I+would+have+given+this+book+five+stars.+She+does+offer+a+caveat+in+the+Postscript+that+this+book+doesn%27t+cover+all+there+is+to+know+about+Node.js%2C+and+she%27s+right.+Before+or+after+reading+this%2C+you+should+read+the+introduction+in+the+Node.js+documentation+and+the+Express+framework%27s+documentation.++%0A%0AIn+conclusion%2C+this+is+an+excellent+introduction+to+prototyping+web+applications+using+Node.js.+I+would+recommend+this+book+to+people+who+are+familiar+with+JavaScript+programming+and+want+to+being+prototyping+without+the+need+to+learn+additional+languages+and+frameworks+like+Ruby+on+Rails%2C+Catalyst%2C+ASP.NET+MVC%2C+etc.%28legalese%29&amp;tags=Review%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/my-review-of-node-for-front-end-developers/</feedburner:origLink></item>
		<item>
		<title>My Review of McCullough and Berglund on Mastering Advanced Git</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/X_vBcscATrk/</link>
		<comments>http://www.ipreferjim.com/2012/02/my-review-of-mccullough-and-berglund-on-mastering-advanced-git/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 03:34:32 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=786</guid>
		<description><![CDATA[Originally submitted at O'Reilly McCullough and Berglund on Mastering Advanced Git McCullough and Berglund on Mastering Advanced Git Great demonstration of advanced Git By Jim Schubert from Richmond, VA on 2/6/2012 &#160; 5out of 5 Pros: Accurate, Easy to understand, Concise, Helpful examples Best Uses: Novice, Student, Expert, Intermediate Describe Yourself: Sys Admin, Maker, Developer, [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://oreilly.com/product/0636920024774.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/01/34/15258733_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">McCullough and Berglund on Mastering Advanced Git</p>
</div>
<p><a href="http://shop.oreilly.com/product/0636920024774.do" style="display: none;" class="url fn"><span class="fn">McCullough and Berglund on Mastering Advanced Git</span></a></div>
<p><br clear="left">
<p><strong class="summary">Great demonstration of advanced Git</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="201226T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">2/6/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -180px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">5</span>out of 5</div>
<p><strong>Pros: </strong>Accurate, Easy to understand, Concise, Helpful examples</p>
<p><strong>Best Uses: </strong>Novice, Student, Expert, Intermediate</p>
<p><strong>Describe Yourself: </strong>Sys Admin, Maker, Developer, Educator, Designer</p>
<p style="margin-top:1em" class="description">At just under 4 hours long, this video course packs in a lot of content. Each video is about 30 minutes long, so I didn't have to watch it all in one sitting.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />The structure of the demonstration is extremely useful because Tim and Matthew ask and answer questions conversationally while showing a split-view Git workspace. I think the hardest thing for some people to grasp in general about git is what 'distributed' means.  Although the presenters are working from the same machine, the setup is done in a way to demonstrate this distributed nature.</p>
<p>I've been using git for a while, but I have learned a lot from these videos. I've only somewhat dug into the files inside the .git directory on my own because I was afraid to 'ruin' my repository. This course does a great job of alleviating  a lot of those concerns by explaining the organizational structure of the .git contents.</p>
<p>If you're like me, you'll probably add quite a few of the concepts you learn from these videos to your repositories immediately after each video.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=786&amp;md5=a17ff03f614495092c2d9ff9d98d5830" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/_ncJhOXDonnVHlpMJPsAi3pz8Zc/0/da"><img src="http://feedads.g.doubleclick.net/~a/_ncJhOXDonnVHlpMJPsAi3pz8Zc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_ncJhOXDonnVHlpMJPsAi3pz8Zc/1/da"><img src="http://feedads.g.doubleclick.net/~a/_ncJhOXDonnVHlpMJPsAi3pz8Zc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/X_vBcscATrk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/my-review-of-mccullough-and-berglund-on-mastering-advanced-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmy-review-of-mccullough-and-berglund-on-mastering-advanced-git%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+McCullough+and+Berglund+on+Mastering+Advanced+Git&amp;description=Originally+submitted+at+O%27ReillyMcCullough+and+Berglund+on+Mastering+Advanced+GitMcCullough+and+Berglund+on+Mastering+Advanced+GitGreat+demonstration+of+advanced+GitBy+Jim+Schubert+from+Richmond%2C+VA+on+2%2F6%2F2012%26nbsp%3B5out+of+5Pros%3A+Accurate%2C+Easy+to+understand%2C+Concise%2C+Helpful+examplesBest+Uses%3A+Novice%2C+Student%2C+Expert%2C+IntermediateDescribe+Yourself%3A+Sys+Admin%2C+Maker%2C+Developer%2C+Educator%2C+DesignerAt+just+under+4+hours+long%2C+this+video+course+packs+in+a+lot+of+content.+Each+video+is+about+30+minutes+long%2C+so+I+didn%27t+have+to+watch+it+all+in+one+sitting.%0AThe+structure+of+the+demonstration+is+extremely+useful+because+Tim+and+Matthew+ask+and+answer+questions+conversationally+while+showing+a+split-view+Git+workspace.+I+think+the+hardest+thing+for+some+people+to+grasp+in+general+about+git+is+what+%27distributed%27+means.++Although+the+presenters+are+working+from+the+same+machine%2C+the+setup+is+done+in+a+way+to+demonstrate+this+distributed+nature.%0A%0AI%27ve+been+using+git+for+a+while%2C+but+I+have+learned+a+lot+from+these+videos.+I%27ve+only+somewhat+dug+into+the+files+inside+the+.git+directory+on+my+own+because+I+was+afraid+to+%27ruin%27+my+repository.+This+course+does+a+great+job+of+alleviating++a+lot+of+those+concerns+by+explaining+the+organizational+structure+of+the+.git+contents.%0A%0AIf+you%27re+like+me%2C+you%27ll+probably+add+quite+a+few+of+the+concepts+you+learn+from+these+videos+to+your+repositories+immediately+after+each+video.%28legalese%29&amp;tags=blog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/my-review-of-mccullough-and-berglund-on-mastering-advanced-git/</feedburner:origLink></item>
		<item>
		<title>Mastering Node: Addons and FunctionTemplate (uuid.node)</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/iXantxfyRJs/</link>
		<comments>http://www.ipreferjim.com/2012/02/mastering-node-addons-and-functiontemplate-uuid-node/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 02:41:18 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[eBooks]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=769</guid>
		<description><![CDATA[Last night, I pushed an addition to my fork of Mastering Node. I decided to add a bit to the Addons chapter. The first example in this chapter only shows how to add a function to a natively-compiled module (i.e. an addon). This example shows you how to start a module which can be used [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, I pushed an addition to my fork of Mastering Node. I decided to add a bit to the <em>Addons</em> chapter.  The first example in this chapter only shows how to add a function to a natively-compiled module (i.e. an addon).  This example shows you how to start a module which can be used in the following way:</p>
<pre class="brush: jscript; title: ; notranslate">
var Uuid = require('./uuid.node').Uuid;
var uuid = new Uuid();
var myId = uuid.generate();
</pre>
<p>The project files referenced in the following text can be downloaded from the repo: <a href="https://github.com/jimschubert/masteringnode" title="jimschubert/masteringnode" target="_blank">jimschubert/masteringnode</a></p>
<hr />
<h2 id="functionTemplate">FunctionTemplate</h2>
<p>In v8, a FunctionTemplate is used to create the equivalent to:</p>
<pre class="brush: jscript; title: ; notranslate">var template = function() { }</pre>
<p>The function at this point is an object and not an <em>instance</em> of the function. </p>
<p>As an example, we will use the linux package <em>uuid</em> to generate a uuid. We will define the header for this addon as:</p>
<p><span id="more-769"></span></p>
<pre class="brush: cpp; title: ; notranslate">
// addons/uuid/v0.1/uuid.h
#ifndef __node_uuid_h__
#define __node_uuid_h__

#include &lt;string&gt;
#include &lt;v8.h&gt;
#include &lt;node.h&gt;
#include &quot;uuid/uuid.h&quot;

using namespace v8;
using namespace node;

class Uuid : public node::ObjectWrap {
    public:
        Uuid() { }
        static Persistent&lt;FunctionTemplate&gt; constructor;
        static void Init(Handle&lt;Object&gt; target);
        static Handle&lt;Value&gt; New(const Arguments &amp;args);
        static Handle&lt;Value&gt; Generate(const Arguments &amp;args);
        static Handle&lt;Value&gt; GenerateRandom(const Arguments &amp;args);
        static Handle&lt;Value&gt; GenerateTime(const Arguments &amp;args);
    private:
        ~Uuid();
        static std::string GetString(uuid_t id);
};

#endif // __node_uuid_h__
</pre>
<p>This addon will showcase three methods, <code>Generate</code>, <code>GenerateRandom</code>, and <code>GenerateTime</code>. It will also include a trivial private <code>GetString</code> method to demonstrate how to <em>Unwrap</em> a <code>node::ObjectWrap</code> object and interact with C++ code that is not specific to node or v8.</p>
<p>A lot of the public function definitions should look similar to the <em>Echo</em> example. One notable difference is that instead of using a macro and hiding the <code>FunctionTemplate</code> method, we are defining <code>static Persistent<FunctionTemplate> constructor;</code>.  The <code>Persistent<T></code> type is used "when you need to keep a reference to an object for more than one function call, or when handle lifetimes do not correspond to C++ scopes." <a href="http://code.google.com/apis/v8/embed.html">source</a>.  Since we'd expect our object's constructor to last longer than a single function, we declare it separately and as a persistent handle.  Another point to notice is that all of the method we're pulling from <em>uuid.h</em> have the signature <code>static Handle<Value> Method(const Arguments &amp;args)</code> even though we will plan to call it as <code>uuid.generate()</code>.  This is because we will be accessing the <em>scope</em> of the call via <code>args.This()</code>.</p>
<p>Although more methods are implemented in <em>uuid.cc</em>, we will look at three:  </p>
<pre class="brush: cpp; light: true; title: ; notranslate">
Uuid::Init(Handle&lt;Object&gt; target)
Handle&lt;Value&gt; Uuid::New(const Arguments &amp;args)
Handle&lt;Value&gt; Uuid::Generate(const Arguments &amp;args)
</pre>
<p>Just as before, node expects to find a signature of <code>extern "C" void init(Handle&lt;Object> target)</code> in order to initialize the addon.  Inside this method, we may set parameters such as the version number from the previous example.  We may also pass-through initialization to any modules within our node addon.  In this example, our addon will be <em>uuid.node</em> and contain a single module, <em>Uuid</em>. There is no reason we can't later add <em>Uuid2</em> which, instead of returning a normalized string value might return a <code>Buffer</code> object.  To initialize the Uuid module, we pass the <code>target</code> object along to <code>Uuid::Init</code> and add the module definition to <code>target</code>:</p>
<pre class="brush: cpp; title: ; notranslate">
// addons/uuid/v0.1/uuid.cc
void Uuid::Init(Handle&lt;Object&gt; target) {
    HandleScope scope;

    // Setup the constructor
    constructor = Persistent&lt;FunctionTemplate&gt;::New(FunctionTemplate::New(Uuid::New));
    constructor-&gt;InstanceTemplate()-&gt;SetInternalFieldCount(1); // for constructors
    constructor-&gt;SetClassName(String::NewSymbol(&quot;Uuid&quot;));

    // Setup the prototype
    NODE_SET_PROTOTYPE_METHOD(constructor, &quot;generate&quot;, Generate);
    NODE_SET_PROTOTYPE_METHOD(constructor, &quot;generateRandom&quot;, GenerateRandom);
    NODE_SET_PROTOTYPE_METHOD(constructor, &quot;generateTime&quot;, GenerateTime);

    target-&gt;Set(String::NewSymbol(&quot;Uuid&quot;), constructor-&gt;GetFunction());
}
</pre>
<p>In this scope, we are instantiating the <code>constructor</code> using <code>Uuid::New</code> as a new <code>FunctionTemplate</code>. We then call <code>InstanceTemplate()</code> and on that object we call <code>SetInternalFieldCount(1)</code>. This tells v8 that this object holds a reference to one object.</p>
<p>Next, we setup the prototype using another macro provided by node. These calls say, for instance, "Add a method called <em>generate</em> to the constructor function which executes the native method <em>Generate</em>".</p>
<p>Lastly, we have to create a "Uuid" module on the object returned by the call to <code>require()</code>. Here, <code>Uuid</code> will point to a function (<code>constructor</code>) which returns a function that internally executes <code>Uuid::New</code>.  In other words, we have created something akin to: </p>
<pre class="brush: jscript; title: ; notranslate">
var Uuid = function() { };
Uuid.constructor = function() {
    return function() {
        // Uuid::New executes here.
    }
}
</pre>
<p>Although the above is not exactly what we have done, it may provide a better view for some to understand <code>FunctionTemplate</code> references and why we assign one to the constructor object in such a way.</p>
<p>The <code>Uuid::New</code> method is defined as:</p>
<pre class="brush: cpp; title: ; notranslate">
// addons/uuid/v0.1/uuid.cc
Handle&lt;Value&gt; Uuid::New(const Arguments &amp;amp;args) {
    HandleScope scope;
    // no args are checked
    Uuid *uuid = new Uuid();
    uuid-&gt;Wrap(args.This());
    return args.This();
}
</pre>
<p>As you would expect, calling the constructor function multiple times will create newly-scoped <code>Uuid</code> objects on the heap. In this method, we <a href="https://github.com/joyent/node/blob/v0.4.8/src/node_object_wrap.h#L59">wrap</a> the parameter (scoped object) by setting a reference to <code>Uuid</code> in the args as a contextual scope (i.e. <code>this</code>) and then returns <code>this</code>.</p>
<p>Within the <code>Generate</code> method, we will want to unwrap the contextual <code>Uuid</code> object and call the private method <code>GetString</code>.</p>
<pre class="brush: cpp; title: ; notranslate">
// addons/uuid/v0.1/uuid.cc
Handle&lt;Value&gt; Uuid::Generate(const Arguments &amp;amp;args) {
    HandleScope scope;
    uuid_t id;
    uuid_generate(id);

    Uuid *uuid = ObjectWrap::Unwrap&lt;Uuid&gt;(args.This());
    return scope.Close(String::New(uuid-&gt;GetString(id).c_str()));
}
</pre>
<p>As with any JavaScript function call, we have to ensure <a href="https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope">functional scope</a>. Scoped methods should create a <a href="http://code.google.com/apis/v8/embed.html">HandleScope</a> object at the start and call <code>scope.Close()</code> at the end. <code>HandleScope</code> will get rid of temporary handles when the scope is closed.</p>
<p>Within each of the <em>Generate*</em> methods, we will create a <code>uuid_t</code> type and call the corresponding method defined in <em>/usr/includes/uuid/uuid.h</em> (location may vary per system). To demonstrate accessing the pointer to our original <code>Uuid</code> object, we unwrap the contextual scope of this function using <code>ObjectWrap::Unwrap<Uuid>(args.This())</code>. From this pointer, we can access any private methods such as <code>GetString</code>. Be careful with your returned values, though. <code>String::New</code> in the v8 library does not take <code>std::string</code> in any of its signatures. Simply enough, <code>std::string</code> provides a <code>c_str()</code> method to return a <code>const char*</code> which <code>String::New</code> does accept.</p>
<h3 id="uuid.node_demo">uuid.node demo</h3>
<p>Navigate to <em>addons/uuid/v0.1/</em> and execute:</p>
<pre class="brush: bash; title: ; notranslate">
$ node-waf configure build
</pre>
<p>If there are build errors and the <em>func.cc</em> example from before built successfully, check that you have the <em>uuid-dev</em> package installed and rerun the above command. Then, navigate to <em>build/default</em> and try out the Uuid addon:</p>
<pre class="brush: bash; title: ; notranslate">
$ node
&gt; var Uuid = require('./uuid.node').Uuid;
&gt; var uuid = new Uuid();
&gt; uuid.generate();
'83475e0c-212b-402c-bdc7-b81ebb7b34f8'
&gt; uuid.generateRandom();
'4d597bda-8f5f-4c3c-b2fa-1cd6cd4a6903'
&gt; uuid.generateTime();
'25a0dd30-5076-11e1-96be-0022fb93b24c'
&gt; var util = require('util');
&gt; util.inspect(uuid);
'{}'
&gt; util.inspect(Uuid);
'[Function: Uuid]'
&gt;
</pre>
<p>The above output may surprise you. Firstly, where is the <code>version</code> option?! It's at the required module level: <code>require('./uuid.node').version;</code>. Secondly, if we can access <code>uuid.generate()</code> and others, why don't they display when inspecting the object? That's because we defined those methods on the prototype:</p>
<pre class="brush: jscript; title: ; notranslate">
&gt; uuid.__proto__
{ generate: [Function: generate],
  generateRandom: [Function: generateRandom],
  generateTime: [Function: generateTime] }
&gt;
</pre>
<p>Thirdly, you may have noticed that I didn't say anything about <code>constructor-&gt;SetClassName(String::NewSymbol("Uuid"));</code> in <code>Uuid::Init</code>. You may have also wondered where <code>SetClassName</code> actually sets a class name, considering JavaScript is a prototypal language. That string value is what is displayed when you call inspect and get the value <code>'[Function: Uuid]'</code>. Just as you would expect, <code>Uuid</code> is the constructor and it is named <code>Uuid</code>. </p>
<p>Now, if you've played around with this a bit, you may have noticed that <code>uuid.__proto__</code> gives us our three functions but <code>uuid.prototype</code> is empty. Why is that? That's because <code>uuid.__proto__</code> really is <code>uuid.constructor.prototype</code>, which is also really <code>Uuid.prototype</code>. This is the essence of prototypal inheritance. If this concept is foreign or difficult to grasp, be sure to check out the excellent explanation on <a href="http://bonsaiden.github.com/JavaScript-Garden/#object.prototype">JavaScript Garden</a>.</p>
<p>Logically, the next step would be to understand how to declare a prototype of our own.</p>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=769&amp;md5=c592d30e215e4fe6069edb8703a08bcf" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/pI_HuNw-wP_YEvPYIDouzCNksKg/0/da"><img src="http://feedads.g.doubleclick.net/~a/pI_HuNw-wP_YEvPYIDouzCNksKg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pI_HuNw-wP_YEvPYIDouzCNksKg/1/da"><img src="http://feedads.g.doubleclick.net/~a/pI_HuNw-wP_YEvPYIDouzCNksKg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/iXantxfyRJs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/mastering-node-addons-and-functiontemplate-uuid-node/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fmastering-node-addons-and-functiontemplate-uuid-node%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=Mastering+Node%3A+Addons+and+FunctionTemplate+%28uuid.node%29&amp;description=Last+night%2C+I+pushed+an+addition+to+my+fork+of+Mastering+Node.+I+decided+to+add+a+bit+to+the+Addons+chapter.++The+first+example+in+this+chapter+only+shows+how+to+add+a+function+to+a+natively-compiled+module+%28i.e.+an+addon%29.++This+example+shows+you+how+to+start+a+module+which+can+be+used+in+the+following+way%3A%0D%0A%0D%0A%5Bjs%5D%0D%0Avar+Uuid+%3D+require%28%27.%2Fuuid.node%27%29.Uuid%3B%0D%0Avar+uuid+%3D+new+Uuid%28%29%3B%0D%0Avar+myId+%3D+uuid.generate%28%29%3B%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AThe+project+files+referenced+in+the+following+text+can+be+downloaded+from+the+repo%3A+jimschubert%2Fmasteringnode%0D%0A%0D%0A%0D%0A%0D%0AFunctionTemplate%0D%0A%0D%0AIn+v8%2C+a+FunctionTemplate+is+used+to+create+the+equivalent+to%3A%0D%0A%0D%0A%5Bjs%5Dvar+template+%3D+function%28%29+%7B+%7D%5B%2Fjs%5D%0D%0A%0D%0AThe+function+at+this+point+is+an+object+and+not+an+instance+of+the+function.+%0D%0A%0D%0AAs+an+example%2C+we+will+use+the+linux+package+uuid+to+generate+a+uuid.+We+will+define+the+header+for+this+addon+as%3A%0D%0A%0D%0A%0D%0A%5Bcpp%5D%0D%0A%2F%2F+addons%2Fuuid%2Fv0.1%2Fuuid.h%0D%0A%23ifndef+__node_uuid_h__%0D%0A%23define+__node_uuid_h__%0D%0A%0D%0A%23include+%26lt%3Bstring%26gt%3B%0D%0A%23include+%26lt%3Bv8.h%26gt%3B%0D%0A%23include+%26lt%3Bnode.h%26gt%3B%0D%0A%23include+%26quot%3Buuid%2Fuuid.h%26quot%3B%0D%0A%0D%0Ausing+namespace+v8%3B%0D%0Ausing+namespace+node%3B%0D%0A%0D%0Aclass+Uuid+%3A+public+node%3A%3AObjectWrap+%7B%0D%0A++++public%3A%0D%0A++++++++Uuid%28%29+%7B+%7D%0D%0A++++++++static+Persistent%26lt%3BFunctionTemplate%26gt%3B+constructor%3B%0D%0A++++++++static+void+Init%28Handle%26lt%3BObject%26gt%3B+target%29%3B%0D%0A++++++++static+Handle%26lt%3BValue%26gt%3B+New%28const+Arguments+%26amp%3Bargs%29%3B%0D%0A++++++++static+Handle%26lt%3BValue%26gt%3B+Generate%28const+Arguments+%26amp%3Bargs%29%3B%0D%0A++++++++static+Handle%26lt%3BValue%26gt%3B+GenerateRandom%28const+Arguments+%26amp%3Bargs%29%3B%0D%0A++++++++static+Handle%26lt%3BValue%26gt%3B+GenerateTime%28const+Arguments+%26amp%3Bargs%29%3B%0D%0A++++private%3A+++%0D%0A++++++++%7EUuid%28%29%3B%0D%0A++++++++static+std%3A%3Astring+GetString%28uuid_t+id%29%3B%0D%0A%7D%3B%0D%0A%0D%0A%23endif+%2F%2F+__node_uuid_h__%0D%0A%5B%2Fcpp%5D%0D%0A%0D%0AThis+addon+will+showcase+three+methods%2C+Generate%2C+GenerateRandom%2C+and+GenerateTime.+It+will+also+include+a+trivial+private+GetString+method+to+demonstrate+how+to+Unwrap+a+node%3A%3AObjectWrap+object+and+interact+with+C%2B%2B+code+that+is+not+specific+to+node+or+v8.%0D%0A%0D%0AA+lot+of+the+public+function+definitions+should+look+similar+to+the+Echo+example.+One+notable+difference+is+that+instead+of+using+a+macro+and+hiding+the+FunctionTemplate+method%2C+we+are+defining+static+Persistent+constructor%3B.++The+Persistent+type+is+used+%22when+you+need+to+keep+a+reference+to+an+object+for+more+than+one+function+call%2C+or+when+handle+lifetimes+do+not+correspond+to+C%2B%2B+scopes.%22+source.++Since+we%27d+expect+our+object%27s+constructor+to+last+longer+than+a+single+function%2C+we+declare+it+separately+and+as+a+persistent+handle.++Another+point+to+notice+is+that+all+of+the+method+we%27re+pulling+from+uuid.h+have+the+signature+static+Handle+Method%28const+Arguments+%26amp%3Bargs%29+even+though+we+will+plan+to+call+it+as+uuid.generate%28%29.++This+is+because+we+will+be+accessing+the+scope+of+the+call+via+args.This%28%29.%0D%0A%0D%0AAlthough+more+methods+are+implemented+in+uuid.cc%2C+we+will+look+at+three%3A++%0D%0A%0D%0A%5Bcpp+light%3D%22true%22%5D%0D%0AUuid%3A%3AInit%28Handle%26lt%3BObject%26gt%3B+target%29%0D%0AHandle%26lt%3BValue%26gt%3B+Uuid%3A%3ANew%28const+Arguments+%26amp%3Bargs%29%0D%0AHandle%26lt%3BValue%26gt%3B+Uuid%3A%3AGenerate%28const+Arguments+%26amp%3Bargs%29%0D%0A%5B%2Fcpp%5D%0D%0A%0D%0AJust+as+before%2C+node+expects+to+find+a+signature+of+extern+%22C%22+void+init%28Handle%26lt%3BObject%3E+target%29+in+order+to+initialize+the+addon.++Inside+this+method%2C+we+may+set+parameters+such+as+the+version+number+from+the+previous+example.++We+may+also+pass-through+initialization+to+any+modules+within+our+node+addon.++In+this+example%2C+our+addon+will+be+uuid.node+and+contain+a+single+module%2C+Uuid.+There+is+no+reason+we+can%27t+later+add+Uuid2+which%2C+instead+of+returning+a+normalized+string+value+might+return+a+Buffer+object.++To+initialize+the+Uuid+module%2C+we+pass+the+target+object+along+to+Uuid%3A%3AInit+and+add+the+module+definition+to+target%3A%0D%0A%0D%0A%5Bcpp%5D%0D%0A%2F%2F+addons%2Fuuid%2Fv0.1%2Fuuid.cc%0D%0Avoid+Uuid%3A%3AInit%28Handle%26lt%3BObject%26gt%3B+target%29+%7B%0D%0A++++HandleScope+scope%3B%0D%0A%0D%0A++++%2F%2F+Setup+the+constructor%0D%0A++++constructor+%3D+Persistent%26lt%3BFunctionTemplate%26gt%3B%3A%3ANew%28FunctionTemplate%3A%3ANew%28Uuid%3A%3ANew%29%29%3B%0D%0A++++constructor-%26gt%3BInstanceTemplate%28%29-%26gt%3BSetInternalFieldCount%281%29%3B+%2F%2F+for+constructors%0D%0A++++constructor-%26gt%3BSetClassName%28String%3A%3ANewSymbol%28%26quot%3BUuid%26quot%3B%29%29%3B%0D%0A%0D%0A++++%2F%2F+Setup+the+prototype%0D%0A++++NODE_SET_PROTOTYPE_METHOD%28constructor%2C+%26quot%3Bgenerate%26quot%3B%2C+Generate%29%3B%0D%0A++++NODE_SET_PROTOTYPE_METHOD%28constructor%2C+%26quot%3BgenerateRandom%26quot%3B%2C+GenerateRandom%29%3B%0D%0A++++NODE_SET_PROTOTYPE_METHOD%28constructor%2C+%26quot%3BgenerateTime%26quot%3B%2C+GenerateTime%29%3B%0D%0A%0D%0A++++target-%26gt%3BSet%28String%3A%3ANewSymbol%28%26quot%3BUuid%26quot%3B%29%2C+constructor-%26gt%3BGetFunction%28%29%29%3B%0D%0A%7D%0D%0A%5B%2Fcpp%5D%0D%0A%0D%0AIn+this+scope%2C+we+are+instantiating+the+constructor+using+Uuid%3A%3ANew+as+a+new+FunctionTemplate.+We+then+call+InstanceTemplate%28%29+and+on+that+object+we+call+SetInternalFieldCount%281%29.+This+tells+v8+that+this+object+holds+a+reference+to+one+object.%0D%0A%0D%0ANext%2C+we+setup+the+prototype+using+another+macro+provided+by+node.+These+calls+say%2C+for+instance%2C+%22Add+a+method+called+generate+to+the+constructor+function+which+executes+the+native+method+Generate%22.%0D%0A%0D%0ALastly%2C+we+have+to+create+a+%22Uuid%22+module+on+the+object+returned+by+the+call+to+require%28%29.+Here%2C+Uuid+will+point+to+a+function+%28constructor%29+which+returns+a+function+that+internally+executes+Uuid%3A%3ANew.++In+other+words%2C+we+have+created+something+akin+to%3A+%0D%0A%0D%0A%5Bjs%5D%0D%0Avar+Uuid+%3D+function%28%29+%7B+%7D%3B%0D%0AUuid.constructor+%3D+function%28%29+%7B%0D%0A++++return+function%28%29+%7B%0D%0A++++++++%2F%2F+Uuid%3A%3ANew+executes+here.%0D%0A++++%7D%0D%0A%7D%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AAlthough+the+above+is+not+exactly+what+we+have+done%2C+it+may+provide+a+better+view+for+some+to+understand+FunctionTemplate+references+and+why+we+assign+one+to+the+constructor+object+in+such+a+way.%0D%0A%0D%0AThe+Uuid%3A%3ANew+method+is+defined+as%3A%0D%0A%0D%0A%5Bcpp%5D%0D%0A%2F%2F+addons%2Fuuid%2Fv0.1%2Fuuid.cc%0D%0AHandle%26lt%3BValue%26gt%3B+Uuid%3A%3ANew%28const+Arguments+%26amp%3Bamp%3Bargs%29+%7B%0D%0A++++HandleScope+scope%3B%0D%0A++++%2F%2F+no+args+are+checked%0D%0A++++Uuid+%2Auuid+%3D+new+Uuid%28%29%3B%0D%0A++++uuid-%26gt%3BWrap%28args.This%28%29%29%3B%0D%0A++++return+args.This%28%29%3B%0D%0A%7D%0D%0A%5B%2Fcpp%5D%0D%0A%0D%0AAs+you+would+expect%2C+calling+the+constructor+function+multiple+times+will+create+newly-scoped+Uuid+objects+on+the+heap.+In+this+method%2C+we+wrap+the+parameter+%28scoped+object%29+by+setting+a+reference+to+Uuid+in+the+args+as+a+contextual+scope+%28i.e.+this%29+and+then+returns+this.%0D%0A%0D%0AWithin+the+Generate+method%2C+we+will+want+to+unwrap+the+contextual+Uuid+object+and+call+the+private+method+GetString.%0D%0A%0D%0A%5Bcpp%5D%0D%0A%2F%2F+addons%2Fuuid%2Fv0.1%2Fuuid.cc%0D%0AHandle%26lt%3BValue%26gt%3B+Uuid%3A%3AGenerate%28const+Arguments+%26amp%3Bamp%3Bargs%29+%7B%0D%0A++++HandleScope+scope%3B%0D%0A++++uuid_t+id%3B%0D%0A++++uuid_generate%28id%29%3B%0D%0A%0D%0A++++Uuid+%2Auuid+%3D+ObjectWrap%3A%3AUnwrap%26lt%3BUuid%26gt%3B%28args.This%28%29%29%3B%0D%0A++++return+scope.Close%28String%3A%3ANew%28uuid-%26gt%3BGetString%28id%29.c_str%28%29%29%29%3B%0D%0A%7D%0D%0A%5B%2Fcpp%5D%0D%0A%0D%0AAs+with+any+JavaScript+function+call%2C+we+have+to+ensure+functional+scope.+Scoped+methods+should+create+a+HandleScope+object+at+the+start+and+call+scope.Close%28%29+at+the+end.+HandleScope+will+get+rid+of+temporary+handles+when+the+scope+is+closed.%0D%0A%0D%0AWithin+each+of+the+Generate%2A+methods%2C+we+will+create+a+uuid_t+type+and+call+the+corresponding+method+defined+in+%2Fusr%2Fincludes%2Fuuid%2Fuuid.h+%28location+may+vary+per+system%29.+To+demonstrate+accessing+the+pointer+to+our+original+Uuid+object%2C+we+unwrap+the+contextual+scope+of+this+function+using+ObjectWrap%3A%3AUnwrap%28args.This%28%29%29.+From+this+pointer%2C+we+can+access+any+private+methods+such+as+GetString.+Be+careful+with+your+returned+values%2C+though.+String%3A%3ANew+in+the+v8+library+does+not+take+std%3A%3Astring+in+any+of+its+signatures.+Simply+enough%2C+std%3A%3Astring+provides+a+c_str%28%29+method+to+return+a+const+char%2A+which+String%3A%3ANew+does+accept.%0D%0A%0D%0Auuid.node+demo%0D%0A%0D%0ANavigate+to+addons%2Fuuid%2Fv0.1%2F+and+execute%3A%0D%0A%0D%0A%5Bbash%5D%0D%0A%24+node-waf+configure+build%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AIf+there+are+build+errors+and+the+func.cc+example+from+before+built+successfully%2C+check+that+you+have+the+uuid-dev+package+installed+and+rerun+the+above+command.+Then%2C+navigate+to+build%2Fdefault+and+try+out+the+Uuid+addon%3A%0D%0A%0D%0A%5Bbash%5D%0D%0A%24+node%0D%0A%26gt%3B+var+Uuid+%3D+require%28%27.%2Fuuid.node%27%29.Uuid%3B%0D%0A%26gt%3B+var+uuid+%3D+new+Uuid%28%29%3B%0D%0A%26gt%3B+uuid.generate%28%29%3B%0D%0A%2783475e0c-212b-402c-bdc7-b81ebb7b34f8%27%0D%0A%26gt%3B+uuid.generateRandom%28%29%3B%0D%0A%274d597bda-8f5f-4c3c-b2fa-1cd6cd4a6903%27%0D%0A%26gt%3B+uuid.generateTime%28%29%3B%0D%0A%2725a0dd30-5076-11e1-96be-0022fb93b24c%27%0D%0A%26gt%3B+var+util+%3D+require%28%27util%27%29%3B%0D%0A%26gt%3B+util.inspect%28uuid%29%3B%0D%0A%27%7B%7D%27%0D%0A%26gt%3B+util.inspect%28Uuid%29%3B%0D%0A%27%5BFunction%3A+Uuid%5D%27%0D%0A%26gt%3B+%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AThe+above+output+may+surprise+you.+Firstly%2C+where+is+the+version+option%3F%21+It%27s+at+the+required+module+level%3A+require%28%27.%2Fuuid.node%27%29.version%3B.+Secondly%2C+if+we+can+access+uuid.generate%28%29+and+others%2C+why+don%27t+they+display+when+inspecting+the+object%3F+That%27s+because+we+defined+those+methods+on+the+prototype%3A%0D%0A%0D%0A%5Bjs%5D%0D%0A%26gt%3B+uuid.__proto__%0D%0A%7B+generate%3A+%5BFunction%3A+generate%5D%2C%0D%0A++generateRandom%3A+%5BFunction%3A+generateRandom%5D%2C%0D%0A++generateTime%3A+%5BFunction%3A+generateTime%5D+%7D%0D%0A%26gt%3B%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AThirdly%2C+you+may+have+noticed+that+I+didn%27t+say+anything+about+constructor-%26gt%3BSetClassName%28String%3A%3ANewSymbol%28%22Uuid%22%29%29%3B+in+Uuid%3A%3AInit.+You+may+have+also+wondered+where+SetClassName+actually+sets+a+class+name%2C+considering+JavaScript+is+a+prototypal+language.+That+string+value+is+what+is+displayed+when+you+call+inspect+and+get+the+value+%27%5BFunction%3A+Uuid%5D%27.+Just+as+you+would+expect%2C+Uuid+is+the+constructor+and+it+is+named+Uuid.+%0D%0A%0D%0ANow%2C+if+you%27ve+played+around+with+this+a+bit%2C+you+may+have+noticed+that+uuid.__proto__+gives+us+our+three+functions+but+uuid.prototype+is+empty.+Why+is+that%3F+That%27s+because+uuid.__proto__+really+is+uuid.constructor.prototype%2C+which+is+also+really+Uuid.prototype.+This+is+the+essence+of+prototypal+inheritance.+If+this+concept+is+foreign+or+difficult+to+grasp%2C+be+sure+to+check+out+the+excellent+explanation+on+JavaScript+Garden.%0D%0A%0D%0ALogically%2C+the+next+step+would+be+to+understand+how+to+declare+a+prototype+of+our+own.&amp;tags=Advanced%2CeBooks%2Cgithub%2Cnodejs%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/mastering-node-addons-and-functiontemplate-uuid-node/</feedburner:origLink></item>
		<item>
		<title>words.pl: slogan word generator</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/zQ0CWLeoz4s/</link>
		<comments>http://www.ipreferjim.com/2012/02/words-pl-slogan-word-generator/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 00:20:04 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=762</guid>
		<description><![CDATA[About a year ago, I was really into playing this game online where you were given a single sentence and you had to use the letters in that sentence to make up as many words as possible. The longer the word, the higher the points. Creating a script may be considered cheating if you're in [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago, I was really into playing this game online where you were given a single sentence and you had to use the letters in that sentence to make up as many words as possible.  The longer the word, the higher the points.</p>
<p>Creating a script <em>may</em> be considered cheating if you're in it for money.  If you're in it for fun, script away.  That's what I always say.</p>
<p>Here's the gist of it:<br />
<script src="https://gist.github.com/1733871.js"> </script></p>
<pre class="brush: perl; collapse: true; light: false; title: ; toolbar: true; notranslate">
#!/usr/bin/env perl
# words.pl: Find all possible slogan words from a single sentence.
use strict; $|++;

@ARGV == 2 or die &quot;usage: $0 input_file output_file 'sentence'\n&quot;;
my ($infile, $outfile, $sentence) = @ARGV;
$sentence = $sentence || 'how much wood could a woodchuck chuck';

open INPUT, &quot;&lt; $infile&quot; or die $!;
open OUTPUT, &quot;&gt; $outfile&quot; or die $!;

my $stdout = select STDOUT;
$| = 1;
select $stdout;

my %sentence_letters;
my $stmp = $sentence;
$sentence_letters{$&amp;}++ while($stmp =~ s/[a-z]//);

print &quot;Using the sentence '$sentence'\n&quot;;
print &quot;Found the following letters:\n&quot;;
print &quot;\t$_ - &quot;. $sentence_letters{$_} .&quot;\n&quot; foreach(sort(keys %sentence_letters));
print &quot;Processing $infile for slogan words\n&quot;;

my $count = 0;
my @indicators = qw{\ / | .};
LINE: while(&lt;INPUT&gt;) {
    my $word = $_;
    my $tmp = $word;
    next LINE if($word =~ /['\&amp;\d]/);
    my %word_letters;
    $word_letters{$&amp;}++ while($tmp =~ s/[a-z]//);

    foreach(keys %word_letters) {
        next LINE if ($word_letters{$_} &gt; $sentence_letters{$_});
    }
    print OUTPUT $word;

    my $word_len = length($word);
    open WORD_LEN_OUTPUT, &quot;&gt;&gt; $outfile.$word_len&quot;;
    print WORD_LEN_OUTPUT $word;

    print $indicators[++$count % 4], &quot;\r&quot;;
}

print &quot;\nDone.\nView $outfile.* for words\n&quot;;
</pre>
<p>When I wrote this, I had only recently started using Perl.  Please go easy on me if it's poorly written.</p>
<p>The script takes an input file, an output file format (e.g. words.txt will be words.txt.20 for words of 20 characters), and an optional sentence to parse.</p>
<p>It gets a set of letters in the sentence, then runs through the list of words to see if the word can be made from any combination of letters.</p>
<p>For instance, if your 'sentence' is "baby cakes", the script will create a hash of those letters and their counts.  Conceptually, this looks like:</p>
<pre class="brush: jscript; title: ; notranslate">
// hash is an array
hash['a'] = 2
hash['b'] = 2
hash['c'] = 1
hash['e'] = 1
hash['k'] = 1
hash['s'] = 1
hash['y'] = 1
</pre>
<p>If, while walking line-by-line through your list of words, the script sees 'abracadabra', the loop will return false because (conceptually):</p>
<pre class="brush: jscript; title: ; notranslate">
word['a'] = 5
word['a'] &lt;= hash['a'] == false
</pre>
<p>The script also employs some interesting stdout manipulation. This allows the script to output "spinner text" and update the current line when the terminating character is a line-feed.</p>
<p>To run the script in a linux-based environment, you may do:</p>
<pre class="brush: bash; title: ; notranslate">
mkdir ~/projects &amp;&amp; cd ~/projects
git clone git://gist.github.com/1733871.git gist-1733871
cd gist-gist-1733871
perl words.pl /usr/share/dict/words generated.txt 'Good goly, Miss Molly'
</pre>
<p>You should see output similar to:</p>
<pre class="brush: bash; title: ; notranslate">

jim at schubert in ~/projects/gist-1733871 on master*
$ tree .
.
├── generated.txt
├── generated.txt.1
├── generated.txt.2
├── generated.txt.3
├── generated.txt.4
├── generated.txt.5
├── generated.txt.6
├── generated.txt.7
├── generated.txt.8
└── words.pl

0 directories, 10 files
</pre>
<p>If you look at <em>generated.txt.7</em>, you will probably see something similar to:</p>
<pre class="brush: plain; title: ; notranslate">
Hollis
Osgood
glossy
goodly
idylls
igloos
solids
</pre>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=762&amp;md5=004f7808b9b18c95cc015966463f0ca1" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/Ny7auaKWgOzyrexGS-rKLv8FKYA/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ny7auaKWgOzyrexGS-rKLv8FKYA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ny7auaKWgOzyrexGS-rKLv8FKYA/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ny7auaKWgOzyrexGS-rKLv8FKYA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/zQ0CWLeoz4s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/02/words-pl-slogan-word-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F02%2Fwords-pl-slogan-word-generator%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=words.pl%3A+slogan+word+generator&amp;description=About+a+year+ago%2C+I+was+really+into+playing+this+game+online+where+you+were+given+a+single+sentence+and+you+had+to+use+the+letters+in+that+sentence+to+make+up+as+many+words+as+possible.++The+longer+the+word%2C+the+higher+the+points.%0D%0A%0D%0ACreating+a+script+may+be+considered+cheating+if+you%27re+in+it+for+money.++If+you%27re+in+it+for+fun%2C+script+away.++That%27s+what+I+always+say.%0D%0A%0D%0AHere%27s+the+gist+of+it%3A%0D%0A+%0D%0A%0D%0A%5Bperl+collapse%3D%22true%22%5D%0D%0A%23%21%2Fusr%2Fbin%2Fenv+perl%0D%0A%23+words.pl%3A+Find+all+possible+slogan+words+from+a+single+sentence.+%0D%0Ause+strict%3B+%24%7C%2B%2B%3B%0D%0A%0D%0A%40ARGV+%3D%3D+2+or+die+%26quot%3Busage%3A+%240+input_file+output_file+%27sentence%27%5Cn%26quot%3B%3B%0D%0Amy+%28%24infile%2C+%24outfile%2C+%24sentence%29+%3D+%40ARGV%3B%0D%0A%24sentence+%3D+%24sentence+%7C%7C+%27how+much+wood+could+a+woodchuck+chuck%27%3B%0D%0A%0D%0Aopen+INPUT%2C+%26quot%3B%26lt%3B+%24infile%26quot%3B+or+die+%24%21%3B%0D%0Aopen+OUTPUT%2C+%26quot%3B%26gt%3B+%24outfile%26quot%3B+or+die+%24%21%3B%0D%0A%0D%0Amy+%24stdout+%3D+select+STDOUT%3B%0D%0A%24%7C+%3D+1%3B%0D%0Aselect+%24stdout%3B%0D%0A%0D%0Amy+%25sentence_letters%3B%0D%0Amy+%24stmp+%3D+%24sentence%3B%0D%0A%24sentence_letters%7B%24%26amp%3B%7D%2B%2B+while%28%24stmp+%3D%7E+s%2F%5Ba-z%5D%2F%2F%29%3B%0D%0A%0D%0Aprint+%26quot%3BUsing+the+sentence+%27%24sentence%27%5Cn%26quot%3B%3B%0D%0Aprint+%26quot%3BFound+the+following+letters%3A%5Cn%26quot%3B%3B%0D%0Aprint+%26quot%3B%5Ct%24_+-+%26quot%3B.+%24sentence_letters%7B%24_%7D+.%26quot%3B%5Cn%26quot%3B+foreach%28sort%28keys+%25sentence_letters%29%29%3B%0D%0Aprint+%26quot%3BProcessing+%24infile+for+slogan+words%5Cn%26quot%3B%3B%0D%0A%0D%0Amy+%24count+%3D+0%3B%0D%0Amy+%40indicators+%3D+qw%7B%5C+%2F+%7C+.%7D%3B%0D%0ALINE%3A+while%28%26lt%3BINPUT%26gt%3B%29+%7B%0D%0A++++my+%24word+%3D+%24_%3B%0D%0A++++my+%24tmp+%3D+%24word%3B%0D%0A++++next+LINE+if%28%24word+%3D%7E+%2F%5B%27%5C%26amp%3B%5Cd%5D%2F%29%3B%0D%0A++++my+%25word_letters%3B%0D%0A++++%24word_letters%7B%24%26amp%3B%7D%2B%2B+while%28%24tmp+%3D%7E+s%2F%5Ba-z%5D%2F%2F%29%3B%0D%0A++++%0D%0A++++foreach%28keys+%25word_letters%29+%7B%0D%0A++++++++next+LINE+if+%28%24word_letters%7B%24_%7D+%26gt%3B+%24sentence_letters%7B%24_%7D%29%3B%0D%0A++++%7D%0D%0A++++print+OUTPUT+%24word%3B%0D%0A%0D%0A++++my+%24word_len+%3D+length%28%24word%29%3B%0D%0A++++open+WORD_LEN_OUTPUT%2C+%26quot%3B%26gt%3B%26gt%3B+%24outfile.%24word_len%26quot%3B%3B%0D%0A++++print+WORD_LEN_OUTPUT+%24word%3B%0D%0A%0D%0A++++print+%24indicators%5B%2B%2B%24count+%25+4%5D%2C+%26quot%3B%5Cr%26quot%3B%3B%0D%0A%7D%0D%0A%0D%0Aprint+%26quot%3B%5CnDone.%5CnView+%24outfile.%2A+for+words%5Cn%26quot%3B%3B%0D%0A%5B%2Fperl%5D%0D%0A%0D%0AWhen+I+wrote+this%2C+I+had+only+recently+started+using+Perl.++Please+go+easy+on+me+if+it%27s+poorly+written.%0D%0A%0D%0AThe+script+takes+an+input+file%2C+an+output+file+format+%28e.g.+words.txt+will+be+words.txt.20+for+words+of+20+characters%29%2C+and+an+optional+sentence+to+parse.%0D%0A%0D%0AIt+gets+a+set+of+letters+in+the+sentence%2C+then+runs+through+the+list+of+words+to+see+if+the+word+can+be+made+from+any+combination+of+letters.%0D%0A%0D%0AFor+instance%2C+if+your+%27sentence%27+is+%22baby+cakes%22%2C+the+script+will+create+a+hash+of+those+letters+and+their+counts.++Conceptually%2C+this+looks+like%3A%0D%0A%5Bjs%5D%0D%0A%2F%2F+hash+is+an+array%0D%0Ahash%5B%27a%27%5D+%3D+2%0D%0Ahash%5B%27b%27%5D+%3D+2%0D%0Ahash%5B%27c%27%5D+%3D+1%0D%0Ahash%5B%27e%27%5D+%3D+1%0D%0Ahash%5B%27k%27%5D+%3D+1%0D%0Ahash%5B%27s%27%5D+%3D+1%0D%0Ahash%5B%27y%27%5D+%3D+1%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AIf%2C+while+walking+line-by-line+through+your+list+of+words%2C+the+script+sees+%27abracadabra%27%2C+the+loop+will+return+false+because+%28conceptually%29%3A%0D%0A%5Bjs%5D%0D%0Aword%5B%27a%27%5D+%3D+5%0D%0Aword%5B%27a%27%5D+%26lt%3B%3D+hash%5B%27a%27%5D+%3D%3D+false%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AThe+script+also+employs+some+interesting+stdout+manipulation.+This+allows+the+script+to+output+%22spinner+text%22+and+update+the+current+line+when+the+terminating+character+is+a+line-feed.%0D%0A%0D%0ATo+run+the+script+in+a+linux-based+environment%2C+you+may+do%3A%0D%0A%0D%0A%5Bbash%5D%0D%0Amkdir+%7E%2Fprojects+%26amp%3B%26amp%3B+cd+%7E%2Fprojects%0D%0Agit+clone+git%3A%2F%2Fgist.github.com%2F1733871.git+gist-1733871%0D%0Acd+gist-gist-1733871%0D%0Aperl+words.pl+%2Fusr%2Fshare%2Fdict%2Fwords+generated.txt+%27Good+goly%2C+Miss+Molly%27%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AYou+should+see+output+similar+to%3A%0D%0A%5Bbash%5D%0D%0A%0D%0Ajim+at+schubert+in+%7E%2Fprojects%2Fgist-1733871+on+master%2A%0D%0A%24+tree+.%0D%0A.%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.1%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.2%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.3%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.4%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.5%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.6%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.7%0D%0A%E2%94%9C%E2%94%80%E2%94%80+generated.txt.8%0D%0A%E2%94%94%E2%94%80%E2%94%80+words.pl%0D%0A%0D%0A0+directories%2C+10+files%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AIf+you+look+at+generated.txt.7%2C+you+will+probably+see+something+similar+to%3A%0D%0A%5Bplain%5D%0D%0AHollis%0D%0AOsgood%0D%0Aglossy%0D%0Agoodly%0D%0Aidylls%0D%0Aigloos%0D%0Asolids%0D%0A%5B%2Fplain%5D&amp;tags=github%2Cperl%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/02/words-pl-slogan-word-generator/</feedburner:origLink></item>
		<item>
		<title>My Review of Android Open Conference 2011: Complete Video Compilation</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/sZwZYxVM1v0/</link>
		<comments>http://www.ipreferjim.com/2012/01/my-review-of-android-open-conference-2011-complete-video-compilation/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 03:20:20 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=760</guid>
		<description><![CDATA[Originally submitted at O'Reilly Android Open Conference 2011: Complete Video Compilation Android Open Conference 2011: Complete Video Compilation Hours of Android enjoyment By Jim Schubert from Richmond, VA on 1/31/2012 &#160; 5out of 5 Pros: Helpful examples, Easy to understand, Accurate, Concise Best Uses: Intermediate, Student, Expert Describe Yourself: Developer There are a lot of [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://oreilly.com/product/0636920023838.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/01/18/14846224_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">Android Open Conference 2011: Complete Video Compilation</p>
</div>
<p><a href="http://shop.oreilly.com/product/0636920023838.do" style="display: none;" class="url fn"><span class="fn">Android Open Conference 2011: Complete Video Compilation</span></a></div>
<p><br clear="left">
<p><strong class="summary">Hours of Android enjoyment</strong></p>
<div>By <strong>Jim Schubert</strong> from <strong>Richmond, VA</strong> on <strong><abbr title="2012131T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">1/31/2012</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -180px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">5</span>out of 5</div>
<p><strong>Pros: </strong>Helpful examples, Easy to understand, Accurate, Concise</p>
<p><strong>Best Uses: </strong>Intermediate, Student, Expert</p>
<p><strong>Describe Yourself: </strong>Developer</p>
<p style="margin-top:1em" class="description">There are a lot of videos here. If you're only planning to write apps for the market, you'll most likely not be interested in the Embedded Android talk or Scala as a Java replacement.  If you don't work on iOS and never plan to, you can probably scan through Nick Farina's talk (sorry, Nick). I found many of the videos worthwhile, whether they related to actual app development or the business of apps.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />I also really enjoyed the keynotes.  Tim O'Reilly's talk is probably my favorite because I've been saying the same things about many of Tim's comparisons since I bought my first DROID a couple of years ago.</p>
<p>Even if you're familiar with Android development, you should definitely watch the videos by Ken Jones.  He shows the start of a Twitter client.  Although he didn't get very far in the actual coding, he will point you to the finished code. One aspect I loved about his talks is that he discusses a lot of best practices.  Many tutorials you find online either don't discuss best practices or don't incorporate them.</p>
<p>Be sure to watch the Arduino videos.  I hadn't heard about Arduino before this video and I was very impressed. In fact, I watched the keynote video twice.</p>
<p>Honestly, there are some videos here that I'm not that interested in. That doesn't detract from the overall usefulness of this video collection.  If you're 25% of the way through a video and it hasn't hooked you yet, move onto the next because there is a plethora of information.</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=760&amp;md5=f4192296cb7b06949583a98c9fedb8cd" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/-EY6OOT4jt-bO03h3kEXylGJewk/0/da"><img src="http://feedads.g.doubleclick.net/~a/-EY6OOT4jt-bO03h3kEXylGJewk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-EY6OOT4jt-bO03h3kEXylGJewk/1/da"><img src="http://feedads.g.doubleclick.net/~a/-EY6OOT4jt-bO03h3kEXylGJewk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/sZwZYxVM1v0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/01/my-review-of-android-open-conference-2011-complete-video-compilation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F01%2Fmy-review-of-android-open-conference-2011-complete-video-compilation%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+Android+Open+Conference+2011%3A+Complete+Video+Compilation&amp;description=Originally+submitted+at+O%27ReillyAndroid+Open+Conference+2011%3A+Complete+Video+CompilationAndroid+Open+Conference+2011%3A+Complete+Video+CompilationHours+of+Android+enjoymentBy+Jim+Schubert+from+Richmond%2C+VA+on+1%2F31%2F2012%26nbsp%3B5out+of+5Pros%3A+Helpful+examples%2C+Easy+to+understand%2C+Accurate%2C+ConciseBest+Uses%3A+Intermediate%2C+Student%2C+ExpertDescribe+Yourself%3A+DeveloperThere+are+a+lot+of+videos+here.+If+you%27re+only+planning+to+write+apps+for+the+market%2C+you%27ll+most+likely+not+be+interested+in+the+Embedded+Android+talk+or+Scala+as+a+Java+replacement.++If+you+don%27t+work+on+iOS+and+never+plan+to%2C+you+can+probably+scan+through+Nick+Farina%27s+talk+%28sorry%2C+Nick%29.+I+found+many+of+the+videos+worthwhile%2C+whether+they+related+to+actual+app+development+or+the+business+of+apps.%0AI+also+really+enjoyed+the+keynotes.++Tim+O%27Reilly%27s+talk+is+probably+my+favorite+because+I%27ve+been+saying+the+same+things+about+many+of+Tim%27s+comparisons+since+I+bought+my+first+DROID+a+couple+of+years+ago.%0A%0AEven+if+you%27re+familiar+with+Android+development%2C+you+should+definitely+watch+the+videos+by+Ken+Jones.++He+shows+the+start+of+a+Twitter+client.++Although+he+didn%27t+get+very+far+in+the+actual+coding%2C+he+will+point+you+to+the+finished+code.+One+aspect+I+loved+about+his+talks+is+that+he+discusses+a+lot+of+best+practices.++Many+tutorials+you+find+online+either+don%27t+discuss+best+practices+or+don%27t+incorporate+them.%0A%0ABe+sure+to+watch+the+Arduino+videos.++I+hadn%27t+heard+about+Arduino+before+this+video+and+I+was+very+impressed.+In+fact%2C+I+watched+the+keynote+video+twice.%0A%0AHonestly%2C+there+are+some+videos+here+that+I%27m+not+that+interested+in.+That+doesn%27t+detract+from+the+overall+usefulness+of+this+video+collection.++If+you%27re+25%25+of+the+way+through+a+video+and+it+hasn%27t+hooked+you+yet%2C+move+onto+the+next+because+there+is+a+plethora+of+information.%28legalese%29&amp;tags=blog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/01/my-review-of-android-open-conference-2011-complete-video-compilation/</feedburner:origLink></item>
		<item>
		<title>dotfiles backup using GitHub</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/pJFx_E85SMY/</link>
		<comments>http://www.ipreferjim.com/2012/01/dotfiles-backup-using-github/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 01:58:12 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=753</guid>
		<description><![CDATA[I was recently looking for a solution to backup my configuration files (bash, vim, etc) using GitHub. After some looking around, I've compiled a pretty nice project for myself. github:jimschubert/dotfiles First, this script checks dependencies. My dependencies are git, ruby, vim, tree, rake, gem, bundle, and trash. You could check out the code and add [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently looking for a solution to backup my configuration files (bash, vim, etc) using GitHub.  After some looking around, I've compiled a pretty nice project for myself.</p>
<p><a href="http://github.com/jimschubert/dotfiles" title="click to check out the project" target="_blank">github:jimschubert/dotfiles</a></p>
<p>First, this script <a href="https://github.com/jimschubert/dotfiles/blob/v1.0/bootstrap.sh#L36" title="click to see where this code checks dependencies." target="_blank">checks dependencies</a>.  My dependencies are git, ruby, vim, tree, rake, gem, bundle, and trash.  You could check out the code and add any number of dependencies here.  Rubygems and bundler are required because the script later installs all gems listed in <strong>Gemfile</strong>. </p>
<p>Next, the script copies ~/.bashrc to ~/.bashrc.local.  This allows you to keep your current bash configuration as a 'local-only' config that doesn't get copied or committed to github.</p>
<p>The script, as I copied most of bootstrap.sh and the rakefile from <a href="http://github.com/gf3" title="click to view Ryan B's profile" target="_blank">@gf3</a>, expects the repository to be cloned to ~/.dotfiles.  From there, it calls rake.</p>
<p>Rake looks at every file in ~/.dotfiles and copies the corresponding file relatively from ~/ to, essentially, ~/dotfiles-backup/`date`.  I recommend first running the backup to make sure your files are properly backed up.</p>
<pre class="brush: bash; title: ; notranslate">
rake backup
</pre>
<p>The script then calls 'bundle install' to install all gems.  It then copies all files from ~/.dotfiles to replace those relative files that were previously backed up from ~/.</p>
<p>The post-install displays a message to remind you to edit .gitconfig and .hgrc.</p>
<p>Because I've done some copying and compiling, these are relative close to the three projects in the <a href="https://github.com/jimschubert/dotfiles/blob/v1.0/README.md" title="click to view README.md" target="_blank">README</a> for right now.</p>
<p>Here is an excerpt from the README:</p>
<h1>Bash</h1>
<pre><code>$ tree ~/.bash
/home/jim/.bash
├── aliases
├── completions
├── completion_scripts
│   └── git_completion
├── config
├── functions
├── paths
└── prompt
</code></pre>
<p>The above files are loaded by <code>.bashrc</code>. The files are pretty self-explanatory, other than <code>prompt</code> which colorizes the bash prompt with tweaks for git.</p>
<h2>Cool Aliases</h2>
<ul>
<li>cd : pushd</li>
<li>bd : popd</li>
<li>cd..  | ..   : back one directory</li>
<li>cd... | ...  : back two directories</li>
<li>^ up to five directories</li>
<li>rm : trash</li>
<li>undopush</li>
<li>ip</li>
<li>GET | HEAD | POST | PUT | DELETE | TRACE | OPTIONS</li>
</ul>
<h2>Config</h2>
<ul>
<li>sets editor to vim</li>
<li>sets English/UTF-8</li>
<li>sets manpager</li>
<li>sets commands to ignore in history</li>
<li>sets noclobber (e.g. prevents <code>cat &gt; IMPORTANT_FILE</code> mistakes )</li>
<li>sets nocaseglob (e.g. <code>ls ~/.B*</code> will list contents of <code>~/.bash</code>)</li>
</ul>
<h2>Functions</h2>
<p>The two functions, <code>md</code> and <code>c</code> may not seem like much, but they simplify some commands. For example:</p>
<pre><code>$ md projects; git clone git@github.com:jimschubert/dotfiles.git &amp;&amp; cd dotfiles
</code></pre>
<p>In the above line, <code>md</code> will create the projects directory and <code>cd</code> into it.</p>
<p><code>c</code> stands for 'code' and  works like this:</p>
<pre><code>jim at computer in ~
$ pwd
/home/jim
jim at computer in ~
$ c dotfiles
~/projects/dotfiles ~
jim at computer in ~/projects/dotfiles on master
$
</code></pre>
<p>You can change it to whatever shortcut and issue <code>reload</code>, which is also an alias from this setup.</p>
<h2>Screenshot</h2>
<p>Notice the color scheme and github branch notifications created by ~/.bash/prompt.</p>
<p><a href="http://www.ipreferjim.com/site/wp-content/uploads/2012/01/bash.png?84cd58"><img src="http://www.ipreferjim.com/site/wp-content/uploads/2012/01/bash.png?84cd58" alt="" title="bash" width="724" height="648" class="aligncenter size-full wp-image-756" /></a></p>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=753&amp;md5=bbd3491d9b4c8ce812b54bf244012f13" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/dh85tpb64k04OZTDj-Hrn-lsKT8/0/da"><img src="http://feedads.g.doubleclick.net/~a/dh85tpb64k04OZTDj-Hrn-lsKT8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dh85tpb64k04OZTDj-Hrn-lsKT8/1/da"><img src="http://feedads.g.doubleclick.net/~a/dh85tpb64k04OZTDj-Hrn-lsKT8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/pJFx_E85SMY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2012/01/dotfiles-backup-using-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2012%2F01%2Fdotfiles-backup-using-github%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=dotfiles+backup+using+GitHub&amp;description=I+was+recently+looking+for+a+solution+to+backup+my+configuration+files+%28bash%2C+vim%2C+etc%29+using+GitHub.++After+some+looking+around%2C+I%27ve+compiled+a+pretty+nice+project+for+myself.%0D%0A%0D%0Agithub%3Ajimschubert%2Fdotfiles%0D%0A%0D%0AFirst%2C+this+script+checks+dependencies.++My+dependencies+are+git%2C+ruby%2C+vim%2C+tree%2C+rake%2C+gem%2C+bundle%2C+and+trash.++You+could+check+out+the+code+and+add+any+number+of+dependencies+here.++Rubygems+and+bundler+are+required+because+the+script+later+installs+all+gems+listed+in+Gemfile.+%0D%0A%0D%0ANext%2C+the+script+copies+%7E%2F.bashrc+to+%7E%2F.bashrc.local.++This+allows+you+to+keep+your+current+bash+configuration+as+a+%27local-only%27+config+that+doesn%27t+get+copied+or+committed+to+github.%0D%0A%0D%0AThe+script%2C+as+I+copied+most+of+bootstrap.sh+and+the+rakefile+from+%40gf3%2C+expects+the+repository+to+be+cloned+to+%7E%2F.dotfiles.++From+there%2C+it+calls+rake.%0D%0A%0D%0ARake+looks+at+every+file+in+%7E%2F.dotfiles+and+copies+the+corresponding+file+relatively+from+%7E%2F+to%2C+essentially%2C+%7E%2Fdotfiles-backup%2F%60date%60.++I+recommend+first+running+the+backup+to+make+sure+your+files+are+properly+backed+up.%0D%0A%0D%0A%5Bbash%5D%0D%0Arake+backup%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AThe+script+then+calls+%27bundle+install%27+to+install+all+gems.++It+then+copies+all+files+from+%7E%2F.dotfiles+to+replace+those+relative+files+that+were+previously+backed+up+from+%7E%2F.%0D%0A%0D%0AThe+post-install+displays+a+message+to+remind+you+to+edit+.gitconfig+and+.hgrc.%0D%0A%0D%0ABecause+I%27ve+done+some+copying+and+compiling%2C+these+are+relative+close+to+the+three+projects+in+the+README+for+right+now.%0D%0A%0D%0AHere+is+an+excerpt+from+the+README%3A%0D%0A%0D%0A%0D%0ABash%0D%0A%0D%0A%24+tree+%7E%2F.bash%0D%0A%2Fhome%2Fjim%2F.bash%0D%0A%E2%94%9C%E2%94%80%E2%94%80+aliases%0D%0A%E2%94%9C%E2%94%80%E2%94%80+completions%0D%0A%E2%94%9C%E2%94%80%E2%94%80+completion_scripts%0D%0A%E2%94%82%C2%A0%C2%A0+%E2%94%94%E2%94%80%E2%94%80+git_completion%0D%0A%E2%94%9C%E2%94%80%E2%94%80+config%0D%0A%E2%94%9C%E2%94%80%E2%94%80+functions%0D%0A%E2%94%9C%E2%94%80%E2%94%80+paths%0D%0A%E2%94%94%E2%94%80%E2%94%80+prompt%0D%0A%0D%0A%0D%0AThe+above+files+are+loaded+by+.bashrc.+The+files+are+pretty+self-explanatory%2C+other+than+prompt+which+colorizes+the+bash+prompt+with+tweaks+for+git.%0D%0A%0D%0ACool+Aliases%0D%0A%0D%0A%0D%0Acd+%3A+pushd%0D%0Abd+%3A+popd%0D%0Acd..++%7C+..+++%3A+back+one+directory%0D%0Acd...+%7C+...++%3A+back+two+directories%0D%0A%5E+up+to+five+directories%0D%0Arm+%3A+trash%0D%0Aundopush%0D%0Aip%0D%0AGET+%7C+HEAD+%7C+POST+%7C+PUT+%7C+DELETE+%7C+TRACE+%7C+OPTIONS%0D%0A%0D%0A%0D%0AConfig%0D%0A%0D%0A%0D%0Asets+editor+to+vim%0D%0Asets+English%2FUTF-8%0D%0Asets+manpager%0D%0Asets+commands+to+ignore+in+history%0D%0Asets+noclobber+%28e.g.+prevents+cat+%26gt%3B+IMPORTANT_FILE+mistakes+%29%0D%0Asets+nocaseglob+%28e.g.+ls+%7E%2F.B%2A+will+list+contents+of+%7E%2F.bash%29%0D%0A%0D%0A%0D%0AFunctions%0D%0A%0D%0AThe+two+functions%2C+md+and+c+may+not+seem+like+much%2C+but+they+simplify+some+commands.+For+example%3A%0D%0A%0D%0A%24+md+projects%3B+git+clone+git%40github.com%3Ajimschubert%2Fdotfiles.git+%26amp%3B%26amp%3B+cd+dotfiles%0D%0A%0D%0A%0D%0AIn+the+above+line%2C+md+will+create+the+projects+directory+and+cd+into+it.%0D%0A%0D%0Ac+stands+for+%27code%27+and++works+like+this%3A%0D%0A%0D%0Ajim+at+computer+in+%7E%0D%0A%24+pwd%0D%0A%2Fhome%2Fjim%0D%0Ajim+at+computer+in+%7E%0D%0A%24+c+dotfiles%0D%0A%7E%2Fprojects%2Fdotfiles+%7E%0D%0Ajim+at+computer+in+%7E%2Fprojects%2Fdotfiles+on+master%0D%0A%24%0D%0A%0D%0A%0D%0AYou+can+change+it+to+whatever+shortcut+and+issue+reload%2C+which+is+also+an+alias+from+this+setup.%0D%0A%0D%0AScreenshot%0D%0A%0D%0ANotice+the+color+scheme+and+github+branch+notifications+created+by+%7E%2F.bash%2Fprompt.%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A&amp;tags=Advanced%2Cgithub%2Clinux%2CTricks%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2012/01/dotfiles-backup-using-github/</feedburner:origLink></item>
		<item>
		<title>Install nodejs under ChromeOS (CR-48)</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/ZBwhaWESeiM/</link>
		<comments>http://www.ipreferjim.com/2011/12/install-nodejs-under-chromeos-cr-48/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 04:35:53 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=741</guid>
		<description><![CDATA[Why would I want to do this? I'm a software developer. I love javascript. I love node.js. I love the direction Google is taking web development, user interaction, and the web in general. Installing node.js opens up a lot of possibilities for me on my CR-48. I don't know if this will work on anything [...]]]></description>
			<content:encoded><![CDATA[<p>Why would I want to do this?</p>
<p>I'm a software developer. I love javascript. I love node.js. I love the direction Google is taking web development, user interaction, and the web in general. Installing node.js opens up a lot of possibilities for me on my CR-48.  I don't know if this will work on anything other than the CR-48, considering the machine has to be in developer mode for these instructions.</p>
<p>If you don't have a chromebook yet, or you don't know what they are... where have you been? But seriously, visit <a href="http://www.google.com/chromebook/" title="Google Chromebooks" target="_blank">http://www.google.com/chromebook/</a> and check them out.</p>
<p>Before I start, let me first say that following these instructions may void your warranty if you have one, open your machine up to vulnerabilities, or replace existing files and cause instability.  If you don't know how to revert or fix any issues that may occur, don't continue. I offer no sort of warranty, support, or anything else. Consider this a 'hack' of sorts.</p>
<p>I found <a href="http://kalinchuk.com/?tag=install-packages-on-chrome-os" title="blog post about installing packages on chrome os" target="_blank">a blog post</a> detailing how to install an archive package and ruby on rails in ChromeOS.  I followed part of these instructions and I have modified them to fit my needs.</p>
<h2>Prerequisites</h2>
<ul>
<li>You must have a Chromebook, possibly only the CR-48</li>
<li>You must be in '<a href="http://www.chromium.org/chromium-os/poking-around-your-chrome-os-device" title="Instructions for entering developer mode" target="_blank">developer mode</a>'</li>
<li>You must have a writable rootfs (see above link for developer mode)</li>
</ul>
<h2>Instructions</h2>
<p>Downloading and installing xz</p>
<ol>
<li>Download the <a href="http://www.archlinux.org/packages/core/i686/xz/" title="download the xz package" target="_blank">xz package</a></li>
<li>Enter crosh or VT-2 (CTRL+ALT+T or CTRL+ALT+&rarr;)</li>
<li>If VT-2, login to the shell</li>
<li>Run on the terminal: cd /home/chronos/user/Downloads</li>
<li>Run on the terminal: tar -zxf xz-*.tar.gz</li>
<li>Run on the terminal: cd usr</li>
<li>Run on the terminal: cp * /usr/</li>
</ol>
<p>Now that xz is installed in /usr/bin (verify by running on the command line: which xz), you will be able to extract certain files that are necessary for nodejs and possibly any other package you'd like.</p>
<p>Download and install nodejs and openssl.<br />
<em>The site claims openssl is optional, but node wouldn't open without it</em></p>
<ol>
<li>Download <a href="http://www.archlinux.org/packages/community/i686/nodejs/" title="download nodejs" target="_blank">nodejs</a></li>
<li>Download <a href="http://www.archlinux.org/packages/core/i686/openssl/" title="download openssl" target="_blank">openssl</a></li>
<li>Enter the terminal again and navigate to /home/chronos/user/Downloads</li>
<li>Run on the terminal: xz -d node*.xz</li>
<li>Run on the terminal: tar -zxfv openssl*.tar.gz</li>
<li>Run on the terminal: cd usr</li>
<li>Run on the terminal: cp * /usr/</li>
</ol>
<p>Now you should have a working install of nodejs.  You can use npm, for instance, to install express and jade.<br />
<a href="http://www.ipreferjim.com/site/wp-content/uploads/2011/12/screenshot-20111222-233213.png?84cd58"><img src="http://www.ipreferjim.com/site/wp-content/uploads/2011/12/screenshot-20111222-233213-1024x640.png?84cd58" alt="node.js and express running on ChromeOS" title="node.js and express running on ChromeOS" width="550" height="343" class="aligncenter size-large wp-image-744" /></a></p>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=741&amp;md5=7ab1c51f2161715c4cfc9c8acd62bc51" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/7ILUFrfnjfeyr83BB53LS_gIcX0/0/da"><img src="http://feedads.g.doubleclick.net/~a/7ILUFrfnjfeyr83BB53LS_gIcX0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7ILUFrfnjfeyr83BB53LS_gIcX0/1/da"><img src="http://feedads.g.doubleclick.net/~a/7ILUFrfnjfeyr83BB53LS_gIcX0/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/ZBwhaWESeiM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2011/12/install-nodejs-under-chromeos-cr-48/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2011%2F12%2Finstall-nodejs-under-chromeos-cr-48%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=Install+nodejs+under+ChromeOS+%28CR-48%29&amp;description=Why+would+I+want+to+do+this%3F%0D%0A%0D%0AI%27m+a+software+developer.+I+love+javascript.+I+love+node.js.+I+love+the+direction+Google+is+taking+web+development%2C+user+interaction%2C+and+the+web+in+general.+Installing+node.js+opens+up+a+lot+of+possibilities+for+me+on+my+CR-48.++I+don%27t+know+if+this+will+work+on+anything+other+than+the+CR-48%2C+considering+the+machine+has+to+be+in+developer+mode+for+these+instructions.%0D%0A%0D%0AIf+you+don%27t+have+a+chromebook+yet%2C+or+you+don%27t+know+what+they+are...+where+have+you+been%3F+But+seriously%2C+visit+http%3A%2F%2Fwww.google.com%2Fchromebook%2F+and+check+them+out.%0D%0A%0D%0ABefore+I+start%2C+let+me+first+say+that+following+these+instructions+may+void+your+warranty+if+you+have+one%2C+open+your+machine+up+to+vulnerabilities%2C+or+replace+existing+files+and+cause+instability.++If+you+don%27t+know+how+to+revert+or+fix+any+issues+that+may+occur%2C+don%27t+continue.+I+offer+no+sort+of+warranty%2C+support%2C+or+anything+else.+Consider+this+a+%27hack%27+of+sorts.%0D%0A%0D%0AI+found+a+blog+post+detailing+how+to+install+an+archive+package+and+ruby+on+rails+in+ChromeOS.++I+followed+part+of+these+instructions+and+I+have+modified+them+to+fit+my+needs.%0D%0A%0D%0APrerequisites%0D%0A%0D%0A%09You+must+have+a+Chromebook%2C+possibly+only+the+CR-48%0D%0A%09You+must+be+in+%27developer+mode%27%0D%0A%09You+must+have+a+writable+rootfs+%28see+above+link+for+developer+mode%29%0D%0A%0D%0A%0D%0AInstructions%0D%0A%0D%0ADownloading+and+installing+xz%0D%0A%0D%0A%09Download+the+xz+package%0D%0A%09Enter+crosh+or+VT-2+%28CTRL%2BALT%2BT+or+CTRL%2BALT%2B%26rarr%3B%29%0D%0A%09If+VT-2%2C+login+to+the+shell%0D%0A%09Run+on+the+terminal%3A+cd+%2Fhome%2Fchronos%2Fuser%2FDownloads%0D%0A%09Run+on+the+terminal%3A+tar+-zxf+xz-%2A.tar.gz%0D%0A%09Run+on+the+terminal%3A+cd+usr%0D%0A%09Run+on+the+terminal%3A+cp+%2A+%2Fusr%2F%0D%0A%0D%0ANow+that+xz+is+installed+in+%2Fusr%2Fbin+%28verify+by+running+on+the+command+line%3A+which+xz%29%2C+you+will+be+able+to+extract+certain+files+that+are+necessary+for+nodejs+and+possibly+any+other+package+you%27d+like.%0D%0A%0D%0ADownload+and+install+nodejs+and+openssl.%0D%0AThe+site+claims+openssl+is+optional%2C+but+node+wouldn%27t+open+without+it%0D%0A%0D%0A%09Download+nodejs%0D%0A%09Download+openssl%0D%0A%09Enter+the+terminal+again+and+navigate+to+%2Fhome%2Fchronos%2Fuser%2FDownloads%0D%0A%09Run+on+the+terminal%3A+xz+-d+node%2A.xz%0D%0A%09Run+on+the+terminal%3A+tar+-zxfv+openssl%2A.tar.gz%0D%0A++++++++Run+on+the+terminal%3A+cd+usr%0D%0A%09Run+on+the+terminal%3A+cp+%2A+%2Fusr%2F%0D%0A%0D%0A%0D%0ANow+you+should+have+a+working+install+of+nodejs.++You+can+use+npm%2C+for+instance%2C+to+install+express+and+jade.%0D%0A%0D%0A%0D%0A&amp;tags=Advanced%2CGoogle%2Cnodejs%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2011/12/install-nodejs-under-chromeos-cr-48/</feedburner:origLink></item>
		<item>
		<title>Visual Studio and Interface property stubs</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/mxfS5Sy1WS0/</link>
		<comments>http://www.ipreferjim.com/2011/11/visual-studio-and-interface-property-stubs/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 23:53:38 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=720</guid>
		<description><![CDATA[Last year, I posted a question on StackOverflow asking if it was possible to replace the property stubs for interface refactoring Is it possible to change the stub used to implement interfaces in Visual Studio 2008? For instance, when I choose either Implement interface 'IMyInterface' or Explicitly implement interface 'IMyInterface' Instead of a number of [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, I <a href="http://stackoverflow.com/q/2608966/151445" title="my question on StackOverflow" target="_blank">posted a question</a> on StackOverflow asking if it was possible to replace the property stubs for interface refactoring</p>
<pre>Is it possible to change the stub used to implement interfaces in Visual Studio 2008?

For instance, when I choose either
Implement interface 'IMyInterface'
or
Explicitly implement interface 'IMyInterface'

Instead of a number of properties that look like this:

    public string Comment
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }
I'd like my properties to use the C# 3.0 auto-implemented properties and look like this:

    public string Comment {get;set;}
I want to do this to avoid forcing this interface to be an abstract class.

I've looked through the snippets in the Visual Studio folder, but I didn't see any that would be appropriate. I've also googled and searched SO, and found nothing.

If this isn't possible, does anyone have a macro I can steal?

Thanks.</pre>
<p>I then discovered that you can edit the file at:</p>
<pre class="brush: plain; title: ; notranslate">
[program files]\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Refactoring\PropertyStub.snippet
</pre>
<p>and modify the xml node 'Code' to contain the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Code Language=&quot;csharp&quot;&gt;
    &lt;![CDATA[ $signature$ { $GetterAccessibility$ get; $SetterAccessibility$ set;} $end$]]&gt;
&lt;/Code&gt;
</pre>
<p>I really wish this was the default for .NET 3.0 and higher (since auto-implemented properties have been around).</p>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=720&amp;md5=ac24d86c4c2d21098b22395a8488e88d" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/SK7bYh9lDqsUlAZc3eWMj2MIYPU/0/da"><img src="http://feedads.g.doubleclick.net/~a/SK7bYh9lDqsUlAZc3eWMj2MIYPU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SK7bYh9lDqsUlAZc3eWMj2MIYPU/1/da"><img src="http://feedads.g.doubleclick.net/~a/SK7bYh9lDqsUlAZc3eWMj2MIYPU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/mxfS5Sy1WS0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2011/11/visual-studio-and-interface-property-stubs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2011%2F11%2Fvisual-studio-and-interface-property-stubs%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=Visual+Studio+and+Interface+property+stubs&amp;description=Last+year%2C+I+posted+a+question+on+StackOverflow+asking+if+it+was+possible+to+replace+the+property+stubs+for+interface+refactoring%0D%0A%0D%0AIs+it+possible+to+change+the+stub+used+to+implement+interfaces+in+Visual+Studio+2008%3F%0D%0A%0D%0AFor+instance%2C+when+I+choose+either%0D%0AImplement+interface+%27IMyInterface%27%0D%0Aor%0D%0AExplicitly+implement+interface+%27IMyInterface%27%0D%0A%0D%0AInstead+of+a+number+of+properties+that+look+like+this%3A%0D%0A%0D%0A++++public+string+Comment%0D%0A++++%7B%0D%0A++++++++get%0D%0A++++++++%7B%0D%0A++++++++++++throw+new+NotImplementedException%28%29%3B%0D%0A++++++++%7D%0D%0A++++++++set%0D%0A++++++++%7B%0D%0A++++++++++++throw+new+NotImplementedException%28%29%3B%0D%0A++++++++%7D%0D%0A++++%7D%0D%0AI%27d+like+my+properties+to+use+the+C%23+3.0+auto-implemented+properties+and+look+like+this%3A%0D%0A%0D%0A++++public+string+Comment+%7Bget%3Bset%3B%7D%0D%0AI+want+to+do+this+to+avoid+forcing+this+interface+to+be+an+abstract+class.%0D%0A%0D%0AI%27ve+looked+through+the+snippets+in+the+Visual+Studio+folder%2C+but+I+didn%27t+see+any+that+would+be+appropriate.+I%27ve+also+googled+and+searched+SO%2C+and+found+nothing.%0D%0A%0D%0AIf+this+isn%27t+possible%2C+does+anyone+have+a+macro+I+can+steal%3F%0D%0A%0D%0AThanks.%0D%0A%0D%0AI+then+discovered+that+you+can+edit+the+file+at%3A%0D%0A%5Bplain%5D%0D%0A%5Bprogram+files%5D%5CMicrosoft+Visual+Studio+10.0%5CVC%23%5CSnippets%5C1033%5CRefactoring%5CPropertyStub.snippet%0D%0A%5B%2Fplain%5D%0D%0A%0D%0Aand+modify+the+xml+node+%27Code%27+to+contain+the+following%3A%0D%0A%5Bxml%5D%0D%0A%26lt%3BCode+Language%3D%26quot%3Bcsharp%26quot%3B%26gt%3B%0D%0A++++%26lt%3B%21%5BCDATA%5B+%24signature%24+%7B+%24GetterAccessibility%24+get%3B+%24SetterAccessibility%24+set%3B%7D+%24end%24%5D%5D%26gt%3B%0D%0A%26lt%3B%2FCode%26gt%3B%0D%0A%5B%2Fxml%5D%0D%0A%0D%0AI+really+wish+this+was+the+default+for+.NET+3.0+and+higher+%28since+auto-implemented+properties+have+been+around%29.&amp;tags=.NET%2CC%23%2CVisual+Studio%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2011/11/visual-studio-and-interface-property-stubs/</feedburner:origLink></item>
		<item>
		<title>My Review of JavaScript: The Definitive Guide, 6th Edition</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/O8Y2502lPSo/</link>
		<comments>http://www.ipreferjim.com/2011/11/my-review-of-javascript-the-definitive-guide-6th-edition/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 23:26:47 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/2011/11/my-review-of-javascript-the-definitive-guide-6th-edition/</guid>
		<description><![CDATA[Originally submitted at O'Reilly Activate Your Web Pages JavaScript: The Definitive Guide, 6th Edition A tome of knowledge By Jim from Herndon, VA on 11/8/2011 &#160; 4out of 5 Pros: Well-written, Accurate, Concise, Easy to understand Cons: Huge Best Uses: Student, Expert, Novice, Intermediate Describe Yourself: Developer This is an unbelievably thorough JavaScript book. It's [...]]]></description>
			<content:encoded><![CDATA[<div class="hreview">
<div class="item">
<p><a href="http://shop.oreilly.com/product/9780596805531.do">Originally submitted at O'Reilly</a></p>
<div><img src="http://images.powerreviews.com/images_products/04/72/13514433_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0">
<p style="margin-top:0">Activate Your Web Pages</p>
</div>
<p><a href="http://shop.oreilly.com/product/9780596805531.do" style="display: none;" class="url fn"><span class="fn">JavaScript: The Definitive Guide, 6th Edition</span></a></div>
<p><br clear="left">
<p><strong class="summary">A tome of knowledge</strong></p>
<div>By <strong>Jim</strong> from <strong>Herndon, VA</strong> on <strong><abbr title="2011118T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;">11/8/2011</abbr></strong></div>
<p>
<div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -144px;" class="prStars prStarsSmall">&nbsp;</div>
</p>
<div style="display: none"><span class="rating">4</span>out of 5</div>
<p><strong>Pros: </strong>Well-written, Accurate, Concise, Easy to understand</p>
<p><strong>Cons: </strong>Huge</p>
<p><strong>Best Uses: </strong>Student, Expert, Novice, Intermediate</p>
<p><strong>Describe Yourself: </strong>Developer</p>
<p style="margin-top:1em" class="description">This is an unbelievably thorough JavaScript book.  It's definitely more of a reference book than a front-to-back read.<br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"><br />The first 12 chapters are an excellent introduction into the history of JavaScript and the core functionality of the language.  There is a lot of information in these chapters that really shouldn't be overlooked-- especially Chapter 8: "Functions".</p>
<p>I especially appreciate the structure and the approach of the client-side section of the book.  Flanagan makes it a point to avoid pushing JavaScript frameworks by explaining the features of the language first, followed by an explanation of the cross-browser simplification of using jQuery. </p>
<p>Later chapters cover additions to more recent browsers like client storage and HTML5 features.  Those chapters unfortunately go by really fast.  They're definitely not as in-depth as the JavaScript history part of the book.</p>
<p>The last two parts of the book are purely reference. This is pretty helpful, but it makes the book a lot thicker than most "guide" references.</p>
<p>I do agree with others that this book could use a few more examples, especially near the end when discussing JavaScript usage with new HTML5 APIs.  If you're looking for an in-depth understanding of the core functionality of JavaScript, this is the book.  It has helped me in numerous job interviews!</p>
<p style="margin-top:0.5em">(<a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license">legalese</a>)</p>
</div>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=719&amp;md5=55d09ce961f7835a359e95d7460287db" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/FtOLpj1bsdvjOjXa4ZNMbN6FJhk/0/da"><img src="http://feedads.g.doubleclick.net/~a/FtOLpj1bsdvjOjXa4ZNMbN6FJhk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/FtOLpj1bsdvjOjXa4ZNMbN6FJhk/1/da"><img src="http://feedads.g.doubleclick.net/~a/FtOLpj1bsdvjOjXa4ZNMbN6FJhk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/O8Y2502lPSo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2011/11/my-review-of-javascript-the-definitive-guide-6th-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2011%2F11%2Fmy-review-of-javascript-the-definitive-guide-6th-edition%2F&amp;hidden=1&amp;language=en_GB&amp;category=text&amp;title=My+Review+of+JavaScript%3A+The+Definitive+Guide%2C+6th+Edition&amp;description=Originally+submitted+at+O%27ReillyActivate+Your+Web+PagesJavaScript%3A+The+Definitive+Guide%2C+6th+EditionA+tome+of+knowledgeBy+Jim+from+Herndon%2C+VA+on+11%2F8%2F2011%26nbsp%3B4out+of+5Pros%3A+Well-written%2C+Accurate%2C+Concise%2C+Easy+to+understandCons%3A+HugeBest+Uses%3A+Student%2C+Expert%2C+Novice%2C+IntermediateDescribe+Yourself%3A+DeveloperThis+is+an+unbelievably+thorough+JavaScript+book.++It%27s+definitely+more+of+a+reference+book+than+a+front-to-back+read.%0AThe+first+12+chapters+are+an+excellent+introduction+into+the+history+of+JavaScript+and+the+core+functionality+of+the+language.++There+is+a+lot+of+information+in+these+chapters+that+really+shouldn%27t+be+overlooked--+especially+Chapter+8%3A+%22Functions%22.%0A%0AI+especially+appreciate+the+structure+and+the+approach+of+the+client-side+section+of+the+book.++Flanagan+makes+it+a+point+to+avoid+pushing+JavaScript+frameworks+by+explaining+the+features+of+the+language+first%2C+followed+by+an+explanation+of+the+cross-browser+simplification+of+using+jQuery.+%0A%0ALater+chapters+cover+additions+to+more+recent+browsers+like+client+storage+and+HTML5+features.++Those+chapters+unfortunately+go+by+really+fast.++They%27re+definitely+not+as+in-depth+as+the+JavaScript+history+part+of+the+book.%0A%0AThe+last+two+parts+of+the+book+are+purely+reference.+This+is+pretty+helpful%2C+but+it+makes+the+book+a+lot+thicker+than+most+%22guide%22+references.%0A%0AI+do+agree+with+others+that+this+book+could+use+a+few+more+examples%2C+especially+near+the+end+when+discussing+JavaScript+usage+with+new+HTML5+APIs.++If+you%27re+looking+for+an+in-depth+understanding+of+the+core+functionality+of+JavaScript%2C+this+is+the+book.++It+has+helped+me+in+numerous+job+interviews%21%28legalese%29&amp;tags=Review%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2011/11/my-review-of-javascript-the-definitive-guide-6th-edition/</feedburner:origLink></item>
		<item>
		<title>jQuery plugin: fixed table header</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/Y58DdgKV4do/</link>
		<comments>http://www.ipreferjim.com/2011/10/jquery-plugin-fixed-table-header/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 12:27:57 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=714</guid>
		<description><![CDATA[Here's a plugin that I wrote a while ago for fixing a table's header row on scroll. This code is also available as a gist. Fork it and contribute. A demo:]]></description>
			<content:encoded><![CDATA[<p>Here's a plugin that I wrote a while ago for fixing a table's header row on scroll.</p>
<p>This code is also available <a href="https://gist.github.com/1047086" title="gist.github.com">as a gist</a>. Fork it and contribute.</p>
<pre class="brush: jscript; title: ; notranslate">
(function($) {
	$.fn.fixedHeader = function(options) {
		var settings = {
			selector: 'thead:first',
			cssClass: 'fixed',
			fixTo: 0
		};

		var _fixHeader = function(obj) {
			var header = $(obj.selector, obj.elem);
			if(header) {
				var parent =  header.parents('table:first') || header.parent();
				(parent &amp;&amp; parent.css({ borderCollapse: 'collapse'}) );

				var data = header.data('fixedHeader') || header.data('fixedHeader', {
						top: header.offset().top,
						width: parent.find('tr:eq(1)').width(),
						cells: parent.find('tr:eq(1) &gt; td'),
						processed: false
					});
				var top = data.top - $(document).scrollTop();
				if( top &lt; 0 ) {
					header.addClass(obj.css);
					if(!data.processed){
						header.width(data.width);
						for(var i = 0; i&lt;data.cells.length;i++) {
							$('th:eq('+i+')', header).width($(data.cells[i]).width());
						}
					}

				} else {
					header.removeClass(obj.css);
				}
			}
		};
		return this.each(function() {
			var self = this;
			if(&quot;object&quot; === typeof options) {
				$.extend(settings, options);
			}
			if($(self).parents('table:first')){
				$(window).bind('scroll.fixedHeader', function() {
					_fixHeader({
						elem: self,
						selector: settings.selector,
						css: settings.cssClass,
						top: settings.fixTo
					});
				});
			}
		});
	};
})(jQuery);
</pre>
<p>A demo:<br />
<iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/jimschubert/RMsqJ/1/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=714&amp;md5=96ca3d1b7fa93e8c5ad55a7ac7abb1ac" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/QnFh7192wYPR5_r85SQDt2R9sEU/0/da"><img src="http://feedads.g.doubleclick.net/~a/QnFh7192wYPR5_r85SQDt2R9sEU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QnFh7192wYPR5_r85SQDt2R9sEU/1/da"><img src="http://feedads.g.doubleclick.net/~a/QnFh7192wYPR5_r85SQDt2R9sEU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/Y58DdgKV4do" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2011/10/jquery-plugin-fixed-table-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2011%2F10%2Fjquery-plugin-fixed-table-header%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=jQuery+plugin%3A+fixed+table+header&amp;description=Here%27s+a+plugin+that+I+wrote+a+while+ago+for+fixing+a+table%27s+header+row+on+scroll.%0D%0A%0D%0AThis+code+is+also+available+as+a+gist.+Fork+it+and+contribute.%0D%0A%0D%0A%5Bjs%5D%0D%0A%28function%28%24%29+%7B+%0D%0A%09%24.fn.fixedHeader+%3D+function%28options%29+%7B%0D%0A%09%09var+settings+%3D+%7B+%0D%0A%09%09%09selector%3A+%27thead%3Afirst%27%2C%0D%0A%09%09%09cssClass%3A+%27fixed%27%2C%0D%0A%09%09%09fixTo%3A+0%0D%0A%09%09%7D%3B%0D%0A%0D%0A%09%09var+_fixHeader+%3D+function%28obj%29+%7B+%0D%0A%09%09%09var+header+%3D+%24%28obj.selector%2C+obj.elem%29%3B%0D%0A%09%09%09if%28header%29+%7B%0D%0A%09%09%09%09var+parent+%3D++header.parents%28%27table%3Afirst%27%29+%7C%7C+header.parent%28%29%3B%0D%0A%09%09%09%09%28parent+%26amp%3B%26amp%3B+parent.css%28%7B+borderCollapse%3A+%27collapse%27%7D%29+%29%3B%0D%0A%0D%0A%09%09%09%09var+data+%3D+header.data%28%27fixedHeader%27%29+%7C%7C+header.data%28%27fixedHeader%27%2C+%7B+%0D%0A%09%09%09%09%09%09top%3A+header.offset%28%29.top%2C%0D%0A%09%09%09%09%09%09width%3A+parent.find%28%27tr%3Aeq%281%29%27%29.width%28%29%2C%0D%0A%09%09%09%09%09%09cells%3A+parent.find%28%27tr%3Aeq%281%29+%26gt%3B+td%27%29%2C%0D%0A%09%09%09%09%09%09processed%3A+false%0D%0A%09%09%09%09%09%7D%29%3B%0D%0A%09%09%09%09var+top+%3D+data.top+-+%24%28document%29.scrollTop%28%29%3B%0D%0A%09%09%09%09if%28+top+%26lt%3B+0+%29+%7B%0D%0A%09%09%09%09%09header.addClass%28obj.css%29%3B%09%0D%0A%09%09%09%09%09if%28%21data.processed%29%7B%0D%0A%09%09%09%09%09%09header.width%28data.width%29%3B%0D%0A%09%09%09%09%09%09for%28var+i+%3D+0%3B+i%26lt%3Bdata.cells.length%3Bi%2B%2B%29+%7B%0D%0A%09%09%09%09%09%09%09%24%28%27th%3Aeq%28%27%2Bi%2B%27%29%27%2C+header%29.width%28%24%28data.cells%5Bi%5D%29.width%28%29%29%3B%0D%0A%09%09%09%09%09%09%7D%0D%0A%09%09%09%09%09%7D%0D%0A%0D%0A%09%09%09%09%7D+else+%7B+%0D%0A%09%09%09%09%09header.removeClass%28obj.css%29%3B+%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%09%09%0D%0A%09%09%7D%3B%0D%0A%09%09return+this.each%28function%28%29+%7B%0D%0A%09%09%09var+self+%3D+this%3B%0D%0A%09%09%09if%28%26quot%3Bobject%26quot%3B+%3D%3D%3D+typeof+options%29+%7B%0D%0A%09%09%09%09%24.extend%28settings%2C+options%29%3B%0D%0A%09%09%09%7D%0D%0A%09%09%09if%28%24%28self%29.parents%28%27table%3Afirst%27%29%29%7B%0D%0A%09%09%09%09%24%28window%29.bind%28%27scroll.fixedHeader%27%2C+function%28%29+%7B%0D%0A%09%09%09%09%09_fixHeader%28%7B+%0D%0A%09%09%09%09%09%09elem%3A+self%2C%0D%0A%09%09%09%09%09%09selector%3A+settings.selector%2C%0D%0A%09%09%09%09%09%09css%3A+settings.cssClass%2C%0D%0A%09%09%09%09%09%09top%3A+settings.fixTo%0D%0A%09%09%09%09%09%7D%29%3B%0D%0A%09%09%09%09%7D%29%3B%0D%0A%09%09%09%7D%0D%0A%09%09%7D%29%3B%0D%0A%09%7D%3B%0D%0A%7D%29%28jQuery%29%3B%0D%0A%5B%2Fjs%5D%0D%0A%0D%0AA+demo%3A%0D%0A&amp;tags=github%2CJavascript%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2011/10/jquery-plugin-fixed-table-header/</feedburner:origLink></item>
		<item>
		<title>Mercurial and Git in one repository</title>
		<link>http://feedproxy.google.com/~r/ipreferjim/~3/-DS7liaBkII/</link>
		<comments>http://www.ipreferjim.com/2011/10/mercurial-and-git-in-one-repository/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 22:07:53 +0000</pubDate>
		<dc:creator>jimschubert</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ipreferjim.com/?p=704</guid>
		<description><![CDATA[I have a personal project hosted at bitbucket using Mercurial as the version control system. Since I started that project, I've been using GitHub for everything. I just found hg-git instructions on github.com. It is pretty awesome. For my purposes, it allows me to maintain the project on two remote servers, one running Mercurial, the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a personal project hosted at bitbucket using Mercurial as the version control system.  Since I started that project, I've been using GitHub for everything.  I just found <a href="http://hg-git.github.com/" title="hg-git instructions on GitHub">hg-git</a> instructions on github.com.  It is pretty awesome.</p>
<p>For my purposes, it allows me to maintain the project on two remote servers, one running Mercurial, the other running Git.</p>
<p>To see how it works, first install hg-git:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo easy_install hg-git
</pre>
<p>Then, edit your <em>~/.hgrc</em> settings, adding to the [extensions] section:</p>
<pre class="brush: plain; title: ; notranslate">
[extensions]
hgext.bookmarks =
hggit =
</pre>
<p>Also, be sure your <em>~/.hgrc</em> contains a valid email address:</p>
<pre class="brush: plain; title: ; notranslate">
[ui]
username = Jim Schubert &lt;james.schubert@gmail.com&gt;
</pre>
<p>Now, you can create a repository on github.com and push your Mercurial commits:</p>
<pre class="brush: bash; title: ; notranslate">
$ cd ~/projects/project_name
$ hg bookmark -r default master
$ hg push git+ssh://git@github.com/username/project_name.git
$ hg push
</pre>
<p>If you're only planning on using Mercurial to push changes to github or some other Git host, you can add that path to <em>~/.hgrc</em>:</p>
<pre class="brush: plain; title: ; notranslate">
[paths]
default-push = git+ssh://git@github.com/username/project_name.git
</pre>
 <p><a href="http://www.ipreferjim.com/site/?flattrss_redirect&amp;id=704&amp;md5=3f7393485ceee6f56118a9d27ba27b31" title="Flattr" target="_blank"><img src="http://www.ipreferjim.com/site/wp-content/plugins/flattr/img/flattr-badge-large.png?84cd58" alt="flattr this!"/></a></p>
<p><a href="http://feedads.g.doubleclick.net/~a/3PA2ukrncERIlnwipsMBbbZopB8/0/da"><img src="http://feedads.g.doubleclick.net/~a/3PA2ukrncERIlnwipsMBbbZopB8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3PA2ukrncERIlnwipsMBbbZopB8/1/da"><img src="http://feedads.g.doubleclick.net/~a/3PA2ukrncERIlnwipsMBbbZopB8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/ipreferjim/~4/-DS7liaBkII" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ipreferjim.com/2011/10/mercurial-and-git-in-one-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=jimschubert&amp;url=http%3A%2F%2Fwww.ipreferjim.com%2F2011%2F10%2Fmercurial-and-git-in-one-repository%2F&amp;hidden=true&amp;language=en_GB&amp;category=text&amp;title=Mercurial+and+Git+in+one+repository&amp;description=I+have+a+personal+project+hosted+at+bitbucket+using+Mercurial+as+the+version+control+system.++Since+I+started+that+project%2C+I%27ve+been+using+GitHub+for+everything.++I+just+found+hg-git+instructions+on+github.com.++It+is+pretty+awesome.%0D%0A%0D%0AFor+my+purposes%2C+it+allows+me+to+maintain+the+project+on+two+remote+servers%2C+one+running+Mercurial%2C+the+other+running+Git.%0D%0A%0D%0ATo+see+how+it+works%2C+first+install+hg-git%3A%0D%0A%0D%0A%5Bbash%5D%0D%0A%24+sudo+easy_install+hg-git%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AThen%2C+edit+your+%7E%2F.hgrc+settings%2C+adding+to+the+%5Bextensions%5D+section%3A%0D%0A%5Bplain%5D%0D%0A%5Bextensions%5D++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%0D%0Ahgext.bookmarks+%3D%0D%0Ahggit+%3D%0D%0A%5B%2Fplain%5D%0D%0A%0D%0AAlso%2C+be+sure+your+%7E%2F.hgrc+contains+a+valid+email+address%3A%0D%0A%5Bplain%5D%0D%0A%5Bui%5D%0D%0Ausername+%3D+Jim+Schubert+%26lt%3Bjames.schubert%40gmail.com%26gt%3B%0D%0A%5B%2Fplain%5D%0D%0A%0D%0ANow%2C+you+can+create+a+repository+on+github.com+and+push+your+Mercurial+commits%3A%0D%0A%0D%0A%5Bbash%5D%0D%0A%24+cd+%7E%2Fprojects%2Fproject_name%0D%0A%24+hg+bookmark+-r+default+master%0D%0A%24+hg+push+git%2Bssh%3A%2F%2Fgit%40github.com%2Fusername%2Fproject_name.git%0D%0A%24+hg+push%0D%0A%5B%2Fbash%5D%0D%0A%0D%0AIf+you%27re+only+planning+on+using+Mercurial+to+push+changes+to+github+or+some+other+Git+host%2C+you+can+add+that+path+to+%7E%2F.hgrc%3A%0D%0A%0D%0A%5Bplain%5D%0D%0A%5Bpaths%5D%0D%0Adefault-push+%3D+git%2Bssh%3A%2F%2Fgit%40github.com%2Fusername%2Fproject_name.git%0D%0A%5B%2Fplain%5D&amp;tags=github%2Clinux%2Cblog" type="text/html" />
	<feedburner:origLink>http://www.ipreferjim.com/2011/10/mercurial-and-git-in-one-repository/</feedburner:origLink></item>
	</channel>
</rss><!-- Served from: www.ipreferjim.com @ 2012-02-22 21:50:34 by W3 Total Cache -->

