Blog posts tagged "articles"

Mm. Feels pretty stupid once you think about it. I mean, really. My whole thing on "pick something when you're not as informed and stick with it forever, constantly ignoring the fact that there are better solutions" is annoying.

The thing I'm going to rant about is <!DOCTYPE>. I learned HTML at a young age, young enough to think that whatever I read must be right and nothing would sway me from that, even if the author did change her mind in the next book. I thought that not using <!DOCTYPE> was a good thing, a declaration of independence, the right thing to do. Not using it also makes writing webpages 10 seconds easier.

And don't even go there with that last comment. I'm hardly a perfectionist, maybe I'm passionate in some fields such as computing and mumble, but I don't have to be perfect all the time.

Anyway, back to <!DOCTYPE>. To this day, I still do not see any merits in using the loggy tag other than to ease W3C's validator. My theory is that the tag explicitly tells the client browser what DTD to use so it can render the document exactly as I wanted it to be rendered. BEEP. Slow down there, we've got CSS resets for that. So, why use <!DOCTYPE>? I'd be much obliged if someone told me.

See? I'm ready to get off of my high pedestal. I started by admitting IE wasn't the best and now I'm trying to set this whole <!DOCTYPE> thing right.

However, you must admit that I am right about Wordpress. I know I made the correct decision not to go with Wordpress for my blog. I can use it for other websites, just not for Four Island. I am also right about Apple. They're still evil and they always will be. So there.

Hatkirby on January 11th, 2009 at 12:42:18pm
πŸ‘ -1 πŸ‘Ž

I like programming. I especially like C++, Java and PHP. However, I decided that I want to learn another language.

Perhaps inspired by the PMS I use, Redmine, I have decided to learn Ruby. It's actually not that bad. It's pretty interesting, simple and easy to use. For instance, unlike many languages, Ruby doesn't require classes or main functions to display its "Hello World" program. This is it in its entirety:

puts "Hello World!"

A great way to learn is the "Try Ruby!" interactive prompt available from tryruby.hobix.com that teaches you Ruby from your browser. It's a lot of fun, it's fun and I'm repeating myself.

Another fun aspect of Ruby is the Ruby on Rails framework, which was the base of the popular PHP framework CakePHP. Rails makes it much more easy and fun to write Ruby web applications. I plan to write a certain upcoming website in Rails, too.

One thing that does annoy me about Ruby, though, is that its command-separation character is, like BASIC and all derivatives, the newline. I fine semicolon separated languages so much better. I just do. :)

puts "So, do you like Ruby?"
likeRuby = true
puts "YAY!" if likeRuby
Hatkirby on January 7th, 2009 at 12:30:03pm
πŸ‘ -2 πŸ‘Ž

I wanted to start this post off by saying that I had come down with a case of writer's block, a severe condition in which authors and bloggers simply stare at their text editors, unable to write or think and that I'd saved this post in my reserves just in case I came down with this terrible condition, but then I realized that I was copying too much from Humorix. So, instead, I'll start like this:

Recently, I've been reading Humorix again. It's so good! I love it! I so badly want them to continue doing to because it's so funny and good, but sadly, it is not to be.

It is becoming clear that I am obsessed with Humorix. During Four Island's extended downtime, I started a Wordpress blog called "False", which was pretty much a parody of Humorix. However, instead of containing Linux humor, it contained Four Island humor, including all of Four Island's regulars.

For instance, the first story run was about Four Island switching to Wordpress. There was mass hysteria, cats and dogs living together and I had recieved the title of "clinically insane". :)

The next thing was an article on Smiley actually updating his website. Then, akin to Humorix's ''Crashback'' feature, the next post was about the fact that he actually did update his website. However, I then pointed out that Atmos hasn't updated for years.

