OS Wars

I don't think I've ever made clear where I am on the OS war point of view. However, unlike most in the blogging world, I don't make sport of trashing Microsoft. Microsoft's a good company. It makes Windows XP. I like Windows XP. (I hate Windows Vista, but that's another story) No. The company I've decided to hate is not Microsoft, but Apple.

For one thing, Apple is cheap. It sells you an expensive computer that looks stylish but can't do anything good. Then, take the example of the MacBook Air. It's tiny, but you can't remove the battery. You have to get it "fixed". Yes, they call it fixed. Hear that? It's your fault. Apple accuses you unfairly.

Then we have the iPod, senselessly tied to iTunes. The iPod Nano Nike thing. If the battery runs out, well, too bad for you. You need to get a new one. Safari. Besides being a bad browser, it's HTML parsing engine is WebKit, which is actually a thinly disguised version of KHTML, the parsing engine KDE uses. So, Apple steals as well.

I can't really get started on how much I dislike Apple. BOOOOO APPLE IS BAD BOOOOO. expects to be on the receiving end of some flame wars soon

Also, also unlike most in the blogging world, I prefer IE to Firefox. This is mainly due to the fact I grew up with IE, but might also be related to the fact that now that I have to use Firefox (as I use Linux), it crashes about every 5 minutes. That's inconvenient, to say the least.

Hatkirby on
πŸ‘ 3 πŸ‘Ž

Sometimes, I get a little bored with standard blogging. Like, post a post. Post a post. On and on. Let's try something new.

And the deblatog was born! (Word coined by yours truly) A Deblatog is cross-blog argument in which many blogs can join in and argue senselessly about a set topic.

For instance, say I start a deblatog about "Pie". I ruthlessly argue that Pumpkin Pie is a delicious way to enjoy pumpkin. Then, someone else (say.... Gryphic), posts a post on her blog with her side of the argument. While she does that, she makes sure to Pingback the original deblatog post.

Then, someone else (say.... Timbo94) decides that Apple Pie is much better than Pumpkin Pie and writes a post about it. He then Pingbacks Gryphic's post, but not my original.<!--more-->

All of a sudden, Smiley appears and decides that we're all wrong and pie is disgusting. He Pingbacks Timbo94's post, not Gryphic's or mine.

Smiley's posted some interesting arguments, so I decide to write what I think about them on my blog again. I'll Pingback his post, but not Timbo94's, Gryphic's or my original.

Where this is going is that you can start out at my original deblatog post, read my side of the argument, and then click on the Pingback to go to the second side of the argument. It's a chain, and it allows other bloggers to post on something when they can't think of anything else to blog.

After reading that, you have to decide this. Either, I have an awful ton of spare-time, or I just couldn't think of anything else to post.

The only other random point I should put here is that, if my obsession with Pingbacks isn't obvious yet, I don't know how much better to put it.

I. Like. Pingbacks.

Hatkirby on
πŸ‘ 5 πŸ‘Ž

No Prize

Wh.... who voted no? No, just kidding, it's ok. I'd rather have honesty than fabricated beliefs designed to only make me happy. I'm happy someone voted No. It proves that their telling the truth. Whoever that is, you've just earned one point.

Yes - 12 vote(s)! No - 2 vote(s)! Huh? - 0 vote(s)! Indifferent - 4 vote(s)!

Yes, this week's poll is very random. Remember, if you don't like random polls, I only put them up because I'm currently lacking a Poll idea. If you have any ideas, please post them to the Poll of the Week fourm on The Fourm.

I'd also like to tell you people that I think I finally know what Gryphic means in Welcome to My Life when she says:

My friends have no idea.

Gryphic

They don't, and I could never tell them. I only need to say that I've had a horrible week this week. I've explained it further here.

If I do go on Yaplet or The Fourm today, I might be very annoyed, or simply depressed. I'd be annoyed because FIREFOX IS A BEEPING BEEPHOLE, and if you people argue against that statement, even if you think it's false, all you'd be doing is annoying me more. You may think you know Firefox, but you haven't had it crash EVERY FREAKING 10 MINUTES while typing a LONG post! The slowdown's even worse that.

I'd be depressed for, well, read the think in the link above. I'm sorry, people, for what I've done, and I'm especially sorry to Gryphic, for yelling at you yesterday, and Pyro, for asking you to watch the tape. I've just had a very bad week. I hope you can forgive me.

Hatkirby on
πŸ‘ 6 πŸ‘Ž

I'm posting this because I often find myself sitting at my computer thinking either, "There's nothing to do, I think I'll just write a blog post." or "There are a whole ton of things I should be doing now but I just can't be bothered. I think I'll do a blog post." and end up sitting, staring at my Admin Panel for minutes on end, trying to think up a good idea for a blog post.

If this happens to you too, why not try out this out?<!--more-->

  1. First things first. Open up that Admin Panel, get to your Blog-Post-Writing-Station. If you don't even bother going to your panel, you won't have the motivation to write a post.
  2. Don't try to write the post's title first. I've made that mistake many a time, and it's much easier writing a title after there's some content for you to title.
  3. Think, what is my blog about? Why do people want to read my blog? What can I offer them that no one else can? People come to your blog because they want something. What is it? Laughter? Debates? Tutorials? Build on that.
  4. Does your blog have a theme? Or is it just random nonsense? If your blog is random nonsense it's a little harder to find something to post about, but don't worry. The blogger always prevails.
  5. What interests you? You're blog is your vent, talk about what you like on it. (However, remember that blogs and the internet in general is not really a place to talk about inappropriate things such as creation of children)
  6. Go read your favorite blogs and see what makes them so good. Any content of theirs that you can build upon? (And Pingback them for? 8D)
  7. If all else fails, a 101 posting ideas list never fails to amaze. Try it out, you may be surprised of what you haven't thought of yet.
  8. From the same place as the 101 posting ideas, we have the Visitor Grid, another great way to come up with ideas for your blog

I hope that I've just fulfilled the reason I posted this in the first place: To write a good post.

Hatkirby on
πŸ‘ 7 πŸ‘Ž

This is an age-old PHP argument: Is using $_REQUEST dangerous?

For those not in the know, $REQUEST is a combination of $COOKIE, $POST and $GET. If you try to access $REQUEST['para'], it will first attempt to retrieve $COOKIE['para'], then $POST['para'] and finally $GET['para']. This has led many people to believe that $_REQUEST is very dangerous to use because cookies can be easily edited by the client. However, this is not so.

Cookies can be easily edited by the client, true. But so can query strings ($GET) and the Request Body ($POST). $_REQUEST requires the same amount of XSS-proofing as the others do.

The only problem I see with $REQUEST is that using it doesn't specify whether you are using $COOKIE, $GET or $POST. It would be too ambiguous for me and that's why I leave it be.

Hatkirby on
πŸ‘ 6 πŸ‘Ž

Recently, I read an article on ProBlogger about the difference(s) between Twitter and Plurk.

I started using Twitter about a year ago, and stopped a few months ago, because it was boring me. However, when I read that above article, I had to have a try at Plurk.

Plurk is already a whole lot more fun than Twitter. As the article on ProBlogger shows, Plurk runs more like a fourm. You Plurk something, and people can Plurk replies to it which show when you click on the original Plurk. You can also see people you've friended's Plurks on your timeline.

With Twitter, the only way for people to reply to tweets are for them to send you a private tweet that A: Doesn't have any connection to the original tweet, and B: Only you can see it.

Because of this, I've decided I like Plurk. I've been using it recently, and as I've said above, it's fun. Have a look at it. Why not even sign up and give me a plurk? Come on, it'll be fun. Please?

Hatkirby on
πŸ‘ 6 πŸ‘Ž

....because it drove me insane when I was writing the new Four Island. There didn't appear to be any information on it anywhere. Or at least, any complete information.

Finally, however, I found the Pingback Specification, which, at the bottom of the page, includes a nice little step-through of Pingback at work.

To summarize, there are two parts of the Pingback process. The server and the client. The client sends Pingbacks and the server receives them.

When writing a blog post, the client should scan it for external links and, if any are found, attempt to read the pages they link to. If they contain a <LINK REL="pingback" HREF="...."> tag, then that means that the page in question supports pingback. So, if one is found, the client uses XML-RPC to connect to the server URL specified in the HREF attribute of the tag mentioned above. Then, it calls the method pingback.ping with two parameters, the first being the URL of the local post, the second being the URL of the post being linked to. From there, it's the server's job.

When the server receives the Pingback, it checks to see the both URLs actually exist and that the linking blog post actually links to the second URL. If it does, the server adds a comment to the blog post in question saying that it's been linked to and providing a link to the linking blog post.

Ok, that probably sounded complicated. It is, a little. So, that's why we're going to do this step by step, starting with the client. Let's examine the specification process again:

  1. First, the client scans the post being submitted for external links.

We can accomplish this with a simple screen scraper which is a script that combs through an HTML page and picks up useful information. We'll be using a simple one to pick up all of the links, and then to sift out the ones that aren't external: (Note that I am assuming that the contents of the post are located in $postText)

preg_match_all('|<a\s[^>]*href="([^"]+)"|i',
        $postText,
        $matches);

foreach ($matches[1] as $link)
{
  if ($all_links[$link])
  {
    continue;
  }

  $all_links[$link] = true;

  if (preg_match('/^https{0,1}:/i', $link))
  {
    // We've got an external link!
  }
}
  1. Then, the client attempts to download any links it finds.

This is easy as well. For this I'll be using cURL. Note that this code goes in place of the comment // We've got an external link!.

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $link);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_HEADER, false);
$page_data = curl_exec($c);
curl_close($c);
  1. If they contain a <LINK REL="pingback" HREF="...."> tag, then that means that the page in question supports pingback.

