Wednesday, February 29, 2012

Yup, Mock Trial

Mock Trial. Yes, I realize that Mock Trial has been the subject of more than a few of my previous posts, and I know that it isn't as fancy as the posts my competitions has been doing lately (well, technically she isn't my "competition", but it feels weird to just say "Abby"). But, I don't believe that either of us have actually posted about Mock Trial since it started for this year.

At the beginning of the year, I wasn't quite sure what to think about Mock Trial. Neither of my coached from my first year were still here, and in fact the main coach from last year wasn't here either. Things were so different from last year. A lot of people had graduated, and others just didn't come back (I miss my Teleckies). But I was excited for a lot of the new people (such as Sebastian and Allie), and they turned out to be pretty awesome at Mock Trial. There were some other new people, I have one person in mind right now who I'm not going to name but I can bet you guess, who weren't quite as willing to make a commitment, but we won't get into that.

I must admit, I was disappointed for several reasons when we got the role assignments near the start of the year. First, I wasn't on the same team as Ryan. That was depressing. Second, I only had two roles, and they were some of the shortest roles that I could have possibly have received. It wasn't like it was a major calamity or anything. It was truly a really minor thing, but even those end up working out in the end. Assuming that nothing else changes, I'm going to to not only have a full four parts, but one of those will be a closing. You know, it was probably better that it turned out this way. I might have been a tiny bit too confident before, so I guess being humbled a little bit was probably a good thing.

Anyway, each year has been unique so far. But this year, I honestly think that we have a very good chance of going to state without relying on luck like last year. We've heard do so much from not only college mock trial teams, but actual attorneys who were willing to talk a bit now and then. We seem to be putting proper focus on what counts now (such as making the witnesses more than bland machines who spurt information). With a little bit of spit and polish (minus the spit. This needs to be sanitary), I foresee both our teams very well this year. I mean, it isn't all about winning. Just kidding, yes it is. Kind of a big deal.

I'm excited to see how things will turn out. Mock Trial, as always, is more awesome than I could have thought beforehand. Regionals will be in almost a bit less than half a month. That's a little bit scary, although I honestly think that our team will be ready by then.

Monday, February 27, 2012

It's Only Sexist When A Guy Does It

Before and even during the early 19th century, sexism was a major problem. Woman were regarded as lesser beings, and that was kind of a big problem. But these days the entire situation is reversed. Suddenly it is politically correct to make sure that nothing is "sexist". You would think from the word that by definition it would be being discriminatory based on gender. But for some reason it only applies to males.

The thing that just can't seem to be understood is that men and women are different. That's just a fact of life. One gender isn't necessarily better or worse, and neither is more intelligent. We're just wired differently. That's okay. So why do we as a culture have to be so focused on making everything, and I mean everything "equal"? Take video games. From what I have observed, more boys are into video games than girls. When I start talking about the new free to play League of Legends roster or the best FPS of all time, boys are usually more interested in such subjects than girls. In the same way, most boys (hipsters excluded) aren't going to get super excited about shopping for clothes. Now this doesn't mean that ALL males are into video games, and that ALL females love to shop (PS, girls who aren't addicted to shopping, you have my respect).

Of course, I'm not saying that all boys fit into the "male" stereotype, and that all girls fit into the "female" stereotype. Remember the video game example? Well, there are plenty of exceptions to that general rule. I know several girls who are almost as hardcore gamers as me, which is saying something. This doesn't mean that they are less "female" than any other girl (although they just might be a little more awesome). In the same way, there are a hoard of girls who are into more casual gaming, like a bit of Mario Kart here or there. Of course, playing video games in moderation might just be an example of increased intelligence, but you can be rest assured that I won't go there.... The point is that everyone is truly and wonderfully unique. Lumping people together into one group is only useful in extremely broad situations.

Let's take a moment to look at the family structure in movies and television. If the family is of a more traditional sort, then it is usually portrayed with the parents both being idiots, the mother being smart and the dad being an idiot, or both parents being knowledgeable people who should be respected. Admittedly there is quite a bit of the first going around, yet one of the only places that you can see the third is through reruns of "Leave it to Beaver". So why do we have all these "dumb dads"? Because if the dad was smart and the mother was an idiot then feminists would scream "sexist". <sarcasm> And of course we couldn't have BOTH parents be smart. That wouldn't be interesting! </sarcasm>

