Categories
Just Shelley

The Art of Books: perfect folds

The work on the star tunnel books goes slowly as I gather the material to make the volumes. Before I can even consider starting them, though, I have to master the fold. If I can’t master the fold, I won’t be able to master the concertina fold, which is nothing more than long strips of stiffer paper, in perfect parallel folds. The star tunnel book I have in mind consists of several overlapping concertinas.

I thought I knew folding, having previously spent a life time of folding things, such as dolls, letters, hope, books, arms, and t-shirts; but all this past experience does is build bad habits; habits which must be broken to do a proper fold. Contrary to what we might think a fold doesn’t just happen by luck. There is no natural perfect fold in nature, unlike the fractal. The fold must be precise, measured, and then firmly flattened using a bone folder, because your work is only as good as your fold.

As I study the art of book, I find that there is an esoteric element to folds, which adds a hint of spirtual mystery to that previously seen as commonplace . For instance, there are proper names describing how the fold is placed relative to the surface: if the fold is pointed up, then it’s called a mountain fold; pointed down, a valley fold. Not difficult to remember and makes for rather impressive explanations of what you’re doing if someone asks.

“I’m folding the end of this paper, here, until the tip meets the base of this mountain fold.”

Or something to that effect. Those people who are experienced at this are probably snickering right now, saying to themselves, “It’s not called a base, you amateur. It’s the spine“, or some such thing.

To practice my proper folding technique, I created a book called an Inserted Concertina, which is one concertina fold inserted into another, and looks rather nice for nothing more than two pieces of paper connected by slits.

First I had to make one 8-panel concertina, 6 inches high (sorry, if I try to keep up in metric, I’ll be here all night); and then a second, 4 inches high. I cut off the two end panels from the shorter strip (which are being used to make a small Japanese stab binding book). The paper had to be long enough, so I glued two pieces together, which itself is rather a production.

Place scrap paper underneath the edge and use it to mask all but 1/2 inch of the edge of one strip; use the paintbrush to spread a thin layer…

Once the long strips were made, I folded the middle of the taller concertina to make a mountain fold, and then folded one half to make another mountain fold and so on, until the stretched out piece easily collapses, edge to edge, all space eliminated.

It was then a matter than of cutting out the insides of the larger to make space for the smaller, cutting slits in both to align with each other and then put the two pieces together (easier said then done, something about cutting through six pieces of paper). To measure the cuts, I used the pointed end on the bone folder to score the paper, to avoid using pencil or pen, which, in a way, again makes use of the fold to accomplish my task.

As a finishing touch, I added orchid print outs, just as a fun detail and a bit of color, because the true spirit of the art of book is improvisation, each piece then being subtly unique.

I’m not sure if the photos do the book justice; it was difficult to photograph. It’s not perfect, and there are bends in the paper, and the photos warp the perspective, and I have made mistakes. Regardless, the amazing thing about it is how well the book collapses neatly and elegantly into its cover, and how stable the piece is, without using any clip or thread or glue to keep the concertinas together. It is a most cooperative work, as if the pieces decide to mesh for whatever reason even though there is no physical bond.

I can twist the work about and open and close it and pull it around to take photos, but the join holds and the piece remains steadfast despite the strain it undergoes. As you may guess by now, it is, of course, due to the compatibility of the folds; to the ends, really, because that’s what a fold is–the alignment of two ends.

I have no allusions about the stability of my little book. Brutal shaking of the piece will most likely break it apart, perhaps permanently if the slits are damaged, or the folds crumpled and lost. It is not a work that can be tossed carelessly aside for convenience, or thrown across the room in anger; too easily sat on or thrown away for scrap if forgotten. I think that’s why this style of book appeals to me: there is the very real possibility that it will not endure.

Since we can name these individual works, these book arts, I called this one My Virtual Friend.

Categories
Technology Weblogging

Survival guide to LAMP: Installing the weblogging tools

L is for Linux, M is for MySQL, and P is for PHP

 

