In my two most recent posts, Always Learning and Coders at Work, I talked about my personal and professional need to keep learning. My most recent addition to my development arsenal has been Python. Why I considered learning the language a success, I didn’t really feel that it a significant amount of new materials and features. As a result, I have chosen to dive into the functional programming language Erlang.
The book, Coders at Work was published at a very ideal time for me. I was pretty comfortable with my progress towards learning Python last year, and have been looking around for another language to start tooling around with on my computers. The book seemed like a good opportunity to get a peak into the minds of a select group of coders and see what they might have to say on the matter.
I have been using my mod_python Mako handler for several months now in my personal projects. For the most part, I have been very happy with Mako and am finding it extremely useful. One issue I have had to wrap my head around has been the inability to halt template execution cleanly. A common practice in many a website has been to flush the current output buffer, display the required authentication information with a form or a redirect, and then end the request—making authentication required on a page of content.
One of the more interesting challenges I have faced with WordPress is offering custom pages. These could be pages such taking a survey, asking a question, or suggesting a topic. Previously, I had gone about coding these kinds of pages by just sticking the php file in the web root. The problem with that strategy is twofold. The page cannot be disabled without going to the file system. The page also doesn’t respect theme changes cleanly.
After spending a good portion of the day with Chris and Xander out in the Chicago heat, I let them know that Dad would be taking care of dinner tonight. I remembered that we had a pork tenderloin roast in the freezer, so I got an idea. Little did I know just how good it would turn out!
I have a friend that wants to update a banner on his WordPress blog homepage without changing the template files. I tell him I’d be glad to help him out and start working on a plugin that provides a custom administration page to allow for this. As I am a firm believer in the power of a lazy coder to get things done faster and better, my first thought was: “Why don’t I just see if I can hijack the ‘Select Image From Gallery’ page to do this?” that process for my own ends shouldn’t take me but a few minutes…and a lot less time than trying to build my own media selector. Like nearly all the content on my site, if you are reading this, I wasn’t able to find my answer elsewhere.
Once again, my WordPress friends had to hit me up for some help. These are the same friends that I helped with a Custom Field Search Plugin. They have been maintaining a community site, SuccessNet Online™, and an email mailing list of several hundred thousand participants for Business Networking International.
In my previous post on implementing a custom field search in WordPress, I showed how to modify the internal SQL LIKE search that is the default search engine of WordPress. There are other search engines that WordPress can make use of, most notably Sphinx Search.
I think it is safe to say that my personal goal of learning and using Python this winter has been a huge success! I have now found myself hard at work on a large Python-based project in my spare time and investigating issues that I haven’t been able to track down much documentation on. How to use Memcached in conjunction with SQLAlchemy was one of those issues.