Bloghttp://bscientific.org/blog/feeds/atom/2013-05-10T13:52:11+00:00This content is updated infrequently. The interesting stuff happens in real life.Bannerman's Early Morning2013-05-10T13:52:11+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/bannermans-early-morning/<p>PP and I did a casual sprint from Long Dock at 7am May 10, 2013. I played hockey hard the night before, and I am frankly far from my peek paddling condition. Fortunately, the tide was approaching slack-before-flood (which is happening as I type this), the wind was calm, the water warm – 60F – and glassy. The sun, which rose almost two hours before we got on the water at 7:15, was bright and warm, and began burning off the fog banks that blanketed Bannerman's and the Newburgh-Beacon Bridge. </p>
<p>No photos from this trip, sorry. Highlights included lots of Canadian geese on the grounds and ramparts of Bannerman's, the most wonderfully irridescent head of a mallard swimming alongside his mate, and the usual group of cormorants sunning themselves on the channel marker just west of Bannerman's. Just after rounding Bannerman's and starting our trip back north, PP noticed a fin poking out of the water. We paddled up to a sixteen inch striped bass swimming on its back. Our best guess was that it was caught by one of the nearby fishermen and thrown back because of its size.</p>
<p>We got back to Long Dock just around 9. A red-wing blackbird – the first I have seen around Beacon – darted over my head as I "cooled my heels" in the water while straddling my back deck. We packed up our gear and were out of there by 9:15. I am now feeling blissed out, eating a muffin and sipping on coffee at Bank Square. </p>Long Dock to Bannerman's Island2013-04-28T20:32:51+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/long-dock-to-bannermans-island/<p>CU and I slid into the traditional kayaks around 2pm on Saturday, April 27. The air temperature was just over 70F, and the water was just over 50F. We paddled six miles round-trip in a gentle 5 knot breeze against the very tail end of the flood. When we got down to Bannerman's at a leisurely pace of about 2mph, the current was visibly beginning to ebb over the walls of the tidal pool. On our slow return to Long Dock, we ran into DG and her flotilla of paddlers. A great treat: we saw two bald eagles soaring over the waters between Denning's Point and the shore.</p>
<p>CU is really into stand-up-paddle (SUP) boards. I wanted her to try a traditional Greenland kayak and paddle to get a better feel for how the paddle and boat interact with the water. We talked about the skid and carve turns, canted-blade stroke, torso rotation, keeping the elbows in tight, the importance of a loose grip, and resisting the urge to have the arms and shoulders do the work in favor of the big muscles in the legs and stomach.</p>
<p>These "slow" trips have been really good for me. They encourage me to focus a great deal of attention on my posture and how my blade and boat attack and interact with the water. I did a hard-leaning cross-bow pry that skidded me around a full 180 degrees with a little forward momentum to spare. As a demonstration, I did a bunch of blended strokes to show how the paddler can start with a stearing stroke and transition it into a forward stroke.</p>
<p>CU got a lot out of it. Hours later when we discussed the trip, she noted that her back and shoulders were less sore than she normally experiences from paddling, but her wrists were feeling it some. Remedy: loosen that grip. With heavy neoprene gloves on, the only sense that comes into contact with the paddle is vision; I can't feel the paddle beneath the gloves, the padde enters the water without felt or heard resistence, and the boat slides past the paddle so smoothly their is no sensation of pull on the paddle.</p>
<p><img alt="The documentary evidence, a maneuver I think of as the deep stretch in shallow water." height="600" src="/static/media/uploads/qajaq/551558_10201068838343531_1115891392_n.jpg" width="600"></p>
<p>The documentary evidence, a maneuver I think of as the deep stretch in shallow water.</p>
<p>A great feature of our "big government", NOAA publishes excellent online coastal charts. <a href="http://www.charts.noaa.gov/OnLineViewer/12343.shtml" target="_blank">The Hudson River from Wappinger's Creek to the GWB</a> is required reading for local boaters.</p>Long Dock to Denning's Point2013-04-26T18:21:04+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/long-dock-to-dennings-point/<p>As of April 24, AM had not paddled yet this season. The winds were up at 15 knots from the south, the water was a touch over 50F, the air just over 60F, and the time was 6pm. With a little lubrication, AM squeezed into the skin-on-frame, dressed her skirt – with a little assistance – and made a bee-line through the sheltered waters toward the picket of fishing rods guarding the mouth of Long Dock. I slid straight-legged into the Black Pearl, dressed the tuilik, and charged after AM. We navigated the fishing lines and nosed into the waves – three feet trough-to-crest – toward Denning's Point.</p>
<p>This marked a first-of-the-season for me, too. I was paddling without gloves and a wetsuit. My protective gear consisted of neoprene Keen boots, a Brooks tuilik, a nose-plug, and my kayak. Per usual, the safety equipment was abundant: bilge pump, VHF radio, whistle, inflatable paddle float, hypothermia kit, Greenland paddle, and storm Greenland paddle.</p>
<p>AM has paddled sit-on-tops, but nothing like a traditional Greenland kayak until we met. Greenland kayaks are significantly more "tippy" than nearly all their descendents. I told AM that simply sliding your paddle into the water and letting it rest there would provide a lot of stability, which she successfully demonstrated. I asked if she was engaging her knees in the process, which she promptly did, and felt much more controlled. I asked her to loosen her grip, which is a great challenge for a beginner in "big" conditions.</p>
<p>Fifteen knots creates intimidating rolling white-caps. Paddling into it is a challenge for may paddlers. Some people use a skeg or rudder. My boats don't have that luxury. I had AM lean forward and away from the direction she wanted to go in order to do a skidding turn. We discussed the "canted blade" approach to the Greenland paddle, and I warned her to keep her wrists in a neutral position and try to make the boat go forward by sliding the paddle into the water and twisting her torso to keep her shoulders parallel to the paddle. That is a tough thing to communicate when you are out in it! After a quarter mile, we altered our heading in toward land to take shelter from the wind. We made good time during that run, but had to come around back into the wind to get to the tip of Denning's, which took nearly an hour.</p>
<p>Denning's Point was well populated with people fishing for striped bass, which are mostly through their annual migration from the ocean to their spawning beds up the Hudson. We muscled into the wind to come nealy parallel with the giant mulberry tree on the southern tip, then rafted up and let the wind blow us back north. Suddenly, one of the paddles, which we had dutifully placed between our boats, was floating slower than we were. It appeared to be floating away from toward the south, though in reality, we were floating away from it. AM took the paddle we managed to rescue, and I took off under hands power to recover the flight risk. Turning the kayak into a high wind with only my hands was a great exercise, and resulted in apprehension of the skinny stick.</p>
<p>The fun was just getting started! The reward for paddling into the wind is a quick trip home (unless the winds change, oy). I had been eyeballing the waves the entire way south, ready to apply some of the skills Greg & Paula had shown me. We both stepped up our game and surfed some gnar. White water bubbled under our boats. Noses pearled. We skidded downhill. I applied an aggressive cross bow draw skidding turn on a wave that tried to broach me and spun quickly (for a long boat) back onto the face. AM, at this point feeling fatigued, pumped her arms, but kept a good pace and looked strong in the waves.</p>
<p>AM hauled her boat up on shore and ate some homemade chili I had brought. I did some wind sprints, then dragged my boat up to the car. By this point, my pinky and ring fingers were numb with the cold. I crammed all the gear into the car as fast as I could and high-tailed it for home, where food and dog waited.</p>Long Dock to the Moodna Creek and Back2013-04-15T13:04:32+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/long-dock-to-the-moodna-creek-and-back/<p>John, Paul, and I got out in 50F sunshine Sunday morning for a quick approximately eight mile loop from Long Dock. We fought a stiff west wind of nearly 15 knots to cross from Long Dock to Gully's on the Newburgh waterfront. We floated, paddled, and did a little surfing down to Plum Point. We then paddled under the train tracks and about a half-mile up the Moodna to a point where strainers prevented us from travelling further, within eyeshot of Route 9W. We reentered the Hudson and paddled to a point where tiny waves were breaking on the sandbar off of Plum Point, littered with downed trees. The most striking thing about the trip was the numbers of downed trees resting on that sandbar and on the shoreline of the creek. By this time, the wind had shifted to blow stiffly out of the northwest. We struggled to cross. I opted to take the wind at my beam and made good time, then turned to put the wind more to my back and got some surfing. The waves did not provide particularly good surf, but they did crash in my cockpit and create some excitement. I did a few rolls and balance braces, just to feel the cold water on my face.</p>Tide Race and Overfall Training 2013-04-09T17:04:10+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/tide-race-and-overfall-training/<p>Paul and I spent April 7 paddling out of Stonington, CT, to Catumb Rocks to catch the peak of the ebb tide and ride the waves that pop up at the ledge between Fisher's Island, NY, and Napatree Point, RI. We met our coaches, Paula and Greg from <a href="http://www.kayakwaveology.com/" target="_blank">Kayak Waveology</a>, at Noah's in Stonington at 8:30 for coffee and second breakfasts, having departed Beacon before daybreak. We met our classmates. Josko is a paddler out of Wood's Hole, MA. Ivan came from Kingston, NY. Greg and Paula showed us the excellent Android <a href="http://yoyana.com/support.html" target="_blank">Currents</a> app. <a href="http://tidesandcurrents.noaa.gov/get_predc.shtml?year=2013&stn=0013+The%20Race&secstn=Napatree+Point,+0.7+mile+southwest+of&sbfh=-0&sbfm=48&fldh=-1&fldm=12&sbeh=-0&sbem=47&ebbh=-1&ebbm=30&fldr=0.5&ebbr=0.5&fldavgd=284&ebbavgd=113&footnote=" target="_blank">Predicted maximum current</a> was ebbing at 2.2 knots 11:52 AM 0.7 miles (nautical?) southwest of Napatree Point.</p>
<p><iframe height="350" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=&aq=&sll=41.30889,-71.896076&sspn=0.094646,0.173206&t=h&ie=UTF8&ll=41.310179,-71.905689&spn=0.094644,0.173206&z=13&output=embed" width="425"></iframe></p>
<p>Let me back up here a moment. When I called Greg a week ago to arrange the coaching, he asked what boat I was bringing. I told him that I planned to paddle my Black Pearl. I could immediately hear some concern over the phone, when he asked about paddling such a low-volume boat. And that made me doubt. It made me doubt my gear, my ability, and my ability to gauge my ability. I spent a lot of the week agonizing over it. Paul and I went out in a stiff breeze and bitterly cold conditions the Wednesday before. I wore the gear, including a helmet, that I anticipated wearing for our bluewater trip. By Friday, I was back to my usual cautious optimism. There must have been some residual anxiety, though, because I only slept a handful of hours Saturday night.</p>
<p>I believe we first set course for the mast at 41º17'30"N 71º54'10"W just east across Lords Passage from Wicopesset Island. Check out this <a href="http://www.charts.noaa.gov/OnLineViewer/13214.shtml" target="_blank">chart</a>. On our way out, we did some drills to practice skidding and carving turns. Greg pointed out that my low back deck appeard to act like a skeg when carving and prevented the boat from turning. I mentioned that the boat, when carved aggressively, would simply skid unless I applied pressure with my paddle on the center of my imagined turn radius, so I generally just skid.</p>
<p>We surfed the tide race as the water in the Long Island Sound made every effort to squeeze through the submerged rocks as it poured back into the Atlantic. A 15 knot breeze from the south helped the waves stand up a little. I was able to link a few rides up the wave-train into the ebbing tide. At one point, i found myself on a small standing wave, just enough to point my nose down and let me carve back and forth. Greg and Paula, independently, warned me about the "wall" I would encounter trying to roll up on the upstream side, and that I should try to roll up on the downstream side instead.</p>
<p>So why the concern from the coaches? A few reasons, naturally. They did not know me or my skill level. They asked if I had a roll, and they saw that I had the appropriate safety equipment, so certain assumptions about "seriousness" can be made. A long, skinny boat like the BP can require a lot of work to keep upright, leading to exhaustion. I have been at that point in a Greenland kayak. Near-absolute exhaustion, where the muscles that keep you upright are so tired you have to lay the boat on its side and float in order to save energy, rest, and recover.</p>
<p>We beached on Napatree Point to enjoy a chilly lunch with some local paddlers. Among these was Nick Schade of <a href="http://www.guillemot-kayaks.com/guillemot/" target="_blank">Guillemot Kayaks</a>. He was paddling his Petrel Play. Looks like a fun boat! Building a strip kayak is definitely in my future, and the Play looks like a boat that could nicely round out my quiver. While on shore, we talked about where strokes should end depending on the shifting center of gravity front-to-back. When leaning far forward, the stroke must exit the water earlier to take advantage of the bow buried deeper in the water.</p>
<p>The air was quite cold, so we jumped back into our boats and paddled around the Point to a spot affectionately known as The Molars. A line of low rocks off the tip of Napatree Point, The Molars has surf when the conditions are right. I believe Jon Stockdill and I may have paddled through them when we did a Napatree Point trip a few years ago. The surfing was great, and we lined up with Nick's crew to take turns in the surf zone. I caught a few good waves, and even managed to link a few, I think. We talked about watching the waves ahead of you to help anticipate what the wave you are on will become, and Greg had us practice stern pries to "counter-steer" (my words) the boat. I remember doing that when surfing in a white-water boat, but had no success nailing it in the surfzone.</p>
<p><a href="http://www.flickr.com/photos/36472552@N06/" target="_blank">David Grainger</a> got some great photos that he generously posted to his Flickr stream.</p>
<p><a href="http://www.flickr.com/photos/36472552@N06/8634348495/" title="Tiderace02 by david.grainger, on Flickr"><img alt="Tiderace02" height="281" src="http://farm9.staticflickr.com/8255/8634348495_24b706ebfb.jpg" width="500"></a></p>
<pre>Paul looks very strong above, and you can tell that he is really moving through the water.</pre>
<p><a href="http://www.flickr.com/photos/36472552@N06/8635468142/" title="GP01 by david.grainger, on Flickr"><img alt="GP01" height="281" src="http://farm9.staticflickr.com/8259/8635468142_00b959f94a.jpg" width="500"></a></p>
<pre>The water is surging up over my back deck.</pre>
<p><a href="http://www.flickr.com/photos/36472552@N06/8635466702/" title="GP02 by david.grainger, on Flickr"><img alt="GP02" height="275" src="http://farm9.staticflickr.com/8532/8635466702_fa90179ee3.jpg" width="500"></a></p>
<pre>Greg commented on how strong my torso rotation was, with my paddle and shoulders parallel.</pre>
<p>On the way back to <em>terra firma</em>, we practiced more carving turns, and linking skids with carves.</p>
<p>Greg mentioned two Greenland paddle techniques that I need to experiment with. Maligiaq's "crunch" technique is what I have been doing, but there is a top-hand pushing element I can incorporate for more power. The other technique is, if I understand it, similar to the technique used with a wing paddle. <a href="http://www.gregstamer.com/2012/01/27/forward-stroke-with-greenland-paddle" target="_blank">This</a> may help.</p>
<p>Question: How do great paddlers keep their technique in the off-season? Answer: Do not have an off-season!</p>Disco Install Notes For Ubuntu 12.04 LTS Precise Pangolin2013-03-08T22:27:12+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/disco-install-notes-for-ubuntu-1204-lts-precise-pangolin/<p><a href="http://discoproject.org/" target="_blank">Disco</a> is a Python & Erlang implementation of the Map-Reduce framework for distributed computing.</p>
<p>It took a while to decipher the <a href="http://discoproject.org/doc/disco/start/install.html" target="_blank">QuickStart Guide</a> and the message boards. The fruits of this labor are shared below.</p>
<h3>Installation Notes</h3>
<p>Update and upgrade the base system.</p>
<pre><code>sudo apt-get update && sudo apt-get -y upgrade</code></pre>
<p>install the IDE (vim+tmux), and the requirements for building disco.</p>
<pre><code>sudo apt-get -y install vim tmux build-essential debhelper python-dev python3 erlang git libcmph-dev</code></pre>
<p>Grab the disco source and switch to the proper tag. Look for the latest<br>tag on github.</p>
<pre><code>mkdir src<br>git clone git://github.com/discoproject/disco.git src/disco<br>cd src/disco<br>git checkout 0.4.4</code></pre>
<p>Build the <code>.deb</code> files.</p>
<pre><code>sh ./make-discoproject-debian</code></pre>
<p>Copy the <code>.deb</code>s out to the machines. They all need python-disco. Master<br>needs the whole kit. Nodes just need python-disco and disco-node.</p>
<pre><code>sudo dpkg -i python-disco_0.4.4_all.deb<br>sudo dpkg -i python-discodb_0.4.4_amd64.deb<br>sudo dpkg -i disco-node_0.4.4_amd64.deb<br>sudo dpkg -i disco-master_0.4.4_all.deb</code></pre>
<p>Edit the <code>/etc/disco/settings.py</code> as appropriate.</p>
<p>For the rest of this, we want to use the <code>disco</code> user account.</p>
<pre><code>sudo su disco</code></pre>
<p>Generate the ssh keys.</p>
<pre><code>ssh-keygen -N '' -f ~/.ssh/id_dsa<br>cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys</code></pre>
<p>Initiate an <code>ssh</code> session as <code>disco</code> to localhost and confirm the connection.</p>
<pre><code>ssh localhost</code></pre>
<p>Run a test server.</p>
<pre><code>disco nodaemon</code></pre>
<p>You should be all set up from here to do the <a href="http://discoproject.org/doc/disco/start/tutorial.html#tutorial" target="_blank">Disco Tutorial</a>.</p>
<p>Note that if you don't set up additional nodes, you should edit `/etc/disco/settings.py` and change DDFS replica values to 1.</p>Freelancer's Calendar2013-03-06T15:02:35+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/freelancers-calendar/<ul>
<li>January, they define budgets.</li>
<li>February, awards season & superbowl.</li>
<li>March, they reach out.</li>
<li>April, they hire.</li>
<li>May, they disappear without a trace.</li>
<li>June, they return with no explanation given nor expected.</li>
<li>July & August, we work and vacation.</li>
<li>September, we work.</li>
<li>October, we work.</li>
<li>November, we launch.</li>
<li>December, we ride.</li>
</ul>Neologism: CM-messy2013-02-25T17:08:05+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/neologism-cm-messy/<p>When a Content Management System is used in such as way as to make it nearly opaque to both admins and end-users.</p>Mezzanine Workflow2013-01-30T22:42:43+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/mezzanine-workflow/<p><strong>UPDATE December 8, 2014:</strong> I now believe the `runserver` is an anti-pattern. All development should be on a VM.</p>
<p>This is the basic Mezzanine workflow to get projects completed rapidly. Written in response to a question posted to mezzanine-users, this is a companion to the article on Mezzanine deployment process.</p>
<p>Start with the django runserver and get a site running at http://localhost:8000/. I see a lot of people asking for help with their server who do not have a local version running. Never trust a developer who does everything on production!</p>
<p>Be sure to `pip install django-debug-toolbar`, because it will help you grow your understanding of what Django and Mezzanine are doing "behind the scenes". Of particular interest is the "Templates" tools. It shows the order of the template inheritance as well as the template context, e.g. the value of "page".</p>
<p>Build out your site's information architecture at http://localhost:8000/admin/. Put in your "About Us" page and your forms, etc. Advanced users can use the same type of database they expect to use in production (more postgres, mom, please) and dump the data out for uploading to production.</p>
<p>At this point, you will have what I affectionately call a "functional wireframe" of the site. Everything works, though it probably does not look how you want it to look. This is a good time to begin working on the design. (Why? Designers often – no offense – miss crucial parts of the site. On a recent project, the design had to be redone because they forgot to include a way to login, which was prominent in the functional wireframe.)</p>
<p>The advantage of using bootstrap is that the DOM classes and IDs are consistent across all bootstrap-based sites. Thus, all bootstrap CSS is fairly similar. The form CSS declarations in bootstrap is totally unrelated to the mezzanine.forms app. The best way to get going is to "Customize" your bootstrap at http://twitter.github.com/bootstrap/customize.html.</p>
<p>Now, and only now, would I begin to muck about with the templates. Using the debug toolbar, figure out which template you want to modify and copy it from Mezzanine to your project's spanking-new `templates` directory. Iterate on this until you get through all of the pages of your site.</p>Deploying Mezzanine: Fabric Git Vagrant Joy2013-01-14T04:21:53+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/mezzanine-fabric-git-vagrant-joy/<h3><span>Preface</span></h3>
<p>In this demonstration, we will install the python applications `virtualenv`, `virtualenvwrapper`, the excellent open source Mezzanine CMS, and the Django "web framework for perfectionists with deadlines". We will create a basic Mezzanine project populated with sample data, run the Django development server, and access and admin of the site at http://127.0.0.1/.</p>
<p>We will then build a Vagrant virtual machine running Ubuntu 12.04 LTS, Nginx, Gunicorn, Memcached, PostgreSQL, and Supervisor, and deploy the Mezzanine project to it from a git repository using Fabric. Changing the HOSTS variable in the included Fabric settings to your host's name or IP will allow you to build, install, and deploy your site with a single command. </p>
<p>This is a work in progress, hastily written late at night for a friend while waiting for a client's code to deploy. Suggestions for improvement are welcome. YMMV. This article contains topics in advanced web software engineering and is not intended as an introduction to Django, Mezzanine, Python, etc. Matthew Krohn served as a test subject and provided lots of valuable feedback.</p>
<h3>Deploying To Production Must Never Break Production</h3>
<p>Deploying Django web applications can be a struggle. After years, I finally found the sweet spot. <a href="http://mezzanine.jupo.org/">Mezzanine</a>, the CMS built on Django by Stephen McDonald and many awesome contributors, gets it right. A bundled Fabric script, a settings.FABRIC dictionary, your code on a hosted git or mercurial repository, and an Ubuntu box – be it Vagrant, AWS, a hosted VPS, or dedicated hardware – and you can spin up a server like it was nothing. Following, please find my technique for starting and deploying Django projects before a single line of code gets written. These instructions will give you a deployed Ubuntu 12.04 box running PostgreSQL, Nginx, Gunicorn, Supervisord, and Memcached.</p>
<h3>Assumptions</h3>
<p>These instructions will work best on a GNU/Linux or MacOSX. At this writing, VirtualBox is required to run The Vagrant, as is Ruby. In Ubuntu, `sudo apt-get install ruby-dev`. Unless otherwise stated, everything is done on localhost.</p>
<h3>Ingredients</h3>
<p>The links below are to the installation instructions.</p>
<ul>
<li><a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a></li>
<li><a href="http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation">virtualenvwrapper</a></li>
<li><a href="http://mezzanine.jupo.org/docs/overview.html#installation">Mezzanine</a> (or <a href="http://cartridge.jupo.org/">Cartridge</a>, which is a Mezzanine shop)</li>
<li><a href="http://vagrantup.com/">The Vagrant</a></li>
<li><a href="http://git-scm.com/">Git</a></li>
<li>A host. Instructions below assume a virtualized Ubuntu 12.04 Precise Pangolin 64 bit host managed by The Vagrant.</li>
</ul>
<h3>Virtualenv</h3>
<p>Virtualenv is a way to create isolated python environments for your projects. This becomes exceptionally handy when you have to support Django 1.0 sites on the same development machine as Django 1.5 sites.</p>
<pre>pip install virtualenv</pre>
<h4>Virtualenvwrapper</h4>
<p>Virtualenvwrapper contains a bunch of convenience scripts for working with your virtualenvs.</p>
<pre>pip install virtualenvwrapper</pre>
<p>Before we continue, log out of your shell, then log back in so you have access to the virtualenvwrapper scripts.</p>
<pre>mkvirtualenv <proj_name> --no-site-packages --distribute
workon <proj_name>
cdvirtualenv</pre>
<h3><span>Mezzanine</span></h3>
<pre><em># Install from PyPI</em>
$ pip install mezzanine<br>$ pip install fabric<br><br><em># Create a project<br></em>$ mezzanine-project <myproject><br>$ cd <myproject></pre>
<p>More instructions for working with Mezzanine can be found <a href="http://mezzanine.jupo.org/docs/">here</a>.</p>
<h3>Vagrant</h3>
<p>You need Ruby on your system to get this to work. My <a href="https://gist.github.com/4534579">Vagrantfile</a> has can be used as an example.</p>
<pre>$ gem install vagrant
$ vagrant box add precise64 http://files.vagrantup.com/precise64.box
$ vagrant init precise64
$ vagrant up</pre>
<h3>Git</h3>
<p>On your favorite git host, create a repository for your project. Note the repository's URL. Make sure you have git installed on localhost, then in your <myproject> directory run:</p>
<pre>$ git init
$ git remote add origin <repository_url></pre>
<p>I usually make these repositories private. If you do that, you will want to add a deploy key to your host repository.</p>
<pre>$ vagrant ssh<br>$ ssh-keygen -t rsa -C "<email_address>"<br><em># Hit return through the options.<br></em><br>$ cat ~/.ssh/id_rsa.pub<br><em># Copy the output and add it as a new key for your host.<br># Yes, I know about pbcopy. No, it does not work over ssh. </em></pre>
<p>More instructions on using ssh deploy keys can be found <a href="https://help.github.com/articles/generating-ssh-keys">here for github</a> or <a href="https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git">here for bitbucket</a>. </p>
<p>Add your <myproject> directory to git and push it on up to origin!</p>
<pre>$ git add .<br>$ git commit -m 'Initial commit'<br>$ git push origin master</pre>
<h3>Git Alternative</h3>
<p>Networks being what they are, relying on an outside resource like github can be risky. I usually come up with the most proper solutions when far removed from network access. By design, every git repository is created equal, so there is nothing special about a hosted repository versus your local repo. Built into git is the `git daemon` commnd. Simply issue the command</p>
<pre>$ git daemon --verbose --export-all --base-path=/path/to/your/repositories</pre>
<p>to start a git daemon. Instructions abound on the internet for GNU/Linux init.d scripts and Mac launchd plists. Modify your settings.FABRIC REPO_URL value appropriately. For example, my Vagrant guest expects the following value:</p>
<pre>"REPO_URL": "git://10.0.2.2/<repo>"</pre>
<p>Now I can update and commit my changes on localhost, then run a `fab deploy` to see my changes reflected on the guest OS.</p>
<h3>Intermission</h3>
<p>At this point, you should have a Mezzanine project running inside of a virtualenv and an Ubuntu 12.04 Precise Pangolin Vagrant up and running and your code committed to a git or mercurial repository.</p>
<h3>Code Up</h3>
<p>In your project's <a href="https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/settings.py">settings.py</a>, uncomment FABRIC dictionary. Paste those lines into your local_settings.py. The production values can be put in your settings.py. In local_settings.py, let's put the values in for that Vagrant.</p>
<pre>FABRIC = {<br> "SSH_USER": "vagrant", # SSH username<br> "SSH_PASS": "vagrant", # SSH password (consider key-based authentication)<br> "HOSTS": ['<host-name>', ], # List of host names or IPs.<br> "VIRTUALENV_HOME": "/home/vagrant", # Absolute remote path for virtualenvs<br> "PROJECT_NAME": "<project_name>", # Unique identifier for project<br> "REQUIREMENTS_PATH": "requirements/project.txt", # Path to pip requirements, relative to project<br> "GUNICORN_PORT": 8000, # Port gunicorn will listen on<br> "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8"<br> "LIVE_HOSTNAME": "example.com", # Host for public site.<br> "REPO_URL": "<repository_url>",<br> "DB_PASS": "default", # Live database password<br> "ADMIN_PASS": "default", # Live admin user password<br> "SECRET_KEY": <secret_key><br>}</pre>
<h3>Deploy</h3>
<p>Mezzanine's excellent <a href="https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py">fabfile.py</a> dropped in <a href="https://github.com/stephenmcd/mezzanine/commit/ebe380f1b0daf0d013c7e33d5209086aadf1acfe#mezzanine/project_template/fabfile.py">May 2012</a>. For what it does, it remains quite lean. To deploy your server for the first time run:</p>
<pre>$ fab all</pre>
<p>This will install and update the required OS packages, create the virtualenv, initialize the database, the web server, and start the web application. After you make changes, commit them to your SCM, and push to your repository, `fab deploy` will pull your changes, make all the necessary updates, and restart the appropriate services.</p>
<h3>Underkill?</h3>
<p>Why don't I use Puppet or Chef? These tools are great for large web applications that span multiple systems. As a rule, I want to use the fewest and simplest tools possible to get the job done. If I needed to deploy a seperate database or load balancers, I would certainly go with Puppet. In fact, writing a pp file to facilitate scaling this up may be my next article. In all likelihood, though, a proper Puppet (or Chef, or Buildout) would rely heavily on Fabric or Capistrano for the final deploy. The conventional wisdom is that incremental Continuous Deployment is better than none. When a Mezzanine infrastructure needs to scale beyond a single host, you can address it confident in the knowledge that the single-host deploy is rock solid.</p>Kevin Maher’s SciFi Dept2007-09-26T04:49:25+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/kevin-mahers-scifi-dept/<p>Kevin Maher is one of the funniest people I have ever met. At Vassar College, he was in the now-defunct Laughing Stock comedy group. When we were at Metuchen High School together, I remember him making these bizarre radio shows on tape before I went away to Europe. When we were on the YMCA swim team together in third grade... well, he was hilariously young.</p>
<p>Kevin debuted the <a href="http://blogs.amctv.com/scifiscanner/scifi_department_videos/index.html">SciFi Dept</a> on the <a href="http://blogs.amctv.com/scifiscanner/">SciFi Scanner</a> blog over at <a href="http://blogs.amctv.com/">AMC</a> in August. This is definitely going into my queue of things to view. Thanks, Kevin!</p>Surveillance of the Vassar Community?2007-09-25T23:28:57+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/surveillance-of-the-vassar-community/<p>It recently came to my attention that a video camera has been set up at <a href="http://www.vassar.edu/">Vassar College</a> to be streamed into <a href="http://www.secondlife.com/">SecondLife.</a>I first encountered the device when I went to the Vassar island in SL. It took some significant software sleuthing to uncover the URI of the offending and offensive device. I find the undocumented practice of surveilling a public space at Vassar College extremely disturbing. Have the students and faculty who walk across the Library Lawn every day been told that they are being filmed and broadcast to the world? My research into the matter indicates that this has not been discussed in any public manner. How does this filming enhance the teaching, learning, and research that happens at Vassar? I do not think filming and streaming into SL has any academic merit.</p>
<p>I post the link to the camera <a href="http://143.229.34.8/view/index.shtml">here</a>. I would buy the argument that, by posting this, I am violating privacy even more than whoever installed the camera. I would respond that the content is fully accessible to anyone in SecondLife. Further, I hope this shames the responsible individuals into removing the offending device permanently.</p>
<p>A number of years ago, students taking a course in the Media Studies Development Project approached me about performing open and transparent surveillance of the <a href="http://mediacloisters.vassar.edu/">Media Cloisters</a>. My understanding was that the camera would be set up in the space with clear signs outlining when and how the camera would be used. It was also made clear that the footage would be used for in-class presentation. All footage not used for the presentation would be destroyed. This idea was shot down, justifiably, because the Media Cloisters was a space set aside for unfettered use of technology. Surveillance of users of the space, it was felt, would create an unfriendly atmosphere.</p>
<p>I won't go into the use of SecondLife at Vassar beyond stating that I am skeptical of the pedagogical value. The <a href="http://moo.vassar.edu:7666/">Vassar MOO</a> and <a href="http://moo.vassar.edu:7000/">MOOssiggang</a> engage students much more dramatically in the building of space, the writing of text, the display of imagery, and computer-mediated communication than SL currently can. Yes, the technology of the mid-90s doesn't have the whiz-bang factor of SL, but the pedagogy was sound.</p>
<p>I hope that faculty, students and administrators at Vassar look carefully at what they are allowing with this ongoing filming of the campus. Yes, I know that the images are from a great distance, that they are of fairly low quality, and that some may argue that Vassar is a public space. I think these arguments area slippery slope and fallacious. Cheaper, higher quality cameras will become available. Vassar is a private institution, and has a commitment to protect the privacy of its faculty, staff, and student.</p>
<p>If I go to reunion this year, I will be staying away from the Library Lawn.</p>
<p>I would love to hear your thoughts on this.</p>Flat Earth2007-09-20T00:12:18+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/flat-earth/<p>So the blogosphere is abuzz about the hostess on The View who demonstrated tremendous ignorance with regard to the shape of the earth. You can watch the full clip <a href="http://www.youtube.com/watch?v=fLnCDTWB2S0">here</a>.</p>
<p>The signal:noise problem on YouTube comments means that things get missed. So I am reposting my comment here.</p>
<blockquote>
<p>in all fairness, at least the clip ends with the celebutard saying, baby, we have to go to the library. proper respect for that move. and its true. take yourself and your kids to the library. often. nothing else to it. the more your read, even if its tripe, the more you think, the more you will be able to think critically about the information that gets pushed at you every day.</p>
</blockquote>
<p>I barely caught her final statement at the end, and I'm glad the original poster did not cut that out, and that I was listening so passively that I wasn't completely incensed by her ignorance. No, this does not redeem her totally by any stretch, but it does go in the right direction. Read, folks. Read with your kids. Take them to libraries. Take them to bookstores. Donate time or money to libraries. Have your kids donate time or money. Think of the children. Take them reading.</p>
<p> </p>Paddling and Shifting Goals2007-09-17T21:34:33+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/paddling-and-shifting-goals/<p>On Sunday, September 16, I worked for Shaun Cox of <a href="http://northeastadventure.com/">Northeast Adventure Company</a> as a kayak guide for the National MS Society <a href="http://eventnyv.nationalmssociety.org/site/TR?fr_id=7210&pg=entry">2007 Swim the Hudson for MS</a> event. With 75 swimmers and 25 kayakers in the waters off of Croton Point, I had my hands full one and a half miles from shore. The weather and currents cooperated, though, and Westchester County Sheriffs Department and Croton Fire Department, along with about 15 pleasure craft, helped ensure that everyone stayed safe and had a great day. I paddled close to six miles, and escorted the final swimmer back from the 1.5 mile mark to shore.</p>
<p>Last week while commuting home I spent about seven minutes outlining how I want to spend my days, and the aforementioned paddle re-affirmed the importance of vacations. I want to write down and publish these daily goal averages. I am also interested in putting together a web-app, perhaps for the sidebar of this site, for tracking my progress in accomplishing these goals.</p>
<h3>The Daily Grind & Goals</h3>
<ul>
<li>π. The dog deserves two hours every day of my time. This includes walks, grooming, trips to dog parks, and feeding. This is part of the approximately 12 hours of every day that he is able to enjoy my company.</li>
<li>Reading. I want four hours a day.</li>
<li>Writing. One hour a day would keep me happy. I may look to increase this.</li>
<li>Roller-hockey. One hour a day. I currently do two hours per week. Two more two hour sessions and I will be there.</li>
<li>Coding/programming. I need to do about two hours a day between this blog and other projects and interests.</li>
<li>Snowboarding. I want to get the average to about one hour a day, so 365 hours a year, or about 40 days on the slopes. Good luck.</li>
<li>Surfing. Same as above, one hour per day average.</li>
<li>Fly-fishing. Also one hour per day average.</li>
<li>Dinning. Until I can get everything IV, I read that we take about two hours every day to eat.</li>
<li>Bathroom/HABA/etc. Sources say two hours, I think I am down to one.</li>
<li>Kayaking. Lets add an hour per day.</li>
<li>Sleep. Sadly, eight or so hours per day.</li>
<li>Teaching. Last, but certainly not least, I love to teach. Especially technology, where I have the most knowledge and experience. One hour a day would work. I need tenure somewhere, clearly!)</li>
</ul>
<p>Some of these things have potential overlap. I can fly-fish from a kayak. I do a lot of skateboarding as part of workout time with π. Lets add up the numbers, though, and see if this is in any way realistic. I count 25 hours in my goals. Not great, but getting there. Any chance on lengthenging the day? Probably not.</p>
<p>None of the above are things which will pay my bills unless I do them so regularly that they become jobs. So how do I reconcile these goals with the reality of existence here and now? I can get paid for kayaking. Programming gets me paid. I could teach snowboarding, and surfing in short order. With some training, I could work as a fly-fishing guide.</p>
<p>This serves as a starting point. ToDo: build a tool that lets me check off the hours I spend doing these things so I can track how close I am getting to these goals.</p>
<p> </p>The Story of π2007-09-10T23:47:43+00:00Ken Bolton/blog/author/ken/http://bscientific.org/blog/the-story-of-%CF%80/<p>At the request of friends and family, and to clarify a conversation I recently had with <a href="http://www.swerdloff.com/">Swerdloff</a> (btw, you know how important content is. You used to rule with content. Your site is all 2.oh, but there isn't a there there. Photos are cool. Events are nice. Prose and poetry are better! I have spent the last four years teaching that concept, which I feel I learned from you.) I present below my The Story of π: A Prose Formula for Naming My Dog (Show Your Work).</p>
<p>The first part was pretty easy. π was whelped on March 14, 2006. March 14 is π Day every year. My brother, the math teacher, earned Teacher of the Month for March because of his in-class π Day celebrations, including pie and measuring the circumference and area of said pies.</p>
<p><img alt="Pi knows how to vacation." height="160" src="http://bscientific.net/wp/wp-content/uploads/2007/09/vacation.jpg" style="" title="" width="160"></p>
<p>So π is an irrational number. Irrational numbers are numbers which cannot be written as a fraction, but are not imaginary numbers. This is a pretty fair description of him. I honestly haven't attempted any form of rational discourse with the dog. Our relationship on that end consists of me giving him what I want to give, and his unconditional acceptance thereof.</p>
<p>π is also a real number. Real numbers are any numbers that are either rational or irrational.</p>
<p>π is always a hit with the under-13 crowd. It probably has something to do with his size. The neighborhood kids always start shouting his name when they see my car driving by. He's something of a local celebrity.</p>
<p>π and I went to DC to visit my sister and some friends over the Labor Day weekend. While there, we hiked the Billy Goat trail at Great Falls. On this particular hike, lots of people asked about π. Two little girls asked what kind of dog he was. I told them he was a shiba inu. Their eyes got real wide and they exclaimed in unison, I thought they were imaginary! Apparently, they had played quite a bit of Nintendogs™, but having never seen a shiba in real life had assumed that the authors had taken some artistic liberties. This is how I now justify my claim that π can indeed be imaginary.</p>
<p>When a number has a part that is both real and imaginary, that number is called a complex number. My dog is the only instance of π that is a complex number. The label of complex definitely fits this dog!</p>
<p>Finally, some numbers are transcendental. A real or complex number is called Transcendental number if it cannot be obtained as a result of an algebraic equation with integer coefficients. (<a href="http://simple.wikipedia.org/wiki/Number#Transcendental_numbers">Wikipedia</a>) π is a transcendental number. π is also, perhaps unsurprisingly, a transcendental dog.</p>