<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[/home/jdppettit]]></title><description><![CDATA[Software engineer, product maker, cat data, avgeek, photographer]]></description><link>https://blog.joepettit.com/</link><image><url>https://blog.joepettit.com/favicon.png</url><title>/home/jdppettit</title><link>https://blog.joepettit.com/</link></image><generator>Ghost 5.88</generator><lastBuildDate>Tue, 19 May 2026 01:08:45 GMT</lastBuildDate><atom:link href="https://blog.joepettit.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Practical Elixir Macro Examples]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>While I haven&apos;t written about it here yet, much of my past year has been spent learning and writing Elixir.</p>
<p>As I have started to delve beyond surface-level language features I have found topics that are not discussed to my satisfaction (or at least in words that I</p>]]></description><link>https://blog.joepettit.com/practical-elixir-macro-examples/</link><guid isPermaLink="false">684da93de3132ed11c7dc36f</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Thu, 07 May 2020 04:22:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>While I haven&apos;t written about it here yet, much of my past year has been spent learning and writing Elixir.</p>
<p>As I have started to delve beyond surface-level language features I have found topics that are not discussed to my satisfaction (or at least in words that I think make sense) so I am determined to document my adventures here.</p>
<p>One such feature I recently started using that fit this bill is the macro. A macro in Elixir is a feature that essentially enables a sort of metaprogramming. For example, say you have several modules that all do the same things essentially, but in a different context - like notifications.</p>
<p>You might have <code>MyApp.SMS</code>, <code>MyApp.Email</code> and so on, where each module has common functions that they need. One option would be to write each module with all the functions it needs. Another would be to extract it to another module. But what if you could utilize the design approach of separating things into modules, without extracting and also without repeating yourself? Enter macros!</p>
<p>Here are some example code snippets without macros:</p>
<pre><code>defmodule MyApp.SMS do

    def send(target, body) do
        # Your logic
    end
    
    def create_body(body) do
        # Shared function
    end
end 
</code></pre>
<pre><code>defmodule MyApp.Email do
    def send(target, body) do
      # Your logic  
    end
    
    def create_body(body) do
        # Shared function 
    end
end
</code></pre>
<p>In this example imagine that <code>create_body/1</code> does something that both modules will need. Perhaps it will take a body string and replace certain characters, sanitize it, or something along those lines. You could write it each time like I did above, or maybe even move it to a common module, but with macros you could bake in this behavior using <code>using</code>.</p>
<pre><code>defmodule MyApp.NotificationFramework do
    def __using__(_opts) do
        defmacro do
            def create_body(body) do
                # Shared function
            end
        end
    end
end
</code></pre>
<p>With this macro created, we can now <code>use</code> it in one of the modules above:</p>
<pre><code>defmdoule MyApp.Email do
    use MyApp.NotificationFramework
    
    def send(target, body) do
        # Your logic
    end 
end
</code></pre>
<p><code>use</code> differs from <code>import</code> or <code>require</code> in that it essentially allows the module you are <code>use</code>ing to arbitrarily insert things into the context that <code>use</code>d it. In this case, that means that it is inserting the macroed <code>create_body/1</code> function. At run time, the module as written above is essentially the same as the one with the <code>use</code> clause.</p>
<p>Here is what the module <em>really</em> looks like after the <code>use</code>:</p>
<pre><code>defmodule MyApp.Email do
    def send(target, body) do
      # Your logic  
    end
    
    def create_body(body) do
        # Shared function 
    end
