<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
    <title>Summit Push</title>
    <link rel="self" type="application/atom+xml" href="https://blog.summitpush.com/atom.xml" />
    <link rel="alternate" type="text/html" href="https://blog.summitpush.com/" />
    <id>tag:typepad.com,2003:weblog-1389717</id>
    <updated>2010-04-17T15:55:47-07:00</updated>
    
    <generator uri="http://www.typepad.com/">TypePad</generator>
<entry>
        <title>Code Retreat Pittsburgh</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2010/04/code-retreat-pittsburgh.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2010/04/code-retreat-pittsburgh.html" thr:count="6" thr:updated="2011-12-21T01:18:01-08:00" />
        <id>tag:typepad.com,2003:post-6a00d83452b28b69e20133ecc22382970b</id>
        <published>2010-04-17T15:55:47-07:00</published>
        <updated>2010-04-17T15:55:47-07:00</updated>
        <summary>Two weeks back I participated in the Code Retreat Pittsburgh. It was part of a series of Code Retreats happening around the world, and a very unique event. There were no presentations, other than a 15 minute introduction at the...</summary>
        <author>
            <name>Dan</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Two weeks back I participated in the <a href="http://coderetreat.ning.com/events/ruby-code-retreat-pittsburgh">Code Retreat Pittsburgh</a>.&#0160; It was part of a series of <a href="http://www.coderetreat.com/">Code Retreats</a> happening around the world, and a very unique event.</p>

<p>There were no presentations, other than a 15 minute introduction at the beginning by <a href="http://www.coreyhaines.com/">Corey Haines</a>, who came out from Chicago to help <a href="http://www.coderetreat.com/how-it-works.html">facilitate the day</a>.&#0160; He gave a brief explanation of <a href="http://en.wikipedia.org/wiki/Conway%27s_game_of_life">Conway&#39;s Game of Life</a>, and then we paired up for the first of six 45 minute programming sessions.&#0160; As was explained to us at the beginning, 45 minutes is not nearly enough time to finish Conway&#39;s Game of Life, so the focus of each session is on writing the best code you can, and learning something new.&#0160; We were encouraged to try &quot;<a href="http://gojko.net/2009/08/02/tdd-as-if-you-meant-it-revisited/">TDD as if you meant it</a>&quot;.&#0160; At the end of each session we deleted all the code written in that session, talked a bit about what we had done, and paired up with a different programmer for the next session.</p>

<p>I learned a lot in the various sessions.&#0160; It was interesting to learn new techniques from other programmers.&#0160; I was also amazed at how different people took the same problem and approached it in different ways.&#0160; I also learned things about myself, including the fact that I have a strong tendency to narrow in on a piece of code and lose sight of things like Test Driven Development or refactoring.&#0160; My favorite part of the day was after the second to last session, when instead of deleting our code, we traded computers with the pair opposite us and tried to finish their code.&#0160; We got very close to a working iteration, admittedly by throwing some caution to the wind, but didn&#39;t quite make it.&#0160; It was very interesting jumping into another team&#39;s code with no explanation and being expected to finish it.</p>

<p>Overall, it was a great day, very educational, and lots of fun.&#0160; I hope that another Code Retreat happens here soon!&#0160; Many thanks to Jim for organizing, the folks at Vivisimo for hosting, Corey for running the show, and everyone who participated for making it a great experience.</p><p><a href="http://picasaweb.google.com/coreyhaines/CoderetreatPittsburgh?feat=directlink#">Pictures.</a></p><p></p><p></p><p></p><p></p></div>
</content>



    </entry>
<entry>
        <title>Learning to Solder</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2010/02/learning-to-solder.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2010/02/learning-to-solder.html" thr:count="5" thr:updated="2011-12-28T22:36:48-08:00" />
        <id>tag:typepad.com,2003:post-6a00d83452b28b69e201310f32418c970c</id>
        <published>2010-02-23T19:04:29-08:00</published>
        <updated>2010-02-23T19:04:29-08:00</updated>
        <summary>A few weeks back, when the first meeting of Make:PGH was cancelled due to snow, I decided to spend the evening doing something in the spirit of Make as a substitute. So I pulled out the Solder Practice Kit that...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Electronics" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>A few weeks back, when the first meeting of Make:PGH was <a href="http://makepgh.org/2010/02/makepgh-meeting-1-cancelled-due-to-snow/">cancelled due to snow</a>, I decided to spend the evening doing something in the spirit of <a href="http://www.makezine.com/">Make</a> as a substitute.&#0160; </p>

<p>So I pulled out the <a href="http://www.makershed.com/ProductDetails.asp?ProductCode=MKEL2">Solder Practice Kit</a> that I had purchased a long time ago with the best of intentions, and decided to try it out.&#0160; Several hours later, I had blinking lights.&#0160; It definitely took a while to get the hang of, but it wasn&#39;t as difficult as I thought it would be, and it was fun!&#0160; For someone who has spent a long time in software, it was incredibly satisfying to build something physical.&#0160; I feel like a new world was opened up for me, and I hope to do some more substantial projects in the future.</p>

