Sponsored Links

WordpPress WP-Cache

My colleague Shaun pointed me in the direction of this article dealing with CPU usage and WordPress.

http://www.codinghorror.com/blog/archives/001105.html

http://mnm.uib.es/gallir/wp-cache-2/

Free email server

After having set up my work machine as a Dev Box, I needed a mail server to test the email functionality of the applications I am working on.

My colleague pointed me in the direction of hMailServer

It was an absolute cinch to set-up.

A great post on improving the performance of your jQuery

jQuery logo

The unfortunate downside to jQuery is that while it makes it easy to write JavaScript, it makes it easy to write really really f*&#ing bad JavaScript. Scripts that slow down page load, unresponsive user interfaces, and spaghetti code knotted so deep that it should come with a bottle of whiskey for the next sucker developer that has to work on it. — Scott Kosman

http://24ways.org/2011/your-jquery-now-with-less-suck

Checking the value of a drop-down with Selenium

Whilst doing some maintenance on some Selenium test cases I found some erroneous checks being made to ascertain the value of a drop-down control.

Where your control is something like this, where the two values are Boom and Kazaam, with Kazaam being the second value, and currently selected:

<select id="my_select_control">
<option>Boom</option>
<option selected="selected">Kazaam</option>
</select>

The solution is as easy as:

<tr>
<td>verifySelectedValue</td>
<td>my_select_control</td>
<td>Kazaam</td>
</tr>

Selecting a button in Selenium IDE

I was recording a Selenium test case where I needed to record a click on a specific button on a page which had multiple buttons almost identical in code: normally this could be done quite easily through the use of the ID of the element — unfortunately our programmers had not been that kind! The only actual difference between the buttons was in the Javascript onclick event attached to the button.

The solution is quite simple:

<tr>
    <td>clickAndWait</td>
    <td>//input[contains(@onclick,'part_of')]</td>
    <td></td>
</tr>

WordpPress 3.3 upgrade a breeze

Yep: WordPress 3.3 is available, and I upgraded my blogs with ease using the native update feature.

Some updates were instantly available for some of the themes and plug-ins I have installed, and these ran with no hitches, too.

I have not had too much opportunity to use the new version yet, but can report that the new Media Uploader sports drag-and-drop functionality, and is activated from one “Add Media” button, not separate Image and Video buttons. It’s awesome, and you can drag multiple files into the loader at once.

The new WordPress Media uploader, introduced in version 3.3

WordPress Media Uploader

.net Magazine: The top 25 books for web designers and developers

.net Magazine recommends their top 25 books for webbies.

http://www.netmagazine.com/features/top-25-books-web-designers-and-developers

WordPress: Increasing memory allocated to PHP

If on your WordPress Dashboard you are seeing an error something like this:

Fatal error: Allowed memory size…

try adding the following to the wp-config.php file in the root directory of your blog:

define('WP_MEMORY_LIMIT', '64M');

WordPress and the “Add to foursquare” button

I have been enjoying playing with foursquare lately, and wanted to add the “Add to foursquare” button to my Cape-hike.co.za blog.

I found this accurate, easy to follow post on about foursquare

Below is the result: a button which will add my workplace to your foursquare to-do list!

HTML label syntax

I have long been in the habit of using syntactically correct HTML when labeling form elements. That’s just how I roll.

I think I picked the habit up when I was busy swatting up on accessibility stuff, and it stuck. Not only is it simply “the right thing to do”, but there are some additional advantages, too!

So:

<label for="myinput">Textbox:</label><input id="myinput"  type="text" />

will give you:

So check it out yourself…

Doing this correctly means that:

  • clicking on the label of the control selects that control
  • if the control is a text input, and it contains content of any kind, the content will be selected

Cool!