January 2008

Computer Issues

Jan/28/2008 09:46 PM

My desktop has reached the two year old mark now. Though, it's been non-operational for the last month. A while back my DVD burner died, but it wasn't the end of the world. I was backing up a lot of files to it at the time and my have over-worked it. It was, after all, the generic burner Dell gives out. At some point, I ended up subscribing to Netflix and along with that started to make copies of all the decent movies I rented. This was fine at first, I have 1.3TB of space on that machine. Though it may seem like a lot of space, once you account for the porn and all those DVD ISO's, it goes away quick. So, with some money I got for my birthday, I decided to by a new burner.
Now, I hate to turn off or reboot my computer. So, the burner sat in a box for a week or so. Within that time, I came home from work one night to find my computer off. And it wouldn't turn on. Being the tech I am, I did the normal troubleshooting such as stripping the box down to just the motherboard, RAM and video card. Still nothing. I decided to take the CMOS battery out as resetting the BIOS was the last idea I had. After I did that, all of a sudden the box started to power on. I was happy for about a half second. Then a flame came from the bottom side of the video card. This scared the shit out of me as I have never seen a literal fire inside a computer. After my reflexes powered the box off, the flame went out on it's own. I was able to get the box up and running with a crappy 32MB PCI card. This lead to me purchasing a new video card. Which of course, is kinda nice as it's better than what I had before. Being a mostly non-gamer though, it's not something I would like to invest money in. I could have bought another hard drive :)
Once my video card arrived in the mail, I had to test it out. I feared one thing in the back of my mind. I was worried there may have been damage to the PCI Express slot. And what do you know, the new card didn't work either. So, I realized at this point that I was now going to have to buy a new motherboard. This is not as easy as it sounds. My desktop came with an 'awesome' BTX motherboard. A failed attempt by Intel to redesign motherboards. Of course, they canceled BTX boards. Neither Newegg nor Tigerdirect even have a single one on their site. I checked out eBay. There were two different boards total. One was shitty, one was fairly better than what I have now. So..., now I am left with the decision. Go with the one single selection of BTX board I can find, or replace the entire case and board.
Couple more weeks go by. At this point, I have just been using my laptop and remote desktop to access my desktop. This worked well. That was, until I got an error from Window's saying it couldn't write a file to the disk. Long story short, my newish 750GB drive is dead. This was my baby. And now, my computer is basically in shambles.
Thankfully, I should be getting some decent money back from my taxes. I owe my mom some money, so she is getting the first dibs on it, but after that, I need to fix this heap of parts. I am also thinking that replacing the power supply may not be a bad idea. With the fire, and the dead hard drive, I think these issues may stem from the power supply failing. Also, it's not a very strong one anyways, it's only rated at 350W and it's running the power hungry Pentium D along 4 hard drives.
Anyhow, I've since been getting a lot of use out of my laptop, but I certainly don't want to kill this thing. I don't really like having it running non-stop.

Site Rewrite Underway

Jan/13/2008 11:35 PM

I've made a decision to start a rewrite of this entire site from the ground up. Cameron's Thoughts 3.0 will be the next generation code base that this site will be based on. I started a wiki to track progress and to record idea's and such. When I created Cameron's Thoughts 2.0, I didn't have my idea's well organized and it became somewhat troublesome near the end. I got things together and everything turned out fine, but this project will be way more immense and I have a much better idea of what I am in for now, so I am able to better plan ahead. The following is my current info taken from the wiki.

History

There's a detailed history on Cameron's Thoughts 2.0 changes that happened after it was released at Cameron's Thoughts - About This Site.

Basically, I first started Cameron's Thoughts as a default install of Movable Type on June 22, 2003. There was a number of changes made to the stylesheet and templates, but that was about it. I then decided to rewrite all the stylesheets and templates from scratch.