There was a big series going on in it about Gryphic and the Color Pencils War. It started with Gryphic posting American English on her blog, which people found suspicious. Next post, she posted on her blog an admittance that she was not actually Gryphic, a robot dispatched from the "American English Agency" had locked her in her closet after she posted "Colour 4eva" [sic] and had been writing posts for her ever since. I do not remember why the robot finally cracked, but I do remember paramedics carrying a half-dead Gryphic out of her closet on a stretcher. She was fine by the next post, though, thankfully. :) I think she then sued American English Agency over her blog, a.k.a., she wrote the lawsuit as a blog post. There was a further conspiracy about Gryphic and Color Pencils that I cannot quite remember. It was good, though, and I miss it a lot.

There was this thing about TimTam going insane after being interviewed for something and running out into the desert, but I was probably on cupcakes by then. :) I think it had something to do with this Humorix story, like TimTam was accused of doing that to Apple and then he went insane. I don't know, it was funny.

Sadly, I cannot post the actual posts or the hilarity I miss. There was a problem with the posts, I do not remember what it was. Something, perhaps, with the emoticons, or perhaps the declarations. However, I wrote a PHP script to automatically change all of the posts so the problem was fixed.

Oops. I made a mistake in my script, I forgot the "WHERE" clause in the "UPDATE" command. Stupid me. Every single post was replaced with the contents of the last post written, which had something to do with JAL making a website about saving the children.

That annoys me greatly because I remember LOLing at some of those stories, and I enjoyed the entire Color Pencils fiasco. I liked writing deliberately false news stories, but I wouldn't have the drive to support an entirely separate blog full of it. It would be fun, though.

Perhaps it could be a collaborative project, everyone writes a false news stories, series can build upon others and more fun. That would be fun. And then, there'd be a false news site other than dead ol' Humorix for me to read. And that'd be yay. :)

Hatkirby on January 3rd, 2009 at 12:31:48pm
πŸ‘ 1 πŸ‘Ž

Recently, I was read Bluemonkey's Blog and found a not-so-recent post on the English language and its usages. Yes. That's what I'm going to be talking about now. Run, if you're scared.

Chtspek, teh so ann0yng. Itz imp0sib13 t0 red and teh d4mages pryde. Lyke, y cnt u jst us nrm4l ingles?

Ok.... maybe that was a bit over the top, but chatspeak annoys me. Like, alot. The English language was created for a reason. I don't know what that reason was, or how it relates to this debate. But I do know that, as Bluemonkey pointed out, the ability to read and write used to mean something. If you could do that, you were wise, intelligent and rich. You were powerful, you could do stuff and you stepped on people with your ability to spell "CatDog" correctly.

Now a days, if you're not using abbreviated English on your phone or IM, you're "uncool" and "wasting money" and "going to get sued" or something along those lines. I still stand by my belief, though, that you should use full English for every word you type, even though it may be for an SMS message or an IM conversation.

However, everyone's a bit of a hypocrite. I do, for some reason, continually spell "text" as "txt" when sending an SMS. :)

Hatkirby on December 29th, 2008 at 12:30:11pm
πŸ‘ 2 πŸ‘Ž

Wasn't Christmas fun? Yay! And a lot of people want to fulfill their dreams. Well, it didn't work for me, but I hope it does for you! :)

Also, with "uggglay", people were complaining that there was no "other" option. I pointed them at "Something else very cute!" and they said "But I don't want something cute!" So I decided to laugh and make "Something else very uggglay!" LOL. :)

An adorable Fourie toy! - 0 vote(s)! All my dreams come true - 8 vote(s)! Something else very cute! - 0 vote(s)! Something else very uggglay! - 1 vote(s)!

If you can see this, either CSS is dead or you like conspiracies!

Anywayz, the password is "cutefish".

Hatkirby on December 27th, 2008 at 9:36:06am
πŸ‘ 6 πŸ‘Ž

This post was originally posted in a page by itself, and is being moved here as an attempt to move everything to the main blog.

HTML Validator

