Archive for September, 2005

Yawn

Thursday, September 29th, 2005

For some reason it seems like it’s been a while since my last post. I guess that’s probably because it has been a long time since I wrote about something other than Langosta. But for those of you who like my entries-that-should-be-in-a-changelog, there’ll be some Langosta updates at the end.

This week has been a rather hectic one for me. On Monday, I got a lot of homework. I went to a meeting of school newspaper design editors (I’m a design editor) and learned that we were supposed to have the layout ready to go to press by this coming Monday. Wonderful, especially since half of the articles promised by students hadn’t made it to the common network drive for articles yet. Then, I got home to find an email from my beloved uber-client saying that, due to unforeseen circumstances, I would have to format and post a list of over 100 winners from their awards show and code an ordering system so that winners could buy their pictures from the show online. And it all had to be done as soon as possible. More work, woo. At least I was getting paid for it, though.

Tuesday was not so bad as far as homework went, but now had to go to a meeting after school called the Writing Center, where students in AP or IB classes could get more service hours by helping other students with papers and such. That first meeting was a total disaster, with only four of the thirty tutors showing up and only one student coming while I was there. I think I was the only one who actually helped anyone, but we got credit just for being there, so it didn’t really matter.

When I got home, I began working on the stuff my client had assigned me, finding quickly that it would take much longer to finish the project than I had originally hoped. Luckily, I had most of the night to work because I had done all my homework at the Writing Center with the other tutors while we were just sitting around doing nothing.

Wednesday was both a welcome relief and more stressful. This was one of those random days chosen to be half-days by the administration, so all my periods, especially the skinnies (45-minute periods) were really short. I presented a graphic organizer about characters in Death of a Salesman in English, worked frantically on the newspaper layout in that class, did absolutely nothing in IB History of the Americas, worked on an easy past-tense worksheet in Spanish, and took a painfully-difficult test in physics. It was a roller-coaster ride of sorts until lunch, after which I had another test in pre-calculus. I couldn’t finish that test in time, so I had to stay after to finish the last few problems on the page that I was working on. I caught a bus home and worked a bit more on the ordering system and on Langosta, then felt extremely lazy and went downstairs and watched a few TiVo-ed shows that had piled up. I was able to justify it because one of them was about the Atlantic Wall, the string of fortifications built along the Atlantic coast of Europe by Hitler during World War II. I have to do a paper on D-Day, so I paid careful attention.

I continued working on the ordering system last night, but I failed to finish it. Today, newspaper was again a hectic class as people tried to force the final articles in, but I felt as if we were making progress on the layout. IB History of the Americas was slightly more interesting because we discussed political cartoons, and I was happy to answer correctly the tough but completely unrelated question: What is the 5th Communist nation after China, Cuba, Vietnam, and North Korea? (Answer: Laos)

In physics and pre-calculus, we went over the scores from the tests done on Wednesday, and I didn’t do too bad, though I fear I might have a B+ on my mid-term progress report for physics. I’ll elaborate on the reasons for that when I have more time to write. My math score was good, but we’re still doing fairly easy review work, so my grades might not be as high as they are now later on in the semester.

This afternoon was supposed to be another Writing Center meeting for me, but I had to skip it in favor of working on the newspaper again. Because I have Adobe InDesign CS as a part of my Creative Suite package (includes Photoshop and Illustrator), I was elected the person who gets to do the final design edits this weekend. Yay, more work again, and this time I won’t get paid for it.

Once I got home, I worked on the ordering system and winner list for another few hours, finally finishing it at about 10:00 PM. So far I’ve only had to iron out one bug with the script that resizes full-size photos down to thumbnails on the fly — I tried to use the imagecreate() function to make a new image to resample the larger one to, when I should have used imagecreatetruecolor(), which can store the more detailed color information found in JPEG files. With that one fixed, I think everything should work just fine. I’ll post a link so that you can admire my handiwork once it’s been made live.

