Archive

Author Archive

One Honking Great Idea

June 8th, 2010

I really enjoyed From Python Import Podcast’s two-parter on the Zen of Python, but I’ve been thinking that they may have missed something really interesting in the last item in the Zen:

Namespaces are one honking great idea — let’s do more of those!

For a long time, I had largely overlooked this one myself, because on its face it seems frivolous and perhaps too specific. Up to that point, the Zen is all broad strokes and elegant generalizations, and suddenly BAM! here comes this thing about namespaces that’s full of colloquialisms and exclamation points, and it feels very tacked on and strange and arbitrary, like a sort of gangly teenager trying to fit into a more mature crowd.

Naturally, the conversation in the podcast went straight down the nerd rabbit hole to talk about the meaning of namespaces, and completely neglected the real meat here, which is a pity because this might actually be one of the most important aspects of the Zen.

This is an expression of the enthusiasm and joy that pervade the Python community.

This is Python’s “Get Excited and Make Things.” This is a formal declaration that it’s all right to get excited about stuff that we make. This is a mission statement to go forth and create new delights, so that those who encounter them may be similarly inspired. That above all, this stuff should be fun.

Think about that the next time you’re crafting some Python code and see if it doesn’t change how you approach things.

python, thoughts , ,

1000 Days of Claire

June 7th, 2010

It’s almost impossible for me to believe, but Claire’s now one thousand days old.

In that time, she’s transformed our lives in countless ways, amazed us at every turn, and given me a whole new perspective on the world. It’s been simply astounding to watch her develop into her own beautiful little person, by turns loving, funny, and fierce.

When she first arrived and became our focus, the most important rule we had was that any day that ends with all of us still alive was a victory.

So here’s to a thousand consecutive victories… and hopefully many, many more to come.

children, claire, life

Freeform Night at Clepy and the Ghost of Gary Bernhardt

April 13th, 2010

April’s Clepy meeting saw a much smaller than usual crowd, and a much more casual program–everyone who’d been lined up to give talks had had to bail at the last minute. So instead of covering anything formally, we spent a relaxing two hours enjoying beer, pizza, and various freeform, impromptu lightning talks. You couldn’t even really call them lightning talks since we had no time limit, just an unspoken gentlemen’s agreement to yield the projector cable when the time was appropriate.

Steve Dee showed off his CWRU senior project, jsPrettify, a bit of Javascript tomfoolery to automatically turn ASCII sequences into appropriate (and arguably prettier) Unicode equivalents. We also had a nice chat about the Closure Javascript tools that Steve had been introduced to while interning at Google. (Some aspects, like the provide/require system, remind me a lot of Dojo, and while it seems intriguing, reading some other opinions has me back in the skeptical category.)

Mike Crute showed us his not-yet-ready-to-release tool for automating provisioning and deployment of VPS nodes and the apps they serve, which seems like a really slick way to react to traffic needs (consolidate apps onto fewer boxes during low traffic periods, rearrange on the fly if someone’s site is spiking). He also showed off something else that I mostly missed, so the Python code we glimpsed (featuring a lone “Oh, my…” comment to apologize for the 100-line method that was about to commence) didn’t really mean a lot to me.

We had a brief glimpse of Mike’s desktop wallpaper (a demotivational poster featuring a stern-looking John McCarthy) which inspired me to create this little gem (sorry in advance, Gary!):

gary-bernhardt-as-john-mccarthy-programming-completely-wrong.jpg

Nick Barendt gave a quick introduction to Buildbot while I VPNed into work to prep my own demo of Das Blinkenlights, my little AIR app for monitoring the current build status of our various build slaves at work. The Python code to emit the JSON feed that Das Blinkenlights consumes hasn’t yet been released to the public, but I have permission from the Powers That Be to do so, so I should get around to it before too long. (Beware my extremely unfinished and gross Javascript code in Blinkenlights–it’s still in very rough shape at this point).

We had a new member tonight who was interested in applying Python for developing web apps, so we may try to pull together a “web framework shootout” for next month, which I envision as four or five different presenters simultaneously live coding the same basic web app (probably a wiki, blog, or to-do list) using different toolkits. We’ll need to see about some cabling and KVMs, I think, so that we can rapidly switch back and forth between presenters. More details to follow, I’m sure…

If you’re in Northeast Ohio and want to hang out with smart, friendly people who like Python, come on down! Meetings are held on the second Monday of the month aboard LeanDog’s awesome boat, and we have an official pizza and beer fund going to supply us with tasty treats. It’s a good time that I highly recommend.

clepy, humor, photoshop, python , , , , , , , , , , ,

Configuring Wordpress SSL Login and Admin on Webfaction

April 11th, 2010

A60AE7D1-B100-458F-9DB9-D69304274AF0.jpg

I finally got fed up with not having SSL for my Wordpress instance on Webfaction and decided to rectify it today. I ran into a couple of surprises along the way that were really irritating, so once I sorted them out I figured I owed the internet an explanation so that things would be easier for anyone else wanting to do the same thing.