end
</code></pre>
<p>This can essentially create modules that are similar with the exception of maybe one or two functions that must be implemented differently, but should be self contained for design reasons (like ease of reading, or something similar).</p>
<p>Note there are some caveats around when the things in the macro are inserted into the context where <code>use</code> is called - in general the macro is compiled late so it will not overwrite things defined in the module directly. There are also some considerations around declaring variables - I recommend referencing the official documentation if this is an area you want to know more about.</p>
<p>There are other uses for macros that I have not yet explored, but I will certainly write more about them as I learn more.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Docuie]]></title><description><![CDATA[Docuie allows you to create documentation projects as well as pages and headings to create a hierarchy for your users. ]]></description><link>https://blog.joepettit.com/docuie/</link><guid isPermaLink="false">684da93de3132ed11c7dc36d</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Fri, 24 May 2019 04:39:09 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://blog.joepettit.com/content/images/2019/05/social_media_blue_bg.png" alt="social_media_blue_bg" loading="lazy"></p>
<p>Over the past 6 or so months I have been working on a new project. It started as a way to dive into Elixir and the Phoenix framework but ended up being (in my opinion) a fully fledged product.</p>
<p>The idea was to provide a hosted documentation service that was simple, affordable and easy to use. During my work on <a href="https://statusy.co/?ref=blog.joepettit.com">Statusy</a>, I spent a great deal of time trying to find a decent product that 1) didn&apos;t cost a ton of money (a lot of options were easily $50+ a month for essentially a static site), 2) didn&apos;t require a ton of setup and 3) was mostly hands off. I couldn&apos;t find such a product, so I began working on <a href="https://docuie.com/?ref=blog.joepettit.com">Docuie</a>.</p>
<p><a href="https://docuie.com/?ref=blog.joepettit.com">Docuie</a> allows you to create documentation projects as well as pages and headings to create a hierarchy for your users. It has a WYSIWYG editor, supporting both point-and-click style writing and full HTML editing if you wish to take that route. Docuie supports free docuie.com domains in addition to custom domains on the higher packages. Pricing is based around the features and number of seats you need, the cheapest plan starts at just $10 per month and gives you a fully featured product.</p>
<p>In addition, one thing we did with Statusy that I really enjoyed was offering free service to open source projects, so I will be continuing this with Docuie. If you run an open source project (or a charity of some sort) please reach out to me if you are interested in getting set up on <a href="https://docuie.com/?ref=blog.joepettit.com">Docuie</a>.</p>
<p>You can view an example of the product through Docuie&apos;s own documentation site here: <a href="https://docs.docuie.com/?ref=blog.joepettit.com">https://docs.docuie.com</a></p>
<p>Thanks for reading, I hope you will give it a shot if you are in the market for a documentation service.</p>
]]></content:encoded></item><item><title><![CDATA[Paypal Billing Agreements with Paypal-Checkout]]></title><description><![CDATA[<p>While a number of other payment processors have sprung up in recent years, Paypal continues to remain one of the <em>de facto</em> standards because of its relative prevalence and its ability to tokenize personal information. Many users have come to prefer Paypal for websites and services that may not have</p>]]></description><link>https://blog.joepettit.com/getting-started-paypal-billing-agreements-with-paypal-checkout/</link><guid isPermaLink="false">684da93de3132ed11c7dc36c</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Fri, 08 Dec 2017 06:33:06 GMT</pubDate><content:encoded><![CDATA[<p>While a number of other payment processors have sprung up in recent years, Paypal continues to remain one of the <em>de facto</em> standards because of its relative prevalence and its ability to tokenize personal information. Many users have come to prefer Paypal for websites and services that may not have yet been fully vetted and would thus prefer to not hand over personal information, like credit card numbers, directly.</p>
<p>That said, integrating with Paypal is almost always a great business move as it will aid in capturing as many customers as possible for your web service or platform.</p>
<p>This post will walk you through a basic integration for Paypal with recurring billing. Paypal&apos;s latest <a href="https://developer.paypal.com/docs/api/overview/?ref=blog.joepettit.com">REST API</a> will be used in combination with <a href="https://github.com/paypal/paypal-checkout?ref=blog.joepettit.com">Paypal-Checkout</a>.</p>
<h4 id="terms">Terms</h4>
<p>Before diving in, it is worth explaining a few terms that Paypal uses often when it comes to recurring billing:</p>
<ol>
<li>
<p>Agreement - An agreement is essentially a subscription, that is, a recurring payment that happens based on a predetermined schedule.</p>
</li>
<li>
<p>Billing Plan - A billing plan provides the basic information to create an agreement. Things like cost, term and taxes are defined on a billing plan.</p>
</li>
</ol>
<h4 id="integrating-checkoutjs">Integrating Checkout.js</h4>
<p>To begin, Paypal-Checkout (checkout.js) will need to be included on the web page(s) where you would like to offer support for Paypal subscriptions.</p>
<p>This can be done by adding the following script to the scripts area of your web page:</p>
<pre><code>&lt;script src=&quot;https://www.paypalobjects.com/api/checkout.js&quot; data-version-4&gt;&lt;/script&gt;
</code></pre>
<p>Next, you will want add a <code>&lt;div&gt;</code> where the Paypal button should be shown:</p>
<pre><code>&lt;div class=&quot;paypal-button&quot;&gt;&lt;/div&gt;
</code></pre>
<p>Lastly, some Javascript code will be required to instantiate the button and remaining functions. You can add the following directly to a web page, or you can add the Javascript to a separate <code>js</code> file and include that in your web page.</p>
<pre><code>paypal.Button.render({

    env: &apos;sandbox&apos;, // Or &apos;production&apos;,
    commit: true, // Show a &apos;Pay Now&apos; button
    client: {
        &apos;sandbox&apos;: &apos;YOUR CLIENT ID HERE&apos;, // switch to &apos;production&apos; if in prod
    }

    payment: function(data, actions) {
        /* 
         * Set up the payment here 
         */
         
         // The goal here is to return a promise or callback that
         returns a payment ID
    },

    onAuthorize: function(data, actions) {
        /* 
         * Execute the payment here 
         */
         
         // Once the user has authorized the subscription, you will
         need to execute the agreement here.
    },
}, &apos;#paypal-button&apos;);
</code></pre>
<p>If you reload your page you should now see a button similar to what is shown below:</p>
<h4 id="creating-plans">Creating Plans</h4>
<p>Next you will need to create a plan to offer to your customers. Currently Paypal does not offer a web interace to do this, so plans must be configured via the REST API. That said, the best source for examples here would be the Paypal API documentation directly, found <a href="https://developer.paypal.com/docs/api/payments.billing-plans?ref=blog.joepettit.com">here</a>.</p>
<h4 id="creating-an-agreement">Creating an Agreement</h4>
<p>With plans created you can now begin the process of creating your first agreement. Paypal-Checkout does not offer direct support for billing agreements so you will need to manually handle this information server side.</p>
<p>First, write the server endpoint - in this example Python, the Flask framework and the Paypal Python SDK will be used (<code>pip install paypalrestsdk</code> - docs <a href="https://github.com/paypal/PayPal-Python-SDK?ref=blog.joepettit.com">here</a>) will be utilized:</p>
<pre><code># import standard flask modules
from urllib.prase import urlparse, parse_qs

@billing.route(&apos;/billing/paypal/agreement/token&apos;, methods=[&apos;POST&apos;])
def get_agreement_token():
    plan_id = json.get(&apos;plan_id&apos;) // Get the plan ID from the request
    
    agreement = paypalrestsdk.BillingAgreement({})
    
    if agreement.create():
        parsed_url = urlparse(agreement.links[0][&apos;href&apos;])
        return jsonify({ &apos;token&apos;: parse_qs(parsed_url.query)[&apos;token&apos;][0]})
    
    return jsonify({ &apos;error&apos;: &apos;failed&apos;})
</code></pre>
<p>The goal with this endpoint is to take the plan ID selected by your customer and use it to retrieve a payment token. The token is retrieved on this line: <code>parsed_url = urlparse(agreement.links[0][&apos;href&apos;])</code> and then returned as a JSON object here: <code>return jsonify({ &apos;token&apos;: parse_qs(parsed_url.query)[&apos;token&apos;][0]})</code>.</p>
<p>Back on the Javascript side, you can write an AJAX call to this endpoint like so:</p>
<pre><code>paypal.Button.render({

    env: &apos;sandbox&apos;, // Or &apos;production&apos;,
    commit: true, // Show a &apos;Pay Now&apos; button
    client: {
        &apos;sandbox&apos;: &apos;YOUR CLIENT ID HERE&apos;, // switch to &apos;production&apos; if in prod
    }

    payment: function(data, actions) {
        var plan_id = &apos;1&apos;; // change this to be the actual paypal plan ID
        
        $.ajax({
          url: &apos;/billing/paypal/agreement/token&apos;,
          type: &apos;POST&apos;,
          data: JSON.stringify({ plan_id: plan_id }),
          contentType: &apos;application/json&apos;,
          dataType: &apos;json&apos;,
          success: function(data, status, xhr) {
            agreement_id = data.agreement_id;
            resolve(data.token); // resolve the promise so onAuthorize is called
          },
          error: function(xhr, status, error) {
            console.log(&apos;checkout error&apos;, error);
            reject(error)
          },
});        
    },

    onAuthorize: function(data, actions) {
        /* 
         * Execute the payment here 
         */
         
         // Once the user has authorized the subscription, you will
         need to execute the agreement here.
    },
}, &apos;#paypal-button&apos;);
</code></pre>
<p>Once the payment token is returned in <code>resolve</code> the user is prompted to accept the agreement you have created. Once this has been done, the <code>onAuthorize</code> handler is called and you will need to execute the agreement for it to complete.</p>
<h4 id="executing-the-agreement">Executing the Agreement</h4>
<p>To execute the agreement a separate server side endpoint will need to be created. Here is an example:</p>
<pre><code>@billing.route(&apos;/billing/paypal/agreement/execute&apos;, methods=[&apos;POST&apos;])
def execute_agreement():
    payment_token = json.get(&apos;payment_token&apos;)
    
    if paypalrestsdk.BillingAgreement.execute(payment_token):
        return jsonify({ &apos;status&apos;: &apos;success&apos; }) // we&apos;re good to go!
        
    return jsonify({ &apos;error&apos;: &apos;failed&apos; }) // something broke!
</code></pre>
<p>This endpoint does not need to return anything in particular, so long as the response code is <code>200</code>. The <code>payment_token</code> is obtained in the JSON body <code>POST</code>ed to this endpoint, it is then supplied to the Paypal Python SDK and the <code>execute</code> function is called with that parameter. If all is well, the <code>status: success</code> line is returned, else an error is returned.</p>
<p>To integrate this on the Javascript side, another AJAX call will need to be made:</p>
<pre><code class="language-paypal.Button.render({">
    env: &apos;sandbox&apos;, // Or &apos;production&apos;,
    commit: true, // Show a &apos;Pay Now&apos; button
    client: {
        &apos;sandbox&apos;: &apos;YOUR CLIENT ID HERE&apos;, // switch to &apos;production&apos; if in prod
    }

    payment: function(data, actions) {
        var plan_id = &apos;1&apos;; // change this to be the actual paypal plan ID
        
        $.ajax({
          url: &apos;/billing/paypal/agreement/token&apos;,
          type: &apos;POST&apos;,
          data: JSON.stringify({ plan_id: plan_id }),
          contentType: &apos;application/json&apos;,
          dataType: &apos;json&apos;,
          success: function(data, status, xhr) {
            agreement_id = data.agreement_id;
            resolve(data.token); // resolve the promise so onAuthorize is called
          },
          error: function(xhr, status, error) {
            console.log(&apos;checkout error&apos;, error);
            reject(error)
          },
});        
    },

    onAuthorize: function(data, actions) {
         $.ajax({
          url: &apos;/billing/paypal/agreement/execute&apos;,
          type: &apos;POST&apos;,
          data: JSON.stringify(
            {
              payment_token: payment_token,
            }
          ),
          contentType: &apos;application/json&apos;,
          dataType: &apos;json&apos;,
          success: function(data) {
            // success!
          },
          error: function(xhr, status, error) {
            // failure! 
          },
    },
}, &apos;#paypal-button&apos;);
</code></pre>
<p>If all is well, the <code>success</code> handler will be called and you can then direct the user to the appropriate page, do further requests or obtain additional information if necessary.</p>
<h4 id="conclusion">Conclusion</h4>
<p>At this point you should have a very basic Paypal integration with support for recurring payments. Please note, the endpoints shown in Python are written under the assumption you have a working Flask application, to do that you will need to import additional modules not explicitly shown above. However, regardless of backend, the flow would be the same:</p>
<ol>
<li>User clicks Paypal button</li>
<li>Fire request to server to get a payment token</li>
<li>User accepts agreement</li>
<li>Fire another request to server to execute it with the agreement token</li>
<li><code>success</code> or <code>error</code> is called, redirect appropriately</li>
</ol>
<p>I hope this has been a helpful look at creating a basic Paypal subscription integration. Please do not hesitate to let me know if you have any questions, thanks!</p>
]]></content:encoded></item><item><title><![CDATA[Free Will and the Brain]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><strong>Introduction</strong></p>
<p>One of my all time favorite topics is the brain, but more specifically, how the brain&apos;s operation results in the human condition. Recently I have been reading about the dichotomy between the conscious and unconscious mind.</p>
<p>The most interesting of which, I think, is a study conducted</p>]]></description><link>https://blog.joepettit.com/free-will/</link><guid isPermaLink="false">684da93de3132ed11c7dc36b</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Sun, 26 Nov 2017 05:36:30 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><strong>Introduction</strong></p>
<p>One of my all time favorite topics is the brain, but more specifically, how the brain&apos;s operation results in the human condition. Recently I have been reading about the dichotomy between the conscious and unconscious mind.</p>
<p>The most interesting of which, I think, is a study conducted at the University of Tennesee that investigates the timing of the decision making process while observing brain activity in an fMRI machine (an imaging device that allows researchers to view brain activity in real time) [1].</p>
<p><strong>Research</strong></p>
<p>During the study, researchers placed subjects in an fMRI machine and prompted them to decide to press a button in their left or right hand. Simulatenously, the subject is shown a clock with a rapidly moving second hand. Subjects are asked to identify which number the hand is closest to when they make the decision to press one button or the other. Comparing the data, researchers identified a roughly 200-300ms delay between when the subject reported making the decision and when they actually pressed the button. More interestingly, though, is that the fMRI scanner showed activity in the area of the motor cortex (the part of the brain that drives our movements) 300-500ms <em>before</em> the subjects reported making their decision.</p>
<p>This effect was so prevalent, researchers found they could readily and consistently predict how the subject would react before the subject reported making a decision.</p>
<p>In a separate but related study at Harvard University, Alvaro Pascual-Leone went on to modify the experiment to utilize TMS (transcranial magnetic stimulation, a way to manually stimulate the brain). In the follow up experiment, subjects were asked to <em>think</em> about moving one hand or the other during a specific auditory cue. Following a random pause, a second distinct auditory cue signaled that they should actually move the hand they decided to move. During some tests, researchers determined the hand that the subject intended to move using real time brain imaging and, prior to the second auditory cue, delivered a shock to the subject&apos;s motor cortex that would result in the opposite hand moving. When this happened, the subjects were questioned about the change in behavior with researchers noting that the subject&apos;s brain activity suggested that they would move their other hand. Consistently the subjects seemingly made up an explanation, stating they changed their minds, or something similar. But, given the brain imaging, it is possible to discerne with reasonable accuracy that this was not the case, and rather, the conscious brain simply tried to rationalize why the decision it made (to move the left hand, for example) did not happen. Moreso, subjects reported feeling completely normal, as if making a decision to move one hand and having the other move instead was normal.</p>
<p>These findings seem to suggest that this is a completely normal state for the brain. That is, that the conscious mind is not the portion of the brain that actually results in decision making.</p>
<p>fMRI scans during these experiments showed the activation of various regions of the brain, showing that the motor cortex was stimulated 300-500ms before the subject reported making a decision, suggesting the decision was made elsewhere in the brain and that the conscious mind, seemingly, was one of the last to know.</p>
<p><strong>Foreward</strong></p>
<p>From here, I wanted to take some time to expand upon the findings above, but before that I would like to note I am aware the objective of the studies above was to determine brain functionality and not to attempt to support or reject the concept of free will. However, I do believe that these findings can be used for further extrapolation in the discussion of free will.</p>
<p><strong>Concept</strong></p>
<p>What would it mean if the findings of these studies actually meant that free will was an illusion at best? We tend to operate under the assumption that our conscious minds are making the decisions we eventually act out, but it seems that the conscious mind is just along for the ride while doing its best to make sense of our actions.</p>
<p>If this is true, it would imply that what we typically consider to be free will simply does not exist. How then do we ultimately formulate our relatively complex actions then? I would like to assert that the brain operates deterministically. That is, given a specific brain state and a set of stimuli, the brain will always product the same output, similar to a computer program.</p>
<p><strong>Discussion</strong></p>
<p>With a deterministic brain we can be expected to react the same way every time a set of criteria are met. If I were to poke your arm right now, the reaction you would have is the same reaction you would have if we replicated the poke with the exact same brain and the exact same stimuli. That said, it is worth noting that it would be neigh impossible for the physical state of the brain to be the same since brain plasticity (the tendency for the brain to physically change based on actions and memory) has been well documented [2]. But, if you took your brain as it is right now, placed it in a vat and gave it all the stimuli you are currently experiencing, along with my poke, you would likely react the same way you did originally.</p>
<p>To further expand upon this idea - with a brain operating in a deterministic way, every action we take is literally the <em>only</em> action we will ever take because, given a certain state and a certain set of stimuli we will always act the same way.</p>
<p>If this is the case, then regardless of how much you want to think you wouldn&apos;t do X or Y, it is ultimately the state of your brain that decides what you will actually do.</p>
<p><strong>Conclusion</strong></p>
<p>If we were to agree that the idea the brain operates in a deterministic way is correct, what would that mean for the idea of free will? Researchers have demonstrated it is not the conscious mind that is first made of aware of decisions, rather, it is looped in on a need to know basis and allowed to make its own narrative. Think about this the next time you take a seemingly random action - why did you do that? Take some time to ponder the reason your conscious mind provides you - does it actually make sense?</p>
<p>Furthermore, consider what this means in terms of law and order. When we punish a criminal for committing a crime, are we punishing the conscious mind or the unconscious mind that likely decided to take the criminal action in the first place? Is this ethical if the brain is truly deterministic, if so, the criminal was incapable of acting in any other way.</p>
<p>What else would be impacted if we were to determine with certainly that our brains operate in a deterministic way?</p>
<p>[1] <a href="https://www.nature.com/news/2008/080411/full/news.2008.751.html?ref=blog.joepettit.com">https://www.nature.com/news/2008/080411/full/news.2008.751.html</a></p>
<p>[2] <a href="https://www.psychologytoday.com/blog/the-athletes-way/201702/how-do-neuroplasticity-and-neurogenesis-rewire-your-brain?ref=blog.joepettit.com">https://www.psychologytoday.com/blog/the-athletes-way/201702/how-do-neuroplasticity-and-neurogenesis-rewire-your-brain</a></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[On the Topic of Death]]></title><description><![CDATA[<p>I have been fortunate in that I made it through 26 years of life before I lost somebody very close to me. This streak ended yesterday, May 23rd, 2017 when my grandmother passed in her sleep. Death is not something I had spent a great deal of time pondering before</p>]]></description><link>https://blog.joepettit.com/on-the-topic-of-death/</link><guid isPermaLink="false">684da93de3132ed11c7dc36a</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Wed, 24 May 2017 05:53:09 GMT</pubDate><content:encoded><![CDATA[<p>I have been fortunate in that I made it through 26 years of life before I lost somebody very close to me. This streak ended yesterday, May 23rd, 2017 when my grandmother passed in her sleep. Death is not something I had spent a great deal of time pondering before now, but sitting here in the aftermath of it all, I have had a great deal of time to think it through.</p>
<p>I think we all realize that death is the unfortunate end we are all moving towards. It is an inevitability, a when and how, not an if. In my experience, most deal with death by way of religion. Many major religions have a concept of a heaven or heaven equivalent, with this, it is easy to find comfort knowing your loved one is in a better place. I have no gripes with this, in fact I have found myself finding comfort through similar ideas since learning of my grandmother&#x2019;s passing. However, I ultimately identify as an agnostic or atheist depending on the exact context. That said, I have been spending time trying to reconcile my beliefs with my need for comfort in such a difficult time.</p>
<p>In doing this, I read similar anecdotes by other atheists and <a href="http://www.huffingtonpost.com/ali-a-rizvi/atheists-death_b_4134439.html?ref=blog.joepettit.com">one in particular</a> caught my eye and truly resonated with me.</p>
<p>While I highly recommend giving the original article a read, the author is posed with a question by friend whose father had passed recently. The friend asks how the author deals with death given he is an atheist. The author discusses this in the form of a letter, during it he highlights this <a href="http://www.npr.org/templates/story/story.php?storyId=4675953&amp;ref=blog.joepettit.com">passage</a> by Aaron Freeman:</p>
<blockquote>
<p>You want a physicist to speak at your funeral. You want the physicist to talk to your grieving family about the conservation of energy, so they will understand that your energy has not died. You want the physicist to remind your sobbing mother about the first law of thermodynamics; that no energy gets created in the universe, and none is destroyed. You want your mother to know that all your energy, every vibration, every Btu of heat, every wave of every particle that was her beloved child remains with her in this world. You want the physicist to tell your weeping father that amid energies of the cosmos, you gave as good as you got.</p>
</blockquote>
<blockquote>
<p>And at one point you&apos;d hope that the physicist would step down from the pulpit and walk to your brokenhearted spouse there in the pew and tell him that all the photons that ever bounced off your face, all the particles whose paths were interrupted by your smile, by the touch of your hair, hundreds of trillions of particles, have raced off like children, their ways forever changed by you. And as your widow rocks in the arms of a loving family, may the physicist let her know that all the photons that bounced from you were gathered in the particle detectors that are her eyes, that those photons created within her constellations of electromagnetically charged neurons whose energy will go on forever.</p>
</blockquote>
<blockquote>
<p>And the physicist will remind the congregation of how much of all our energy is given off as heat. There may be a few fanning themselves with their programs as he says it. And he will tell them that the warmth that flowed through you in life is still here, still part of all that we are, even as we who mourn continue the heat of our own lives.</p>
</blockquote>
<blockquote>
<p>And you&apos;ll want the physicist to explain to those who loved you that they need not have faith; indeed, they should not have faith. Let them know that they can measure, that scientists have measured precisely the conservation of energy and found it accurate, verifiable and consistent across space and time. You can hope your family will examine the evidence and satisfy themselves that the science is sound and that they&apos;ll be comforted to know your energy&apos;s still around. According to the law of the conservation of energy, not a bit of you is gone; you&apos;re just less orderly. Amen.</p>
</blockquote>
<p>Having never read (or heard) this quote, I was very moved by it. I found it particularly interesting that the ideas conveyed in the passage so easily mirror those that the religious among us rely on during difficult times. When it is broken down, what we truly want to know is that our loved ones mattered, that their existence changed something in the world irrevocably, and through that change they live on.</p>
<p>While I am ultimately not sure if there is a heaven or hell, I do know that my grandmother lived a long, passionate and fulfilling life. She had two children, my mother and my uncle, both went on to have children of their own. My grandmother&#x2019;s actions have profoundly changed the world, as a nurse she cared for the sick, as a mother she brought new life into this world, and as a grandmother she helped raise the future generations of our family. Her energy and passion live on in her children, her grand-children, and eventually my children, their children and so on.</p>
<p>I am comforted by the fact that, while yes, my grandmother is no longer with us, that her life had meaning. This meaning is not something that will ever die, it lives on in all of us, and in a way, my grandmother lives on too.</p>
]]></content:encoded></item><item><title><![CDATA[Gut Feelings]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Recently, I have spent a great deal of time pondering the nature of what we call gut feelings. Personally, many of my decisions have been primarily guided by what I would describe as a gut feeling - but what is a gut feeling really?</p>
<p>I recently spoke to a woman</p>]]></description><link>https://blog.joepettit.com/gut-feelings/</link><guid isPermaLink="false">684da93de3132ed11c7dc369</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Thu, 09 Mar 2017 02:51:51 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Recently, I have spent a great deal of time pondering the nature of what we call gut feelings. Personally, many of my decisions have been primarily guided by what I would describe as a gut feeling - but what is a gut feeling really?</p>
<p>I recently spoke to a woman who posed an interesting idea, that our gut feelings are a mechanism by which the universe communicates with us - an invisible hand attempting to shape our fate and our destiny. There was more that went along with the idea, but the rest was cloaked in fictional ideas based around bona fide creatures that lived within us. I don&#x2019;t necessarily believe in those ideas, but I do think that the core concept is still valid.</p>
<p>In thinking about this some more I have been reminded of the concept of our &#x201C;lizard brain&#x201D; as some affectionately refer to it. Commonly, &#x201C;lizard brain&#x201D; refers to our more primal brain, the brain stem and associated areas. This area of the brain is commonly associated with reflexive actions that require little to no processing in the higher orders of the brain. For instance, the heart beat and respiration is largely controlled in this portion of the brain.</p>
<p>Evolutionarily speaking, the brain developed upwards, if you will, from the brain stem, eventually culminating in the frontal cortex that is responsible for much of the logic and reasoning us humans enjoy today.</p>
<p>I find it most curious that there are portions of our brain, that are very much brain in the literal sense, that we are unable to consciously tap in to. For instance, we cannot reason our heart beat down to some desired level, likewise, we cannot override the idea that we are hungry, or thirsty. This has lead me down the path of reasoning that perhaps our gut feelings have something to do with these active, but not consciously accessible portions of the brain.</p>
<p>The lesser brain, as I will refer to it from here on out, was what our earlier ancestors used to accomplish basic tasks. The lesser brain told them when they were hungry, it helped them move around and generally, live the life we see in most other reasonably evolved animals on earth. But there had to have been some sort of complex analysis done in this portion of the brain for our ancestors and animals to accomplish what are inherently complex tasks &#x2013; intercepting prey, analyzing images provided by the eyes to locate predators, and so on. These tasks likely happen autonomously given that these creatures are not conscious in the human sense. This is all well and good in creatures that only have primitive brains, but for humans there is so much more going on, especially with the frontal cortex and the higher orders of the brain.</p>
<p>So then, I&#x2019;ve reasoned that as humans, our lesser brains still process information much like what I have described above for animals and our ancestors. While this is no revelation in and of its self (it has been scientifically proven that this is the case), I have also posited that the lesser areas of the brain help us in processing complex situations more than we may realize.</p>
<p>Perhaps, what we describe as a gut feeling, is the lesser brain attempting to help us with our analysis of problems that are typically beyond its wheel house. While the frontal cortex and other higher brain orders act as a sort of central processing unit, picking apart details, perhaps the lesser brain acts as a sort of crude auditor, looking over the previously analyzed facts and drawing a more basic conclusion.</p>
<p>Given the separation, it would make sense that the lesser brain would communicates this information in an inherently vague and sometimes confusing way, in the form of a gut feeling.</p>
<p>What I find most intriguing about this idea, is that often, my gut feelings are counterintuitive. I spend a great deal of time analyzing a situation when anything more than a cursory decision is to be made, arguably, too much time. What I find curious, though, is that the conclusion I come to through my analysis is often logically sound and, objectively, a sound decision while my gut feeling is often completely the opposite.</p>
<p>Does this mean our lesser brains are better at processing this information? No, probably not, but then again I am not a brain scientist either. My interpretation of all of this has resulted in the idea that we should carefully consider our decisions, but not too carefully. Perhaps the over analysis that I, and probably some of you, are guilty of is clouding our judgement. Perhaps the logically sound choice isn&#x2019;t the best choice? As a big fan of logic (I am a programmer after all) it pains me to suggest this, if we can&#x2019;t trust logic what can we trust? But all in all, I take comfort in the idea that there is likely no &#x201C;right&#x201D; choice. With that in mind, we shouldn&#x2019;t be afraid of taking a chance &#x2013; if there is no &#x201C;right&#x201D; choice, logically, there can be no &#x201C;wrong&#x201D; choice either.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Another year down (2016)]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>It is that time of year again, time to reflect on what has happened over the past year, where I succeeded and where I failed, and more importantly set goals for the coming year.</p>
<p>I, like many of you, had a pretty rough year so I am quite pleased to</p>]]></description><link>https://blog.joepettit.com/another-year-down-2016/</link><guid isPermaLink="false">684da93de3132ed11c7dc368</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Mon, 02 Jan 2017 01:47:29 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>It is that time of year again, time to reflect on what has happened over the past year, where I succeeded and where I failed, and more importantly set goals for the coming year.</p>
<p>I, like many of you, had a pretty rough year so I am quite pleased to bid <em>adieu</em> to 2016.</p>
<p>I like to start these posts by covering what I actually did this year before delving into the specifics of last year&apos;s goals and how I did there, so here it goes!</p>
<ul>
<li>
<p>Started a new business - Last year I started Bitkumo with my friends Lev and Mike. Things didn&apos;t work out super well there, but before Bitkumo ended Lev and I started a new business, <a href="https://statusy.co/?ref=blog.joepettit.com">Statusy</a>. Statusy makes affordable status pages. I&apos;ve put tons of time into this business and it has grown over the year into a profitable business.</p>
</li>
<li>
<p>Lost a job - I really enjoyed my time at Virtkick, but unfortunately budgetary constraints resulted in me being laid off around the beginning of the summer. While this sucked at the time, I look at it as a blessing in disguise, giving me a chance to relax and work on personal projects for the first time since I was high school.</p>
</li>
<li>
<p>Got a new job - One door closes, another opens. Not long after I departed from Virtkick I started working for <a href="https://plaid.com/?ref=blog.joepettit.com">Plaid Technologies</a>, a position I have really come to love over the past few months. I feel like this position was made for me and it is allowing me to grow substantially as a developer.</p>
</li>
<li>
<p>Moved - Another year, another move. After I finished my time at Virtkick my then girlfriend and I decided it would be wise to move closer to family, so we packed up our apartment and moved north to Minnesota. When we arrived it wasn&apos;t much different than San Antonio, honestly the heat was kind of worse (with humidity stacked in), but I quickly forgot about that as we moved into the winter and sub-zero temperatures. I never understand what -19 meant in terms of temperature, but I do now: pain.</p>
</li>
<li>
<p>Traveled - I had the pleasure of taking a road trip from San Antonio to the Minneapolis area at the beginning of the year so my then girlfriend could attend a friend&apos;s wedding. I love road tripping and it is always a joy to see family so that was a good time. I also spent a few weeks in San Francisco, I hadn&apos;t been there previously but it was an enjoyable time, thanks Plaid!</p>
</li>
<li>
<p>Ended a relationship - Easily the roughest part of the year was the end of my near nine year relationship with my girlfriend, April. Break ups always suck, but this was especially rough given the time and experiences we had together. Fortunately, many friends and family were there to help me make it through to the other side with relatively minor wounds, thanks guys!</p>
</li>
</ul>
<p>With that out of the way, it is time to look at what I wanted to accomplish this year. In my <a href="https://joepettit.com/another-year-down-2015/?ref=blog.joepettit.com">post from 2015</a> I listed the following goals for 2016:</p>
<ul>
<li>
<p>Grow Bitkumo - This sort of happened. Bitkumo stagnated about four months after the beginning of the year, my good friend and then business partner Lev decided we shouldn&apos;t proceed. After some himming and hawing we eventually decided to sell the business to Virtkick, who continues to operate Bitkumo to this day. But hey, a successful exit is still success!</p>
</li>
<li>
<p>Get my code into production - Check! Much of my code eventually went into production at Virtkick. I also have a fair number of things in production with my current employer.</p>
</li>
<li>
<p>Learn RoR - A swing and a miss. I learned what I needed to know during my time at Virtkick, but after moving to a company that didn&apos;t utilize Rails I kind of lost interest. I have more than made up for this in my improved JS skills though.</p>
</li>
<li>
<p>Continue growing as a developer - Definitely. I&apos;ve learned a ton more about Javascript, wrote a React/Redux app and continued expanding my Python knowledge. I have also improved my code reading skills drastically. I never imagined this would be as hard as it is, but it is definitely a skill to be developed.</p>
</li>
<li>
<p>Continue growing as a person - Sure. With the end of the relationship I mentioned above I took a lot of time to do some soul searching and learn a bit more about myself. Through this I&apos;ve become a better Joe, I think.</p>
</li>
</ul>
<p>Overall I am happy with my progress for the year, especially given the difficulties it has introduced. Now, on to 2017!</p>
<ul>
<li>
<p>Continue growing Statusy - I love working on Statusy, I have found a great partner in <a href="https://twitter.com/wojtekjodel?ref=blog.joepettit.com">Wojtek</a>, a former colleague from Virtkick. Together we have made innumerable improvements to the Statusy platform including several major redesigns, improved UI/UX and more features than I can count on my fingers and toes. I want to continue growing this business, it is fun, and I feel it fills a hole in the market.</p>
</li>
<li>
<p>Continue learning about myself - It sounds kind of like BS, but hey it is what it is. Doing my own thing has allowed me to learn more about who I am, what I am, and what I want. I want to continue this adventure in 2017.</p>
</li>
<li>
<p>Resume pilot training - A few years back I started developing a love of aviation. This manifested its self in the pursuit of my private pilots certificate. Unfortunately, things didn&apos;t work out financially so I ultimately stopped this pursuit, but now that I am where I am, it seems like a great time to pick this up again.</p>
</li>
<li>
<p>Have fun - Another thing I have learned throughout the year is that working all the time is simply no fun. I&apos;ve had several very productive years, but working all the time has started to have an impact on myself today, my previous relationship and relationships with friends and family. I don&apos;t intend to become a bum, but I do want to take it easy this year and enjoy myself a bit more.</p>
</li>
</ul>
<p>With that, good bye 2016, hello 2017. I hope you all have a great 2017!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Pivotal Moments]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Another year is coming to an end, thankfully. Like most others, I have had a rather dreadful year, bidding 2016 farewell will be quite satisfying. The end of the year always makes me reflect on how things went over the course of the year. This year I have been thinking</p>]]></description><link>https://blog.joepettit.com/pivotal-moments/</link><guid isPermaLink="false">684da93de3132ed11c7dc367</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Sat, 31 Dec 2016 04:10:41 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Another year is coming to an end, thankfully. Like most others, I have had a rather dreadful year, bidding 2016 farewell will be quite satisfying. The end of the year always makes me reflect on how things went over the course of the year. This year I have been thinking quite a bit about pivotal moments.</p>
<p>Looking back, there are a number of moments in my life that drastically altered where I am today. At the time, these decisions did not feel like they would be pivotal. In some cases, the outcome was disappointing, in others, indifference, and in some I fought tooth and nail to prevent that outcome.</p>
<p>But, despite my efforts, things ended up happening <em>this</em> way, this <em>specific</em> way and I am where I am because of each and every one of those minute decisions.</p>
<p>This got me thinking, what was the first pivotal decision that I made? Was it deciding not to play soccer in middle school? Picking to sit next to X or Y at lunch? At some point in my past there was a moment that created this particular path through life. I don&apos;t know what this moment was, but I wish I did.</p>
<p>After thinking about this extensively lately I&apos;ve decided that I need to start living in the <em>now</em> more often, rather than the future. The decisions we make today can be the pivotal decisions we look back on in a few year&apos;s time. Taking time to live in the moment and ultimately make yourself susceptible to these pivotal moments can shape your future in a big way.</p>
<p>Think before you act, but not too much. Happy New Years everybody!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Break In]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I mentioned in my <a href="https://joepettit.com/people-not-things/?ref=blog.joepettit.com">other post</a> about some events that fundamentally changed my view on the world. Here, I wanted to dive into one event in particular, the break in I experienced in early August this year.</p>
<p>Not long after I moved from Texas to Minnesota to be with my</p>]]></description><link>https://blog.joepettit.com/break-in/</link><guid isPermaLink="false">684da93de3132ed11c7dc366</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Sun, 11 Dec 2016 19:04:04 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I mentioned in my <a href="https://joepettit.com/people-not-things/?ref=blog.joepettit.com">other post</a> about some events that fundamentally changed my view on the world. Here, I wanted to dive into one event in particular, the break in I experienced in early August this year.</p>
<p>Not long after I moved from Texas to Minnesota to be with my girlfriend&apos;s family I headed out to San Francisco for a couple weeks to do onboarding for a new position I had just secured. The onboarding went great, I loved (and still do) my new company and the expereince overall was exemplary. It was the last weekend I would be in San Francisco, I remember snapping awake around 8 AM. I rolled over and grabbed my phone, as I usually do in the morning, to see what had happened while I slept. I saw one message from my girlfriend &quot;Dude, look at the camera&quot;.</p>
<p>I had purchased a &quot;smart&quot; security camera and set it up in the apartment before I left. The camera had an app that notified you of movement, or in this case, an &quot;Unknown Face&quot;. I looked at the other notifications on my phone and my heart dropped, I saw several &quot;Unknown Face&quot; notifications in a row.</p>
<p>I quickly opened the app and started watching the videos. The first shows a man kicking down our door, walking in and looking around. The others showed two other men carrying things out of our apartment. One video showed our TV sitting in the hallway before one of the burglars swept it up into what I assume was a waiting vehicle. I looked at the live view on the camera to see the now shattered door to our apartment hanging about half open with nobody to be seen.</p>
<p>The feeling was devestating - sitting a thousand some odd miles away, in an Airbnb watching your apartment being robbed.</p>
<p>My girlfriend, who was still in Minnesota at the time, but away with family handled the event like a true champ. She managed to call the police (for the record, if you need to call the police in another area, just dial 911 and they can connect you to the police department where the crime is happening) and not long after I watched the videos I saw more &quot;Unknown Face&quot; notifications as the police had arrived.</p>
<p>After I arrived home, my girlfriend and I combed through the apartment to see what had been taken. We found our TV missing, a box of credit cards and other personal documents missing, all of my girlfriend&apos;s jewelery, an iPad and some other miscellaneous things were all nowhere to be found. This sucked, especially my girlfriend&apos;s jewelry (which included a number of sentimental pieces), but the coming days would make it clear this was not the primary loss.</p>
<p>We stayed with my girlfriend&apos;s family for about a week after I returned from San Francisco while we made improvements to the security of the apartment. When we were satisfied, we hesitantly moved our things back into the apartment and spent our first night there. Neither of us slept, every little creak and whisp of wind made us roll over and check our security camera for invaders. This continued, unfortunately, for months.</p>
<p>When I thought of what a burglary was in the past, I always thought about losing things. Things like laptops, jewelry, TV&apos;s and such, just like the things we lost. But what I never thought about is the emotional and psychological impact something like this has on you. An event like this kind of introduces fear as a regular emotion in your life. Will they come back? If they do will they hurt us? Should we move?</p>
<p>I am fortunate in that I have never really felt true fear, but having it forcefully added as a regular feeling in your life is very traumatic.</p>
<p>Despite how bad this experience was, it does have a silver lining. It has made me realize that physical security is a very real thing, and it goes beyond a lock on the door. True security should exist in layers. Introduce redundancies to ensure an invader is caught before they have the opportunity to enter your home, and if they do enter, make sure you can watch their every move.</p>
<p>Beyond the security implications, I also wanted to mention that should something like this happen to you, go find yourself a therapist to talk about it. My girlfriend and I did not do this, but looking back on it and our experience since I really wish we had. This is very much a traumatic experience, it isn&apos;t something you should just sweep under the carpet and move on with. Deal with it while it is fresh and you will probably suffer much less in the months after.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[People, Not Things]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Every now and again you encounter a series of events that fundamentally changes the way you view the world. For me, the past few months have held a number of events that have definitely change my view substantially.</p>
<p>Looking back, I&apos;ve realized that I placed a great deal</p>]]></description><link>https://blog.joepettit.com/people-not-things/</link><guid isPermaLink="false">684da93de3132ed11c7dc365</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Sun, 11 Dec 2016 18:05:50 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Every now and again you encounter a series of events that fundamentally changes the way you view the world. For me, the past few months have held a number of events that have definitely change my view substantially.</p>
<p>Looking back, I&apos;ve realized that I placed a great deal of importance in objects. I spent time looking at cool new gadgets, tech and other gizmos that I longed for, so much so that I would buy them against my better financial judgement. I&apos;m not sure if this is strictly a Joe thing, or a symptom of being very wrapped up in technology as a whole, but I have realized that this is not the way I should be.</p>
<p>As I mentioned above, a number of events have happened in my life in the past few months that have given me pause, so much so that I have taken time to evaluate my perception, my actions and myself at a fundamental level. What I previously thought were sources of happiness (gadgets, tech, and so on) I have realized were just a sort of bandaid to keep me going. The joy of getting that new NAS, or the new iPhone is fleeting. It feels incredible at first, but you quickly forget how it made you feel and look for the new gadget or gizmo to purchase.</p>
<p>I&apos;ve realized, what is not fleeting though is the feeling you have when you are around those who love and care for you. I have never, not even once, found myself longing for a lost object (hold maybe one of signficiant sentimental value), but now, as this rough year comes to a close, I do find myself longing for those who are no longer around.</p>
<p>So, I suppose the point of this little entry is to pay attention to those who matter to you most, especially as we enter the holidays. It has been said a thousand times, I am sure, but sometimes you do not realize what you have until it is gone, this has held especially true for me this year. So take time, evaluate yourself and think of who matters to you and give them a hug and a kiss, while they are still there.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Co-Founders]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I have learned so much about the startup life over the past couple years. I worked with a larger startup, a smaller one, and several that I can call my own. I learned how funding works, how marketing works, how sales happen (how sales don&apos;t happen), how to</p>]]></description><link>https://blog.joepettit.com/co-founders/</link><guid isPermaLink="false">684da93de3132ed11c7dc364</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Thu, 26 May 2016 04:25:16 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I have learned so much about the startup life over the past couple years. I worked with a larger startup, a smaller one, and several that I can call my own. I learned how funding works, how marketing works, how sales happen (how sales don&apos;t happen), how to avoid technical mistakes and how to make great products.</p>
<p>Despite all of this, I believe the most important thing I have learned over this time has to do with co-founders.</p>
<p>Co-Founders are those people who share your vision - they work for little or no pay, they do the grunt work early on, they transform the vision into a real product. They do this in hopes of creating something great. Co-Founders are immensely important in shaping the future of your company. Given this, you should take time in considering <em>who</em> should become a co-founder.</p>
<h3 id="whattoconsider">What to consider</h3>
<p>To become better at this process I have compiled this short list of things to consider. This list is by no means exhaustive, but I think it covers most of your bases.</p>
<h4 id="1howdoyouworkwiththisperson">1. How do you work with this person?</h4>
<p>Find out how your potential co-founder works. Things I have found of particular important include:</p>
<ul>
<li>How many hours will this person put in to the business?</li>
<li>How fast do they work?</li>
<li>How detail oriented are they?</li>
</ul>
<p>Bringing somebody on board who works slower than you, less time than you, and sloppier than you will make you (and probably the rest of the team) pretty unhappy. Make sure you see eye to eye with your potential co-founder, make sure you are both ready to put in similar amounts of effort and you have similar ideas about the quality of your work.</p>
<h4 id="2whatdotheybringtothetable">2. What do they bring to the table?</h4>
<p>Ideally, you should bring on co-founders that fill some gap in skills at your company. Given this, make sure the potential co-founder has skills that are valuable to you and your team. Already have five backend devs? It probably isn&apos;t wise to bring on a co-founder who loves writing backend code.</p>
<p>However, bringing on a co-founder with overlapping skills isn&apos;t necessarily a bad thing if the person brings other things to the table, but just be mindful about how other co-founders or team members may feel if you bring somebody else into the fray that may do the same thing they are doing.</p>
<h4 id="3doyoulikethisperson">3. Do you like this person?</h4>
<p>Arguably one of the most important traits you should be looking for is relatability. This is somebody you are going to be dealing with every day for the next few years so you should pick somebody you generally like.</p>
<p>Do not invite somebody to join your team as a co-founder if you can&apos;t stand them - regardless of how skillful they may be.</p>
<h4 id="4arethereanywarningsigns">4. Are there any warning signs?</h4>
<p>Generally, people who are up for coveted co-founder positions are people you know somehow. They are friends or co-workers, so you probably know a fair amount about them. You should use any and all of this information to your advantage:</p>
<ul>
<li>Have they done something like this before? How did it end?</li>
<li>How do they interact with others? Are they well liked?</li>
<li>What is their previous work like? Are they known for quality?</li>
</ul>
<p>If the answers to these questions are not positive you may want to reconsider bringing this person on as a co-founder. I have found that behaviors from the past rarely disappear completely - if the person has done something undesirable in the past, it is likely that behavior will continue in the future. Make sure you are okay with this.</p>
<h3 id="theteamismoreimportantthantheidea">The team is more important than the idea</h3>
<p>If you are like me, you have probably read tons of stories about startups, how they failed, how they succeeded and what could be done better. One common theme I have found is that the team is more important than the idea and execution is key. That being said, you should set yourself up for success by picking the best possible co-founders early. It is easier to be critical now than it is to deal with a bad match later on.</p>
<p>Have any other tips about selecting good co-founders? Please let me know, I&apos;d love to hear your suggestions.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Statusy]]></title><description><![CDATA[The main players in the hosted status page market want upwards of $30. This is far too expensive, so I made Statusy, for just $10.00 per month.]]></description><link>https://blog.joepettit.com/statusy/</link><guid isPermaLink="false">684da93de3132ed11c7dc363</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Sun, 20 Mar 2016 19:05:46 GMT</pubDate><content:encoded><![CDATA[<p>After starting <a href="https://bitkumo.com/?ref=blog.joepettit.com">Bitkumo</a> I quickly came to the realization that hosted status pages were <em>far</em> too expensive for what they were. The main players right now want upwards of $30-40 per month for what is mostly a static website. This is far too much for a company that is just getting started - in the early stages $30-40 could be difference between profit and loss.</p>
<p>Upon realizing there was a major gap in the hosted status page market, <a href="https://levlaz.org/?ref=blog.joepettit.com">Lev Lazinksiy</a>, <a href="https://feliciano.tech/?ref=blog.joepettit.com">Ricardo Feliciano</a> and I started working on a product to fill that gap, <a href="https://statusy.co/?ref=blog.joepettit.com">Statusy</a>.</p>
<p>We started working on Statusy in mid-January earlier this year, and I am very pleased to announce that <a href="https://statusy.co/?ref=blog.joepettit.com">Statusy</a> is open to the world in an early release state.</p>
<p>Our mission with Statusy was twofold:</p>
<ol>
<li>Make an excellent hosted status page that truly met all the needs of our potential customers</li>
<li>Make it affordable enough for even early stage startups to afford</li>
</ol>
<p>I am please to say we have succeeded on both fronts.</p>
<p>Statusy offers almost all of the features of other providers including:</p>
<ul>
<li>Customization - Logos, CSS, domains</li>
<li>Social integration - Twitter for now, but more to come</li>
<li>Redundancy - All of our infrastructure is fully redundant, your status page will be there when you need it most</li>
<li>Teams - No need to share one login, we offer team accounts so any member of your team can update your status page</li>
<li>Extensible - We have launched with a robust RESTful API so you don&apos;t even need to log in to report things</li>
</ul>
<p>We have managed to offer all of this for just $10.00 per month, <strong>this is nearly 66% off the price of other providers</strong>.</p>
<p>That being said - it would be excellent if you were to <a href="https://statusy.co/auth/register?ref=blog.joepettit.com">give Statusy a try</a>.</p>
<p>We consider Statusy to be in an early release state so we are primarily looking for feedback. If you give Statusy a try and have any feedback please feel free to add it via the in-app feedback button in the bottom-right corner, or via email to <a href="mailto:hello@statusy.co">hello@statusy.co</a>.</p>
<p>Thanks for reading!</p>
]]></content:encoded></item><item><title><![CDATA[Another year down (2015)]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I always seem to find myself reflecting upon the year during the holidays - where I was this time last year and where I am now. This year has been pretty good to me overall. I&apos;ve gone on several adventures, moved to Texas, gotten a new job, started</p>]]></description><link>https://blog.joepettit.com/another-year-down-2015/</link><guid isPermaLink="false">684da93de3132ed11c7dc362</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Thu, 24 Dec 2015 04:19:51 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I always seem to find myself reflecting upon the year during the holidays - where I was this time last year and where I am now. This year has been pretty good to me overall. I&apos;ve gone on several adventures, moved to Texas, gotten a new job, started my own company and so much more. I&apos;m super excited that I&apos;ve kept to this blog going for a whole year - I&apos;ve always enjoyed writing but I seem to lack the dedication to keep a single project moving. Fortunately, that is not the case for this blog, this is especially fortunate because last year I wrote a <a href="https://joepettit.com/another-year-down/?ref=blog.joepettit.com">post</a> very similar to this one. This allows me the opportunity to compare what I&apos;ve done this year with what I wanted to do last year. So here it goes!</p>
<p>According to last year&apos;s post, I wanted to do these things in 2015:</p>
<ul>
<li>
<p>Obtain RHCSA - This did not end up happening, primarily because my situation changed pretty drastically over the course of 2015 - because of this, the RHCSA was not as valuable as it was to me last year.</p>
</li>
<li>
<p>Complete Master&apos;s program - This did not happen either. No good reason, just laziness.</p>
</li>
<li>
<p>Learn more virtualization - This definitely happened.</p>
</li>
<li>
<p>Learn Ruby - I would say this one is 50/50 - I definitely know more Ruby than last year, but I am certainly not proficient yet.</p>
</li>
<li>
<p>Work on personal projects - This absolutely happened.</p>
</li>
<li>
<p>Move - I&apos;m writing this from San Antonio, TX where it is 80 degrees in December. Check!</p>
</li>
</ul>
<p>So all in I was able to accomplish a total of 3 (and a half) goals from last year, 60% met, not too bad!</p>
<p>Now, on to what I&apos;ve actually done this year:</p>
<ul>
<li>
<p>Created <a href="https://joepettit.com/tag/spacepanel/?ref=blog.joepettit.com">SpacePanel</a> - SpacePanel is easily the best thing I&apos;ve ever personally made. I don&apos;t mean best as in it was awesome for other people, but best as in I learned <em>so much</em> writing it. I learned about libvirt, KVM, maintaining an actual project with people who care about the project and even a bit about crowdfunding. The knowledge is definitely the best thing to come from the project, but <em>very close</em> runner up was a new position at a Techstars company called <a href="https://virtkick.com/?ref=blog.joepettit.com">Virtkick</a>.</p>
</li>
<li>
<p>Became a developer at Virtkick - Looking back it is amazing that Virtkick and I ever connected. Virtkick learned of me because I made a snide remark on one of their blog posts (saying how SpacePanel rocked and people should use it instead of Virtkick). This got the attention of the founders of Virtkick who apparently admired my dedication to SpacePanel. Shortly after making that comment, Nowaker and Rush reached out to me, told me they liked SpacePanel and wanted me to come work for them in San Antonio. So that is exactly what I did.</p>
</li>
<li>
<p>Left my position at DigitalOcean - After getting a job offer from Virtkick I toiled for days trying to decide what to do. On one hand, I had a great job at an amazing company, but on the other hand: adventure, experience and the chance to do something I love (writing code). I eventually decided to resign from my position at DigitalOcean and move to San Antonio to work with Virtkick.</p>
</li>
<li>
<p>Moved to San Antonio - About a month after I left DigitalOcean and started working at Virtkick remotely April and I packed up all of our stuff in a big Penske truck and began the three day drive to the great state of Texas.</p>
</li>
<li>
<p>Wrote some cool software - Working at Virtkick has been amazing - I wrote code, all day every day. Previously this was something I only did for fun, but the idea of doing it all the time and <em>getting paid for it</em> was incredible. I learned so much throughout the year and I made a super cool new backend system for the company. Said super cool new backend system is now being tested at Bitkumo.</p>
</li>
<li>
<p>Traveled a bit - The Grand Canyon has always been on my bucket list. Right before we moved we were planning on flying out to Arizona to check out the Grand Canyon. Unfortunately, the move was pretty expensive so we had to cancel this trip. Fortunately, not long after getting to San Antonio we were able to visit the Grand Canyon with several friends. Getting there was an adventure - wanting to do the trip as cost effective as possible we did the 16+ hour one-way trip in a single day, spent two days checking our Arizona, and then did another super-not-fun 16+ hour day in the car. But all in, it was super worth it. You can know something is big, you can see pictures of it and see that it is big, but I find it almost impossible to comprehend how big something like the Grand Canyon is until you are standing there before it. It is, in a word, incredible.</p>
</li>
<li>
<p>Started a business - Along with two of my great friends and colleagues <a href="https://levlaz.org/?ref=blog.joepettit.com">Lev</a> and <a href="https://twitter.com/MikeyYeahYeah?ref=blog.joepettit.com">Mike</a> I started a new cloud hosting called <a href="https://bitkumo.com/?ref=blog.joepettit.com">Bitkumo</a>. Bitkumo of course uses Virtkick (specifically the backend system that I wrote myself - how cool is that?). The company is still young (about a week old at the time of writing) but things are moving fast and it is <em>awesome</em>.</p>
</li>
</ul>
<p>So I think the tl;dr is that it has been an <em>awesome year</em>. Now that the year is nearing its end, its time to look to the future. That being said, my goals for 2016 are:</p>
<ul>
<li>
<p>Grow Bitkumo into a strong, thriving business - I love business, I love strategy and I feel 100% in my element working with Bitkumo. I&apos;m dedicated to making Bitkumo an awesome platform and a great company in 2016.</p>
</li>
<li>
<p>Get my code into production - I&apos;ve spent most of 2015 working on the aforementioned backend at Virtkick. In 2016 I want to see this code go to production. This would be the first time something I&apos;ve written is actually used for anything remotely resembling production - that idea is both frightening and very exciting.</p>
</li>
<li>
<p>Learn Ruby/Rails - This didn&apos;t completely happen in 2015 so I&apos;m adding it to my goals for 2016. Ruby as a language, and Rails as a framework have a huge following. I firmly believe becoming proficient in RoR will be a good thing for my career overall, so I&apos;m going to make it happen.</p>
</li>
<li>
<p>Continue growing as a developer - The most rewarding thing for me as a developer is seeing my code in use, but a super-close second is seeing my code improve. I love looking at code I wrote a year ago, saying &quot;Wow this is terrible!&quot; and realizing how far I&apos;ve come. This needs to continue.</p>
</li>
<li>
<p>Continue growing as a person - This means traveling, spending time with my friends and family, learning, and overall learning to live a better healthier life.</p>
</li>
</ul>
<p>I&apos;m looking forward to another great and productive year in 2016. I hope 2015 has been great for you and I hope 2016 is even better!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Getting Started: Callbacks and Promises]]></title><description><![CDATA[New to Node? Wondering what the heck a callback or a promise is? Take a quick read through this guide to hit the ground running. ]]></description><link>https://blog.joepettit.com/getting-started-promises/</link><guid isPermaLink="false">684da93de3132ed11c7dc361</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Tue, 03 Nov 2015 03:53:23 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Coming from Python, Node.js quickly blew my mind with the whole concept of asychronous stuff. I don&apos;t think I actually understood managing things asynchronously for a few months after I started writing Javascript (lets be honest, I probably still don&apos;t completely understand it). While the wound is still fresh, I figured I would take some time to write a basic guide for navigating callbacks and promises in Node.js.</p>
<h4 id="why">Why</h4>
<p>If you&apos;ve come from something like Python or other popular languages threading has likely been something that was either done automatically by a module or something you&apos;ve had complete control over. In Node threading doesn&apos;t really exist, you have one thread so good luck and have fun!</p>
<p>With &gt;1 threads you can do several things (perhaps things that are even blocking) at the same time without impacting the application as a whole (that is, other requests can still be served). With a single thread, a blocking action will block the application as a whole - if you make a synchronous call other requests will need to wait for that task to finish. This is clearly undesirable for things like web applications. What good is an application that can only serve one request at a time? Node addresses this with callbacks, and more recently promises.</p>
<h4 id="callbacks">Callbacks</h4>
<p>A callback is a function that is executed after a task is completed. It usually looks something like this:</p>
<pre><code>asynchronousFunction(argument, function(response) {
	// When the function is finished doing whatever it is doing, this stuff is executed
    // The callback takes any return values as arguments, so if asynchronousFunction returned 1+1, response would be 2
    console.log(&quot;asynchronousFunction is done with the response&quot;, response);
});
</code></pre>
<p>You can also use a callback that is defined elsewhere like this:</p>
<pre><code>asynchronousFunction(argument, callbackFunction);