My final task for tonight was to work on my newspaper pages (the front and back ones). I didn’t finish, but I’ll have all weekend to work on it if I have to. Or will I?

I hadn’t mentioned it yet, but on Sunday I’m flying down to Kansas City with my dad to see my first Chiefs game in Arrowhead Stadium (the only one that I’ve been to was in San Diego), which should be awesome. The loss to the Broncos Monday night was terrible, but I think the Chiefs should do better now that they’re back on their own turf (actually, Arrowhead has grass, not turf, but I digress). A certain friend of mine will be rooting for the Eagles, but we all know that they can’t stop Priest Holmes and Larry Johnson.

The only problem with the game on Sunday is that we had planned to go to a 12:00 game, but it was later rescheduled to 3:15. Luckily, our plane flights give us a good window, but we’ll be cutting it close at the end.

My weekend will also be sucked up by a trip down to Chicago on Saturday with my dad, my brother, and one of his friends. Kohl’s is doing some kind of employee event, so we get to go down to the Six Flags theme park and ride all the roller coasters even though it’s closed to the public. There will still be other people there from Kohl’s and possible other companies that rented the park for the same day, but the crowds should be much smaller than they were at Six Flags Magic Mountain in Los Angeles when I went in March 2004.

To top all this off, tonight went from boring and normal to downright scary because my dad was in a major car accident. He and a friend that he carpools with were in his Jeep on I-94 when the traffic slowed to a stop (as it often does on that particular highway). My dad stopped behind a small truck, but he saw a large semi-truck coming up behind him, and it didn’t seem to be slowing down. Everything happened so quickly that there was no time for him to do anything about it, and the next thing he knew, the Jeep had been rear-ended and slammed into the back of the smaller truck. I don’t know much of the details, but the Jeep was totaled (yay for insurance!). However, even though the entire front end of the Jeep had been crushed accordion-like by the force of the impact, and the airbags somehow failed to deploy, both my dad and his friend escaped with only minor injuries (some scratches, cuts, and bruises). So yeah, it’s been an interesting night.

I was going to write more, but I’m just too tired. Everything else will have to wait for Monday.

sIFRed Headings

Thursday, September 22nd, 2005

I’ve added sIFR to the headlines on Brettia. Basically, sIFR is a JavaScript function that replaces an HTML text element on a page with a Flash movie that renders the text of the element in whatever font the designer wants. Since most web designers are limited to about ten core fonts that are installed on most computers, sIFR is a godsend. It has its limitations, though, which is why it probably looks kind of crappy in older browsers. I have no desire to support anything older than Internet Explorer 6, Firefox 1.0.x, Opera 8, and Safari 2. The new design still fails miserably in Internet Explorer - I’m working on it, I promise. I’m using transparent backgrounds on my sIFRed elements so that the gradient will show through on entry headings, and the transparency doesn’t seem to work using any Linux-based browser (correct me if I’m wrong). Some fixes for this might be an upgrade to the latest version of the Flash Player or turning off JavaScript for Brettia.com, which will disable sIFR completely (along with anything else on my site that uses JavaScript). An update to Langosta that adds the ability to toggle sIFR on and off is forthcoming (this weekend).

Comment Editing, Finally

Monday, September 19th, 2005

Langosta now allows users to edit comments that they made. This is a feature that could easily be abused on a site with more readership, but I’m not that worried about it on Organon. Everything should work fine, but you never know with my code.

I also made lots of internal changes, bringing the version to 1.1.15, with 10,200 lines of code in the repository (this excludes any code that I didn’t write). Expect to see at least a little bit of Ajax later this week after I add the ability to delete comments as well.

I was happy to see yesterday that the Chiefs beat the Raiders, though due to homework I was unable to watch the entire game. Man, watching it in HD on ESPN was awesome, though. It truly is a completely different experience, especially when most of the standard definition games shown by DirecTV are on CBS feeds, which are of a quality so poor that it looks like I’m watching a thirty-year-old archive reel on ESPN Classic. Yay for the AFC West!

Yup, Another Redesign