<p>Here&#39;s the proof that I actually got it working:</p>

<object style="height: 344px; width: 425px;"><param name="movie" value="http://www.youtube.com/v/XOmI0D8X25A" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="344" src="http://www.youtube.com/v/XOmI0D8X25A" type="application/x-shockwave-flash" width="425" /></object></div>
</content>



    </entry>
<entry>
        <title>The Technology Users Group</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/06/the-technology-users-group.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/06/the-technology-users-group.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-67630861</id>
        <published>2009-06-04T08:54:54-07:00</published>
        <updated>2009-06-04T08:54:54-07:00</updated>
        <summary>Last week I attended my first meeting of the newly rebranded Technology Users Group (formerly known as the Charleston Java Users Group). I have to say that they hit this one out of the park. They brought in Ken Sipe,...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Security" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Last week I attended my first meeting of the newly rebranded <a href="http://www.technologyusersgroup.org/">Technology Users Group</a> (formerly known as the Charleston Java Users Group).&#0160; I have to say that they hit this one out of the park.</p><p>They brought in <a href="http://www.nofluffjuststuff.com/conference/speaker/ken_sipe.html">Ken Sipe</a>, a speaker from the No Fluff Just Stuff series, to give the talk.&#0160; The title was &quot;Hacking: The Dark Arts&quot;.&#0160; I will admit, I expected that this was just a sensational title, and that it would be a generic talk about security.&#0160; I was wrong.&#0160; Ken started right into the interesting stuff, not just describing <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">Cross Site Scripting</a> and <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL Injection</a> attacks, but actually walking us through some examples right there in the talk.&#0160; He showed us how these techniques are used to discover vulnerabilities, and what they are capable of by attacking a <a href="http://www.altoromutual.com/">demonstration site</a> that has been set up for that purpose.</p><p>We covered many topics, including wireless security.&#0160; In keeping with the style of the talk, rather than telling us WEP isn&#39;t secure, he showed us exactly how easy it is to crack a WEP key.</p><p>It was an eye opening talk, and a lot of fun.&#0160; Scary, but much more interesting than security talks I have heard in the past.&#0160; I look forward to next month&#39;s meeting and seeing what this group has in store next.</p></div>
</content>



    </entry>
<entry>
        <title>Thoughts on CREATESouth</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/05/thoughts-on-createsouth.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/05/thoughts-on-createsouth.html" thr:count="5" thr:updated="2011-09-03T12:54:09-07:00" />
        <id>tag:typepad.com,2003:post-66540967</id>
        <published>2009-05-08T08:15:33-07:00</published>
        <updated>2009-05-08T08:15:33-07:00</updated>
        <summary>I had a great time at the CREATE South conference. I&#39;m a little late in posting about it, but I have a bunch of thoughts that have been rattling around, and I think they&#39;re worth sharing. First of all, the...</summary>
        <author>
            <name>Dan</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>I had a great time at the <a href="http://www.createsouth.org/">CREATE South</a> conference.&#0160; I&#39;m a little late in posting about it, but I have a bunch of thoughts that have been rattling around, and I think they&#39;re worth sharing.</p><p>First of all, the conference was truly excellent.&#0160; There were two very intelligent keynote speakers, and an amazingly wide <a href="http://www.createsouth.org/program.php">variety of session speakers</a>.&#0160; I thoroughly enjoyed going from a presentation on Twitter to a presentation on Stencil Art using carbon paper, and scraps of wood.&#0160; It truly made me think about creativity, and how it applies in the online and offline world. The <a href="http://www.flickr.com/photos/22408162@N07/3474451995/in/set-72157617232321699/">food</a> was fantastic as well.</p><p>I was invited to participate in a panel titled &quot;From the web, to real life, and back again&quot;.&#0160; This is a topic I find fascinating, and the audience participation was excellent.&#0160; We talked about creating online communities that mirror offline ones, and the difficulties in doing that.&#0160; We talked about the sense of connection you get from meeting a person in &quot;Real Life&quot; that still cannot be duplicated online.&#0160; We even had <a href="http://twitter.com/news2">Raymond from News2</a> there to talk about how they have used Social Media to interact with the local community both to disseminate and gather news.&#0160; <a href="http://twitter.com/bakersdog">Paul Reynolds</a> made some excellent points about the parallels between what he does on Twitter and what his father did selling windows.</p><p>All of this talk, along with some of the other presentations I attended helped me solidify some thoughts I&#39;ve been having for a while, and helped me articulate some of my problems with &quot;Social Media Experts&quot; these days.&#0160; For a while now I&#39;ve been bothered by people who talk about the &quot;right&quot; and &quot;wrong&quot; ways to use sites like <a href="http://twitter.com">Twitter</a>.&#0160; From what I remember, when I signed up for Twitter, there was no list of rules or requirements for using the site.&#0160; Just a text field which I could type up to 140 characters into, and a simple mechanism for me to follow other people&#39;s updates.</p><p>It is an incredibly simple tool, and because of that simplicity, there are a thousand ways to use it.&#0160; Yet, I constantly hear the &quot;rules of Twitter&quot; being espoused.&#0160; Here are a few you might have run across:</p><ul>