Because of this mentality, chivalry is dying. Dear feminists: when we open doors for you we aren't doing it because we have exterior motives. We aren't doing it because we think you are too weak to open the door for yourself. We don't think that you are too dumb to understand how to operate a door. We just do it because we are trying to respect you by being gentlemen. Is that so bad? Now admittedly, I don't usually have the aforementioned opportunity very often, and when I open a door it's usually because I'm near the front of a group and it's just common courtesy to everyone in said group, and if a girl is in the front of the group she would probably do the exact same thing. But you can still see my point.

Sunday, February 26, 2012

An Ode To A Legendary Reddit Comment

Dear Redditer: I saw a comment of yours tonight. In a sea of blackness: profanity, improper grammar, and trolling, your comment stood out with a blinding light. It was truly beautiful, you see, the sarcasm was well formed and sharply pointed. You reached the very heart of the subject at hand, Redditer. You did not tally in other matters, but instead diligently and honestly made your point. Your comment was sincere, you see. A rare sight on the internet of today. Your comment was neither so short that I missed it, or so long that I forgot what I was reading. No, it was three sentences. Three sentences that I began to think were not formed of mere words, but of pure power. Yes Redditer, you might not have realized it, but there is great power in your words. I was honoured to read your words Redditer, as if I was looking at a great ancient power. From what time I cannot even guess. Were your words prompted by a supernatural event, Redditer? Although it might seem absurd, perhaps something is at work here besides the possibility of birds committing copyright infringement. Perhaps this is actually a sign.

But something is wrong here. So far you have only had two upvotes. Two? Two thousand is a more pleasing number. Or twenty thousand. Or two hundred thousand. Two is a disgrace. But do not despair yet; I have a theory of how this came about. The air that we are currently are breathing has been tainted. Whenever "normal" people read your comment, it is replaced in their minds with a nonsensical piece about unicorns. Make no mistake, there are dark powers at work here. They realize if everyone was to read your comment, there would be a revolution on the Earth. People everywhere would  realize the truth; they would break the deception. And that would not do, no, that would not do at all. How do I know this, you ask? I live in a windowless sterile room with the finest of air filters. I plan ahead.

Alright, sorry about this post. You see, this is what happens when I see a hilarious comment on reddit, but am unable to do anything about it except for one lousy upvote. I couldn't exactly do anything else because no one would understand. But perhaps now I've laid enough background information that you, dear reader, can take a glimpse of the awesomeness.

Yes, they'll be tweeting angrily about the potential infringement per bird in USA that's causing job losses and profit losses for hard-working Americans and artists.
Birds should pay the periodic protection fee like the others. They also demand the right to send notices to the local government to have trees be taken down and burnt within 24 hours since some of them are venues for blatant infringements. They will give gold records to the group with the first 1000 venues cut down.

Trust me, it was better in context.

Sunday, February 19, 2012