Saturday, September 17th, 2005

Brettia has been redesigned once more. I’ve taken a simpler approach this time, though I left room for lots of improvements when I have the time to implement them. There are still many things that need to be added, but the new design is mostly done. Eventually I will style the forms, promise.

One major difference in functionality between Langosta 1.1.8 and 1.1.12 is the change from views as plugins to views as view objects. Most modern PHP projects use some form of a programming idea called MVC. MVC is made up of three components that comprise an application: the model, or the database and the code used to query and update it; the view, or the layer of interaction between the applicaton and the user (this could be via XHTML over HTTP or via a desktop blogging client over XML-RPC or whatever); and the controller, which receives commands from the user and passes them along to the model. Langosta uses a loose form of MVC, and part of the view layer is made up of views and actions. A view in Langosta is any rendered XHTML or XML page. Anytime a user requests a blog entry or a form, it is a view because Langosta is only outputting information, not changing the database or parsing user input. An action receives data from the user and modifies it as is necessary before storing it. Actions never display information, but they can redirect the user to a view. This system works extremely well because it keeps the application organized and the different parts of it separate.

Until Langosta 1.1.10 (which only briefly was live on Brettia), views were implemented as template plugins for the template library that I use, Savant. When I first coded the view system this way, using template plugins seemed like a good idea. But they were less flexible than objects because the plugins were only functions, and they seemed too integrated into the template code. So, I spent a few hours refactoring the view system, and now that problem has been resolved. The second step in this will be to change the action system so that it is in line with the way view objects work, but that shouldn’t be too difficult (there are only two actions defined in Langosta right now: addComment and addEntry).

The second large change in Langosta 1.1.12 is the use of a JavaScript effects library called Scriptaculous. You might have noticed that pages now fade in as they load - this is an example of what Scriptaculous can do. I’d eventually like to use it more, especially once I get around to implementing a search function (live searching!). Because of Scriptaculous, live comment preview has been temporarily disabled. I’ll re-enable it once a few bugs are ironed out.

A final big change that I should note is the move from a page that tailored itself to 800×600 resolution to one that works best in 1024×768 and higher. I find it hard to believe that anyone who vists my site even owns a monitor that can’t do 1024×768. If there is someone out there who still uses something that old, I’d recommend getting a new monitor - you can probably find a decent one for about $100. If you’re stuck in 800×600 and you don’t know how to change it, it’s actually not that hard to do:

  1. Right click your desktop
  2. Click Properties
  3. Click the Advanced tab
  4. Move the resolution slider from 800×600 to 1024×768 or higher
  5. Click Apply
  6. Click OK at the prompt asking you if the new setting is correct, and then OK in the Desktop Properties applet

There. Now you have no excuse.

On an unrelated note, I did get the HD DVR on Thursday, and I was very impressed. I noticed the difference right away - it felt as if I was hovering above the field (when watching a football game). But more on that tomorrow, after the Chiefs game. Die Raiders, Die!

Bash Scripting is Fun

Monday, September 12th, 2005

Today I finished writing my first ever Bash script. It’s a very simple script that is designed to export the latest stable copy of Langosta from my Subversion repository, remove development tools and files that should not be on the live site (like migration scripts for moving the database from WordPress), and replace the configuration file used on Marklar with the one containing the right passwords and paths for my web server.


#!/usr/local/bin/bash

echo \"Preparing to update the copy of Langosta on Brettia to HEAD\"

svn export http://www.brettia.com/svn/langosta/1.1-STABLE /home/brettepps/web/public --force --quiet [wrap]

--username=doctor --password=worm

echo \"HEAD Revision exported to /home/brettepps/web/public successfully\"

rm -rf /home/brettepps/web/public/migrate

echo \"Removed migration tools\"

rm /home/brettepps/web/public/TODO

echo \"Removed TODO file\"

rm /home/brettepps/web/public/stats.php

echo \"Removed statistics script\"

rm /home/brettepps/web/public/includes/array.cnf.php

