<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>somethingkindawierd</title>
	
	<link>http://somethingkindawierd.com/blog</link>
	<description />
	<lastBuildDate>Mon, 26 Sep 2011 15:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/somethingkindawierd" /><feedburner:info uri="somethingkindawierd" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Improve VIM Tips Wiki</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/7or2YFsyUcY/</link>
		<comments>http://somethingkindawierd.com/blog/software/09/2011/improve-vim-tips-wiki/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 15:47:49 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1232</guid>
		<description><![CDATA[The ads on vim&#8217;s tips wiki are super annoying and distracting, and sometimes quite vulgar/risque. I don&#8217;t want to see video ads when I&#8217;m trying to solve a programming problem. Here&#8217;s how I fixed wikia in Google Chrome: Get the &#8220;Personalized Web Options&#8221; plugin. Match the url ^http://vim.wikia.com/ Check &#8220;Try to prevent web pages from [...]]]></description>
			<content:encoded><![CDATA[<p>The ads on <a href="http://vim.wikia.com/" title="vim's tips wiki">vim&#8217;s tips wiki</a> are <strong><em>super</em></strong> annoying and distracting, and sometimes quite vulgar/risque. I don&#8217;t want to see video ads when I&#8217;m trying to solve a programming problem.</p>

<p>Here&#8217;s how I fixed wikia in Google Chrome:</p>

<ol>
<li>Get the <a href="https://chrome.google.com/webstore/detail/plcnnpdmhobdfbponjpedobekiogmbco">&#8220;Personalized Web Options&#8221; plugin</a>.</li>
<li>Match the url <code>^http://vim.wikia.com/</code></li>
<li>Check &#8220;Try to prevent web pages from injecting &#8230; <code>document.write()</code> calls.&#8221;</li>
<li>Add the following CSS</li>
</ol>

<p>CSS to fix http://vim.wikia.com/</p>

<pre><code>    .WikiaMainContent { width: 100%; }
    .WikiaRail,
    #WikiaArticleBottomAd,
    #TOP_LEADERBOARD,
    #WikiaFooter,
    .sponsorwrapper { display: none; }
</code></pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=7or2YFsyUcY:8iDsxiCkZ_o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=7or2YFsyUcY:8iDsxiCkZ_o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=7or2YFsyUcY:8iDsxiCkZ_o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=7or2YFsyUcY:8iDsxiCkZ_o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=7or2YFsyUcY:8iDsxiCkZ_o:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/7or2YFsyUcY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/software/09/2011/improve-vim-tips-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/software/09/2011/improve-vim-tips-wiki/</feedburner:origLink></item>
		<item>
		<title>Shrink from what might offend…</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/vRxWYwP_k4M/</link>
		<comments>http://somethingkindawierd.com/blog/spiritual/08/2011/shrink-from-what-might-offend%e2%80%a6/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 15:48:34 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Spiritual]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1224</guid>
		<description><![CDATA[I came across a very familiar passage in the Bible today, from Philippians 2:12. From the NIV it reads: 12 Therefore, my dear friends, as you have always obeyed—not only in my presence, but now much more in my absence—continue to work out your salvation with fear and trembling This is very familiar to me, [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a very familiar passage in the Bible today, from Philippians 2:12. From the NIV it reads:</p>

<blockquote>
  <p><sup>12</sup> Therefore, my dear friends, as you have always obeyed—not only in my presence, but now much more in my absence—continue to work out your salvation with fear and trembling</p>
</blockquote>

<p>This is very familiar to me, and chances are if you&#8217;ve been around the Bible for more than a few days you&#8217;ve come across it too. For some reason I decided to check it out in another version and I was surprised to find this in the Amplified translation:</p>

<blockquote>
  <p><sup>12</sup> Therefore, my dear ones, as you have always obeyed [my suggestions], so now, not only [with the enthusiasm you would show] in my presence but much more because I am absent, work out (cultivate, carry out to the goal, and fully complete) your own salvation with reverence and awe and trembling (self-distrust, with serious caution, tenderness of conscience, watchfulness against temptation, timidly shrinking from whatever might offend God and discredit the name of Christ).</p>
</blockquote>

<p>What caught my attention is how it amplified &#8220;trembling&#8221; to mean &#8220;self-distrust, with serious caution, tenderness of conscience, watchfulness against temptation, timidly shrinking from whatever might offend God and discredit the name of Christ.&#8221;</p>

<p>I&#8217;d love for people to remember me as someone who timidly shrinks from anything offending God and discrediting the name of Christ.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=vRxWYwP_k4M:pynx87I3L70:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=vRxWYwP_k4M:pynx87I3L70:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=vRxWYwP_k4M:pynx87I3L70:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=vRxWYwP_k4M:pynx87I3L70:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=vRxWYwP_k4M:pynx87I3L70:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/vRxWYwP_k4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/spiritual/08/2011/shrink-from-what-might-offend%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/spiritual/08/2011/shrink-from-what-might-offend%e2%80%a6/</feedburner:origLink></item>
		<item>
		<title>Fighting Germans with Web Apps</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/YQ6_L9GZ5-A/</link>
		<comments>http://somethingkindawierd.com/blog/web-development/07/2011/fighting-germans-with-web-apps/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 18:42:20 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[office]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1202</guid>
		<description><![CDATA[My boss likes using WWII analogies when describing our work. Today we&#8217;re in Africa, fighting Rommel in the Desert.]]></description>
			<content:encoded><![CDATA[<p><img src="http://somethingkindawierd.com/blog/wp-content/uploads/2011/07/bundesarchiv_bild_101ir0gu.jpg" alt="" title="Nordafrika, Rommel u. Generalmajor v. Bismarck" width="800" height="530" class="aligncenter size-full wp-image-1203" /></p>

<p>My boss likes using WWII analogies when describing our work. Today we&#8217;re in Africa, fighting Rommel in the Desert.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=YQ6_L9GZ5-A:iZsYO6MKbGI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=YQ6_L9GZ5-A:iZsYO6MKbGI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=YQ6_L9GZ5-A:iZsYO6MKbGI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=YQ6_L9GZ5-A:iZsYO6MKbGI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=YQ6_L9GZ5-A:iZsYO6MKbGI:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/YQ6_L9GZ5-A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/web-development/07/2011/fighting-germans-with-web-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/web-development/07/2011/fighting-germans-with-web-apps/</feedburner:origLink></item>
		<item>
		<title>Is the University of Phoenix a scam?</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/KRYdUusMcco/</link>
		<comments>http://somethingkindawierd.com/blog/thoughts/03/2011/is-the-university-of-phoenix-a-scam/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 01:11:40 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1175</guid>
		<description><![CDATA[In an unfortunate turn of events, my wife (who&#8217;s a straight-A student) was booted from her masters program. She&#8217;s been diligently following up with her UoP mentor and the lead teacher (who&#8217;s responsible for failing her from Portfolio II). It raises some very serious concerns. How can a school remove a straight-A student from their [...]]]></description>
			<content:encoded><![CDATA[<p>In an unfortunate turn of events, my wife (who&#8217;s a straight-A student) was <a href="http://christinabeebe.wordpress.com/2011/03/21/portfolio-ii-mishap/" title="Blog about UoP student fighting for rights.">booted from her masters program</a>. She&#8217;s been diligently following up with her UoP mentor and the lead teacher (<a href="http://christinabeebe.wordpress.com/2011/03/22/portfolio-ii-mishap-conversation-with-professor/" title="Straight A sudent kicked out of University of Phoenix!">who&#8217;s responsible for failing her from Portfolio II</a>).</p>

<p>It raises some very serious concerns. How can a school remove a straight-A student from their program? And how can we take the University of Phoenix seriously when their commentary on their decision directly contradicts the comments of my wife&#8217;s previous professors?</p>

<p>I hope and pray that this gets resolved. Meanwhile we can all follow the journey on my <a href="http://christinabeebe.wordpress.com/" title="Christina Beebe's blog about University of Phoenix Scam">wife&#8217;s blog</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=KRYdUusMcco:ctd4RwCmnSI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=KRYdUusMcco:ctd4RwCmnSI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=KRYdUusMcco:ctd4RwCmnSI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=KRYdUusMcco:ctd4RwCmnSI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=KRYdUusMcco:ctd4RwCmnSI:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/KRYdUusMcco" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/thoughts/03/2011/is-the-university-of-phoenix-a-scam/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/thoughts/03/2011/is-the-university-of-phoenix-a-scam/</feedburner:origLink></item>
		<item>
		<title>I wish I’d read this 15 years ago…</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/5mAglDZ_SaQ/</link>
		<comments>http://somethingkindawierd.com/blog/thoughts/02/2011/i-wish-id-read-this-15-years-ago/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 20:50:40 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1160</guid>
		<description><![CDATA[&#8220;Formal education is merely a biased entitiy designed to propagate favoured ideas. Few teach how to think rationally, but instead teach us to rely on indoctrination and memorization. Consequently, formal education has handed down, from one generation to the next, theories which not only clash with the reality of events, but insure confusion for decades [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>&#8220;Formal education is merely a biased entitiy designed to propagate favoured ideas. Few teach how to think rationally, but instead teach us to rely on indoctrination and memorization. Consequently, formal education has handed down, from one generation to the next, theories which not only clash with the reality of events, but insure confusion for decades to come.&#8221;</p>
</blockquote>

<p>&mdash; Martin Armstrong in <em>The Final Confrontation, a bewildered central bank</em>, 1988. Accessed from <a href="http://www.martinarmstrong.org/files/Tipping%20Point%202-3-2011.pdf"><em>The Tipping Point</em></a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=5mAglDZ_SaQ:fIrA4s2OdUs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=5mAglDZ_SaQ:fIrA4s2OdUs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=5mAglDZ_SaQ:fIrA4s2OdUs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=5mAglDZ_SaQ:fIrA4s2OdUs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=5mAglDZ_SaQ:fIrA4s2OdUs:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/5mAglDZ_SaQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/thoughts/02/2011/i-wish-id-read-this-15-years-ago/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/thoughts/02/2011/i-wish-id-read-this-15-years-ago/</feedburner:origLink></item>
		<item>
		<title>draw.txt</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/qC0xFZ1rsII/</link>
		<comments>http://somethingkindawierd.com/blog/web-development/12/2010/draw-txt-2/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 01:20:26 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1129</guid>
		<description><![CDATA[This is something that&#8217;ll mostly interest web-developers, programmers, and those that geek-out over strange uses of technology. In an effort to learn the finer aspects of the Mootools javascript library, I coded draw.txt, an application that lets you draw a text document. Kinda geeky. But also kinda cool! It draws shapes, has complete layer-order control, [...]]]></description>
			<content:encoded><![CDATA[<p>This is something that&#8217;ll mostly interest web-developers, programmers, and those that geek-out over strange uses of technology.</p>

<p>In an effort to learn the finer aspects of the <a title="Mootools javascript library" href="http://mootools.net/">Mootools javascript library</a>, I coded <a title="Draw a text document!" href="http://somethingkindawierd.github.com/draw.txt/">draw.txt</a>, an application that lets you <em>draw</em> a text document.</p>

<p><span id="more-1129"></span></p>

<div id="attachment_1133" class="wp-caption aligncenter" style="width: 770px"><a href="http://somethingkindawierd.com/blog/wp-content/uploads/2010/12/screenshot.png"><img class="size-full wp-image-1133" title="Screenshot of Jon Beebe's draw.txt web application" src="http://somethingkindawierd.com/blog/wp-content/uploads/2010/12/screenshot.png" alt="Screenshot of Jon Beebe's draw.txt web application" width="760" height="302" /></a><p class="wp-caption-text">Screenshot of Jon Beebe&#39;s draw.txt web application in action.</p></div>

<p>Kinda geeky. But also kinda cool! It draws shapes, has complete layer-order control, and an unlimited history for your undo/redo satisfaction.</p>

<p>Check out the <a title="Test out Jon Beebe's draw.txt web app." href="http://somethingkindawierd.github.com/draw.txt/demo/index.html">draw.txt demo here</a>, and <a title="Find draw.txt on github" href="http://github.com/somethingkindawierd/draw.txt">fork draw.txt on github</a>.</p>

<p>ps. Thank you <a title="Thank you Mootools for an amazing javascript library" href="http://mootools.net/">Mootools</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=qC0xFZ1rsII:E5K7geR_msw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=qC0xFZ1rsII:E5K7geR_msw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=qC0xFZ1rsII:E5K7geR_msw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=qC0xFZ1rsII:E5K7geR_msw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=qC0xFZ1rsII:E5K7geR_msw:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/qC0xFZ1rsII" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/web-development/12/2010/draw-txt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/web-development/12/2010/draw-txt-2/</feedburner:origLink></item>
		<item>
		<title>Javascript Getters and Setters</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/4uCMIewvkOo/</link>
		<comments>http://somethingkindawierd.com/blog/web-development/10/2010/javascript-getters-and-setters/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 04:13:10 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1105</guid>
		<description><![CDATA[I&#8217;m working on a javascript project that requires the use of a language feature I&#8217;ve yet to use: getters and setters. When trying to implement them I quickly ran into an age-old snafu: web-browsers are consistently inconsistent in their feature implementations. The Problem The two most helpful discussions on javascript getters and setters come from John [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a javascript project that requires the use of a language feature I&#8217;ve yet to use: getters and setters. When trying to implement them I quickly ran into an age-old snafu: web-browsers are consistently inconsistent in their feature implementations.</p>

<h2>The Problem</h2>

<p>The two most helpful discussions on javascript getters and setters come from <a href="http://ejohn.org/blog/javascript-getters-and-setters/">John Resig</a> and <a href="http://robertnyman.com/2009/05/28/getters-and-setters-with-javascript-code-samples-and-demos/">Robert Nyman</a>. You&#8217;ll quickly learn when using getters and setters they are <a href="http://robertnyman.com/javascript/#javascript-getters-setters-object-defineproperty-compatibility">not defined the same</a> in every browser. Here&#8217;s a brief summary of browser capabilities relevant to my research:</p>

<ul>
    <li>Mozilla uses legacy <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Objects#Defining_Getters_and_Setters">prototype.__defineGetter__ and prototype.__defineSetter__</a> methods (FireFox 4 <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty">will have Object.defineProperty(&#8230;)</a> .)</li>
    <li>IE 8 chose not to implement the legacy Mozilla methods, but <a href="http://blogs.msdn.com/b/ie/archive/2009/01/13/responding-to-change-updated-getter-setter-syntax-in-ie8-rc-1.aspx">wisely decided to implement the ECMA standard</a> Object.defineProperty(&#8230;) method, however it does not work for anything other that DOM elements, so you cannot apply it to javascript objects or functions, yet.</li>
    <li>All WebKit browsers (Chrome, Safari) allow for the legacy Mozilla methods.</li>
    <li>Chrome adds the Object.defineProperty method on javascript objects as well.</li>
</ul>

<p>What&#8217;d I tell ya? The world of a web-developer, consistently inconsistent.</p>

<h2>The Solution</h2>

<p>I like the convenience of every object having a common interface (such as Object.defineProperty) so I added a bit of Object.prototype sugar.</p>

<pre><code>/**
 * A generic way to define a getter/setter for
 * objects in both the legacy Mozilla way and the new ECMA standard way,
 * which should work in I.E. with DOM Elements, but not js objects.
 *
 * more info on javascript getters and setters:
 * John Resig: http://bit.ly/resig-js-gs-2007
 * Robert Nyman: http://bit.ly/nyman-js-gs-2009
 *
 * @author somethingkindawierd@gmail.com (Jon Beebe)
 * @param {string} label The property name to get/set.
 * @param {function} getter The get function.
 * @param {function} setter The set function.
 */
Object.prototype.addProperty = function(label, getter, setter) {

  if (Object.defineProperty) {
    Object.defineProperty(
        this,
        label,
        {
          get: getter,
          set: setter
        }
    );
  }
  else {
    if (getter) {
      this.__defineGetter__(label, getter);
    }
    if (setter) {
      this.__defineSetter__(label, setter);
    }
  }

};

/**
 * A generic way to define a group of getters/setters for objects
 *
 * @author somethingkindawierd@gmail.com (Jon Beebe)
 * @param {object} p Set of properties and their getter/setter methods.
 */
Object.prototype.addProperties = function(p) {

  for (var label in p) {
    if (p.hasOwnProperty(label)) {
      this.addProperty(label, p[label].get, p[label].set);
    }
  }

};
</code></pre>

<p>With these methods in place we can now add new getters and setters to our objects or functions using code like this:</p>

<pre><code>var Base = function(x, y) {

  // Private properties
  var x_,
      y_;

  // Define our getters and setters
  this.addProperties({
    x: {
      get: function() {
        return x_;
      },
      set: function(val) {
        x_ = val;
      }
    },
    y: {
      get: function() {
        return y_;
      },
      set: function(val) {
        y_ = val;
      }
    }
  });

  // more code here as necessary ...

};

// add to the Base.prototype here
</code></pre>

<p>The entire solution can be <a title="Jon Beebe's research into javascript inheritance and use of getters and setters." href="http://github.com/somethingkindawierd/javascript-inheritance">found on github</a> as part of my research on object oriented javascript and inheritance patterns. Please feel free to peruse the code, use it as needed, and if you have a suggestion or bug-fix, fork it!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=4uCMIewvkOo:d05egV3cNc4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=4uCMIewvkOo:d05egV3cNc4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=4uCMIewvkOo:d05egV3cNc4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=4uCMIewvkOo:d05egV3cNc4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=4uCMIewvkOo:d05egV3cNc4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/4uCMIewvkOo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/web-development/10/2010/javascript-getters-and-setters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/web-development/10/2010/javascript-getters-and-setters/</feedburner:origLink></item>
		<item>
		<title>Fix Ubuntu 10.04 popping sound on MacBook</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/NJj-C0Oe9Ho/</link>
		<comments>http://somethingkindawierd.com/blog/computers/linux-computers/10/2010/fix-ubuntu-10-04-popping-sound-on-macbook/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 15:57:45 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=1043</guid>
		<description><![CDATA[If you&#8217;re running Ubuntu 9.10 or 10.04 on your MacBook you&#8217;ve probably experienced that odd popping sound eminating from the speakers when playing music or video. I&#8217;ve found for my MacBook 2,1 changing the selected device profile in the sound preferences permanently fixed this issue. Now I have crisp, clear surround sound as expected. Go [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running Ubuntu 9.10 or 10.04 on your MacBook you&#8217;ve probably experienced that odd popping sound eminating from the speakers when playing music or video.</p>

<p>I&#8217;ve found for my MacBook 2,1 changing the selected device profile in the sound preferences permanently fixed this issue. Now I have crisp, clear surround sound as expected.</p>

<p>Go to System → Prefences → Sound → Hardware (tab)</p>

<p>The Profile selection was defaulted to  &#8221;Analogue Stereo Duplex&#8221;. I changed this to &#8220;Analog Surround 4.0 Output&#8221; and the sound cleared up. And an added bonus: I now have control over the fading between front and rear surround settings.</p>

<div id="attachment_1046" class="wp-caption aligncenter" style="width: 590px"><img class="size-full wp-image-1046 " title="Fix popping sound on Ubuntu MacBook" src="http://somethingkindawierd.com/blog/wp-content/uploads/2010/10/Selection_004.png" alt="Change sound settings to Analog Surround 4.0 Output to fix popping sound in Ubuntu on MacBook" width="580" height="618" /><p class="wp-caption-text">Change sound settings to &quot;Analog Surround 4.0 Output&quot; to fix popping sound in Ubuntu on MacBook</p></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=NJj-C0Oe9Ho:m-fEv23LUnM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=NJj-C0Oe9Ho:m-fEv23LUnM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=NJj-C0Oe9Ho:m-fEv23LUnM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=NJj-C0Oe9Ho:m-fEv23LUnM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=NJj-C0Oe9Ho:m-fEv23LUnM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/NJj-C0Oe9Ho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/computers/linux-computers/10/2010/fix-ubuntu-10-04-popping-sound-on-macbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/computers/linux-computers/10/2010/fix-ubuntu-10-04-popping-sound-on-macbook/</feedburner:origLink></item>
		<item>
		<title>My first github project!</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/UOcHqfV3-SM/</link>
		<comments>http://somethingkindawierd.com/blog/software/07/2010/my-first-github-project/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 02:00:11 +0000</pubDate>
		<dc:creator>jon beebe</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://somethingkindawierd.com/blog/?p=872</guid>
		<description><![CDATA[Dynamic page head Over the past few years I&#8217;ve had a need for dynamically adding/modifying the html &#60;head&#62; element as php builds pages. I created a singleton object for this purpose, and I&#8217;ve finally massaged the code to a point where it&#8217;s ready to release into the wild. My dynamic page head class comes with some [...]]]></description>
			<content:encoded><![CDATA[<h1>Dynamic page head</h1>

<p><a href="http://github.com/somethingkindawierd/dynamic-page-head"><img class="alignright size-full wp-image-885" title="github-logo" src="http://somethingkindawierd.com/blog/wp-content/uploads/2010/07/github-logo.png" alt="" width="123" height="60" /></a>Over the past few years I&#8217;ve had a need for dynamically adding/modifying the html &lt;head&gt; element as php builds pages. I created a singleton object for this purpose, and I&#8217;ve finally massaged the code to a point where it&#8217;s ready to release into the wild. <a title="Jon Beebe's dynamic html head generator written in php" href="http://github.com/somethingkindawierd/dynamic-page-head" target="_blank">My dynamic page head class</a> comes with some convenient features such as:</p>

<ul>
    <li>Add linked js/css and inline scripts and styles</li>
    <li>Optionally render javascript to the bottom of the DOM, as <a title="Place javascript at the bottom of your html page for better percieved performance" href="http://developer.yahoo.com/performance/rules.html#js_bottom" target="_blank">Yahoo&#8217;s YSlow recommends</a></li>
    <li>Merge files together, reducing requests to the server</li>
    <li>Minimize css with <a title="CSSTidy, a css minification tool written in php" href="http://csstidy.sourceforge.net/" target="_blank">csstidy</a> or <a title="Learn more about Yahoo's javascript and css compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor</a></li>
    <li>Minimize javascript with <a title="JSMin, a javascript minification tool written in php" href="http://github.com/rgrove/jsmin-php/" target="_blank">jsmin</a> or <a title="Learn more about Yahoo's javascript and css compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor</a></li>
    <li>Optionally include/exclude any css or js asset from merging/minimization
<ul>
    <li>This is useful when including items such as TinyMCE, which uses javascript to include other assets. Minimization will break relative references to these items because the TinyMCE script will, mosty likely, not live in the same directory once minimized.</li>
</ul>
</li>
    <li>Convenience functions for certain items such as nocache metadata</li>
    <li>Operate in xhtml (default) or html mode, rendering valid markup for either</li>
</ul>

<p><a title="Try out Jon Beebe's php generator for an html head element" href="http://github.com/somethingkindawierd/dynamic-page-head" target="_blank">Check it out at github</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=UOcHqfV3-SM:4zvpH4uVNWw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=UOcHqfV3-SM:4zvpH4uVNWw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=UOcHqfV3-SM:4zvpH4uVNWw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=UOcHqfV3-SM:4zvpH4uVNWw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=UOcHqfV3-SM:4zvpH4uVNWw:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/UOcHqfV3-SM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/software/07/2010/my-first-github-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/software/07/2010/my-first-github-project/</feedburner:origLink></item>
		<item>
		<title>Battery always 0% in Ubuntu 10.04</title>
		<link>http://feedproxy.google.com/~r/somethingkindawierd/~3/eS1um2yMrXc/</link>
		<comments>http://somethingkindawierd.com/blog/computers/05/2010/battery-always-0-in-ubuntu-10-04/#comments</comments>
		<pubDate>Wed, 19 May 2010 02:20:06 +0000</pubDate>
		<dc:creator>ubuntu productivity</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[battery]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[power management]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.somethingkindawierd.com/blog/?p=835</guid>
		<description><![CDATA[Update, 22 May, 2010. While the fix below was working for a while, it eventually stopped as well. Then I came across this article at Apple. Evidently, when the battery reports 0%, it is a hardware error and the System Management Controller must be reset. It&#8217;s quite simple: Shutdown your laptop Take out the battery [...]]]></description>
			<content:encoded><![CDATA[<p>Update, 22 May, 2010. While the fix below was working for a while, it eventually stopped as well. Then I came across <a href="http://support.apple.com/kb/HT3964?viewlocale=en_US">this article at Apple</a>. Evidently, when the battery reports 0%, it is a hardware error and the System Management Controller must be reset. It&#8217;s quite simple:<span id="more-855"></span></p>

<ol>
    <li>Shutdown your laptop</li>
    <li>Take out the battery and remove the A.C.</li>
    <li>Hold down the power button for  seconds.</li>
</ol>

<hr />

<p>I recently had an issue where Ubuntu 10.04 stopped tracking my battery&#8217;s charge — it always reported 0% and would run the battery down until it died. Not a big problem…except that it never notified the computer to hibernate when the battery was critically low…no different than yanking the power cord out of a desktop!</p>

<p><a title="Macbook battery always shows 0% in Ubuntu 10.04 " href="http://ubuntuforums.org/showthread.php?t=1469819">A post at the Ubuntu Forums</a> clued me into the problem: upowerd was crashing.</p>

<p>So the solution was simple&#8230;start upower again. By adding upower as a startup item the problem was fixed :)</p>

<p>Go to System → Preferences → Startup Applications and click add. Then type &#8216;upower&#8217; as the command. Here&#8217;s a screenshot of my Startup Items:</p>

<div id="attachment_836" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.somethingkindawierd.com/blog/wp-content/uploads/2010/05/Selection_001.png"><img class="size-medium wp-image-836" title="Custom Ubuntu Startup Item" src="http://www.somethingkindawierd.com/blog/wp-content/uploads/2010/05/Selection_001-300x279.png" alt="Adding a custom startup item to Ubuntu" width="300" height="279" /></a><p class="wp-caption-text">Adding a custom startup item to Ubuntu</p></div>

<p></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=eS1um2yMrXc:mPBGGeJy0_Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=eS1um2yMrXc:mPBGGeJy0_Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=eS1um2yMrXc:mPBGGeJy0_Y:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/somethingkindawierd?a=eS1um2yMrXc:mPBGGeJy0_Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/somethingkindawierd?i=eS1um2yMrXc:mPBGGeJy0_Y:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/somethingkindawierd/~4/eS1um2yMrXc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://somethingkindawierd.com/blog/computers/05/2010/battery-always-0-in-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://somethingkindawierd.com/blog/computers/05/2010/battery-always-0-in-ubuntu-10-04/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.126 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-02-05 07:43:05 -->