When I was first learning HTML, I leart it all using a book called "HTML Quickstart Guide 4th Editon" (by Elizabeth Castro), which, for some reason, stated differently from the other editons (I know this because it said about previous editons in the book, and I also have acquired HTML Quickstart Guide 5th Editon a couple of years ago) that the <!DOCTYPE> was a useless tag that had no purpose other than telling HTML Validators what DTD to use.

Because I learnt HTML this way, the non-usage of the <!DOCTYPE> tag grew into a habit, and aside from just being hard to change that habit, I don't want to have to fallback from my anti-<!DOCTYPE> ways. I make a big fuss about not using the <!DOCTYPE> tag, and there's nothing you can really do about it.

Go try it now. This link goes to the Validator Results for the Home Page of Four Island.comp. Go to it. Notice that it has only one error. Look closer and notice that that one error is the lack of the <!DOCTYPE> tag. Click on the "Doctype" drop-down menu, choose "HTML 4.01 Transitional", and click "Revalidate". Notice how there are no errors now. See?

So why not join me? Please add one (or more) of these images to your website/blog/whatever. Please show that you do not believe in the evil <!DOCTYPE> tag.

  • No-!Doc Favicon
  • Image No <!DOCTYPE> Userbar
  • Image Wikipedia Userbox! Use {{User:Hatkirby/Userboxes/No_Doctype}}.
Hatkirby on December 26th, 2008 at 12:37:08pm
πŸ‘ 0 πŸ‘Ž

Recently, I was going through some of my old stuff and I found this play I had written. Goodness, I must have been very young when I wrote that because it's very silly. However, some of it is stupidly hilarious, so I'm going to go through how sane I may or may not have been at that age by analyzing Kirby's Slippers, revision 3.

Kirby: Oh, today has been so boring. Nothing has happened. Voice: Hi, my name is Kirby's wall. That's Kirby. (Kirby leaves stage left)

Kirby's Living Room

Ok, what? Kirby's wall talks to him and he walks away as if nothing strange had happened? ....weird.