Dancing

 As you probably know, I was at an Anime Convention called Anime Spark this weekend (if you are slightly freaked out by "anime", just read it as "nerd"). I'll probably end up writing something about that tomorrow, but that's not what I'm talking about here (although I'll have to give a little bit of background anyway). Alright, here is the sweet and short of it (not really, but I wanted to use that phrase). Because my good friends Aubrey and Sara live relatively close to me (they're twins by the way; kind of cool), we carpooled for traveling back and forth from the convention. Now I'm in the video game room most of the time on Friday, because that is kind of what I do. But in the evening there was a dance in the larger panel room. Because I had never been to anything remotely like this before, I foolishly left my video game controller behind me and went into the dance anyway, purely for observational purposes, of course. While all the silly people danced I was perfectly content to stand and watch the shiny lights which were shining all over the place (seriously, have you seen all those bright colours? Fancy).

It was ballroom dancing, of course, with the songs being from anime which I had never heard of before (no surprise there). Aubrey and Sara ended getting a prize for being awesome, and that somehow activated a thing called "snowball". Basically this archaic law meant that they could choose whoever they wanted to dance with them. Sara, who was just trying to be nice and obviously was not aware of my hermit tendencies, used this rule on me. Not wanting to disrupt the flow of the dance (though my first urge was to run screaming for the exit), I went ahead and actually danced. In a ballroom setting. With a girl. Please take a second look at that last statement. Now go off and guarantee that I wasn't hacked and someone else is actually writing this. You done? Cool. Sara, who actually knew what was going on, placed my left hand on her shoulder and we danced for a few steps (I clumsily, of course, because I always was trying to go the wrong direction). After about twenty seconds it was over with and I retreated back to my fortress of solitude, namely the pillar which I was standing next to while staring at the pretty lights going all over the room.

To a lot of highschoolers this wouldn't seem like a weird thing at all. But remember, this is me we're talking about **list a large number of reasons why I'm not interested in this sort of thing**. But for about twenty seconds I was touching a girl's shoulder. That's kind of like a rebellion against all I am and all that I've ever stood for. Now, again, this by itself might not be a bad thing. Forget the scarring experience and move on. But this is the worst part of all: I didn't actually mind. AAAAAAAAAAAAAAAAAAAHHHHHHHHHHH. Not a good thing at all. Even for nerds, this shouldn't be a big deal. A small incident, forget about it. Move on. Go kill some orcs, or something.

And here it gets even better (note my sarcastic tone of voice back there. For you slow ones in the audience who just so happen to be keeping track, this means that things actually got worse.): I considered dancing of my own free will with either Aubrey or Sara after that first one. Now I'm not only not considering the practice of dancing as completely foul, but I actually wanted to try again. Goodness, that sounds dangerously close to something that normal people would want to do (and of course we wouldn't want that, right?). In fact, I went so far as to think the blasphemous thought that it might actually be cool to dance all evening. It's not like I had anything to prove.

I've recently been making a somewhat concentrated effort to be more mature, or at least try not to be immature on purpose. But this is different. Without even realizing it, I've broken the moral code on which I've stood for forever. Kind of a big deal. Yeah, the dance in itself was nothing. A pin drop, so to speak. But not despising every second, as I had only a few months before with the Pride and Prejudice play? That's a problem. A really, really large problem.  Don't get me wrong, even now I still don't think that I would like to be in dance for the play. In fact, I'm not sure how I was okay with that short little dance. Perhaps the convention air somehow changed how my brain functions? That's a scary, and yet not totally implausible thought.

So it seems like the logical thing to do in this situation would be for me to make a choice. Either give in that dancing isn't as bad as I had thought, or go play lots of video games. Suffice to say that I will always choose the latter. So yes, that short string of unhermit likeness is behind me. I've regained my composure, and I will continue on normally. I'm not changing my philosophical opinions at all on the matter. If I was given the opportunity to go dancing right now, I would run screaming for the hills. But still, it was weird, for a second, to not be myself.

Thursday, February 16, 2012

The Crucible

In Literature Class this week we read through the Crucible. In case you aren't familiar with it, The Cruible was a play written in 1952 by Arthur Miller about the Salem Witch trials. I was completely unfamiliar with the book, and thus it caught me off guard in two ways. First, the style. I haven't read much in the way of plays as literature, except for a little bit of Hamlet (and let me assure you, that was scarring). At first I was weirded out with how different plays are to conventional literature. I wasn't given much of opportunity to get into the characters head, or to get a description of the surrounding area and the circumstances. Not to mention I had always subconsciously thought of repeated dialogue like that similar to a lot of bad writing out there made by little children, you know, the type of writing where there seems to only be uninteresting dialogue and the words "said", "told", "asked", and "answered". But the more I read, the more I realized how powerful a tool it was. Some of the scenes, though they only used the talking between characters, were quite frankly intense. More so than a lot of other books I have read with vivid descriptions of epic battles and that sort of thing. Also, because of the style it was perfectly suited for reading out loud as a group. We started doing this last week, and I had the role of Mrs. Putnam. Although it was quite alright, though slightly awkward to do the voice of a girl when it was just the the Literature group, it got really awkward when the guy who was doing a series about Homeschoolers for Iowa Public Radio came in. And of course he wanted to keep on going for awhile, which was really, really weird on my part.

