<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Musings of an Anonymous Geek &#187; Sysadmin</title>
	<atom:link href="http://www.protocolostomy.com/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Thu, 03 Nov 2011 04:08:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Python User Group in Princeton (PUG-IP): 6 months in</title>
		<link>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/</link>
		<comments>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 04:08:40 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=956</guid>
		<description><![CDATA[In May, 2011, I started putting out feelers on Twitter and elsewhere to see if there might be some interest in having a Python user group that was not in Philadelphia or New York City. A single tweet resulted in 5 positive responses, which I took as a success, given the time-sensitivity of Twitter, my [...]]]></description>
			<content:encoded><![CDATA[<p>In May, 2011, I started putting out feelers on Twitter and elsewhere to see if there might be some interest in having a Python user group that was not in Philadelphia or New York City. A single tweet resulted in 5 positive responses, which I took as a success, given the time-sensitivity of Twitter, my &#8220;reach&#8221; on Twitter (which I assume is far smaller than what might be the entire target audience for that tweet), etc.</p>
<p>Happy with the responses I received, I still wanted to take a baby step in getting the group started. Rather than set up a web site that I&#8217;d then have to maintain, a mailing list server, etc., I went to the cloud. I started a <a href="http://meetup.com/pug-ip">group on meetup.com</a>, and started looking for places to hold our first meeting.</p>
<h3>Meetup.com</h3>
<p>Meetup.com, I&#8217;m convinced, gives you an enormous value if you&#8217;re looking to start a user group Right Now, Today™. For $12/mo., you get a place where you can announce future meetups, hold discussions, collect RSVPs so you have a head count for food or space or whatever, and vendors can also easily jump in to provide sponsorship or &#8216;perks&#8217; in the form of discounts on services to user group members and the like. It&#8217;s a lot for a little, and it&#8217;s worked well enough. If we had to stick with it for another year, I&#8217;d have no real issue with that.</p>
<h3>Google Groups</h3>
<p>I set up a mailing list using Google Groups about 2-3 months ago now. I only waited so long because I thought meetup.com&#8217;s discussion forum might work for a while. After a few meetings, though, I noticed that there were always about five more people in attendance than had RSVP&#8217;d on meetup.com. Some people just aren&#8217;t going to be bothered with having yet another account on yet another web site I guess. If that&#8217;s the case, then I have two choices (maybe more, but these jumped to mind): force the issue by constantly trumpeting meetup.com&#8217;s service, or go where everyone already was. Most people have a Google account, and understand its services. Also, since the group is made up of technical people, they mostly like the passive nature of a mailing list as opposed to web forums.</p>
<p>If you&#8217;re setting up a group, I&#8217;d say that setting up a group on meetup.com and simultaneously setting up a Google group mailing list is the way to go if you want to get a fairly complete set of services for very little money and about an hour&#8217;s worth of time.</p>
<h3>Meeting Space</h3>
<p>Meeting space can come from a lot of different places, but I had a bit of trouble settling on a place at first. Princeton University is an awesome place and has a ton of fantastic places to meet with people, but if you&#8217;re not living on campus (almost no students are group members, btw), parking can be a bit troublesome, and Princeton University is famous for having little or no signage, and that includes building names, so finding where to go even if you did find parking can be problematic. So, so far, the University is out.</p>
<p>The only sponsor I had that was willing to provide space was my employer, but we&#8217;re nowhere near Princeton, and don&#8217;t really have the space. Getting a sponsor for space can be a bit difficult when your group doesn&#8217;t exist yet, in part because none of them have engaged with you or your group until the first meeting, when the attendees, who all work for potential sponsors, show up.</p>
<p>I started looking at the web site for the <a href="http://www.princeton.lib.nj.us/">Princeton Public Library</a>. I&#8217;ve been involved in the local Linux user group for several years, and they use free meeting space made available by the public library in Lawrenceville, which borders Princeton. I wondered if the Princeton Public Library did this as well, but they don&#8217;t, actually. In fact, meeting space at that location can get pretty expensive, since they charge for the space and A/V equipment like projectors and stuff separately (or they did when I started the group &#8211; I believe it&#8217;s still the case).</p>
<p>I believe I tweeted my disappointment about the cost of meeting at the Princeton Public Library, and did a callout on Twitter for space sponsors and other ideas about meeting space in or near Princeton. The Princeton Public Library got in touch through their @PrincetonPL Twitter account, and we were able to work out a really awesome deal where they became a sponsor, and agreed to host our group for 6 months, free of charge. Awesome!</p>
<p>Now, six months in, we either had to come to some other agreement with the library, or move on to a new space. After six months, it&#8217;s way easier to find space, or sponsors who might provide space, but I felt if we could find some way to continue the relationship with the library, it&#8217;d be best not to relocate the group. We wound up finding a deal that does good things for the group, the library, the local Python user community, and the evangelism of the Python language&#8230;.</p>
<h3>Knowledge for Space</h3>
<p>Our group got a few volunteers together to commit to providing a 5-week training course to the public, held at the Princeton Public Library. Adding public offerings like this adds value to the library, attracts potential new members (they&#8217;re a member-supported library, not a state/municipality-funded one), etc. In exchange for providing this service to the library, the library provides us with free meeting space, including the A/V equipment.</p>
<p>If you don&#8217;t happen to have a public library that offers courses, seminars, etc., to the general public, you might be able to cut a similar deal with a local community college, or even high school. If you know of a corporation locally that uses Python or some other technology the group can speak or train people in, you might be able to trade training for meeting space in their offices. Training is a valued perk to the employees of most corporations.</p>
<h3>How To Get Talks (or &#8220;How we stopped caring about getting talks&#8221;)</h3>
<p>Whether you&#8217;re running a publishing outfit, a training event, or user group, getting people to deliver content is a challenge. Some people don&#8217;t think they have any business talking to what they perceive as a roomful of geniuses about anything. Some just aren&#8217;t comfortable talking in front of audiences, but are otherwise convinced of their own genius. Our group is trying to attack this issue in various ways, and so far it seems to be working well enough, though more ideas are welcome!</p>
<p>Basically, the group isn&#8217;t necessarily locked into traditions like &#8220;Thou shalt provide a speaker, who shalt bequeath upon our many wisdom of the ages&#8221;. Once you&#8217;ve decided as a group that having cookie-cutter meetings isn&#8217;t necessary, you start to think of all sorts of things you could all be doing together.</p>
<p>Below are some ideas, some in the works, some in planning, that I hope help other would-be group starters to get the ball rolling, and keep it in motion!</p>
<h3>Projects For the Group, By the Group</h3>
<p>Some members of PUG-IP are working together on building the pugip.org website, which is housed in a GitHub repository under the <a href="https://github.com/pugip">&#8216;pugip&#8217; GitHub organization</a>. This one project will inevitably result in all kinds of home-grown presentations &amp; events within the group. As new ideas come up and new features are implemented, people will give lightning talks about their implementation, or we&#8217;ll do a group peer review of the code, or we&#8217;ll have speakers give talks about third-party technologies we might use (so, we might have two speakers each give a 30-minute talk about two different NoSQL solutions, for example. We&#8217;ve already had a great overview of about 10 different Python micro-frameworks), etc.</p>
<p>We may also decide to break up into pairs, and then sprint together on a set of features, or a particularly large feature, or something like that.</p>
<p>As of now, we&#8217;ve made enough decisions as a group to get the ball rolling. If there&#8217;s any interest I can blog about the setup that allows the group to easily share, review, and test code, provide live demos of their work, etc. The tl;dr version is we use GitHub and free heroku accounts, but new ideas come into play all the time. Just today I was wondering if we could, as a group, make use of the cloud9 IDE (http://cloud9ide.com).</p>
<p>The website is a great idea, but other group projects are likely to come up.</p>
<h3>Community Outreach</h3>
<p>PUG-IPs first official community outreach project will be the training we provide through the Princeton Public library. A few of us will collaborate on delivering the training, but the rest of the group will be involved in providing feedback on various aspects of the material, etc., so it&#8217;s a &#8216;whole group&#8217; project, really. On top of increasing interactivity among the group members, outreach is also a great way to grow and diversify the group, and perhaps gain sponsorships as well!</p>
<p>There&#8217;s another area group called <a href="http://lugip.org">LUG-IP</a> (a Linux user group) that also does some community outreach through a hardware SIG (special interest group), certification training sessions, and participating in local computing events and conferences. I&#8217;d like to see PUG-IP do this, too, maybe in collaboration with the LUG (they&#8217;re a good and passionate group of technologists).</p>
<p>Community outreach can also mean teaming up with various other technology groups, and one event I&#8217;m really looking forward to is a RedSnake meeting to be held next February. A RedSnake meeting is a combined meeting between <a href="http://www.meetup.com/phillypug/">PhillyPUG</a> (the Philadelphia Python User Group) and <a href="http://phillyrb.org/">Philly.rb</a> (the Philadelphia Ruby Group). As a member of PhillyPUG I participated in last year&#8217;s RedSnake meeting, and it was a fantastic success. Probably 70+ people in attendance (<a href="http://twitpic.com/3xv2fi">here&#8217;s a pic</a> at the end &#8211; some had already left by the time someone snapped this), and perhaps 10 or so lightning talks given by members of both organizations. We tried to do a &#8216;matching&#8217; talk agenda at the meeting, so if someone on the Ruby side did a testing talk, we followed that with a Python testing talk, etc. It was a ton of fun, and the audience was amazing.</p>
<h3>Socials</h3>
<p>Socials don&#8217;t have to be dedicated events, per se. For example, PUG-IP has a sort of mini-social after every single meetup. We&#8217;re lucky to have our meetings located about a block away from a brewpub, so after each meeting, perhaps half of us make it over for a couple of beers and some great conversations. After a few of these socials, I started noticing that more talk proposals started to spring up.</p>
<p>Of course, socials can also be dedicated events. Maybe some day PUG-IP will&#8230;. I dunno&#8230; go bowling? Or maybe we&#8217;ll go as a group to see the next big geeky movie that comes out. Maybe we&#8217;ll have some kind of all-inclusive, bring-the-kids BBQ next summer. Who knows?</p>
<p>As a sort of sideshow event to the main LUG meetings, LUG-IP has a regularly-scheduled <a href="http://lugip.org/node/326">&#8216;coffee klatch&#8217;</a>. Some of the members meet up one Sunday per month at (if memory serves) 8-11AM at a local Panera for coffee, pastries, and geekery. It&#8217;s completely informal, but it&#8217;s a good time.</p>
<h3>Why Not Having Talks Will Help You Get Talks</h3>
<p>I have a theory that is perhaps half-proven through my experiences with technology user groups: increasing engagement among and between the members of the group in a way that doesn&#8217;t shine a huge floodlight on a single individual (like a talk would) eventually breaks down whatever fears or resistance there is to proposing and giving a talk. Sometimes it&#8217;s just a comfort level thing, and working on projects, or having a beer, or sprinting on code, etc. &#8212; together &#8212; turns a &#8220;talking in front of strangers&#8221; experience into more of a &#8220;sharing with my buddies&#8221; one.</p>
<p>I hope that&#8217;s true, anyway. It seems to be. <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Thanks For Reading</h3>
<p>I hope someone finds this useful. It&#8217;s early on in the life of PUG-IP, but I thought it would be valuable to get these ideas out into the ether early and often before they slip from my brain. Good luck with your groups!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>pyrabbit Makes Testing and Managing RabbitMQ Easy</title>
		<link>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/</link>
		<comments>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 18:05:02 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=949</guid>
		<description><![CDATA[I have a lot of hobby projects, and as a result getting any one of them to a state where I wouldn&#8217;t be completely embarrassed to share it takes forever. I started working on pyrabbit around May or June of this year, and I&#8217;m happy to say that, while it&#8217;ll never be totally &#8216;done&#8217; (it [...]]]></description>
			<content:encoded><![CDATA[<p>I have a lot of hobby projects, and as a result getting any one of them to a state where I wouldn&#8217;t be completely embarrassed to share it takes forever. I started working on pyrabbit around May or June of this year, and I&#8217;m happy to say that, while it&#8217;ll never be totally &#8216;done&#8217; (it is software, after all), it&#8217;s now in a state where I&#8217;m not embarrassed to say I wrote it.</p>
<h3>What is it?</h3>
<p>It&#8217;s a Python module to help make managing and testing RabbitMQ servers easy. RabbitMQ has, for some time, made available a RESTful interface for programmatically performing all of the operations you would otherwise perform using their browser-based management interface.</p>
<p>So, pyrabbit lets you write code to manipulate resources like vhosts &amp; exchanges, publish and get messages, set permissions, and get information on the running state of the broker instance. Note that it&#8217;s *not* suitable for writing AMQP consumer or producer applications; for that you want an *AMQP* module like <a href="http://github.com/pika/pika">pika</a>.</p>
<p>PyRabbit is tested with Python versions 2.6-3.2. The testing is automated using <a href="http://pypi.python.org/pypi/tox/1.1">tox</a>. In fact, PyRabbit was a project I started in part because I wanted to play with tox.</p>
<p>Here&#8217;s the example, ripped from the <a href="http://pyrabbit.readthedocs.org">documentation</a> (which is ripped right from my own terminal session):</p>
<pre>&gt;&gt;&gt; from pyrabbit.api import Client
&gt;&gt;&gt; cl = Client('localhost:55672', 'guest', 'guest')
&gt;&gt;&gt; cl.is_alive()
True
&gt;&gt;&gt; cl.create_vhost('example_vhost')
True
&gt;&gt;&gt; [i['name'] for i in cl.get_all_vhosts()]
[u'/', u'diabolica', u'example_vhost', u'testvhost']
&gt;&gt;&gt; cl.get_vhost_names()
[u'/', u'diabolica', u'example_vhost', u'testvhost']
&gt;&gt;&gt; cl.set_vhost_permissions('example_vhost', 'guest', '.*', '.*', '.*')
True
&gt;&gt;&gt; cl.create_exchange('example_vhost', 'example_exchange', 'direct')
True
&gt;&gt;&gt; cl.get_exchange('example_vhost', 'example_exchange')
{u'name': u'example_exchange', u'durable': True, u'vhost': u'example_vhost', u'internal': False, u'arguments': {}, u'type': u'direct', u'auto_delete': False}
&gt;&gt;&gt; cl.create_queue('example_queue', 'example_vhost')
True
&gt;&gt;&gt; cl.create_binding('example_vhost', 'example_exchange', 'example_queue', 'my.rtkey')
True
&gt;&gt;&gt; cl.publish('example_vhost', 'example_exchange', 'my.rtkey', 'example message payload')
True
&gt;&gt;&gt; cl.get_messages('example_vhost', 'example_queue')
[{u'payload': u'example message payload', u'exchange': u'example_exchange', u'routing_key': u'my.rtkey', u'payload_bytes': 23, u'message_count': 2, u'payload_encoding': u'string', u'redelivered': False, u'properties': []}]
&gt;&gt;&gt; cl.delete_vhost('example_vhost')
True
&gt;&gt;&gt; [i['name'] for i in cl.get_all_vhosts()]
[u'/', u'diabolica', u'testvhost']</pre>
<p>Hopefully you&#8217;ll agree that this is simple enough to use in a Python interpreter to get information and do things with RabbitMQ &#8216;on the fly&#8217;.</p>
<h3>How Can I Get It?</h3>
<p>Well, there&#8217;s already a package on PyPI called &#8216;pyrabbit&#8217;, and it&#8217;s not mine. It&#8217;s some planning-stage project that has no actual software associated with it. I&#8217;m not sure when the project was created, but the PyPI page has a broken home page link, and what looks like a broken RST-formatted doc section. I&#8217;ve already pinged someone to see if it&#8217;s possible to take over the name, because I can&#8217;t think of a cool name to change it to.</p>
<p>Until that issue is cleared up, you can get downloadable packages or clone/fork the code at the <a href="http://github.com/bkjones/pyrabbit">pyrabbit github page</a> (see the &#8216;Tags&#8217; section for downloads), and the <a href="http://pyrabbit.readthedocs.org">documentation</a> is hosted on the (awesome) ReadTheDocs.org site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thoughts on Python and Python Cookbook Recipes to Whet Your Appetite</title>
		<link>http://www.protocolostomy.com/2011/06/09/thoughts-on-python-and-python-cookbook-recipes-to-whet-your-appetite/</link>
		<comments>http://www.protocolostomy.com/2011/06/09/thoughts-on-python-and-python-cookbook-recipes-to-whet-your-appetite/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 03:33:42 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=934</guid>
		<description><![CDATA[Dave Beazley and myself are, at this point, waist deep into producing Python Cookbook 3rd Edition. We haven&#8217;t really taken the approach of going chapter by chapter, in order. Rather, we&#8217;ve hopped around to tackle chapters one or the other finds interesting or in-line with what either of us happens to be working with a [...]]]></description>
			<content:encoded><![CDATA[<p>Dave Beazley and myself are, at this point, waist deep into producing Python Cookbook 3rd Edition. We haven&#8217;t really taken the approach of going chapter by chapter, in order. Rather, we&#8217;ve hopped around to tackle chapters one or the other finds interesting or in-line with what either of us happens to be working with a lot currently.</p>
<p>For me, it&#8217;s testing (chapter 8, for those following along with the 2nd edition), and for Dave, well, I secretly think Dave touches every aspect of Python at least every two weeks whether he needs to or not. He&#8217;s just diabolical that way. He&#8217;s working on processes and threads at the moment, though (chapter 9 as luck would have it).</p>
<p>In both chapters (also a complete coincidence), we&#8217;ve decided to toss every scrap of content and start from scratch.</p>
<h2>Why on Earth Would You Do That?</h2>
<p>Consider this: when the last edition (2nd ed) of the Python Cookbook was released, it went up to Python 2.4. Here&#8217;s a woefully incomplete list of the superamazing awesomeness that didn&#8217;t even exist when the 2nd Edition was released:</p>
<ul>
<li>Modules:
<ul>
<li>ElementTree</li>
<li>ctypes</li>
<li>sqlite3</li>
<li>functools</li>
<li>cProfile</li>
<li>spwd</li>
<li>uuid</li>
<li>hashlib</li>
<li>wsgiref</li>
<li>json</li>
<li>multiprocessing</li>
<li>fractions</li>
<li>plistlib</li>
<li>argparse</li>
<li>importlib</li>
<li>sysconfig</li>
</ul>
</li>
<li>Other Stuff
<ul>
<li>The &#8216;with&#8217; statement and context managers*</li>
<li>The &#8216;any&#8217; and &#8216;all&#8217; built-in functions</li>
<li>collections.defaultdict</li>
<li>advanced string formatting (the &#8216;format()&#8217; method)</li>
<li>class decorators</li>
<li>collections.OrderedDict</li>
<li>collections.Counter</li>
<li>collections.namedtuple()</li>
<li>the ability to send data *into* a generator (yield as an expression)</li>
<li>heapq.merge()</li>
<li>itertools.combinations</li>
<li>itertools.permutations</li>
<li>operator.methodcaller()</li>
</ul>
</li>
</ul>
<p>* If memory serves, the &#8216;with&#8217; statement was available in 2.4 via future import.</p>
<p>Again, woefully incomplete, and that&#8217;s only the stuff that&#8217;s in the 2.x version! I don&#8217;t even mention 3.x-only things like concurrent.futures. From this list alone, though, you can probably discern that the way we think about solving problems in Python, and what our code looks like these days, is fundamentally altered forever in comparison to the 2.4 days.</p>
<p>To give a little more perspective: Python core development moved from CVS to Subversion well after the 2nd edition of the book hit the shelves. They&#8217;re now on Mercurial. We skipped the entire Subversion era of Python development.</p>
<p>The addition of any() and all() to the language by themselves made at least 3-4 recipes in chapter 1 (strings) one-liners. I had to throw at least one recipe away because people just don&#8217;t need three recipes on how to use any() and all(). The idea that you have a chapter covering processes and threads without a multiprocessing module is just weird to think about these days. The with statement, context managers, class decorators, and enhanced generators have fundamentally changed how we think about certain operations.</p>
<p>Also something to consider: I haven&#8217;t mentioned a single third-party module! Mock, tox, and nosetests all support Python 3. At least Mock and tox didn&#8217;t exist in the old days (I don&#8217;t know about nose off-hand). Virtualenv and pip didn&#8217;t exist (both also support Python 3). So, not only has our <em>code</em> changed, but <em>how</em> we code, test, deploy, and generally do our jobs with Python has also changed.</p>
<p>Event-based frameworks aside from Twisted are not covered in the 2nd edition if they existed at all, and Twisted does not support Python 3.</p>
<p>WSGI, and all it brought with it, did not exist to my knowledge in the 2.4 days.</p>
<p>We need a <a href="http://www.beloit.edu/mindset/">Mindset List</a> for Python programmers!</p>
<h2>So, What&#8217;s Your Point</h2>
<p>My point is that I suspect some people have been put off of submitting Python 3 recipes, because they don&#8217;t program in Python 3, and if you&#8217;re one of them, you need to know that there&#8217;s a lot of ground to cover between the 2nd and 3rd editions of the book. If you have a recipe that happens to be written in Python 2.6 using features of the language that didn&#8217;t exist in Python 2.4, submit it. You don&#8217;t even have to port it to Python 3 if you don&#8217;t want to or don&#8217;t have the time or aren&#8217;t interested or whatever.</p>
<h2>Are You Desperate for Recipes or Something?</h2>
<p>Well, not really. I mean, if you all want to wait around while Dave and I crank out recipe after recipe, the book will still kick ass, but it&#8217;ll take longer, and the book&#8217;s world view will be pretty much limited to how Dave and I see things. I think everyone loses if that&#8217;s the case. Having been an editor of a couple of different technical publications, I can say that my two favorite things about tech magazines are A) The timeliness of the articles (if Python Magazine were still around, we would&#8217;ve covered tox by now), and B) The broad perspective it offers by harvesting the wisdom and experiences of a vast sea of craftspeople.</p>
<h2>What Other Areas Are In Need?</h2>
<p>Network programming and system administration. For whatever reason, the 2nd edition&#8217;s view of system administration is stuff like checking your Windows sound system and spawning an editor from a script. I guess you can argue that these are tasks for a sysadmin, but it&#8217;s just not the meat of what sysadmins do for a living. I&#8217;ll admit to being frustrated by this because I spent some time searching around for Python 3-compatible modules for SNMP and LDAP and came up dry, but there&#8217;s still all of that sar data sitting around that nobody ever seems to use and is amazing, and is easy to parse with Python. There are also terminal logging scripts that would be good.</p>
<p>Web programming and fat client GUIs also need some love. The GUI recipes that don&#8217;t use tkinter mostly use wxPython, which isn&#8217;t Python 3-compatible. Web programming is CGI in the 2nd edition, along with RSS feed aggregation, Nevow, etc. I&#8217;d love to see someone write a stdlib-only recipe for posting an image to a web server, and then maybe more than one recipe on how to easily implement a server that accepts them.</p>
<p>Obviously, any recipes that solve a problem that others are likely to have that use any of the aforementioned modules &amp; stuff that didn&#8217;t exist in the last edition would really rock.</p>
<h2>How Do I Submit?</h2>
<ol>
<li>Post the code and an explanation of the problem it solves somewhere on the internet, or send it (or a link to it) via email to PythonCookbook@oreilly.com or to @bkjones on Twitter.</li>
<li>That&#8217;s it.</li>
</ol>
<p>We&#8217;ll take care of the rest. &#8220;The rest&#8221; is basically us pinging O&#8217;Reilly, who will contact you to sign something that says it&#8217;s cool if we use your code in the book. You&#8217;ll be listed in the credits for that recipe, following the same pattern as previous editions. If it goes in relatively untouched, you&#8217;ll be the only name in the credits (also following the pattern of previous editions).</p>
<h2>What Makes a Good Recipe?</h2>
<p>A perfect recipe that is almost sure to make it into the cookbook would ideally meet most of the criteria set out in my <a href="http://www.protocolostomy.com/2010/12/20/the-makings-of-a-great-python-cookbook-recipe/">earlier blog post on that very topic</a>. Keep in mind that the ability to illustrate a language feature in code takes precedence over the eloquence of any surrounding prose.</p>
<h2>What If&#8230;</h2>
<p>I sort of doubt this will come up, but if we&#8217;ve already covered whatever is in your recipe, we&#8217;ll weigh that out based on the merits of the recipes. I want to say we&#8217;ll give new authors an edge in the decision, but for an authoritative work, a meritocracy seems the only valid methodology.</p>
<p>If you think you&#8217;re not a good writer, then write the code, and a 2-line description of the problem it solves, and a 2-line description of how it works. We&#8217;ll flesh out the text if need be.</p>
<p>If you just can&#8217;t think of a good recipe, grep your code tree(s) for just the import statements, and look for ideas by answering questions on Stackoverflow or the various mailing lists.</p>
<p>If you think whatever you&#8217;re doing with the language isn&#8217;t very cool, then stop thinking that a cookbook is about being cool. It&#8217;s about being practical, and showing programmers possibly less senior than yourself an approach to a problem that isn&#8217;t completely insane or covered in warts, even if the problem is relatively simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/06/09/thoughts-on-python-and-python-cookbook-recipes-to-whet-your-appetite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slides, an App, a Meetup, and More On the Way</title>
		<link>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/</link>
		<comments>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 03:27:44 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Me stuff]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=922</guid>
		<description><![CDATA[I&#8217;ve been busy. Seriously. Here&#8217;s a short dump of what I&#8217;ve been up to with links and stuff. Hopefully it&#8217;ll do until I can get back to my regular blogging routine. PICC &#8217;11 Slides Posted I gave a Python talk at PICC &#8217;11. If you were there, then you have a suboptimal version of the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been busy. Seriously. Here&#8217;s a short dump of what I&#8217;ve been up to with links and stuff. Hopefully it&#8217;ll do until I can get back to my regular blogging routine.</p>
<h2>PICC &#8217;11 Slides Posted</h2>
<p>I gave a Python talk at PICC &#8217;11. If you were there, then you have a suboptimal version of the slides, both because I caught a few bugs, and also because they&#8217;re in a flattened, lifeless PDF file, which sort of mangles anything even slightly fancy. I&#8217;m not sure how much value you&#8217;ll get out of these because my presentation slides tend to present code that I then explain, and you won&#8217;t have the explanation, but people are asking, <a href="http://public.iwork.com/document/?d=PythonPICC11.key&amp;a=p55961227">so here they are in all their glory</a>. Enjoy!</p>
<h2>I Made a Webapp Designed To Fail</h2>
<p>No really, I did. <a href="http://webstatuscodes.appspot.com" target="_blank">WebStatusCodes</a> is the product of necessity. I&#8217;m writing a Python module that provides an easy way for people to talk to a web API. I test my code, and for some of the tests I want to make sure my code reacts properly to certain HTTP errors (or in some cases, to *any* HTTP status code that&#8217;s not 200). In unit tests this isn&#8217;t hard, but when you&#8217;re starting to test the network layers and beyond, you need something on the network to provide the errors. That&#8217;s what <a href="http://webstatuscodes.appspot.com" target="_blank">WebStatusCodes</a> does. It&#8217;s also a simple-but-handy reference for HTTP status codes, though it is incomplete (418 I&#8217;m a teapot is not supported). Still, worth checking out.</p>
<p>Interesting to note, this is my first AppEngine application, and I believe it took me 20 minutes to download the SDK, get something working, and get it deployed. It was like one of those &#8216;build a blog in -15 minutes&#8217; moments. Empowering the speed at which you can create things on AppEngine, though I&#8217;d be slow to consider it for anything much more complex.</p>
<h2>Systems and Devops People, Hack With Me!</h2>
<p>I like systems-land, and a while back I was stuck writing some reporting code, which I really don&#8217;t like, so I started a side project to see just how much cool stuff I could do using the /proc filesystem and nothing but pure Python. I didn&#8217;t get too far because the reporting project ended and I jumped back into all kinds of other goodness, but there&#8217;s a <a href="http://github.com/bkjones/pyproc" target="_blank">github project called pyproc</a> that&#8217;s just a single file with a few functions in it right now, and I&#8217;d like to see it grow, so fork it and send me pull requests. If you know Linux systems pretty well but are relatively new to Python, I&#8217;ll lend you a hand where I can, though time will be a little limited until the book is done (see further down).</p>
<p>The other projects I&#8217;m working on are sort of in pursuit of larger fish in the Devops waters, too, so be sure to check out the other projects I mention later in this post, and <a href="https://github.com/bkjones/" target="_blank">follow me on github</a>.</p>
<h2>Python Meetup Group in Princeton NJ</h2>
<p>I started a <a href="http://meetup.com/pug-ip" target="_blank">Meetup group for Pythonistas that probably work in NYC or PA, but live in NJ</a>. I work in PA, and before this group existed, the closest group was in Philly, an hour from home. I put my feelers out on Twitter, found some interest, put up a quick Meetup site, and we had 13 people at the first meetup (more than had RSVP&#8217;d). It&#8217;s a great group of folks, but more is always better, so check it out if you&#8217;re in the area. We hold meetings at the beautiful <a href="http://www.princeton.lib.nj.us/" target="_blank">Princeton Public Library </a>(who <a href="http://twitter.com/pugip" target="_blank">found us</a> <a href="http://twitter.com/princetonpl" target="_blank">on twitter</a> and now sponsors the group!), which is just a block or so from Triumph, the local microbrewery. I&#8217;m hoping to have a post-meeting impromptu happy hour there at some point.</p>
<h2>Python Cookbook Progress</h2>
<p>The Python Cookbook continues its march toward production. Lots of work has been done, lots of lessons have been learned, lots of teeth have been gnashed. The book is gonna rock, though. I had the great pleasure of porting all of the existing recipes that are likely to be kept over to Python 3. Great fun. It&#8217;s really amazing to see just how it happens that a 20-line recipe is completely obviated by the addition of a single, simple language feature. It&#8217;s happened in almost every chapter I&#8217;ve looked at so far.</p>
<p>If you have a recipe, or stumble upon a good example of some language feature, module, or other useful tidbit, whether it runs in Python 3 or not, let me know (see &#8216;Contact Me&#8217;). The book is 100% Python 3, but I&#8217;ve gotten fairly adept at porting things over by now <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Send me your links, your code, or whatever. If we use the recipe, the author will be credited in the book, of course.</p>
<h2>PyRabbit is Coming</h2>
<p>In the next few days I&#8217;ll be releasing a Python module on github that will let you easily work with RabbitMQ servers using that product&#8217;s HTTP management API. It&#8217;s not nearly complete, which is why I&#8217;m releasing it. It does some cool stuff already, but I need another helper or two to add new features and help do some research into how RabbitMQ broker configuration affects JSON responses from the API.<a href="https://github.com/bkjones" target="_blank"> Follow me on github</a> if you want to be the first to know when I get it released. You probably also want to <a href="https://github.com/myyearbook" target="_blank">follow myYearbook on github</a> since that&#8217;s where I work, and I might release it through the myYearbook github organization (where we also release lots of other cool open source stuff).</p>
<h2>Python Asynchronous AMQP Consumer Module</h2>
<p>I&#8217;m also about 1/3 of the way through a project that lets you write AMQP consumers using the same basic model as you&#8217;d write a Tornado application: write your handler, import the server, link the two (like, one line of code), and call consume(). In fact, it uses the Tornado IOLoop, as well as <a href="https://github.com/pika/pika" target="_blank">Pika</a>, which is an asynchronous AMQP module in Python (maintained by none other than <a href="https://github.com/gmr" target="_blank">my boss</a> and myYearbook CTO,  <a href="http://twitter.com/#!/crad" target="_blank">@crad</a>), which also happens to support the Tornado IOLoop directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8216;Grokking Python&#8217; Going to PICC Conference!</title>
		<link>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/</link>
		<comments>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 01:45:43 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=915</guid>
		<description><![CDATA[In conjunction with my involvement as co-author of the upcoming Python Cookbook, 3rd Ed. (not yet released), a tutorial at this year&#8217;s PyCon in Atlanta, an internal (and ongoing) lunchtime seminar series entitled &#8216;Snakes On a Plate&#8217;, and other recent Python-related projects, I&#8217;ve also been refining and revising what I can now call a completely [...]]]></description>
			<content:encoded><![CDATA[<p>In conjunction with my involvement as co-author of the <a href="http://www.protocolostomy.com/2010/12/16/good-things-come-in-threes-python-cookbook-third-edition/">upcoming Python Cookbook, 3rd Ed.</a> (not yet released), a <a href="http://us.pycon.org/2011/schedule/presentations/274/">tutorial at this year&#8217;s PyCon</a> in Atlanta, an internal (and ongoing) lunchtime seminar series entitled &#8216;Snakes On a Plate&#8217;, and other <a href="http://www.protocolostomy.com/2011/02/25/lessons-learned-porting-dateutil-to-python-3/">recent Python-related projects</a>, I&#8217;ve also been refining and revising what I can now call a completely awesome 3-hour introduction to the Python programming language.</p>
<p>If you&#8217;re a sysadmin, operations engineer, devops engineer, or just want to get your hands dirty with Python, I can&#8217;t think of a better more cost-effective way to do it than to attend the <a href="http://www.picconf.org/training-program#f2">&#8216;Grokking Python&#8217; tutorial</a> at this year&#8217;s <a href="http://picconf.org">PICC conference</a>, which is being held in New Brunswick, NJ, April 29-30.</p>
<p>While I do plan for the tutorial to run through the basics, I also assume attendees have programmed in some other language before. In addition, I firmly believe that, properly presented, most would find that Python is a very simple language to get to know and understand. That being the case, the most basic elements of the language (control statements, loops, etc) will be covered in the first hour (and the materials will be available for later reference).</p>
<p>Once we&#8217;re through that, it&#8217;s head first into what admin/ops engineers do for a living. Python was developed by a systems programmer for systems programming. As such, support for a huge swath of admin tasks (and far, far beyond) is baked into the language, and enormous tomes have been written covering third party tools and modules to do anything else you can possibly imagine.</p>
<p>We&#8217;re going to look at some of the more ho-hum parts of scripting, like accepting input from users, command line options and arguments, and file handling, but before it&#8217;s over we&#8217;re going to have a look at the basics of email, networking, multiprocessing, threading, coroutines, SSH, and more.</p>
<p>We&#8217;re also going to cover use of the Python interactive shell, which will not only help speed your mastery of the language and its standard library, but also holds promise as a sysadmin tool in its own right.</p>
<p>The blowing of minds is a goal of the tutorial. Bring a laptop, and bring some bandages <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

