Thursday, March 31, 2011

The Difference Between Men and Women

A friend emailed me this as a bit of humor recently, and I thought I'd pass it along.

----------------------------------------------------------------------------------

Here’s a prime example of “Men are from Mars, Women are from Venus”, offered by an English professor from the University of Colorado for an actual class assignment:

The professor told his class one day: “Today we will experiment with a new form called the tandem story. The process is simple. Each person will pair off with the person sitting to his or her immediate right. As homework tonight, one of you will write the first paragraph of a short story. You will email your partner that paragraph and send another copy to me. The partner will read the first paragraph and then add another paragraph to the story and send it back, also sending another copy to me. The first person will then add a third paragraph, and so on… back and forth. Remember to re-read what has been written each time in order to keep the story coherent. There is to be absolutely NO talking outside of the emails and anything you wish to say must be written in the email. The story is over when both agree a conclusion has been reached.”

The following was actually turned in by two of his English students, Rebecca and Gary:

(first paragraph by Rebecca).
At first, Laurie couldn’t decide which kind of tea she wanted. The chamomile, which used to be her favorite for lazy evenings at home, now reminded her of Carl. who once said, in happier times, that he liked chamomile. But she felt she must now, at all costs, keep her mind off Carl. His possessiveness was suffocating, and if she thought about him too much her asthma started acting up again. So chamomile was out of the question.

(Second paragraph by Gary)
Meanwhile, Advance Sergeant Carl Harris, leader of the attack squadron now in orbit over Skylon 4, had more important things to think about than the neuroses of an air-headed, asthmatic bimbo named Laurie with whom he had spent one sweaty night over a year ago. “A.S. Harris to Geo-Station 17,” he said into his trans-galactic communicator. “Polar orbit established. No sign of resistance so far…” But before he could sign off, a bluish particle beam flashed out of nowhere and blasted a hole through his ship’s cargo bay. The jolt from the direct hit sent him flying out of his seat and across the cockpit.

(Rebecca)
He bumped his head and died almost immediately, but not before he felt one last pang of regret for completely ruining things with the one woman who had ever had feelings for him. Soon afterwards, Earth stopped its pointless hostilities towards the peaceful farmers of Skylon 4. “Congress Passes Law Permanently Abolishing War and Space Travel,” Laurie read in her newspaper one morning. The news simultaneously excited her and bored her. She stared out the window, dreaming of her youth, when the days had passed unhurriedly and carefree, with no newspaper to read, no television to distract her from her sense of innocent wonder at all the beautiful things around her.

(Gary)
Little did she know, but she had less than 10 seconds to live. Thousands of miles above the city, the Anu’udrian mothership had launched the first of its lithium fusion missiles. The dimwitted wimpy peaceniks who pushed the unilateral Aerospace Disarmament Treaty through the congress had left the Earth a defenseless target for the hostile alien empires who were determined to destroy the human race. Within two hours after the passage of the treaty, the Anu’udrian ships were on course for Earth, carrying enough firepower to pulverize the entire planet. With no one to stop them, they swiftly initiated their diabolical plan. The lithium fusion missile entered the atmosphere unimpeded. The President, in his top-secret mobile submarine headquarters on the ocean floor off the coast of Guam, felt the inconceivably massive explosion, which vaporized poor, stupid Laurie and 85 million other Americans. The President slammed his fist on the conference table. “We can’t allow this! I’m going to veto that treaty! Let’s blow ‘em out of the sky!”

(Rebecca)
This is absurd. I refuse to continue this mockery of literature. My writing partner is a violent, chauvinistic, semi-literate adolescent.

(Gary)
Yeah? Well, my writing partner is a self-centered, tedious, neurotic, whose attempts at writing are the literary equivalent of Valium.

(Rebecca)
Asshole!

(Gary)
Bitch!
 

Ye Old Pump Co

This is a poster I created for an imaginary pump maker, with a humorous twist.


 

Wednesday, March 30, 2011

14 Reasons To Date an Engineer

14. We are trained to do it right the first time

13. We are used to all nighters

12. We are always willing to experiment

11. We know how to decrease and increase friction

10. We know all about heat transfer

09. We do it with more torque