<li>You must follow everyone who follows you</li>
<li>Don&#39;t mass follow thousands of people right away</li>
<li>Don&#39;t constantly promote your blog or products</li>
<li>Give people insight into who you are</li>
<li>Don&#39;t auto-DM people who follow you</li>
</ul>
<p>All of these &quot;rules&quot; make a lot of assumptions that you and the people you interact with on Twitter might not fit.&#0160; I think we do people a disservice by making blanket statements, and not educating them.&#0160; Twitter is just a new communication tool, it is not some whole new paradigm, and we make it seem scary and mysterious by giving it all these &quot;rules&quot;.&#0160; Instead, help people correlate it to things they already understand, and then they can make their own decisions.&#0160; Here are the above &quot;rules&quot; rewritten:</p><ul>
<li>Mass following thousands of people generates lots of email, and can come across as SPAM</li>
<li>An auto-DM is kind of like sending someone a form letter, not very personal</li>
<li>Constantly promoting your products can make you seem like an infomercial spokesperson</li>
<li>If you want people to feel like they&#39;re connecting with you personally, you should probably follow them back and share some personal details about yourself.</li>
</ul>
<p>Who is to say what will work for everyone?&#0160; Oxi-clean seems to be successful with their infomercials, even though that <a href="http://www.youtube.com/watch?v=_NNv2oiWdRU">shouting guy</a> drives me crazy.&#0160; <a href="http://twitter.com/oprah">Oprah</a> and <a href="http://twitter.com/aplusk">Ashton</a> (who were discussed a lot at CREATE South), exist in a totally different world than the rest of us, and trying to connect personally with their followers probably isn&#39;t feasible.&#0160; Form letters aren&#39;t terribly personal, but they can be informative if done properly, and some might say they are better than nothing (others disagree).</p><p>We are past the point where the Twitter community is homogeneous enough that we can make rules.&#0160; We can only educate, and if that doesn&#39;t work, unfollow.</p></div>
</content>



    </entry>
<entry>
        <title>Cooper River Bridge Run 2009</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/04/cooper-river-bridge-run-2009.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/04/cooper-river-bridge-run-2009.html" thr:count="4" thr:updated="2011-10-10T00:07:51-07:00" />
        <id>tag:typepad.com,2003:post-65148051</id>
        <published>2009-04-06T13:50:18-07:00</published>
        <updated>2009-04-06T13:50:18-07:00</updated>
        <summary>This Saturday was the Cooper River Bridge Run. It&#39;s always exciting when you get 31,000 people together in the same place, and this year was no exception. When we showed up at the Gaillard at 5:45, the line for shuttle...</summary>
        <author>
            <name>Dan</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>This Saturday was the <a href="http://www.bridgerun.com/">Cooper River Bridge Run</a>.&#0160; It&#39;s always exciting when you get 31,000 people together in the same place, and this year was no exception.&#0160; When we showed up at the Gaillard at 5:45, the line for shuttle buses already went down Calhoun to King St. and then down King to St. George.&#0160; There seemed to be a little more confusion this year with the starting zones than I saw last year, but it might just be where in the crowd I ended up.&#0160; I know there was definitely some panic as people tried to squeeze through the gates with 15 minutes to go before the race start, but I managed to duck into my zone and get in a few stretches before the gun went off.</p><p>The weather was beautiful, and I felt great.&#0160; The recent decrease in training due to my foot injury left me with really fresh legs.&#0160; I felt strong up until the last half mile, and was able to push through the finish without slowing down much.&#0160; Of course, even though I did the race last year, I still managed to misjudge the distance to the finish once I hit King St.</p><p>My chip time was 42:53, almost a minute improvement over last year, and I felt much better.&#0160; That put me at 102/2146 in <a href="http://results.active.com/pages/searchform.jsp?pubID=3&amp;rsID=76281">my age group</a>.&#0160; Given my expectations, I was thrilled with this result, and am excited to carry through for a good performance in the<a href="http://www.ifivek.com/index.html"> iFiveK </a>with my<a href="http://lowcountrybloggers.com/"> blogging peeps</a>.</p><p>I managed to snag a post-race massage and lots of free snacks.&#0160; I was very disappointed that the Johnsonville Brats truck wasn&#39;t there, but <a href="http://www.jimnnicks.com/">Jim &#39;N Nick&#39;s</a> came through with a tasty BBQ sandwich.&#0160; Two days later, my calves are still a little tight, but I think I can call this race injury free, which is the most important thing of all!</p></div>
