Moving on from visualizations
Posted by postfuturist on 2010-02-01 02:51:32

I am beginning to question the appropriateness of visual aids in professional software development. When I only occasionally had to look at database structures and test out SQL queries, I used tools like phpMyAdmin and MySQL Workbench which provide GUI visualizations and click-friendly database management. I now look back at those times in the same way that a young adult reader might look back at a time when he cherished picture books. Once I managed to overcome the intimidating nature of the mysql command-line tool, I found myself spending more and more time in that tool and less and less in the visual tools. Visual design tools have always been a crutch--useful for getting started, but eventually a hindrance to getting things done quickly and efficiently.

Using the mysql command line tool helps me be a better database designer. First of all, I have to communicate with the tool in SQL with a few helper functions. It responds by printing out information in ASCII formatted tables. I only need to know a handful of basic commands to get started.

USE dbname -- sets the active database

SHOW TABLES -- lists the tables in the active database

DESC tablename -- shows the structure of the table

SHOW CREATE TABLE tablename -- shows SQL to create table

The SHOW CREATE TABLE command is ultimately more useful than the DESC command because it gives you a better idea of how the table was created, and how to create similar tables in the future. I learned quite a bit about MySQL by using this command to inspect various tables.

Using command-line tools to interact with systems like databases puts me closer to the action. After awhile I feel like I am getting my hands dirty, and I get a feel for the data. At times this feeling can be negative. Working with MyISAM tables can be painful when the database allows me to put the database into invalid states. I get a visceral sense for the inadequacy and brittleness of MyISAM when I manipulate it by hand. InnoDB tables feel a little more constricting at times, being much stricter about data integrity, but this strictness also brings confidence in the safety of an ACID compliant database.

MySQL is just one example of how native command-line interfaces, however daunting, are often more powerful tools for interacting with computing systems than the fancy GUI tools. Perhaps, with concerted effort, the visual tools could include some of the efficiencies of the command-line tools, but for the most part they feel slow and stupid. Other tools I use more on the command line than anywhere else are revision control tools and testing frameworks.


blog comments powered by Disqus