<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>@ctshryock</title>
 <link href="http://ctshryock.com/atom.xml" rel="self"/>
 <link href="http://ctshryock.com/"/>
 <updated>2016-02-04T09:13:51-06:00</updated>
 <id>http://ctshryock.com/</id>
 <author>
   <name>Clint Shryock (@ctshryock)</name>
   <email>info@ctshryock.com</email>
 </author>
 
    
 
    
     <entry>
       <title>MTL :: posts</title>
       <link href="http://ctshryock.com/posts/2016/02/04/mtl.html"/>
       <updated>2016-02-04T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2016/02/04/mtl</id>
       <content type="html">&lt;p&gt;There are countless articles and guides on helping you get things done. Probably even more books. Talks, sermons, infomercials. Here’s another one.&lt;/p&gt;

&lt;p&gt;Over the years I’ve tried several techniques to &lt;em&gt;get things done&lt;/em&gt;. A few years back TODOs and GTDs were a huge deal that everyone talked about. I didn’t get into them because of that, but because I needed to get things done and damn, there are tons of distractions, and I’m prone to paying attention to them. &lt;/p&gt;

&lt;p&gt;For a while I used various apps to help me here. I even used my own little &lt;a href=&quot;https://basecamp.com&quot;&gt;Basecamp&lt;/a&gt; setup, but eventually I think I picked up and used &lt;a href=&quot;http://culturedcode.com/things/&quot;&gt;Things.app&lt;/a&gt; for the longest. All of these are great tools but none of them really stuck. They are great &lt;em&gt;tools&lt;/em&gt; but what I needed was a framework or process. &lt;/p&gt;

&lt;p&gt;An internet friend of mine happened to post on Facebook a recommendation of &lt;a href=&quot;http://www.amazon.com/The-Choices-Path-Extraordinary-Productivity/dp/1476711712&quot;&gt;The 5 Choices: The Path to Extraordinary Productivity&lt;/a&gt;, right around the time I hadn’t been feeling my most productive lately, so I gave it a spin. It resonated with me. It was less of a “do these 5 things so-and-so does and you’ll be productive!”, and more of a “understand what leads to productivity and train yourself to focus on your life”. &lt;/p&gt;

&lt;p&gt;The book is broken into sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decision management / urgent &lt;/li&gt;
&lt;li&gt;Extraordinary  vs. ordinary&lt;/li&gt;
&lt;li&gt;Scheduling &lt;/li&gt;
&lt;li&gt;Attention management &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The book goes into wonderful detail and good examples on the importance of each of these things. The chapter on Scheduling has the most relevance to this post, as it outlines a &lt;strong&gt;Master Task List&lt;/strong&gt;, which I’ve adopted for my latest &lt;em&gt;get things done&lt;/em&gt; approach. It’s really just a simple list:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When something comes up that you might need to do, it goes either on the floor or on the list,&lt;br&gt;
– Kogon, Kory; Merrill, Adam; Rinne, Leena (2014-12-30). The 5 Choices: The Path to Extraordinary Productivity (Kindle Location 1145). Simon &amp;amp; Schuster. Kindle Edition.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The message is simple, but I found it profound. If it needs to be done, write it down. Otherwise just drop it. Your first reaction may be “well, everything needs to be done, so I’m no better off now”. But this partners well with something established in the first chapter re: decision management, which is also profoundly simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is it important?&lt;br&gt;
– Kogon, Kory; Merrill, Adam; Rinne, Leena (2014-12-30). The 5 Choices: The Path to Extraordinary Productivity (Kindle Location 666). Simon &amp;amp; Schuster. Kindle Edition. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;“Well, everything is important, right?” No. Changing my way of thinking has helped me here. How important is this? &lt;strong&gt;Or a better question, what are the consequences if this does not get done?&lt;/strong&gt; Take a moment to be calm and think clearly, and ask yourself that question. &lt;em&gt;Does this really matter&lt;/em&gt;? If the consequences are pretty trivial, then it doesn’t belong on the list. “Pay my mortgage” is pretty consequential. Making my kids beds is not. I should still do the latter, but it’s not worth cluttering my list of things I need to get done. &lt;/p&gt;

&lt;h2&gt;My Trello System&lt;/h2&gt;

&lt;p&gt;So, I’ve developed a system using &lt;a href=&quot;https://trello.com&quot;&gt;Trello&lt;/a&gt; (a wonderful, free service you should checkout anyway), which helps keep me in-line and productive. It’s not perfect, it’s still a work in progress, but so far it’s been helpful. I have the following lanes in a Trello board, and a Trello card typically progresses from left to right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MTL:&lt;/strong&gt; This is where I add things that I need to get done. These represent things that have consequences if they are not done.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;This week:&lt;/strong&gt; These are things things I plan to accomplish &lt;em&gt;this week&lt;/em&gt;. This is determined Monday mornings but can shift throughout the week.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Doing:&lt;/strong&gt; Thing(s) I’m doing &lt;em&gt;right now&lt;/em&gt;. This lane should only have 1-3 cards in it at most, otherwise you aren’t focusing on any &lt;em&gt;one&lt;/em&gt; of them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Done:&lt;/strong&gt; Things I’ve accomplished this week. It’s nice to see this lane fill up. Every Monday I archive all the cards in this list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This Week&lt;/strong&gt; is a best-guess effort to plan out what you want to do this week. It requires a calendar and booking time of your week to make sure you can accomplish &lt;em&gt;the big rocks&lt;/em&gt; of your to-dos. You will always have things like emails, phone calls, laundry… these things are like &lt;em&gt;gravel&lt;/em&gt;. If you spend all your time on sorting the gravel, you’ll never get to the big rocks. At the beginning of the week (Monday), I move 2-3 items in this lane from my MTL, per area of my life I’m tracking (work things, husband things, father things, personal goals things). Putting more than 2 or 3 things in at a time is probably you kidding yourself, but it’s better to need more things in this lane mid-week than to feel overwhelmed by them and get few of them done. The trick is to schedule the big rocks and let the gravel fill in the open spaces. You &lt;strong&gt;must&lt;/strong&gt; focus on getting the big rocks done; you need to schedule time for them and honor that. This is the area I struggle with the most; I’m in the middle of something urgent, and a time block comes up that I’m supposed to work on something else I’ve scheduled, and so of course I bump it because whatever I’m working on is &lt;em&gt;on fire&lt;/em&gt;. Scheduling is hard :/ &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Doing&lt;/strong&gt; represents what I’m doing &lt;em&gt;at this moment&lt;/em&gt;. It sounds silly sometimes but I find it helpful to put myself in that mental state of “this is what I’m working on”. Maybe it’s better to think of it this way; &lt;em&gt;I’m not working on those other things&lt;/em&gt;. This Trello lane should not have more than 2 things in it at any time. Sometimes I have to shuffle things in and out of here as priorities change and random things pop up. That’s OK, life can be unpredictable. The key here is to focus on these 1 to 2 things in this lane, until they are done, or for whatever reason(s) you need to change priorities. If that happens, you need to move the card out of the lane.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done&lt;/strong&gt; is self explanatory, you’ve done a thing! Hopefully many things!&lt;/p&gt;

&lt;p&gt;You can tell that &lt;strong&gt;Monday planning&lt;/strong&gt; plays a key roll here. Every Monday morning I set aside 10-30 minutes for weekly planning. I review my MTL list and decide if all the cards in there still represent things that I need to do, and have consequences if I don’t. Priorities and needs change, so sometimes I get to remove a card because it isn’t important anymore, or has been accomplished by some other means. Occasionally you find a card that’s been in there for a few weeks; at that point I delete the card. If it’s been on my list for weeks and I haven’t made serious effort to &lt;em&gt;do&lt;/em&gt; it, then it can’t &lt;em&gt;really&lt;/em&gt; be important. This self-reflection is important, otherwise you just end up with a giant, somewhat meaningless list of things, many of which you aren’t doing. &lt;/p&gt;

&lt;p&gt;I review my &lt;strong&gt;Done&lt;/strong&gt; list and compare it with what remains in my &lt;strong&gt;This Week&lt;/strong&gt; list. Which has more cards (taking into consideration not every card has the same weight)? Did I over/under schedule last week? Or did I honestly just not accomplish what I could have? These are important questions to ask as you look to planning this coming week. &lt;/p&gt;

&lt;p&gt;After some review and honest reflection, I archive all the cards in &lt;strong&gt;Done&lt;/strong&gt; and move all the cards from &lt;strong&gt;This Week&lt;/strong&gt; into &lt;strong&gt;MTL&lt;/strong&gt;, and the Monday process restarts. This is not a perfect process by any means, but for me it’s &lt;em&gt;good enough&lt;/em&gt;. So, what are you doing? Does what you’re doing &lt;em&gt;really matter&lt;/em&gt;?&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Shoulders are weird :: posts</title>
       <link href="http://ctshryock.com/posts/2016/01/12/shoulders.html"/>
       <updated>2016-01-12T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2016/01/12/shoulders</id>
       <content type="html">&lt;p&gt;Specifically, rotator cuffs, because that’s what I messed up in my right arm.&lt;/p&gt;

&lt;p&gt;My wife and I have become avid CrossFitters. I won’t say it’s the best thing for everyone, everywhere, but it’s working great for us. Specifically, it’s engaging and motivating, and we have a great community. But that’s another post… &lt;/p&gt;

&lt;p&gt;So, weird shoulders. As it was explained to me, your leg is inside your hip, basically. If you were to remove your muscle and tendons, your leg bone would still be inside your hip, or at least, it would require some force to separate the too. No so for the shoulder. If you remove the muscles and tendons, your arm would just flop away, nothing remotely connecting the two. Your arm is held inside the shoulder “area” by for main muscles plus some tendons and other miscellaneous things. These four main muscles work together to keep your shoulder in one place and working together. If any of these muscles get out of whack, things go bad. Straining or pulling a muscle there can produce pain in a very wide area and variety of places, as muscles are strained and end up pinching nerves in seemingly unrelated areas of your arm. For instance, I experienced a lot of pain in my arm between the elbow and shoulder, but the actual injury was behind/below my shoulder. Shoulders are weird.&lt;/p&gt;

&lt;p&gt;Right around memorial day of 2015 I started to learn how to do &lt;a href=&quot;https://www.youtube.com/watch?v=g-IVkLgZsXs&quot;&gt;butterfly pull-ups&lt;/a&gt; . I’ll be honest in that I wanted to learn how to do them because they looked awesome, and at the same time sped up pull-ups. I had been doing crossfit for about 1 year by then, and while I didn’t think I was the best in the gym by far, I still thought I was strong enough. &lt;/p&gt;

&lt;p&gt;I was half right. &lt;/p&gt;

&lt;p&gt;I did in fact learn butterfly pull-ups, but could only do 10 or so unbroken. Unfortunately, while I could do them, I don’t know that I was doing them particularly well. They require a lot of shoulder strength, and when you’re fatigued, they can be particularly rough on your shoulder. I don’t recall a specific “oh crap I just broke/tore/strained something” moment, but I’m 95% sure that butterfly pull-ups lead to my eventual “rotator cuff tendinitis”. Interestingly enough, the pain/discomfort that began to plague me the following 7 months after was in my arms and not my shoulders.&lt;/p&gt;

&lt;p&gt;I started feeling very tight in both my arms, particularly between the shoulder and elbow, basically identical spots in both arms. I would describe it as a nerve pain, mostly when my arms were progressing to a full extension above my head. For a month or two, I just used a lacrosse ball to massage my arms before a workout or during small breaks, and it mostly went away. Mostly.&lt;/p&gt;

&lt;p&gt;The pain progressed to the point where some movements above my head were nearing impossible. Sharp, sudden pain caused me to drop a barbell a time or two. It even got to the point where my arms would just passively ache while sitting at my desk in the middle of the day. I decided to take 3 or so days off to recover some, take some ibuprofen, and hope my “sore” arms would loosen up and the pain would recede. After 5 days of not exercising and my arms still aching after basically no activity, I decided to see a doctor. &lt;/p&gt;

&lt;p&gt;The Dr. suggested I had rotator cuff tendonitis, a rather unpleasant thing but better than having a torn tendon. The treatment was a few weeks of physical therapy and general &lt;em&gt;don’t stress your arm much&lt;/em&gt;.  Fortunately it was a fairly limited set of movements that triggered the sharp pain, so I still had use of my arm, I just couldn’t do &lt;em&gt;everything&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The recovery process has been long, but I’m happy to say that I’m nearing the end I think. I did 5 weeks of physical therapy, meeting 2-3 times a week with a therapist, and learned weird things about the 4 major muscles and tendons in the shoulder and rotator cuff. Most of the pain has subsided, and I’m back to doing full workouts at CrossFit instead of scaling to avoid using my arms or being too stressful on them. The pain does resurface some, but with better use of a foam roller and stretching, it’s mostly being manageable. &lt;/p&gt;

&lt;p&gt;I should be back at 100% by the time the CrossFit Open arrives (end Feb 2016), however, the time off and time scaling has left me with pretty weak endurance and strength. While I’m doing the full work outs, I feel like I’m just miles behind people I used to keep up with. It’s very … infuriating. I’m trying to resist the temptation to just go crazy to keep up, and instead work on pacing and endurance with good form and build up to it, but it’s proving difficult. I know that rushing it will likely just lead back to injury, but it’s incredibly difficult when you’re so frustrated from not being able to do what you used to do, or keep up with the people you used to keep pace with. It’s discouraging. &lt;/p&gt;

&lt;p&gt;Of course, it will get better if I maintain that patience to build up the strength and endurance. The road is long but worth it in the end.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Heroes of the Storm :: posts</title>
       <link href="http://ctshryock.com/posts/2016/01/06/hots.html"/>
       <updated>2016-01-06T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2016/01/06/hots</id>
       <content type="html">&lt;p&gt;I’m trying to write daily and don’t really have a set of technical topics out yet, so today I’ll write about my game of choice lately, &lt;a href=&quot;http://us.battle.net/heroes/en/&quot;&gt;Heroes of the Storm&lt;/a&gt;. Heroes is a &lt;strong&gt;M&lt;/strong&gt;ultiplayer &lt;strong&gt;O&lt;/strong&gt;nline &lt;strong&gt;B&lt;/strong&gt;attle &lt;strong&gt;A&lt;/strong&gt;rena (&lt;a href=&quot;https://en.wikipedia.org/wiki/Multiplayer_online_battle_arena&quot;&gt;MOBA&lt;/a&gt;), akin to League of Legends or Defense of the Ancients. TL;DR two teams of 5 players pick characters and fight it out, leveling up their characters to unlock abilities and be able to fight more, better. &lt;/p&gt;

&lt;p&gt;I won’t go into details on MOBAs or how they are played, you can read that in the links above. While I had heard of League and DOTA, I had never really had much interest in MOBAs. I honestly don’t recall what prompted me to try Heroes, probably my affection for StarCraft and WarCraft, but ever since my first few games I’ve been hooked, pretty bad actually. &lt;/p&gt;

&lt;p&gt;I started out with just the free-to-play characters (they change every week), just kind of aimlessly wandering through AI games by myself, clicking talents that sounded cool at the time. &lt;a href=&quot;http://us.battle.net/heroes/en/heroes/nova/&quot;&gt;Nova&lt;/a&gt; was the first hero I purchased with in-game gold and just loved playing. The stealth mechanic and biding my time for the right moment to strike was a ton of fun to play. Of course, I was doing it All Wrong™, like picking talents that help me wave clear… if you don’t know Nova’s play style, just know that wave clearing is not for Nova.&lt;/p&gt;

&lt;p&gt;Eventually I got the desire to play better. I began to wonder “What’s the &lt;em&gt;best&lt;/em&gt; (or better) way to build Nova?”. Naturally Youtube provided the answer, and the first (good) video I found was from &lt;a href=&quot;https://www.youtube.com/user/MFPallytime&quot;&gt;MFPallytime&lt;/a&gt;. I’ve been a subscriber ever since. MFPallytime is a professional youtuber and Heroes is a common game he plays. He plays nearly all the heroes and gives general advice and strategy for both the hero he’s chosen in the video, and the game overall. I admit I spend too much time &lt;em&gt;watching&lt;/em&gt; matches of Heroes on youtube, but I’m convinced it’s helped me become a better player. I don’t play all the heroes, many don’t appeal to me at all, but knowing just a little bit about their play style and abilities makes me better deal with them when I am playing a hero of my choice. &lt;/p&gt;

&lt;p&gt;My current favorite heroes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/murky/&quot;&gt;Murky&lt;/a&gt; – my only master skin at time of writing, just hilarious and fun to play, &lt;a href=&quot;https://en.wikipedia.org/wiki/Tilt_(poker)&quot;&gt;tilts&lt;/a&gt; other players&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/thrall/&quot;&gt;Thrall&lt;/a&gt; – likely my next master, currently at level 9&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/tyrande/&quot;&gt;Tyrande&lt;/a&gt; – my most recent favorite, currently at level 9, but feel I need to get Thrall to master first.. it’s also speculated that Blizzard will &lt;a href=&quot;https://en.wikipedia.org/wiki/Nerf_(video_gaming)&quot;&gt;nerf&lt;/a&gt; her soon so I’m already sad &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Heroes I like, but I’m not really that good at or are just _fun to play:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/chen/&quot;&gt;Chen&lt;/a&gt; (I’m not very good at Chen)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/artanis/&quot;&gt;Artanis&lt;/a&gt; – I wish I was better, I &lt;em&gt;want&lt;/em&gt; to love Artanis but it hasn’t happened&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://us.battle.net/heroes/en/heroes/tassadar/&quot;&gt;Tassadar&lt;/a&gt; – great hero, I’m OK at, fun to play&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Heroes is free to play, with options to purchase hero skins and mounts with in-game gold or actual money. At first I thought I’d never spend &lt;em&gt;actual money&lt;/em&gt; on this game, but then they had a 50% off sale for the holidays and I went to town…&lt;/p&gt;

&lt;p&gt;Hop on the Nexus and give it a shot :) &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Daily writing. Again. Maybe. :: posts</title>
       <link href="http://ctshryock.com/posts/2016/01/04/newyear.html"/>
       <updated>2016-01-04T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2016/01/04/newyear</id>
       <content type="html">&lt;p&gt;Trying this daily writing thing again. I attempted this last January, the idea being I’d write a little bit each day. I think it lasted 1 week. Maybe 2. Definitely didn’t make it out of February. &lt;/p&gt;

&lt;p&gt;A lot has changed since January 2015. Soon I’ll be a father again, with our third child expected at the end of February. Still don’t feel like I know what I’m doing as a parent, but so far I’m doing OK faking it. &lt;/p&gt;

&lt;p&gt;Goals I’d like to accomplish this year:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Author an open source library, maybe people will actually use it&lt;/li&gt;
&lt;li&gt;Compete in the CrossFit Open, and do “better” than I did last year&lt;/li&gt;
&lt;li&gt;Read a new sci-fi series. Diamond Age, Culture, &lt;em&gt;something&lt;/em&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Goals for the month of January:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;make a better list of goals for this year&lt;/li&gt;
&lt;li&gt;&lt;em&gt;start&lt;/em&gt; an open source library/tool&lt;/li&gt;
&lt;li&gt;Finish The Senior Software Engineer&lt;/li&gt;
&lt;li&gt;Contribute to &lt;a href=&quot;http://www.ottoproject.io&quot;&gt;Otto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Get better at Golang (how do you quantify this…)&lt;/li&gt;
&lt;li&gt;Master Skin Thrall, Tyrande&lt;/li&gt;
&lt;li&gt;Be an OK Muradin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last two for January are kind of sad/funny, as they relate to &lt;a href=&quot;http://us.battle.net/heroes/en/&quot;&gt;Heroes of the Storm&lt;/a&gt;, a game I’m currently addicted to. But it’s fun, so setting goals is good. &lt;/p&gt;

&lt;p&gt;Things I should think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Names for third child&lt;/li&gt;
&lt;li&gt;OSS contributions and my role @ HashiCorp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Things I can write about&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Working on Terraform&lt;/li&gt;
&lt;li&gt;Golang.. something&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just a brain dump blog post at this point, trying to kick-start the writing thing…&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Managing Go versions :: posts</title>
       <link href="http://ctshryock.com/posts/2015/02/20/managing-go-versions.html"/>
       <updated>2015-02-20T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2015/02/20/managing-go-versions</id>
       <content type="html">&lt;p&gt;I&amp;#39;ve managed to limp through the dependency management ordeal&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; in Go with &lt;br&gt;
only minor damage so far. Though my experience isn&amp;#39;t extensive, I feel that Go &lt;br&gt;
has so far done a good job on being backwards compatible. Upgrading from, say 1.3 &lt;br&gt;
to 1.4, typically just works, enough though I&amp;#39;ve had mismatched versions between &lt;br&gt;
my local environment and what &lt;a href=&quot;https://github.com/heroku/heroku-buildpack-go&quot;&gt;Godeps installs on Heroku&lt;/a&gt;, which went unnoticed &lt;br&gt;
until just recently. &lt;/p&gt;

&lt;p&gt;Until I got bit. &lt;/p&gt;

&lt;p&gt;More like a &lt;em&gt;scratch&lt;/em&gt;, but still…&lt;/p&gt;

&lt;p&gt;It came time where I needed to practice what I preach and achieve (better) dev/prod parity. I briefly looked into tools like &lt;a href=&quot;https://github.com/moovweb/gvm&quot;&gt;gvm&lt;/a&gt; but wanted to ask around before I installed &lt;em&gt;yet another thing&lt;/em&gt; to magically solve my problems. After discussing with colleagues, I&amp;#39;ve adopted the strategy outlined below with minimal pain/adjusting. If you&amp;#39;re willing to live dangerously and occasionally blast away your &lt;code&gt;$GOPATH/pkg&lt;/code&gt; folder&lt;sup id=&quot;fnref2&quot;&gt;&lt;a href=&quot;#fn2&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;, supporting multiple versions in Go can be pretty easy. &lt;/p&gt;

&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;If you haven&amp;#39;t read &lt;a href=&quot;http://golang.org/doc/install&quot;&gt;Getting Started&lt;/a&gt; and &lt;a href=&quot;http://golang.org/doc/code.html&quot;&gt;How to Write Go Code&lt;/a&gt;, then why are you here? Go do that. In fact, I wouldn&amp;#39;t necessarily come right back here either, maybe bookmark for months later when you feel comfortable enough to muck up your environment with reckless abandon&lt;sup id=&quot;fnref3&quot;&gt;&lt;a href=&quot;#fn3&quot; rel=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;. Assuming you followed those guides, you should have Go currently installed in &lt;code&gt;/usr/local/go&lt;/code&gt;; We&amp;#39;re going to delete that.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rm -rf /usr/local/go 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Exciting&lt;/em&gt;, right?&lt;/p&gt;

&lt;h2&gt;Environment variables&lt;/h2&gt;

