Archive for July, 2008

Firebug works on Firefox 3 now

Wednesday, July 30th, 2008

Previously I wrote about a disappointing misunderstanding between FF3 and Firebug that rendered the first useless in my daily life. The latest release of Firebug (1.2 Beta) seems to have fixes to all problems that I encountered and my yesterday’s JS / CSS debugging session went smoothly. So it seems it’s a FF3 party time.

Conditional function definitions in IE5

Wednesday, July 23rd, 2008

It looks like all cool kids except for IE5 know what to do with this:

if (some_condition) {
  function f() { alert(”true”); }
} else {
  function f() { alert(”false”); }
}

When calling f(), Firefox and Safari will show “true” when some_condition was TRUE at the load time, and “false” when it evaluated to FALSE. IE5 pays attention to the if-else construction (and no code will be executed in the else-block if the some_condition is FALSE), but it DOES redefine the function. Yes, even though it’s in that block that’s not being executed.

Be careful!

Timeout when publishing new posts in WP

Wednesday, July 23rd, 2008

By no means this is a usual thing, but since there’s very little information (in fact only one link that gives no real answers) on what to do when you see the error below upon publishing a post, I decided to share the solution:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/…/public_html/wp-includes/wp-db.php on line 170

The error points to an innocent line that removes single quotes from a database query, and it’s misleading. One of the real causes for this problem may lay in the slug (post name) field. You can see this field in the Permalink line below the Title field in your post editor; it’s emphasized.

In my case, there was an endless attempt to find a unique name for a post having an HTML entity (long dash) in its slug. Even though it was correctly encoded with %NN sequences, the database sever had hard time executing the query correctly. So, the first check on your list is:

Make sure your post slug (that symbolic part of the permalink) has no special symbols, but only letters, digits and dashes.

Wordpress 2.6 is Out

Tuesday, July 15th, 2008

Just noticed the release of the next Wordpress version — 2.6. Check out their release summary video to get an idea of what has improved and how. Good stuff.

Funny Spam

Tuesday, July 8th, 2008

A minute ago I got this spam letter with the list of vacancies:
 

ИНФОРМАЦИЯ О ВАКАНСИЯХ!!
 
- ГЛАВНЫЙ БУХГАЛТЕР, з/пл от 60 000 руб. в месяц;
 
- БУХГАЛТЕР, з/пл от 35 000 руб. в месяц;
 
- СЕКРЕТАРЬ, з/пл от 24000 рублей в месяц;
 
- ПРОГРАММИСТ 1С, з/пл. высокая;
 
- КУРЬЕР, з/пл от 17000 рублей в месяц;

It translates:

Information about available positions:
- Chief accountant, salary from 60000 rubles / mo
- Accountant, salary from 35000 rubles / mo
- Secretary, salary from 24000 rubles / mo
- Programmer 1C*, salary is high
- Courier, salary from 17000 rubles / mo

* 1C is a very popular software tool for accountants and managers that is flexible enough to have a dedicated course in local universities and a position in organizations.

How many funny moments can you count?