function callbackFunction(response) {
	// This is executed when the function is done doing its stuff
    console.log(&quot;asynchronousFunction is done!&quot;);
}
</code></pre>
<p>In general, callbacks will first take an error argument and then other arguments that are returned by the function that is utilizing the callback. You can test to see if the <code>error</code> object exists after each call to see if the call was successful:</p>
<pre><code>asynchronousFunction(argument, function(error, response) {
	if (error) { 
    	console.log(&quot;Something broke!&quot;);
        return; 
    }
    // If this is executed there was no error!
});
</code></pre>
<p>The problem with callbacks is they are a little messy. Consider a chain of asynchronous functions that need to run one after another:</p>
<pre><code>aFunction(argument1, function(response) {
	// This runs after aFunction is done
	bFunction(argument2, function(response2) {
    	// This runs after bFunction is done
        cFunction(argument3, function(response3) {
        	// This runs after cFunction is done
        });
    });
});
</code></pre>
<p>Not too pretty right? It gets even uglier if you want to deal with errors properly at every step of the chain:</p>
<pre><code>aFunction(argument1, function(error, response) {
	// This runs after aFunction is done
    if (error) { return error; }
	bFunction(argument2, function(error, response2) {
    	// This runs after bFunction is done
        if (error) { return error; }
        cFunction(argument3, function(error, response3) {
        	if (error) { return error; }
        	// This runs after cFunction is done
        });
    });
});
</code></pre>
<p>Fortunately promises help make this much neater, easier to read and easier to control.</p>
<h4 id="promises">Promises</h4>
<p>A promise is essentially an abstraction of a callback that uses simple to understand syntax and structures. A promise is just that, a promise to give something in the future. For example, say <code>asynchronousFunction</code> from above makes a call to an API requesting all of the virtual machines on an account. That process isn&apos;t instant, so it returns a promise which is a placeholder for the list of all the virtual machines on an account. A promise can be either <code>resolved</code> or <code>rejected</code>. A resolved promise is one that fulfilled its promise so to speak and actually has the data you were promised. A rejected promise happens if an error is encountered.</p>
<p>So to rewrite the <code>asynchronousFunction</code> from above using promises you would do something like this:</p>
<pre><code>asynchronousFunction(argument).then(function(response) {
	// Executed after function is done
});
</code></pre>
<p>The flow works just like it states, do this function, <code>then</code> do this. You can also pass around promises pretty easily:</p>
<pre><code>function aFunction() {
	return asynchronousFunction(argument);
}