mv /home/brettepps/web/public/includes/array.cnf.php-brettia /home/brettepps/web/public/includes/array.cnf.php

echo \"Removed development configuration and replaced it with Brettia config\"

This is one of the things that TXD makes possible that could never have worked with any other host. Just being able to run a Subversion repository on my website has made a huge difference because it allows me to work on Langosta from any Internet-connected computer. Now I just need to figure out a way to check out a working copy of 1.1-STABLE from school….

DirecTV HD DVR

Monday, September 12th, 2005

For the past eight years, my family has had DirecTV satellite service. We like it for the following reasons:

  • The price per month hasn’t increased since we became subscribers in 1997.
  • The guide is easy to use and is actually a part of the satellite receiver’s software, not a seperate channel like it is with many cable companies.
  • There are lots of add-on packages available, such as NFL Sunday Ticket, which lets us watch every NFL game each week. This is also great for people like us who don’t live anywhere near the city where our favorite team plays, which keeps us from being able to watch them play on local TV networks.

About a year ago, we finally succombed to the craze and got a DirecTV TiVo, and it’s been a wonderful experience. Life without TiVo seems impossible - how could you watch all the shows you want without it? Combined with a new 61-inch widescreen HDTV, TiVo became even better. But the problem with the standard DirecTV TiVo is that it can’t digest an HD feed, therefore we had to watch standard definition feeds on our HDTV. Though the picture still looked great, we couldn’t help but feel that it was a waste to have an HDTV without any HD channels.
To solve this problem, I went to DirecTV.com back in January and looked up the cost of upgrading to the newly-released HD TiVo, which would allow us to record up to 200 hours of standard definition programming and 30 hours of HD programming. Unfortunately, the unit being sold by DirecTV was still $1000, with an extra charge each month of $11 for the HD channels. We decided to wait since football season was about to end anyway.
Lately, my dad has been itching to upgrade to the HD DVR again. On Thursday, we again journeyed to the DirecTV website, and again we found the HD DVR to be too expensive ($650). I was disappointed but not defeated; I decided to check other websites to see if anyone was selling the HD DVR at a discount. Unfortunately, the lowest price we could find was $500 at Circuit City. Feeling that our dreams of HD programming would never be realized, I desperately went to eBay for the answer. EBay proved more than helpful, turning up a number of cheap used HD DVRs. More interesting was a large chunk of listings for special “coupons” that would allow the user to get an HD DVR for $299 minus a $100 rebate.
We nearly bought one for $10, but I decided to Google some things and see if this was really possible. In fact, the coupons were probably perfectly valid, but there was no need to buy one. For current DirecTV customers, getting a good deal on an HD DVR or any other satellite equipment is as simple as calling the customer retention number at 1-800-600-6977. After a bad experience with DTV’s standard support, the representative on the customer retention line was awesome. For $200 and a two-year contract for DTV service (as if we were planning on changing services anyway), we got our HD DVR along with free professional installation and any extra equipment that we need for it to work (an extra dish, off-air antenna, whatever).
So come Thursday, I will be newly immersed in the amazing experience of HDTV. I have a feeling that not a whole lot of homework will get done on that night. And on Sunday, when the Chiefs crush the Raiders in Oakland, I’ll get to watch Kerry Collins’ eyes rolling back into his head in high-definition each and every time that he gets sacked. I can’t wait.
By the way, the Chiefs pwned the Jets on Sunday, winning 27-7. The Chiefs would have shut the Jets out if it hadn’t been for a touchdown scored in the last 30 seconds of the game. Had that happened, it would have been the first Kansas City shutout since 2002, and the first time that the Jets had been shut out since 1995. Our defense no longer sucks.

TextDrive VC3

Monday, September 5th, 2005

