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

<channel>
	<title>Advent Digerati</title>
	<atom:link href="http://blog.adventdigerati.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adventdigerati.com</link>
	<description>Where Life meets Geek</description>
	<lastBuildDate>Mon, 26 Jul 2010 00:49:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Get Functional</title>
		<link>http://blog.adventdigerati.com/2010/07/get-functional/</link>
		<comments>http://blog.adventdigerati.com/2010/07/get-functional/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 01:41:44 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=73</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div style=text-align:center;font-style:italic;font-size:14px;">Sorry for the absence, it&#8217;s been a long road getting back here.</p>
<p>I hope you enjoy the ride.</p></div>
<p>Recently I&#8217;ve become fascinated with the concept of functional programming. For several years, I&#8217;ve had friends jump from language to language, but they all seem to settle on the functional side of the fence. &#8220;Why?&#8221; was the inevitable conundrum. For the longest time I couldn&#8217;t understand what it had to offer that you couldn&#8217;t do in other languages. Like most programming phenomena, it was an epiphanic moment that changed the way I looked at programming for the better forever.<br />
<span id="more-73"></span></p>
<h2>Code is Data; Data is Code</h2>
<p>Ok, omgwthbbq does <i>this</i> mean? How is code parseable data? How is data trustable code? For this, I had to rethink my stance on what makes a program an executable, not where the program comes from; it&#8217;s a cart-before-the-horse thing. So what makes a program? A program is executed lines of human-readable text compiled or interpreted but just the same converted into machine code before the processor reads the 1&#8242;s and 0&#8242;s from one stream and pushes a different set of 1&#8242;s and 0&#8242;s into another stream. Who cares how those lines got there. Could be from hand-entry, or it could be from a variable.<br />
<u>Epiphany the First: Who cares where we get code as long as it&#8217;s the right code we need?</u><br />
PHP has this: variable function names, <code lang="php">eval()</code>, <code lang="php">call_user_func()</code>. After you start coding using these patterns, it becomes nearly impossible to think otherwise. All of a sudden, &#8220;Gee, it would be so much easier if we could just tell functionY about functionX without having to teach classB about classA.&#8221; We stop thinking in terms of step-by-grudging-step and into segmented solutions to problems. When we can just <i>pass a function</i> into <code lang="php">functionY</code> of <code lang="php">classB</code>, this problem disappears. <code lang="php">classB</code> doesn&#8217;t have to give one darn about <code lang="php">classA</code>, just that when it needs to, it can use <code lang="php">functionX</code> and the world will keep on spinning.<br />
<u>Epiphany the Second: What data can I trust?</u><br />
Well, you can trust mine, silly! After all, I wrote it. Ah, so data doesn&#8217;t <i>have</i> to come from the user, it&#8217;s just a way of saying the A&#8217;s and underscores I put into the program can be used to reference other parts of the program without explicitly teaching them about each other. Data can come from anywhere, even code; and code can be executed from anything (with the right compiler/interpreter) including data.</p>
<p>Hopefully, this will spawn my first Git repository. Stay tuned for the linky!</p>
<p>[Edit July 7] Instead of a full-fledged repo, I just threw the PHP code up on <a href="http://bit.ly/9pyOh8" title="Gist">gist.github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2010/07/get-functional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy First Birthday!</title>
		<link>http://blog.adventdigerati.com/2009/11/happy-first-birthday/</link>
		<comments>http://blog.adventdigerati.com/2009/11/happy-first-birthday/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:04:44 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=71</guid>
		<description><![CDATA[Well, it&#8217;s been one full year today since I started this blog, and I&#8217;ve got to say that I&#8217;ve achieved exactly what I wanted out of it. It is a place to put my thoughts on technology and how it relates to my life down for the world to see. There&#8217;s been a significant fall-off [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been one full year today since I started this blog, and I&#8217;ve got to say that I&#8217;ve achieved exactly what I wanted out of it. It is a place to put my thoughts on technology and how it relates to my life down for the world to see. There&#8217;s been a significant fall-off of quantity, recently, but the quality of my articles I&#8217;ve always strove to keep at least on par with my most adamant topics. There&#8217;s been some <a href="http://blog.adventdigerati.com/2009/07/theres-an-app-for-that/" title="There's an App For That">humor</a>, <a href="http://blog.adventdigerati.com/2009/04/ms-slices-x-path-to-ribbons/" title="MS Slices XPath to Ribbons">kvetch</a>, and some musings on what being a developer in the real world has <a href="http://blog.adventdigerati.com/2009/03/zen-and-the-art/" title="Zen and The Art">taught</a> me all mixed in along the way.</p>
<p>I hope this next year will afford me more time to write, as I&#8217;ve enjoyed all the comments I&#8217;ve received from you readers. I have plans on documenting and devoting a page on this blog to two new Open Source projects I&#8217;ve written since starting this site; accepting suggestions, comments, and hopefully remarks that they were useful to you.</p>
<p>Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/11/happy-first-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bound and Loving It</title>
		<link>http://blog.adventdigerati.com/2009/11/bound-and-loving-it/</link>
		<comments>http://blog.adventdigerati.com/2009/11/bound-and-loving-it/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 15:32:58 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=69</guid>
		<description><![CDATA[All IDE&#8217;s should have custom keybinding options. For years I&#8217;d lived under the thumb of JCreator and Notepad because all the shortcuts of the then-major (free) IDE&#8217;s were just ridiculous. I would never have guessed what the command for Save All was without a guide. And that&#8217;s what&#8217;s the most retarding: IDE&#8217;s are supposed to [...]]]></description>
			<content:encoded><![CDATA[<p>All IDE&#8217;s should have custom keybinding options. For years I&#8217;d lived under the thumb of JCreator and Notepad because all the shortcuts of the then-major (free) IDE&#8217;s were just ridiculous. I would never have guessed what the command for Save All was without a guide. And that&#8217;s what&#8217;s the most retarding: IDE&#8217;s are supposed to <em>help</em> you write code, not make you spend more time wondering how to do something than getting it done.</p>
<p>I jumped ship to Eclipse for Java development several years ago. It was Free, independent of Sun, and had a plugin architecture. It wasn&#8217;t until some errant day that I fortuitously pressed Ctrl+Shift+c to toggle a line comment. I was floored! Oh, rational and easy keyboard shortcuts, where had you been all my life?! I remember, tied up in some &#8220;Ctrl+Alt+x-tcomment&#8221; command. No longer!</p>
<p>Then, after I began really customizing Eclipse, right around Ganymede, I started tweaking the keybindings to just-suit my likings. I bound Ctrl+Alt+s to Save All, Ctrl+Alt+q to Close All, and Ctrl+Alt+r to Run. It was glorious. My high-school typing teacher told us that two hands on the keyboard will always be faster than a mouse. I&#8217;d have to amend that statement and say that it certainly is, for particular tasks. The key is to bind the right tasks to easy-access shortcuts, and you&#8217;ll never be beaten in a speed-test by a mouse-driven GUI.</p>
<p>Recently, I&#8217;ve again changed loyalties and moved to Netbeans. (Aside: Eclipse was wonderful, and I still have a soft spot in my heart for it, but the explosive memory usage and frequent hangings made it unusable.) It was a tough switch, though. I had tried several years before, and ran into what I considered a major usability problem: lack of multi-key bindings. By the time I was ready to switch, I was almost ready for Emacs. The fact that I could nest actions into multi-key-multi-mask shortcuts was downright awesome! By then, I&#8217;d had intimate exposure to SVN and couldn&#8217;t live without my Ctrl+t-Ctrl+c check-in binding; (&#8220;t&#8221; for &#8220;team&#8221;, &#8220;c&#8221; for &#8220;check-in&#8221;). It wasn&#8217;t until recently that I gave it another shot and am so thankful for the effort. I&#8217;ve discovered an entirely new realm of happiness for an IDE. Assigning and navigating bookmarks takes less than ten seconds and jumping to the declaration of a function to see the actual code, then right back to where you were is easy as Ctrl+d-Alt+Left!</p>
<p>Custom keybindings will save your life, or at least make you twice as productive. Learn them, use them, enjoy them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/11/bound-and-loving-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>the saddle</title>
		<link>http://blog.adventdigerati.com/2009/08/the-saddle/</link>
		<comments>http://blog.adventdigerati.com/2009/08/the-saddle/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 01:25:13 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=65</guid>
		<description><![CDATA[And after a long hiatus, the Prodigal Programmer returns. Well, if only at half-measure. Unfortunately, work has been keeping me and my ever-waking mind occupied learning Django, (which will, undoubtedly, bear the brunt of many a discrediting post in the future), while real life welcomes me back to nights out and trips both across-state and [...]]]></description>
			<content:encoded><![CDATA[<p>And after a long hiatus, the Prodigal Programmer returns. Well, if only at half-measure. Unfortunately, work has been keeping me and my ever-waking mind occupied learning Django, (which will, undoubtedly, bear the brunt of many a discrediting post in the future), while real life welcomes me back to nights out and trips both across-state and up North to the Allegheny National Forest.</p>
<p>I suppose more than anything, I just needed to recharge the batteries, as it were. Being a digerati only allows for so much creative thought to be put into extracurricular activities before you owe it back to what you&#8217;re being paid to do. And, while I absolutely love putting my opinion and my works out to the public, (expect to see at least one post about GitHub and it&#8217;s glory soon), I just realized I didn&#8217;t have the content to keep up with this (or any other) blog. So rather than pollute what I strive to make otherwise a substantial addition to your Google Reader feeds, I&#8217;ve left this smolder.</p>
<p>But having a moment now, I&#8217;m finally in a rejuvenating mood that I believe is worth sharing with all my readers. If you&#8217;re mildly interested, I&#8217;ve had many starts to articles on various topics which I hope to finish: CSS syntax, Django bugs, and an expansive description of an open source project I hope to put on GitHub very soon regarding the new CANVAS HTML element.</p>
<p>In short, I&#8217;m back to writing in the techblogosphere, and I&#8217;m quite happy about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/08/the-saddle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There&#8217;s an App for That</title>
		<link>http://blog.adventdigerati.com/2009/07/theres-an-app-for-that/</link>
		<comments>http://blog.adventdigerati.com/2009/07/theres-an-app-for-that/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 15:13:30 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=62</guid>
		<description><![CDATA[Want to get off at work? There&#8217;s an App for that!]]></description>
			<content:encoded><![CDATA[<p>Want to get off at work? There&#8217;s an <a href="http://gizmodo.com/5295987/myvibe-thighs+on-first-iphone-vibrator-app-approved-by-apple-nsfw" alt="App">App for that</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/07/theres-an-app-for-that/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XTreme Fandom</title>
		<link>http://blog.adventdigerati.com/2009/06/xtreme-fandom/</link>
		<comments>http://blog.adventdigerati.com/2009/06/xtreme-fandom/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 15:22:04 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=58</guid>
		<description><![CDATA[I&#8217;m all-for being a fan and promoting what you believe in, and maybe I&#8217;m taking my purism to an obscene level, but there are just some things that you have to laugh at or else you&#8217;ll go nuts. Last week, Facebook launched vanity URLs, like your MySpace usernames only with &#8220;facebook.com/&#8221; in front of them [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m all-for being a fan and promoting what you believe in, and maybe I&#8217;m taking my purism to an obscene level, but there are just some things that you have to laugh at or else you&#8217;ll go nuts.</p>
<p>Last week, Facebook launched <a href="http://www.techcrunch.com/2009/06/09/you-have-three-days-to-pick-your-facebook-vanity-url/" title="vanity urls">vanity URLs</a>, like your MySpace usernames only with &#8220;facebook.com/&#8221; in front of them and about two years late. Thank God! Now I don&#8217;t have to memorize my 12-digit, numeric user ID and those of my friends. Death to friend codes! (You hear that, Nintendo?)</p>
<p>As someone older than twelve, (which, by the way, twelve year-olds should probably <i>not</i> be allowed to have FB accounts &ndash; there&#8217;s some nasty stuff on there), I&#8217;m not particularly fond of keeping my &#8220;handle&#8221; around for the rest of my life. Being creative is fun, but eventually all dads need to lose the bell-bottom jeans and overly-long mustaches. Now&#8217;s the time of boot-cut and goatees, get with the program!</p>
<p>Some FB users didn&#8217;t get the memo, however; and their loyalties are abundantly &ndash; and permanently &ndash; clear. There are Halo fans, (<a href="http://www.facebook.com/343guiltyspark" title="343 Guilty Spark">[1]</a>, <a href="http://www.facebook.com/john117" title="John 117">[2]</a>), Star Wars junkies, (<a href="http://www.facebook.com/chewie" title="Chewbacca">[1]</a>), and g33k5 in general, (<a href="http://www.facebook.com/default.aspx" title="Default ASPX">[1]</a>), and assholes, (<a href="http://www.facebook.com/obiefernandez" title="Mike Pence">[1]</a>), that abound.</p>
<p>I&#8217;m all for indulgences, but even I don&#8217;t think I could profess my unwavering allegiance to the Horde or play such a practical joke on a friend like that. Way to go, fellas and lady, you&#8217;ve successfully wrought detrimental opinion to the entire community; though you&#8217;ve sure made a great many of us laugh our asses off as well!</p>
<p>(Inspired by <a href="http://www.techcrunch.com/2009/06/13/hands-down-the-best-facebook-vanity-url/" title="TechCrunch">TechCrunch</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/06/xtreme-fandom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS Slices X-Path to Ribbons</title>
		<link>http://blog.adventdigerati.com/2009/04/ms-slices-x-path-to-ribbons/</link>
		<comments>http://blog.adventdigerati.com/2009/04/ms-slices-x-path-to-ribbons/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 04:31:32 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=53</guid>
		<description><![CDATA[Microsoft has a history of creating things that are one-off mainstream, (or Open Source), in what they call an effort of efficiency or a claim to sticking to standards. In reality, they&#8217;ve just muddied the waters for developers looking to make the web more ubiquitous. IE8 continues this misguided charge with Web Slices, a particular [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has a history of creating things that are one-off mainstream, (or Open Source), in what they call an effort of efficiency or a claim to sticking to standards. In reality, they&#8217;ve just muddied the waters for developers looking to make the web more ubiquitous.</p>
<p>IE8 continues this misguided charge with <a href="http://msdn.microsoft.com/en-us/library/cc304073(VS.85).aspx">Web Slices</a>, a particular element of a page which the browser can selectively update asynchronous to the rest of your behavior. In lamens terms, consider it to be RSS on crack. The idea is kind of cool and interesting as a developer: Provide desktop and web apps a <a href="http://en.wikipedia.org/wiki/Uniform_Resource_Identifier">URI</a> to a manageable piece of information that can be parsed relatively frequently for updates.</p>
<p>My issue is two fold: (1) the URI Microsoft defines is nonstandard and trivial; and (2), why should we learn another set of proprietary syntax for what should be defined elsewhere in the page or headers?</p>
<p>As for the URI, <a href="http://en.wikipedia.org/wiki/XPath">XPath</a> is a much stronger and cleaner way to identify what is subscribable. Why should I be limited to just one element at a time? XPath would allot me several subscriptions all at once. A URI like <code>http://blog.adventdigerati.com//*[@class="story"]:first</code> would give you my the snippet to my latest blog post, and omitting <code>:first</code> would give you all the posts on the front page. Why is that so hard?</p>
<p>Secondly, most of Slices&#8217; API is defined using bastardized (X)HTML elements and attributes. Even I learned that text content should not be used to define semantic meaning in a document; it&#8217;s a corruption of XML standard, one of the best directions in web standardization so far. How hard would it be to include a custom <a href="http://www.w3schools.com/html/html_meta.asp"><code>&lt;meta></code></a> tag in the <code>&lt;head></code>? Namespacing a custom tag would be sufficient, and you could even achieve the same effects MS wants via these methods. <code>&lt;meta name="ms-slice-title" content="/absolute/path/from/slice/root/to/title/tag"/></code> would give a consistent way to retrieve the titles for each slice with one line of code! Or, if need be that the slices be drastically different, <code>&lt;meta name="ms-slice-ttl" content="//*[@class='entry-content']"/></code> would parse slower but achieve the same goals, and be standards-compliant.</p>
<p>In all, everything Microsoft wanted to get out of their new Web Slices feature could already be done using existing tools; let&#8217;s not clutter what could be an awesome new tool for developers with sub-par requisites that somehow shoehorn their way into standards by just being left to fester.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/04/ms-slices-x-path-to-ribbons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>$c is not always $a[&quot;c&quot;]</title>
		<link>http://blog.adventdigerati.com/2009/04/c-is-not-always-ac/</link>
		<comments>http://blog.adventdigerati.com/2009/04/c-is-not-always-ac/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 22:42:54 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Code Snippet]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=48</guid>
		<description><![CDATA[Today I was tipped off to a certain quirk of PHP, specifically with how it handles Array resources. Every programmer knows, (or should know), the differences between creating a new copy of a variable and making a new reference to the same variable. In PHP, as far as I&#8217;ve known, you never access memory directly. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was tipped off to a certain <a href="http://blog.adventdigerati.com/2009/02/skill-and-quirks/">quirk</a> of PHP, specifically with how it handles Array resources. Every programmer knows, (or should know), the differences between creating a new copy of a variable and making a new reference to the same variable. In PHP, as far as I&#8217;ve known, you never access memory directly. Thus, trying <code>$v = "hello"; $a = &$v; $b = &$a;</code> does not make the value of <code>$b</code> a byte pointer to the location of <code>$a</code>, but instead a new <i>reference</i> to what <code>$v</code> holds. So, modifying <code>$b</code> means you will implicitly edit <code>$v</code>. To those familiar with PHP, this is understandable and often both acceptable and helpful. (As lazy programmers, we don&#8217;t want to have to remember when we have a reference or an &#8216;original&#8217; copy of a value.)</p>
<p>What I didn&#8217;t know, is that this could get us into a lot of trouble without even expecting it. The problem occurs whenever you try to obtain a reference to an element in a PHP array. Case in point:</p>
<pre>$a=Array("one"=>1, "two"=>2,"three"=>null);
$b = $a["four"];
$c =&#038; $a["five"];</pre>
<p>What do we get if we print the value of <code>$a</code> variables? <code>$a</code> is now
<pre>$a = Array(
  ["a"] => 1,
  ["b"] => 2,
  ["d"] => null,
  ["c"] => &#038;null
)</pre>
<p>WHAT?! What happened to <code>$b</code>? What in the world is a <i>pointer</i> to <code>null</code>? PHP actually created the &#8220;c&#8221; key within my Array, just by referencing it in a <i>read context</i>. Lesson learned: always use <code>isset($a["key"])</code> before attempting to draw from an Array by reference!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/04/c-is-not-always-ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zen and the Art</title>
		<link>http://blog.adventdigerati.com/2009/03/zen-and-the-art/</link>
		<comments>http://blog.adventdigerati.com/2009/03/zen-and-the-art/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 03:55:31 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Theory]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=46</guid>
		<description><![CDATA[Programming, specifically the intelligent design of such constructs, has always been at least twenty percent mimicry. Someone shows us how to write an efficient binary toggle and the practice stays with us. Learning how to find exclusive results between two SQL tables can shave minutes off of execution time, and your boss will certainly be [...]]]></description>
			<content:encoded><![CDATA[<p>Programming, specifically the intelligent design of such constructs, has always been at least twenty percent mimicry. Someone shows us how to write an efficient binary toggle and the practice stays with us. Learning how to find exclusive results between two SQL tables can shave minutes off of execution time, and your boss will certainly be impressed if you boost throughput by 85%.</p>
<p>Along the road to enlightenment, I&#8217;ve had some superlative teachers, professors, and friends instruct me on the best ways they knew to implement everything from Levenshtein Distance to Diffie-Helman compression, from polygon intersection to Relational Division. These lessons weren&#8217;t always apparent, and hardly ever enjoyable, but the knowledge and satisfactoin at the end of the project often put me years ahead of self-study.</p>
<p>Several times, I&#8217;ve been asked questions to which I&#8217;ve had absolutely no idea as to the solution. Yet, right then and there, an answer was demanded of me. It&#8217;s difficult and embarrassing, but situations like these are more about the reasoning than an off-the-cuff answer. This is an important concept, since it is a large step on the road to Doing Big Things.</p>
<p>Such occurrences were relatively commonplace, and for a long time I couldn&#8217;t figure out why someone looking to help me was asking a question that I either obviously had no business answering, or that was completely over my head. Then, just a few days ago, I stumbled onto the concept of zen. Zen, for want of a clearer definition, is the internal feeling and state of mind which is, in rudimentary forms, omniscience about a subject. It is the absence of bounds or form of knowledge in an area of concentration or meditation.</p>
<p>Zen and the art of programming was an interesting thought experiment, and until then I had no idea zen was being taught to me the entire time.</p>
<p>A <a href="http://dictionary.reference.com/browse/mondo" title="mondo">mondo</a> is a component of zen scripture where the roshi (`roh-shee) [teacher] asks the student a question, demanding an immediate answer. Since this question is often complex or multi-part, the process of developing the answer is more critical than the answer itself, akin to the Biblical scripture of teaching a man to fish. Had the pupil regurgitated some decade-old algorithm learned in Intro to VisualBasic doesn&#8217;t further the understanding of the problem at hand. Just because you may have learned bubble sort first doesn&#8217;t mean it&#8217;s the best choice for your production code base. A mondo would solve whether insertion sort would suffice instead of spending two days of company time implementing heap sort; and, more than that, it should help you realize the patterns in the future to prevent the same questions from needing attention again.</p>
<p>This insight, the ability to anticipate or at least keep pace with the business&#8217; needs, is one of the most efficient ways to show off one&#8217;s skill in a profession. Especially now, when employers need to &#8220;cut off the fat&#8221; out of their budgets and reign in on ambitious funding of pipe-dream projects to stay competitive.</p>
<p>And there&#8217;s no reason you <i>shouldn&#8217;t</i> want to continue to learn. If nothing else &ndash; and trust me, there&#8217;s plenty else &ndash; you will bring those skills back to the workplace every day, inspiring those around you and impressing your superiors. That&#8217;s not even counting the personal satisfaction of reasoning through an enigma and coming out the upper side with a better solution or clearer understanding of the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/03/zen-and-the-art/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Skill and Quirks</title>
		<link>http://blog.adventdigerati.com/2009/02/skill-and-quirks/</link>
		<comments>http://blog.adventdigerati.com/2009/02/skill-and-quirks/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 03:30:17 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theory]]></category>

		<guid isPermaLink="false">http://blog.adventdigerati.com/?p=42</guid>
		<description><![CDATA[As with any profession, programming is a split of skill and quirks. Quirks come in many forms and can be quite useful or a bane. In JavaScript, for instance, you can reference a function as an object, which itself can be referenced as a hash. Thusly, window.foo[bar](baz) is perfectly valid(!). In PHP, an Array can [...]]]></description>
			<content:encoded><![CDATA[<p>As with any profession, programming is a split of skill and quirks. Quirks come in many forms and can be quite useful or a bane. In JavaScript, for instance, you can reference a function as an object, which itself can be referenced as a hash. Thusly, <code>window.foo[bar](baz)</code> is perfectly valid(!). In PHP, an Array can be accessed by square or curly braces; <code>$a['b']</code> and <code>$a{'b'}</code> are equivalent(!!). These idiosyncrasies facilitate flexible code, yes, but can also be dangerous for maintenance. A person new to JavaScript, (who probably doesn&#8217;t quite grasp closures just yet), will most likely have less than a clue as to why the snipped is valid. The PHP programmer who has a background in C would expect the curly braces to define a new scope, not act as a hash lookup.</p>
<p>I am going to argue against myself here. I realize that in a prior <a href="http://blog.adventdigerati.com/2008/10/futureproof/">post</a> I praised PHP dereferencing, longing for the direct pointer manipulation of Perl, by using <code>$value=true; $name='value'; ${$name}==true</code>. However, for the next developer, he or she must understand prior to inheriting the code, how PHP handles inline eval() statements.</p>
<p>In situations where the use of these is unavoidable &ndash; usually in dynamically-created variables, LISP anyone? &ndash; a detailed comment is assuredly in order. Even if it is simple, an example, the next programmer to stumble across your code should be able to reasonably expect an outcome from the procedure.</p>
<p>In JavaScript I&#8217;ve been writing lately, I&#8217;ve become very cautious about the nature of functions and closures. Frequently, I&#8217;ve adopted the practice of namespacing everything I write. Because of that, grouping functions down to the program area can be tedious. No programmer wants to see <code>com.acme.financial.payment.forms.construct()</code>. With JavaScript, we can fake a <code>with()</code> statement. <code>var pay_form = com.acme.financial.payment.forms</code>; additionally <code>com.acme.financial[params['object_type']].forms[action](params_hash)</code> can save a lot of code later in the process.</p>
<p>As an engineer, we should always be looking for ways to perfect our trade. Often this means coding cleanly, and using conventions. Sometimes this means using quirks to their biggest advantage: shrinking the codebase. Remember, one bug for every ten lines.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adventdigerati.com/2009/02/skill-and-quirks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