Assumptions

I’m going to assume that you already have a Webfaction account with a Wordpress instance running on it. If not, the control panel screencast is an oldie-but-goodie that’ll get you started. I’m also going to assume that you’re on one of the basic, shared hosting plans, and that you’ll be running your secure stuff on the same box as your non-secure site. And I’m also assuming that you’ll be okay using Webfaction’s default SSL certificate rather than your own–this will throw warnings in many browsers, but saves you the cost of purchasing your own cert and the time required to request a private IP from Webfaction. And this only applies to Wordpress 2.6 and above. (You really should upgrade, you know.)

Create a secure site

In the Webfaction world, a single “site” can only be non-secure or secure, so you need to create a new site that will largely mirror your existing, non-secure site. To do this:

  1. Log into the Webfaction control panel.
  2. From the Domains/websites menu, pick Websites.
  3. Click the little green + icon at the bottom-right of the websites panel to begin creating a new site.
  4. Give your new site a meaningful name (I like it to be the same as the non-secure site, but with “_secure” or something similar tacked onto the end).
  5. Choose the same IP as the non-secure site that you’re adding SSL to. Unless you are fancy enough to have multiple IPs, this shouldn’t really be a choice at all.
  6. Check the HTTPS checkbox. (This is important.)
  7. Choose the same subdomains as the non-secure site that you’re adding SSL to–so if your site is at http://www.yoursite.com, you might want to make sure that you select yoursite.com and www.yoursite.com subdomains so that both will be connected to this configuration.
  8. In the Site apps section, add your existing Wordpress instance with the same URL path that it has in your non-secure site. If you’ve got an app called my_blog at /blog, make sure you do the same thing here.
  9. Click Create.

Fix your Wordpress URL configuration

If you visit your blog now (in non-secure/http mode), depending on your browser, you might see a complete and total failure to load your stylesheets–meaning that your site is now probably fairly ugly. If you view source, you’ll see that, even though you aren’t loading your page from over HTTPS, Wordpress is generating HTTPS links for all your content–stylesheets, images, everything.

To fix this:

  1. Log into your Wordpress instance and go into the Dashboard.
  2. Go to the General Settings page.
  3. Change the WordPress address (URL) and Blog address (URL) fields to begin with http instead of https.
  4. Don’t forget to Save Changes.

Now try your site on its non-secure/http link. When you view source, all your resources should be coming from URLs that start with http.

Update your wp-config.php

Edit your wp-config.php. Depending on what you want to do, you’ll add one or the other of the following two lines.

To require only login to be secured:

define('FORCE_SSL_LOGIN', true);

To require login and admin pages (my preference) to be secured:

define('FORCE_SSL_ADMIN', true);

Profit!

Log out of your Wordpress instance, then hit your login link. You should now see that your login and registration pages are served up via https links. If you chose to use FORCE_SSL_ADMIN, you should also see https in all of the URLs as you navigate around your Wordpress admin area.

Things should be hunky-dory now. I hope it worked out all right for you!

geekery, howto, wordpress , ,

Blam! Pow! Comic Books!

April 11th, 2010

I’ve really gotten into comics again since my daughter was born; I can easily fit a few issues or maybe a trade paperback into one of her naps. And there’s not the same level of commitment necessary with comics that there is for Serious Literature–you can generally get a sense of whether or not something’s going to suck within an issue or two, rather than having to slog miserably through someone’s thick prose while you wait for it to get good. I find that I’ve lost such track of what’s on bookstore shelves that I don’t want to take the same kinds of risks with books (expensive! time consuming! with misleading marketing!) that I can take with comics.

To give myself an excuse to blog more often, I’m going to start sharing some quick notes, on a weekly basis, about anything noteworthy or interesting that I’ve picked up. Here are my highlights from last week…

  • 394274E2-7EED-4C51-B451-575739472124.jpg

    The Weird World of Jack Staff: #2

    Issue two takes us deeper into the mystery of Jack Staff (Britain’s greatest hero), his history, and apparent amnesia. The art’s breezy and fun, and with a revolving cast of novel and cleverly-named superheroes, I’m getting a bit of a Venture Brothers vibe, though with less acidity than VB. I’m really looking forward to more.


  • 7A2BFB1C-E3FA-4C8D-B810-A568CA5FF705.jpg

    King City: #7

    One of the weirdest but best things I’ve read, King City seems like what would happen if Möbius and Phil Foglio made Transmetropolitan. Joe uses his skills as a cat master (with the right injections, a cat can put Batman’s utility belt to shame) to pull off bizarre heists in a run-down cyberpunk metropolis. It’s cheeky, though with heart, and full of fabulous little details that have me scouring every panel for hidden jokes.


  • 2D0A1E4A-9A89-469E-81A7-D60756AEF55A.jpg

    Electric Ant: #1

    In this adaptation of the Philip K. Dick story, Garson Poole has a great life until he discovers that he’s artificial. Thus begins the inevitable slide into trademark paranoia and unease as Garson seeks his true function and the identity of his owner/creator. If you like Blade Runner or any of Dick’s other stories about identity, this is worth picking up.


  • FA757E1E-9C4E-4C82-9BAA-03EE21829030.jpg

    Turf: #1

    In my opinion, the first issue of Turf is the big winner this week. I saved it for last (a cherished spot in the weekly comics reading order) and was well-rewarded by the choice. It’s 1929. Powerful mobs rule New York, while corrupt police help keep the system in place. A noir tough guy and a scrappy young reporter are about to be caught up in a major power struggle as a family of eastern European immigrants makes a play against a mafia don. It could be a typical crime novel… except that the immigrant gang are vampires. And a spaceship crashes.

    Okay, so the concept may be a little goofy, but the art and writing take it so seriously that what might have been a campy misfire is instead a mature, gritty thriller. I can’t wait for more!

