gaarai.com

Code, Technology, and Random Ramblings

Archive for the 'Development' Category

I Still Don’t Like Fancy Programming Editors

For about eight years now, I’ve been hapily using Crimson Editor. At its simplest, Crimson Editor is nothing more than a fancy Notepad; however, it is so much more than that. While it doesn’t have all sorts of fancy tools that some editors have, it does support customizable syntax highlighting, customizable colors, line number, visible whitespace characters, basic smart indenting, a file/directory navigation pane, project support, and a MDI interface. Those features aren’t really the reason why I use it as almost all programming editors support such features. I use it because it gives me tools that help me program without doing things that hinder my productivity.

Read more

3 comments

Tool to Optimize MySQL Configuration and Performance

Web applications developers such as myself often have a hard time keeping up with everything that’s going on. There’s always some new programming or scripting language, new standards, new browsers, new technologies, new paradigms, new social networks, and on and on. Every day, something new happens. The end result of all of this always ends up being very similar: people demand faster applications that deal with ever-increasing amounts of data which end up putting massive stress on the server architecture.

As we toil to improve the performance of the applications and their snappy response times, it becomes easy to forget about how we can tweak settings on a low level to provide massive speed improvements on the front-end. For example, most people don’t know that you can configure MySQL to take better advantage of the resources that the server has available.

By default, MySQL is configured to consume a relatively limited amount of memory resources. Start giving MySQL more memory to work with, and your application’s performance can improve greatly.

Read more

No comments

Empty uploaded files with Perl

I work for a company that has a proprietary CMS software package written in Perl. We have a number of servers that run this code, and everything has been fine for a number of years and many different versions and customizations.  A few months back, something changed. One of our servers started producing completely empty files for all uploads. This affected all of our code, all of our versions, and every site.

After some time debugging and testing, I finally found the problem. Apparently some code was updated, either Perl itself or one of its packages, and that caused my CGI object to be recylced before the upload code ran. When the CGI object gets recylced, all the file handles are closed resulting in reading and saving an empty file.

The solution was deceptively simple. All I had to do was store the CGI object in a persistent variable that has scope throughout the end of the program execution.

No comments

Adding AJAX to WordPress plugins

One of the these days I’m going to have to start working with AJAX. To date, I haven’t really had a need, but I’m going to get way behind the curve unless I start working with it now. I recently stumbled on a page in the WordPress Codex called AJAX in Plugins. This will be my starting point for working with AJAX and WordPress. Hopefully I can start cranking out some cool new plugins with AJAX goodness soon. Once I do, I’ll blog with some more details about what hurdles, if any, I faced when developing WordPress plugins with AJAX support.

No comments

Important changes in WordPress 2.6

WordPress 2.6 allows for moving the wp-content folder and the wp-config.php file. Some code guidelines have been published to help developers standardize their plugins with the new changes. The following code will allow code to work with current versions and the upcoming 2.6.

Read more

No comments

Introducing WP Easy Uploader

This time I have a plugin for the masses. WP Easy Uploader will make any WordPress user’s life easier. No longer will you have to rely on FTP to upload new plugins, themes, or random files. Now you can take care of those tasks quickly and easily from the admin screen of WordPress.

For full details, check out WP Easy Uploader’s release page.

6 comments

WordPress.org’s Plugin Directory Needs Some Changes

Starting a little over a month ago, I started submitting plugins to WordPress.org’s Plugin Directory. Overall, the system is great for developers since it offers Subversion and enables the automatic plugin upgrades that the latest WordPress versions support. However, it has some major problems that causes developers like me some headaches.

Read more

2 comments

Introducing WP Developer Assistant

Time to release another public plugin into the wild. This plugin is a bit different in that it has nothing to do with how your site looks or operates. As a matter of fact, no one will even know that you have it, but you can rest well knowing that it is just a click away in the admin menu. For you see, WP Developer Assistant is a plugin for developers.

Now some of you may wonder what a developer needs a plugin for. Well, there are lots of reasons. The main one being that it would be a lot nicer if WordPress had a few extra tools that would make a developer’s life a lot easier. For example, being able to run any needed query from inside WordPress, being able to show PHP errors without turning them on for everyone, or uploading files and extracting archives anywhere in the site would be great tools to have, but WordPress doesn’t have anything like that… Until now!

If you are a WordPress developer, you need this plugin. You can find the full details on the WP Developer Assistant page.

1 comment