James Cassell's Blog

Tuesday, May 29, 2007

19th Birthday

Today was my 19th Birthday. My best friend stopped by as did my cousins. We socialized and ate cake. A few people gave me cards and gifts. I gave my aunt a tour of the house, as she hadn't seen it yet. This was unexpected, and my room was cluttered for the occasion.

Anyway, I decided to go back through my old posts in this blog and fix spelling mistakes, and add tags to some of them. I only did this for the past year. I made corrections back through the post about my 18th Birthday. I haven't yet finished adding tags yet. Many of the posts even older than that don't even have titles because I was too lazy at the time to title them.

Labels: ,

An Appreciated New Feature of Blogger

While I am disappointed in the lack of support for the Opera browser by Blogger, I just ran into a feature in the new version that I very much appreciate. It validates my input. It used to be that whatever I typed into the box was exactly what was published, errors and all. With the new version, it will alert the user to well-formedness errors. For example, I just accidentally closed an <abbr> element with "</a>". Blogger alerted me, and I corrected the error before it was published.

Now, if only they would make the spell checker work in Opera, along with everything else that doesn't work.


NHS Link

My school's web site finally linked to the National Honor Society site. After the sponsor teacher told me that she didn't think that it would ever be linked to, I decided to something about it. On Friday, I looked up the whois information on mountainviewhs.net. I sent an e-mail to the address listed under the administrative contact information. I pointed out that both the MVHS band and the Technology Student Association had links to their respective sites, and asked that a similar link to the NHS site be added.

This morning, I received a confirmation e-mail from the person to whom I had sent this request. There is now a link. One thing that slightly annoys me, however, is that the link points to "http://mvnhs.com" instead of "http://www.mvnhs.com" (note the "www"). This means that anyone who clicks the link has to make two requests to my server. Once to mvnhs.com, which will tell them to go to www.mvnhs.com; and one to www.mvnhs.com, which will return the actual page.


Blogger not Working with Opera

My goodness! Blogger is not working with Opera. It is really getting on my nerves! I just had to jump through a lot of hoops to get to the page where I can make a post. A significant number of people use Opera because it is a great browser. The least that Google can do is to test their services and make them work in Opera as well as other browsers.

If they had the same problems with Firefox or Internet Explorer, there would be outrage, and they would get a lot of bad publicity. A lot of people use Opera because it is a great browser. It is a huge pain when something like Blogger doesn't work. The old Blogger worked fine with Opera. I don't know what they did that made it break in Opera, but I hope that they fix it soon.

Labels: , ,

Thursday, May 24, 2007

Excitement about Rensselaer

Yesterday, I logged onto the Rensselaer accepted student forums. People have profiles that include photos, locations, and stuff about themselves. I set mine, and added a photo of myself. It was one from when I still had my braces, so I decided to Photoshop them out. It took quite some time, though most of it was that I hadn't used Photoshop before.

Anyway, I was reading through the posts there, and reading people's profiles. I was actually up until 3 A.M. yesterday (it is like 2 A.M. now). I have access to all of Rensselaer's online resources, and reading through all of what they have, I am pretty excited about going there.

I was reading about the computer package they have. The specs have not yet been released for the 2007 computer, but it will be top-of-the line, or pretty close to it. I have my notebook that I bought at the beginning of this school year, but the battery life is terrible. I am wondering if I can get the new computer each year, and sell the old. I like the idea of constantly having a new machine. My only concern about the machine that they will have is the screen resolution. This is a very large concern for me. After having my current notebook at 1920 by 1200 pixels, it is difficult for me to use anything lower; I feel very restrained when I try to do so, such as on the computers at high school.

Labels: , ,

Friday, May 18, 2007

End of Classes at Community College

This past school year, I took two semesters each of calculus and physics. I took calculus at Germanna Community College, and physics at Northern Virginia Community College. I went to class for the final time this week. I ended up with A's in all of them, and am pretty happy about this. I am taking a Dual-Enrollment English class at my high school in conjunction with Germanna Community. For the first semester, I received a B+, which according to Germanna's grading scale should've been an A (Germanna is on a 10-point scale; my high school is on a 6-point scale). My grade shown in the records at Germanna is in fact, a B rather than an A. If I had taken the class physically at Germanna as I had done with calculus, I believe that I would've earned an A.

Anyway, It's nice to have free time after school. I am still working on the NHS site. I spoke to one of the teacher sponsors today about getting a link to the NHS site from the Mountain View site. She said that she didn't think it was going to happen. I intend to ask her whom I should speak to in order for this to happen.

Labels: ,

Sunday, May 13, 2007

Current Work on NHS Site

Over the past week, I have been working on a web-based management system for the NHS site. I am trying to make it as easy as possible to update and add pages to the site for whoever will maintain it when I am not there next year. To be completely honest, I don't know if anyone actually visits the site besides me; it has been very useful to me in that I can easily keep up with NHS activities.

I am going to store page data as XML. I was going to use SimpleXML to read back the data, but I don't have access to PHP 5. I am essentially building my own XML parser. It should not be too difficult; I plan to store everything opaquely by running it through PHP's htmlspecialchars() function before storing it in the XML file.

The first thing that I am working on (before implementing the code that writes the XML file) is validating user input. Since the site is served as "application/xhtml+xml" to browsers that support it, I need to make sure that the input is well formed, and properly nested to avoid a draconian XML error (these are good in that they force authors to produce well formed code). Checking for well-formedness was quite a challenge. I eventually came up with a slow, recursive function that checks the input. It isn't fool-proof, but is good enough for my purposes because I am encoding all HTML special characters to their corresponding entities for markup that I don't recognize. I only recognize a pre-defined list of markup elements.

I do hope that this site that I have spent much time on is actually used and appreciated.

In case anyone is interested, here is the function that I came up with to check if the input is well formed:

function validateInput($content) {
 $content = preg_replace('/<!--.*?-->/s','',$content);
 if (strpos($content,'<')===false)
  return true;
 $fullElements = preg_match_all(
$content, $matches,PREG_PATTERN_ORDER);
 if ($fullElements == 0)
  return false;
 $valid = true;
 foreach($matches[3] as $key => $value)
  $valid &= validateInput($value);
 return $valid;

Edit 27 May 2007 23:59:38 EDT: there is a problem with this function that incorrectly identifies proper markup such as: "<div>text<div>text</div>text</div>" as invalid. I am working on this problem.

Labels: , ,


Good news! I managed to get back my old URL. It now redirects to the new one. Now old links will still work. I've decided to keep the blog at JamesCassell.com.

Labels: ,