comic-books, comics , , , ,

Exceptions, Error Recovery, and Man Purses

March 31st, 2010

My friend and coworker Aaron Oliver has had a lightbulb moment about exceptions, error recovery, and man purses that Python folks might be interested in reading.

python

Ten Years

March 9th, 2010

Today (technically yesterday at this point, I suppose) was my ten year anniversary at AG Interactive.

I’m frankly astounded that it’s been so long, so soon.

Once upon a time, there was a 23-year-old version of me, leaving behind the miseries of being an IBM road warrior to sling code for an internet startup with its sights set on an IPO, where lunches were free and the foosball was fast and furious. I was psyched to be able to see both my fianceé and the inside of my apartment on a daily basis. I was a Perl zealot, but willing and curious to learn Python (in spite of my perception that it Just Wasn’t That Great).

Since then I’ve fallen out of love with Perl (she was nuts, man!) and found that Python might in fact be my soul mate of programming languages. We didn’t IPO, the free lunches have long since passed, and I don’t play nearly as much foosball as I used to, but the culture’s still a lot of fun. (At the very least, daily finger missile battles keep us on our toes!) The apartment has been upgraded to a house, the fianceé to wife (that’s another ten year anniversary coming up soon!), and we’ve added cats and a kid to the domestic mix.

All in all, it’s been a decent ten years. I just can’t believe they happened so fast!

python, work

“Teach Me Dependency Injection” at Clepy

March 8th, 2010

The stars finally aligned in a configuration that allowed me to return to Clepy, our local Python group. It was really nice to see some folks that I hadn’t in forever, including some long-lost ex-AGI people that I hadn’t caught up with in what seemed like forever.

We did tonight’s meeting in the “Teach Me X” format made popular by Steve Holden’s “Teach Me Twisted” open space at Pycon 2009. One of our newer compatriots, Chris Miller, had been hearing a lot of buzz about dependency injection and wanted a deeper exposure to it, so he played the questioner while David Stanek played ringleader to the group discussion. The format was a lot of fun, and a good way to engage the group without having a more straightforward and less-interactive “eyes-forward” Powerpoint extravaganza of death, though the conversation did seem to be dominated by a few voices that had had the most experience with DI in their professional lives. But overall it was good, and I think that at least a few people had lightbulb moments, and I suspect that even us seasoned DI nerds achieved some insights into the subject as well.

I’m eager to try out the “Teach Me…” format at work, where I’ve got some peer education to-dos that I’ve been struggling to figure out how to structure without causing roomfuls of eyes to glaze over.

In other news, Cleveland Give Camp is coming up in July, and they’re eager for all types of participation–so whether you want to help organize the event or want to participate (they’re particularly seeking code-slingers and graphic designers), this looks like a great opportunity to Do Some Good.

Clepy are a nice bunch of smart folks; meetings are held on the second Monday of the month aboard LeanDog’s awesome boat. And now we have an official pizza and beer fund, so we can enjoy a bit of a treat whilst geeking about. If you’re in Cleveland and are interested in Python, it’s definitely worth joining in. I certainly hope to make it a regular part of my extracurricular life again.

clepy, python

What’s That Awful Buzzing Sound?

February 18th, 2010

This is an experiment to see if Google Buzz (in its infinite wisdom) will stop posting my last blog entry every three hours if I give it something new to chew on, or if I will just have to have a Very Serious Conversation with it or any Google folk who cross my path in the coming days.

*stern look*

rants

Tweeted on 2009-12-08

December 8th, 2009
  • @benjaminws Beer outside at your house, you say? Let me come over and, uh, make sure nothing happens to it. in reply to benjaminws #
  • Ordered my Christmas cards from Photoworks.com; hooray for checking off one more to-do. #
  • Flipping all the lightswitches in the house back the way I like them. #
  • Tonight's new phobia brought to you by the spider hiding under the cat box liner bag. #

Powered by Twitter Tools

twitter