</content>



    </entry>
<entry>
        <title>Uwharrie 2009</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/03/uwharrie-2009.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/03/uwharrie-2009.html" thr:count="14" thr:updated="2012-01-10T23:44:42-08:00" />
        <id>tag:typepad.com,2003:post-64765237</id>
        <published>2009-03-27T20:11:51-07:00</published>
        <updated>2009-03-27T20:11:51-07:00</updated>
        <summary>Well, I&#39;ve been putting off writing this post, because the real results of the Uwharrie Mountain Run this year took a long time to unfold. On the face of it, it was a very successful race. I shaved 2 minutes...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Running" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>Well, I&#39;ve been putting off writing this post, because the real results of the <a href="http://www.raceuwharrie.com">Uwharrie Mountain Run</a> this year took a long time to unfold.&#0160; On the face of it, it was a very successful race.&#0160; I shaved 2 minutes off of my time from last year, and came within one slot of finishing in the top ten overall*.&#0160; (*Note, most of the hardcore runner do the 20 or 40 mile versions of the race.)&#0160; I think I was in slightly better shape this year, but the bulk of the improvement was probably from running a better race and not burning myself out too early.&#0160; It certainly helps to know how hard that first mile is and pace appropriately.</p><p>The day itself was gorgeous.&#0160; A crew of us drove up from Charleston for the race, with one of us crazy enough to run the 40 miler, so the rest of us spent a day lounging about in the sun waiting for him to finish.&#0160; I was feeling good.</p><p>As we were getting ready to go home, I noticed some soreness in my foot, along the outside edge of my arch.&#0160; The trail is very rocky and uneven, so my first thought was that I must have brusied it.&#0160; It was worse the next morning, as aches and pains usually are, so I took a few days off.&#0160; It seemed to be healing up nicely, and about a week later I went for a long, slow run.&#0160; Later that day the pain came back with a vengeance.&#0160; After a few days of limping around I realized the damage must be more serious. </p><p>Fast forward another month and a half, and I&#39;m finally working my way back up in mileage without any pain.&#0160; I&#39;m still not sure what the damage was, but it was certainly more than just a bruise.&#0160; I&#39;m mostly disappointed because my training for the <a href="http://www.bridgerun.com/">Cooper River Bridge Run</a>, which was one of my goals this year, was pretty much nonexistant.&#0160; I&#39;m still going to run it, but I don&#39;t think I&#39;ll be setting any PRs.&#0160; Still, this run has been a great time two years in a row, and I wouldn&#39;t give it up.&#0160; I just might be a little more careful on the downhills next year.&#0160; At least I can start gearing up for a <a href="http://www.charlestontriathlonclub.com/entries.html">summer of triathlons</a>! </p><br /></div>
</content>



    </entry>
