Archive for January, 2010

Being Smart is all about Being Resourceful

Monday, January 25th, 2010

The internet us the ability to not while keeping up the appearance that we do. Now that’s not to say that you should be a know it all, but you should definitely know how and where to get information if you need it. If you use a specific open source technology at work, then you need to know how to support (because odds are, it was written by a few interested people and doesn’t have a company behind it). So you should know where the forums are, where the documentation is, where the mailing lists and the mailing list archives are, etc. Do they have an IRC channel where you can talk to live users who might be able to help on a more immediate basis? Maybe there was an even a book written that you can get your hands on, a PDF, or even a screencast. If you lucky, you might write a Tweet about your frustration and one of the products creators will answer (which happened to me recently).

When To Use MySQL Cursor Classes In Python

Monday, January 18th, 2010

I have been writing a lot of code that has been interacting with MySQL lately. Sometimes I find it easier to work the result set in a dictionary form and other times it is easier with an array. But in order to not break all your code, it is necessary to set a default cursor class that keeps your code consistent. More often than not, I find using using a arrays is easier since I just want quick access to all the retrieved data. I also end up making my SELECT calls while specifying the columns and order of the columns I want returned.

The reason that using cursor classes is handy is because Python doesn’t come with a mysql_fetch_assoc like PHP or selectrow_hashref like Perl’s DBI interface. Python uses cursor dictionaries to bridge this gap. Ultimately your result is the same. But as with Perl and PHP, defaulting to cursor dictionaries isn’t a good idea for larger datasets because of the extra processing time and memory required to convert the data.

List of Feedback Loops

Friday, January 15th, 2010

This is the most comprehensive list of feedback loops that I have been able to find and put together. If there are others that you know of, please let me know and I’ll add them.

The other item that should be noted is that some ISPs don’t have a feedback loop and just respond to the abuse@ or postmaster@ email addresses for a domain. In addition to the feedback loop setup, ensure you have those addresses as valid addresses for your domain.

For more information on Feedback loops and how they help your deliverability, see the Wikipedia entry on Feedback Loops.

Mod-Security 2.5 by Magnus Mischel

Monday, January 11th, 2010

Being a SysAdmin (as most of you who read this blog regularly know), I love to look at logs to solve problems. If there is an issue, the first thing I always do is look at the logs to see what went wrong. Even when I am writing programs, I build debugging in from the beginning to make sure I know what’s going on at all times (especially when something goes wrong). (more…)

MySQL Error 1033: Incorrect Information in File

Tuesday, January 5th, 2010

If you’ve ever been plagued by an error 1033 issue in MySQL (replication will show it as well), then I might be able to help you out. The error reads something like, “Incorrect information in file: ‘./mydb/table.frm’. I classify this as another one of MySQLs cryptic error messages. Here is how I determined that this was my problem.

Googling around got me an answer, but I had to read a bunch of different responses to piece together the answer. Essentially this issue (in my case) was a result of the InnoDB engine not loading up when MySQL was restarted. Therefore when MySQL tried to read the frm file (table description) which was written for an InnoDB table with the MyISAM reader, it didn’t like it. Since MyISAM is the fallback engine, it went to that and the table became unusable.