&lt;p&gt;In order to get started, we need to review important environment variables that you should already be familiar with. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;$GOPATH&lt;/code&gt;: specifies where your workspace is located, e.g.  &lt;code&gt;$GOPATH/bin&lt;/code&gt;, &lt;code&gt;$GOPATH/pkg&lt;/code&gt; and &lt;code&gt;$GOPATH/src&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;$GOROOT&lt;/code&gt;: where Go is actually located. Unless specified, Go assumes it lives in &lt;code&gt;/usr/local/go&lt;/code&gt; (the thing we just deleted). Fortunately you can install Go anywhere you like so long as set the &lt;code&gt;$GOROOT&lt;/code&gt; environment variable and add &lt;code&gt;$GOROOT/bin&lt;/code&gt; to your &lt;code&gt;$PATH&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need to setup these environment variables yourself, typically in a &lt;code&gt;~/.bashrc&lt;/code&gt; or a &lt;code&gt;~/.zshrc&lt;/code&gt; file (or whatever shell you&amp;#39;re using), &lt;br&gt;
and then make sure the relative &lt;code&gt;bin&lt;/code&gt; folders are added to your &lt;code&gt;$PATH&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# in ~/.zshrc  &lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GOPATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/Go
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GOROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/local/go
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;:&lt;span class=&quot;nv&quot;&gt;$GOPATH&lt;/span&gt;/bin:&lt;span class=&quot;nv&quot;&gt;$GOROOT&lt;/span&gt;/bin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Your environment should be complete now. Nothing should work though.&lt;/p&gt;

&lt;h2&gt;Downloading Go versions&lt;/h2&gt;

&lt;p&gt;The official binary distributions can be found on &lt;a href=&quot;https://golang.org/dl/&quot;&gt;golang&amp;#39;s site here&lt;/a&gt; (this example uses the latest for OS X 10.8+). We&amp;#39;ll create a folder in &lt;code&gt;/usr/local&lt;/code&gt; to store our Go versions, pull some down and extract them to their own folders, and then create a symlink to the one we want to use. For this example, we&amp;#39;ll use the latest go 1.3.3 and go 1.4.1:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mkdir -p /usr/local/go-versions/go1.3
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl https://storage.googleapis.com/golang/go1.3.3.darwin-386-osx10.8.tar.gz &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; tar -xz -C /usr/local/go-versions/go1.3 --strip-components&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mkdir -p /usr/local/go-versions/go1.4
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl https://storage.googleapis.com/golang/go1.4.1.darwin-386-osx10.8.tar.gz &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; tar -xz -C /usr/local/go-versions/go1.4 --strip-components&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now &lt;code&gt;/usr/local/go-versions&lt;/code&gt; should have your separate versions in it and look like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ls /usr/local/go-versions
go1.3 go1.4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using a symlink to switch versions&lt;/h2&gt;

&lt;p&gt;To support multiple versions we&amp;#39;ll create a symbolic link where your &lt;code&gt;$GOROOT&lt;/code&gt; points to. In order to toggle a version, you simply update the symlink at &lt;code&gt;/usr/local/go&lt;/code&gt; (your &lt;code&gt;$GOROOT&lt;/code&gt;) to point to the desired version. The initial creation of the link and toggling versions can be done with the same command:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ln -sfn /usr/local/go-versions/go1.4 /usr/local/go
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This command will create a symbolic link at &lt;code&gt;/usr/local/go&lt;/code&gt;, pointing to the &lt;code&gt;/usr/local/go-versions/go1.4&lt;/code&gt; directory, replacing the symlink if it already exists. Now you can toggle back and forth:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ln -sfn /usr/local/go-versions/go1.4 /usr/local/go
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;go version
go version go1.4.1 darwin/386

&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ln -sfn /usr/local/go-versions/go1.3 /usr/local/go
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;go version
go version go1.3.3 darwin/386
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That&amp;#39;s it! Mostly.&lt;/p&gt;

&lt;h2&gt;Caveats&lt;/h2&gt;

&lt;p&gt;Go installs the packaged objects into your &lt;code&gt;$GOPATH/pkg&lt;/code&gt; folder, and compiled binaries in &lt;code&gt;$GOPATH/bin&lt;/code&gt;. Not everything you install will place a binary in &lt;code&gt;bin&lt;/code&gt;, but it will have something in &lt;code&gt;pkg&lt;/code&gt; that mirrors its source directory. As you probably guessed, these &lt;em&gt;things&lt;/em&gt; are compiled with the current version of Go. As a result, switching versions could result in undefined behavior. &lt;/p&gt;

&lt;p&gt;The binaries in &lt;code&gt;$GOPATH/bin&lt;/code&gt; however are statically compiled, meaning they have everything they need to run included in them, and do not depend on anything external at runtime. They should be safe to leave alone. &lt;/p&gt;

&lt;p&gt;When you invoke the &lt;code&gt;go&lt;/code&gt; tool, it will search the &lt;code&gt;$GOPATH/pkg&lt;/code&gt; folder to find existing compiled package objects to avoid recompiling them unnecessarily. Because the objects in &lt;code&gt;$GOPATH/pkg&lt;/code&gt;  are compiled against the version of Go at that the time of compilation, they may not work if you switch versions. &lt;/p&gt;

&lt;p&gt;To get around any potential issues (or resolve them), you can safely destroy your &lt;code&gt;$GOPATH/pkg&lt;/code&gt; folder (&lt;strong&gt;not&lt;/strong&gt; your &lt;code&gt;$GOROOT/pkg&lt;/code&gt; folder):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rm -r &lt;span class=&quot;nv&quot;&gt;$GOPATH&lt;/span&gt;/pkg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Future invocations of &lt;code&gt;go&lt;/code&gt; will reinstall/compile packages as necessary. You will incur the additional overhead of recompiling these things (downloading from the net if needed), but at least you can be assured that they are compiled against the current version of Go that you&amp;#39;re using. &lt;/p&gt;

&lt;h1&gt;End&lt;/h1&gt;

&lt;hr&gt;

&lt;p&gt;Thanks to Ed Muller (@freeformz), Mark Turner (@amerine), Andrew Gwozdziewycz (@apgwoz), and Dane Harrigan (@daneharrigan) for educating me here. &lt;/p&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;That being there is no one standard for dependency management yet in the Go community&amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn2&quot;&gt;
&lt;p&gt;I have no idea how dangerous this is or is not&amp;nbsp;&lt;a href=&quot;#fnref2&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn3&quot;&gt;
&lt;p&gt;This shouldn&amp;#39;t actually muck anything up&amp;nbsp;&lt;a href=&quot;#fnref3&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Goodbye Heroku :: posts</title>
       <link href="http://ctshryock.com/posts/2015/01/30/goodbye-heroku.html"/>
       <updated>2015-01-30T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2015/01/30/goodbye-heroku</id>
       <content type="html">&lt;p&gt;Today is my last day working at Heroku.&lt;br&gt;&lt;br&gt;
The last day I get to call myself a Herokai.&lt;br&gt;&lt;br&gt;
The last day I log in to the best job I’ve had to date.  &lt;/p&gt;

&lt;p&gt;I came onboard in October of 2012, a time that seems so long ago but passed too quickly. I am forever grateful for those that helped me get there. I had &lt;a href=&quot;https://twitter.com/stolt45%09&quot;&gt;excellent&lt;/a&gt; &lt;a href=&quot;https://twitter.com/j_simone&quot;&gt;mentors&lt;/a&gt; (or “bosses” as some call them), and so many brilliant and amazing co-workers I don’t have enough words to list them, let alone describe them. I learned so much at Heroku, including how far I still have to go, and leveled up several times. &lt;/p&gt;

&lt;p&gt;The people, the culture, and mission, are all &lt;em&gt;&lt;strong&gt;amazing&lt;/strong&gt;&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The week following will be a funemployement week for me, then on February 9th I’ll be joining A New Team&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; and start working on some things that I’m really excited about.&lt;/p&gt;

&lt;p&gt;I’m thankful for the opportunity Heroku and the Herokai gave me. I’m excited to see what Heroku ships in the future, and to watch Heroku continue to blaze a trail forward.&lt;/p&gt;

&lt;p&gt;But for now, I’m off to new adventures!&lt;br&gt;&lt;br&gt;
| (• ◡•)|/ \(❍ᴥ❍ʋ) &lt;/p&gt;

&lt;hr&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;I’ll save the &lt;em&gt;who&lt;/em&gt; for another post, mostly because they won’t announce until then anyway.  &amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Get Go-ing :: posts</title>
       <link href="http://ctshryock.com/posts/2015/01/23/get-going.html"/>
       <updated>2015-01-23T09:56:14-06:00</updated>
       <id>http://ctshryock.com/posts/2015/01/23/get-going</id>
       <content type="html">&lt;p&gt;I’ve mentioned previously that I was quite late to the Ruby party. It was still going strong, but the huge wave of excitement had largely peaked. Ruby remains my go-to language and I still love writing Ruby, it still gives me &lt;em&gt;joy&lt;/em&gt;, but it’s lost a lot of hype. That’s actually a good thing, really, and Jeff Atwood &lt;a href=&quot;http://blog.codinghorror.com/why-ruby/&quot;&gt;explains it more succulently&lt;/a&gt; than I can. The crux of it is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ruby isn&amp;#39;t cool any more. Yeah, you heard me. It&amp;#39;s not cool to write Ruby code any more. All the cool people moved on to slinging Scala and Node.js years ago. Our project isn&amp;#39;t cool, it&amp;#39;s just a bunch of boring old Ruby code. Personally, I&amp;#39;m thrilled that Ruby is now mature enough that the community no longer needs to bother with the pretense of being the coolest kid on the block. &lt;em&gt;That means the rest of us who just like to Get Shit Done can roll up our sleeves and focus on the mission of building stuff with our peers rather than frantically running around trying to suss out the next shiny thing.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(emphasis mine)&lt;/p&gt;

&lt;p&gt;Of course, I’m simultaneously in this camp, while also chasing one of the &lt;em&gt;next shiny things&lt;/em&gt;, which for me is &lt;a href=&quot;http://golang.org&quot;&gt;Go&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Learning Go&lt;/h2&gt;

&lt;p&gt;I didn’t want to be late to the next party. Maybe driven by some career survival instinct to stay relevant and hirable, or simply just driven by ego to be doing the next cool thing&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;, regardless, I wanted to get going with Go. &lt;/p&gt;

&lt;p&gt;Below are some resources that I’ve found very helpful in getting up to speed and functional with Go:&lt;/p&gt;

&lt;h3&gt;Getting oriented on golang.org:&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://golang.org/doc/&quot;&gt;Golang.org: Documentation&lt;/a&gt; – an excellent source of information straight from the source. I wouldn’t recommend going top-bottom though, so let’s skip around&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://golang.org/doc/install&quot;&gt;Golang.org: Getting Started&lt;/a&gt; – for getting setup and introduced&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://golang.org/doc/code.html&quot;&gt;Golang.org: How to write Go code&lt;/a&gt; – very important information on organizing Go code (workspaces, packages, etc)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Diving in&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gobyexample.com&quot;&gt;Go By Example&lt;/a&gt; – An excellent guide from @mmcgrana that will walk you through Go with clear explanations and working code samples&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tour.golang.org/welcome/1&quot;&gt;Golang.org: A Tour of Go&lt;/a&gt; – a tour of Go from the golang site. I found it less approachable than Go By Example, I but should note that it’s received an update and appears to be restructured&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Reference / Books&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://golang.org/doc/effective_go.html&quot;&gt;Golang.org: Effective Go&lt;/a&gt; – a required reading, but in my opinion not until you’ve got the basics down and have written some code&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://golang.org/pkg/&quot;&gt;Golang.org: Packages&lt;/a&gt; – documentation for all the standard library. You will get to know this site very well &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.golang-book.com&quot;&gt;Golang-book&lt;/a&gt; – a free book online with more good reference / explanations&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.golangbootcamp.com&quot;&gt;Go Bootcamp&lt;/a&gt; – another free book online&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/golang/go/wiki/Learn&quot;&gt;github.com/golang/go/wiki&lt;/a&gt; – a wiki on the GitHub page for golang/go with further reading&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;Ruby jobs are not short in supply and I don’t suspect will be any time soon, so we’ll assume ego.  &amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>On Not Taking Leaps :: posts</title>
       <link href="http://ctshryock.com/posts/2015/01/21/on-not-taking-leaps.html"/>
       <updated>2015-01-21T14:56:14-06:00</updated>
       <id>http://ctshryock.com/posts/2015/01/21/on-not-taking-leaps</id>
       <content type="html">&lt;p&gt;The beginning of my career was using Perl for web development, and then on to PHP. I had great working knowledge of both but never dove too deep into the language. A few years into it I got an itch to pursue a certification for PHP, though in hindsight I wonder if it was mostly due to encouragement from my employer. I never held much stock in certifications like this, especially since the test was all web GUI point-and-click. It certified my knowledge of the language, not necessarily any skill. I failed the practice test(s) by only a few points, so I studied the parts I did poorly on, and then proceeded to the actual test. I failed that too.&lt;/p&gt;

&lt;p&gt;As I mentioned, I don&amp;#39;t hold much stock in certifications anyway...&lt;/p&gt;

&lt;p&gt;I was quite late to the Ruby party. I don&amp;#39;t recall the years, but while I was happily doing my PHP and reinventing the wheel for every project, I kept hearing about this RoR thing. A good friend and coworker dove in to RoR some and liked it, so I needed to check it out. This was right around Rails 1.x I think. At first, I made the rookie mistake in learning Rails before I learned Ruby. For whatever reason, Ruby just didn&amp;#39;t click with me. My fingers rejected it, it was too magical.&lt;/p&gt;

&lt;p&gt;By some chance I stumbled on Python and Django, both of which clicked better for me. Python was more C-like, which appealed to me at the time, C being the first programming language I learned. Django too had this slick admin built-in which was near &lt;em&gt;perfect&lt;/em&gt; for most of our use cases at the consultancy we were at. &lt;/p&gt;

&lt;p&gt;My coworker and I decided we needed to advance the consultancy into the next level, so we arranged a quick demo of both Rails and Django to our boss. We presented a simple MVC app in both, highlighting how easy CRUD and other simple things that we tend to reinvent were already done for us. &amp;quot;This cuts development time&amp;quot;, &amp;quot;more industry standard&amp;quot; &lt;em&gt;things&lt;/em&gt;, et. al. Our boss was impressed with both, so he took some time to think on which made more sense for the company, and about the direction we should go. &lt;/p&gt;

&lt;p&gt;In the meantime, my friend and I discussed just simply doing an upcoming project in either of the frameworks, without consultation or approval. &amp;quot;Just make the leap&amp;quot; and get rolling. Ultimately though, we did not make any leaps, and waited to hear what our boss thought. &lt;/p&gt;

&lt;p&gt;Weeks passed and no decision was made. The topic never came up again. The status quo was kept. We continued to reinvent the wheel with every project in PHP. No leaps were taken, no one leveled up. We stayed the course. Within a year, my friend left the consultancy and went on to bigger things. My career became stagnant in PHP land, reinventing wheels. &lt;/p&gt;

&lt;p&gt;I don&amp;#39;t blame my then boss; he&amp;#39;s a good guy. As a small business owner, I think he felt responsible for a dozen families, and I can only imagine that taking risks like this was unsettling.&lt;/p&gt;

&lt;p&gt;I blame me.&lt;/p&gt;

&lt;p&gt;I wish I had asked for forgiveness, instead of&lt;br&gt;
asking for permission. &lt;/p&gt;

&lt;p&gt;I wish I had taken that leap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Take your leap&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Distributing Reads to a Follower on Heroku :: posts</title>
       <link href="http://ctshryock.com/posts/2013/10/16/distributing-reads-to-a-follower-on-heroku.html"/>
       <updated>2013-10-16T14:56:14-05:00</updated>
       <id>http://ctshryock.com/posts/2013/10/16/distributing-reads-to-a-follower-on-heroku</id>
       <content type="html">&lt;p&gt;&lt;strong&gt;Using the Octopus gem!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TOC&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#setup&quot;&gt;Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#designating-replicated-models&quot;&gt;Designating Replicated Models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#credit&quot;&gt;Credit&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Heroku allows you to easily add horizontal scaling to your application by way of adding additional dynos to meet capacity. Heroku Postgres too allows you to horizontally scale your database by adding &lt;a href=&quot;https://devcenter.heroku.com/articles/heroku-postgres-follower-databases&quot;&gt;followers&lt;/a&gt; to your primary database, streaming write-ahead-logs to each follower, keeping it up to date. While these followers are great for analytical purposes and as hot-standby databases, you can also use them as a part of your application for handling read-only queries&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; for your data.&lt;/p&gt;

&lt;p&gt;You can do this manually with ActiveRecord, establishing the connection to a follower for a given query, but I recommend the &lt;a href=&quot;https://github.com/tchandy/octopus&quot;&gt;Octopus gem&lt;/a&gt;. This gem adds sharding and replication features to ActiveRecord, and in this post I&amp;#39;ll add that gem to a Ruby on Rails application to leverage a follower databases, distributing read operations to the follower. Horizontal scaling &lt;strong&gt;ftw&lt;/strong&gt; ☜(ﾟヮﾟ☜).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Existing Ruby on Rails application on Heroku (so models are setup etc)&lt;sup id=&quot;fnref2&quot;&gt;&lt;a href=&quot;#fn2&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;A Heroku Postgres production database (Crane +) with a Follower (also Crane +)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Setup&lt;/h2&gt;

&lt;p&gt;In a normal Octopus setup you hard code your shard and replication definitions in a file called &lt;code&gt;config/shards.yml&lt;/code&gt;. Because Heroku advocates &lt;a href=&quot;https://devcenter.heroku.com/articles/architecting-apps&quot;&gt;12 Factor applications&lt;/a&gt;, hardcoding your database information is not going to work. We need a a dynamic &lt;code&gt;shards.yml&lt;/code&gt; file, as well as an initializer file, specially catered to the Heroku environment. &lt;/p&gt;

&lt;p&gt;Start by adding the Ocotpus gem to your &lt;code&gt;Gemfile&lt;/code&gt; and running &lt;code&gt;bundle install&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Gemfile&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;at-octopus&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;octopus&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;bundle install
Fetching gem metadata from https://rubygems.org/....&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next, addd the dynamic &lt;code&gt;config/shards.yml&lt;/code&gt;:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/catsby/6923840.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;This dynamically populates the appropriate configurations for Octopus to use your follower(s) for read operations. &lt;/p&gt;

&lt;p&gt;Get the file by running this from your project root: &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;wget https://gist.github.com/catsby/6923840/raw/0aaf94ccc383951118c43b9b794fc62e427c2e51/shards.yml config/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next, add this initializer to &lt;code&gt;config/initializers&lt;/code&gt;:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/catsby/6923632.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;The initializer adds some convenience methods like &lt;code&gt;Octopus.followers&lt;/code&gt; and setups some additional logging. &lt;/p&gt;

&lt;p&gt;Get the file by running this from your project root: &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;wget https://gist.github.com/catsby/6923632/raw/87b5abba2e22c3acf8ed35d06e0ab9ca1bd9f0d0/octopus.rb config/initializers/octopus.rb&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Commit those changes in git and test out your setup locally. In development mode Octopus will simulate 2 followers for convenience: &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;foreman start
foreman &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; starting web on port 5000
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; Puma starting in single mode...
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; * Version 2.6.0, codename: Pantsuit Party
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; * Min threads: 5, max threads: 5
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; * Environment: development
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt; databases enabled as &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt;-only slaves
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;   * FOLLOWER 1
web     &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;   * FOLLOWER 2&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Designating Replicated Models&lt;/h2&gt;

&lt;p&gt;With this setup, your followers will not be marked as &amp;#39;fully replicated&amp;#39;; a fully replicated application will send &lt;strong&gt;all&lt;/strong&gt; writes to the primary database, and send &lt;strong&gt;all&lt;/strong&gt; reads to followers. This might be A Bad Idea™, depending on your application. Because of this we set &lt;code&gt;fully_replicated: false&lt;/code&gt; in the dynamic &lt;code&gt;config/shards.yml&lt;/code&gt;. You have to add a &lt;code&gt;replicated_model&lt;/code&gt; call to each model you want to be a replicated model, or explicitly query them using methods to have queries sent to your followers. &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# app/models/person.rb&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;replicated_model&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will configure the &lt;code&gt;Person&lt;/code&gt; class to be replicated, and read queries will be sent to the follower. &lt;/p&gt;

&lt;p&gt;You can explicitly use a follower as well:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;heroku run rails console
Running &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;rails console&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt; attached to terminal... up, run.2106
&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt; database enabled as &lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt;-only slave
  * PURPLE follower
Loading production environment &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;Rails 4.0.0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
irb&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;main&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:001:0&amp;gt; Octopus.using&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;:purple_follower&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
irb&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;main&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:002:1* Person.first.name
irb&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;main&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:003:1&amp;gt; &lt;span class=&quot;nv&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Jessica&amp;quot;&lt;/span&gt;
irb&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;main&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:005:0&amp;gt; Person.using&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;:purple_follower&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;.pluck&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;:name&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Jessica&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;Leto&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;Paul&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;(ﾉ^_^)ﾉ Hooray, you&amp;#39;re set! You&amp;#39;re now distributing reads to a follower database. &lt;/p&gt;

&lt;h2&gt;But wait, there is more&lt;/h2&gt;

&lt;p&gt;You can choose the followers you want to use for responding to read request with the environment variables &lt;code&gt;SLAVE_ENABLED_FOLLOWERS&lt;/code&gt; and &lt;code&gt;SLAVE_DISABLED_FOLLOWERS&lt;/code&gt;. Whitelist followers you want or blacklist the followers you don&amp;#39;t want:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;heroku config:add &lt;span class=&quot;nv&quot;&gt;SLAVE_ENABLED_FOLLOWERS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;PINK, CRIMSON
heroku config:add &lt;span class=&quot;nv&quot;&gt;SLAVE_DISABLED_FOLLOWERS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;COBALT&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;You should do this.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Without these variables set, all followers will be used for reads. This may be undesirable for you. One example of usage is when adding an additional follower to a live application, where the above ENV vars are used to ensure the new follower is excluded until it is sufficiently caught up to master for duty. Other people may have forks or just random databases attached to the app. Without a white/black list, those random possibly databases can be used for reads. &lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Scaling dynos on Heroku is an easy and great way to scale your application, but the scaling doesn&amp;#39;t have to stop there. By horizontally scaling your databases, you distribute the workload placed on the primary database and build in resiliency for your application. By using Octopus to handle the connections, you gain some fault tolerance across several followers, and flexibility with which ones to use. &lt;/p&gt;

&lt;h3&gt;Credit&lt;/h3&gt;

&lt;p&gt;Thanks to &lt;a href=&quot;https://github.com/eprothro&quot;&gt;Evan Prothro&lt;/a&gt; for writing the original &lt;a href=&quot;https://gist.github.com/eprothro/5374472&quot;&gt;dynamic shards.yml file&lt;/a&gt; and &lt;a href=&quot;https://gist.github.com/eprothro/5374500&quot;&gt;octopus.rb initializer&lt;/a&gt; file, as well as &lt;a href=&quot;https://github.com/tchandy/octopus/wiki/Replication-with-Rails-on-Heroku&quot;&gt;the original wiki guide for setting up Octopus on Heroku&lt;/a&gt; which the blog post is heavily based on. Thanks also to &lt;a href=&quot;https://github.com/tchandy/octopus/graphs/contributors&quot;&gt;everyone who has contributed to the Octopus gem&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;Postgres followers are read-only and cannot be written to.&amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn2&quot;&gt;
&lt;p&gt;I made one for you: &lt;a href=&quot;https://github.com/catsby/distributed-reads&quot;&gt;catsby/distributed-reads&lt;/a&gt;  &amp;nbsp;&lt;a href=&quot;#fnref2&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Dive into Elixir :: posts</title>
       <link href="http://ctshryock.com/posts/2013/08/09/dive-into-elixir.html"/>
       <updated>2013-08-09T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2013/08/09/dive-into-elixir</id>
       <content type="html">&lt;hr&gt;

&lt;p&gt;I&amp;#39;ve been learning Elixir lately, and so far it&amp;#39;s been &lt;em&gt;fascinating&lt;/em&gt;.&lt;br&gt;
Elixir is a functional programming language with a very ruby-like&lt;br&gt;
syntax. You get immutable state, actor-based concurrency model, and a&lt;br&gt;
modern syntax, all running on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Erlang_(programming_language)&quot;&gt;Erlang VM&lt;/a&gt;. It&amp;#39;s my&lt;br&gt;
first foray into functional programming, and I&amp;#39;m enjoying learning the&lt;br&gt;
differences between OOP. &lt;/p&gt;

&lt;p&gt;This post will get Elixir installed and&lt;br&gt;
introduce you to two important parts of Elixir: &lt;strong&gt;Immutable Data&lt;/strong&gt; and&lt;br&gt;
&lt;strong&gt;Pattern Matching&lt;/strong&gt;.&lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;Getting rolling&lt;/h2&gt;

&lt;p&gt;Start your dive by installing Elixir. You need at least Erlang R16bB.&lt;br&gt;
Don&amp;#39;t worry what that is, just install a precompiled version &lt;a href=&quot;https://www.erlang-solutions.com/downloads/download-erlang-otp&quot;&gt;from&lt;br&gt;
here&lt;/a&gt;. Next, install Elixir. There are &lt;a href=&quot;http://elixir-lang.org/getting_started/1.html&quot;&gt;packages here&lt;/a&gt;, but you&lt;br&gt;
should roll with Elixir from the master branch of the repo for now&lt;br&gt;
(Elixir gets a little better every day):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;brew install --HEAD &lt;span class=&quot;nv&quot;&gt;elixir&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&amp;gt; Cloning https://github.com/elixir-lang/elixir.git
Updating /Library/Caches/Homebrew/elixir--git
&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&amp;gt; make
🍺  /Users/clint/Developer/Cellar/elixir/HEAD: &lt;span class=&quot;m&quot;&gt;278&lt;/span&gt; files, 3.3M...
&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you can use interactive mode and start learning:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;Interactive&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Elixir&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)...&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dog_name&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero Dog, II&amp;quot;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero Dog, II&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dog_name&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Press &lt;code&gt;control+c&lt;/code&gt; and then &lt;code&gt;a&lt;/code&gt; to get out of that. Interactive mode&lt;br&gt;
keeps a count of the commands you&amp;#39;ve ran in that session (the &lt;code&gt;(1)&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;(2)&lt;/code&gt;). At 1,000 you earn a badge and get a cookie! &lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Now that you&amp;#39;re up and running, let&amp;#39;s look at some Elixir basics. &lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;Immutable Data&lt;/h2&gt;

&lt;p&gt;Everything in Elixir is immutable. You can&amp;#39;t append to a list; you can&lt;br&gt;
only get a new list with those additional items included in it. You cannot increment a&lt;br&gt;
value; you can only get a new value returned. Elixir is all about&lt;br&gt;
&lt;em&gt;transforming data&lt;/em&gt;. Here we think about data and what we&amp;#39;re doing to&lt;br&gt;
and with it; we&amp;#39;re not thinking about instances, inheritance, state, or&lt;br&gt;
encapsulation.&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s look at variable binding, a thing that looks a lot&lt;br&gt;
like normal assignment. It&amp;#39;s not. For example:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# ruby&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With assignment (in most OOP languages), the variable &lt;code&gt;numbers&lt;/code&gt; is an &lt;strong&gt;object&lt;/strong&gt; and &lt;br&gt;
references an array of &lt;code&gt;[1,2,3]&lt;/code&gt;. &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Elixir&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In Elixir, the variable &lt;code&gt;numbers&lt;/code&gt; is now bound to &lt;code&gt;[1,2,3]&lt;/code&gt; (which is a List in Elixir, not an array). Outwardly the&lt;br&gt;
same, but a very different thing happened. Binding is more like a&lt;br&gt;
assertion, or a question, &amp;quot;can this statement be made true?&amp;quot;. If you think of &lt;br&gt;
it more as an assertion, then this makes perfect sense:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# Elixir&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MatchError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;right&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hand&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;side&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;8&lt;/span&gt;     &lt;span class=&quot;ss&quot;&gt;:erl_eval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 