<entry>
        <title>Some Ruby Performance Tests</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/03/some-ruby-performance-tests.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/03/some-ruby-performance-tests.html" thr:count="13" thr:updated="2012-01-20T03:58:35-08:00" />
        <id>tag:typepad.com,2003:post-64198901</id>
        <published>2009-03-15T21:50:13-07:00</published>
        <updated>2009-03-15T21:50:13-07:00</updated>
        <summary>**Warning - This post is for CS and/or Math nerds only. All other readers will find it very boring** For a while now I&#39;ve been hooked on Project Euler. It&#39;s a great way to exercise the brain muscles, and has...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Programming" />
        <category term="Ruby On Rails" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>**Warning - This post is for CS and/or Math nerds only.&#0160; All other readers will find it very boring**</p><p>For a while now I&#39;ve been hooked on <a href="http://projecteuler.net/">Project Euler</a>.&#0160; It&#39;s a great way to exercise the brain muscles, and has really helped me get some practice reps in with Ruby, my newly adopted programming language of choice.</p><p>A lot of the projects require that you be able to generate prime numbers very quickly.&#0160; After several iterations of my algorithm, I had something that was pretty respectable, but my friend who was working through the same problem in Python was getting much better performance than I was, so I started digging deeper.</p><p>The first discovery I made was that a lot of the things that make Ruby pretty hurt the performance.&#0160; My first version of the algorithm generates all the primes less than 10^6 in about 14 seconds. (Keep in mind all these timings are done on a basic Macbook laptop, so the relative timings are what is most interesting)</p><p><span style="font-size: 11px; font-family: Courier;"><span class="k">def</span> <span class="nf">generate_primes</span><span class="p">(</span><span class="n">max_prime</span><span class="p">)</span><br />&#0160; <span class="vi">@prime_hash</span> <span class="o">=</span> <span class="no">Hash</span><span class="o">.</span><span class="n">new</span> <span class="p">{</span> <span class="o">|</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="o">|</span> <span class="n">h</span><span class="o">[</span><span class="n">k</span><span class="o">]</span> <span class="o">=</span> <span class="kp">true</span> <span class="p">}<br /></span>&#0160; <span class="vi">@primes</span> <span class="o">=</span> <span class="o">[</span> <span class="mi">2</span> <span class="o">]</span><br />&#0160;&#0160; <span class="mi">3</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">max_prime</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">next_prime</span><span class="o">|<br /></span>&#0160;&#0160;&#0160; <span class="k">if</span><span class="p">(</span><span class="vi">@prime_hash</span><span class="o">[</span><span class="n">next_prime</span><span class="o">]</span><span class="p">)<br /></span>&#0160;&#0160;&#0160;&#0160;&#0160; <span class="vi">@primes</span> <span class="o">&lt;&lt;</span> <span class="n">next_prime</span><br />&#0160;&#0160; &#0160;&#0160; <span class="k">if</span><span class="p">(</span><span class="n">next_prime</span> <span class="o">&lt;</span> <span class="no">Math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">max_prime</span><span class="p">))<br /></span>&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160; <span class="n">next_prime</span><span class="o">.</span><span class="n">step</span><span class="p">(</span><span class="n">max_prime</span><span class="o">/</span><span class="n">next_prime</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="p">{</span> <span class="o">|</span><span class="n">i</span><span class="o">|</span> <br />&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;&#0160; <span class="vi">@prime_hash</span><span class="o">[</span><span class="n">i</span> <span class="o">*</span> <span class="n">next_prime</span><span class="o">]</span> <span class="o">=</span> <span class="kp">false</span> <span class="p">}<br /></span>&#0160;&#0160;&#0160;&#0160;&#0160; <span class="k">end</span><br />&#0160;&#0160;&#0160; <span class="k">end</span><br />&#0160; <span class="k">end<br /></span><span class="k">end<br /></span></span></p><div class="line" id="LC13"><span style="font-size: 11px; font-family: Courier;">&#0160;</span><br /><span style="font-size: 11px; font-family: Courier;">$ time ruby gen.rb</span><br /><span style="font-size: 11px; font-family: Courier;">Generating all primes less than 1000000</span><br /><span style="font-size: 11px; font-family: Courier;">78498 primes found</span><br /><br /><span style="font-size: 11px; font-family: Courier;">real	0m14.505s</span><br /><span style="font-size: 11px; font-family: Courier;">user	0m10.912s</span><br /><span style="font-size: 11px; font-family: Courier;">sys	0m3.205s</span><br /></div><p><br />Interestingly, I was able to get a nearly 4x speedup factor by pulling apart all my pretty syntax and going back to some good old fasioned while loops.&#0160; As far as I can tell, this didn&#39;t really change the algorithm at all, just the way it&#39;s coded up.&#0160; Some other simple tests seem to indicated that all the Ruby iterators are noticeably slower than hand-built while loops.</p><p><span style="font-size: 11px; font-family: Courier;"><div class="line" id="LC1"><span class="k">def</span> <span class="nf">generate_primes</span><span class="p">(</span><span class="n">max_prime</span><span class="p">)</span></div><div class="line" id="LC2">&#0160;&#0160;<span class="vi">@prime_hash</span> <span class="o">=</span> <span class="no">Hash</span><span class="o">.</span><span class="n">new</span> <span class="p">{</span> <span class="o">|</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="o">|</span> <span class="n">h</span><span class="o">[</span><span class="n">k</span><span class="o">]</span> <span class="o">=</span> <span class="kp">true</span> <span class="p">}</span></div><div class="line" id="LC3">&#0160;&#0160;<span class="vi">@primes</span> <span class="o">=</span> <span class="o">[</span> <span class="mi">2</span> <span class="o">]</span></div><div class="line" id="LC4">&#0160;&#0160;</div><div class="line" id="LC5">&#0160;&#0160;<span class="n">next_prime</span> <span class="o">=</span> <span class="mi">3</span></div><div class="line" id="LC6">&#0160;&#0160;<span class="k">while</span> <span class="p">(</span><span class="n">next_prime</span> <span class="o">&lt;</span> <span class="no">Math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">max_prime</span><span class="p">))</span></div><div class="line" id="LC7">&#0160;&#0160;&#0160;&#0160;<span class="n">i</span> <span class="o">=</span> <span class="n">next_prime</span></div><div class="line" id="LC8">&#0160;&#0160;&#0160;&#0160;<span class="k">while</span> <span class="p">(</span><span class="n">i</span> <span class="o">&lt;=</span> <span class="p">(</span><span class="n">max_prime</span> <span class="o">/</span> <span class="n">next_prime</span><span class="p">))</span></div><div class="line" id="LC9">&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;<span class="vi">@prime_hash</span><span class="o">[</span><span class="n">i</span> <span class="o">*</span> <span class="n">next_prime</span><span class="o">]</span> <span class="o">=</span> <span class="kp">false</span></div><div class="line" id="LC10">&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;<span class="n">i</span> <span class="o">+=</span> <span class="mi">2</span></div><div class="line" id="LC11">&#0160;&#0160;&#0160;&#0160;<span class="k">end</span></div><div class="line" id="LC12">&#0160;&#0160;&#0160;<span class="vi">@primes</span> <span class="o">&lt;&lt;</span> <span class="n">next_prime</span></div><div class="line" id="LC13">&#0160;&#0160;&#0160;&#0160;<span class="n">next_prime</span> <span class="o">+=</span> <span class="mi">2</span></div><div class="line" id="LC14">&#0160;&#0160;&#0160;&#0160;<span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="vi">@prime_hash</span><span class="o">[</span><span class="n">next_prime</span><span class="o">]</span><span class="p">)</span></div><div class="line" id="LC15">&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;<span class="n">next_prime</span> <span class="o">+=</span> <span class="mi">2</span></div><div class="line" id="LC16">&#0160;&#0160;&#0160;&#0160;<span class="k">end</span></div><div class="line" id="LC17">&#0160;&#0160;<span class="k">end</span></div><div class="line" id="LC18">&#0160;&#0160;<span class="k">while</span> <span class="p">(</span><span class="n">next_prime</span> <span class="o">&lt;=</span> <span class="n">max_prime</span><span class="p">)</span></div><div class="line" id="LC19">&#0160;&#0160;&#0160;&#0160;<span class="k">if</span> <span class="vi">@prime_hash</span><span class="o">[</span><span class="n">next_prime</span><span class="o">]</span></div><div class="line" id="LC20">&#0160;&#0160;&#0160;&#0160;&#0160;&#0160;<span class="vi">@primes</span> <span class="o">&lt;&lt;</span> <span class="n">next_prime</span></div><div class="line" id="LC21">&#0160;&#0160;&#0160;&#0160;<span class="k">end</span></div><div class="line" id="LC22">&#0160;&#0160;&#0160;&#0160;<span class="n">next_prime</span> <span class="o">+=</span> <span class="mi">2</span></div><div class="line" id="LC23">&#0160;&#0160;<span class="k">end</span></div><div class="line" id="LC24"><span class="k">end<br /><br />$ time ruby gen2.rb<br />Generating all primes less than 1000000<br />78498 primes found<br /><br />real	0m3.470s<br />user	0m3.095s<br />sys	0m0.294s</span></div></span><br />My next experiment was to try an alternative Ruby VM that I had read about, <a href="http://rubini.us/">Rubinius</a>.&#0160; The docs I saw indicated that they had made some performance improvements, so I thought I&#39;d try it out.&#0160; This did not meet with success.&#0160; Rubinius, for this particular app, was much slower.</p><p><span style="font-size: 11px; font-family: Courier;">$ time rbx gen2.rb</span><br /><span style="font-size: 11px; font-family: Courier;">Generating all primes less than 1000000</span><br /><span style="font-size: 11px; font-family: Courier;">78498 primes found</span></p><p><span style="font-size: 11px; font-family: Courier;">real&#0160;&#0160;&#0160; 0m12.608s</span><br /><span style="font-size: 11px; font-family: Courier;">user&#0160;&#0160;&#0160; 0m11.863s</span><br /><span style="font-size: 11px; font-family: Courier;">sys&#0160;&#0160;&#0160; 0m0.310s</span></p><p>At this point, I believe I griped about Rubinius on Twitter, and actually got some great feedback from <a href="http://twitter.com/evanphx">Evan Phoenix</a>, the key maintainer of Rubinius.&#0160; I wrote a really simple function to test recursion and looping, and sure enough, Rubinius blew away MRI.&#0160; I&#39;m guessing that the slowdown in my prime generator might be related to Array and Hash operations, but I need to isolate that further.</p><p><span style="font-size: 11px; font-family: Courier;">def recurse(num)</span><span style="font-size: 11px; font-family: Courier;"><br />&#0160; return 0 if (num == 0)</span><br /><span style="font-size: 11px; font-family: Courier;">&#0160; 1.upto(10) { |i| recurse(num - 1)}</span><br /><span style="font-size: 11px; font-family: Courier;">end</span></p><p><span style="font-size: 11px; font-family: Courier;">recurse(6)</span></p><p><span style="font-size: 11px; font-family: Courier;">$time ruby recurse.rb</span></p><p><span style="font-size: 11px; font-family: Courier;">real&#0160;&#0160;&#0160; 0m14.937s</span><br /><span style="font-size: 11px; font-family: Courier;">user&#0160;&#0160;&#0160; 0m9.847s</span><br /><span style="font-size: 11px; font-family: Courier;">sys&#0160;&#0160;&#0160; 0m4.805s</span></p><p><span style="font-size: 11px; font-family: Courier;">$ time rbx recurse.rb</span></p><p><span style="font-size: 11px; font-family: Courier;">real&#0160;&#0160;&#0160; 0m1.745s</span><br /><span style="font-size: 11px; font-family: Courier;">