(Kirby says some random things and reappears up stage left in his PJ's) Kirby: I'm so tired. (ISAC Representative enters up stage right) ISAC Representative: Excuse me, but is there a Kirby in the house? Kirby (startled): Um, yes. I was just getting ready for bed.

Kirby's Living Room

So.... A random stranger, representing some random organization, walks into Kirby's obviously unlocked house and catches him getting ready for bed? That is just weird. Like, a lot.

ISAC Representative: I am from the ISAC. I was sent to tell you that the conference takes place tomorrow. Kirby (surprised): Uh, ok. ISAC Representative: The ISAC are great people and expect good behavior from you and the other person from Dreamland. See, the others are foreign. Kirby: Oh, great! I love foreign!

Kirby's Living Room

....what the negative? There are so many random things wrong with this that I'm not even going to bother.

ISAC Representative: Goodbye. (ISAC Representative leaves) Kirby: I need to go to bed. (Kirby trips on chair and tumbles over it) Kirby: Ouch! (Kirby leaves right stage)

Kirby's Living Room

Ok, that's the entirety of Scene 1, "Kirby's Living Room". I'd like to ask, A: How likely is it to trip over a chair? And B: Who on earth is Kirby talking to? The wall? ....actually, it could be possible, if you think about the first snippet....

Let's continue with the second scene, "King Dedede's House". It's a little longer, but there's only two snippets I'll be posting:

Kirby: Let's watch a movie! King Dedede: I'll get the candy! Kirby: I'll get the popcorn! (Kirby leaves stage left) (King Dedede leaves stage right) (Sound of getting things)

King Dedede's House

S-s-sound of getting things? ....I'm just going to.... um.... walk away.

All: Later.... King Dedede: Hey, come on! What's taking so long? Kirby: I'm getting my coat on, but it stuck to the dresser and now I'm wearing a dresser instead of a coat. (Kirby reappears left stage with coat on)

King Dedede's House

giggles

Ok, time for Scene 3, "ISAC Meeting House".

Kirby: Hurry up, we don't want to miss it! King Dedede: I'm only walking so slow because I brought all of the peanuts!

ISAC Meeting House

....in this play and the other I found (maybe I'll post about it sometime), there are a lot of references to peanuts. I really don't know. Such as this one:

ISAC Representative: Hi, glad you could make it. Come right in. Kirby: I'm so hungry. King Dedede: Have a peanut. (Kirby & King Dedede sit down)

ISAC Meeting House

This next part is implying something strange....

(Lights turn off) Kirby: Aaaaah! The lights turned off! King Dedede: Look, I think I see someone over there! (Lights turn back on and Kirby's slippers are gone) King Dedede: Look! Someone stole your slippers! Kirby: OHNO!

ISAC Meeting House

Why does Kirby have his slippers at an international conference? I mean, really. And Captain Obvious to the rescue with Kirby's first line there.

ISAC Representative (talking into microphone): I guess the party's over. Maybe there will be another meeting next month. King Dedede: But at least there will be another one next month. But what if it's also short? And they need another next month? What if there is a chain of meetings all the way until December? Would they all add up to 1 annual meeting? But what if that one is too short for short? Is there are a never-ending chain of meetings when they are too short? I guess a P.O. box could in theory break the chain....

ISAC Meeting House

Oh dear, I've ripped off Spongebob. Next, let's examine Scene 4, "Church". There's only one snippet I find amusing:

(King Dedede enters) ISAC Representative: King Dedede! Come on here! Voice (softly): You may now kiss the bride. ISAC Representative: I love you.

Church

Not only is he yelling during a wedding service, the ISAC Representative has spontaneously come out of the closet. This is getting pretty strange.

There is a quote or two from scenes 5 and 6, but they're mostly impulsive decisions and peanut quotes and this post is getting long. However, the play ends with Scene 7, "Creative Castle", and it rather amusing.

ISAC Representative: I just remembered! ISAC stands for International Stuffed Animal Conference!

Creative Castle

....not only have they been saying ISAC the entire play, he works there too and he only just remembers? However, this play ends with the funniest quote in the play:

Kirby: I want to take a vacation in Saudi Arabia! King Dedede: That's too far away. Kirby: So? I have airplane insurance. All: The End

Creative Castle

LOL. Literal lol.

Thank you for enduring my rant about my childhood and the randomness ensured. I've transcribed the entire script to HTML for easy viewing here: Kirby's Slippers v3. Have fun!

Hatkirby on December 22nd, 2008 at 12:33:05pm
πŸ‘ 2 πŸ‘Ž

You must be looking at this post and thinking, "Ok, what?" Yes, probably. I really don't know.

Anyway, this is just a rant. And it's about my iPod. It's a new (well, two months new) Chromatic (yellow and pretty) and works pretty well. However, randomly, during arbitrary songs, the music will suddenly STOP.

And then, you know you have to hurry if you want to keep listening to that song. When that happens, I have to rip the headphones off of my ears and unlock (take out of HOLD) the iPod. At that moment, the iPod will make a very loud noise. So loud, you can hear it quite clearly even without the headphones on. "Oh, goodness," you should think to yourself, "I just saved my eardrums."

Immediatly after I do that, the music starts playing and the pause button doesn't respond for a few seconds so I miss some of the song. :( This is really annoying, and I don't know why it happens. Does anyone know? Knowing Apple, is it a feature or a bug? :)

Anyway, yes, you can say it.

"Ok, what?"

Hatkirby on December 21st, 2008 at 12:32:03pm
πŸ‘ 3 πŸ‘Ž

On the fifth day of Kirby Week, Four Island gave to me: An way of making URLs look prettier.

As I promised yesterday, today I'll be showing you how to use prettier URLs to reference your blog posts. We'll be removing the query string.

In this tutorial, I'm assuming you're using the Apache web server with mod_rewrite enabled. Otherwise, you'll probably need to read more elsewhere when we get up to the .htaccess file.

Speaking of the .htaccess file, let's do that now. In your kirbyweek08 folder, create a file called .htaccess and put this in it:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/ read.php?slug=$1 [L]

Well, that's yummy-yay-yay, but the read.php file does not yet accept a slug parameter. Let's add that functionality now with an upgrade to the read.php file. Find the line that says:

$getpost = "SELECT * FROM posts WHERE id = " . $_GET['id'];

Replace it with the following:

if (isset($_GET['id']))
{
 $getpost = "SELECT * FROM posts WHERE id = ";
 $getpost .= $_GET['id'];
} else if (isset($_GET['slug']))
{
 $getpost = "SELECT * FROM posts WHERE slug = \"";
 $getpost .= $_GET['slug'] . "\"";
}

This will allow read.php to parse slugged URLs. Now that Prettiful URL support has been added, you think you're done, right? Wrong. We have to fix the links to read.php in functions.php and rss.php.

Within functions.php, there are two occurances of this partial line of code:

<A HREF="read.php?id=<?php echo($sqlOutput['id']); ?>">

Replace both with:

<A HREF="http://example.org/kirbyweek08/<?php echo($sqlOutput['slug']); ?>/">

Of couse, remember to replace http://example.org/kirbyweek08/ with the path to your blog.

In addition, the following partial line of code appears in rss.php:

/read.php?id=<?php echo($getposts3[$i]['id']); ?></link>

Replace it with:

/<?php echo($getposts3[$i]['slug']); ?>/</link>

And there! You're done! You've added prettiful URL support to your blog! YAY!

Tomorrow we'll be discussing other small improvements you can make to your homebrew blogging system.

Hatkirby on December 18th, 2008 at 12:30:25pm
πŸ‘ 3 πŸ‘Ž

On the fourth day of Kirby Week, Four Island gave to me: An article about implementing RSS.

It's another day of Kirby Week which means another tutorial! Today's post will be short because there's not that much to dynamically creating an RSS feed. What's that, you say? You don't know what RSS is? Le gaspez!

RSS stands for Really Simple Syndication. It provides a list of your latest blog posts (or anything, really, RSS can also be used nicely for things such as comments) in a format computers can read. This way, a computer can more easily tell if you publish a new blog post, for instance, and notify anyone who wishes to be notified.

RSS is an XML specification, so the entire thing is based upon a system of tags. Let's get to writing it!

Create an rss.php file in your kirbyweek08 folder. The root tag is the <rss> tag, with a mandatory attribute (version) that has to be set to 2.0. So, our document current looks like this:

<rss version="2.0">
</rss>

Every RSS feed has to contain a <channel> tag with information about the feed in question. Let's populate it with some default data that you can change:

<rss version="2.0">
 <channel>
  <title>Kirby Week 2008</title>
  <link>http://example.org/kirbyweek08/</link>
  <description>A description! YAY!</description>
 </channel>
</rss>

The fields introduced above should be pretty self-explanatory. The next thing to do is to dynamically introduce the latest 10 blog posts into the <channel> tag. I've done that here: http://other.fourisland.com/kirbyweek08/?source=rss.php. Ensure you replace all instances of http://example.org/kirbyweek08/ in the code with the path to your blog.

So, now you've got a feed. That's great, however, people probably won't know its there. Open up your custom header.php file. Somewhere between your <HEAD> tags, add this snippet of HTML:

<LINK REL="alternate"
      TYPE="application/rss+xml"
      HREF="rss.php" />

Now that you have an RSS feed, there are other options to consider, such as using a service like Feed Burner to "burn" your feed. Feed Burner can track subscribers, links clicked on, suspicious uses and other things, for instance, making your feed look prettier with little widgets at the bottom of each post.

Currently, the URLs we use to access each of your blog posts are kind of ugly (they all contain read.php?id=). Tomorrow we'll focus on removing the query string from the blog post URLs.

Hatkirby on December 17th, 2008 at 12:38:32pm
πŸ‘ 3 πŸ‘Ž