&lt;p&gt;Doing so in Ruby will throw a syntax error. Take note of line 6; this&lt;br&gt;
yields an error because &lt;code&gt;a&lt;/code&gt; is bound to &lt;code&gt;1&lt;/code&gt;, and Elixir can&amp;#39;t make &lt;code&gt;2&lt;/code&gt;&lt;br&gt;
equal to &lt;code&gt;1&lt;/code&gt; (Elixir will only change the binding of the variable on the&lt;br&gt;
left side).  No &lt;em&gt;match&lt;/em&gt; for &lt;code&gt;a&lt;/code&gt; could be found, so the assertion fails. Try &lt;br&gt;
thinking &amp;quot;can the left hand side be made to match the&lt;br&gt;
right hand side?&amp;quot;, and then the &lt;code&gt;=&lt;/code&gt; assignment operator becomes a &lt;strong&gt;matching&lt;/strong&gt;&lt;br&gt;
operator. &lt;/p&gt;

&lt;p&gt;Immutable data is great because you never have to worry about someone else changing something &lt;br&gt;
from under your feet. When you get a block of data, that&amp;#39;s what you get. Not a shared reference to something, &lt;br&gt;
you never have to worry about someone else (say another thread of execution) changing that &lt;em&gt;thing&lt;/em&gt; you have; they &lt;br&gt;
may change something similar, but not &lt;em&gt;your&lt;/em&gt; thing. Your thought process and concerns become more local, only worrying about &lt;br&gt;
what you&amp;#39;re doing in that particular function with that particular data. &lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;Pattern matching&lt;/h2&gt;

&lt;p&gt;Pattern matching is the process where Elixir binds values to variables,&lt;br&gt;
but not your conventional &amp;quot;assignment&amp;quot;. It&amp;#39;s a fundamental part of&lt;br&gt;
programming here. In the above example with &lt;code&gt;a = 1&lt;/code&gt; and &lt;code&gt;1 = a&lt;/code&gt; you saw&lt;br&gt;
the very basics of pattern matching: attempting to make the thing on the left match&lt;br&gt;
the thing on the right. &lt;/p&gt;

&lt;p&gt;Some further examples, with lists (&lt;em&gt;not&lt;/em&gt; arrays):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;lineno&quot;&gt; 1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;animals&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 3&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;friend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;enemy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;awesome_bird&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;animals&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 4&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 5&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;friend&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 6&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 7&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;enemy&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 8&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 9&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;awesome_bird&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;11&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On line &lt;code&gt;1&lt;/code&gt; we make a list of 3 animals, and on line &lt;code&gt;3&lt;/code&gt; we match that&lt;br&gt;
list with a new list, &lt;code&gt;[friend, enemy, awesome_bird]&lt;/code&gt;.  You can then&lt;br&gt;
reference each individually. &lt;/p&gt;

&lt;p&gt;Look what happens when we try to use the same variable: &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;animals&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MatchError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;no&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;right&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hand&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;side&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt;     &lt;span class=&quot;ss&quot;&gt;:erl_eval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In something like Ruby &lt;code&gt;c&lt;/code&gt; would simply get assigned (bound) twice&lt;br&gt;
and end up as &lt;code&gt;chocobo&lt;/code&gt;. In Elixir, we&amp;#39;re matching patterns, and the &lt;code&gt;c&lt;/code&gt;&lt;br&gt;
variable tries to match both &lt;code&gt;cat&lt;/code&gt; and &lt;code&gt;chocobo&lt;/code&gt;, but can&amp;#39;t. As a&lt;br&gt;
result, the matching fails. &lt;/p&gt;

&lt;p&gt;Another example:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Adelbert Steiner&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Adelbert Steiner&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dog&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Nero&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Adelbert Steiner&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here, &lt;code&gt;dog&lt;/code&gt; matches up with &lt;code&gt;Nero&lt;/code&gt; in the first and third position,&lt;br&gt;
allowing &lt;code&gt;name&lt;/code&gt; to become whatever it needs to &lt;br&gt;
in order for the match to succeed. &lt;/p&gt;