I used nextpage to break this writing up into manageable chunks. I know that not everyone likes nextpage, and the implementation in 1.02 is a bit problematic, but we’ll see later how we can modify WordPress to provide full page displays for people who prefer this, and how to refine the nextpage behavior for the rest. And yes, we’ll also add in comment preview.

Once the software for Textpattern and WordPress is on the server and unzipped (discussed in last LAMP essay), you’ll need to create a MySQL database for both tools, unless one is provided for you by your ISP. Since they each use different table naming conventions, I used one database for both installation.

Creating the database is dependent on your ISP. Most companies providing MySQL also prohibit creating databases directly in the MySQL console–a command line interface directly with the database engine. Instead, you’ll use a tool like that which is attached to cPanel to create a database and a user and tie the two together. However, if you did have to create a database directly in MySQL, it’s not that complicated–as long as you have access to the command line version of MySQL.

To access MySQL from Linux, you’ll type the following command which opens a console to MySQL. Notice that you’re passing in a flag designating a specific user, and in this case asking the tool to prompt you for a password (you could also type the password directly in the line, but I prefer not to because Linux remembers your command in history, and I don’t like passwords to show in history):

mysql -u shelley -p

In this case, my user name is my first name, shelley. Once I get the password prompt and type it in , I’ll be in the database engine console.

Since I didn’t specify a database on the command line when I entered the console, I haven’t entered directly into any of my existing databases. To see what they are, I can ask MySQL to show me them:

Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1214348 to server version: 4.0.18-standard

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

mysql> show databases;
+——————+
| Database |
+——————+
| shelley_bbweblog |
| shelley_frgn1 |
| shelley_test |
| shelley_wp |
+——————+
6 rows in set (0.00 sec)

mysql>

Even if there are several people with databases on the system MySQL engine, only the databases you’re allowed to see should show. This provides a little extra privacy.

I’ve already created the WordPress 1.2/Textpattern database, the one named shelley_test. Well, I used cPanel to create the database ‘test’, and to keep it unique to me, the system called it ’shelley_test’. However, if I wanted to create a database in the console, I would use the create database command:

mysql> create database shelley_test;
Query OK, 1 row affected (0.06 sec)

Impressively easy, eh? Well, I can about guarantee that it’s the easiest thing you can do in MySQL. Now that I’ve generated even more interest in learning how to work with MySQL, you need to create a user and tie this user to the database. The reason is that both Textpattern and WordPress (and Movable Type and most other database driven tools), require three things for installation: a database, a user, and a password.

(They also require a server name, but unless you’re getting into some kinky remote data access, you’ll use the local server name, handily designated as ‘localhost’, when queried for server name.)

When creating a user, what you’re really doing is creating a named set of permissions, which just happens to be usable by a what can be termed a ‘user’. To do this, you’re going to use the MySQL GRANT command, and grant all permissions to the specified person, for the specified database, accessed via the localhost server, and identified by a password.

Or in one command:

mysql> grant all privileges on shelley_test.* to someuser@localhost
identified by ’somepass’ with grant option;
Query OK, 0 rows affected (0.00 sec)

Of course, you’ll replace the name and password for your system, as well as the database name, but what I’ve done with this command is to grant all priviledges on anything contained within the database shelley_test to the ’someuser’. However, they’ll only be able to access the database from the local machine and only after giving the specified password.

I could have given this person access to all databases using ‘*.*’ in place of ’shelley_test.*’, but first rule of thumb with good database habits: never give more than is needed. By this I mean never grant more permissions that a person needs to get the job finished.

If I had not given the localhost host designation, your PHP applications would not have been able to access the database, and the user would not be able to log int MySQL from the command line. If they tried, they’d get an error similar to:

ERROR 1045: Access denied for user: ‘anotheruser@localhost’ (Using password: YES
)

Of course, MySQL could automatically assume all users can access the database system from the local host, except this violates that rule I just mentioned, which is Never give more than is needed.

There are fancy variations of all these commands, but we’ll hold them for another time. Right now, you’ve created what you’ve needed to finish the WordPress and Textpattern installations.

Installing WordPress

When the WordPress files are unzipped, chances are they’re unzipped into a named subdirectory. The first thing you’ll want to do is move them into your wordpress directory. You can do this your FTP program, or you can use the Unix move command, ‘mv’. Change to the subdirectory that contains all the files and subdirectories and do the following:

mv *.* ../.

When finished, you can then delete the directory just emptied, again using your FTP program, or the Unix remove command, ‘rm’. First, move up a directory, and then remove the WordPress unzipped file directory:

cd ..
rm -r wordpress-somename

There is a readme.html file located in the top level directory of the files just installed. You can see the one with my installation here. This provides what WordPress calls the “5-minute install”, and you’ll want to use these instructions.

You can either manually edit the configuration file for the weblog, by opening wp-config-sample.php either using a text editor on Linux, or by downloading the file to your PC and editing it there. Later I’ll demonstrate how to use the granddaddy text editor of them all, vi to do simple text edits in Linux, but for now, we’ll let the program make the configuration file.

To create the config file, open the install-config.php page in the wp-admin subdirectory in your browser and provide the information needed. This will be the database name, username, host (localhost), and user password. If you’re running multiple versions of WP, you can change the table prefix, but for now, since this is the first install, we’ll leave it at wp_.

Once you run, you should get a message something to the effect of, All right sparky! with congratulations for not screwi… congratulations for being successful. You don’t have to remove install-config.php, as it can’t be used to overwrite an existing configuration file; but you should anyway. The second rule of good database habits is: evil shit lives, don’t leave behind any open doors.

Next, load the install.php application, also located in wp-admin. A link for this file is provided in install-config.php if you’ve run this. The installation application should be able to run unassisted, and as long as it can access the database, you shouldn’t have any problems.

The first page provides feedback as to what’s been created, and a link for step 2. This page also shows some status of table and other object creation, and also asks you what the URL for the blog is. In my installation this is “http://wordpress.burningbird.net”.

Step 3 should give you note that you’ve successfully installed WordPress, that a user has been created called admin, and a generated password is given. Don’t lose this! If you don’t record that password down, you’ll have to do the install all over again.

At that point, you can log into WordPress, and the first thing you should do is access the Profile option, and change the password. You’ll also have to provide an email address for the admin user.

That’s it. You be WordPress bad at this point. My installation is at http://wordpress.burningbird.net.

In the next essay, we’ll take a closer look at the WordPress tables, and work on importing Movable Type entries. Next, though, installing Textpattern.

Installing Textpattern

Since the database has already been created, all you need to do with Textpattern is make sure the tool files are located directly in the weblog directory, moving them out of the unzipped subdirectory if needed. Once set, all you need to do is run the Textpattern setup application, setup.php, located in the textpattern subdirectory.

As with the WordPress installation, you’ll need to provide your MySQL username and password, database name, and host. Again, provide a prefix if you’re going to install multiple weblogs in the same database; otherwise leave it blank. In addition, ensure that the paths to the web root and textpattern installation are correct.

You’ll note a secret word, used for authentication security. Make sure you change this, okay?

When you click the bright red button, the next page that opens has a textarea with your configuration information contained in it. You’ll want to copy this and add this to the config.php file in the textpattern subdirectory. You can use your local text editor or one located on the server.

Important Note: It’s critical that there is no text or white space or carriage returns after the final closing PHP tag, ?> in this file. Doing so will cause problems later. Once you add the text, stop, save, and close the file.

After you’ve created the config.php file, then click the button that says, “I did it”. The next page allows you to create a user, use whatever answers are appropriate to your circumstances. Note that the version used in this example does not verify the password: watch the typos.

Click the button and that’s it. You’re ready to go. After you remove the setup.php file, that is. My Textpattern installation is at http://textpattern.burningbird.net.

