Archive

Archive for July, 2009

Getting started with Python (part 2)

July 30th, 2009 recon No comments

In this tutorial, we’ll discuss learning Python from a C style language developer’s perspective.

C languages are, by design, very strict. You either do it their way, or your code won’t compile.

Python is the polar opposite of C languages. It takes a “we’re all consenting adults here” attitude, and let’s you do pretty much whatever you want.

Python is also built for speed. Not speed of execution, but speed of coding. It’s a great language if you want to throw a script together in a half hour.

Read more…

Categories: Uncategorized Tags: ,

Download Monitor bug fixes

July 29th, 2009 recon No comments

After using Download Monitor (a WP plugin), I noticed there was a little annoying bug in uploader.php, which prevented me from using the post uploader form.

To fix, find (in uploader.php):

<option value=""><?php _e('N/A',"wp-download_monitor"); ?></option>

Replace with:

<option value="0"><?php _e('N/A',"wp-download_monitor"); ?></option>

Another minor bug is that there was a missing space when using the download short code (link titles looked like VersionNumHere instead of Version NumHere).

To fix, find (in wp-download_monitor.php):

$format = '<a class="downloadlink" href="{url}" title="{version,"'.__("Version","wp-download_monitor").'", ""} '.__("downloaded","wp-download_monitor").' {hits} '.__("times","wp-download_monitor").'" >{title} ({hits})</a>';

Replace with:

$format = '<a class="downloadlink" href="{url}" title="{version,"'.__("Version","wp-download_monitor").' ", ""} '.__("downloaded","wp-download_monitor").' {hits} '.__("times","wp-download_monitor").'" >{title} ({hits})</a>';
Categories: Uncategorized Tags: ,

WP Cache on Win32 (IIS)

July 29th, 2009 recon No comments

After noticing that my blog didn’t load as fast as I’d like, I installed WP-Cache.

Once I installed it, I went to it’s settings page, to be greeted with a page that said “Main settings” and nothing else.

Figuring file permissions were messed up, I started looking around. After finding that wp-content and wp-config.php were supposed to be writable, I took care of it, and I still had the same problem.

After looking around on the web, I found that if run on Windows, a few special steps were required.

With WP-Cache 2.1.2, the following steps worked for me (the original steps can be found here).

  1. wp-config.php and wp-content should be writable by your web server
  2. Copy wp-content/plugins/wp-cache/wp-cache-phase1.php to wp-content/advanced-cache.php
  3. Replace wp-content/plugins/wp-cache/wp-cache.php with wp-cache.php (103)

In the referenced version, I performed the edits indicated here. It seems like the ob_end_clean() issue was fixed in the latest release of WP-Cache.

Categories: Uncategorized Tags: ,

Getting started with Python (part 1)

July 28th, 2009 recon No comments

When I wanted to start programming with Python, like most programmers, I looked for an IDE of some kind. All the results I found seemed to have a list of dependencies, none of which I knew anything about. After a few hours, I decided to forget it.

A few months down the road, I came across a neat package called Portable Python. This package had a Python distribution, two IDEs and some libraries, all configured and ready to go. At the time, I didn’t have any new programming projects planned, so I filed the link in my bookmarks.

About a week ago, I finally had a project I could try in Python. I downloaded Portable Python, and got to work. After a few hours in the Python docs, I completed the script.

The only problem with the above solution was that it wasn’t a normal Python distribution. Installing libraries would be difficult at best. I decided that I needed to have a regular Python distribution, with all the functionality that I was getting from Portable Python.

After a few hours, I had completed my goal. Hopefully, the below tutorial will save you a few hours.
Read more…

Categories: Uncategorized Tags: ,

WordPress – Best in open source?

July 28th, 2009 recon No comments

If any of you have used OS web applications, you know that setup and configuration can sometimes trigger extended hair removal sessions (read pull hair out).

WordPress is the exact opposite. Installation took, as their readme said, five minutes. I could’ve stopped there, and started blogging right away.

After installing a theme, a gallery plugin, and changing some configuration items, the blog is ready to go. I’ve probably spent an hour tweaking the blog since I installed it.That’s nothing compared to what I’ve had to do with other web apps in the past.

The interface for WP’s admin backend is pretty impressive, and everything seems to “just work”.

That’s all for now.