user&#0160;&#0160;&#0160; 0m1.632s</span><br /><span style="font-size: 11px; font-family: Courier;">
sys&#0160;&#0160;&#0160; 0m0.061s</span></p><p>So there it is.&#0160; I don&#39;t claim to be a performance expert, but enough people expressed interest in what I had found that I thought I would make my life easier and post it up here.&#0160; I have some theories that the MRI vs Rubinius differences might be related to the ability to store large hashes in memory, but that&#39;s not tested yet.&#0160; I would love feedback on what I could be doing better, what might explain some of these results, etc.&#0160; I&#39;d also be happy to run more tests if people have unanswered questions.</p><p>All of these code samples are <a href="http://github.com/summitpush/performance-tests/tree/master">available on GitHub</a>.</p><br /><div class="highlight"><pre><br /><div class="line" id="LC13"><br /><pre><br /><div class="line" id="LC24"><span class="k"><br /><br /><br /></span></div></pre><br /><br /></div></pre></div></div>
</content>



    </entry>
<entry>
        <title>Some Good News</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/03/some-good-news.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/03/some-good-news.html" thr:count="6" thr:updated="2011-11-01T02:37:49-07:00" />
        <id>tag:typepad.com,2003:post-63660107</id>
        <published>2009-03-04T19:08:16-08:00</published>
        <updated>2009-03-04T19:08:16-08:00</updated>
        <summary>A while back, I put up a post on Mountaintop Removal Mining, and how it&#39;s destroying Appalachia. Well, today, I got an email from a friend with the following update: I wanted to give you a heads up that the...</summary>
        <author>
            <name>Dan</name>
        </author>
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>A while back, I put up a post on <a href="http://blog.summitpush.com/2008/09/mountaintop-rem.html">Mountaintop Removal Mining</a>, and how it&#39;s destroying Appalachia.</p><p>Well, today, I got an email from a friend with the following update:</p><div style="margin-left: 40px;">I wanted to give you a heads up that the <span class="yshortcuts" id="lw_1236222136_3" style="border-bottom: 1px dashed #0066cc; cursor: pointer;">Clean Water Protection Act</span> was introduced on the House floor today.&#0160; Reps. <span class="yshortcuts" id="lw_1236222136_4">Frank Pallone</span> (D-NJ-06), <span class="yshortcuts" id="lw_1236222136_5">Dave Reichert</span>
(R-WA-08), and John Yarmouth (D-KY-03) introduced the bill this morning
with 117 bi-partisan co-sponsors, more than double the number of
original co-sponsors from the <span class="yshortcuts" id="lw_1236222136_6">110th Congress</span>!<br /><br />
The Clean Water Protection Act restores the integrity of the landmark 1977 legislation, The <span class="yshortcuts" id="lw_1236222136_7">Clean Water Act</span>, which was enacted by Congress to &quot;restore and maintain the chemical, physical, and <span class="yshortcuts" id="lw_1236222136_8" style="border-bottom: medium none; background: transparent none repeat scroll 0% 0%; cursor: pointer; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">biological integrity</span>
of the Nation&#39;s waters.&quot; For 25 years, the Clean Water Act (CWA)
allowed for the granting of permits to place &quot;fill material&quot; into
waters of the United States, provided that the primary purpose of the
&quot;filling&quot; was not for waste disposal. As such, the CWA prohibited
mountaintop removal operations from using the nation&#39;s waterways as
waste disposal sites. That changed in 2002, when the Army Corps of
Engineers, under the direction of the Bush administration and without
congressional approval, altered its longstanding definition of &quot;fill
material&quot; to include mining waste. This change, which the CWPA would
reverse, accelerated the devastating practice of <span class="yshortcuts" id="lw_1236222136_9" style="border-bottom: 1px dashed #0066cc; background: transparent none repeat scroll 0% 0%; cursor: pointer; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">mountaintop removal coal mining</span> and the destruction of more than 1,200 miles of Appalachian streams.<br /><br /></div><p>This is great news, and a step in the right direction, but we can&#39;t take our foot off the gas pedal quite yet.&#0160; For more details, check out <a href="http://www.ilovemountains.org" title="I Love Mountains">ILoveMountains.org</a>.</p></div>
</content>



    </entry>
