Archive for March, 2005

Apartment Update

Thursday, March 31st, 2005

It’s been over a month since I moved into my new place, about time for an update. So far 3 of 5 walls are painted and 5 of 7 rugs are in place.

Operation scrub it down is complete. Sofa is go. Crummy TV and cable go. Living room curtins go. Old desktop computer go.

Still needed: 2 of 5 walls, 2 of 7 rugs, cumfy living room chair, living room lighting, a sweet ass TV, new bedding, and a new dining room set. I need to reformat that old desktop of mine, and I really need to get the artwork and pictures up on the walls.

Overall I’m really excited about having my own place to come home to again. I even scored myself a local project at work. I’m still up in the air about which is tougher a 1 hour commute twice a day or a 6 hour commute twice a week. One thing I am certain of is that it’s a lot nicer coming home to my Haverford apartment rather than the St. Louis Residence Inn.

Making the Blog Part 2

Thursday, March 3rd, 2005

The first MtB post was merely an introduction of the idea for this series. In this, the second installment, I will describe the MySQL schema used to store post information. Future MtB posts will go into the coding behind the various public and tools-oriented pages used to display and update the posts. So let’s get started.

My blog is written in PHP and uses a MySQL database to store and retrieve the posts and other information needed to make the site function. If you haven’t used PHP or MySQL before, you might want to checkout www.PHP.net and www.w3schools.com/SQL to learn more about these great technologies.

If you are already familiar with PHP and MySQL or just want to jump into things “balls-out”, then let me start by describing the schema or structure of my MySQL tables.

Currently, the jason@strangerstudios.com DB has just one table, call it post. The post table has the following fields:

Field Type Description
id int(11) The Primary Key for each post.
poster varcar(32) Who is posting the post. This is usually me, but could theoretically be the Pope or something. This field is also marked as an index.
title varchar(128) This is the title of the post, displayed in the colored header.
type char(1) This type is a letter referring to which category the post should be entered into. This allows posts to be filtered by type. Currently there are 5 types: News, Games, Writing, Art, and Other.
text longtext This is the body of the post.
date datetime The date of posting.
keywords varchar(128) This is an extra indexed field where I enter various keywords for each post. For instance a keyword for this post could be PHP or MySQL or Fuddy Duddy. These keywords aren’t currently displayed on the post, but I plan on later adding a page to search posts by keyword.

Now how do we setup this table? Well, I used PHP MyAdmin. It should be pretty self explanatary how to create the above table with this tool. If you haven’t already tried, browse around PHP MyAdmin, find the new table button, and take a stab.

If you’d like to (or need to) use SQL to create the table, here is an SQL dump of the table:

CREATE TABLE `jasonposts` (
  `id` int(11) NOT NULL auto_increment,
  `poster` varchar(32) NOT NULL default ‘jason’,
  `title` varchar(128) NOT NULL default ‘’,
  `type` char(1) NOT NULL default ‘’,
  `text` longtext NOT NULL,
  `date` datetime NOT NULL default ‘0000-00-00 00:00:00′,
  `keywords` varchar(128) NOT NULL default ‘’,
  PRIMARY KEY  (`id`),
  KEY `poster` (`poster`,`title`,`type`,`keywords`),
  KEY `keywords` (`keywords`)
) TYPE=MyISAM AUTO_INCREMENT=72 ;

I’ll let you all ruminate on this information. The next installment in this series will cover the front page and how posts are displayed and filtered using PHP and SQL queries of this database.

Look forward.

My New Apartment

Wednesday, March 2nd, 2005

I’m currently sitting on my plastic covered couch waiting for the cable guy to get here. Besides the couch, there’s also a microwave, two folding chairs, and a TV set in here. It’s beautiful. I’m also “borrowing” my neighbor’s wireless network to make this post.

I thought that I might have “Making the Blog Part 2″ up by now, but moving in is more time consuming than I thought. We (Kim and I) still need to finish cleaning the kitchen, painting the living room walls (shhh), and putting away various crap that we brought with us. We can also look forward to the fun of running the cable from the living room into the second bedroom where the office will be. I plan on getting some advice for this operation from the cable guy when he gets here.

Here’s something I made at the airport the other day:

Mean Guy Wallpaper