Checking for the tag is again, easy. We do it with a simple regular expression:

if (preg_match('/<LINK REL="pingback" HREF="([^"]+)">/i',
        $page_data,
        $server))
{
  // It has the <LINK> tag!
}
  1. Finally, the client sends an XML-RPC request to the server located in the tag.

For this, we need XML-RPC for PHP. It's a very easy to use XML-RPC library. Somewhere in your page, you need to include it's client libraries (in lib/xmlrpc.inc). When that's done, we have our client-side Pingback code:

$client = new xmlrpc_client($server[1]);
$msg = new xmlrpcmsg("pingback.ping", array(
        new xmlrpcval(PERMALINK, 'string'),
        new xmlrpcval($link, 'string')));
$client->send($msg);

Make sure to replace PERMALINK with some method of generating the URL of the current post.

That's the client-side part of Pingback, the sending side. Now for the server side.

Before we begin, we have to remember that the client finds the server by looking for a tag in the blog post's page header. You should include this now into your global header file:

<LINK REL="pingback" HREF="http://yourdomain.com/xmlrpc.php">

Now it's time to make that xmlrpc.php.

  1. The server has to be able to receive XML-RPC requests. Because of this, it needs to include XML-RPC for PHP's server-side library (lib/xmlrpcs.inc) as well as the client-side. Then, it needs to define the pingback.ping method.