The second way that the book caught me off guard so to speak was with the ending. By the way, if you haven't read the book, I would suggest that you go ahead and do so. Anyway, the ending. As I was reading through quite fast, it almost passed right over my head. Suddenly there was this affair thing with Abigail and the wife didn't know to tell the court the truth regarding it, and the next thing I know OH MY ANVIL PROCTOR IS ABOUT TO BE HANGED. Oh wait, he is going to confess that he was a witch, which of course means that he'll be free to go (colonial laws are weird). But for some reason he doesn't want it be hung on the door. Wait, what is the difference? Now he's dead. End of book. So after just reading through that section I was kind of understandably confused. But after watching that part of the movie, it all got a lot clearer. Proctor was willing to give up his pride for his life. He was willing to lie for his life. He was willing to give in to this ridiculous system just so that he could live. Under the circumstances, this seemed perfectly normal. But then there is this section, possibly the most powerful few sentences in the whole book

Proctor: Because it is my name! Because I cannot have another in my life! Because I lie and sign myself to lies! Because I am not worth the dust on the feet them that hang! How may I live without my name? I have given you my soul; Leave me my name!
Even just reading the words you can feel how desperate Proctor is. But in the movie? Oh my goodness gracious. I can still hear his words ringing in my words. The words of a man who could not sacrifice one thing: his name. The name he had spent a lifetime building a reputation for. The name that his unborn child would one day be proud to own. But this was more than just pride, though not everyone present realized that.

Danforth: Hang them high over the town! Who weeps for these weeps for corruption.

Hale: Go to him, Goody Proctor! There is yet time! Woman, plead with him! Woman! It is pride, it is vanity. Be his helper! What profit him to bleed? Shall the dust praise him? Shall the worms declare his truth? Go to him, take his shame away!

Elizabeth: He have his goodness now. God forbid I take it from him!

Wow. Just wow.

Wednesday, February 15, 2012

The Best Browser Of Them All?

As I'm sure that you are aware, I use the internet a lot. So my choice of a web browser is kind of a big deal. I want a browser that is fast, reliable, and gives me cookies on a regular basis (technically all of them do that already. You know? Cookies? Yeah? I make myself laugh. Admittedly no one else, but that still has to count for something). No browser is perfect, yet some are certainly better than others. So the purpose of this blog post will be for me to share my own personal opinion, as I have observed from using each browser extensively. Now I won't be focusing on graphs or benchmarks, so if I say something is "fast" that is a completely relative term. After all, it can really depend on what system you are using the browser on. For example, most browsers work better on Windows than they do on Macs. I've also noticed some differences between how Firefox works on Linux compared to how it works on Windows. Thus, without actual figures, whatever I say in regards to things like speed is from my own experiences and might differ from your's. I'll try to cover as many cross-platform things instead.


Firefox


Firefox is probably the browser that I've spent the most time on. I've always appreciated the solid speed and modest memory use.

Tab Management:
One of the most important things for me in a browser is tab management. Sadly, Firefox doesn't handle this particularly well. After you reach a limit of eight tabs the rest disappear off the screen and you have to press an arrow button to access them. Though this might work if you have relatively few tabs, for me when I usually have 9 times as many tabs as what appears on the screen it isn't very fun.

History Management:
Because in my travels around the web I will undoubtedly need to go back to pages I have already visited, I like my browser history to be quick and easy. In this aspect Firefox works very well: with the click of the "history" button near the top left hand side of the screen you can see the last few pages that you have visited. If you need a more complete look you can press "all history" and a small window pops up that shows all of the recorded browsing history on that computer. One nice thing about Firefox is that not only does it allow you to delete specific pages from your browsing history, but it lets your forget specific sites too.

Bookmark Management:
The bookmark management in Firefox is handled much the same as the history: a quick press of a button and a dropdown menu appears. But what else is nice is that in addition Firefox lets you put your bookmarks on the tab bar as well.

Download Management:
Downloads in Firefox appear in a second window, and will download normally. Nothing special here, although it is nice that it doesn't take up another of my valuable tabs like some other browsers.

Do Web Pages Actually Work?
Because Firefox is the second most common browser behind Internet Explorer, web developers usually develop with Firefox in mind. I for one have yet to have found a page which did not fully support Firefox.

Closing Comments:
Firefox truly is a jewel of an Open-Source browser. It is fast, efficient, extremely customizable, and easy to use. In addition, it is developed by the Mozilla Corporation, and ultimately the non-profit Mozilla Foundation. So unlike some of its competitors, such as Microsoft, Google, and Apple, Mozilla isn't trying to further corporate gains.


Internet Explorer:

I must admit, I have a lot of bias against Internet Explorer. For versions 7 and 8 I've found it to be slow and in general not worth my time. But despite that deep resentment, I've tried to be unbiased when it comes to my examination of version 9. After all, despite that fact that pretty much the only people who switched to it were the silly people who used Internet Explorer anyway and didn't know any better, many geeks are begrudgingly being okay with it.

Tab Management:
In this regard IE really fails. The way that it comes out of the box is with the address bar on the same line as the tabs, effectively halving how much space the tabs have. Once you have nine tabs IE does the same thing as Firefox and puts them off the screen, so to access them you have to press an arrow. Now the redeemable thing about this with Firefox is that the tabs were still large enough that you could still read the title. But with IE they are already so small that pretty much the only thing you can see is the Favicion and the first letter of the title of the page. Okay, okay, I'll admit. It is very simple to put the tabs on their own row. So for people like me this is a non-issue. But for a lot of the people using Internet Explorer, AKA internet illiterate people, this is going to be a problem. So what if you put the tabs on their own row? Well, then the limit before the tabs go off the page is 23. So there is a bit of a tradeoff here: the tabs are too small to read anything of the title except the first letter, but so many tabs fit on a page that you can navigate even a large number easily. One more thing  about IE's tab management in Windows 7: when you make a new tab for all intents and purposes outside of the window the tab is a window. When you click the IE icon, where for other browser it shows the number of windows up, for IE it shows the tabs. So it is more laborious to find a different window.

History Management:
For the viewing history Internet Explorer 9 uses a fairly bulky sidebar (although technically you can make it smaller, that only makes it even more unwieldy). Because you aren't going to be leaving up your history sidebar for very long anyway, this is pretty much a non issue.

Bookmark Management:
Pretty normal. Nothing special of note.

Download Management:
Again, not much to talk about here. When you download a file it shows up at a small bar at the bottom. If you  have multiple files running you can click a button to show them all. Pretty standard.

Do The Pages Actually Work?
Depends. Because IE holds so much market share, web developers make a special effort so that the pages show up right. The problem with this is that it usually involves spending a lot of time trying to write HTML code that works correctly in IE. You see, Internet Explorer is notorious for not being HTML5 compliant. If you are not familiar with the term, basically there is a standard in what code should work in a browser, and HOW it should work in a browser. The problem is that IE is quirky and makes its own rules, causing much frustration for developers. Although I must admit that IE9 is much better at this than the previous versions, the other modern browsers are so much better it is ridiculous.

Conclusion:
Disregard Internet Explorer. It only runs on the Windows operating system, and it just doesn't work that well.



Safari

Your experience with Safari is quite different depending if you are on a Mac or a computer running Windows. Safari runs much quicker on it's native Mac, otherwise its speed is down around that of IE, which I can tell you right now is not a good thing. 

Tab Management:
Safari's tab management is pretty much a clone of Firefox's.

History Management:
Safari's History management is pretty much a clone of Firefox's. Although I do appreciate that it goes all the way down the page.

Download Management:
Safari's download management is pretty much a clone of Firefox's.

Do The Pages Work?
Yup.

Conclusion:
As you can see, despite running on the same engine as Chrome (WebKit), Safari's design is similar to Firefox's in many ways. Which isn't necessarily a bad thing. But negative points for not running on Linux.



Chrome

Whenever you talk about Google Chrome, one thing that is certain to come up is the speed. Chrome really flies in this regard (no lame pun intended).

Tab Management:
After spanning from the left side of the page to the right, Google Chrome tabs just get smaller instead of going off the page. Though this is great for a decent amount of tabs, say 30, but once you get 39 tabs the favicons disappear. Favicons, by the way, are the little 16px x 16px images which are the symbol of a website. Like the white "F" on a blue background for Facebook. So once you have 39 tabs it is unbearable to keep track of them anymore. This is probably Chrome's greatest failing, in my sight anyway.

History Management:
Managing history in Chrome isn't alright, but not great. Ctrl + H will make a new tab for the history, a method which I don't like very much. Still, if you are okay with a brand new tab just for history then it is quite fluid in its handling.

Bookmark Management:
Chrome does this like most browsers. You have a toolbar at the top of the page under the address bar where you can put all your bookmarks. If you have more than can fit than you can access them by pressing a button.  Nothing special here.

