Still Life

A Series of Mental Snapshots

Archive for April, 2009

Bugs in the Wild: The Paradoxical Error Message Edition

Posted by Steve on April 23, 2009

A friend recently sent out a screenshot of a quite humourous error message. He was attempting to free up some space on a network drive, by deleting some files, when he received this less than helpful error message:

Error message that appeared when deleting a file

Error message that appeared when deleting a file

The text in the error message is:

Cannot delete week4: There is not enough free disk space.
Delete one or more files to free disk space, and then try again.

It can be seen that this is a faulty error message, and something else is really afoot; one cannot delete files if one cannot delete files.

An interesting question here is why this error message came up? Is this the actual reason the file cannot be deleted, if so a different error message should be displayed so as not to confuse people. If this is not the cause of the issue, then why did this message get displayed?


Posted in Bugs in the wild | Tagged: , , , , , , , , , , , | 1 Comment »

Bugs In the Wild: WYSIWYG in WordPress Edition

Posted by Steve on April 22, 2009

I ran into this issue when creating my post for importing/exporting individual tables in MySQL. The issue resolves around the principal of WYSIWYG (What you see is what you get).

For one of the MySQL commands it was necessary to have two dashes (or minuses) next to each other, as can be seen in my the post mentioned above.  In the WordPress text editor displayed the two dashes properly in both the visual and HTML views, but after I had published the post, the two dashes where displayed (and when copied acted) as a single dash! For example the character in the quotation is seen as two dashes in the editor “–” but as can be clearly seen it is displayed as a single dash.

I tried for a while to resolve the issue, but I ended up just spacing out the dashes, like so “- -“, so that it could be seen that there were actually two dashes.

I feel this falls under a WYSIWYG type issue as in the text editor I was able to see the two dashes properly, but then when the post was published the same thing was not displayed therefore what I was seeing n the editor was not what I got in the post.


Posted in Bugs in the wild, Testing, Uncategorized | Tagged: , , , , , , , | 4 Comments »

Exporting and Importing An Individual MySQL Table

Posted by Steve on April 21, 2009

In moving databases from development to production it is sometimes necessary to export individual tables so that they can be imported into another database.

Exporting the Table
To export the table run the following command from the command line:
“mysqldump -p – –user=username dbname tableName > tableName.sql”

This will export the tableName to the file tableName.sql.
[NOTE: there should be no space between the two dashes, but I have to write it that way so that it display properly].

Importing the Table
To import the table run the following command from the command line:
mysql -u username -p -D dbname < tableName.sql

The path to the tableName.sql needs to be prepended with the absolute path to that file. At this point the table will be imported into the DB and you are ready to go!

I ran into this issue when attempting to add new tables to my database. I am unable to run the “LOAD DATA INFILE” command, that I had previously used to populate tables, because Webfaction does not give the permission to run the command. Therefore the simplest solution was to export a table from the MySQL database on my personal machine and then import it to the database on the Webfaction server, using the export/import commands seen above.

Hope this helps someone out with exporting individual tables and as always if any clarification is needed or I missed something feel free to let me know.


Posted in Uncategorized | Tagged: , , , , , , , , , , , | 3 Comments »

Anatomy of an Error Message – A Windows Vista Example

Posted by Steve on April 2, 2009

I have recently had a somewhat frequent recurrence of an error message on my laptop, which is running Windows Vista. The error message can be seen below:

Windows Vista Error Message

Windows Vista Error Message

The error message popped up (for seemingly no apparent reason), and to make matters worse, when I clicked cancel a new instance of the error message popped up, and I had to close it about 30-40 times before it stopped popping up!

You’ll notice that the first issue with this error message is that it is extremely uninformative and has indecipherable information, something the user should never see. This lack of information made so that I was unable to identify what was causing the error therefore I was not able to stop it from happening (as a quick note, I did not unplug any disks at the time, so it did not have to do with that). Subsequently, since the first incident, this has occurred a few more times with no real pattern as to what is causing it.

A bad error message is good illustrator to what a good error message should be. A good error message should have the following:

  • An informative title – A user should know what caused the issue
  • Actual error message should provide user with information on how to fix the problem
  • Finally it should provide the user with actions that will help fix the problem identify in the message

The only thing the above error message has going for it is that its title gives a clue as to the issue.

To quickly summarize, the goal of an error message is to inform the user that there has been an error, what caused the error, how to fix the error and finally some actions you can take to fix it.

Posted in Testing | Tagged: , , , , , , , , , , , , | Leave a Comment »

Two Forms One Page: Explanation of the HTML Form Action

Posted by Steve on April 1, 2009

When I started my web application for my design project I knew absolutely nothing about django, html, css… so basically any and all web technologies. Therefore for a very long time I did not really know the purpose of the action in the form declaration ( <form action=’.’>) or what the ‘.’ actually meant.

It is actually very simple, the ‘ action=”.” ‘ denotes where the form is being submitted (what URL is being called). Specifically, the “.” means that that form will be submitted to the current location (same page), for example if your url was the form would be submitted to

Now that we know what the action does, it can be used to have two forms on the same page submit to different location. I created a page where a user can either login or register. To have the two forms submit properly I have the following actions for the two forms:

Login Form: <form action=’/accounts/login/’>

Registration Form: <form action=’/register/’>

Now when the login form gets submitted the /accounts/login/ is called and when the registration form gets submitted the data is sent to /register/. An important note is that the action gets performed on the specified location BEFORE the last ‘/’. For example if I had , the action would be performed on the home page and not the register page. Therefore it is important to always have the trailing ‘/’ .

Hopefully this saved someone some trouble getting multiple forms setup.

If you need any clarification, or more details, drop me a line and I’d be more than happy to help.


Posted in Uncategorized | Tagged: , , , , , , , , , | 2 Comments »