<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[MetacogniTV]]></title>
  <link href="http://metacogni.tv/atom.xml" rel="self"/>
  <link href="http://metacogni.tv/"/>
  <updated>2013-04-06T22:11:23-06:00</updated>
  <id>http://metacogni.tv/</id>
  <author>
    <name><![CDATA[Faris Chebib]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[The Existential Programmer]]></title>
    <link href="http://metacogni.tv/blog/2013/04/05/the-existential-programmer"/>
    <updated>2013-04-05T09:23:00-06:00</updated>
    <id>http://metacogni.tv/blog/2013/04/05/the-existential-programmer</id>
    <content type="html"><![CDATA[<h2>Existentialism</h2>

<p>Every day is a melody comprised of dissonance. Our ability to create new, novel ideas is only the result of ongoing contrast against a background of an ever-shifting concept of normality. We dance about our daily lives not to the tune of the world, but to the song we let ourselves hear. And our lives are guided by opposing thoughts: for every individual is both significant and meaningless. Our collective drowns out the truth, but each individual is merely a result of that collective.</p>

<p>Every human is blessed with the ability to conceive of the world, but that knowledge is also their curse. We are indeed strange animals, for without these thoughts and our ability to share them, we would have no cultural history. And without this history we would be no different than protozoa in a pond &#8211; existing only to survive in the currents of our environment. We mold our environment to our mind, and the environment molds our mind to it.</p>

<!-- more -->


<p>In our recent human history, we have come to affirm two important facts about our species:</p>

<ol>
<li><p>All living organisms are the result of 4 billion some-odd years of reproduction. Whether it&#8217;s the violent mitosis of the cell which pulls itself apart, or the throws of sexuality resulting from competition in the environment. Our history is comprised of a library of adapted alleles expressed in the gallery of life. And their success is only determined by their ability to carry onto the next generation. Humanity&#8217;s exception is our cultural history, our ability to carry concepts across generations.</p></li>
<li><p>Language is the means by which our cultural history survives across generations. Our ability to acquire language is a result of our premature birth. Compared to other species, our infants are not fully developed. The brain of a newborn contains unmyelinated neurons, like a bundle of copper wire without insulation. The tremours of a newborn are the result of a constant short-circuiting. Every sensory stimulation that newborn feels fires a new line of neurons. And those neurons never used will kill themselves off in a submission to cognitive efficiency. This is the seed of language, the first rendering of thoughts formed by environment.</p></li>
</ol>


<p>Our individual self is only the result of our environment, yet we each have our own idea of what this environment looks like. Often times, the two do not match and there is a dissonance. When we encounter that dissonance we have a choice. We can fight to change our environment, or fight ourselves to change our concept.</p>

<p>This dissonance is perhaps best expressed when two individuals clash together with opposing concepts. Here we have the same choices: we can try to persuade the other the change their thought, or accept that we ourselves will have to change our concept.</p>

<p>This is humanity. It is an incomprehensible dance of many songs. We follow, we lead; we fight, we bleed; we exist, then we die &#8211; with only an infinitely small yet significant history to show for it. And our individual legacy fades into our collective environment. In this way, we are slaves to a collective which we may lead.</p>

<h2>The Programmer</h2>

<p>A new paradigm has emerged in my lifetime, the concept of a digital history. The digital age is not merely a human achievement &#8211; it is a biological milestone. For we have created a new genetic library, one that is still in its infancy. Our generation will be the one to determine which &#8220;alleles&#8221; will die and which will be expressed. We shape our digital concepts into reflections of our environment. Programming allows us to express and create concepts never before imagined at an unfathomable pace, yet we still feel frustrating dissonance when our efforts fail to reflect our reality &#8211; perhaps because of our ability to rapidly shift our personal thoughts to the environment.</p>

<p>The Existential Programmer understands not only the certainty of death, but also the transcendental nature of history. They are in a content to be discontented, for they realize that the contrast between their digital DNA and reality is nothing more than another path for the next programmer to walk.</p>

<h2>One Last Thought</h2>

<p>Time only marches forward. One day you will be nothing but a rotting corpse. We instinctually avoid thinking about this fact, but I have found solace in a corollary thought: even the act of historical reflection is something occurring in our unbreakable flow of time. To reflect upon an idea is to allow it to live again. In your short time as a living individual you have a chance to live again. Seize this opportunity and create something that others will find meaning in! And accept that your dissonance is in fact harmony.</p>

<p><strong>We are nothing more than hydrogen atoms pressed into dissonant harmony. Meaningfully meaningless; a result and a cause.</strong></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Programming is Easy, Engineering is Hard]]></title>
    <link href="http://metacogni.tv/blog/2013/02/28/programming-is-easy"/>
    <updated>2013-02-28T08:01:00-07:00</updated>
    <id>http://metacogni.tv/blog/2013/02/28/programming-is-easy</id>
    <content type="html"><![CDATA[<h2>Intro</h2>

<p>Lately I&#8217;ve been thinking a lot about the journey I&#8217;ve taken to get to this
point in my professional programming career. Upon reflection, I&#8217;ve found that
there&#8217;s one mistake I keep making. Namely, I conflate programming skills with
engineering skills.</p>

<h2>Programming is Easy (to shoot yourself in the foot)</h2>

<p>And it&#8217;s an easy mistake to make. After all, once you&#8217;re on a roll with your
programming knowledge, you feel like you can solve pretty much any problem
thrown in your direction. So you approach the problem head-on, with little
thought as to the underlying big picture of the problem. Suddenly, a wild edge
case appears! Now you&#8217;re stuck re-visiting code that was once &#8220;perfect&#8221;, and
you&#8217;re pulling your hair out over how you could have missed such an important
step.</p>

<!-- more -->


<p>You missed that step because you didn&#8217;t approach the problem like an engineer.
You approached it like a magician. Which is fine, until it it&#8217;s time to improve
on your act. Programming is easy. Done right, it lets you build programs from
other programs, and it allows you to add your own approaches to a problem. But
for all the power that code brings us, we still require an underlying cognitive
framework to make our code useful.</p>

<p>It&#8217;s not a new problem. Many programmers have held an underlying assumption
which is detrimental to their approach and attitude: &#8220;I know how computers work
and you don&#8217;t, therefore I&#8217;m smarter than you&#8221;. I&#8217;ll admit that I&#8217;ve fallen
into this pit of circular reasoning on more than one occasion.</p>

<p>So how do we stop inflating our ego? My advice: hang out with artists and artsy
folk &#8211; or anyone who doesn&#8217;t code all the time. Try to understand the
underlying semantics, tricks of the trade, and vocabulary of someone else&#8217;s
expertise. I guarantee you&#8217;ll be rewarded with new wisdom.</p>

<h2>Engineering is Hard</h2>

<p>Hanging out with the most gifted artisans will mean nothing unless you
contribute back. Being a read-only user is so 1990s. You have to write
something: whether it&#8217;s code, documentation, tests, or just a blog post &#8211; if you
don&#8217;t contribute then you&#8217;re not really learning.</p>

<p>When you engineer, you are solving a problem by first understanding the &#8220;big
picture&#8221;. This isn&#8217;t to say that you have to work in a top-down approach, but
it does mean that you need to have a breadth of knowledge pertaining to the
task at hand. Let&#8217;s imagine a more concrete example: you&#8217;re building a website
to aggregate all of the trees in your city. You know that arborists will enjoy
using the program, but your code doesn&#8217;t really account for future tree growth
patterns. Later, a group of civil engineers approaches you about using your
website to building pipelines. Unfortunately, you&#8217;ll soon see that your code
was too specific to your problem and didn&#8217;t really model the environment it
could have.</p>

<p>If you had approached this website as an engineer, the first question you would
want to answer is &#8220;what problems does this code solve?&#8221;. And a corollary, &#8220;who
does this code solve problems for?&#8221;. Then you would actually talk to these
people to build a knowledge database. When you actually talk to your users, you
discover their daily rituals and their own professional language. You can
prepare for future uses of your code based on the patterns of your client.</p>

<h2>Going Forward</h2>

<p>Next time a non-technical person approaches you about programming &#8211; whether
it&#8217;s just a simple IT question, or a full-fledged application, put your ego in
your pocket and act as if you&#8217;re learning the subject for the first time. Pay
attention to key nouns and verbs. Pay attention to repetitive procedures and
complaints. Most importantly, don&#8217;t just code the first solution that comes to
mind and keep going, return to the underlying real-world application and make
sure there isn&#8217;t a better solution just underneath the surface.</p>

<p>Stop thinking you&#8217;re hot shit just because you&#8217;re a programmer. Engineers are
the real heroes, and you can be an engineer too if you shut up and observe
actual problems instead slap-fixing perceived ones.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Websockets with Nginx + SSL. Also, Benchmarks]]></title>
    <link href="http://metacogni.tv/blog/2013/02/19/websockets-with-nginx-plus-ssl-also"/>
    <updated>2013-02-19T15:53:00-07:00</updated>
    <id>http://metacogni.tv/blog/2013/02/19/websockets-with-nginx-plus-ssl-also</id>
    <content type="html"><![CDATA[<p>After weeks of following the <a href="http://trac.nginx.org/nginx/roadmap">nginx roadmap</a> for news about websockets support, I was ecstatic to see the newest <a href="http://trac.nginx.org/nginx/changeset/5073/nginx">changeset</a> had some simple intructions on how to implement them.</p>

<p>I have an example of a websocket + ssl server running right now at:
<a href="https://legionofevil.org">https://legionofevil.org</a></p>

<p>If you want to see the code, go ahead an skip these benchmarks.</p>

<h2>Very Coarse Benchmarks</h2>

<p>Previously, I was using xhr-polling with socket.io and was getting latency
readings of about 120ms. My friends in the US were getting a 60ms lag reading
(the server is in Utah, while I&#8217;m in British Columbia).</p>

<p>After recompiling nginx from the trunk source, I got speedups to about 55ms,
which is half of what I was getting before. My US friends also reported a
latency of 35ms.</p>

<p>So, ya. It&#8217;s worth an upgrade if you&#8217;re working with ssl.</p>

<!-- more -->


<h2>Instructions</h2>

<p>The app at <a href="https://legionofevil.org">legionofevil</a> is actually running
<a href="https://github.com/bjorn/mana.js">mana.js</a>, a 2d online mmorpg based on
<a href="http://melonjs.org/">melon.js</a>. The server is running Node.js and Socket.io. I&#8217;m also graphing latency on the top of the page.</p>

<p>Here&#8217;s a gist of my node server:</p>

<script src="https://gist.github.com/octaflop/4991187.js"></script>


<p>And the Nginx conf:</p>

<script src="https://gist.github.com/octaflop/4991052.js"></script>


<p>A couple of things to note here:</p>

<ul>
<li>Socket.io is automaticaly sending an &#8220;Upgrade&#8221; header for websockets.</li>
<li>You don&#8217;t need to specify <code>wss://</code> in your nginx configuration. As long as
  socket.io can upgrade to Http1.1, you should be fine.</li>
</ul>


<p>I&#8217;ll be updating this entry with more info, but I&#8217;m sure this should get any
intrepid hackers going.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[And we're back]]></title>
    <link href="http://metacogni.tv/blog/2012/02/12/and-were-back"/>
    <updated>2012-02-12T02:55:00-07:00</updated>
    <id>http://metacogni.tv/blog/2012/02/12/and-were-back</id>
    <content type="html"><![CDATA[<p>After much head-banging and some deep contemplation, I have once again migrated
my server. Hopefully, this solution lasts and is reliable enough for me to begin
creating consistent and thematic updates. <em>Version 3</em> of this site is hosted
with the good folks at Linode and this particular virtual machine is located in
Japan.</p>

<!-- more -->


<p>In the meanwhile, I have a number of projects and a similar number of bugs, including this doozy:</p>

<div><script src='https://gist.github.com/1786924.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>Hopefully I can get the other subtle aspects of the site back up in a timely
manner. Until then, sayonara!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Depths]]></title>
    <link href="http://metacogni.tv/blog/2011/07/24/depths"/>
    <updated>2011-07-24T16:33:00-06:00</updated>
    <id>http://metacogni.tv/blog/2011/07/24/depths</id>
    <content type="html"><![CDATA[<p>The mind is an amazing gift. For one thing, only living things are able to enjoy
this experience. For another, using our minds we are also able to reflect on its
gift. Indeed, it is a precious gift.</p>

<p>This is why I don&#8217;t feel like any experience is ever squandered. Moments are
precious gifts of the result of so many dancing chemical processes.</p>

<p>Once, walking in the University of Utah&#8217;s library courtyard, my friend asked me
what the purpose of my philosophy degree was. After all, I was also studying
biology, and wouldn&#8217;t studying two “different” subjects just make my studies
more difficult? Indeed, I was in a varied array of classes; my homework ranged
from counting and dissecting octopuses to writing about intellectual property
law. But I don&#8217;t think that this broadness made my life more difficult. I rather
liked finding the common narrows in these assignments. But now, having finished
a degree in Cognitive Science, I&#8217;ve realized something: our studies are
interlinked in even more unexplored ways. I propose to you that ballet and DNA
have more in common with our experience than simple statistics. For the function
of both is chemical, and the chemistry is the chaos springing from basic rules.
This emergence is prevalent in nature.</p>
]]></content>
  </entry>
  
</feed>