&lt;p&gt;Back to the &lt;code&gt;[&amp;#39;dog&amp;#39;, &amp;#39;cat&amp;#39;, &amp;#39;chocobo&amp;#39;]&lt;/code&gt; example, maybe you&amp;#39;re like me and you don&amp;#39;t actually care about cats. Elixir can&lt;br&gt;
help with a wildcard matcher, the &lt;strong&gt;underscore&lt;/strong&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-elixir&quot; data-lang=&quot;elixir&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;cat&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dog&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;chocobo&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;_&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ErlangError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;erlang&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:unbound_var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;9&lt;/span&gt;     &lt;span class=&quot;ss&quot;&gt;:erl_eval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exprs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On line 7 we get an error when trying to reference &lt;code&gt;_&lt;/code&gt;, that&amp;#39;s because&lt;br&gt;
Elixir will match anything there and immediately discard it.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;That&amp;#39;s all for now. Go install Elixir if you haven&amp;#39;t already and try out&lt;br&gt;
some pattern matching to get a feel for it. Immutable data and pattern&lt;br&gt;
matching are important parts of the things I&amp;#39;ll cover in my next &lt;em&gt;Dive&lt;br&gt;
Into&lt;/em&gt; post covering functions, anonymous functions, and recursive functions.&lt;/p&gt;

&lt;p&gt;If you like what you&amp;#39;ve seen, go pick up &lt;a href=&quot;http://pragprog.com/book/elixir/programming-elixir&quot;&gt;Programming Elixir&lt;/a&gt; from Dave &lt;br&gt;
Thomas at The Pragmatic Bookshelf. &lt;/p&gt;

&lt;hr&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;no, not really&amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Running Elixir Dynamo on Heroku :: posts</title>
       <link href="http://ctshryock.com/posts/2013/07/02/running-elixir-dynamo-on-heroku.html"/>
       <updated>2013-07-02T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2013/07/02/running-elixir-dynamo-on-heroku</id>
       <content type="html">&lt;blockquote&gt;&quot;Elixir is a functional meta-programming aware language built
on top of the Erlang VM. It is a dynamic language with flexible syntax
with macros support that leverages Erlang&#39;s abilities to build
concurrent, distributed, fault-tolerant applications with hot code
upgrades.&quot; - from http://elixir-lang.org &lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://elixir-lang.org&quot;&gt;Elixir&lt;/a&gt; is a new &lt;em&gt;ruby-like&lt;/em&gt; language created by &lt;a href=&quot;https://twitter.com/josevalim&quot;&gt;Jose Valim&lt;/a&gt;, built on&lt;br&gt;
top of the Erlang VM. It&amp;#39;s caught my interest for a while now, but until&lt;br&gt;
recently has been too young for me to dive in much.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/elixir-lang/dynamo&quot;&gt;Dynamo&lt;/a&gt; is a web framework written and running on Elixir. Dynamo goals are &lt;br&gt;
performance, robustness and simplicity. &lt;/p&gt;

&lt;p&gt;Naturally, I went about trying Dynamo out and wanted to get it running&lt;br&gt;
on Heroku, which proved to be pretty easy. We start by installing&lt;br&gt;
Elixir, checking out the Dynamo rep, and generating a project. From there we use the&lt;br&gt;
Elixir third-party buildpack&lt;sup id=&quot;fnref1&quot;&gt;&lt;a href=&quot;#fn1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; and things should fall into place nicely.&lt;/p&gt;

&lt;h3&gt;Installing Elixir&lt;/h3&gt;

&lt;p&gt;The easiest way to install Elixir is with&lt;br&gt;
&lt;a href=&quot;http://brew.sh&quot;&gt;Homebrew&lt;/a&gt;. With each new Elixir release, Jose submits an updated&lt;br&gt;
formula for Elixir, which makes staying up to date easy.&lt;/p&gt;

&lt;p&gt;Assuming you have Homebrew install:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ brew install elixir
==&amp;gt; Downloading https://github.com/elixir-lang/elixir/archive/v0.9.3.tar.gz 
==&amp;gt; make
/Users/clint/Developer/Cellar/elixir/0.9.3: 273 files, 3.2M, built in 35 seconds
$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Dynamo requires rebar&lt;sup id=&quot;fnref2&quot;&gt;&lt;a href=&quot;#fn2&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; to compile things, and Elixir makes it easy&lt;br&gt;
to install with the included &lt;code&gt;mix&lt;/code&gt; build tool:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ mix local.rebar
* creating /Users/clint/.mix/rebar
$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Installing Dynamo&lt;/h3&gt;

&lt;p&gt;Dynamo, like Elixir, is alpha at this stage, so installation is pretty&lt;br&gt;
manual :/&lt;/p&gt;

&lt;p&gt;Start by cloning &lt;a href=&quot;https://github.com/elixir-lang/dynamo&quot;&gt;the repository&lt;/a&gt; and getting the dependencies:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ git clone git@github.com:elixir-lang/dynamo.git
Cloning into &amp;#39;dynamo&amp;#39;...
remote: Counting objects:
...
Resolving deltas: 100% (2016/2016), done.
$ cd dynamo
$ MIX_ENV=test mix do deps.get, test
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now create a new project:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ mix dynamo path/to/new/project
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt; You now have a new Dynamo project template at&lt;br&gt;
&lt;code&gt;path/to/new/project&lt;/code&gt;. Change to that directory, get your&lt;br&gt;
dependencies, and start the server:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ cd path/to/new/project
$ mix deps.get
* Getting dynamo [git: &amp;quot;git://github.com/elixir-lang/dynamo.git&amp;quot;]
[...]
* Getting cowboy [git: &amp;quot;git://github.com/extend/cowboy.git&amp;quot;]
[...]
* Compiling dynamo
$ mix server
Running DynamoExample.Dynamo at http://localhost:4000 with Cowboy on dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;. Visit &lt;a href=&quot;http://localhost:4000&quot;&gt;http://localhost:4000&lt;/a&gt; to see your running Dynamo app!&lt;br&gt;
Type &lt;code&gt;cntrl+c&lt;/code&gt; and then &lt;code&gt;a&lt;/code&gt; to abort the server and get back to your&lt;br&gt;
shell. &lt;/p&gt;

&lt;h2&gt;Setup the Heroku app&lt;/h2&gt;

&lt;p&gt;In order to run Elixir on Heroku, you need to utilize Heroku&amp;#39;s awesome&lt;br&gt;
&lt;a href=&quot;https://devcenter.heroku.com/articles/third-party-buildpacks&quot;&gt;third party&lt;br&gt;
buildpacks&lt;/a&gt;&lt;br&gt;
feature by setting a custom &lt;code&gt;BUILDPACK_URL&lt;/code&gt; environment variable. &lt;br&gt;
From the project directory, create a new Heroku app and specify the buildpack:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ heroku create --buildpack &amp;quot;https://github.com/goshakkk/heroku-buildpack-elixir.git&amp;quot; [app_name]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you already have a Heroku app created, you can just set the &lt;code&gt;BUILDPACK_URL&lt;/code&gt; config var:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ heroku config:add BUILDPACK_URL=&amp;quot;https://github.com/goshakkk/heroku-buildpack-elixir.git&amp;quot; -a YOUR_APP
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Specify Erlang/OTP and Elixir versions&lt;/h3&gt;

&lt;p&gt;The Elixir buildpack allows you to specify different Erlang versions,&lt;br&gt;
but Elixir requires Erlang/OTP version R15 or greater. Specify a preferred Erlang/OTP version for the buildpack by creating a &lt;code&gt;.preferred_otp_version&lt;/code&gt;:  &lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ echo &amp;quot;OTP_R16B&amp;quot; &amp;gt; .preferred_otp_version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;By default, the Elixir buildpack uses the master branch version of Elixir. You can specify a custom branch or tag name from the &lt;a href=&quot;https://github.com/elixir-lang/elixir&quot;&gt;https://github.com/elixir-lang/elixir&lt;/a&gt; repository in the &lt;code&gt;.preferred_elixir_version&lt;/code&gt; dotfile:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ echo &amp;quot;master&amp;quot; &amp;gt; .preferred_elixir_version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Setup a Procfile&lt;/h3&gt;

&lt;p&gt;Heroku needs a Procfile in order to run your application. Create a Procfile with a &lt;code&gt;web&lt;/code&gt; process defined:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ echo &amp;#39;web: MIX_ENV=prod mix server -p $PORT&amp;#39; &amp;gt; Procfile
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; Single quotes are important here. &lt;code&gt;$PORT&lt;/code&gt; is an environment variable supplied by Heroku. If you use double quotes &lt;br&gt;
in the above &lt;code&gt;echo&lt;/code&gt; call, your local shell will try to interpolate the contents, and you&amp;#39;ll end up with &lt;code&gt;-p&lt;/code&gt; and not &lt;code&gt;-p $PORT&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;Deploy&lt;/h3&gt;

&lt;p&gt;Add and commit your changes, then push to Heroku:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;$ git add Procfile .preferred_otp_version .preferred_elixir_version  
$ git commit -m &amp;quot;Setup for Heroku&amp;quot;  
$ git push heroku [[master]-----&amp;gt; Fetching custom git buildpack... done
-----&amp;gt; Elixir app detected
-----&amp;gt; Using Erlang/OTP OTP_R16B
[..]

-----&amp;gt; Installing Rebar from buildpack
-----&amp;gt; Using Elixir master
[...]
   Compiled lib/dynamo_example/dynamo.ex
   Compiled web/routers/application_router.ex
   Generated DynamoExample.Dynamo.CompiledTemplates
   Generated dynamo_example.app
-----&amp;gt; Discovering process types
       Procfile declares types -&amp;gt; web

-----&amp;gt; Compiled slug size: 52.7MB
-----&amp;gt; Launching... done, v6
       http://dynamo-example.herokuapp.com deployed to Heroku
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You now have a working Dynamo app on Heroku!&lt;/p&gt;

&lt;h3&gt;What&amp;#39;s next?&lt;/h3&gt;

&lt;p&gt;No idea. Elixir and Dynamo are both really young. While a native&lt;br&gt;
database interface is planned, there&amp;#39;s nothing out at the time of this&lt;br&gt;
writing. Personal attemps to use&lt;br&gt;
&lt;a href=&quot;https://github.com/evanmiller/boss_db&quot;&gt;BossDB&lt;/a&gt; have failed. If I get it&lt;br&gt;
working, I&amp;#39;ll update here. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Until then, get hacking.&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr&gt;
&lt;ol&gt;

&lt;li id=&quot;fn1&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/goshakkk/heroku-buildpack-elixir&quot;&gt;https://github.com/goshakkk/heroku-buildpack-elixir&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;#fnref1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id=&quot;fn2&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/basho/rebar&quot;&gt;Rebar&lt;/a&gt; is a build-tool for Erlang projects, from the folks at &lt;a href=&quot;http://basho.com&quot;&gt;Basho&lt;/a&gt;.&amp;nbsp;&lt;a href=&quot;#fnref2&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Clint's Guide to ASCII Issue Status Codes :: posts</title>
       <link href="http://ctshryock.com/posts/2013/01/24/clints-guide-to-ascii-issue-status-codes.html"/>
       <updated>2013-01-24T10:43:47-06:00</updated>
       <id>http://ctshryock.com/posts/2013/01/24/clints-guide-to-ascii-issue-status-codes</id>
       <content type="html">&lt;p&gt;Status | ASCII&lt;br&gt;
----|-----&lt;br&gt;
Bug: | &lt;code&gt;౿(ఠ_ఠఎ)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Frustrating bug: | &lt;code&gt;(╯°□°）╯︵ ┻━┻&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Infuriating bug: | &lt;code&gt;(ノಠ益ಠ)ノ彡┻━┻&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Fixed: |  &lt;code&gt;┬─┬ノ( º _ ºノ)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Won&amp;#39;t fix: | &lt;code&gt;(╯°□°）╯︵ sıɥʇ&lt;/code&gt;&lt;br&gt;&lt;br&gt;
User error: |  &lt;code&gt;(╯°□°）╯︵ ╯(.□.╯)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Feature request: | &lt;code&gt;☜(ﾟヮﾟ☜)&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Resolved: |  &lt;code&gt;(ﾉ^_^)ﾉ&lt;/code&gt;  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>TIL: Ruby stuff II :: posts</title>
       <link href="http://ctshryock.com/posts/2012/12/21/til-ruby-stuff-ii.html"/>
       <updated>2012-12-21T08:37:31-06:00</updated>
       <id>http://ctshryock.com/posts/2012/12/21/til-ruby-stuff-ii</id>
       <content type="html">&lt;p&gt;Continuing adventures in &lt;a href=&quot;http://shop.oreilly.com/product/9780596516178.do&quot;&gt;The Ruby Programming Language&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;I see you&lt;/h3&gt;

&lt;p&gt;Ruby doesn&amp;#39;t like when you use variables or methods that aren&amp;#39;t defined:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;Ruby ❯ irb
irb(main):001:0&amp;gt; a 
NameError: undefined local variable or method `a&amp;#39; for main:Object  
  from (irb):2  
  from /Users/clint/.rbenv/versions/1.9.3-dev/bin/irb:12:in `&amp;lt;main&amp;gt;&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Makes sense – &lt;code&gt;a&lt;/code&gt; doesn&amp;#39;t exist. However, if the interpreter has at&lt;br&gt;
least &lt;em&gt;seen&lt;/em&gt; &lt;code&gt;a&lt;/code&gt;, things will be different:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;Ruby ❯ irb
irb(main):003:0&amp;gt; if false
irb(main):004:1&amp;gt; a = true
irb(main):005:1&amp;gt; end
=&amp;gt; nil
irb(main):006:0&amp;gt; a
=&amp;gt; nil
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Above, &lt;code&gt;a&lt;/code&gt; is never assigned, but it&amp;#39;s still seen by the interpreter, so&lt;br&gt;
it still exists in some way.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Connected :: posts</title>
       <link href="http://ctshryock.com/posts/2012/11/06/connected.html"/>
       <updated>2012-11-06T10:48:09-06:00</updated>
       <id>http://ctshryock.com/posts/2012/11/06/connected</id>
       <content type="html">&lt;p&gt;This was passed on to me today: &lt;br&gt;
&lt;pre&gt;&lt;br&gt;
It seems that one day a person asked the Buddha “How do you and your monks practice your path?”.&lt;/p&gt;

&lt;p&gt;To this, the Buddha replied “We walk, we sit and we eat.”&lt;/p&gt;

&lt;p&gt;“But everyone walks, sits and eats!”&lt;/p&gt;

&lt;p&gt;“However, when we walk, we know that we are walking. When we sit, we know that we are sitting, and when we eat, we know that we are eating”&lt;/p&gt;

&lt;p&gt;Being mindful of what is happening in the here and now is very important. Allowing past emotions, or future fears to rule you is counterproductive. By being fully engaged in the present, we are better parents, employees, and citizens.&lt;/p&gt;

&lt;div class=&#39;source&#39;&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/159448239X/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=159448239X&amp;linkCode=as2&amp;tag=brannigan-20&quot;&gt;Living Buddha, Living Christ&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=brannigan-20&amp;l=as2&amp;o=1&amp;a=159448239X&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The extent that we are connected in our lives&lt;br&gt;
is not unlike an addiction. It&amp;#39;s hard, really hard, to pull yourself&lt;br&gt;
out of the net and take an objective look at just how plugged in you&lt;br&gt;
are. How much you have just passed through, as if on a type of&lt;br&gt;
autopilot, without consciously &lt;em&gt;experiencing&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Ask yourself tonight as you get into bed:  &lt;/p&gt;

&lt;p&gt;What did I &lt;strong&gt;&lt;em&gt;experience&lt;/em&gt;&lt;/strong&gt; today?&lt;br&gt;&lt;br&gt;
What did I &lt;strong&gt;&lt;em&gt;do&lt;/em&gt;&lt;/strong&gt;?  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Ruby 2 on OS X Mountain Lion :: posts</title>
       <link href="http://ctshryock.com/posts/2012/11/02/ruby-2-on-os-x-mountain-lion.html"/>
       <updated>2012-11-02T08:49:59-05:00</updated>
       <id>http://ctshryock.com/posts/2012/11/02/ruby-2-on-os-x-mountain-lion</id>
       <content type="html">&lt;blockquote class=&quot;twitter-tweet tw-align-center&quot;&gt;&lt;p&gt;Ruby 2.0.0-preview1 is out “@&lt;a href=&quot;https://twitter.com/mametter&quot;&gt;mametter&lt;/a&gt;: ruby 2.0.0-preview1 をリリースしました &lt;a href=&quot;http://t.co/VdlK7sGJ&quot; title=&quot;http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/46348&quot;&gt;blade.nagaokaut.ac.jp/cgi-bin/scat.r…&lt;/a&gt;”&lt;/p&gt;&amp;mdash; Aaron Patterson (@tenderlove) &lt;a href=&quot;https://twitter.com/tenderlove/status/264168009063612416&quot; data-datetime=&quot;2012-11-02T00:52:16+00:00&quot;&gt;November 2, 2012&lt;/a&gt;&lt;/blockquote&gt;

&lt;script src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;strong&gt;[Updated for Ruby 2.0.0-rc1 on 10 January 2013]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ruby 2.0 release candidate 1 is out! If you&amp;#39;re like me you want to try out the new&lt;br&gt;
shiny stuff before it&amp;#39;s all done, you can install it now easily with&lt;br&gt;
&lt;a href=&quot;https://github.com/sstephenson/rbenv&quot;&gt;rbenv&lt;/a&gt; and &lt;a href=&quot;https://github.com/mxcl/homebrew&quot;&gt;Homebrew&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Warning&lt;/h2&gt;

&lt;p&gt;My first attempts at installing failed (quietly). Things seemed to&lt;br&gt;
work, but I found this in the &lt;code&gt;configure&lt;/code&gt; output:&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet tw-align-center&quot;&gt;&lt;p&gt;Noticed this while compiling:&quot;Ignore OpenSSL broken by Apple.Please use another openssl.&quot;ಠ_ಠ&lt;/p&gt;&amp;mdash; Clint Shryock (@ctshryock) &lt;a href=&quot;https://twitter.com/ctshryock/status/264188599262670849&quot; data-datetime=&quot;2012-11-02T02:14:05+00:00&quot;&gt;November 2, 2012&lt;/a&gt;&lt;/blockquote&gt;

&lt;p&gt;OS X ships with an older version of OpenSSL. Even in Mountain Lion.&lt;br&gt;
Homebrew makes it easy to install a new version, but does so cautiously;&lt;br&gt;
after you install OpenSSL, Homebrew displays a message detailing that it&lt;br&gt;
did not automatically link it. I chose to link it, but as a result I&lt;br&gt;
went and recompiled all of my rubies with rbenv and the new OpenSSL. You may or may not need&lt;br&gt;
to do this. It may or may not break other things. &lt;strong&gt;Be warned&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;Installing&lt;/h2&gt;

&lt;p&gt;I assuming you&amp;#39;re using &lt;strong&gt;rbenv&lt;/strong&gt;, &lt;strong&gt;Homebrew&lt;/strong&gt;, and an updated&lt;br&gt;
&lt;strong&gt;OpenSSL&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download and extract the preview release: 
&lt;a href=&quot;http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-rc1.tar.bz2&quot;&gt;ruby-2.0.0-rc1.tar.bz2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;With your favorite shell, navigate to the extracted folder and
&lt;code&gt;configure&lt;/code&gt; -&amp;gt; &lt;code&gt;make&lt;/code&gt; -&amp;gt; &lt;code&gt;make install&lt;/code&gt;. You need to set the
&lt;code&gt;--prefix&lt;/code&gt; flag to install it along your other &lt;strong&gt;rbenv&lt;/strong&gt; rubies:
&lt;pre&gt;&lt;code&gt;~❯ cd ~/Downloads/ruby-2.0.0-rc1
ruby-2.0.0-rc1 ❯ ./configure --prefix=$HOME/.rbenv/versions/2.0.0-rc1&lt;br&gt;
checking build system type... x86_64-apple-darwin12.2.0
...
...
config.status: creating ruby-2.0.pc
ruby-2.0.0-rc1 ❯ make
...
...
Elapsed: 0.1s
ruby-2.0.0-rc1 ❯ make install
...
...
ruby-2.0.0-rc1 ❯&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$\$\$ Profit $$$&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can now use Ruby 2.0 via &lt;strong&gt;rbenv&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;ruby-2.0.0-rc1 ❯ rbenv local 2.0.0-rc1 
ruby-2.0.0-rc1 ❯ ruby -v
ruby 2.0.0dev (2013-01-07 trunk 38733) [x86_64-darwin12.2.1]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Done.&lt;/strong&gt; &lt;a href=&quot;http://youtu.be/J-3VxOqHI-4&quot;&gt;Have fun storming the castle.&lt;/a&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>TIL: Ruby stuff :: posts</title>
       <link href="http://ctshryock.com/posts/2012/10/22/til-ruby-stuff.html"/>
       <updated>2012-10-22T09:09:11-05:00</updated>
       <id>http://ctshryock.com/posts/2012/10/22/til-ruby-stuff</id>
       <content type="html">&lt;h2&gt;. acts as continuation&lt;/h2&gt;

&lt;p&gt;In Ruby you can chain method calls with &lt;code&gt;.&lt;/code&gt; &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;a wild string&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gsub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/ /&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;capitalize&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;A+wild+string&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;But it works for other expressions too&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; 
  &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Total: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#=&amp;gt; 6&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Total redux: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#=&amp;gt; 10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Gives you:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;err&quot;&gt;$❯&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ruby&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fun&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rb&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;Total&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Total&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;redux&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;You can use _ for Integers and Floats&lt;/h2&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1_000&lt;/span&gt;  
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;  
&lt;span class=&quot;ss&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;class&lt;/span&gt;  
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Fixnum&lt;/span&gt;  
&lt;span class=&quot;ss&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;flt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1_000&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mo&quot;&gt;00&lt;/span&gt;  
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;  
&lt;span class=&quot;ss&quot;&gt;irb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;flt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;class&lt;/span&gt;  
&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Float&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Improves readability of your code&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>Running Rails with Puma and JRuby on Heroku :: posts</title>
       <link href="http://ctshryock.com/posts/2012/07/23/running-rails-with-puma-and-jruby-on-heroku.html"/>
       <updated>2012-07-23T08:22:18-05:00</updated>
       <id>http://ctshryock.com/posts/2012/07/23/running-rails-with-puma-and-jruby-on-heroku</id>
       <content type="html">&lt;p&gt;Last post I demonstrated setting up a Ruby on Rails app on Heroku,&lt;br&gt;
running with the &lt;a href=&quot;http://puma.io&quot;&gt;Puma&lt;/a&gt; server. As I mentioned before, in order to&lt;br&gt;
get the most out of Puma you should use a Ruby implementation with real&lt;br&gt;
threads like &lt;a href=&quot;http://www.jruby.org&quot;&gt;JRuby&lt;/a&gt; or &lt;a href=&quot;http://rubini.us&quot;&gt;Rubinius 2&lt;/a&gt;. In this post we&amp;#39;ll repeat&lt;br&gt;
most of the previous steps, but this time we&amp;#39;ll use a Third-Party Buildpack &lt;br&gt;
and get setup with JRuby.&lt;/p&gt;

&lt;h2&gt;Create a new Rails 3.x app with JRuby&lt;/h2&gt;

&lt;p&gt;Note: I&amp;#39;m not covering the specifics other than telling you to use &lt;a href=&quot;https://rvm.io/&quot;&gt;RVM&lt;/a&gt; or &lt;a href=&quot;https://github.com/sstephenson/rbenv&quot;&gt;rbenv&lt;/a&gt; to setup JRuby (I&amp;#39;m running 1.6.7.2)&lt;/p&gt;

&lt;p&gt;First create a new rails app&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;jruby -S rails new heroku-jruby-puma
  create 
  ...
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;heroku-jruby-puma
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git init&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you check your Gemfile, you should see some key differences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;instead of &lt;code&gt;sqlite3&lt;/code&gt; gem you have &lt;code&gt;activerecord-jdbcsqlite3-adapter&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;gem &lt;code&gt;jruby-openssl&lt;/code&gt; included&lt;/li&gt;
&lt;li&gt;&lt;code&gt;assets&lt;/code&gt; group includes &lt;code&gt;therubyrhino&lt;/code&gt; gem&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Configure Rails to work with JRuby&lt;/h2&gt;

&lt;p&gt;Some adjustments are needed to get this new Rails app to play nice on&lt;br&gt;
Heroku with Puma. First, we can&amp;#39;t just use the &lt;code&gt;pg&lt;/code&gt; gem; You need to use&lt;br&gt;
the &lt;code&gt;activerecord-jdbcpostgresql-adapter&lt;/code&gt; instead. Add &lt;code&gt;puma&lt;/code&gt; and set&lt;br&gt;
some configuration variables for Rails and we&amp;#39;re set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemfile&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;activerecord-jdbcpostgresql-adapter&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;puma&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:development&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; 
  &lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;foreman&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;activerecord-jdbcsqlite3-adapter&amp;#39;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Note: here I left &lt;code&gt;activerecord-jdbcsqlite3-adapter&lt;/code&gt; in the&lt;br&gt;
&lt;code&gt;development&lt;/code&gt; group just as an example.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;config/application.rb&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assets&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;initialize_on_precompile&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;config/production.rb&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serve_static_assets&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;threadsafe!&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Heroku log stuff&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;STDOUT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sync&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;STDOUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Create Heroku app with JRuby buildpack&lt;/h2&gt;

&lt;p&gt;Heroku&amp;#39;s Cedar stack has no native language or framework; instead your&lt;br&gt;
sever is setup via a set of scripts called &lt;a href=&quot;https://devcenter.heroku.com/articles/buildpacks&quot;&gt;Buildpacks&lt;/a&gt;. Heroku&lt;br&gt;
provides buildpacks for Ruby, Node.js, Python and a handful of others,&lt;br&gt;
but you can also create or use your own Buildpack by using the &lt;code&gt;--buildpack&lt;/code&gt; flag and providing a URL. Here we&amp;#39;ll use JRuby&amp;#39;s Heroku Buildpack from &lt;a href=&quot;BUILDPACK_URL=https://github.com/jruby/heroku-buildpack-jruby.git&quot;&gt;github.com/jruby/heroku-buildpack-jruby&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;heroku create heroku-jruby-puma &lt;span class=&quot;se&quot;&gt;\ &lt;/span&gt;
  --buildpack https://github.com/jruby/heroku-buildpack-jruby.git  

  Creating heroku-jruby-puma ... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, stack is cedar  
  &lt;span class=&quot;nv&quot;&gt;BUILDPACK_URL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;https://github.com/jruby/heroku-buildpack-jruby.git
  ...
~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now when you push your code up, Heroku&amp;#39;s slug compiler knows how to&lt;br&gt;
package things an build them to use JRuby.&lt;/p&gt;

&lt;h2&gt;Add a Procfile&lt;/h2&gt;

&lt;p&gt;As I mentioned last time, a &lt;code&gt;Procfile&lt;/code&gt; tells Heroku how to run your app:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;web: bin/puma -p &lt;span class=&quot;nv&quot;&gt;$PORT&lt;/span&gt; -e &lt;span class=&quot;nv&quot;&gt;$RACK_ENV&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thats it! Commit your changes and push to Heroku like before:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git push
  -----&amp;gt; Heroku receiving push
  -----&amp;gt; Fetching custom buildpack... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
  -----&amp;gt; JRuby app detected
  -----&amp;gt; Vendoring JRuby into slug
  -----&amp;gt; Installing dependencies with Bundler
  ...
  -----&amp;gt; Writing config/database.yml to &lt;span class=&quot;nb&quot;&gt;read &lt;/span&gt;from DATABASE_URL
  -----&amp;gt; Precompiling assets
  ...
  -----&amp;gt; Discovering process types
       Procfile declares types -&amp;gt; web
  -----&amp;gt; Compiled slug size is 44.5MB
  -----&amp;gt; Launching... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, v7
         http://heroku-jruby-puma.herokuapp.com deployed to Heroku

  To git@heroku.com:heroku-jruby-puma.git
     6bced4f..383a7cc  master -&amp;gt; master
~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Within a few moments you should be running on JRuby/Puma on Heroku.&lt;br&gt;
Notice that your slug size is significantly larger than a normal stock&lt;br&gt;
Rails app running on MRI. That&amp;#39;s because of 4th item you see above,&lt;br&gt;
&amp;quot;Vendoring JRuby into slug&amp;quot;. &lt;/p&gt;

&lt;p&gt;Congratulations! You&amp;#39;re now running Rails with JRuby and Puma on Heroku.&lt;/p&gt;

&lt;h3&gt;See Also:&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://puma.io&quot;&gt;Puma&amp;#39;s site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/jruby/heroku-buildpack-jruby&quot;&gt;JRuby Heroku Buildpack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://coderwall.com/p/eel7na&quot;&gt;Phil Cohen: Improved concurrency for Heroku Dynos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Running Rails with Puma on Heroku :: posts</title>
       <link href="http://ctshryock.com/posts/2012/07/12/running-rails-with-puma-on-heroku.html"/>
       <updated>2012-07-12T22:26:13-05:00</updated>
       <id>http://ctshryock.com/posts/2012/07/12/running-rails-with-puma-on-heroku</id>
       <content type="html">&lt;p&gt;&lt;strong&gt;02 July 2013 Puma 2 Updates:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update &lt;a href=&quot;#procfile&quot;&gt;Procfile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;a href=&quot;#configuration&quot;&gt;Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;a href=&quot;#clustered-mode&quot;&gt;Clustered mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Mention threads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I&amp;#39;ve been playing around with &lt;a href=&quot;http://heroku.com&quot;&gt;Heroku&lt;/a&gt; a lot lately and noticed they&lt;br&gt;
recommend using &lt;a href=&quot;https://devcenter.heroku.com/articles/rails3#webserver&quot;&gt;Thin&lt;/a&gt; for your production server when running Rails. In recent months&lt;br&gt;
I&amp;#39;ve grown attached to &lt;a href=&quot;http://puma.io&quot;&gt;Puma&lt;/a&gt; (for no qualified reasons) and wanted to see if&lt;br&gt;
I can get a Rails app running on Heroku&amp;#39;s &lt;a href=&quot;https://devcenter.heroku.com/articles/cedar&quot;&gt;cedar stack&lt;/a&gt; with Puma instead. It&lt;br&gt;
turned out to be really, really simple. &lt;/p&gt;

&lt;div class=&quot;alert alert-info&quot;&gt;
It&#39;s important to keep in mind that Puma is threaded; if your code is not threadsafe, or your not
using config.threadsafe!, you may have a bad time (Rails 4 is
threadsafe by default).
&lt;/div&gt;

&lt;h2&gt;Create a new Rails 3.x app&lt;/h2&gt;

&lt;p&gt;First create a new rails app, heroku app, and initialize a git repo:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rails new heroku-puma
  create 
  ...
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;heroku-puma
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;heroku create
  Creating high-day-4093... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, stack is cedar
  http://high-day-4093.herokuapp.com/ &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; git@heroku.com:high-day-4093.git
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git init
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git remote add heroku git@heroku.com:high-day-4093.git&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

  

Launch your favorite editor and make some standard adjustments in your
`Gemfile`, just as a demonstration:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;sqlite3&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


becomes


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;thin&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


## Deploy with Thin, just for fun

Back in the terminal, add your files to the git repo and make your first
commit, then push it up to Heroku:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git add .
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git commit -m &lt;span class=&quot;s2&quot;&gt;&amp;quot;Initial import, using Thin server&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git push heroku master
-----&amp;gt; Heroku receiving push
-----&amp;gt; Ruby/Rails app detected
-----&amp;gt; Installing dependencies using Bundler version 1.2.0.pre
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.......
...
Installing thin &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;1.4.1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; with native extensions
...
-----&amp;gt; Launching... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, v4
http://high-day-4093.herokuapp.com deployed to Heroku
&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


Now that your app is launched, do a quick `curl` call and confirm it&#39;s
on Thin:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl -I http://high-day-4093.herokuapp.com
HTTP/1.1 &lt;span class=&quot;m&quot;&gt;200&lt;/span&gt; OK
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;...&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
Server: thin 1.4.1 codename Chromeo
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;..&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


Hooray, we&#39;re running Thin! You can see this in the **Server** header
that Thin sets. Except, we want to run Puma...


## Procfile

Cedar introduced a new way to think about scaling your app; &quot;the process model&quot;. It&#39;s a generalized approach to managing processes across Heroku&#39;s distributed environment, allowing you to tweak how and what gets run via a [Procfile][5]. Here we&#39;ll create a simple `Procfile` and tell our app to run with Puma instead of Thin.

First, swap out Thin for Puma in your `Gemfile`:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;puma&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


[^proc]Then add a file named `Procfile` to the root of your project and add the following:

    web: bundle exec puma -p $PORT -e $RACK_ENV -t 0:5
    
Those are the instructions Heroku will use to run your `web` process.

&lt;div class=&quot;alert alert-info&quot;&gt;
Here $PORT and $RACK_ENV reference environment variables provided by Heroku, port being the
listen port assigned by the Heroku router, and $RACK_ENV being the mode
to run your app, typically &#39;production&#39;.
The -t flag lets you tune the threads Puma will use; here we set it to
minimum 0, maximum 5, to line up with the default connection pool count
from ActiveRecord.
&lt;/div&gt;

&lt;p&gt;Making sure to add the new &lt;code&gt;Procfile&lt;/code&gt; to your repo, commit your changes&lt;br&gt;
and push to Heroku again:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git add Procfile
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git add Gemfile
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git commit -m &lt;span class=&quot;s2&quot;&gt;&amp;quot;Use Puma via a Procfile&amp;quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git push heroku master
  -----&amp;gt; Heroku receiving push
  -----&amp;gt; Ruby/Rails app detected
  -----&amp;gt; Installing dependencies using Bundler version 1.2.0.pre
  Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
  Fetching gem metadata from https://rubygems.org/.......
  ...
  Installing puma &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;1.4.0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; with native extensions
  ...
  -----&amp;gt; Launching... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, v5
  http://high-day-4093.herokuapp.com deployed to Heroku&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


Now we run our `curl` command again:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl -I http://high-day-4093.herokuapp.com
HTTP/1.1 &lt;span class=&quot;m&quot;&gt;200&lt;/span&gt; OK
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;...&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


Hooray, we&#39;re not running Thin! Except it doesn&#39;t say we&#39;re running Puma
either... I suppose Puma doesn&#39;t report itself like Thin and WEBrick do. 

Now if you run `heroku ps` you should see you have 1 web dyno running,
and the statement used to run it:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;heroku &lt;span class=&quot;nv&quot;&gt;ps&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; web: bundle &lt;span class=&quot;nb&quot;&gt;exec &lt;/span&gt;puma -p &lt;span class=&quot;nv&quot;&gt;$PORT&lt;/span&gt; -e &lt;span class=&quot;nv&quot;&gt;$RACK_ENV&lt;/span&gt; -t 0:5
web.1: up &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; 2m&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


Congratulations, you&#39;re running Puma! Note that Puma is said to really
shine with Rubinius and JRuby where it can utilize multiple threads.
Still, it should give you some benefits on MRI as well. 

## Configuration

As you continue to fine tune your Puma setup, you may find yourself with
more than a few flags and switches in your invocation (the `web:` part of
the `Procfile` in this case). Puma lets you specify a configuration file
for all this, using the `-C` flag:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;web: bundle &lt;span class=&quot;nb&quot;&gt;exec &lt;/span&gt;puma -p &lt;span class=&quot;nv&quot;&gt;$PORT&lt;/span&gt; -C ./config/puma.rb&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


And matching `./config/puma.rb` file:


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# config/puma.rb&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;environment&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ENV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;RACK_ENV&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;threads&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


**Done!** Checkout the [sample configuration][7] or
[configuration.rb][8] in the
repository to see all available options.

&lt;div class=&quot;alert alert-info&quot;&gt;
Note: you can&#39;t configure the port in your configuration file. Not sure
why, maybe a bug.
¯\_(ツ)_/¯  
&lt;/div&gt;

&lt;h2&gt;Clustered Mode&lt;/h2&gt;

&lt;p&gt;With it&amp;#39;s 2.0 release, Puma learned some new tricks, key being the&lt;br&gt;
addition of &lt;a href=&quot;https://github.com/puma/puma#clustered-mode&quot;&gt;Clustered&lt;br&gt;
Mode&lt;/a&gt;. Puma gains a level of concurrency by spawning workers to handle requests,&lt;br&gt;
each worker with it&amp;#39;s own set of threads. You enable clustered mode with&lt;br&gt;
the &lt;code&gt;-w&lt;/code&gt; or &lt;code&gt;--workers&lt;/code&gt; flag, providing the number of workers you&amp;#39;d like&lt;br&gt;
to spawn. To enable this on Heroku, simply update your &lt;code&gt;Procfile&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;web: bundle exec puma -p $PORT -e $RACK_ENV -w 3 -t 0:5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or add &lt;code&gt;workers&lt;/code&gt; to your &lt;code&gt;./config/puma.rb&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# config/puma.rb&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;environment&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ENV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;RACK_ENV&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;threads&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;workers&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can optionally choose to preload your application before spinning up&lt;br&gt;
your workers. Use the &lt;code&gt;--preload&lt;/code&gt; flag or call &lt;code&gt;preload_app!&lt;/code&gt; in your&lt;br&gt;
config file.&lt;/p&gt;

&lt;p&gt;Finally, you can hook into your workers before they boot with the&lt;br&gt;
&lt;code&gt;on_worker_boot&lt;/code&gt; method in your config file. An example of something to&lt;br&gt;
do here is if you&amp;#39;re preloading your application, you&amp;#39;ll want to&lt;br&gt;
  establish your ActiveRecord connections here:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# config/puma.rb&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;environment&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ENV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;RACK_ENV&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;threads&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;workers&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;preload_app!&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;on_worker_boot&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;ActiveSupport&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:active_record&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;establish_connection&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You&amp;#39;ve ran the gamut and setup Puma on Heroku, and threw in lots of&lt;br&gt;
optional things a long the way. Checkout &lt;a href=&quot;http://puma.io&quot;&gt;puma.io&lt;/a&gt; and&lt;br&gt;
&lt;a href=&quot;https://github.com/puma/puma&quot;&gt;github.com/puma/puma&lt;/a&gt; for more info. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now get hacking.&lt;/strong&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
     <entry>
       <title>Be helpful; Don't be helpful :: posts</title>
       <link href="http://ctshryock.com/posts/2012/03/13/be-helpful-dont-be-helpful.html"/>
       <updated>2012-03-13T14:38:52-05:00</updated>
       <id>http://ctshryock.com/posts/2012/03/13/be-helpful-dont-be-helpful</id>
       <content type="html">&lt;p&gt;You can often find me lurking on IRC in #github. It&amp;#39;s taken me some time but&lt;br&gt;
I&amp;#39;ve built up a lot of good git knowledge and experience and I enjoy&lt;br&gt;
being able to help people out now and again.&lt;/p&gt;

&lt;p&gt;It bugs the hell out of me when I see things like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;[2:42pm] PersonWithQuestion: Why its not pulling? [pastie link]
[2:43pm] PersonWithQuestion: 1) From my laptop its pushed to github.com 2) In RHEL i am now pulling the latest and it gives me that above failure.
[2:45pm] ctshryock: PersonWithQuestion: Theres a change in that file on REHL
[2:46pm] PersonWithQuestion: ctshryock, its old one (git clone only)
[2:48pm] PersonWithQuestion: REHL is only downloader, wont ever commit anything just for upto date purpose.
[2:48pm] ctshryock: run `git status` on REHL
[2:50pm] PersonWithQuestion: [pastie link]    its saying to commit but i do not want it commit anything it will be tricky/risky. Is there a way to tell force pull only?
[2:51pm] ImpatientPerson: you can always go back and remove or update the commit if you need to
[2:51pm] ImpatientPerson: but another alternative is git stash
[2:52pm] OtherImpatientPerson: git stash
[2:52pm] OtherImpatientPerson: git stash pop
[2:52pm] ctshryock: the index.php has been modified by someone/thing on REHL
[2:52pm] PersonWithQuestion: ctshryock, i did that yes
[2:52pm] OtherImpatientPerson: PersonWithQuestion: git stash
[2:52pm] OtherImpatientPerson: git pull
[2:52pm] ImpatientPerson: i end up doing git stash &amp;amp;&amp;amp; git pull &amp;amp;&amp;amp; git stash pop
[2:52pm] OtherImpatientPerson: git stash pop
[2:52pm] OtherImpatientPerson: yup
[2:52pm] ctshryock: PersonWithQuestion: Do you want to keep those changes?
[2:53pm] ImpatientPerson: behind the scenes stash is creating a commit for the file anyway
[2:53pm] PersonWithQuestion: ctshryock, no 100% ignore and pull whatever is now in github.com i just tried : git stash &amp;amp;&amp;amp; git pull &amp;amp;&amp;amp; git stash pop  but it saying conflict (content): public/index.php
[2:53pm] PersonWithQuestion: wow stash is cool i think it did all the updates
[2:53pm] ctshryock: git checkout -- public/index.hphp
[2:54pm] ctshryock: That will restore public/index.php to the unmodified state
[2:54pm] PersonWithQuestion: error: path &amp;#39;public/index.php&amp;#39; is unmerged
[2:54pm] ctshryock: then you can `git pull`
[2:54pm] ctshryock: From the checkout line above?
[2:55pm] ctshryock: oh you&amp;#39;re in the middle of a merge conflict from doing all that stash pop nonsense
[2:57pm] ctshryock: `git merge --abort`
[2:57pm] ctshryock: git checkout -- public/index.php
[2:57pm] ctshryock: git pull
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here we have &lt;strong&gt;ImpatientPerson&lt;/strong&gt; and &lt;strong&gt;OtherImpatientPerson&lt;/strong&gt; rattling&lt;br&gt;
things about &lt;code&gt;git stash&lt;/code&gt; and what not before even understanding what &lt;strong&gt;PersonWithQuestion&lt;/strong&gt; was even trying to accomplish. Meanwhile&lt;br&gt;
&lt;strong&gt;PersonWithQuestion&lt;/strong&gt; ends up mucking up their working directory&lt;br&gt;
running each command you threw at them because they don&amp;#39;t understand the&lt;br&gt;
problem either.&lt;/p&gt;

&lt;p&gt;You mean well, but try to understand the problem first before you start shouting answers.&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>That 80's Guy is running Mozilla :: posts</title>
       <link href="http://ctshryock.com/posts/2011/11/09/that-80s-guy-is-running-mozilla.html"/>
       <updated>2011-11-09T08:23:51-06:00</updated>
       <id>http://ctshryock.com/posts/2011/11/09/that-80s-guy-is-running-mozilla</id>
       <content type="html">&lt;p&gt;Awhile back Mozilla announced their 2011 roadmap, taking Firefox from&lt;br&gt;
v4 all the way to (atleast) v7 by years end. Today I updated to v8, not&lt;br&gt;
because I use Firefox, but because I heard it was out and thought I&amp;#39;d&lt;br&gt;
see what&amp;#39;s new.&lt;/p&gt;

&lt;p&gt;I hear it has integrated Twitter search.  That&amp;#39;s about all I&amp;#39;ve heard is&lt;br&gt;
new.&lt;/p&gt;

&lt;p&gt;It feels odd to jump from this&lt;br&gt;&lt;br&gt;
&lt;img src=&quot;/static/images/ff_7_0_1.png&quot; alt=&quot;Version 7.0.1&quot;&gt;&lt;/p&gt;

&lt;p&gt;To this&lt;br&gt;&lt;br&gt;
&lt;img src=&quot;/static/images/ff_8_0.png&quot; alt=&quot;Version 8.0&quot;&gt;&lt;/p&gt;

&lt;p&gt;But hey, whatever works&lt;br&gt;&lt;br&gt;
&lt;img src=&quot;/static/images/That80sGuy.jpg&quot; alt=&quot;That 80s Guy&quot;&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>Buggers :: posts</title>
       <link href="http://ctshryock.com/posts/2011/09/08/buggers.html"/>
       <updated>2011-09-08T07:42:27-05:00</updated>
       <id>http://ctshryock.com/posts/2011/09/08/buggers</id>
       <content type="html">&lt;pre&gt;
  &quot;When Ender Wiggin holds our fleets in his control, when he must 
make the decisions that bring us victory or destruction, will there 
be military police to come save him if things get out of hand?
  &quot;I fail to see the connection.&quot;
  &quot;Obviously. But the connection is there. Ender Wiggin must believe
that no matter what happens, no adult will ever, ever step in to 
help him in any way. He must believe, to the core of his soul, that 
he can only do what he and the other children work out for 
themselves. If he does not believe that, then he will never reach 
the peak of his abilities.&quot;

&lt;div class=&#39;source&#39;&gt;-Enders Game&lt;/div&gt;
&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;You can only do what you work out for yourself. No one is going to save you.&lt;/strong&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>#IgniteComo :: posts</title>
       <link href="http://ctshryock.com/posts/2011/08/19/ignite-columbia-mo.html"/>
       <updated>2011-08-19T12:52:47-05:00</updated>
       <id>http://ctshryock.com/posts/2011/08/19/ignite-columbia-mo</id>
       <content type="html">&lt;div style=&quot;align:center;&quot;&gt;
  &lt;a href=&quot;/static/images/ignite.jpg&quot; alt=&quot;Me, presenting at #IgniteComo&quot;&gt;
    &lt;img src=&quot;/static/images/ignite_cropped.jpg&quot; width=&quot;560&quot; alt=&quot;I&#39;m a
  handsome devil&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Last night was Columbia&amp;#39;s first &lt;a href=&quot;http://igniteshow.com/&quot;&gt;Ignite&lt;/a&gt; event, hosted by the &lt;a href=&quot;http://socialmediaclub.org/chapter/social-media-club-mid-missouri&quot;&gt;Social Media Club of Mid-Missouri&lt;/a&gt;. I had the&lt;br&gt;
privilege of presenting on my passion, &amp;quot;Hacking&amp;quot;.&lt;/p&gt;

&lt;p&gt;The Media focuses on one tiny part of hacking, &amp;quot;cracking&amp;quot; as White&lt;br&gt;
Hats like to call it, and labels it Hacking. The general population&amp;#39;s&lt;br&gt;
mental image of hackers follows suit.  &lt;/p&gt;

&lt;p&gt;Hacking isn&amp;#39;t about breaking into computer systems, stealing&lt;br&gt;
digital things or causing mayhem on the internet.  Hacking is&lt;br&gt;
&lt;em&gt;exploring&lt;/em&gt;.  Hacking is &lt;em&gt;creating&lt;/em&gt;.  Hacking is &lt;em&gt;diving deep into the&lt;br&gt;
essence of something in order to understand it&lt;/em&gt;. The &lt;em&gt;act&lt;/em&gt; of hacking is more&lt;br&gt;
akin to playfulness, cleverness, and exploration, not violating the bits&lt;br&gt;
of a computer or network.  &lt;/p&gt;

&lt;p&gt;Hacking isn&amp;#39;t wrong, bad, or illegal. It shouldn&amp;#39;t be frowned upon or mistrusted. It should be encouraged. Hacking is curiosity at play. Hacking&lt;br&gt;
is learning. Hacking is breaking down limitations and going beyond them. &lt;/p&gt;

&lt;p&gt;And it certainly isn&amp;#39;t isolated to computers and software.&lt;/p&gt;

&lt;p&gt;Thanks to Scott over at &lt;a href=&quot;http://penguinspark.com/&quot;&gt;PenguinSpark&lt;/a&gt; for his work organizing the&lt;br&gt;
event.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/mUN-AOzPzgM?hd=1&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>(Ka)Pow :: posts</title>
       <link href="http://ctshryock.com/posts/2011/08/03/ka-pow.html"/>
       <updated>2011-08-03T23:07:30-05:00</updated>
       <id>http://ctshryock.com/posts/2011/08/03/ka-pow</id>
       <content type="html">&lt;p&gt;If you do any Rack or Ruby on Rails development, you should checkout&lt;br&gt;
&lt;a href=&quot;http://pow.cx/&quot;&gt;Pow&lt;/a&gt;, the zero configuration Rack server for OS X. &lt;/p&gt;

&lt;p&gt;Pow makes getting up and running with these apps dead simple.  No running &lt;code&gt;rails server&lt;/code&gt;&lt;br&gt;
one app at a time, no Apache/Passenger configs to setup, no mucking with &lt;code&gt;/etc/hosts&lt;/code&gt;.  Pow doesn&amp;#39;t &lt;br&gt;
require special privileges (runs as your user), with no gems or&lt;br&gt;
extensions to intall.  Just Pow, and it installs in seconds.&lt;/p&gt;

&lt;p&gt;From the manual:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How does it work? A few simple conventions eliminate the need for tedious configuration. Pow runs as your user on an unprivileged port, and includes both an HTTP and a DNS server. The installation process sets up a firewall rule to forward incoming requests on port 80 to Pow. It also sets up a system hook so that all DNS queries for a special top-level domain (.dev) resolve to your local machine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;The good and bad:&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Any request to &lt;strong&gt;*.dev&lt;/strong&gt; is sent to Pow&lt;/li&gt;
&lt;li&gt;Pow &lt;strong&gt;by default&lt;/strong&gt; hijacks port 80&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You &lt;strong&gt;can&lt;/strong&gt; configure that last one, and it&amp;#39;s simple to do so, incase you do any other type of development where you already have something like Apache setup to handle those requests. Without configuring otherwise Pow will respond instead and likely not know what to do.&lt;/p&gt;

&lt;h3&gt;Setup and adding Apps&lt;/h3&gt;

&lt;p&gt;Installation requires authentication simply because it creates a new&lt;br&gt;
Firewall rule.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl get.pow.cx &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; sh
*** Installing Pow 0.3.1...
*** Installing &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;configuration files...
*** Starting the Pow server...
*** Performing self-test...
*** Installed&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It&amp;#39;s that easy. Uninstallation is just as easy too:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;curl get.pow.cx/uninstall.sh &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; sh
Sorry to see you go. Uninstall Pow &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;y/n&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;? y
*** Uninstalling Pow...
*** Uninstalled&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Pow creates a &lt;code&gt;~/.pow&lt;/code&gt; directory in your home folder. To setup an app&lt;br&gt;
with Pow, &lt;code&gt;cd&lt;/code&gt; there and create a symlink:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/.pow
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ln -s /some/rackapp&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;  Visit &lt;code&gt;http://rackapp.dev&lt;/code&gt; and you&amp;#39;re rack app will load&lt;br&gt;
before your awe-struck eyes.&lt;/p&gt;

&lt;h3&gt;But what about my port 80?&lt;/h3&gt;

&lt;p&gt;Yeah, you probably want that back huh...&lt;br&gt;
Fortunately you have some options there, detailed on &lt;a href=&quot;https://github.com/37signals/pow/wiki/Running-Pow-with-Apache&quot;&gt;this helpful wiki&lt;/a&gt; on&lt;br&gt;
the Pow Github project. It outlines two steps, but depending on your&lt;br&gt;
desired setup, you may be fine with just the first one.&lt;/p&gt;

&lt;h4&gt;Without adjusting Apache&lt;/h4&gt;

&lt;p&gt;Create a &lt;code&gt;~/.powconfig&lt;/code&gt; file and put the following there:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# ~/.powconfig&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;POW_DST_PORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;88&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On Boot, Pow will read that file for any &lt;a href=&quot;http://pow.cx/docs/configuration.html&quot;&gt;configuration options (more&lt;br&gt;
here)&lt;/a&gt;. This tells Pow not to use port &lt;strong&gt;80&lt;/strong&gt;, but instead use&lt;br&gt;
port &lt;strong&gt;88&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;From there forward, just add &lt;code&gt;:88&lt;/code&gt; to your app urls, a la&lt;br&gt;
&lt;code&gt;http://rackapp.dev:88&lt;/code&gt;. Apache will still use port 80 and your other&lt;br&gt;
apps will be fine, while any Pow app now responds to&lt;br&gt;
&lt;code&gt;&amp;lt;app-name&amp;gt;.dev:88&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;Adjusting Apache&lt;/h4&gt;

&lt;p&gt;If you like the idea of not having to specify a port &lt;em&gt;at all&lt;/em&gt;, you can&lt;br&gt;
do the additional step of adding an Apache conf file in&lt;br&gt;
&lt;code&gt;/etc/apache2/other/&lt;/code&gt; instructing Apache to act as a reverse proxy for&lt;br&gt;
Pow instead.  This allows you to have your Pow apps respond at&lt;br&gt;
&lt;code&gt;&amp;lt;app-name&amp;gt;.dev&lt;/code&gt;, while maintaining your current Apache process.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo curl https://raw.github.com/gist/1058580/zzz_pow.conf -o /etc/apache2/other/zzz_pow.conf
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo apachectl restart&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The naming is important because Apache will load it last. You want Apache to behave like normal for all&lt;br&gt;
requests and then proxy anything that doesn&amp;#39;t match your other host files to the Pow server.  &lt;/p&gt;

&lt;h3&gt;A little Pow(der)&lt;/h3&gt;

&lt;p&gt;Pow has already made your life better, what more could you want?  &lt;/p&gt;

&lt;p&gt;You&amp;#39;re right, &lt;code&gt;cd ~/.pow&lt;/code&gt; and creating a symlink &lt;em&gt;is&lt;/em&gt; asking an awful lot of you just to run multiple Rack apps simultaneously with no hassle...&lt;/p&gt;

&lt;p&gt;So you use &lt;a href=&quot;https://github.com/Rodreegez/powder&quot;&gt;Powder&lt;/a&gt;, a handy little gem that lets you link and unlink Pow apps without&lt;br&gt;
leaving the comfort of your &lt;code&gt;cwd&lt;/code&gt;. And hey, it can give you a bit more insight to what Pow&amp;#39;s doing too.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;powder &lt;span class=&quot;nb&quot;&gt;help&lt;/span&gt;
Tasks:
  powder applog       &lt;span class=&quot;c&quot;&gt;# Tails in current app&lt;/span&gt;
  powder config       &lt;span class=&quot;c&quot;&gt;# Shows current pow configuration&lt;/span&gt;
  powder down         &lt;span class=&quot;c&quot;&gt;# Disable pow&lt;/span&gt;
  powder &lt;span class=&quot;nb&quot;&gt;help&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;TASK&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;  &lt;span class=&quot;c&quot;&gt;# Describe available tasks or one specific task&lt;/span&gt;
  powder install      &lt;span class=&quot;c&quot;&gt;# Installs pow&lt;/span&gt;
  powder link         &lt;span class=&quot;c&quot;&gt;# Link a pow&lt;/span&gt;
  powder list         &lt;span class=&quot;c&quot;&gt;# List current pows&lt;/span&gt;
  powder log          &lt;span class=&quot;c&quot;&gt;# Tails the Pow log&lt;/span&gt;
  powder open         &lt;span class=&quot;c&quot;&gt;# Open a pow in the browser&lt;/span&gt;
  powder remove       &lt;span class=&quot;c&quot;&gt;# An alias to Unlink (depreciated)&lt;/span&gt;
  powder restart      &lt;span class=&quot;c&quot;&gt;# Restart current pow&lt;/span&gt;
  powder status       &lt;span class=&quot;c&quot;&gt;# Shows current pow status&lt;/span&gt;
  powder uninstall    &lt;span class=&quot;c&quot;&gt;# Uninstalls pow&lt;/span&gt;
  powder unlink       &lt;span class=&quot;c&quot;&gt;# Unlink a pow app&lt;/span&gt;
  powder up           &lt;span class=&quot;c&quot;&gt;# Enable pow&lt;/span&gt;
  powder version      &lt;span class=&quot;c&quot;&gt;# Shows the version&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Epilogue&lt;/h3&gt;

&lt;p&gt;Pow gives you really, really easy setups for your Rack apps.  Now you&lt;br&gt;
can work on several at the same time or support interaction between&lt;br&gt;
them with ease. Coupled with one-line install/uninstall, the barrier to entry is&lt;br&gt;
incredibly low too, so give it a shot. It can make your (dev) life&lt;br&gt;
simpler.  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Git in practice :: posts</title>
       <link href="http://ctshryock.com/posts/2011/08/02/git-in-practice.html"/>
       <updated>2011-08-02T08:42:04-05:00</updated>
       <id>http://ctshryock.com/posts/2011/08/02/git-in-practice</id>
       <content type="html">&lt;p&gt;Last Wednesday I gave a quick lightning talk on using Git in your&lt;br&gt;
everday workflow.  You can find the source &lt;a href=&quot;https://github.com/catsby/git-in-practice&quot;&gt;here on Github&lt;/a&gt;, and the&lt;br&gt;
slideshow on the &lt;a href=&quot;http://comorichwebgroup.github.com/git-in-practice&quot;&gt;gh-pages&lt;/a&gt; of the &lt;a href=&quot;http://github.com/comorichwebgroup&quot;&gt;CoMO Rich Web Group&lt;/a&gt; fork.&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>Microsoft and Skype :: posts</title>
       <link href="http://ctshryock.com/posts/2011/05/10/Microsoft-and-Skype.html"/>
       <updated>2011-05-10T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2011/05/10/Microsoft-and-Skype</id>
       <content type="html">&lt;p&gt;A company whos product I use day in and day out as part of my job is&lt;br&gt;
being acquired by a larger company who I don&amp;#39;t really care for but am no doubt&lt;br&gt;
indebted to.  I have mixed feelings about this.  &lt;/p&gt;

&lt;p&gt;Since September 2010 I&amp;#39;ve been working at &lt;a href=&quot;http://cramerdev.com&quot;&gt;CramerDev&lt;/a&gt;, and a key to&lt;br&gt;
our communication has been Skype.  Per-project group chats as well as&lt;br&gt;
video chat when needed, it&amp;#39;s been a great tool. &lt;/p&gt;

&lt;p&gt;We&amp;#39;re mostly a Mac shop (another key to our success IMO).  Needless to&lt;br&gt;
say &lt;a href=&quot;http://www.skype.com/intl/en/get-skype/on-your-computer/macosx/&quot;&gt;Skype 5&lt;/a&gt; was seen as a horrible, horrible sin delivered upon us, as &lt;a href=&quot;http://ignorethecode.net/blog/2011/03/30/skype_5/&quot;&gt;others eloquently put&lt;/a&gt;.  I immediately reverted to Skype 2.8 (&lt;a href=&quot;http://daringfireball.net/linked/2011/05/09/skype-security&quot;&gt;and you should too&lt;/a&gt;) &lt;/p&gt;

&lt;p&gt;I&amp;#39;m not really worried about this.  Skype 5 is&lt;br&gt;
pretty bad, and Skype 2.x is still supported.  If Microsoft screws this&lt;br&gt;
up, which it may, I&amp;#39;m sure another competitor will shine and we&amp;#39;ll&lt;br&gt;
migrate.  I&amp;#39;ve been hearing a lot of great things about &lt;a href=&quot;http://campfirenow.com/&quot;&gt;Campfire&lt;/a&gt;&lt;br&gt;
lately.  &lt;/p&gt;

&lt;p&gt;Lastly, &lt;a href=&quot;http://gigaom.com/2011/05/09/why-microsoft-is-buying-skype-for-8-billion/&quot;&gt;this GigaOM article&lt;/a&gt; sums up my prediction for both&lt;br&gt;
companies in this regard:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It won’t surprise me if Microsoft comes in for major heat on this&lt;br&gt;
decision to buy Skype &amp;mdash; and the software company could always&lt;br&gt;
botch this purchase, as it often does when it buys a company. The&lt;br&gt;
Skype team is also full of hired guns who are likely to move on to the&lt;br&gt;
next opportunity rather than dealing with the famed Microsoft&lt;br&gt;
bureaucracy.h&lt;/p&gt;
&lt;/blockquote&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Git Flow at CoMo Rich Web :: posts</title>
       <link href="http://ctshryock.com/posts/2011/04/28/git-flow-at-CoMo-Rich-Web.html"/>
       <updated>2011-04-28T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2011/04/28/git-flow-at-CoMo-Rich-Web</id>
       <content type="html">&lt;p&gt;Last night at the &lt;a href=&quot;http://comorichweb.posterous.com&quot;&gt;CoMo Rich Web&lt;/a&gt; meet-up I gave a quick lighting talk on using &lt;a href=&quot;https://github.com/nvie/gitflow&quot;&gt;Git-Flow&lt;/a&gt; in your&lt;br&gt;
projects. Afterwards &lt;a href=&quot;http://thirstyhead.com/&quot;&gt;Scott Davis of ThirstyHead&lt;/a&gt; gave a great talk&lt;br&gt;
on HTML5, &lt;strike&gt; which I&amp;#39;m trying to find a link to the&lt;br&gt;
slides.&lt;/strike&gt; who&amp;#39;s &lt;a href=&quot;/static/pdfs/html5-1up.pdf&quot;&gt;slides are available here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can view my talk at &lt;a href=&quot;http://ctshryock.github.com/git-flow-talk&quot;&gt;ctshryock.github.com/git-flow-talk&lt;/a&gt;, source&lt;br&gt;
&lt;a href=&quot;https://github.com/catsby/git-flow-talk&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For my slides I used &lt;a href=&quot;https://github.com/schacon/showoff&quot;&gt;ShowOff&lt;/a&gt;, a Sinatra app that reads&lt;br&gt;
simple files and creates an HTML presentation.  Having used&lt;br&gt;
Keynote for my previous talk on Git, I really like the simplicity of&lt;br&gt;
ShowOff, both in capabilities and actual usage.  Not being terrible&lt;br&gt;
graphically gifted, I often felt overwhelmed using Keynote.  The&lt;br&gt;
simplicity of ShowOff felt much more at home for me.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Hail the Glorious Cloud :: posts</title>
       <link href="http://ctshryock.com/posts/2011/04/22/hail-the-glorious-cloud.html"/>
       <updated>2011-04-22T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2011/04/22/hail-the-glorious-cloud</id>
       <content type="html">&lt;p&gt;On April 21st 2011 &lt;a href=&quot;http://aws.amazon.com/&quot;&gt;Amazon&amp;#39;s AWS&lt;/a&gt; experienced a lot of downtime, upwards&lt;br&gt;
of 9 hours for one region.  Several companies who rely on Amazon for&lt;br&gt;
their cloud services experienced downtime, and even more companies who&lt;br&gt;
rely on &lt;em&gt;those&lt;/em&gt; companies were out as well.  Engine Yard, Foursquare, &lt;br&gt;
Hootsuite, Heroku, Quora, and Reddit, all of these had issues or were&lt;br&gt;
simply out.  &lt;a href=&quot;http://heroku.com&quot;&gt;Heroku&lt;/a&gt; and &lt;a href=&quot;http://rstat.us&quot;&gt;rstat.us&lt;/a&gt; for example were both completely off line.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/static/images/rstatus_cloud.png&quot; class=&quot;inline-image&quot;&gt;&lt;br&gt;
  &lt;img src=&quot;/static/images/rstatus_cloud_thumb.png&quot; width=&quot;540&quot;&lt;br&gt;
alt=&quot;rstatus down due to sunny skies&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;quot;The Cloud&amp;quot;&lt;/strong&gt; has been trending lately.  By and large it&amp;#39;s an awesome&lt;br&gt;
thing.  &amp;quot;It&amp;quot; makes some people fortunes, while saving others..&lt;br&gt;
fortunes.  Of course, &amp;quot;The Cloud&amp;quot; is not so ubiquitous and infallible as&lt;br&gt;
we&amp;#39;ve come to believe.  As more and more people became aware of &amp;quot;The&lt;br&gt;
Cloud&amp;quot; (which is still &amp;quot;The Internet&amp;quot;), more and more people fell to&lt;br&gt;
believing the &lt;a href=&quot;http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing&quot;&gt;Fallacies of Distributed Computing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I believe I first came across this concept when reading &lt;a href=&quot;http://www.amazon.com/Joel-Software-Occasionally-Developers-Designers/dp/1590593898&quot;&gt;Joel on&lt;br&gt;
Software&lt;/a&gt;.  Essentially, as the internet becomes further entrenched&lt;br&gt;
in our lives, we begin to assume it&amp;#39;s just always there.  We begin&lt;br&gt;
treating remote resources as local resources.  Except they&amp;#39;re not.  &lt;/p&gt;

&lt;p&gt;It&amp;#39;s unfortunate that these services had such downtime.  I&amp;#39;ve used many&lt;br&gt;
of them and have always had good experiences.  But computers, networks,&lt;br&gt;
servers, and &amp;quot;clouds&amp;quot; are still made by humans.  They&amp;#39;re still fallible.  &lt;/p&gt;

&lt;p&gt;On a positive note, the industry as a whole has been far more agile in&lt;br&gt;
recent years; things like this will only spark better fail-overs, in&lt;br&gt;
policy and systems, and probably very quickly.  Just imagine if the&lt;br&gt;
federal government had a failure like this.  It would takes weeks to&lt;br&gt;
sort it out, and likely such a fuss would be made in the media that&lt;br&gt;
policy and politics would take the stage over whether or not it even got&lt;br&gt;
fixed.  Six months would pass before a new strategy would be approved,&lt;br&gt;
and then another 6 before it was in place.&lt;/p&gt;

&lt;p&gt;I had a chance to meet some of the bright minds at &lt;a href=&quot;http://www.engineyard.com/&quot;&gt;Engine Yard&lt;/a&gt;.  I&lt;br&gt;
have a good feeling that they&amp;#39;ve already got a new plan on the drawing&lt;br&gt;
board, and wouldn&amp;#39;t be surprised if some of it&amp;#39;s already in motion.&lt;/p&gt;

&lt;p&gt;There&amp;#39;s good news though, The Cloud isn&amp;#39;t all bad, if used cautiously: &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/static/images/netflix_cloud.png&quot; class=&quot;inline-image&quot;&gt;&lt;br&gt;
  &lt;img src=&quot;/static/images/netflix_cloud_thumb.png&quot; width=&quot;527&quot;&lt;br&gt;
alt=&quot;Netflix flying high on the clouds&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
     <entry>
       <title>#CodeConf :: posts</title>
       <link href="http://ctshryock.com/posts/2011/04/11/CodeConf.html"/>
       <updated>2011-04-11T00:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2011/04/11/CodeConf</id>
       <content type="html">&lt;p&gt;Conference was awesome.  There&amp;#39;s really not much more that can be said&lt;br&gt;
about it, it was great. Thanks to &lt;a href=&quot;http://twitter.com/luckiestmonkey&quot;&gt;@luckiestmonkey&lt;/a&gt;, &lt;br&gt;
&lt;a href=&quot;http://github.com&quot;&gt;@Github&lt;/a&gt;, and all the volunteers for putting it together.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://thechangelog.com/&quot;&gt;The Changelog&lt;/a&gt; has great day by day coverage here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://thechangelog.com/post/4481277637/codeconf-saturday-summary&quot;&gt;CodeConf Saturday Summary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://thechangelog.com/post/4507882708/codeconf-sunday-summary&quot;&gt;CodeConf Sunday Summary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And Jeff Remer has a great list of the talks and slides available&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jeffremer.com/codeconf.html&quot;&gt;Code Conf 2011 Notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://lanyrd.com&quot;&gt;Lanyrd&lt;/a&gt; has a full lineup&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://lanyrd.com/2011/codeconf/&quot;&gt;CodeConf 2011&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
     <entry>
       <title>Awesome Neighbors :: posts</title>
       <link href="http://ctshryock.com/posts/2011/03/07/awesome-neighbors.html"/>
       <updated>2011-03-07T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/03/07/awesome-neighbors</id>
       <content type="html">&lt;p&gt;I&amp;#39;m jealous of my parent&amp;#39;s awesome neighbors:&lt;/p&gt;

&lt;p&gt;A (yet to be identified) Owl living in a hollowed out old dead tree&lt;br&gt;
across the street&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/static/images/owl.png&quot; title=&quot;Owl across the street&quot;&gt;&lt;br&gt;
  &lt;img src=&quot;/static/images/owl_thumb.png&quot; alt=&quot;Owl&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
And the Redtail Hawk that apparently likes to hang out in their back
yard, on a wooden vine arch _thing_ my Dad and I build when I was ~15.
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/static/images/hawk.png&quot; title=&quot;Redtail Hawk in the backyard&quot;&gt;&lt;br&gt;
  &lt;img src=&quot;/static/images/hawk_thumb.png&quot; alt=&quot;Redtail Hawk&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>Gearman (Part 2): Create jobs, add workers, do work :: posts</title>
       <link href="http://ctshryock.com/posts/2011/02/21/more-gearman.html"/>
       <updated>2011-02-21T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/02/21/more-gearman</id>
       <content type="html">&lt;p&gt;&lt;strong&gt;Other posts in this series&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/gearman/2011/02/16/setting-up-gearmand.html&quot;&gt;Gearman (Part 1): Setup Gearmand&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Gearman (Part 2): Create jobs, add workers, do work&lt;/li&gt;
&lt;li&gt;Gearman (Part 3): More jobs, other stuff, a better title (soon after Part 2)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that &lt;a href=&quot;/gearman/2011/02/16/setting-up-gearmand.html&quot;&gt;Gearmand is setup&lt;/a&gt; we need to get some workers going.  Gearman is itself language agnostic; it doesn&amp;#39;t really &lt;br&gt;
care if your client/worker is in Python, PHP or Ruby, to name a few.  There are &lt;a href=&quot;http://gearman.org/index.php?id=documentation&quot;&gt;several libraries available&lt;/a&gt; to help &lt;br&gt;
you get going. &lt;/p&gt;

&lt;h2&gt;PECL::Gearman&lt;/h2&gt;

&lt;p&gt;In order to get clients and workers setup using PHP you need to have &lt;strong&gt;libgearman&lt;/strong&gt; installed; this came with &lt;strong&gt;Gearmand&lt;/strong&gt; from my &lt;br&gt;
&lt;a href=&quot;/gearman/2011/02/16/setting-up-gearmand.html&quot;&gt;previous post in this series&lt;/a&gt;.  For this example I&amp;#39;ll be using the &lt;a href=&quot;http://pecl.php.net/package/gearman&quot;&gt;Gearman PECL extension&lt;/a&gt;.  I assume you already have PHP installed on your system.  &lt;/p&gt;

&lt;p&gt;By default, the configure script looks in &lt;code&gt;/usr/local&lt;/code&gt;, &lt;code&gt;/usr&lt;/code&gt;, and &lt;code&gt;/opt/local&lt;/code&gt; to find the &lt;strong&gt;libgearman&lt;/strong&gt; header files.  If &lt;br&gt;
you&amp;#39;re using &lt;strong&gt;Homebrew&lt;/strong&gt;, &lt;strong&gt;MacPorts&lt;/strong&gt;, or installed &lt;strong&gt;from source&lt;/strong&gt; you should have no problem.  &lt;/p&gt;

&lt;p&gt;To install using PECL, run&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;sudo&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; pecl install gearman-beta&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;-beta&lt;/code&gt; is required since there is no full fledged stable release to use at this time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Side Note:&lt;/strong&gt; &lt;br&gt;
This should work fine for installations of &lt;strong&gt;libgearman&lt;/strong&gt; I covered previously, but if you&amp;#39;re like myself and have your &lt;strong&gt;Homebrew&lt;/strong&gt; &lt;br&gt;
installed elsewhere (I use &lt;a href=&quot;https://github.com/atmos/cinderella&quot;&gt;Cinderella&lt;/a&gt;), your header files are in a different place, and you&amp;#39;ll need to compile the &lt;br&gt;
extension by &lt;a href=&quot;http://pecl.php.net/package/gearman&quot;&gt;downloading the source&lt;/a&gt;, extracting it, and running the following&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; ~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;Downloads/gearman-0.7.0/gearman-0.7.0
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; ~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;phpize
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; ~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./configure --with-gearman&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;brew --prefix&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; ~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;make
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt; ~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;sudo&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; make install
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt; Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/
&lt;span class=&quot;lineno&quot;&gt;7&lt;/span&gt; ~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When the installation completes, you should receive instructions on activating the extension.  They typically involve updating &lt;br&gt;
your &lt;code&gt;php.ini&lt;/code&gt; file to include the &lt;code&gt;extension_dir&lt;/code&gt; and add &lt;code&gt;extension=gearman.so&lt;/code&gt; near the end of the file.  After that, &lt;br&gt;
restart your sever. &lt;/p&gt;

&lt;p&gt;To confirm everything is OK, create a simple php file that echo&amp;#39;s out the gearman version:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;x&quot;&gt;//gearman_version.php&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Gearman version: &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gearman_version&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;PHP_EOL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And run the file&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;php gearman_version.php
Gearman version: 0.15&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Creating Jobs&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Jobs&lt;/em&gt; are created by &lt;em&gt;Clients&lt;/em&gt;, who send them to the &lt;em&gt;Gearman server&lt;/em&gt; via &lt;em&gt;Tasks&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;A &lt;em&gt;Task&lt;/em&gt; is communication &lt;em&gt;about&lt;/em&gt; a job, such as &amp;quot;run this job&amp;quot; or &amp;quot;what is the status of this job&amp;quot;&lt;/li&gt;
&lt;li&gt;A &lt;em&gt;Job&lt;/em&gt; is something the &lt;em&gt;worker&lt;/em&gt; does&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Workers&lt;/em&gt; continuously waiting on the job server to tell them when to start and with what arguments&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Clients&lt;/em&gt; submit &lt;em&gt;jobs&lt;/em&gt; and ask for status about &lt;em&gt;jobs&lt;/em&gt; (both of those things are considered &lt;em&gt;tasks&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Workers&lt;/em&gt; actually perform the &lt;em&gt;jobs&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://gearman.org/index.php?id=manual:clients&quot;&gt;Source here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We&amp;#39;ll start with a very simple &amp;quot;reverse string&amp;quot; job to get going.  First we&amp;#39;ll create the client to submit the job.  We do so by instantiating a new &lt;code&gt;GearmanClient&lt;/code&gt; object, &lt;br&gt;
set the server where &lt;strong&gt;Gearmand&lt;/strong&gt; is running, and calling &lt;code&gt;do&lt;/code&gt; with the &lt;em&gt;job name&lt;/em&gt; and the workload:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;x&quot;&gt;//  reverse_do.php&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Create our client object.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GearmanClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Add default server (localhost).&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;addServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;localhost&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;4730&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Sending job...&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Send reverse job&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;$result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;do&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;reverse&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Hello World!&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Result: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$result&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;PHP_EOL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can run this on the command line like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;php reverse_do.php 
Sending job...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The client will wait for the response (there are other types of jobs where the client does not wait, called background jobs).  &lt;/p&gt;

&lt;p&gt;Now we create a worker in a similar process: instantiating a new &lt;code&gt;GearmanWorker&lt;/code&gt; object and set the server where &lt;strong&gt;Gearmand&lt;/strong&gt; is running, except now we register a method of work &lt;br&gt;
that we can do, and define that function:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;x&quot;&gt;//  reverse_worker.php&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;$worker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GearmanWorker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$worker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;addServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;localhost&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;4730&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$worker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;addFunction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;reverse&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;reverse_function&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$worker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;work&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reverse_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$job&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//  For example purpose&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Received job: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$job&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;PHP_EOL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;strrev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$job&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;workload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now we run the worker from another terminal session.  Because we&amp;#39;ve put the worker in an endless &lt;code&gt;while&lt;/code&gt; loop, the worker &lt;br&gt;
will connect to the server and perform jobs until we kill the process with &lt;code&gt;cntrl+c&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;php reverse_worker.php 
Received job: H:Waffles.local:11&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Back on the original terminal session, where we left the client waiting, you should see an update:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;php reverse_do.php 
Sending job...
Result: !dlroW olleH
~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;Gearmand server&lt;/strong&gt; held on to the job until a worker arrived that could preform the work.  Once our worker fired up, the server handed &lt;br&gt;
the job over, the worker did the work, and told the server it was done and could accept more work.  The server in turn passed the result &lt;br&gt;
back to the client, and the client process terminated, printing the reversed string.  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Gearman (Part 1): Setup Gearmand :: posts</title>
       <link href="http://ctshryock.com/posts/2011/02/16/setting-up-gearmand.html"/>
       <updated>2011-02-16T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/02/16/setting-up-gearmand</id>
       <content type="html">&lt;p&gt;&lt;strong&gt;Other posts in this series&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gearman (Part 1): Setup Gearmand&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/gearman/2011/02/21/more-gearman.html&quot;&gt;Gearman (Part 2): Create jobs, add workers, do work&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Gearman (Part 3): More jobs, other stuff, a better title (soon after Part 2)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;http://gearman.org/&quot;&gt;Gearman&lt;/a&gt; has occupied my thoughts and time lately.  Gearman is a &amp;quot;generic application framework to farm out work to other machines or processes that are better suited to do the work&amp;quot;.&lt;/p&gt;

&lt;p&gt;In short, it&amp;#39;s a job-queue system.  You send it jobs you want done, it delegates those tasks to workers who know how to handle that work.  Workers &lt;br&gt;
connect to the server and announce what jobs it can handle; The server doesn&amp;#39;t care about &amp;quot;how&amp;quot; they handle that job, just that they can.  The &lt;br&gt;
server passes the job off to the worker and can then (conditionally) pass messages back to the client for messages like status, completions, or failures.  &lt;/p&gt;

&lt;p&gt;Classic usage examples for websites are image resizing or video conversion.  Instead of the user waiting for the server to re-size or convert, &lt;br&gt;
you redirect them elsewhere with a message saying it will be done soon.  This lets the user go about their business, and you can delegate the &lt;br&gt;
work to another machine, leaving your web server to serve webpages instead hog memory converting things.&lt;/p&gt;

&lt;h2&gt;Setup&lt;/h2&gt;

&lt;p&gt;If you&amp;#39;re on a Mac, I highly recommend &lt;a href=&quot;https://github.com/mxcl/homebrew&quot;&gt;Homebrew&lt;/a&gt;, an excellent package manager for installing all kinds of software with ease.  Getting Gearman*&lt;em&gt;d&lt;/em&gt;* (the daemon process and client libraries) is easy:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;brew install gearman&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you&amp;#39;re using &lt;a href=&quot;http://www.macports.org/&quot;&gt;MacPorts&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;sudo&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; port install gearmand&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    

&lt;p&gt;If you&amp;#39;re on Ubuntu you can use &lt;code&gt;aptitude&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo aptitude install gearman-job-server &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;gearman-dev&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Check your favorite Linux Distro&amp;#39;s package manager for their equivalent.  &lt;/p&gt;

&lt;p&gt;Finally, you can always compile from &lt;a href=&quot;http://gearman.org/index.php?id=download&quot;&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;tar xzf gearmand-X.Y.tar.gz  
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;gearmand-X.Y  
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;./configure  
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;make  
~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;sudo&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; make install&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once that finishes, you should have Gearman all setup&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gearmand --version
gearmand 0.15 - https://launchpad.net/gearmand&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Running&lt;/h2&gt;

&lt;p&gt;Gearmand is typically run as a daemon in the background&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gearmand -d
~&lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This causes Geramand to run to detach from the current shell and run in the background.  While developing, it may be helpful to run in debugging mode&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gearmand -vvv
 INFO Starting up
 INFO Listening on :::4730 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;6&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
 INFO Listening on 0.0.0.0:4730 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;7&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
 INFO Creating wakeup pipe
 INFO Creating IO thread wakeup pipe
 INFO Adding event &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; listening socket &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;6&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
 INFO Adding event &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; listening socket &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;7&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
 INFO Adding event &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; wakeup pipe
 INFO Entering main event loop&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
     

&lt;p&gt;By default, Geramand listens on &lt;code&gt;localhost/127.0.0.1&lt;/code&gt; and port &lt;code&gt;4730&lt;/code&gt;.  There are &lt;a href=&quot;http://gearman.org/index.php?id=manual:job_server&quot;&gt;many other options&lt;/a&gt; you can choose to add.&lt;/p&gt;

&lt;p&gt;So now you have Geramand setup.  Go forth, and write &lt;a href=&quot;http://gearman.org/index.php?id=getting_started#client_and_worker_api&quot;&gt;clients and workers&lt;/a&gt;.  Other documentation can be found &lt;a href=&quot;http://gearman.org/index.php?id=documentation&quot;&gt;here&lt;/a&gt;, including an incomplete list &lt;br&gt;
of libraries (for instance, it&amp;#39;s missing &lt;a href=&quot;https://rubygems.org/gems/gearman-ruby&quot;&gt;gearman-ruby&lt;/a&gt;).&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>Winterpacalypse :: posts</title>
       <link href="http://ctshryock.com/posts/2011/02/01/winterpacalypse.html"/>
       <updated>2011-02-01T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/02/01/winterpacalypse</id>
       <content type="html">&lt;p&gt;North America, right now (&lt;a href=&quot;http://nnvl.noaa.gov/MediaDetail.php?MediaID=640&amp;amp;MediaTypeID=1&amp;amp;sms_ss=twitter&amp;amp;at_xt=4d4859aadf12521d,0&quot;&gt;image source: NOAA&lt;/a&gt;)&lt;br&gt;
&lt;a href=&quot;http://ctshryock.com/static/images/map.png&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/map_thumb.png&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My patio at 7am, and again at 11:30am&lt;br&gt;
&lt;a href=&quot;http://ctshryock.com/static/images/patio_composite.png&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/patio_composite_thumb.png&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My deck at 7am, and again at 11:30am&lt;br&gt;
&lt;a href=&quot;http://ctshryock.com/static/images/deck_composite.png.png&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/deck_composite_thumb.png&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#39;s still coming down.&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
 
    
 
    
     <entry>
       <title>GearmanHQ :: posts</title>
       <link href="http://ctshryock.com/posts/2011/01/26/gearmanhq.html"/>
       <updated>2011-01-26T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/01/26/gearmanhq</id>
       <content type="html">&lt;p&gt;&lt;a href=&quot;/static/images/gearmanhq.png&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;/static/images/gearmanhq_thumb.png&quot; width=&quot;505&quot; alt=&quot;GearmanHQ logo&quot;/&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GearmanHQ&lt;/strong&gt; is a hosted job queue management system backed by &lt;a href=&quot;http://gearman.org/&quot;&gt;Gearman&lt;/a&gt; which is nearing beta.  It&amp;#39;s a new project from all of us at &lt;a href=&quot;http://cramerdev.com&quot;&gt;@CramerDev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Visit &lt;a href=&quot;http://gearmanhq.com&quot;&gt;GearmanHQ.com&lt;/a&gt; to sign-up for a notice when we launch our private beta.&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>Importing browser preferences in IE8 :: posts</title>
       <link href="http://ctshryock.com/posts/2011/01/17/ie8-successful-import.html"/>
       <updated>2011-01-17T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/01/17/ie8-successful-import</id>
       <content type="html">&lt;p&gt;IE8 offered to import my browser settings.  Firefox was the only browser available (even though I have Chrome installed).  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://ctshryock.com/static/images/successful.png&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/successful_thumb.png&quot; title=&quot;Successful, eh?&quot; width=&quot;550&quot;/&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The import was &amp;quot;successful&amp;quot;.  &lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
     <entry>
       <title>NO disintegrations! :: posts</title>
       <link href="http://ctshryock.com/posts/2011/01/11/no-disintegrations.html"/>
       <updated>2011-01-11T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/01/11/no-disintegrations</id>
       <content type="html">&lt;p&gt;&lt;a href=&quot;http://ctshryock.com/static/images/NO_disintegrations.jpg&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/NO_disintegrations_thumb.jpg&quot; width=&quot;540&quot; /&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Branching and Databases :: posts</title>
       <link href="http://ctshryock.com/posts/2011/01/10/branching-and-databases.html"/>
       <updated>2011-01-10T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2011/01/10/branching-and-databases</id>
       <content type="html">&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/doctrine.png&quot; alt=&quot;Odd state with git branches and doctrine migrations&quot; /&gt;  &lt;/p&gt;

&lt;p&gt;We use &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; at work and make use of several concurrent topic branches.  At the same time, we utilize &lt;a href=&quot;http://www.doctrine-project.org/&quot;&gt;Doctrine&lt;/a&gt; to keep our databases in line and updates made to them sane and manageable.  &lt;/p&gt;

&lt;p&gt;This creates interesting databases states, however, as seen above.  Screenshot is from a hotfix branch where several migrations from topic branches aren&amp;#39;t included in the source, but have been ran on my local database.  This isn&amp;#39;t a problem unique to our workflow, but with Doctrine, I&amp;#39;m now able to visualize it.  &lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>Making Super Awesome Oreo Balls :: posts</title>
       <link href="http://ctshryock.com/posts/2010/12/24/making-super-awesome-oreo-balls.html"/>
       <updated>2010-12-24T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2010/12/24/making-super-awesome-oreo-balls</id>
       <content type="html">&lt;p&gt;It&amp;#39;s Christmas time &lt;em&gt;(technically past at the time of publish)&lt;/em&gt;.  Christmas to me means family, friends, and Super Awesome Oreo Balls.&lt;/p&gt;

&lt;p&gt;What&amp;#39;s a super Awesome Oreo ball?  This is a super awesome Oreo ball:&lt;/p&gt;

&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/anatomy.JPG&quot;&gt;
    &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/anatomy-header.JPG&quot; title=&quot;Anatomy of a super Awesome Oreo Ball&quot; width=&quot;401&quot; /&gt;  
&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Composed of Oreo and cream cheese wrapped in a layer of chocolate.  Perhaps you just started drooling.  This is normal.  &lt;/p&gt;

&lt;p&gt;Lucky for you making Super Awesome Oreo Balls is super easy.  &lt;/p&gt;

&lt;h3&gt;Steps to reproduce&lt;/h3&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/materials.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/materials-thumb.jpg&quot; alt=&quot;Clone the source&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Clone the source&lt;/dt&gt;
    &lt;dd&gt;
        &lt;ol&gt;
            &lt;li&gt;Box of Oreo cookies&lt;/li&gt;
            &lt;li&gt;1 24oz bag of &quot;Chocolate coating&quot;&lt;/li&gt;
            &lt;li&gt;1 24oz bag of &quot;Vanilla flavored coating&quot;&lt;/li&gt;
            &lt;li&gt;1 box of cream cheese (10 oz?)&lt;/li&gt;
        &lt;/ol&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/blender.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/blender-thumb.jpg&quot; alt=&quot;Compress objects&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Compress objects&lt;/dt&gt;
    &lt;dd&gt;
        &lt;ol&gt;
            &lt;li&gt;
            Fill your blender to the top with Oreos.  If you have Oreos left over, you can add them after you blend the first round down some.  
            &lt;/li&gt;
            &lt;li&gt;
            Use a &quot;pulse&quot; blend method by hitting blend for about 1 second; this allows the Oreos that are not blended (on the top) to sift down to the blades and get chopped.  Otherwise, the Oreos on bottom would just get finer and finer while chunks remain on top.  
            &lt;/li&gt;
        &lt;/ol&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/choco-melt.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/choco-melt-thumb.jpg&quot; alt=&quot;Melting&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Melting&lt;/dt&gt;
    &lt;dd&gt;
        Melt your chocolate covering in the microwave.  Be careful not to overcook or melt the chocolate; it needs to be hot enough to be easily stirred with a spoon, but not so melted it&#39;s like water.
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/mix-o-and-c.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/mix-o-and-c-thumb.jpg&quot; alt=&quot;Merging&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Merging&lt;/dt&gt;
    &lt;dd&gt;
        Soften the cream cheese in the microwave and mix in the blended Oreos.  Stir with a spoon until they are well mixed
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/oreo-ball.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/oreo-ball-thumb.jpg&quot; alt=&quot;Rounding&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Rounding&lt;/dt&gt;
    &lt;dd&gt;
        Grab a chunk of the mix and round it into a ball, approximately the size of a ping pong ball or smaller.  The end product is pretty rich so anything bigger and you may struggle to eat the whole thing in one sitting.
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/oreo-chocolate.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/oreo-chocolate-thumb.jpg&quot; alt=&quot;Coating&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Coating&lt;/dt&gt;
    &lt;dd&gt;
        &lt;ol&gt;
            &lt;li&gt;
                Drop the little Oreo ball into the melted chocolate.  
            &lt;/li&gt;
            &lt;li&gt;
                Using spoons, rotate the ball around so that it&#39;s entirely wrapped in chocolate.
            &lt;/li&gt;
            &lt;li&gt;
                Scoop the newly covered ball out with the spoons, and place on a sheet of wax paper to harden. 
            &lt;/li&gt;
        &lt;/ol&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/wait-2.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/wait-2-thumb.jpg&quot; alt=&quot;Wait&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Wait&lt;/dt&gt;
    &lt;dd&gt;
        &lt;ol&gt;
            &lt;li&gt;
                The hardening process takes 3-5 minutes
            &lt;/li&gt;
            &lt;li&gt;
                Go pet your dogs or something.
            &lt;/li&gt;
        &lt;/ol&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/drizzle.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/drizzle-thumb.jpg&quot; alt=&quot;Drizzle&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Drizzle&lt;/dt&gt;
    &lt;dd&gt;
        &lt;ol&gt;
            &lt;li&gt;
                Melt the vanilla covering like you did the chocolate covering; again, not too hot.
            &lt;/li&gt;
            &lt;li&gt;
                Using a knife or spoon, dip it into the melted vanilla, and &quot;Drizzle&quot; or streak the vanilla over the hardened Oreo balls like you&#39;re  Jackson Pollock.
            &lt;/li&gt;
            &lt;li&gt;
                Let the vanilla harden, and you&#39;re done.  
            &lt;/li&gt;
        &lt;/ol&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;dl class=&quot;oreo-steps&quot;&gt;
    &lt;dd class=&quot;image&quot;&gt;
        &lt;a href=&quot;http://ctshryock.com/static/images/oreo-balls/collection.jpg&quot;&gt;
            &lt;img src=&quot;http://ctshryock.com/static/images/oreo-balls/collection-thumb.jpg&quot; alt=&quot;Arrangement&quot; width=&quot;150&quot; /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt&gt;Arrangement&lt;/dt&gt;
    &lt;dd&gt;
        Remove your now Super Awesome Oreo Balls and place on a nice, festive holiday plate of sorts.  This is crucial to feeling better about yourself once you devour 3 in 5 minutes. 
        &lt;br /&gt;&lt;br /&gt;
        &lt;em&gt;&quot;They&#39;re holiday treats, that makes it OK&quot;&lt;/em&gt;
    &lt;/dd&gt;
&lt;/dl&gt;

&lt;p&gt;&lt;br style=&quot;clear:both&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;Enjoy... with caution&lt;/h3&gt;

&lt;p&gt;Yes, they&amp;#39;re awesome.&lt;br&gt;&lt;br&gt;
Yes, it&amp;#39;s the holidays.&lt;br&gt;&lt;br&gt;
But seriously, take it easy with the treats.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;You&amp;#39;re gonna carry that weight&lt;/em&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
 
    
     <entry>
       <title>Growl Down :: posts</title>
       <link href="http://ctshryock.com/posts/2010/12/17/growl-down.html"/>
       <updated>2010-12-17T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2010/12/17/growl-down</id>
       <content type="html">&lt;p&gt;I was working for a client the other day and needed to get a copy of our staging server database down to my development machine.  So I ssh&amp;#39;d into the server, piped a &lt;code&gt;mysqldump&lt;/code&gt; into &lt;code&gt;bzip2&lt;/code&gt; and then proceeded to download the file via &lt;code&gt;scp&lt;/code&gt;.  The resulting bzip was ~40MB so the download took a couple of minutes; 3 minutes isn&amp;#39;t really a long time, but it&amp;#39;s too long for me to just stare at a progress bar and wait while there are other things I could be doing.  I thought to myself &amp;quot;I wish this download would send a growl notification when it finished.&amp;quot;  &lt;/p&gt;

&lt;p&gt;Thus, &lt;a href=&quot;http://github.com/catsby/growl-down&quot;&gt;Growl Down&lt;/a&gt; was born.  Growl Down is a ruby gem that wraps scp/curl on the command line and sends a &lt;a href=&quot;http://growl.info&quot;&gt;Growl&lt;/a&gt; notification when the transfer is complete.  &lt;/p&gt;

&lt;p&gt;Growl Down is currently in development; I don&amp;#39;t have much ruby gem experience, so I&amp;#39;m learning as I go.  I&amp;#39;m hoping for an beta release by years end, but the holidays are always busy so who knows.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Powered by Jekyll :: posts</title>
       <link href="http://ctshryock.com/posts/2010/12/07/powered-by-jekyll.html"/>
       <updated>2010-12-07T00:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2010/12/07/powered-by-jekyll</id>
       <content type="html">&lt;p&gt;The team took a trip to San Francisco the first weekend of December so I took advantage of the time spent waiting in the airport to migrate my site from &lt;a href=&quot;http://www.movabletype.org/&quot;&gt;Movable Type&lt;/a&gt; to &lt;a href=&quot;https://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;.  Although I was always happy with MT, I had started looking into Jekyll simply to understand how &lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt; works, and became attached to it&amp;#39;s simplicity while still covering all of my needs for my personal site.  This all seemed to happen at the same time I was re-imagining the purpose of this site.  &lt;/p&gt;

&lt;h2&gt;purpose&lt;/h2&gt;

&lt;p&gt;So what is the purpose of this site?  I started to question why I had a site, at least, why am I using a blog engine that acts as a blog and a site, instead of a site that happens to have a blog.  My end goal is to have a presence on the internet; a personal &amp;quot;home&amp;quot; for my doings.  I still want to write things, but more and more my writings are small snippets, links, or comments &amp;mdash; not full out POSTS.  I&amp;#39;ve started using &lt;a href=&quot;http://feedburner.google.com&quot;&gt;FeedBurner&lt;/a&gt; to see if people even &lt;em&gt;subscribe&lt;/em&gt; to it in the first place.  &lt;/p&gt;

&lt;p&gt;So a blog is not the focus of this site.  Information about me and my projects are.  I re-organized the homepage to be a simple &amp;quot;about&amp;quot; page.  I figured most visitors are coming from &lt;a href=&quot;http://twitter.com/ctshryock&quot;&gt;Twitter&lt;/a&gt; or &lt;a href=&quot;http://github.com/catsby&quot;&gt;Github&lt;/a&gt;, wanting to learn more about me or a specific project of mine.  Landing on the homepage for a series of posts (which were all pretty small on average) is more of an obstruction to that goal.  &lt;/p&gt;

&lt;h2&gt;why Jekyll&lt;/h2&gt;

&lt;p&gt;Movable Type appealed to me at first because I liked the idea of publishing static files instead of dynamically generating the page each request.  MT offers quite a bit of flexibility too, first being &lt;a href=&quot;http://www.movabletype.org/opensource&quot;&gt;open source&lt;/a&gt;, second, the admin area lets you tweak and adjust things to your hearts content.  I was able to choose from a variety of themes online and tweak it to my likings; this is a common thing among OSS blog engines out there.  &lt;/p&gt;

&lt;p&gt;So things were good, for a time.  But times change, and I wanted to change, so I started tweaking my site some.  Originally I had widgets on every page: a tag cloud, archives broken down by month, latest posts, and my pages.  I guess at the time I thought those things were &amp;quot;cool&amp;quot; or useful, but as I saw them on other sites I began to despise some of them.  I don&amp;#39;t care for the idea of tag clouds or archives by month really.  So I wanted to rip those out of my site, but having not tinkered with my layout and templates in some time, I couldn&amp;#39;t figure out how to accomplish this.  That is to say after half an hour I gave up.  &lt;/p&gt;

&lt;p&gt;I started thinking that this was not &amp;quot;my&amp;quot; site... it&amp;#39;s the site that MT gave me based on some input and a lot of things assumed or done for me.  I visit the server (via the admin), write a post or setup a page, and ask it kindly to generate some html and place it in the public folder.  &lt;/p&gt;

&lt;p&gt;I also thought it all overkill.  My pages don&amp;#39;t change often, and my writings are small and infrequent.  For this I had to setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cgi on my webserver&lt;/li&gt;
&lt;li&gt;a database with user and permissions&lt;/li&gt;
&lt;li&gt;MT code in the cgi-bin folder with the correct config information&lt;/li&gt;
&lt;li&gt;run the install file via visiting a special url&lt;/li&gt;
&lt;li&gt;maintain MT with updates&lt;/li&gt;
&lt;li&gt;edit and publish static css on my own&lt;/li&gt;
&lt;li&gt;edit and publish templates via the admin interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;quot;Too much&amp;quot; I said!  Jekyll is simpler and for my use cases faster.  It lacks much of what &lt;a href=&quot;http://wordpress.org&quot;&gt;Wordpress&lt;/a&gt; or MT provide, but much of that I don&amp;#39;t care for or need anyway.  I now write my &lt;em&gt;site&lt;/em&gt; in &lt;a href=&quot;http://macromates.com/&quot;&gt;Textmate&lt;/a&gt; and &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;.  I have things laid out in a folder structure, and Jekyll generates html code for me.  A little &lt;code&gt;jekyll &amp;amp;&amp;amp; rsync&lt;/code&gt; script to upload the code to my site and I&amp;#39;m done.&lt;/p&gt;

&lt;p&gt;I&amp;#39;ll dive into my experience migrating from MT to Jekyll in my next post.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Heros :: posts</title>
       <link href="http://ctshryock.com/posts/2010/11/19/heros.html"/>
       <updated>2010-11-19T04:44:25-06:00</updated>
       <id>http://ctshryock.com/posts/2010/11/19/heros</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;You can&amp;#39;t count on anyone.  Especially your heros.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;--Syndrome&lt;/em&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Disasters :: posts</title>
       <link href="http://ctshryock.com/posts/2010/10/18/disasters.html"/>
       <updated>2010-10-18T09:23:45-05:00</updated>
       <id>http://ctshryock.com/posts/2010/10/18/disasters</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;Disasters are opportunities to shine.  &lt;/p&gt;

&lt;p&gt;Or perish, I suppose&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;me, just now&lt;/em&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>The two dollar bill / @aol.com email address relation :: posts</title>
       <link href="http://ctshryock.com/posts/2010/10/15/the-two-dollar-aolcom-email-address-relation.html"/>
       <updated>2010-10-15T16:19:19-05:00</updated>
       <id>http://ctshryock.com/posts/2010/10/15/the-two-dollar-aolcom-email-address-relation</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;I think having an @aol address is like having a 2 dollar bill.  They&amp;#39;re out there, you&amp;#39;ve had one before, but they always make you pause when you see one in the wild&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;me, just now&lt;/em&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>No Tweet 'till November :: posts</title>
       <link href="http://ctshryock.com/posts/2010/10/11/no-twitter-till-november.html"/>
       <updated>2010-10-11T05:00:00-05:00</updated>
       <id>http://ctshryock.com/posts/2010/10/11/no-twitter-till-november</id>
       <content type="html">&lt;p&gt;I&amp;#39;m taking a break from Twitter, effective today, October 11th 2010, until November 1st.  I&amp;#39;ve removed Twitteriffic and Tweetie from my iPhone and MacBook, as well as the Facebook app for iPhone.  &lt;/p&gt;

&lt;p&gt;Too much of my free time is spent checking updates and not &lt;em&gt;doing something&lt;/em&gt;; paying attention to a conversation, doing something constructive, noticing things around me.  An hour wouldn&amp;#39;t go by where I didn&amp;#39;t check &lt;em&gt;some status somewhere&lt;/em&gt;.  I&amp;#39;ve thought about it and I&amp;#39;m simply too connected and not balancing; I need to unplug.&lt;/p&gt;

&lt;p&gt;See you in November! &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Ghost gem :: posts</title>
       <link href="http://ctshryock.com/posts/2010/09/30/ghost-gem.html"/>
       <updated>2010-09-30T10:02:35-05:00</updated>
       <id>http://ctshryock.com/posts/2010/09/30/ghost-gem</id>
       <content type="html">&lt;p&gt;I typically develop sites on my local machine using custom vhosts in Apache and adding lines to my &lt;code&gt;/etc/hosts&lt;/code&gt; file to point custom urls to &lt;code&gt;127.0.0.1&lt;/code&gt;.  After some time that file grew to be large and sometimes tedious to update.  Enter &lt;a href=&quot;http://github.com/bjeanes/ghost&quot;&gt;ghost gem&lt;/a&gt;.  Simple hostname management.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; Waffles:~ clint&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ghost modify pup.local 127.0.0.1  
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Modifying&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; pup.local -&amp;gt; 127.0.0.1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Adds a new entry (somewhere, not /etc/hosts though) and you can now use puppy.local as a url to point to your machine with a vhost setup to respond to that scheme.  &lt;/p&gt;

&lt;p&gt;You can use this for just about any url or IP you want too:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; Waffles:~ clint&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ghost add puppy google.com  
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Adding&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; puppy -&amp;gt; 74.125.65.105&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;ghost list&lt;/code&gt; shows what you have already:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; Waffles:~ clint&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ghost list  
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt;   Listing &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt; host&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:  
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt;     pup.local -&amp;gt; 127.0.0.1  
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt;     puppy -&amp;gt; 74.125.65.105&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Full details and commands are listed on &lt;a href=&quot;http://github.com/bjeanes/ghost&quot;&gt;bjeanes github repo&lt;/a&gt;.   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Getting acquainted with Cinderella :: posts</title>
       <link href="http://ctshryock.com/posts/2010/09/18/getting-acquainted-with-cinderella.html"/>
       <updated>2010-09-18T13:57:12-05:00</updated>
       <id>http://ctshryock.com/posts/2010/09/18/getting-acquainted-with-cinderella</id>
       <content type="html">&lt;p&gt;For over 3 years I&amp;#39;ve used &lt;a href=&quot;http://www.macports.org/&quot;&gt;MacPorts&lt;/a&gt; to setup my development environment on Mac OS X, but with a recent reformat, I decided to forego &lt;code&gt;port&lt;/code&gt; in favor of &lt;code&gt;brew&lt;/code&gt;.  I&amp;#39;ve switched to &lt;a href=&quot;http://github.com/mxcl/homebrew&quot;&gt;Homebrew&lt;/a&gt; for my package management, and I&amp;#39;ve gone with &lt;a href=&quot;http://github.com/mxcl/homebrew&quot;&gt;Cinderella&lt;/a&gt; specifically for web development.&lt;/p&gt;

&lt;p&gt;Cinderella was appealing for a few reasons, mainly I got quite a few awesome tools such as node, redis, memcached and mondodb, while following the lead of Homebrew and using the existing tools I already had on a stock MacBook Pro, such as apache and php.  &lt;/p&gt;

&lt;p&gt;&lt;strike&gt;I immediately took issue with one thing though; Cinderella starts all of these services as Launchd items in &lt;code&gt;~/Library/LaunchAgents&lt;/code&gt; with the &lt;code&gt;RunAtLoad&lt;/code&gt; and &lt;code&gt;KeepAlive&lt;/code&gt; options set.  I wouldn&amp;#39;t mind if this was a workstation, but it&amp;#39;s my laptop and I don&amp;#39;t always want those things running in the background&lt;/strike&gt; &lt;br&gt;
&lt;strong&gt;UPDATE: I made a ticket on the projects home and the developer responded back with a good point; it&amp;#39;s better to have it &amp;quot;just work&amp;quot; than muddy it with configuration options.  That said, I no longer take issue with with RunAtLoad option.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Easy enough to change though, just edit the files in &lt;code&gt;~/Library/LaunchAgents&lt;/code&gt; and turn those keys to &lt;code&gt;false&lt;/code&gt; and restart your machine and you&amp;#39;ll be fine.  Note that updating Cinderella will revert these changes, so until that&amp;#39;s a configuration option you&amp;#39;ll have to reset it each time.&lt;/p&gt;

&lt;p&gt;Cinderella sets up PostgreSQL and MySQL for you, but postgres is ran as your normal user, instead of a &lt;code&gt;postgres&lt;/code&gt; user like MacPorts.  This was actually a relief to me.  Maybe that&amp;#39;s not &amp;quot;the way it should be&amp;quot;, but this is a dev environment not production.  I did however miss that this meant the default user was also gone... so &lt;code&gt;psql -U postgres&lt;/code&gt; was returning a fatal error because the role &lt;code&gt;postgres&lt;/code&gt; didn&amp;#39;t exist.  Cinderella actually creates a default user of your own username, so &lt;code&gt;psql -U &lt;code&gt;whoami&lt;/code&gt;&lt;/code&gt; will log you in, and if you&amp;#39;re like me, you can then create your default user and feel right at home.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/atmos/cinderella&quot;&gt;Cinderella is under development and hosted on Github&lt;/a&gt;, so head over there and get some hardcore forking action &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>"Programming" :: posts</title>
       <link href="http://ctshryock.com/posts/2010/09/16/programming.html"/>
       <updated>2010-09-16T08:40:05-05:00</updated>
       <id>http://ctshryock.com/posts/2010/09/16/programming</id>
       <content type="html">&lt;p&gt;&lt;img alt=&quot;programming.png&quot; src=&quot;http://ctshryock.com/static/images/programming.png&quot; width=&quot;374&quot; height=&quot;151&quot; class=&quot;mt-image-center&quot; style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Faces.app update :: posts</title>
       <link href="http://ctshryock.com/posts/2010/07/26/facesapp-update.html"/>
       <updated>2010-07-26T08:53:53-05:00</updated>
       <id>http://ctshryock.com/posts/2010/07/26/facesapp-update</id>
       <content type="html">&lt;p&gt;I&amp;#39;m pulling the download for Faces.app for a while.  Twitter has been having a lot of issues lately with their avatar uploading, both from the API and even the site itself.  At several points it has been completely disabled from their end while they &amp;quot;fix&amp;quot; it, however the same issues seem to reoccur. &lt;/p&gt;

&lt;p&gt;Until Twitter gets this more stable and I get oauth fully integrated, I can&amp;#39;t continue to make Faces.app available.  &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/twitter-development-talk/browse_thread/thread/bd560e9866081639/4d4b9aab0c45ef43?lnk=gst&amp;amp;q=profile+image#4d4b9aab0c45ef43&quot;&gt;See&lt;/a&gt; &lt;a href=&quot;http://groups.google.com/group/twitter-development-talk/browse_thread/thread/dc866efea7825f1d#&quot;&gt;these&lt;/a&gt; &lt;a href=&quot;http://groups.google.com/group/twitter-development-talk/browse_thread/thread/8ef79b56acecee31/13e91c8ad39c8269?lnk=gst&amp;amp;q=profile+image#13e91c8ad39c8269&quot;&gt;threads&lt;/a&gt; &lt;a href=&quot;http://groups.google.com/group/twitter-development-talk/browse_thread/thread/f21f2d5ec2b7e7f1/8f46092659629ce6?lnk=gst&amp;amp;q=profile+image#8f46092659629ce6&quot;&gt;for&lt;/a&gt; more info &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Github Notifier 1.0 :: posts</title>
       <link href="http://ctshryock.com/posts/2010/07/25/gitnotifier-10.html"/>
       <updated>2010-07-25T13:54:00-05:00</updated>
       <id>http://ctshryock.com/posts/2010/07/25/gitnotifier-10</id>
       <content type="html">&lt;p&gt;I just released version 1.0 of GithubNotifier, a little menu-bar app I&amp;#39;ve been tinkering with for the past week or so.  It uses your Github username and API token to check your repositories for any activity in your networks.  &lt;/p&gt;

&lt;p&gt;I built GithubNotifier mostly just to tinker with their API.  I leveraged &lt;a href=&quot;http://github.com/sdegutis/CocoaREST&quot;&gt;CocoaREST&lt;/a&gt; from &lt;a href=&quot;http://degutis.org/&quot;&gt;Steven Degutis&lt;/a&gt; and added support for Github&amp;#39;s API as I went.  You can check those addtions on &lt;a href=&quot;http://github.com/catsby/CocoaREST&quot;&gt;my fork here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are some caveats though.  For starters, the network data API from Github doesn&amp;#39;t show what branch a given commit was made to, so if I pushed an update to branch &lt;code&gt;development&lt;/code&gt;, the API simply details the commit, but doesn&amp;#39;t include which branch.  When the Growl notifications are made, a click-back is created so that if a user clicks on the message your default browser will open to &lt;code&gt;user/repo/commits&lt;/code&gt;, but if the commit was on a separate branch, you wont see it initially.  You may have to look around in the branches to see more details on it.  &lt;/p&gt;

&lt;p&gt;I have  a support request in to Github to include branch and owner information in the commit data returned in the network API call, but they may or may not choose to implement it.  &lt;/p&gt;

&lt;p&gt;You can checkout or fork the project &lt;a href=&quot;http://github.com/catsby/GithubNotifier&quot;&gt;here&lt;/a&gt;, patches are welcome.  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Good work Adobe installer :: posts</title>
       <link href="http://ctshryock.com/posts/2010/06/28/good-work-adobe-installer.html"/>
       <updated>2010-06-28T09:25:43-05:00</updated>
       <id>http://ctshryock.com/posts/2010/06/28/good-work-adobe-installer</id>
       <content type="html">&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/complete-thumb-250x160-33.png&quot; width=&quot;250&quot; height=&quot;160&quot; alt=&quot;complete.png&quot; class=&quot;mt-image-none&quot; style=&quot;&quot; /&gt;&lt;br&gt;
&lt;p&gt;&lt;br&gt;
At least you tried&lt;br&gt;
&lt;/p&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Using MGTwitterEngine on the desktop :: posts</title>
       <link href="http://ctshryock.com/posts/2010/06/03/using-mgtwitterengine-on-the-desktop.html"/>
       <updated>2010-06-03T08:46:30-05:00</updated>
       <id>http://ctshryock.com/posts/2010/06/03/using-mgtwitterengine-on-the-desktop</id>
       <content type="html">&lt;p&gt;The main branch of &lt;a href=&quot;http://github.com/mattgemmell/MGTwitterEngine&quot;&gt;MGTwitterEngine&lt;/a&gt; has been updated to support &lt;a href=&quot;http://dev.twitter.com/pages/auth&quot;&gt;Twitter&amp;#39;s OAuth implementation&lt;/a&gt;, however it&amp;#39;s geared for the iPhone/iPad.  With some simple adjustments you can easily use it on the desktop.  Instead of using &lt;a href=&quot;http://github.com/jdg/oauthconsumer&quot;&gt;jdg&amp;#39;s OAuthConsumer&lt;/a&gt; root project, try &lt;a href=&quot;http://github.com/catsby/oauthconsumer&quot;&gt;my fork here&lt;/a&gt;, which replaces the custom hmac_sha1 implementation with standard CommonCrypto, which I pulled from &lt;a href=&quot;http://github.com/roustem/oauthconsumer&quot;&gt;roustem&amp;#39;s fork&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In a future post I&amp;#39;ll do a walkthrough of the basic setup, from cloning the repository, setting up the submodules, and getting a working example.&lt;/p&gt;
</content>
     </entry>
    
 
    
 
    
     <entry>
       <title>Introducting Faces.app beta :: posts</title>
       <link href="http://ctshryock.com/posts/2010/04/14/introducting-facesapp-beta.html"/>
       <updated>2010-04-14T07:58:37-05:00</updated>
       <id>http://ctshryock.com/posts/2010/04/14/introducting-facesapp-beta</id>
       <content type="html">&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/Faces512-thumb-150x150-20.png&quot; width=&quot;150&quot; height=&quot;150&quot; alt=&quot;Faces512.png&quot; class=&quot;mt-image-left&quot; style=&quot;float: left; margin: 0 20px 20px 0;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I&amp;#39;m finally releasing my first app, &lt;a href=&quot;http://ctshryock.com/facesapp.html&quot;&gt;Faces.app&lt;/a&gt;, as a beta.  Faces is an OS X desktop application that manages your profile picture across your Twitter account(s).  After linking your account, Faces will pull down your current avatar and display it in the grid and from there you can add any image to the grid and upload them to your account(s) with a simple drag and drop.&lt;/p&gt;

&lt;p&gt;Faces is a beta application and currently requires OS X 10.6 and an active Twitter account.  The app will remain free for the 1.0 cycle and will remain in beta until I get OAuth implemented before the June cutoff for basic auth via Twitter&amp;#39;s API.&lt;/p&gt;

&lt;p&gt;&lt;strike&gt;You can download the latest here (ver 1.0b7)&lt;/strike&gt; &lt;br&gt;
&lt;strong&gt;Download temporarily removed due to issues at Twitter with profile images, &lt;a href=&quot;http://ctshryock.com/2010/07/facesapp-update.html&quot;&gt;see this update&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/grid-thumb-150x114-27.png&quot; width=&quot;150&quot; height=&quot;114&quot; alt=&quot;grid.png&quot; class=&quot;mt-image-left&quot; style=&quot;float: left; margin: 0 20px 20px 0;&quot; /&gt;&lt;br&gt;
&lt;img src=&quot;http://ctshryock.com/static/images/drop-thumb-150x114-24.jpg&quot; width=&quot;150&quot; height=&quot;114&quot; alt=&quot;drop.jpg&quot; class=&quot;mt-image-left&quot; style=&quot;float: left; margin: 0 20px 20px 0;&quot; /&gt;&lt;br&gt;
&lt;img src=&quot;http://ctshryock.com/static/images/notification-thumb-150x96-30.png&quot; width=&quot;150&quot; height=&quot;96&quot; alt=&quot;notification.png&quot; class=&quot;mt-image-left&quot; style=&quot;float: left; margin: 0 20px 20px 0;&quot; /&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>MGTwitterEngine update :: posts</title>
       <link href="http://ctshryock.com/posts/2010/03/23/mgtwitterengine-update.html"/>
       <updated>2010-03-23T17:09:40-05:00</updated>
       <id>http://ctshryock.com/posts/2010/03/23/mgtwitterengine-update</id>
       <content type="html">&lt;p&gt;Yesterday I updated the main branch of &lt;a href=&quot;http://github.com/mattgemmell/MGTwitterEngine&quot;&gt;MGTwitterEngine&lt;/a&gt; by combining my fork with &lt;a href=&quot;http://github.com/tarasis&quot;&gt;tarasis&lt;/a&gt; and &lt;a href=&quot;http://github.com/alexrepty&quot;&gt;alexrepty&lt;/a&gt; forks.  With over 35 some commits in all, I felt lucky there was very little manual merging required.&lt;/p&gt;

&lt;p&gt;Since &lt;a href=&quot;http://mattgemmell.com&quot;&gt;Matt&lt;/a&gt; has created and official source of &lt;a href=&quot;http://github.com/mattgemmell/MGTwitterEngine&quot;&gt;MGTwitterEngine&lt;/a&gt; I feel like it&amp;#39;s gained a lot of momentum.  There are 8 active forks, feature requests and bugs reports starting to accumulate in the issues list, and over 180 watchers.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Updates to CocoaREST :: posts</title>
       <link href="http://ctshryock.com/posts/2010/03/18/updates-to-cocoarest.html"/>
       <updated>2010-03-18T20:53:46-05:00</updated>
       <id>http://ctshryock.com/posts/2010/03/18/updates-to-cocoarest</id>
       <content type="html">&lt;p&gt;I&amp;#39;ve been adding support for the Github API to my fork of &lt;a href=&quot;http://github.com/catsby/CocoaREST&quot;&gt;CocoaREST&lt;/a&gt;.  Right now I&amp;#39;ve added: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;SDGithubTaskGetRepos:&lt;/strong&gt; Showing a list of repositories by user&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SDGithubTaskGetRepoNetwork:&lt;/strong&gt; Showing the network for a given user/repository (shows commits by forks of that repository, or commits of forks of it&amp;#39;s parent repository)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SDGithubTaskUserShow:&lt;/strong&gt; show information about a user&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SDGithubTaskUserUpdate:&lt;/strong&gt; Update user information with new name, email, blog, company or location&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In addition I&amp;#39;ve added a tab to the demo app to show some of these.  In it you can view user information by name (&lt;strong&gt;SDGithubTaskUserShow&lt;/strong&gt;) and get a list of repositories (&lt;strong&gt;SDGithubTaskGetRepos&lt;/strong&gt;).  The tableview is set run a new task to find forks of the selected repository (&lt;strong&gt;SDGithubTaskGetRepoNetwork&lt;/strong&gt;) on selection change.  &lt;/p&gt;

&lt;p&gt;The &lt;em&gt;GithubDelegate&lt;/em&gt; is kind of a cumbersome class in that it handles all of the task results even though the API returns different results for each task.  Ideally I would use a specialized class to delegate for each task, but it&amp;#39;s just for demonstration. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Extending CocoaRest :: posts</title>
       <link href="http://ctshryock.com/posts/2010/03/08/extending-cocoarest.html"/>
       <updated>2010-03-08T19:00:00-06:00</updated>
       <id>http://ctshryock.com/posts/2010/03/08/extending-cocoarest</id>
       <content type="html">&lt;p&gt;My latest tinker project is a &lt;a href=&quot;http://iconfactory.com/software/twitterrific&quot;&gt;Twitterific&lt;/a&gt; like application that monitors your &lt;a href=&quot;https://github.com/&quot;&gt;Github dashboard&lt;/a&gt;, showing both updates to who you follow and updates on any repositories, yours or forks of yours.  From what I&amp;#39;ve seen &lt;a href=&quot;http://develop.github.com/&quot;&gt;Github&amp;#39;s API&lt;/a&gt; supports all of this.&lt;/p&gt;

&lt;p&gt;To accomplish this I&amp;#39;m extending &lt;a href=&quot;http://degutis.org/&quot;&gt;Steven Degutis&amp;#39;s&lt;/a&gt; &lt;a href=&quot;http://github.com/sdegutis/CocoaREST&quot;&gt;CocoaREST framework&lt;/a&gt; to support the Github API in &lt;a href=&quot;http://github.com/catsby/CocoaREST&quot;&gt;my fork of the project&lt;/a&gt;.  So far I&amp;#39;ve got repository listings by username, and showing forks in the network setup.  There&amp;#39;s a lot more to integrate but I&amp;#39;m not sure how much I want to demo in the UI.  &lt;/p&gt;

&lt;p&gt;I also added a tab strictly for Github, with the idea being a tab for each API supported, but I haven&amp;#39;t dug into any other API beyond Twitter or Github&amp;#39;s I&amp;#39;m not sure when those will come.  Patches welcome of course.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Cappuccino web framework :: posts</title>
       <link href="http://ctshryock.com/posts/2010/02/25/cappuccino-web-framework.html"/>
       <updated>2010-02-25T06:09:56-06:00</updated>
       <id>http://ctshryock.com/posts/2010/02/25/cappuccino-web-framework</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://twitter.com/rentzsch/status/9493050853&quot;&gt;@rentzsch&lt;/a&gt;: yup, I&amp;#39;m sold. Awesome tech+community.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I attended &lt;a href=&quot;http://en.wikipedia.org/wiki/C4_(conference)&quot;&gt;C4&lt;a href=&quot;http://280north.com/&quot;&gt;2&lt;/a&gt;&lt;/a&gt; back in 2008 where the crew from &lt;a href=&quot;http://280north.com/&quot;&gt;280 North&lt;/a&gt; gave a presentation on the &lt;a href=&quot;http://cappuccino.org/&quot;&gt;Cappuccino web framework&lt;/a&gt;.  I have mixed feelings about Cappuccino, the technology itself seems amazing but it&amp;#39;s a big leap from &amp;quot;normal&amp;quot; users web app experience.  I plan to spend a weekend with it and try it out for myself.  &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>A Long Road :: posts</title>
       <link href="http://ctshryock.com/posts/2010/02/24/a-long-road.html"/>
       <updated>2010-02-24T08:54:22-06:00</updated>
       <id>http://ctshryock.com/posts/2010/02/24/a-long-road</id>
       <content type="html">&lt;p&gt;Getting noticed may be the first step.  Even if the road is long, you need to make the first step. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Geeks vs. Nerds :: posts</title>
       <link href="http://ctshryock.com/posts/2010/02/16/geeks-vs-nerds.html"/>
       <updated>2010-02-16T10:25:13-06:00</updated>
       <id>http://ctshryock.com/posts/2010/02/16/geeks-vs-nerds</id>
       <content type="html">&lt;p&gt;&lt;strong&gt;Blake&lt;/strong&gt; : found this extremely helpful: &lt;a href=&quot;http://szeryf.wordpress.com/2010/02/15/textmate-shortcuts-you-should-be-using/&quot;&gt;http://szeryf.wordpress.com/2010/02/15/textmate-shortcuts-you-should-be-using/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : nice&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : I&amp;#39;ll have to bookmark this in case I ever switch back to Textmate&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : haha&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : still in Vim?&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : yes&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : LOVE it&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : nerd&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : ;)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : It&amp;#39;s pronounced &amp;quot;geek&amp;quot;, &lt;em&gt;du-mass&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : no, geek&amp;#39;s like star wars and role playing games... nerds do extra efficient commandline nerd crap&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : Really?  So playing D&amp;amp;D is geeky and not nerdy?&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : yeah, nerdy is smart and technical&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : geeky is socially awkward and obsessive about the aforementioned geeky things&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : I must be a rare hybrid than.  All their strengths, none of their weaknesses.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : geeks might even call you &amp;quot;day-walker&amp;quot;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : ;)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : HAH&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : nice&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : yeah, i&amp;#39;m REALLY proud of that one&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : might print this convo out and frame it&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Clint&lt;/strong&gt; : I&amp;#39;m blogging this&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Blake&lt;/strong&gt; : haha, awesome   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>The Five Minute Management Course :: posts</title>
       <link href="http://ctshryock.com/posts/2010/02/10/the-five-minute-management-course.html"/>
       <updated>2010-02-10T08:27:51-06:00</updated>
       <id>http://ctshryock.com/posts/2010/02/10/the-five-minute-management-course</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;(1) Not everyone who shits on you is your enemy.&lt;br&gt;&lt;br&gt;
(2) Not everyone who gets you out of shit is your friend.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Selected excerpts from the &lt;a href=&quot;http://bitsandpieces.us/2010/02/06/five-minute-management-course/&quot; title=&quot;Five Minute Management Course&quot;&gt;Five Minute Management Course&lt;/a&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>How to be Awesome :: posts</title>
       <link href="http://ctshryock.com/posts/2010/01/15/how-to-be-awesome.html"/>
       <updated>2010-01-15T08:49:07-06:00</updated>
       <id>http://ctshryock.com/posts/2010/01/15/how-to-be-awesome</id>
       <content type="html">&lt;p&gt;Every now and again I revisit &lt;a href=&quot;http://chrisguillebeau.com/3x5/how-to-be-awesome/&quot;&gt;this post&lt;/a&gt; on &lt;a href=&quot;http://chrisguillebeau.com/3x5/&quot;&gt;The Art of Non-Conformity&lt;/a&gt;.  I almost never have the time to read it straight through, but I usually pick one section, and I always read &lt;strong&gt;THE FIRST THING&lt;/strong&gt;:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;quot;The question isn&amp;#39;t who is going to let me; it&amp;#39;s who is going to stop me.&amp;quot; ~ Ayn Rand&lt;/p&gt;
&lt;/blockquote&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>A positive note on Android :: posts</title>
       <link href="http://ctshryock.com/posts/2010/01/14/a-positive-note-on-android.html"/>
       <updated>2010-01-14T07:42:21-06:00</updated>
       <id>http://ctshryock.com/posts/2010/01/14/a-positive-note-on-android</id>
       <content type="html">&lt;p&gt;Last night we had some friends over for dinner and drinks, and I got my first hands on experience with the &lt;a href=&quot;http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/Motorola-DROID-US-EN&quot;&gt;Motorola Droid&lt;/a&gt; and I must say it was the most impressive one yet.&lt;/p&gt;

&lt;p&gt;First, the Droid is not near a bulky and ugly as the pictures I had seen lead me to believe.  For whatever reasons I thought it was larger and thicker, but it was really quite nice.&lt;br/&gt;
&lt;/p&gt;

&lt;p&gt;Secondly, I&#39;ve never seen such a responsive Android phone; in my experiences with the G1 and a recent HTC I was not impressed with the lag/sluggishness, but the Droid seemed spot on.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s great to see a good implementation of Android.  I haven&amp;rsquo;t heard how the &lt;a href=&quot;http://www.google.com/phone&quot;&gt;Google Nexus One&lt;/a&gt; is, but I have high hopes for Android being a good competitor to the iPhone and iPhone OS.  Competition will (hopefully) make both stronger.&lt;/p&gt; 
</content>
     </entry>
    
 
    
     <entry>
       <title>Thoughts on Nexus One :: posts</title>
       <link href="http://ctshryock.com/posts/2010/01/12/thoughts-on-nexus-one.html"/>
       <updated>2010-01-12T08:25:56-06:00</updated>
       <id>http://ctshryock.com/posts/2010/01/12/thoughts-on-nexus-one</id>
       <content type="html">&lt;p&gt;This &lt;a href=&quot;http://www.boygeniusreport.com/2010/01/09/google-android-personal-thoughts/&quot; title=&quot;Google Android Personal Thoughts&quot;&gt;Boy Genius Report&lt;/a&gt; has some thoughts on the Nexus One that I&amp;#39;ve always held (although the author seems to feel more strongly about them) &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;there&amp;#39;s practically no human emotion with Google when it comes to technology. Everything is statistical and analytical. While you could argue that being this way is way superior to &amp;quot;feeling&amp;quot; and &amp;quot;emotion&amp;quot;- it might be 95% of the time -- you still will almost always lose that charm and that amazing feeling of connecting to something.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sums up my feelings about a lot of products when compared to Apple.  If you&amp;#39;ve met me, you may know I have a thing for Apple products, and it&amp;#39;s not because I&amp;#39;m a blind fan-boy, instead it&amp;#39;s because their products are easy to make a emotional connection to.  There&amp;#39;s a lot of thought, hard work and love put into most of them, and it&amp;#39;s easy for me to make a human connection to them.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Great Quote from @rands :: posts</title>
       <link href="http://ctshryock.com/posts/2009/11/20/great-quote-from-rands.html"/>
       <updated>2009-11-20T16:24:03-06:00</updated>
       <id>http://ctshryock.com/posts/2009/11/20/great-quote-from-rands</id>
       <content type="html">&lt;blockquote&gt;
&lt;p&gt;An organization that wins by exercising power starts to lose the ability to win by doing better work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://paulgraham.com/apple.html&quot; title=&quot;Apple&amp;#39;s Mistake&quot;&gt;Apple&amp;#39;s Mistake&lt;/a&gt;&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Update to ctshryock/MGTwitterEngine :: posts</title>
       <link href="http://ctshryock.com/posts/2009/10/15/update-to-ctshryockmgtwitterengine.html"/>
       <updated>2009-10-15T16:44:30-05:00</updated>
       <id>http://ctshryock.com/posts/2009/10/15/update-to-ctshryockmgtwitterengine</id>
       <content type="html">&lt;p&gt;Today I posted my update to &lt;a href=&quot;http://github.com/catsby/MGTwitterEngine&quot; title=&quot;My fork of MGTwitterEngine&quot;&gt;ctshryock/MGTwitterEngine&lt;/a&gt; which allows you to use the API&amp;#39;s &lt;code&gt;update_profile_image&lt;/code&gt; and &lt;code&gt;update_profile_background_image&lt;/code&gt;.  I added to the demo app a window that lets you select an image for either profile image or background image to see it in action.&lt;/p&gt;

&lt;p&gt;I had to modify some of the internals to get this to work... originally the &lt;code&gt;_sendRequestWithMethod:path:queryParameters:body:requestType:responseType:&lt;/code&gt; method built the &lt;code&gt;NSMutableRequest&lt;/code&gt; object internally, but to minimize code duplication I split the initial creation of the request into a new method &lt;code&gt;_baseRequestWithMethod:path:queryParameters:&lt;/code&gt; to do that, and added a new method &lt;code&gt;_sendDataRequestWithMethod:path:queryParameters:filePath:body:requestType:responseType:&lt;/code&gt; .  Both &lt;code&gt;_sendRequest...&lt;/code&gt; and &lt;code&gt;_sendDataRequest...&lt;/code&gt; call &lt;code&gt;_baseRequest...&lt;/code&gt; to start, with the latter adding the needed form/multipart data to the request.&lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Handcrafted :: posts</title>
       <link href="http://ctshryock.com/posts/2009/10/15/handcrafted.html"/>
       <updated>2009-10-15T07:41:26-05:00</updated>
       <id>http://ctshryock.com/posts/2009/10/15/handcrafted</id>
       <content type="html">&lt;p&gt;A comrade of mine has made a very nice custom &lt;a href=&quot;http://macromates.com/&quot; title=&quot;Textmate - the missing editor&quot;&gt;Textmate&lt;/a&gt; theme.  If you&amp;#39;re using Textmate (which I use and love) you can check it out here: &lt;a href=&quot;http://markupboy.com/2009/10/textmate-theme---handcrafted.html&quot; title=&quot;TextMate theme - Handcrafted&quot;&gt;TextMate theme - Handcrafted&lt;/a&gt; &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Using Zend Tool :: posts</title>
       <link href="http://ctshryock.com/posts/2009/10/12/setting-up-zend-tool.html"/>
       <updated>2009-10-12T18:41:15-05:00</updated>
       <id>http://ctshryock.com/posts/2009/10/12/setting-up-zend-tool</id>
       <content type="html">&lt;p&gt;&lt;a href=&quot;http://framework.zend.com/wiki/display/ZFDEV/Zend+Tool+Initiative&quot; title=&quot;Zend Tool Initiative&quot;&gt;Zend Tool&lt;/a&gt; is a powerful command-line script to help generate Zend Framework &amp;quot;units&amp;quot; as I call them, from the complete initial application structure to controllers, or actions in controllers that already exist.  &lt;/p&gt;

&lt;p&gt;Though released a the incubator a few versions back, I&amp;#39;ve found it to be more stable and easier to setup just recently.  Fortunately I just did a clean install and lost my setup of Zend Tool, giving me the chance to blog about it here.&lt;/p&gt;

&lt;p&gt;I first learned how to setup Zend Tool with &lt;a href=&quot;http://devzone.zend.com/article/3811&quot; title=&quot;Using Zend_Tool to start up your ZF Project&quot;&gt;this guide&lt;/a&gt;.  It details at least two ways to get Zend Tool running, plus some instructions for Windows users.  My instructions will be for Mac OS X (but should work for most Unix-like systems) and for development purposes only.  &lt;/p&gt;

&lt;h2&gt;Getting Zend Framework&lt;/h2&gt;

&lt;p&gt;First step is getting the framework.  Zend Tool requires the Zend Framework be in your &lt;code&gt;php.ini&lt;/code&gt;&amp;#39;s &lt;code&gt;include_path&lt;/code&gt;, so you need to obtain the source.  The Zend Framework source is available for public checkout via subversion, and since you&amp;#39;re developer, we&amp;#39;ll go that route.  Personally, I like to checkout a release tag and not a trunk, that way I can incrementally update from tag to tag instead of just updating from the trunk.  Either should work.  I use my user&amp;#39;s &lt;code&gt;Sites&lt;/code&gt; folder for all my development work so I&amp;#39;m going to check it out there.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;svn co http://framework.zend.com/svn/framework/standard/tags/release-1.9.4 ZendFramework&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It&amp;#39;s not small, depending on your network, this could take awhile...&lt;/p&gt;

&lt;p&gt;Once that&amp;#39;s finished &lt;code&gt;cd&lt;/code&gt; into the &lt;code&gt;ZendFramework&lt;/code&gt; dir and the core library is in &lt;code&gt;library/Zend&lt;/code&gt;, with the Zend Tool scripts in &lt;code&gt;bin/&lt;/code&gt;.  &lt;/p&gt;

&lt;h2&gt;Add Zend Framework to your Include Path&lt;/h2&gt;

&lt;p&gt;Second step is to add the the contents of the &lt;code&gt;Zend&lt;/code&gt; folder to you include path.  I&amp;#39;m using &lt;a href=&quot;http://www.macports.org/&quot; title=&quot;MacPorts&quot;&gt;Macports&lt;/a&gt; so &lt;code&gt;php.ini&lt;/code&gt; file is located in  &lt;code&gt;/opt/local/etc/php5/&lt;/code&gt;.  By default the includes path was commented out and looked like this:&lt;br&gt;
    ;include_path = &amp;quot;.:/php/includes&amp;quot;&lt;/p&gt;

&lt;p&gt;Change that to uncomment it and add the &lt;code&gt;library&lt;/code&gt; folder of your checkout&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;include_path = &amp;quot;.:/php/includes:/Users/clint/Sites/ZendFramework/library&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Setting up the script&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;bin&lt;/code&gt; folder comes with 3 scripts, a shell script &lt;code&gt;zf.sh&lt;/code&gt;, bat script for Windows users &lt;code&gt;zf.bat&lt;/code&gt;, and a php script that they both use &lt;code&gt;zf.php&lt;/code&gt;.  &lt;code&gt;zf.sh&lt;/code&gt; is the script I&amp;#39;ll be using and we need it on our system &lt;code&gt;PATH&lt;/code&gt;, which I&amp;#39;m going to do via symbolic link&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;sudo ln -s ~/Sites/ZendFramework/bin/zf.sh /usr/bin/zf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using Zend Tool&lt;/h2&gt;

&lt;p&gt;Check to see if Zend Tool is working by typing &lt;code&gt;zf&lt;/code&gt; into the command-line:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/output-thumb-500x104-5.jpg&quot; width=&quot;500&quot; height=&quot;104&quot; alt=&quot;output.jpg&quot;  style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The first thing you&amp;#39;ll see is an error, since we didn&amp;#39;t supply the correct number of arguments, but following that you&amp;#39;ll get usage instructions for all the options of Zend Tool.  &lt;/p&gt;

&lt;p&gt;Now lets create a project by switching to your local server&amp;#39;s document root and running :&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;zf create project test-app
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now take a look around at what was made by opening &lt;code&gt;test-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/test-app-structure-thumb-200x135-8.jpg&quot; width=&quot;200&quot; height=&quot;135&quot; alt=&quot;test-app-structure.jpg&quot;  style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and view it on the web: &lt;a href=&quot;http://localhost/test-app/public&quot; title=&quot;Test app on your local server&quot;&gt;http://localhost/test-app/public&lt;/a&gt;.  You should get the default homepage setup of a Zend Framework Application:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/home-thumb-200x130-11.jpg&quot; width=&quot;200&quot; height=&quot;130&quot; alt=&quot;home.jpg&quot;  style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Zend Tool can do more than just create the project structure, so lets create a controller and an additional action.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd test&lt;/span&gt;-app
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt;   zf create controller tool&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can see that Zend Tool created a controller named &lt;code&gt;ToolController&lt;/code&gt; and added view scripts for you under &lt;code&gt;views/scripts/tool/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/tool-controller-thumb-200x110-14.jpg&quot; width=&quot;200&quot; height=&quot;110&quot; alt=&quot;tool-controller.jpg&quot;  style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can see the default text for that script here: &lt;a href=&quot;http://localhost/test-app/public/tool&quot; title=&quot;Tool Controller&quot;&gt;http://localhost/test-app/public/tool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now lets create an action.  Zend Tool&amp;#39;s &lt;code&gt;create action&lt;/code&gt; method takes requires a controller name as the second arguement; if you don&amp;#39;t specify one, it will assume you want to use the &lt;code&gt;Index&lt;/code&gt; Controller.  &lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;zf create action example tool
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Your results should be like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://ctshryock.com/static/images/tool-example-action-thumb-200x119-17.jpg&quot; width=&quot;200&quot; height=&quot;119&quot; alt=&quot;tool-example-action.jpg&quot;  style=&quot;text-align: center; display: block; margin: 0 auto 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are other options and methods in Zend Tool; if you&amp;#39;ve made this far and understand, you can figure them out &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>EMKeychain update :: posts</title>
       <link href="http://ctshryock.com/posts/2009/10/07/emkeychain-update.html"/>
       <updated>2009-10-07T12:35:08-05:00</updated>
       <id>http://ctshryock.com/posts/2009/10/07/emkeychain-update</id>
       <content type="html">&lt;p&gt;I originally found &lt;a href=&quot;http://extendmac.com/EMKeychain/&quot; title=&quot;EMKeychain from Extendmac&quot;&gt;EMKeychain&lt;/a&gt; a few months back and added it to my project to take over managing interactions between my app and the Keychain.  It worked well until I updated to Snow Leopard and started using the LLVM GCC 4.2 compiler.  Doing so threw some new errors about non-explicit casts and deprecated methods.  I went in search of an update on Extendmac&amp;#39;s site and by chance found &lt;a href=&quot;http://twitter.com/sdegutis&quot;&gt;@sdegutis&lt;/a&gt;&amp;#39;s &lt;a href=&quot;http://github.com/sdegutis/EMKeychain&quot; title=&quot;EMKeychain on GitHub&quot;&gt;fork of the project on GitHub&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;I forked the project &lt;a href=&quot;http://github.com/catsby/EMKeychain&quot; title=&quot;EMKeychain ctshryock fork&quot;&gt;here&lt;/a&gt; and started replacing my current EMKeychain setup with this new one.  The newer isn&amp;#39;t terribly different but it went from 4 files to 2, and we&amp;#39;re not using &amp;quot;proxy&amp;quot; object anymore instead just class methods for getting / creating keychain items.&lt;/p&gt;

&lt;p&gt;One thing I did notice is the inconsistent results, but I don&amp;#39;t think it&amp;#39;s due to this newer version.  I created a temp project and ran a loop getting and printing a specific keychain password 10 times and got the actual password, null, or the password with some extra characters at random times.  Not encouraging.  &lt;/p&gt;

&lt;p&gt;Luckily I did track down the issue; the raw char password wasn&amp;#39;t being converted to an NSString object correctly, so I was able to write a patch using the &lt;code&gt;C strncpy&lt;/code&gt; method.  You can check out my *fixed* version with the link above, but I did find in the network what is probably a better fix with user &lt;a href=&quot;http://github.com/irons&quot; title=&quot;Nathaniel Irons&quot;&gt;irons&lt;/a&gt; &lt;a href=&quot;http://github.com/irons/EMKeychain&quot; title=&quot;irons/EMKeychain&quot;&gt;fork&lt;/a&gt;, which I plan on integrating soon.   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>iPhone :: posts</title>
       <link href="http://ctshryock.com/posts/2009/08/18/iphone.html"/>
       <updated>2009-08-18T18:02:27-05:00</updated>
       <id>http://ctshryock.com/posts/2009/08/18/iphone</id>
       <content type="html">&lt;p&gt;I finally sprung for an iPhone, picking up a new shiny 3Gs over the weekend.  I&amp;#39;m still getting used to it, my previous phone was very &amp;quot;dumb&amp;quot;, but honestly I&amp;#39;m having mixed feelings about the constant connection.  I know now that I can pretty much always check &lt;a href=&quot;http://twitter.com/ctshryock&quot; title=&quot;ctshryock on twitter&quot;&gt;Twitter&lt;/a&gt;, but that doesn&amp;#39;t mean I &lt;em&gt;should&lt;/em&gt;.  Frankly there are many times I enjoy being completely disconnected, but now I can&amp;#39;t really do that unless I leave my phone off/behind.  &lt;/p&gt;

&lt;p&gt;I&amp;#39;m very excited to start developing though.  As the internet becomes more and more accessible through devices like this, it becomes more and more important to make our sites compatible and in some situations optimized for small screen size.   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Zend Db Table in Zend Framework 1.9 :: posts</title>
       <link href="http://ctshryock.com/posts/2009/08/03/zend-db-table-in-zend-framework-19.html"/>
       <updated>2009-08-03T10:37:46-05:00</updated>
       <id>http://ctshryock.com/posts/2009/08/03/zend-db-table-in-zend-framework-19</id>
       <content type="html">&lt;p&gt;I&amp;#39;m reading up on &lt;a href=&quot;http://framework.zend.com/manual/en/zend.db.table.html&quot; title=&quot;Zend Db Table&quot;&gt;Zend Db Table&lt;/a&gt; as part of getting to better know the technologies we&amp;#39;ve adopted at &lt;a href=&quot;http://deltasys.com&quot; title=&quot;Delta Systems Group, where I work&quot;&gt;Delta Systems Group&lt;/a&gt; and have found that now as of &lt;a href=&quot;http://framework.zend.com&quot; title=&quot;Zend Framework home&quot;&gt;Zend Framework 1.9&lt;/a&gt; you no longer &amp;quot;have to extend a base class and configure it to do simple operations such as selecting, inserting, updating and deleteing on a single table&amp;quot;.&lt;/p&gt;

&lt;p&gt;That&amp;#39;s welcome news from the last time I took a look at Zend (circa release 1.4ish).  Zend has really grown since then and it&amp;#39;s quickly become an exciting platform for PHP developers such as myself. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Quality over Quantity :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/31/quality-over-quantity.html"/>
       <updated>2009-07-31T07:47:39-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/31/quality-over-quantity</id>
       <content type="html">&lt;p&gt;From  &lt;a href=&quot;http://daringfireball.net/2009/07/microsofts_long_slow_decline&quot; title=&quot;Microsoft&amp;#39;s Long, Slow Decline&quot;&gt;John Gruber&lt;/a&gt; at &lt;a href=&quot;http://daringfireball.net&quot; title=&quot;Daring Fireball&quot;&gt;Daring Fireball:&lt;/a&gt;: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;And so Microsoft&amp;#39;s official stance regarding Apple&amp;#39;s growing domination of the $1,000+ market is that Apple is charging hundreds of extra dollars in pure margin -- $500 in the case Turner cited in his prepared remarks. The computers that Microsoft chooses to brag about on stage at a major conference are the $650 17-inch laptops advertised in Best Buy Sunday circulars.  &lt;/p&gt;

&lt;p&gt;There&amp;#39;s no question that retailers sell tens of millions of cheap Windows laptops every year. But no one with a pair of eyes thinks such machines are of comparable quality to Apple MacBooks. Even without turning the machines on, anyone can see the difference in design and build quality. In fact, you don&amp;#39;t even need eyes -- just pick them up and see which one squeaks. Apple is selling more MacBooks every quarter. Microsoft thinks it is sitting pretty because Best Buy has a 17-inch Dell for $650.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well said. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Paul Graham and Maker's Schedule :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/23/paul-graham-and-makers-schedule.html"/>
       <updated>2009-07-23T17:19:12-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/23/paul-graham-and-makers-schedule</id>
       <content type="html">&lt;p&gt;Paul Graham has written an informative essay on his blog titled &lt;a href=&quot;http://www.paulgraham.com/makersschedule.html&quot;&gt;&amp;quot;Maker&amp;#39;s Schedule, Manager&amp;#39;s Schedule&amp;quot;&lt;/a&gt; that had Twitter abuzz this morning.  Definitely worth the read.  &lt;/p&gt;

&lt;p&gt;I echo his statements on how meetings can be devastating for a makers schedule.  They can just take the wind out of your sales, or worse, make it hard to even get started.  &lt;/p&gt;

&lt;p&gt;Lately here at the office we&amp;#39;ve been trying to use our calendar&amp;#39;s (Outlook, Entourage) to mark off large chunks of time for doing work for specific clients or projects that we know we&amp;#39;ve got a lot to do.  It sends a message to you and others that this time is reserved already, and I&amp;#39;m going to be productive and get things done.  So far, it&amp;#39;s worked out pretty well.   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>JRFeedbackController + Growl :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/20/jrfeedbackcontroller-growl.html"/>
       <updated>2009-07-20T17:08:13-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/20/jrfeedbackcontroller-growl</id>
       <content type="html">&lt;p&gt;Just pushed another update to &lt;a href=&quot;http://github.com/catsby/jrfeedbackprovider/commit/869a444c01cb33a8bd779375bc5ed56427f867d8&quot;&gt;JRFeedbackProvider on github&lt;/a&gt;.  This update displays a &amp;quot;Thank you&amp;quot; sheet on successful submission of feedback.  In addition, I added optional support for using the Growl framework.  &lt;/p&gt;

&lt;p&gt;To use Growl to display your thank you message, change &lt;code&gt;#define USE_GROWL 0&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt; in &lt;code&gt;JRFeedbackController.h&lt;/code&gt; and add a new entry into your plist dictionary defining your other Growl messages.  &lt;a href=&quot;http://growl.info/documentation/developer/&quot;&gt;See here for more on using Growl&lt;/a&gt;. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>ctshryock / jrfeedbackprovider :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/19/ctshryock-jrfeedbackprovider.html"/>
       <updated>2009-07-19T11:47:26-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/19/ctshryock-jrfeedbackprovider</id>
       <content type="html">&lt;p&gt;I forked the &lt;a href=&quot;http://github.com/rentzsch/jrfeedbackprovider/tree/master&quot;&gt;JRFeedbackProvider&lt;/a&gt; project on &lt;a href=&quot;http://github.com/&quot;&gt;github&lt;/a&gt; yesterday and made two commits that have already been pulled and merged into the main branch.  They&amp;#39;re small, one adds a regular expression check on the email address sent in the php file to check it&amp;#39;s format as a valid email address, the other adjusts the NSTextView&amp;#39;s NSTextStorage to remove the bold font when using &lt;code&gt;showFeedbackWithBugDetails:&lt;/code&gt; to pre-populate the textview with bug details.&lt;/p&gt;

&lt;p&gt;JRFeedbackProvider is a &amp;#39;nonviral cocoa source for implementing an application feedback panel&amp;#39; .  In short, it provides your users a standardized in-app method of providing feedback, from bug reports to to feature and support requests.  The two main approaches are to use the default details pane, which asks basic questions for each category separated into three tabs/panes, and another option which allows the developer to pre-fil the bug report pane with details supplied from within the app.&lt;/p&gt;

&lt;p&gt;The second patch I committed dealt with the latter feature.  In the default &lt;code&gt;showFeedback&lt;/code&gt; method, the textview was pre-filled with some basic questions in bold; &amp;quot;what happened, what did you expect&amp;quot; etc.  The &lt;code&gt;showFeedbackWithBugDetails&lt;/code&gt; route was essentially a blank text area by default with the exception of whatever the developer chose to fill it with by supplying an NSString, but this always resulted in the supplied text being in bold like the pre-filled bug report.  I initially figured out that if you called &lt;code&gt;[textView setString:@&amp;quot;&amp;quot;];&lt;/code&gt; it would &amp;#39;fix&amp;#39; this and the following text would be a normal font weight, but I stumbled across &lt;a href=&quot;http://cocoadev.com/forums/comments.php?DiscussionID=1173&quot;&gt;this thread on cocoadev&lt;/a&gt; that sent me in another direction.  So I went back and updated the method to first grab the font in use by the textStorage&amp;#39;s (which was bold) and creating the same font using the NSFont&amp;#39;s &lt;code&gt;familyName&lt;/code&gt; method, but without the bold, like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-objectivec&quot; data-lang=&quot;objectivec&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NSFont&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resetFontWeight&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;textView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;textStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;font&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//  Font name: Helvetica-Bold    &lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//   Font Family Name: Helvetica&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;textView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;textStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;setFont&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  
&lt;span class=&quot;lineno&quot;&gt;5&lt;/span&gt;     &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NSFont&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;fontWithName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resetFontWeight&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;familyName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;  
&lt;span class=&quot;lineno&quot;&gt;6&lt;/span&gt;     &lt;span class=&quot;nl&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resetFontWeight&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pointSize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]];&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;textView&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;setString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;details&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;  
&lt;span class=&quot;lineno&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resetFontWeight&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;release&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This effectively resets the font, losing the bold. &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>JRFeedbackProvider :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/17/jrfeedbackprovider.html"/>
       <updated>2009-07-17T07:55:50-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/17/jrfeedbackprovider</id>
       <content type="html">&lt;p&gt;I&amp;#39;ve taken a big interest in &lt;a href=&quot;http://github.com/rentzsch/jrfeedbackprovider/tree/master&quot;&gt;JRFeedbackProvider&lt;/a&gt;, already with two (albeit small) patches ready and I filed a new bug on the latest update.  JRFeedbackProvider is a add-on to your cocoa app that will let the user easily submit feedback to you, be it a bug, feature request or support request, and all you need to do is copy the files and make a menu item connection, and use the provided php script on your server (or write your own in your language of choice).&lt;/p&gt;

&lt;p&gt;This project has given me a great chance to get in to contributing to open source projects, it&amp;#39;s scope is reasonable and there seems to be room for development that I can take swings at.  I&amp;#39;d like to start a Zend project to act as a collector of these feedback reports, not as a bug tracker, but as a bug/feature/support filtering system.  A place that collects reports from the wild and the developer can then make decisions to discard, reply to, or push over any issue to their bug tracker of choice.   &lt;/p&gt;
</content>
     </entry>
    
 
    
     <entry>
       <title>Starting new.  Again :: posts</title>
       <link href="http://ctshryock.com/posts/2009/07/14/starting-new-again.html"/>
       <updated>2009-07-14T10:06:34-05:00</updated>
       <id>http://ctshryock.com/posts/2009/07/14/starting-new-again</id>
       <content type="html">&lt;p&gt;I&amp;#39;ve started a new site again.  &lt;strike&gt;I enjoyed writing my last one using the Zend Framework but ultimately I don&amp;#39;t want to maintain it, I&amp;#39;d rather be writing.  I&amp;#39;ve tried schedules for blogging before but I think this time I&amp;#39;m just going to keep notes through out the day and try to post example code and other stuff I can derive from what I work on.&lt;/strike&gt;&lt;/p&gt;

&lt;p&gt;This site is setup using &lt;strike&gt;Movable Type&lt;/strike&gt; &lt;a href=&quot;https://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;, which so far is proving to be very nice.  See &lt;a href=&quot;/2010/12/07/powered-by-jekyll.html&quot;&gt;Powered by Jekyll&lt;/a&gt; for details,&lt;/p&gt;
</content>
     </entry>
    
 
 
</feed>