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.