Archive for May, 2008

NYT Talks about xkcd, python gets a plug.

26.05.2008 12:11

posted by: Benjamin Smith

Posted Under: , , , ,

Great article about xkcd. Python gets a plug in the article as well. This kind of reading on a popular news site warms my heart.

Take a look

0 comments | 0 pingbacks

Ouch thats smarts

25.05.2008 14:30

posted by: Benjamin Smith

Posted Under: , ,

So I had a dialog with my buddy via text message last night in which I learned that he was visiting a bar that is notorious for frat-boy like rowdiness, cheap beer and loose women. I proceeded to send him a message that just read “FAIL” to show my disappointment in his choice. This morning I finally get a response that reads “You have no idea how much I fail. I’ll be by in a bit to show you.” So he shows up and I am greeted with this:

Ouch

I found out that he didn’t get into a fight, or anything of the sort. He just had an off night.

Moral of the story? Don’t get drunk and fall into a wall.

0 comments | 0 pingbacks

Anyone heard of or used this software? - Bcfg2

22.05.2008 20:47

posted by: Benjamin Smith

Posted Under: , ,

I just stumbled onto this promising looking software. We use an awesome distributed configuration engine at the office with similar ideals. Outside of cfengine I really didn’t know anything else existed, and this one is written in python! Let me know if you’ve worked with it, I would love to hear some opinions.

Thanks!

1 comment | 0 pingbacks
Posted Under: , , , , ,

This weekend was great! Saturday we had a big party for our son Daniel, he just turned 10. Six more years till I have my own personal errand runner, woo! He had all of his friends and all of our friends over for a big bash. I don’t think I’ve ever grilled that many hotdogs and hamburgers.

Dan got tons of cool presents but the coolest, of course, was from me. I took him to west side skate shop and told him to pick all his parts. He ended up with a sweet deck. Here’s the specs:

Darkstar Armor Light deck

Destructo Trucks

Spitfire Wheels

I, am the coolest dad evar. You can’t deny this.

So after the children all left, we started a fire in my brand spanking new outdoor fireplace that I installed earlier in the day. We chilled out, had some drinks around the fire while some geeked out to super smash brothers brawl. Phenomenal.

We lounged around Sunday morning, and then repeated the fireplace goodness in the evening. This gets me to my first subject… Taco Bell is like a drug because after a couple drinks, you are jonesing for that beefy, melty, goodness. Once you consume it, you feel better for a while. The next morning, however, you regret every bite and wish you could take it all back.

I didn’t really do much in the way of geekyness this weekend, aside from the normal bug hunts. I did, however, watch the Neverending Story (one of my all time favs). Oh, on the subject of movies, I also watched Gone Baby Gone. Great flick! If you get a chance to sit down and watch it, you wont be disappointed.

I also woke to an activation email from Google for my GAE account which I am totally excited to play with.

That’s my weekend in a nutshell.

0 comments | 0 pingbacks
Posted Under: , ,

So, I became curious about the performance of my site. This happened mainly because I hadn’t see the nice increase in performance from lighty I had hoped for. So I whipped up a matching apache config did a couple of quick ab tests.

You can see the results here:
Apache
Lighttpd

I know ab tests are not the end-all be-all of performance benchmarking, but I’m kinda disappointed.. I’ll go into more detail when it’s not one in the morning and I have to work. At that time I’ll also pose some alternative configurations. I’d like to see what I can get out of lighty because I was considering making a case for it at work

Till then…

2 comments | 0 pingbacks

I’m spent…and an apology

13.05.2008 20:29

posted by: Benjamin Smith

Posted Under: , , , , ,

I just spent the last few hours polishing up my site for maximum awesomeness. It doesn’t look much different, you say, but under the hood is a completely different beast. As I mentioned in a previous post, I spent last night converting the backend of this site to byteflow, which is built on django (python based) and running on top of lighttpd.

Previously (read; years ago) I had built a blogging system based on a LAMP stack, specifically Apache 2.0, MySQL and PHP. Slowly, over time I added to and ‘improved’ the software. Time and time again it felt like an exercise in futility. It seemed to be a never ending battle to keep up with the times and stay exposed. Since I started working for ag interactive I’ve fallen in love with Python. Quickly thereafter I started searching for a good, ”developing” blog package written in python. I longed for something I could extend and something that is portable. I long no longer…(?) The django project has provided many facilities to build a great blog (and cms type thing) and I’m glad someone has finally stepped up to take advantage of them. I’m sure I’ll be submitting patches to this project as I discover things to tweak or improve.

To the byteflow crew: Great Job so far!

Now onto some of the details about what I did.

I love lighttpd, all of my recent development has taken advantage of it. It’s configuration is intuitive, it’s feature rich for it’s size, and it’s performance is hard to match. Converting the config for this was relatively simple. This is, of course, coming from a sysadmin who deals with hundreds of web servers daily :). Anywho, here’s the config with paths cleaned up for clarity:

# Main server settings
server.modules              = ( 
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_rewrite", 
            "mod_redirect", 
            "mod_status", 
            "mod_fastcgi",
            "mod_compress",
            "mod_expire",
)

server.document-root       = "/docroot"
server.errorlog            = "/var/log/lighttpd/error.log"
index-file.names           = ( "index.php", "index.html", 
                                        "index.htm", "default.htm" )
accesslog.filename         = "/var/log/lighttpd/access.log"
url.access-deny            = ( "~", ".inc" )
server.pid-file            = "/var/run/lighttpd.pid"
dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"
debug.dump-unknown-headers  = "enable"
server.username            = "www-data"
server.groupname           = "www-data"
#status.status-url = "/server-status"
#status.config-url = "/server-config"
# Expires stuff, per yahoo tips :)
$HTTP["url"] =~ "^/" {
     expire.url = ( "" => "access 8 hours" )
}
# Set mime-types.
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
# Allow for vhost configs
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
# Compress settings
compress.cache-dir          = "/var/tmp/lighttpd/cache/compress/"
compress.filetype           = ("text/plain", "text/html")

# Custom settings
# Set-up some aliases
alias.url = ( 
              "/admin-media" => "/django/contrib/admin/media",
              "/images" => "/docroot/images",
              "/static" => "/docroot/static"
)
# Startup the fastcgi server, point it at my custom
# fastcgi script.
fastcgi.server = (
    "/byteflow.fcgi" => (
        "main" => (
            "socket" => "/tmp/byteflow.socket",
            "bin-path" => "/docroot/byteflow.fcgi" 
        ) 
    ) 
)
# Make sure we're passing on these urls
# bare, don't process them with django.
url.rewrite-once = (
    "^(/rpc.*)$" => "$1",
    "^(/images.*)$" => "$1",
    "^(/static.*)$" => "$1",
    "^(/admin-media.*)$" => "$1",
    # Then push the rest through django
    "^(/.*)$" => "/byteflow.fcgi$1"
)
# Legacy url, redirect it to new feedburner.
url.redirect = (
    "^/rpc([\/]*)" => "http://feeds.feedburner..truncated..",
)

Here is my fast-cgi script, which resides in my docroot.

#!/bin/sh
# byteflow.fcgi

export PYTHONPATH=$PYTHONPATH:/home/bsmith/Dev
export DJANGO_SETTINGS_MODULE=byteflow.settings

/home/bsmith/Dev/byteflow/manage.py runfcgi

Compared to a run of the mill apache setup, this is cake walk. I commented the important bits so you can get the gist of what’s going on. If you have a question required more detail, let me know.

After spending a few hours converting my data to the model that django built for byteflow, I then focused on cloning my old theme. As you can see, I didn’t to a bad job! I tried to clean it up a bit and make sure I have more content for the search engines to munch on. Other than that bit of extra work, building the templates for this was pretty simple.

As you may have noticed, I also began using feedburner to serve up my rss feeds. That’s where the apology comes in..If you’re subscribed, most likely you have experienced duplicate posts..like..all of them. So, with that said So Sorry!.

3 comments | 0 pingbacks

Wow this software rocks.

13.05.2008 1:21

posted by: Benjamin Smith

Posted Under: , , , ,

I just converted all my tags and posts to run on this byteflow system. I’m impressed. It is by far the most full featured django blogging app I’ve seen. I was also able to get it jamming with lighttpd. Right now I’m running this from my development area until I can get comments imported. I couldn’t be happier with the results thus far! At some point today, once I’m done polishing things, I’ll post my configs and a little how-to.

3 comments | 0 pingbacks

PyOhio Call For Proposals

08.05.2008 9:59

posted by: Benjamin Smith

Posted Under: , , , , ,

PyOhio, the first annual Python programming mini-conference for Ohio and surrounding areas will take place Saturday, July 26, in Columbus, Ohio. The conference is free of change and will include scheduled presentations, Lighting Talks and unconference-style Open Spaces.

You can read more about the conference at http://www.pyohio.org

PyOhio invites all interested people to present scheduled talks. All presentations are expected to last 40 minutes with a 10 minute question-and-answer period. PyOhio will accept abstracts covering any area of Python programming. A classroom area with computers will also be available for possible hands-on sessions.

All presentations proposals should submit abstracts no longer than 500 words in length. Abstracts must include the title, summary of the presentation, the expertise level targeted, and a brief description of the area of Python programming it relates to.

All proposals should be emailed to cfp@pyohio.org for review.

The submission deadline will be June 1, 2008. Accepted proposals will be notified by July 1.

If you have trouble submitting a proposal, or have specific questions about proposals please email Mat Kovach matkovach@gmail.com or call at 216-798-3397.

0 comments | 0 pingbacks
Previous month Next month