Michael Cleaver -

 Programmer, Network Installer, Computer Handyman

Great thoughts speak only to the thoughtful mind, but great actions speak to all mankind. - Theodore Roosevelt

Welcome

Hello and welcome to my site. I'm Michael Cleaver, a Computer Science major at Ohio University. I'm still working on building this site, but please take a look around.

Flyin' High in the Search Rankings

This site is now the number one result on Bing and Yahoo! searches for "michael cleaver", and 7th on Google! That makes me pretty happy. Of course, this means that I now have to worry about people finding it before I'm really finished. I still need to get around to making a web version of my resume, and I wanted to get a page up with example projects that I've done.

Also, I missed mentioning it on the eleventh post but the page has now rolled over. You should see the "older posts" link after the final post on this page. It leads to the archives where you can find older posts.

New Color Scheme

I can't say that I was really fond of the color scheme I was using on the site. Obviously, I thought it looked okay when I set up the new design, but I changed my mind after looking at it for a while.

Well, tonight I decided to do something about it. I was able to do almost all the changes in the CSS, without touching HTML/PHP. The only exception is that I needed to add a div tag around posts and page text in order to give them a different BG color and border outline. I think the new look is much better. It just goes to show that color is just as important as the layout.

Graph Project Coming Along

I've got the main bulk of the presentation layer built using values from flatfiles. Nothing exciting about it just yet, but so far I've been doing the relatively easy stuff. Well, I did have to write a bunch of javascript for it, which is not a language I have any experience with, but it's not that difficult. Most of what I was writing had to do with cookie manipulation.

In other news, by the time I get off of work, I'm not really feeling like doing a lot of coding. Therfore, I think I'm going to put the Reversi project on hold. Besides, I just wasn't getting into it. I'm also realizing that I can't really do daily/semi-daily posts, because I just don't have something relavent to post every day. Afterall, I didn't intend for this to be a journal.

Chat Rooms and the Big Project

Well, I finished up the conversion of that project today. There's not really anything to say about it.

My supervisor then told me to make a chatroom using application state and AJAX. I first built a page with a text box for the username, a text box for the message, a submit button, and a label to display the chat dialog. I tossed in some validation to make certain that there was a name and that there was no HTML in the message. Then I set up the submit button to save the current contents of the label plus the new message to the application state. The application state is used in the same manner as Session, but it is system-wide instead of per-user and lives as long as the application instead of being cleared on a timer.

At this point the chat worked, but it only showed new posts when the page was refreshed. Time for some AJAX. I placed a partial update control around the label (but not the text boxes or the submit button). Then I stuck a timer control into tha page, so that the I could make the label refresh every half second. It's not the most impressive chat room, but it's more impressive looking than most of the projects I've done in school. It also isn't horribly complicated and didn't take a long time to write. That's probably why it was assigned to me.

As I was finishing up the chatroom, my supervisor brought me the project description for my first production project, so that I could read it over before meeting with the boss to discuss it. It's basically a relational data viewer to help them analyze trends. I will be primarily working on the presentation and business logic tiers with the data access tier being handled by my supervisor. It seems like its going to be challenge, so I should learn a lot.

Finally Some Programming

I started off the day with one last tutorial. Then my supervisor assigned me a simple project to help me get comfortable with the way state is handled in ASP.NET. I had to build a page that displayed a list and had a button on it that added an item to the list. That doesn't sound hard, but ASP.NET doesn't save the state of variables between page loads. This isn't any different than PHP, and the workarounds are the same. I first built a page that used AJAX to maintain the state of the list. It just did a partial page load and added the new text to a label's text. Then I built one that used ASP.NET sessions, which is also fairly simple. Sessions basically works as a persistent state dictionary for an individual user. You store your values in Session before you reload the page and read them out when the page loads. You must do a typecast when you read the values, because .NET doesn't know what the type being read will be when you write the code.

When that was done, I got set up with a project on the Team Foundation Server. They gave me access to an old project they weren't using anymore, and told me to convert it from VB.NET to C#. This is supposed to get me more comfortable with C#'s syntax and familiarize me with TFS.

The Tutorials Just Keep On Coming

I spent today working my way through more tutorials. I didn't get to any real programming yet, but my supervisor says they'll have the big project ready for me soon. They haven't said what this project is yet, but it's some fairly important tool.

First Day on the Job

I started my internship today. I was given the title of "Junior Web Developer". I think that's a pretty snazzy title for my first job in the field, especially for an internship. They are a completely .NET shop, so I will be working with ASP.NET, primarily developing in C# and AJAX. Since I have no experience with any of those technologies, my first day was spent going through tutorials and reading the MSDN documentation. Not terribly exciting, but I have to learn the basics somehow.

Attempt at Clean URLs

I was messing around with the site's archives script in an attempt to get it to use clean URLs (archives/42) instead of PHP posts (archives.php?page=42) so that search engines have an easier time with it (and because I think it looks nicer). I tried using a trick where you tell the server to treat a file with no extension as PHP and to treat anything in the URL after that file as a variable. After trying many different configuration lines, I found that my host needs:

<FilesMatch "^file-name$">
ForceType php5-cgi
</FilesMatch>
to force URLs with "file-name" in them to be treated as requests for a file called "file-name", and to parse that file as PHP. I then get the passed variable(s) with:
$_SERVER['REQUEST_URI']
in PHP.

I chose to use this method instead of Apache's mod_rewrite module because it is less resource intensive and could still be used if I had to move to another host that did not support mod_rewrite.

Unfortunately, this does not look like it will work for me. All relative links include the faux-path, so it tried to include a CSS stylesheet from "./archives/42/", which does not actually exist. I fixed this by making all relative links absolute, but it makes site maintenance more difficult and makes the scripts less portable. The other issue is that it doesn't just return the stuff after "file-name" as a variable, it returns everything after the domain name. This means the script has to be told what depth it is at in order to begin parsing the variable. All told, I wasted a good 2 hours on it. Oh, well. At least I learned something from it.

Site Formatting Change and Starting Reversi Project

Yesterday I modified the stylesheet and post parsing function slightly to better format the posts. I modified the paragraph spacing, added indents to the first line of paragraphs, and changed the spacing between posts. I also decreased the spacing between the title and the body of posts.

In other news, I have decided to start a new programming project. Back in CS240C, Prof. Dolan had us write a text-based version of Reversi in C++, using a game class from the book (Main and Savitch). Well, the class wasn't really well suited to Reversi, and I'd never played the game before, so mine didn't turn out quite as well I would have liked. Don't get me wrong, the game worked just fine and looked pretty good for a text-based game, but I felt the code was more cumbersome than was necessary and I was unable to write an AI that could beat Prof. Dolan without looking ahead very far.

Thus, I decided that I am going to revisit the project, this time using Python and not being restricted by a generic class that doesn't fit so well. I'm going to start out with a text-based interface like before, but once I get the game working I will try to create an interface using SDL and Pygame.

Also, I've gotten word from the company I interviewed with and they want me to start on the 6th. The pay quoted is good and they seem to want to give me a good internship experience, so I'm going to take it. This means I will also be posting about the interesting things I learn about on some real world projects. I'm fairly excited to get into some non-theoretical work.

That Didn't take Long

Well, it looks like I've gotten the archives working. There obviously aren't enough posts here for you to see it yet, but it tests out okay on my test server when I use a bunch of "Lorem Ipsum" posts.

Now when there are more than 10 posts you will see a little link after the last post. This will point you to the archives page with older posts shown 10 at a time.

Older Posts->