My web host, TextDrive, is offering a lifetime hosting package. A one-time fee of $399 gets you a gigabyte of space, room for up to 15 top-level domains, and all the other normal TXD features, like support for Ruby on Rails, Python, etc. I’ve just upgraded my account to this plan, and I’d encourage anyone else looking for a kick-ass web host to do so as well. These kinds of deals only come along once in a while. Also, 50% of the profit from the sale goes to the open-source project of your choice, and another percentage of the profit goes to various charities helping victims of Katrina. So if you happen to have an extra $400 burning a hole in your pocket, this is the deal for you.
Note: I’m not affiliated with TXD, nor do I profit from referring people to them. I just love them enough to give them some extra advertising.

First Impressions

Thursday, September 1st, 2005

Well, today was the long-dreaded First Day of School (of Doom). I’ve spent the last three days doing my summer homework for IB English, but it seems that it was all for nothing. I read Cat on a Hot Tin Roof on Sunday and did six questions of the 15-question study guide. I promised myself that I would finish the study guide on Monday, but I procrastinated (surprise, surprise) and put it off until Tuesday. I woke up on Tuesday with a strong urge to finish my homework just to get it out of the way, but several things that I needed to do struck unexpectedly, so I didn’t get any work done Tuesday until 10:00 at night, when I continued working on the study guide for Cat on a Hot Tin Roof. Wednesday was Judgment Day, so I got it together and, after waking up at about 9:00, somehow managed to stall until noon. At that point I knew that I’d be lucky to finish even one of my two remaining books. From 12:00 to 2:30, I finished the study guide for Cat on a Hot Tin Roof (finally!). From 2:30 to 5:00, I read Narrative of the Life of Frederick Douglass, An American Slave, which probably would have been 200 pages in regular book form (my copy was a packet printed off a free literature website). From 5:00 to 7:30, I did the study guide for that book. I then spent another three hours reading Death of a Salesman, which, though it is one of my favorite plays, was not a fun read with only a few hours left before I simply had to go to bed. It was 1:00 AM by the time I finished the study guide for that play, and it was 1:30 by the time I had packed up my backpack, taken a shower, and fallen into bed. What a good way to begin the school year!
I’m not saying that not doing my summer homework until the last minute wasn’t my fault. I’m saying that I’m a dumbass for procrastinating. The problem is, I still got it done. Even when I have procrastinated, stalled, and lazed about wildly, I’ve never managed to completely fail an assignment. I’ve never even had to turn something in late. I was supposed to study for about a month prior to the AP European History test before taking it, but I didn’t start until about two days before the test day, and yet I still managed to get a five out of five. The thing is, I think I need a massive failure to get it through my thick skull that procrastination is never worth it. Or I could just stop giving into the desire to do anything that’s not school-related, even dumb things like checking my email or RSS reader compulsively just to waste time. Yeah, it’s that bad. But more on my reluctance to do anything school-related later.
When I awoke this morning after about five hours of sleep, I wasn’t exactly excited about the first day of my junior year of high school. For some reason, the switch inside of me that changes my mind from summer-mode to school-mode had not yet flipped; I felt like I should still have a week or two of vacation left. But today was the day, whether I liked it or not, so I got up and got ready, ate a granola bar for breakfast, and got a ride to school with my mom. I only had a few minutes before the bell would ring, so I went straight to my first class, IB English with Mrs. Pawlowski (pull-OW-skee). I really didn’t know what to expect (this is an unfortunate side-effect of not having gone to OHS for long enough to know which teachers are the good ones and which ones aren’t).
I really liked Mrs. Pawlowski. She reminded me of my old AP European History teacher, except high on caffeine. I’m looking forward to that class, even though English isn’t exactly my favorite subject and the workload is looking to be hard. I also like the fact that the class is small - about 15 kids. I was sort of unnerved when I noticed that there were only two boys in the room (including myself), but I guess it’s not that big of a deal. I have a feeling I’ll have to read a lot of parts if we ever read a play in class, though.
I’m less enthusiastic about my next class, Newspaper. I had been looking forward to it as a way for me to be able to better my writing skills, but as soon as I got there, I realized that the class was the dumping ground for kids who had a 45-minute hole in their schedule and had no other options to fill the gap. Having gotten used to the joy of honors classes, which are devoid of slackers and idiots, I didn’t especially like returning to a normal class again. Were the class one where the work was mainly individual, it wouldn’t be such a problem, but I’m not exactly jumping for joy about having to work on a story with a partner who doesn’t give a damn about anything. Since I have enough credits right now to easily graduate next year, I’m actually considering dropping the class and replacing it with a study hall or something. I have a feeling the extra time could be helpful when the IB workload begins slowly crushing my already downtrodden spirit.
My third class was IB History of the Americas (HOTA). I’m excited about this class because I know that I’m more than prepared for it after AP European History. The teacher, Mr. O’Leary, is kind of weird (he kept cracking jokes that no one laughed at), but in a good way. He talked a lot about the workload during his introduction, and he actually laughed at how much we’re going to have to do over the next two years. I laughed too, but only because I thought it was funny that he was so blatantly poking fun at us for getting in way over our heads.
After HOTA was IB Spanish, which I was looking forward to as well because the class is geared toward students who are at Spanish II (equal to Spanish 3-4 in Arizona) level, but I’ve already passed Spanish IV (equal to Spanish 7-8 in Arizona). The teacher hinted at more advanced work for me at times because I’ve already done so much Spanish, but I’ll be more than happy to just go through the class normally and consider it an easy A.
At the end of Spanish I was beginning to get ravenously hungry, even though it was only 10:30 and I still had a class to go before lunch. That class, a full 90-minute block, was IB Physics. I’ve been turned off on science classes ever since the utter waste of time that was freshman Biology at Cactus Shadows, though I was beginning to find chemistry interesting by the end of it last year. I don’t know if I’ll feel the same way about physics. The teacher seems nice, and I know many of my classmates from chemistry. I’ll just have to get over my natural loathing for all things science (weird, when I’m such a Wired-reading computer-building website-designing geek) and learn to like it again.
Lunch, finally! My lunch is the last one of the three, so I didn’t eat until 12:15. That really isn’t that bad, but I guess eating breakfast before dawn made me hungry earlier. After lunch, my last class of the day was Pre-Calculus Honors, with the dreaded Mrs. Krugmann. However, by the time I had met her and she had introduced herself, I no longer saw any reason to dread her class. It was math, and therefore I wasn’t overly excited about it, but she didn’t seem that terrible. Besides, she is one of the few math teachers who is nice enough to give a weekly schedule of all upcoming assignments so that students like me can do all their homework on Monday and have the rest of the week free. Most math teachers that I’ve had would always put the homework up on the board only after they had finished lecturing, hoping to get students to hang on their every word. For me, this had the opposite effect, and I ended up either zoning out and sleeping with my eyes open or writing random stories and poems (yes, I degraded myself and wrote poetry without being prodded into doing it by an angry English teacher with a Viking war helmet and a Communist-era Russian Olympic hockey jersey *gasp*), when I could have been doing something productive, like my math homework. If this wasn’t enough, I was even happier to see that the class numbers a total of ten students, which meant that with 60 books, there were way too many. This was a good thing because it means I can leave my officially checked out book at home and use one from the class set in class. Nice.
All in all, though Newspaper might end up being a disappointment (I’m not giving up hope yet, however), I think I did rather well with my classes this year. They will change a bit after this semester (Pre-Calculus will end and be replaced with…something), but I think the entire year should be a good one. Also, I’m in a lot of classes with the same kids, so I’ll have the chance to make some friends before going off to college and having all those friendships shattered again like they were after a certain recent move. I’m also planning on joining a few clubs to make sure I appear well-rounded enough to colleges; right now, the top ones on my list are: Literary Magazine (I was on the staff at CSHS during my freshman year), Robotics (cool!), National Honors Society (not my favorite of the bunch, but I get IB service hours for it), and a club that I don’t remember the name of that is like a writing workshop for advanced students where I can tutor kids and get IB service hours for it.
Cawd-moen-feesh!