Download Management:
I think that Chrome's download management is the best out of the five browsers. A very discreet bar appears at the bottom of the page with the different downloads. I don't know what happens if you have a lot of downloads, because I've never had more than two or three running at the same time. And because I doubt there is many people out there who would be in a situation where they had to download a lot of different files at the same time, it is a moot point.

Do The Pages Work?
They do indeed. Google Chrome is an extremely HTML5 compliant browser. No problems here.

Conclusion:
If you want a reliable and super quick browser, then Chrome is a good choice. Not quite as customizable as say, Firefox, but it still has quite a few extensions.



Opera

Opera, Opera, Opera. I had always taken this particular browser for granted. I had seen its stats in the past, and it always just seemed to be an average browser. Nothing special, just did its job. But after I actually tried out the browser myself I fell in love with it (not literally, after all me and Science are still together). Sure, it isn't a perfect browser. But the things that I use the most, the things I need, Opera does them quite admirably.

Tab Management:
To start off with, Opera was actually the first browser ever to incorporate tabs, so bonus points for that. But really, Opera is in my opinion the best browser for tab management. You can group similar tabs together, hiding all but one of them out of view. If you want to see what tabs are inside all you have to do is hover and you'll see the screenshot and name of each tab. You wouldn't believe how nice this is. It makes tab organization really, really easy. But what if you get too many tabs anyway? Well, unlike Chrome it is virtually impossible for the tabs to get so small that you can no longer see the favicon. Sure, they can get so small that it is extremely easy to click the "x" by mistake, but with the tab groups that never happens anyway. Oh, and one more very cool and super convenient feature that Opera has is the ability to clone individual tabs. The other option which I had always done in the past was copy the URL and paste it into a new tab, but this is much more efficient.

History Management:
The history management is in a separate tab, which is normally annoying, but because the tab management is so good in Opera it makes up for it.

Bookmark Management:
Standard. Move along.

Do The Pages Work?
Sadly, this is one of the problems with Opera. Because it not many people use the browser, many web developers will just ignore it when they go about developing their pages. A real shame.

Conclusion:
Opera isn't a perfect browser. It isn't the fastest or most popular. But depending on your needs, Opera could be for you. It is an innovate browser, often the cool features in many of the other browsers originated from Opera. Actually, Opera has 220 million users worldwide, which isn't a number to scoff at. The problem is that not many of those people are from North America.

Now remember, all of these browsers are customizable. In fact, if you looked hard enough you could probably find ways to replicate the features of your favorite browser on any of the other browsers. But because this often involves addons, and addons slow down your browser, this isn't always a good idea.

Tuesday, February 14, 2012

An Example Of A PHP Script

I got around to thinking that it might be interesting to post an example PHP script. So, yup, that's what this post is about. The script in question is supposed to take the information a user supplies on a different page, and create a brand new page for the data. I made it for the Rumpus Family website not because it would actually be that useful, but because I thought it would be kind of cool.
A few things to remember: all comments will be prefixed by two slashes "//". In programming if something is commented then it doesn't affect the script in any way, so it is useful for explaining certain parts of the code. To make it even more readable, I made all comments this colour. Also, even though I spend a good amount of time making sure that invalid information isn't entered, this actually isn't a good example security. Because mostly only people I know go to the Rumpus Family website, I don't really have to worry about things like XSS injections. But if someone really wanted they could probably mess with this pretty badly. Oh, and the code I have here isn't on the "make your own page" page. Because all that is really there is the form that takes the information typed by the user, it  isn't necessary to put it here. This is just the external script that does all the work. Finally, this script is really, really short. Most scripts will be quite a bit larger than this one.

<?php
// Gathers the IP address of the user. That way if necessary I can ban those who abuse the form.
$ip = $_SERVER['REMOTE_ADDR'];

// These two variable take the data collected from the previous HTML page
$data = $_POST['science'];
$Pagename = $_POST['pagename'];

// These three functions will remove any whitespace and capital letters from the file name. The last one will also add an ".html" at the end.
$filename= ereg_replace( ' +', '', $Pagename );
$ToLower = strtolower($filename);
$Filename = trim($ToLower . ".html");
// Here I place the data collected in two of the previous variables. This information will later be written to another file so that it can be placed in the navigation of the site. Basically, this is the link that you will click from the menu to access the newly formed page.
$menu = <<< END
<li><a href="$Filename">$Pagename</a></li>
END;
// This is mostly just the HTML code that will make the new page, so I greyed out everything but the PHP variables. The HTML is important, I'm just not getting into that right now.
$pagedata = <<< ENDING
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css" />
<title>
$Pagename</title>
<style>
body {
background: #A5D8F6;
}
</style>
</head>
<body>
<?php include("header.php"); ?>