<entry>
        <title>Quandary Peak - East Ridge</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/02/quandary-peak---east-ridge.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/02/quandary-peak---east-ridge.html" thr:count="5" thr:updated="2011-08-09T20:31:16-07:00" />
        <id>tag:typepad.com,2003:post-63328325</id>
        <published>2009-02-25T07:32:20-08:00</published>
        <updated>2009-02-25T07:34:47-08:00</updated>
        <summary>As soon as I heard we were going on a ski trip to Copper Mountain, I knew that I was going to have to hit at least one Colorado 14er while I was out there. Being that close to the...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Mountaineering" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.flickr.com/photos/22408162@N07/3307590599/" title="Quandary Peak by summitguy, on Flickr"><img alt="Quandary Peak" height="375" src="http://farm4.static.flickr.com/3249/3307590599_d3a72d3c1b.jpg" width="500" /></a>
</p><p>As soon as I heard we were going on a ski trip to Copper Mountain, I knew that I was going to have to hit at least one Colorado 14er while I was out there.&#0160; Being that close to the mountains was just too tempting.&#0160; Since I was going to be climbing solo, and I didn&#39;t have a lot of extra space in my luggage for gear, I decided to go for something not too difficult.&#0160; I have a copy of <a href="http://www.amazon.com/Dawsons-Guide-Colorados-Fourteeners-Vol/dp/0962886718/ref=pd_bbs_2?ie=UTF8&amp;s=books&amp;qid=1235576062&amp;sr=8-2">Dawson&#39;s guide to 14ers</a> and it recommended Quandary Peak as a good intro level winter 14er.&#0160; It was also less than an hour drive from our condo to the trailhead, so it was the perfect choice.</p><p>After an entire week of cold, windy, cloudy weather, the very last day of the trip, the day I planned to attempt Quandary, turned out to be absolutely gorgeous weather.&#0160; Crystal clear skies all day long.&#0160; The climb itself was not too difficult, but climbing at that altitude is always a workout.</p>&#0160;<p><a href="http://www.flickr.com/photos/22408162@N07/3308405102/" title="Quandary Peak by summitguy, on Flickr"><img alt="Quandary Peak" height="375" src="http://farm4.static.flickr.com/3307/3308405102_f34b786259.jpg" width="500" /></a>
</p><p>The summit views were spectacular, I almost didn&#39;t want to leave.&#0160; I met up with one other climber near the summit, but other than that, we had the mountain to ourselves.&#0160; Really surprising that with such easy access there weren&#39;t huge crowds, but I guess it was my lucky day.</p><p>I&#39;ve got a more detailed <a href="http://www.summitpost.org/view_object.php?object_id=492979">trip report up on SummitPost</a>, for those who are interested.</p><p>I also posted <a href="http://www.flickr.com/photos/22408162@N07/sets/72157614403744842/">my pictures on Flickr</a>.</p></div>
</content>



    </entry>