08. We can wire your circuits

07. Free body diagrams

6. Potential for smart children

5. Engineering couples have better moments

04. We know how to deal with stress and strain

03. We know it's not the length of the vector that counts, but how you apply the force

02. "Lubrication, Friction and Wear" is actually a class

01. The world DOES revolve around us....we pick the coordinate system.
 

Creating Button Links Using Unordered Lists

I've long enjoyed the Windows Classic theme. On the old gray taskbar, one can pin icons of favorite programs. On hover, borders appear: light on top and left, dark on bottom and right. When clicked, the light and dark flip, and the content inside, either a small image or text, move down and to the side by 1px. This gives the appearance of a button being depressed. It's a very simple effect that seems to have been forgotten in this world of Web 2.0 we live in, so I've decided to try and replicate it myself for the navigation bar of my site.

You might ask, why not use the button or input tags? The problem with those is lack of customization options. While it might be a bit more code to build your buttons from scratch, you have a much wider range of options after they are finished. With the advent of HTML 5, you can even use this method to create curved buttons without using bandwidth-consuming images, though this tutorial doesn't cover that specifically.

First thing, create your html document. For this tutorial, I'm going to set up a very simple document, with a container that's got a gray background, to make the bottom and top borders of the buttons easier to see. It's important to play around with colors. Sometimes the area beside a button is a color that makes the border hard to recognize, which robs from the effect.



Inside your initial div container or inside your page create the button. Note, I'm going to make two buttons beside each other. This method easily allows creation of 1 or as many as you want beside each other, by adding more li's inside your ul. First create div container and set the id to whatever you want. I use "nav".



Next, create your css document. First, we enter the aspects that don't change. Background color, height, width, etc.



Next, in the same file, we set up the styling of links inside the id. Note, if you applied the settings below to the li itself, it works. That also has the benefit of letting you create the button without it being a link. However, if you do that, it causes problems for expanding sub menus. For those, it's possible to limit the button effect to the initial menu, and have the expanding menu appear not as 3D. Applying the effects direction to the li tags, it's not possible, at least that I know of, to do so.

Note: The first tag, for a, is broken with a space. In the first part, those are styles that don't change. Only the borders, background, and margin change. The margin changes to move the text inside slightly, to add to the effect of the button.



When hover occurs, the borders appear. They are created individually because we want more than one color. When active (clicked), the bordered are flipped in regards to color. The margin also changes, moving the text down and to the right 1 px each. The finished product of our tutorial is:

Monday, March 28, 2011

HvZ Spring 2011 - Day 5

12:59 pm

I'm meeting up with Matt and a few others. The same small squad that we traveled with to get the the mission last night. In HvZ, 1 experienced player with a good gun is worth more than 10 crappy newbies with socks, and all 6 of us have played before. We are meeting at Cary in a few minutes, and going to walk down to south campus again, to meet Scruffy and find out how to survive.

3:21 pm

Success! We have survived! The extraction mission was the best one yet, balanced and difficult, but possible, and we did it. About 40 humans made it I think. We started off with maybe 200 total, and we had to travel to two spots to disable ZSPN stations. Each spot had to be held for 4 minutes. South of Windsor, then up to Slater Hill. Finally, we traveled to Cary Courtyard for the final battle. We entered the courtyard from the Northwest corner, and traveled along the north side to another group of humans (we split up early on). Then we stopped, which was bad because we had to get Scruffy to the south side of the yard. I along with another human started shouting and rallying. Humans are like sheep, if enough people yell to do something, they'll follow directions. Together, we got them moving, and fought off two charges. We got to the south side, established two lines, and settled in to hold the spot for 20 minutes. We had about 150 humans left at that point.

Over and over the zombies charged. Respawns every 5 minutes, with rolling respawns from hiveminds, which meant 2 times every 5 minutes. I was in the front line, down on one knee, and over and over, the alpha trooper saved me. I ran through 3 of the 35 dart drums, moving back to fill both of mine up again during 1 charge in the middle. We slowly dwindled, each time taking less, and it was close. On the last charge, my side had about 15 humans guarding it, vs 50 at the beginning, and we lost about 5 or 6. We could have stood one more, maybe. But just before they charged again, the timer sounded. We had won! Success!