<br>
<br>
<div id="c">

$data
</div>

<?php include("menu.php"); ?>
<center>
<div id="why">
Chuck Testa does not taxidermize pets. If someone who claims to be Chuck Testa offers to taxidermize your pet, then that person is a dirty, rotten liar. Chuck Testa never, and I mean <em>never</em> performs a taxidermization on a pet. Unless the pet is living.
</div>
</center>
</body>
</html>

ENDING;
// Pretty much self-explanatory. If there isn't anything entered in either of the two fields then a message is written and the script doesn't continue.
if (empty($Pagename)) {
echo "Not all of the fields are filled in. Please go back and enter the necessary information";
}
elseif (empty($data)) {
echo "Not all of the fields are filled in. Please go back and enter the necessary information";

// Because the file name will be made into a URL I don't allow any characters that aren't alphanumeric. Plus, this helps ensure that the file name isn't spam.
}
elseif (eregi('[^a-z][^A-Z][^0-9][.]', $Filename)) {
echo 'Sorry, that page name is not valid. Please only use letters and number for the file name.';
}

// Makes sure that there isn't already a page that has the same name as the one that the user wants to make.
 elseif (file_exists("$Filename")) {
echo 'Sorry, that file name is already in use. Please choose another one.';
}

// Checks to see how long the file name is. If it is larger than twelve characters then the script does not continue.
elseif (strlen($Pagename) > "12") {
echo 'Sorry, your file name was too large. Please go back and shorten it.';
}
// Finally! This part of the script actually makes the new page.
else {

echo "Hey, it worked! Your page should be up and running now. If not, please let me know and I'll see if I can fix it";

// Mails myself the IP address of the user and the initial information entered on the page.
mail("ultraswat@gmail.com", "$ip", "$data");

// Writes the name of the file to the menu.
$namepages = fopen("pagenames.txt", "a");
fwrite($namepages, "$menu");
fclose($namepages);

// Makes the new page and places all the HTML code there.
$F = fopen("$Filename", "w+");
fwrite($F, "$pagedata");
fclose($F);
}
?>


Sorry that I'm not very good at explaining things. It really is simpler than this.

Thursday, February 9, 2012

A Day Of Near-Silence

To speed up those who haven't heard yet (which would be basically no one), I have spoken roughly 280 words today, not counting time spent in class or words exchanged for education motives. But even considering that, because this is the busiest day of the week for me there was quite a lot of time spent forcing myself to be quiet. Why did I go through this, and what did I mean to prove? Well, it was partially because I'm starting to get the feeling that I talk a little bit too much, and that it starts to get annoying if I use repetitive phrases all the time over and over again. It wasn't that big of a deal even, but I got thinking about how to remedy the situation. That's when I came across the thought of being quiet for a full day. It was a very interesting idea to test out (see? Testing? It's Science!). I wanted to see if I had the self-control to stop myself from talking needlessly. It was a way to kind of mix up the day. I could have just went through the day normally, and it probably would have ended up being amazing anyway. Or, I could make everything different, for me at least.

Now looking back at it, I can say that some things succeeded and others didn't. Although I was able to avoid using tons of overused expressions repeatedly like I usually do, I ended up talking in fractured sentences quite a bit. Another purpose of the experiment was to see how it affected the conversation among my friends. Usually, I end up in almost every conversation, and I give my two cents on any subject that I have any sort of knowledge. I was curious to see if I was stifling other people So would my friends end up talking a whole lot more without me talking instead? From what I could see, not having my voice kind of restricted the total conversation. This was not quite as much because my friends don't know how to have lively conversations without me (quite the opposite, in fact). Instead, it The point from the beginning was to not talk too much. But it began to shift to use as little words as possible. This challenge was different from my original intent, but it ended up working alright.

The whole incident was actually quite nice. Every time I considered say something, saying anything, I had to make sure that not only was the sentence necessary, but that it was efficient, using as few words as possible. In this effect it succeeded completely: I began to develop the habit of thinking before talking. What are the chances that I will continue to do this in future days? Very unlikely. But hey, it was nice while it lasted.