$s = new xmlrpc_server(array(
        "pingback.ping" => array("function" => "ping")));

function ping($xmlrpcmsg)
{

}
  1. The server then needs to verify that both URLs actually exist.

How to implement this part is up to you as I'm not writing your entire blog, but the code to extract the URLs passed as arguments to the pingback.ping method is as follows:

$from = $xmlrpcmsg->getParam(0)->scalarVal();
$to = $xmlrpcmsg->getParam(1)->scalarVal();
  1. Finally, the server posts a comment to the blog post in question notifying people that someone has sent it a pingback.

Once again, this is mostly up to you as I don't know the specifics of your blog. However, when the comment has been successfully added, the XML-RPC server needs to return with a response to the client:

return new xmlrpcresp(new xmlrpcval(
        "YAY! Your Pingback has been registered!", "string"));

YAY! You're Pingback implementation is nearly done! There's only a little bit left now. With the server, it has to response with an appropriate error if there's some problem such as the source URL not existing. Here's a list of them:

  • From doesn't actually link to To:
return new xmlrpcresp(0, 17,
        "Source uri does have link to target uri");
  • To URL doesn't exist:
return new xmlrpcresp(0, 32,
        "Target uri does not exist");
  • To URL doesn't support pingback:
return new xmlrpcresp(0, 33,
        "Target uri cannot be used as target");

I really hope someone finds this tutorial useful because when I wanted to implement Pingback support on my blog, as I said before, it was very difficult to find any good information about it.

EDIT: Wow. One of the most popular posts on the site and it was posted, of all days, June 17th. Very strange.