Thus, Cameron's Thoughts 2.0 was born. It was about 9 months of work total. The first few months were basically total research. This was research into how to properly code to produce 100% valid XHTML, full accessibility and also for search engine optimization. Really, if you do the first two properly, the third one pretty much falls into place. I also had to really learn CSS as I only had limited understanding of it at that point. On June 21, 2005, a day before the two year anniversary of my site, Cameron's Thoughts 2.0 was launched. This was an exciting day for me as it was the completion of a number of months of hard work. Plus, I actually made a deadline I set for myself. Since the release of Cameron's Thoughts 2.0, I have become very strong at coding with PHP. The initial Cameron's Thoughts 2.0 code had some PHP, but it was limited. I've released numerous enhancements since, including a fully database backed image system, a user/authentication system, and moved the comments off of Movable Type and onto my own code. There are tons of other things also added since then, and the site is mostly written in PHP now.

Problems

Coding for Cameron's Thoughts 2.0 started in 2004 and fully completed my dream of what I wanted back then. Four years have since past and the site does not seem perfect as it once did and doesn't live up to my current standards.

Speed

Speed is a major issue with the current site. On a entry page, it takes an average of 0.93 seconds for the page to load. This may not seem like a lot, but most other sites will average under 0.2 seconds. Basically, I feel it's noticeable enough and makes the site feel sluggish on a high speed connection. I've spent a lot of time optimizing code where I've seen potential to improve things, but from what I can tell, the problem is with the core design of the site and my current efforts have been fruitless.

Code Maintenance

At this point, the code feels hacked together. There is limited organization. Every time a new system is added to the site, it's mostly just been hacked into the current code. The authentication system is a prime example. It's one of those things that the site should be designed around, instead it was place on top of everything else. I feel it's well integrated at this point, but the back of my mind tells me that there is got to be some problem somewhere in the implementation that I'm not seeing as nothing else was coded with it in mind.

Modernization

The site doesn't utilize any modern site features such as Ajax. And adding these features on would be an immense project.

Goals

Here are the basic goals that I have lined up for Cameron's Thoughts 3.0. I will add more detail in the future.

Continue to use 100% valid code and follow accessibility standards. Use Ajax to improve user experience. Make sure any use of Javascript degrades gracefully and is fully separated from the structure. Move away from Movable Type and use a completely homegrown CMS solution designed specifically for this site. Develop a caching system that will help combat any high load situations (I have already been working on a caching system for another project that will work well here) Migrate some of the current system such as the stats, authentication and comments and better integrate them into the new code. Develop a templating system for the CMS this site will run on. I have also tinkered with this before. Possibly create a plugin system so future site enhancements will be easier to add on.

CommentAPI for Movable Type

Jan/13/2008 05:53 PM

I was going through some things on my site today, fixing up some bugs and such. One thing I noticed was that I never rewrote my CommentAPI support after I changed the way comments were handled on this site. I don't believe anyone ever posted a comment using CommentAPI, but I thought it was kind of nice to learn how it worked and to provide some support for it. It's somewhat of an older standard, and never really caught on, but I think it is really handy. Anyhow, I thought I'd release the code I had come up with. It still needs a little work to be perfect, but this did allow comments to come in on my Movable Type 3.2 system.

Here's PHP that took the comments in and submitted them to Movable Type:

<?php
//Created by Cameron Bulock 07/12/2005 - 09/06/2006
//Here is my implementation of CommentAPI for use with Movable Type

//URL to MT's comment CGI
$comment_url = 'domain/comments.cgi'

//Grab the PostID
$postid = $_GET['id'];
//Read in POST data containing the XML
$input = $GLOBALS['HTTP_RAW_POST_DATA'];

//Use SimpleXML to parse the input
$xml = simplexml_load_string($input);

//Format the data to post to MT
$url = urlencode($xml->link);
$entry = urlencode($xml->description);
$author = $xml->author;
$name = urlencode($xml->creator);

//This should work, but I haven't been able to fully test, currently just using $author for the author field, but $creator should be MT's equivalent to author
$dc = $xml->children('http://purl.org/dc/elements/1.1/');
$creator = urlencode($dc->$creator);