<entry>
        <title>Cold Mountain, NC</title>
        <link rel="alternate" type="text/html" href="https://blog.summitpush.com/2009/02/cold-mountain-nc.html" />
        <link rel="replies" type="text/html" href="https://blog.summitpush.com/2009/02/cold-mountain-nc.html" thr:count="28" thr:updated="2012-01-10T22:11:11-08:00" />
        <id>tag:typepad.com,2003:post-62441141</id>
        <published>2009-02-05T12:05:02-08:00</published>
        <updated>2009-02-05T12:05:02-08:00</updated>
        <summary>A few weeks back, I took a trip to do some hiking on Cold Mountain, in North Carolina. The goal for the trip was to get in some training with heavy packs and elevation gain, and hopefully a little practice...</summary>
        <author>
            <name>Dan</name>
        </author>
        <category term="Hiking" />
        
        
<content type="xhtml" xml:lang="en-US" xml:base="https://blog.summitpush.com/">
<div xmlns="http://www.w3.org/1999/xhtml"><p>A few weeks back, I took a trip to do some hiking on Cold Mountain, in North Carolina.&#0160; The goal for the trip was to get in some training with heavy packs and elevation gain, and hopefully a little practice with our cold weather camping systems.&#0160; It was a great trip, with some amazing views, and plenty of hard work.&#0160; It even got pretty cold the second night.&#0160; The highlight was probably waking up the morning of the second day and finding that we were above the clouds.</p><p><a href="http://sustenation.typepad.com/.a/6a00d83452b28b69e201053710ce50970b-pi" style="display: inline;"><img alt="IMG_9156" class="at-xid-6a00d83452b28b69e201053710ce50970b " src="http://sustenation.typepad.com/.a/6a00d83452b28b69e201053710ce50970b-320wi" /></a>
 </p><p>If you want all the details, you can read my full <a href="http://www.summitpost.org/trip-report/486636/january-trip-to-cold-mountain-nc.html">Trip Report on SummitPost</a>.<br />My pictures from the trip can be found <a href="http://www.flickr.com/photos/22408162@N07/sets/72157612536496329/">here</a>.<br />Mark posted his pictures <a href="http://gallery.mac.com/sparkturbo#100503&amp;bgcolor=black&amp;view=grid">here</a>.<br />Also ran into another Flickr user while up on top of Cold Mountain, who had a much nicer camera, you can see his pictures from the weekend <a href="http://www.flickr.com/photos/mbsurf/sets/72157612685584822/">here</a>.</p><br /></div>
</content>



    </entry>
 
</feed>

<!-- ph=1 -->