At the beginning of the video below, you can see one of the first charges, when we still were many. I give a little arm pump at the end.



----------------------------------------------

So ends another game of HvZ. And so I can continue my claim of Surviving the week.

Fall 2009 - Survived
Spring 2010 - Survived until the final mission.
Fall 2010 - Survived until the final mission.
Spring 2011 - Survived

What will the future hold?
 

Friday, March 25, 2011

HvZ Spring 2011 - Day 4

Note, day 3 has no entry because I had class all morning and afternoon, and then straight from that had CESAC duties.

---------------------------------------

9:30 am

My peaceful dreams of robots (I've been reading an Asimov robot book recently) were interrupted by my roommate's alarm. Even after he left, I tried to fall back to slumber, but could not, so I finally got up.


11:45 am

I haven't gone outside yet, my first class isn't until 4:30 anyway. I want to leave early though, because on Wednesday, I hurried to get to class and almost got killed for it. During the day, hurrying is a behavior of those with a deathwish.


2:05 pm

Matt and I are about to meet up. He's going to Chauncey Hill for a late lunch and I'm going to go ahead to WTHR where my 4:30 class is.


3:44 pm

I got to WTHR easily, without any significant problems. Matt and I parted ways at BRWN, because I could walk through the rest of the way. Class at 4:30, and then I'll have to walk back to Cary.


7:15 pm

The night mission is up soon, starting at 8. There are Zgames, and also a resistance mission, which is what I'll be going to. I'm meeting Matt again (safety in numbers), and will be headed down to the south side of campus. I'll give an update after I get back from the mission.


10:11 pm

The night mission did NOT go smoothly, at all. We started on the south side of campus, and traveled north. The goal was to destroy radio towers being used to broadcast the ZSPN games. However, as we approached memorial mall, we noticed that there was not a single zombie in sight. I decided that it was a trap, as did a few others. We convinced the group not to charge straight in. We detoured, and started scouting, moving toward the fountain by Beering. Still, no zombies. We saw groups of runners further north, but hid and weren't seen. We heard screams further north, but still weren't seen. We finally spread out and began to move north ourselves. I got separated from the group, going west to scout. I found a lone human standing watch beside a safe zone, and asked where everyone was. At the same time, I saw our group, north near Elliot. And a third at the same time, a group of 10 zombies saw ME. I stepped into the safe zone, and 2 other humans managed to get in. We parried words for a moment, and then one humans broke off, 2 zombies following. That only hurt the odds, for now it was 1 on 4. However, I had an alpha trooper, and my fellow human had a raider. After a minute, he pulled out a blowgun, sniped one, and then I darted forward and took out another. With only 6 left, we charged past, and then kept going. I took out 2 behind us, and the rest gave up.

I then looked for my group, staying in the shadows and dodging several hordes. At one point I almost triggered a witch, but was able to back away silently. I eventually gave up and made my way to GRIS where I have to work from 11-2.

I found out later, my group had continued on and accomplished the goal, capturing the broadcasting towers. This cost ZSPN quite a bit, and forced them to fire the Gladiators they'd hired, which will become important tomorrow, hopefully.
 

Wednesday, March 23, 2011

HvZ Spring 2011 - Day 2

4:12 pm

I woke up late today, and quickly packed up and headed out at 1:16 pm. I got to CIVL without any problems, and have spent a few hours working on homework and CESAC work. Everything caught up, I'm about to leave to head to class at WTHR, which is going to be a long and dangerous trek. Wish me luck.


4:21 pm

I've been bitten .. one of the buggers got me from behind, I was stupid and wasn't watching. He infected me (took my feedcode), and then left. I got to class and pumped myself full of antibiotics. It's a forlorn hope that they will stop the infection, but we'll know within 3 hours of the bite (zombie has 3 hours to turn my feedcode in online, or else I'm still human. It's because I can't play as a zombie until he does). Sadly, I'll probably be a zombie next time I update this.


7:34 pm

As the hours passed, my body grew weaker and more racked with pain. Tremors overtook me and finally I passed into a deep coma. I have awoken to find myself weak, but still human. Apparently my body was able to fight off the infection, and I have survived! (It's been over 3 hours, he still hasn't turned in my feedcode. I actually gave it longer, it was until 7:21, and I went until 7:30, still nothing). I shall continue my fight against the unclean! ... after work.
 

Tuesday, March 22, 2011

HvZ Spring 2011 - Day 1

Note: I will be editing this throughout the day, each entry will have a manual timestamp.


10:12 am

I'm about to leave for class, it's a pretty short distance, maybe 3 minutes on foot. At this early, I highly doubt I'd see any zombies, but one must always be prepared. I've got a nerf Alpha Trooper, which was loaned to me by a friend, and which I've fallen in love with. I'm loading it with a normal clip, and no stock, to keep the weight down. However, in addition to the bar minimum class supplies, I do have an extra clip, a Raider stock, and a full 35-dart drum in my backpack, for emergencies. Hopefully I won't have to break it out today.


2:47 pm

I got to class alright, and then after it was over at 1:30, had a short hop to CIVL. No biggie, I didn't see any zombies. I've been here now since then, getting math homework completed, now I've got to get to ME to turn it in. I won't be staying though, it'll be back out, and then back to Cary.


3:39 pm

My zombie count is now up to 1. I made it back to Cary with no significant problems, but while I was skirting the Engineering Mall, a headbanded (not OZ) zombie charged me. I put the old boy down with a single shot (again, loving this Alpha Trooper, it blows the Barricade out of the water in accuracy), and moved on. Skirting around the outside edge of campus, I tried to stay out of buildings as much as possible, but I did go through Physics to avoid the bus stop. There's no way to avoid the people there, and any could be an OZ. I'm leaving for EE in a few minutes, I have one class left tonight.


7:44 pm

I got to EE without any trouble, and then from there went to my friend Matt's apartment. We waited until 6 pm for the OZs to become visible, and then headed to Ford for supper. Maybe it was our fierce appearances, but we weren't troubled by any zombies. We then went back to his apartment and I continued to Cary. Tonight's mission starts in a few minutes, it's something about restoring the power to the safezones on campus. Matt I am will be meeting up again for it. I've gotta say, it's nice to have someone to watch your back who won't run at the first sign of trouble.

9:17 pm

Matt and I met up at his apartment and headed to the mission, but were late a few minutes. We caught a group headed for campus, and went up to Armstrong. With them, we bunkered down and held the spot for 15 minutes. It wasn't difficult though, as the only zombies we saw were Rave. They challenged us to a dance off, which we won. After the 15 minutes were over, we escorted our power-fixing NPC back to CL50.

We considered calling it quits for the night, but we got a call saying that the group which went to MEE was in trouble, still fighting, but needed help bad. We couldn't leave 'em, so we headed towards it. However, we were seemingly too late, because halfway there, along the east side of the Armory, we saw a huge hoard of zombies steaming in from the engineering mall. We backtracked around the south side and onto the east side of the Armory, the sidewalk. We got lucky, because the zombies hadn't charged yet. They were all coming up, but coming up slowly, trying to get into positions for a mass charge. We never broke formation and ran, but we also never stopped moving, and so we never gave them an opening. We were moving north along the east side of the Armory, feeling pretty good, when suddenly blocking the path was Rave. Being Rave, they wouldn't attack. But they weren't moving either. We checked for no cars, got an okay from the mod, and booked it across the street. We headed due west, along the north side of Lawson Hall and then to Tark. We ended up not losing a single person. At Tark the group broke in half, some going north and others west. Matt and I with a few others headed west. We dropped him off at his apartment and I continued back to Cary. I saw one more zombie, in the Cary courtyard, but he wasn't really thinking well because he charged me. 1 zombie vs an Alpha Trooper in the hands of a prepared human, no contest. I'm recuperating now ... a shower was needed badly after I got back ... and then I have to go out one more time. I've got to work at CIVL from 11-2. Getting there won't be a problem. Getting from there to MATH and then back, that will be tough. I'll update this one more time when I get back. Hopefully I'll be alive.

2:23 am

The day is done, I'm back at home safely. (Today isn't over until I go to bed, dammit) Getting to CIVL was easy, as predicted. Getting to MATH was more interesting. Zombie kill count +2. Getting home from MATH was interesting, because I was all pumped up from the encounter on the way there ... but it was for naught, because I didn't encounter a single zombie on the way back. Now, time for sleep. Goodnight, and stay safe.
 

Monday, March 21, 2011

The Zombies!

The zombies are coming, the zombies are coming! They want to nom your brains! Flee for your lives!

It's that time of the semester again, time for another round of Humans vs Zombies! Starting tonight at midnight, and continuing on until Saturday, Purdue's campus will be a raging cauldron of awesomeness, with nerf battles galore.

I was planning on using a modded nerf barricade this semester. Stock, it's a semi-automatic pistol, battery powered. It's a revolver though, meaning it takes a long while to reload. I spent more of yesterday working on rebuilding it as a clip-fed pistol, and while it now almost works, it only works correctly, when a single dart is in the clip. Any more than that, and it's a no-go. I've figured out the problem (friction), but it's too big to fix before tomorrow. So for now, I'll be armed with a stock Alpha Trooper for daytime, and my modded longshot for night missions.

Time to kill me some zombies. Muahahahaha
 

Saturday, March 19, 2011

Obama Has Finally Decided to Help Libya

No extra words are needed.


 

Ever Wanted To Be A Pirate?

I found this today, though a cool Google Lab entry called Google Reader Play, which is basically StumbleUpon before StumbleUpon started making you sign up. It makes me wish my parents had been rich while I was growing up, because what kid wouldn't want a tricked out 2-story room that's also a pirate ship?





Source (More pictures)

EDIT: I found an interview view the designer.
 

Wednesday, March 16, 2011

Overreaction And Christian-Bashing

In wake of the tragic earthquakes in Japan, a girl posted this video on Facebook. She exclaims how happy she is that God grabbed Japan and shook it (killing thousands) to let atheists know that He is here.



It's obviously an insensitive and cruel video, and it makes Christians look ... really bad. And already, people are jumping on the bandwagon to write about how evil it is, and in turn, how evil Christianity is. The problem is ... it's a fake:



What is the best way to discredit someone/thing? Frame it/them for something horrific. I have no idea if she is a Christian/Muslim/Atheist, etc. What I do know is, her video has brought on a slew of Christian-bashing blog posts and articles, as well as Facebook threads. Was that her original point? Probably not, I suspect she was just doing it to get a rise from people. But it's certainly being used that way, even by some bloggers that I normally have a pretty high respect for.

Example, CLS made a post in response. While admitting near the top that it was Satire, the blogger went on to use the video as an excuse to bash all of the "faith-inflicted" out there by responding as if the video was real, referring the video-poster multiple times. "She prayed that God would show he was loving, thousands of people are killed in a natural disaster" No, she didn't. She said that to provoke people, and she obviously succeeded, to the detriment of real Christians everywhere.
 

Tuesday, March 15, 2011

WiFi: Invisible, Until Now

Timo Arnall, a visual artist, created a device to measure WiFi signal strength. By walking it around Oslo, Norway and using a long-exposure camera, he created a series of visual pathways showing the hidden signals that connect us.



More information, as well as pictures: here.
 

Friday, March 4, 2011

Javascript Expandable Navagation Tree

A top level navigation menu is pretty common on the internet these days. You hover your mouse over a link and more pop down. These can be built entirely with CSS, because they aren't really dynamic. Yes, they do change when the mouse is hovered over, but both the hover and non-hover states are pre-built, and the browser displays them. Nothing in the page or code changes or is really affected by the user.

Javascript menus though, are more advanced. They can be affected by the user. This is why javascript is what I'm using to remake the section navigation menus on my website. I was inspired by the Blog Archive on Blogger. If you look at the trangles, you can click them, and it hides or shows more sub pages. What I didn't like though, is the fact that clicking the word beside the arrow also toggles the arrow. I want them to be separate. I looked for a while and found this method, which works very well. I adapted it for my website, changing the minor things like formatting. The only problem is that the posted script doesn't allow for control over the initial state.

Now, I don't really know much javascript. I'm good at interpreting code though, of any language. And it turns out, this is a pretty simple code, when you break it down. All it does is:

On the page load, it turns off the display of the submenus, setting menu to closed.
When you click, if menu is closed, it opens, and if menu is open, it closes.

$(document).ready(function()
{
$("#root ul").each(function(){ {$(this).css("display", "none");} });
$("#root .category").click(function()
{
var childid = "#" + $(this).attr("childid");
if ($(childid).css("display") == "none") {$(childid).css("display", "block");}
else {$(childid).css("display", "none");}
if ($(this).hasClass("cat_close")) {$(this).removeClass("cat_close").addClass("cat_open");}
else {$(this).removeClass("cat_open").addClass("cat_close");}
});
});

We don't want to mess with the clicking function. What we want to change is the begining part, that sets it all to closed when the page is loaded. Instead of setting all to closed, we want to set only some to closed. So, we add class="closed" to the sub menus we want closed, and then instead of $("#root ul").each(function(), we put in $("#root .closed").each(function(). root ul means all uls inside the root. But root .closed means, everything that we set the class="closed" to inside the root. IE, we control it instead of it doing everything. The new script becomes:

$(document).ready(function()
{
$("#root .closed").each(function(){ {$(this).css("display", "none");} });
$("#root .category").click(function()
{
var childid = "#" + $(this).attr("childid");
if ($(childid).css("display") == "none") {$(childid).css("display", "block");}
else {$(childid).css("display", "none");}
if ($(this).hasClass("cat_close")) {$(this).removeClass("cat_close").addClass("cat_open");}
else {$(this).removeClass("cat_open").addClass("cat_close");}
});
});

Success!
 

Wednesday, March 2, 2011

A Libertarian Defense of Laws Requiring Employers Not To Hire On The Basis of Sexual Orientation

Under Federal law, it is illegal to hire or not hire someone on the basis of that person's race or gender. However, with the exception of a few States, it's perfectly legal to make that decision on the basis of sexual orientation.

As a libertarian, I believe that because they take away personal freedom, all laws are inherently bad. Thus, each must cause a significant positive effect to offset that. A law that makes murder illegal is quite obviously good overall, because the protection to life it provides far outweighs the loss of freedom. Laws forcing non-discriminatory hiring though, are much more gray. Lets first examine the more general set of laws, before looking at the specific Sexual Orientation category.

Negative Effects:

Loss of freedom ... If I start a business, shouldn't I be allowed to decide who I want to work with? Losing the ability to choose who you works with in a company that you yourself founded is absolutely a negative effect. It's government interference that controls your life.

Promotion of bigotry ... The fact that we have these laws means that the majority of people are against discrimination. If discrimination was legal, then the bigotry would no longer be hidden, and would actually help kill off the bigotry faster. Example: Company A hires a homosexual man because he's more productive than the other candidates. Company B hires the less productive heterosexual man instead. As time goes by, companies that discriminate would cripple themselves, and hopefully go out of business, thereby removing bigoted people instead of forcing them to hide.

Positive Effects:

Fairness ... In the short term, people who are discriminated against have a much better chance of getting a job.

Global competitiveness ... Discriminatory hiring practices cripple a company in the long term is it is competing with companies that don't hire on the basis of performance. By forcing US companies not to discriminate, we boost our competitiveness globally.

Good Feelings ... Discrimination just feels wrong, very unpolitically correct. It makes people feel good to know that the the US is a progressive nation that enforces fairness.

Overall

I'm divided on the anti-discrimination laws. There are good and bad effects. When they were first introduced, the situation clearly called for them, because while overall in the US, most people were against discrimination, in many States, especially in the South, the majority of people were all for it, which meant that the only way to give African American's a chance was by forcing it.

In 2011 though, the problem is much diminished, and so I feel there would be a good argument for getting rid of all of them.

Sexual Orientation

All of the above is non-consequential, because the laws that already exist will never be repeal .. not in our lifetimes anyway. They are too firmly entrenched in our culture. That said, I fully support adding sexual orientation to the list or race, gender, etc, because right now, women and african americans have protections that homosexuals do not. It might be beneficial to remove ALL of the anti-discrimination laws, but it's not fair to have them for Some groups, and not others.