//pull email address out of authors field
preg_match("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $author, $match);
$email = $match[0];

$data = "entry_id=".$postid."&email=".$email."&url=".$url."&author=".urlencode($author)."&text=".$entry."&post= Post ";

//Setting up cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $comment_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

//Run cURL
$process = curl_exec($ch);
curl_close($ch);

//Return a 'Created' HTTP response.  This is currently just assumed even if not successful
header('HTTP/1.1 201 Created');

//The server response needs to be reworked and more informative, see: http://www.imc.org/atom-protocol/mail-archive/msg01384.html
?>

After you have the code on your site, you also need to update your RSS feed to support CommentAPI. There are two things that need to be changed. First, the <RSS> tag needs to have the following added to it:

xmlns:wfw="http://wellformedweb.org/CommentAPI/"

Here's an example of what the full tag will probably look like:

<rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/" 
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:content="http://purl.org/rss/1.0/modules/content/" 
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
> 

That may or may not be how yours will look, depending on if you use any other namespace extensions to RSS. Mine actually is quite a bit larger.
Then, you need to add the following lines inside of the <MTEntries> tag:

<wfw:comment>
<$MTBlogURL$>comments/post.php?id=<$MTEntryID$>
</wfw:comment>

Of course, change the path to whatever you have named your PHP file.

Please be aware, this code is freely available for whatever use you'd like. Though I have tested and successfully used it myself in a couple different programs that supported CommentAPI, I don't know for a fact that the support is complete. For one thing, there is no error checking. Also, the HTTP responses don't fully support all the responses that should be sent. Also, since it uses SimpleXML, PHP5 is required to run this. There is no guarantees, and I can't be responsible for the code. I'm just offering this as I planned to release it once it was more complete, but as I am no longer using Movable Type's comment system, I won't be using this anymore and it's may be of some use to someone.

Monster Mixxd

Jan/12/2008 11:34 PM

I first saw a can of Monster Mixxd at Speedway a few days ago. The same Speedway where I first saw Monster M-80. The same one that sadly no longer carries Monster M-80. I was sick earlier this week, so I wanted to save it for when I was feeling better. I've been looking forward to drinking this all week.
You may or may not know, I love Monster Energy drinks. The original Monster Energy is a classic, and Monster M-80 is my favorite drink of all time. I can never get enough of the M-80. So, I had high hopes for this new Monster as it is also in the "Energy+Juice" category like my beloved M-80. Though, this one is only 30% juice as opposed to 80%.
I cracked open the can and took a smell. Bad idea, was gross, yet familiar. Took a sip. Worse idea. This stuff is horrid. I've since taken about 6 sips over the last 20 minutes thinking maybe the taste would grow on me. It's not. I have determined it smells kinda like a rum and Coke. One made with really crappy well rum.
If you like Monster or M-80, I'd recommend sticking with those, don't waste your money on this one. It's exciting to see a new Monster on the shelves, but this one just doesn't live up to the name. Speedway, please bring back the M-80!!

2008

Jan/07/2008 12:10 AM

So, yea, it's 2008 now. I thought I'd maybe write some post looking back at 2007. Not a whole lot to say really. Moved out of my dad's again at the beginning of the year. Had a few pretty decent parties at my new place. Got a new job. Met a ton of random ass people. Basically drank a whole lot in between. All and all, was certainly a good year. Had few complaints. Really, at one point, not sure if this was 2007 or not, I decided that I really wasn't going to worry about where my life was going in the long term, I have been a much happier person. Not to say that I want to be a bum, or I don't want to achieve anything, but I used to always try to plan my entire next 10 years and base everything I did around that. All that caused was stress and a feeling of never accomplishing my goals. My new plan is to live until tomorrow. So far, it's gone well and I always can be happy to know I've done what I set out to do. There's been a couple times this last year where I almost didn't quite get to the next day, namely, the very first day of 2007. But, I'm still here. On that note, I really have no idea what 2008 will bring. Leaving Corecomm was really my only thing I really wanted to do last year, and that is done. I'm loving my current job, so I can't really see leaving it anytime soon. So, at this point, I'll probably just keep doing what I'm doing and hope things turn out well. This has turned out to be a really lame post about 2007. It's not even titled 2007. Blah...


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser