News Archive - February, 2006

Feb 2, 2006 8:34 pm

Ooh, Something Shiny...

One of the features that I have tried to implement on every version of SWAMP so far is alternate stylesheets. I have succeeded on various levels for each version of the site. It was definitely the most interesting to implement it in the first version of the site, since I didn't know that alternate sylesheets existed. I hand-coded a stylesheet switcher and it worked pretty nicely. The second version of the site used a javascript stylesheet switcher, I believe. However, if I remember correctly, the most recent rendition of SWAMP didn't have any alternate stylesheets, but I had contemplated many various ideas that I wanted to implement.

With version 3, I will once and for all fully implement alternate stylesheets. I even plan on taking it to the level of having stylesheets for design and stylesheets for font size — eventually...

One of the styles I have always wanted to implement, but have never been able to pull off is a metallic design. Part of the problem is that I have trouble imagining what a site made of metal would look like; but more importantly, I have never been able to make an image that even comes close to resembling any piece of metal. Last night I decided to really push myself to implement a metallic design all the way through. This will most likely be the second stylesheet designed for version 3.

The only thing I know about making metallic images is that everything needs to have texture. The most basic image you can make is a brushed metal plate — without the brushed texture, all you have is a gray box. Every time I've tried to create a brushed metal plate, I have failed; and I am absolutely clueless about how to make chrome images. So I decided to hit up Google for some photoshop tutorials.

First I searched for chrome, and was amazed at how wonderful the first tutorial I found was. As a test, I made a chrome SWAMP logo. Being so successful right off the bat, I decided to look for a tutorial for making a brushed metal plate. I went through three tutorials that all used almost identical methods, and the end result of all three were disappointing. There was just something about the texture that didn't seem quite right. It was getting late, and after three failures, I decided to give up for the night.

When I got home tonight, I decided to search for some more tutorials. The first one I looked at used a very similar technique to the other three, but had one important difference, which created a much more realistic texture. I think I actually have a very good starting point for the metallic design now. I'll try to make it not suck too bad — I promise.

Feb 3, 2006 7:02 pm

Jokes

As a trucker stops for a red light, a blond catches up. She jumps out of her car, runs up to his truck, and knocks on the door. The trucker lowers the window, and she says, "Hi, my name is Heather and you are losing some of your load." The trucker ignores her and proceeds down the street.

When the truck stops for another red light, the girl catches up again. She jumps out of her car, runs up and knocks on the door. Again, the trucker lowers the window. As if they've never spoken, the blond says brightly, "Hi my name is Heather, and you are losing some of your load!"

Shaking his head, the trucker ignores her again and continues down the street. At the third red light, the same thing happens again. All out of breath, the blond gets out of her car, runs up, and knocks on the truck door. The trucker lowers the window. Again she says, "Hi my name is Heather, and you are losing some of your load!"

When the light turns green, the trucker revs up and races to the next light. When he stops this time, he hurriedly gets out of the truck, and runs back to the blond. He knocks on her window, and as she lowers it, he says, "Hi, my name is Kevin. It's winter in Minnesota and I'm driving the SALT TRUCK!"


Doctors:
  • The number of doctors in the U.S. is 700,000.
  • Accidental deaths caused by physicians per year are 120,000.
  • Accidental deaths per physician is 17.14%.
Statistics courtesy of the U.S.Dept of Health & Human Services

Guns:
  • The number of gun owners in the U.S. is 80,000,000 (yes! that's 80 million).
  • The number of accidental gun deaths per year, all age groups, is 1,500.
  • The number of accidental deaths per gun owner is 0.001875%.
Statistics courtesy of the FBI

So statistically, doctors are approximately 9,000 times more dangerous than gun owners.

Remember: Guns don't kill people, Doctors do.

FACT: Not everyone has a gun...but almost everyone has at least one doctor.

Please alert your friends to this alarming threat. We must ban doctors before this gets completely out of hand!!!

Out of concern for the public at large, I have withheld statistics on lawyers for fear that the shock would cause people to panic and seek medical attention...

Feb 6, 2006 9:11 pm

Git 'R Done

It's been a month and all I have is a news archive and a stylesheet. But, I feel like I'm actually making good progress. The archive uses mod_rewrite, which is something I've never used before — and afterall, that's the whole point of this site. I also installed Gallery the other night and have been trying to get it configured exactly how I want it. I have decided that getting the gallery fully set up is going to be my next project. From what I've played around with so far, it seems like it's going to be a pretty big project.

After the gallery is set up and I have all my images moved over, I'm going to set up an archive of all my old posts. Tomorrow, I'm going to bring in the hard drive from my old database server so Doug can help me get all the data out of the database(s). At this point, I don't even remember what's stored on there. I know there are the old news posts, polls from SWAMP, and the posts for Thoughts, but I have no idea what else might be on there. I think I'm going to put the old posts in their own section, rather than lumping them in with the new posts, but I'm not sure yet. One thing I do know is that I can't wait to see what the original recipe for a Tropical Hurricane was.

Feb 7, 2006 8:54 pm

Doug Is My Hero

So I brought my hard drive and USB enclosure into work today, and let Doug loose. He did some crazy stuff and eventually got a full dump of all the databases (without having to know any of the passwords). Sometime in the next week or so, I'll convert the mess that is a Postgres dump into something that I can actually work with. For now, I'll just leave you with these three little treasures that I dug out of the mess:

Tropical Hurricane:

Ingredients:
  • 1 oz Gin
  • 1 oz Vodka (reco: Stolichnaya)
  • 1 oz Rum (reco: Kuya)
  • 1 oz Coconut Rum
  • 1 oz Frujá Tangerine
  • 1 oz Peach Schnapps
  • 6–8 oz V8 Splash Fruit Medley
Mixing Instructions:

Combine all ingredients in a shaker. Shake. Pour into a 16 oz cup. Enjoy!

Liquid Lollipop:

Ingredients
  • 1.5 oz Frujá Tangerine
  • 1.5 oz Peach Schnapps
  • 8 oz Hi-C Fruit Punch
Mixing Instructions

Combine all ingredients in a shaker. Shake. Pour into a 16 oz cup. Enjoy!

Fanny Shopper Surprise:

Ingredients
  • 2 oz Vanilla Schnapps (reco: Gaetano)
  • 2 oz Peach Schnapps
  • 1 oz Rum (reco: Kuya)
  • 0.5 oz Coconut Rum
  • 0.5 oz Gin
Mixing Instructions

Combine all ingredients in a shaker. Shake. Pour into a 16 oz cup. Fill with Sprite. Stir. Enjoy!

Feb 11, 2006 10:24 am

Gallery Mods

I've spent a lot of time trying to create a Gallery theme, since I wasn't too fond of any of the themes that came with the base install. This has proven to be extemely difficult, because it uses the Smarty Template Engine, which is ridiculous. Smarty's focus is on quick and painless development and deployment of your application. The reason I think this is ridiculous is because it is designed like a programming language. Performing simple tasks may be simple with Smarty (I say may, because I really have no idea), but performing complex tasks is definitely complex. As a programmer who is well versed in several languages, I am having trouble following the code that is used in the Gallery files. It appears to be object oriented and requires in-depth knowledge of the underlying object structure. To make matters even worse, all the template files are littered with a mix of Smarty and HTML, which is another problem in itself.

Despite all these problems, I am getting close to a theme that I want to use. Hopefully, I'll be able to get it to a point that I feel I can start using it by the end of the weekend. After I have finalized the template, I need to figure out how the color packs work, so I can develop the color packs that I want to use for the different albums. I'm pretty excited about getting the theme and color packs finished, because I've wanted an image gallery like this for a while, and although the gallery I coded from scratch came out really nice, it definitely has its limitations.

Feb 12, 2006 2:58 pm

The Cure For Everything

Tapan: i think i tore my rotator cuff

Tapan: or tore some ligaments

Tapan: in my shoulder

Tapan: i got home at 4am

Tapan: shit sux

Tapan: but..i did have taco bell

Feb 14, 2006 9:44 pm

Ramblings

Although I had planned on doing a lot of work this past weekend, on Sunday I decided not to do any work and just relax. Kristin and I generally cram as much as we can in to every day because we work so many hours and always have a ton of personal stuff that we want to do. It was a nice change not doing anything. I've decided to take this whole week and just relax after work; then get back in to the full swing of things next week.

It's pretty funny when I compare what I think is relaxing to what a normal person does in a day. For example, when I say I'm going to relax this whole week, that means I'm going to wake up at 6:00a, get ready, go to work, get home at 8:00p, then relax. This morning, I didn't feel well (starting to get a cold), so I decided to sleep for an extra two hours. Knowing that I slept for an extra two hours made me feel like I was going in to work very late. But, I still got in to work the same time as the rest of the world (9:00a), and even with leaving at my normal time, I worked two hours longer than the rest of the world.

Anyway, I've been watching the olympics every night, and the tv just doesn't do it justice. Watching the speed skaters, they really don't look like they're going too fast. Today, I found out that every single one of them skates over 30 miles per hour! I can't imagine what it would be like to actually skate that fast. It must be amazing to be in Torino watching the events in person.

Feb 21, 2006 8:24 pm

Invisible Javascript

I just wrote the first bit of javascript for SWAMP. It was just a small task — collapsable menus — but the implementation I chose to attempt was much more difficult than writing a simple onClick event that changed the menu's display. I plan on having all of my javascript completely separate from my HTML. One of the things I needed to do to accomplish this was get a list of a node's children, but only for a specific node type. I decided to write a generic function to do this, so I could re-use it later if I need to do something similar. While I was doing this, I decided that I'm going to make a library of re-usable javascript functions; partially to make it easier for other developers to create complex javascript functionality without too much work, and partially to get a better understanding of javascript (since it is the language that nobody knows and everybody hates). So, without further adieu, here's the function.

// get an element's children, by tag name
// returns an array of elements
function getChildrenByTagName(element, tag_name)
{
	child_array      = new Array();
	tag_name         = tag_name.toLowerCase();
	element_children = element.childNodes;
	
	for (i = 0; i < element_children.length; i++) {
		
		if (element_children[i].tagName != undefined) {
			
			if (element_children[i].tagName.toLowerCase() == tag_name) {
				
				child_array.push(element_children[i]);
			}
		}
	}
	
	return child_array;
}