Hatkirby on
πŸ‘ 6 πŸ‘Ž

Two days ago, I found out about a movie called "The Number 23". It's a movie about the 23 Enigma, the belief that everything adds up to, in some way, the number 23.

Now, this being Four Island, it's quite obvious that I wouldn't believe such a thing. I'm more likely to believe that everything is four, and let's face it, it's true.

But, I can be very paranoid. FACT: I took the battery and SIM card out of my phone before watching the trailer for The Ring. So, being paranoid as usual, I decided to add up the time of my birth. 4:06 PM. (Yes, I know, I was born at FOUR o'clock, and I'm very proud of that fact) Obviously, 4 and 6 doesn't equal 23. But.... this is 12-hour time. What about 24 hour time?

16:06

Added together, 22.

Ok, it may not be 23, but think. You may recognize that number from elsewhere on Four Island. Yes, April 22nd is Trider's CIEday, and Four Island was created on September 22nd.

Coincidence? Yes, I think so. But still, the senseless paranoia is fun. And as an added 23-tidbit, look at the post I linked to earlier in this post about everything being Four. It may be Four-centered, but look at the publish date. That's right, January 23rd.

EDIT: After closely examining the Everything is Four post, I realized another snippet of apophenia. The time that the post was published. The digits add up to 22.

Hatkirby on
πŸ‘ 3 πŸ‘Ž

Well, in all of my random spare time, I've come up with a random Related Posts game. Random.

Want to know how to play? Of course you do.

  1. First, go to the newest Four Island post
  2. Check to see if there any related posts. If there aren't, go to the next most recent post.
  3. Once you've gotten a starting post, the game starts. Every chooses a related post.
  4. On the related post, check to see if there are any related posts that you haven't been to already. If there aren't, the game ends for you. If there are, you get one point.
  5. Choose a related post that you haven't been to already
  6. Repeat steps 4-5 until the game is over for you.

Once the game ends for everyone, the person with the most points wins.

Like it? Think it's completely random? Well, that's what you get. I'm INSANE about the new Four Island.

Also, as a sidenote, I've modified the way that Pingbacks display here on Four Island. Instead of saying:

Someone has posted a link to this post on URL

Pingback

It will say:

URL

EXCERPT OF LINKING POST

Pingback

This makes much more sense, I believe. I'm still open to any Pingbacks! Remember, the test Pingback is still going, so continue to Pingback The New Four Island!

And, another sidenote, I've added a Top Commenters to the sidebar so you can see those commenters who are really.... commenty. However, it is a little disheartening to see me with 84 comments, and the next person down with 14 comments. That's a BIIIIIIIIG difference, and one that I hope will shrink. Pwease?

EDIT: Remember the downtime I talked about yesterday? Well, you can forget about it. Maybe. I don't know, but it seems a possibility that it'll be avoided. Just wait until tomorrow to see.

EDIT: Remember, feel free to play the Related Posts Game and posts your results here. I'd be happy to play anytime as long as someone else does.

Hatkirby on
πŸ‘ 11 πŸ‘Ž

We Love KFM!

Wow! People apparently really like KFM! And I never knew! Well, I kind of guessed in Hello KFM, but.... wow.... Anyways, here are the results:

Yes - 7 vote(s)! No - 0 vote(s)! Huh? - 1 vote(s)! Indifferent - 3 vote(s)!

I think I may try to bring KFM back. I mean, I like that comic a lot. It's quite a lot of fun. And I don't think I deleted the original comics, they're still here on my computer, just not available to the world. The only problem I have is with motivation. I procrastinate way too much. I need to find out a way to get around the procrastination problem. Ideas? Please comment.

In other news, there's going to be some scheduled downtime on Monday. It should start around 7 o'clock AM and end around 4 o'clock PM. Sorry about this disruption, I know, Four Island downtimes makes people sad.

EDIT: Oh. My. Goodness. I just checked the referential ID for this post. This post.... it's the 100th post on Four Island!

YAY for the 100th post! 10 months of writing posts for Four Island has wielded this great result. (Though I only started recently writing a post a day) Thanks to all who read Four Island! And right now, that number is.... oh giant hairy balls of poop. I forgot to add the hitcounter to the new Four Island! Oh, I'll go fix that now!

Hatkirby on
πŸ‘ 4 πŸ‘Ž