aFunction.then(function(response) {
	// Executed after asynchronousFunction is done
});

</code></pre>
<p>Error management is a breeze:</p>
<pre><code>asynchronousFunction(argument).then(function(response) {
	// This is executed if the promise is resolved
}).catch(function(error) {
	// This is executed if the promise is rejected
});
</code></pre>
<p>Promises really shine when you have to link a bunch of stuff together. Recall how callbacks looked with multiple functions and then take a look at the syntax used by promises:</p>
<pre><code>aFunction(argument).then(function(response) {
	// Executed after aFunction is done
	return bFunction(argument2);
}).then(function(response2) {
	// Executed after bFunction is done
	return cFunction(argument3);
}).then(function(response3) {
	// Executed after cFunction is done
    return &quot;All done&quot;;
});
</code></pre>
<p>Much cleaner and easier to read in my opinion. Errors can also propagate up the promise chain fairly easily as long as all promises in the chain are returned properly. A single catch statement for the entire chain will catch any errors thrown while processing those promises:</p>
<pre><code>aFunction(argument).then(function(response) {
	// Executed after aFunction is done
	return bFunction(argument2);
}).then(function(response2) {
	throw new Error(&quot;foobar&quot;); 
	// Executed after bFunction is done
	return cFunction(argument3);
}).then(function(response3) {
	// Executed after cFunction is done
    return &quot;All done&quot;;
}).catch(function(error) {
	// Caught error from bFunction and stops executing
});
</code></pre>
<p><a href="https://github.com/petkaantonov/bluebird?ref=blog.joepettit.com">Bluebird</a> is (in my opinion) the best library to use for this sort of thing. You can do tons of really cool stuff with it, including converting things that require callbacks to promises using <code>promisifyAll</code>:</p>
<pre><code>var libraryThatUsesCallbacks = require(&quot;callbackLibrary&quot;);
var Promise = require(&quot;bluebird&quot;);