Again, next essay we’ll look at importing Movable Type entries, and explore the Textpattern tables.

Why WordPress over Textpattern

I’ve been asked in comments, and elsewhere: why WordPress over Textpattern? Both are PHP, and both are open source.

Well, when I originally looked at Textpattern, I didn’t know it was open source. I had missed the license information that read:

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name Textpattern nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

Though Textpattern is being developed by one person, Dean Allen, he has left the source open for innovation, copy, reuse, and even distribution–with the only caveat that the original copyright be included. This is open source.

Still, there is a major difference between the two development efforts: WordPress is not only open source, it’s also a multi-developer project, registered and maintained at Source Forge. Though Matt of Photo Matt fame is the primary developer of this product, if for some reason he decides he would rather spend his time photographing naked people holding fruit, he can; the project might slow for a bit, it won’t stop. Why? Because Matt is not the only force behind WordPress.

More than that security, I, as a developer, am attracted by the thought that changes to code I make could be incorporated back into the product, if it’s vetted by the development team. The same is true for Textpattern, but the infrastructure isn’t in place.. As far as I know, Textpattern is Dean Allen, and if Dean gets hit by a beer truck–fates forbid–that’s it for Textpattern.

(Let me know if I have this wrong.)

More than that, though: I’m a tweaker. WordPress is naturally easier to tweak, in my opinion, than Textpattern. However, this is more my personal opinion than any ultimate truth; others may find Textpattern easier to tweak.

Finally, WordPress is the more mature product, and those aspects of Textpattern that folks like, such as the friendlier administrative interface and superior XHTML support and controls, not to mention abstraction from the physical layer, just aren’t as important to me. Or if they are, I feel they can be emulated in WordPress…with a little tweaking.

Regardless, both are good products by good people and a viable alternative to proprietary software options, which is why I’m covering both.

Enough for tonight. But as you can see, installing both Textpattern and WordPress is not a complicated process: grab the software, unzip it, place it in the weblog directory, create database and user, and then open a page in your browser and follow the instructions.

Categories
Critters

Zoe and Dorian Gray

Zoe is home from the vet, pretty wobbly on her feet. She had a lot of tests the last two days, and the doc found this and that, as doctors do with the middle aged. I’m a bit worried about her at the moment because she acts like she’s hungry and thirsty, but seems like she’s forgotten how to eat. If this continues tomorrow, I’m sure I’ll be chatting with the doctor again.

Since we take Zoe to a cat clinic, I expect to meet a new cat or two wandering about the office with each visit. The staff brings their own cats in during the day, and they join the office cats, and the patients, all of whom are remarkably quiet and polite with each other. It’s usually a lively time while you’re waiting, and never dull and never acrimonious.

If the world was run by cats, we wouldn’t have war, but we would be eating a lot of fish.

Yesterday, I spotted the tiniest little charcoal gray kitten stumbling around on unsure legs, trying to get into any open container. When I asked about him, the receptionist said that his name was Dorian Gray, and that he was hand fed kitten, just heading into its 6th week. Just so interest wasn’t aroused, she said that the doctor who treats Zoe had just adopted him.

It seems little Dorian was found in the walls of a condemned house that was being torn down. It’s mother was killed, but Dorian was saved by the crew and brought immediately to the vet. Now, he’s an extremely curious, friendly, engaging little fellow that is mothered by the cat of one of the other people who worked in the office–a cat that was also abandoned as a baby and hand fed and adopted. You’d know this cat anymore, because she’s a glamor cat, and about the sweetest natured thing you ever saw–but who likes to get up in the toys on the wall and knock them all down.

When I picked Zoe up, I brought my camera, and I thought you’d all like to meet Dorian Gray and Christa.

[image lost]

Yes, Christa has a boa necklace, bright pink nail guards, and her tail is dyed delicately pink with safe vegetable dyes. She truly is a glam cat.

But then look at this little doll, trying to crawl into my camera case.