Promise.promisifyAll(libraryThatUsesCallbacks);

// libraryThatUsesCallbacks can now be used like so

libraryThatUsesCallbacks.aFunctionAsync(argument).then(function(response) {
	// I&apos;m a promise now! 
});

// Bluebird adds new functions that basically map to the old function name + async, so bFunction would become bFunctionAsync
</code></pre>
<p>This can generally be done for all functions that use the <code>callback(error, arguments)</code> pattern though Bluebird does <a href="http://bluebirdjs.com/docs/api/promise.promisifyall.html?ref=blog.joepettit.com">support</a> other arrangements as well. Bluebird supports a wide array of other things, I would recommend taking a look at the <a href="http://bluebirdjs.com/docs/api-reference.html?ref=blog.joepettit.com">API documentation</a>.</p>
<h4 id="conclusion">Conclusion</h4>
<p>Given the single threaded nature of Node applications learning how to write asynchronous code, and more importantly, think asynchronously, is necessary to becoming a successful Node developer. This isn&apos;t an easy task, especially if you are not used to thinking about things in this way, it took me a long time to fully grasp the concepts and properly use asynchronous functions so don&apos;t worry if it takes a bit. Hopefully this post will help you learn the basics if you are looking to develop Node applications. Please feel free to leave any questions in the comments.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Node-Libvirt: Promisification]]></title><description><![CDATA[Node-Libvirt is now completely asynchronous. Take a look at this basic syntax guide for using the new promisified API. ]]></description><link>https://blog.joepettit.com/node-libvirt-promisification/</link><guid isPermaLink="false">684da93de3132ed11c7dc360</guid><dc:creator><![CDATA[Joe Pettit]]></dc:creator><pubDate>Wed, 26 Aug 2015 04:28:46 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>After adding a couple things to Node-Libvirt one of the maintainers <a href="https://github.com/hooklift/node-libvirt/pull/49?ref=blog.joepettit.com#issuecomment-121771303">pointed out</a> my <a href="https://joepettit.com/getting-start-node-libvirt-domains-hypervisors/?ref=blog.joepettit.com">original article</a> on Node-Libvirt referenced the old callback style of using the library so I wanted to take a moment to write up a new guide for using Node-Libvirt with promises rather than callbacks. Since my first post offers a fair amount of detail regarding Node-Libvirt in general, I&apos;ll limit this one to showing syntax only.</p>
<h3 id="hypervisor">Hypervisor</h3>
<p>First lets take a look at connecting to the hypervisor using promises. Of the changes, this is the most prominent (in my opinion anyway).</p>
<h4 id="connection">Connection</h4>
<pre><code>var libvirt = require(&apos;libvirt&apos;);
var hypervisorObject = libvirt.hypervisor;

var hypervisor = new hypervisorObject(&apos;qemu:///system&apos;);

hypervisor.connect(function() { 
    // The hypervisor object is now connected. From here you can do just about any call you want...
    // Like hypervisor.lookupDomainById(1);
});
</code></pre>
<p>You&apos;ll probably want to wrap the code you need to access the hypervisor with in the <code>hypervisor.connect()</code> function to ensure the connection has been made before you attempt to communicate with the hypervisor.</p>
<h4 id="everythingelse">Everything Else</h4>
<p>It isn&apos;t really worth noting each and every function I mentioned originally, but I will give you a couple examples for how things look using promises.</p>
<p>The basic idea is you add <code>Async</code> to the name of the function you want to call, and then use <code>then</code> instead of a callback. For example:</p>
<pre><code>hypervisor.helloWorld(function(callback) {
	// Old style
});

hypervisor.helloWorldAsync(arguments).then(function(return_value) {
	// New style
});
</code></pre>
<p>For real example take a look at a call to <code>getNodeInfo</code>:</p>
<pre><code>hypervisor.getNodeInfoAsync().then(function(nodeStats) {
	// nodeStats now has the return value from getNodeInfo
});
</code></pre>
<h3 id="domains">Domains</h3>
<p>Domains use pretty much the same syntax shown above but I&apos;ll run through a few examples:</p>
<pre><code>// Lets make a new domain
hypervisor.defineAsync(domainXML).then(function(domain) {
	// Use domain to access this domain now
    
    // Now lets restart that domain
    domain.startAsync().then(function() {
    	// Domain has been restarted
    });
});

// Lets lookup a domain with the id 1
hypervisor.lookupDomainByIdAsync(1).then(function(domain) {
	// Use the domain object to do other stuff
});
</code></pre>
<h3 id="wouldyouliketoknowmore">Would you like to know more?</h3>
<p>From here, everything looks almost identical to the syntax you see above. Just append <code>Async</code> to the name of the function and use <code>then</code> instead of a callback and you will be good to go.</p>
<p>If there are any specific calls you are interested in seeing please don&apos;t hesitate to leave a comment. Most of these calls do have examples in the Node-Libvirt <a href="https://github.com/hooklift/node-libvirt/tree/master/test?ref=blog.joepettit.com">tests</a>. If you are planning on using Node-Libvirt consider following me on <a href="https://twitter.com/joseph_pettit?ref=blog.joepettit.com">Twitter</a> as I intend to document the full Node-Libvirt API in the future.</p>
<p>Thanks for reading!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>