Random Predictions of 2011

Hatkirby No Comments

Hi, remember me? I’m the failspaz that failed to even fail during Kirby Week and instead failed even more and hasn’t posted since. No Christmas post (well, that’s happened before). No December 29th post. What? Anyway, we can hope that will end soon because my first prediction for 2011 is that, as with previous years, Four Island will suddenly become popular amongst its frequenters again on January 1st. Here’s hoping! *crosses fingers so hard that nothing happens*

Anyway, what was I saying? Oh yeah, predictions. Last year’s 2010 in Song was a major fail (oh god, that seems such a short time ago), so I’m going to revert to something better that we’ll all enjoy: random predictions! Are you ready? I’m not ready. Let’s go!

January 1st
Four Island, due to it’s annual four-month-popularity spell, suddenly becomes popular and as a result, Starla’s other router explodes, forcing her to put the only other router in the house, her new Apple Time Capsule, in the dirty, gross, disgusting basement. As a result of that, Starla prints "WANTED" posters for her Time Capsule and drops a pile of them in the spot where it used to live.

January 28th
Someone realizes that Four Island isn’t up. In fact, it hadn’t been up since January 1st because Starla, in her infinite intelligence, forgot to forward the ports. Random sidenote: backing up from the basement is slow.

February 2nd
Drifty writes a story about police constables rushing a Russian prison and saving Regina Spektor, who had been imprisoned because the government didn’t approve of chemotherapy. Unsurprisingly, Starla thought the story was real and Drifty’s email service soon fell to a denial of service attack. Which is rather stupid if you think about it because Starla and Drifty both use Gmail.

February 3rd
Starla’s printer, Matilda, bails her out of imaginary jail for DoS’ing one of Gmail’s servers, platonic.superman.kindle-porcupine.gmail.com. Matilda gives Starla a stern talking to, and then prints her out an ice cream cone in FORTRAN.

February 8th
iOS 4.3 for the iPhone, iPad and iPod touch is released, giving the devices such new features as time travel, peace-making, house construction, reliable mortgage analysis and the ability to view a page in MobileSafari without it refreshing every five minutes.

February 21st
The world comes to an end. Or at least begins to. IANA officially runs out of IPv4 addresses and someone, somewhere finally realizes that "Oh god, this is serious." In unrelated news, Google founder Lawrence E. Page decides to run for U.S. president. He pledges to put AdWords in all of our subways and replace cable TV with YouTube.

March 3rd
Apple announces the successor to the iPad, the Max-iPad, which is "bigger, better and has a name that’s even easier to make fun of." Needless to say, everyone immediately pre-orders one.

March 15th
Starla releases Season 4 of Pillowcase. The first comic depicts a pillowcase buying an iPhone and jailbreaking it. Needless to say, everyone is confused.

March 16th
The iPhone Dev Team release a new jailbreak for iOS 4.3: PillowBreak. Needless to say, everyone is even more confused and Starla is pulled aside for questioning.

March 28th
Apple releases the Max-iPad. The first 1000 people to arrive at the Apple Store in Manhattan witness a shipping blunder as Apple unpacks the newly released Max-iPads and realized that FedEx accidentally sent them the wrong thing. Happy Apple customers walked away with $500 hygiene products and didn’t realize the mistake until they tried to play Angry Birds on them.

April 4th
Optical media officially becomes obsolete. Smiley is seen jumping around in the background shouting "HA! I WIN! TAKE THAT!" Starla is sad until she realizes that obsolete != nonexistent (they still make vinyl records, you know) and buys a subscription to "I’m Old And I Still Like CDs Magazine".

April 17th
Prices of condos go up after presidential candidate Lawrence E. Page announces that if elected, he will make it mandatory by law to install spam filters in all USPS mail trucks.

April 18th
Prices of condos go back down after it is realized that 2011 isn’t a presidential election year.

May 1st
Starla gets "May Fever", as she calls her nonsensical obsession with the month May, and releases a remix of "Girlfriend in the City" by Nelly Furtado that is supposed to illustrate why. Needless to say, it doesn’t.

May 5th
iTunes 11 is released with new features such as "Even Uglier UI!", "More Annoying Social Networks!", "When You Buys Songs From Us, We Make You Sign Your Name In Blood!" and worst of all, the inability to import songs from CD. Starla doesn’t upgrade to iTunes 11. For some reason, everyone else does.

June 6th
Pyro achieves the fastest time for solving a Rubix cube while doing her nails and saying the word "serendipity" in a questioning manner: infinity.

June 7th
Starla gets a MacBook Pro and is so excited about it that she accidentally spills kerosene on her server.

June 17th
The iPhone 5 is released with a CDMA chip. AT&T immediately goes out of business.

July 7th
Someone says "Hey, maybe we should start switching to IPv6 soon." He is ignored.

July 29th
Tumblr experiences some downtime. Starla’s old computer also has a kernel panic, someone makes a jokes about the Max-iPad, a cat is found in a tree and the sun rises in the east.

August 3rd
Nicki Minaj dies a horrific, lack-of-talent-related death. Justin Beiber, Jason Derulo and every rapper start worrying about the likelihood of releasing another album.

August 8th
Timbo94 writes a True Falsity about purchasing the rights to Cardcaptor Sakura. Everyone is so surprised that someone actually out-waited the latency to write a True Falsity that someone, somewhere is sued and something, somewhere explodes.

September 9th
The first Homestar Runner video of the year is released. Everyone immediately forgets about the hiatus and watches in excitement as Homestar says something funny and is subsequently stuffed in a bread drawer.

September 22nd
In celebration of Four Island’s anniversary, Starla releases Four Island 3, a grand rewrite of Four Island in Ruby on Rails. Everyone is so stunned with the beauty and magnificence of the new website that Starla is immediately arrested and a background search is done based on the suspicion that she stole the website from someone.

September 23rd
fourisland.com expires.

October 10th
Starla is released from prison due to the fact that she talked about The Crucible and Kate Nash too frequently. She subsequently opens her web browser only to find that fourisland.com has been replaced with porn.

November 10th
The world actually comes to an end as the RIRs all run out of IPv4 addresses. All Mayan-superstion believers are surprised as armageddon arrives a year and a month earlier than they expected it to. Starla laughs at them from the side, and then realizes that the end of the world isn’t necessarily a good thing, so she backs up her server and runs off with her Time Capsule.

November 11th
Nobody is around to troll the Internet about a certain redundancy of the date because the world ended.

There you go! Random Predictions for 2011. What’s interesting is that while my predictions for February 21st and November 10th are humorous, they are actually going to happen (albeit possibly on earlier dates). Not the Google presidency thing, the exhaustion of IPv4. It’s going to be interesting to see how this year pans out because this is actually rather serious and it’s going to happen. Lol, I can’t wait to laugh at 2012 believers. Anyway, I hope you’ve all enjoyed 2010, because tonight, it’s all going to be over! And let me be the one to say: "Oh GOD, that was fast." :P

Hatkirby on December 31, 2010 at 12:30 pm

Kirby Week 2010: Exploiting The Inflector

Hatkirby No Comments

On the second day of Kirby Week, Four Island gave to me: a tutorial on pretty error messages.

Disclaimer: The post assumes you have Rails 3. It may work with Rails 2, but I dun know about that. Just to be safe, go ahead and install Rails 3. :P We good? Great.

Hi, ‘yall! It’s me! Do you know what’s sort of annoying? Rails is really wonderful with all the things you can do with models. Specifically, validations are just great, and most of the time, they’re really pretty too (because Rails is about Readability!), so you can write beautiful code like this:

validates_presence_of [:anon_name, :anon_email], :if => :anonymous?

You see? In one line, I made it so that the model checked for the presence of "anon_name" and "anon_email" when "anonymous?" returned true. That’s just great. However, there’s a problem with this that you may be able to foresee. Let’s see what kind of error messages are returned when "anon_name" and "anon_email" are left out:

Anon Name is blank
Anon Email is blank

That’s not really that user friendly, is it. Oh well, we can just change our code a bit, right? Make it a bit less pretty?

validates_presence_of :anon_name, :message => "Your name is blank", :if => :anonymous?
validates_presence_of :anon_email, :message => "Your email is blank", :if => :anonymous?

It’s a bit longer and clunkier, but it should work, right? Nope.

Anon Name Your name is blank
Anon Email Your email is blank

D’oh! After searching around the Internet, the only solution I could find was this disgusting jumble:

validate do |comment|
  if comment.anonymous?
    comment.errors.add_to_base("Your name is blank") if comment.anon_name.blank?
    comment.errors.add_to_base("Your email is blank") if comment.anon_email.blank?
  end
end

Now the error messages are correct, but the code itself is horrendously disgusting. I can’t settle for that! Well, it turns out that there’s another way. A way that works with the first method of validation shown above, the one that validated both fields in one line. Yes. Go back to that. Next, look inside your config/initializers folder for a file called "inflections.rb". Add the following to the bottom:

ActiveSupport::Inflector.inflections do |inflect|
  inflect.human "anon_name", "Your username"
  inflect.human "anon_email", "Your email"
end

Now, restart your server and check your error messages. Guess what?

Your username is blank
Your email is blank

This works because the inflector is used to humanize the names of fields before they are prepended to the error message. By customizing how the inflector humanizes the field names, you can effectively customize your error messages! Horray! The inflector can be a good ally once you learn how to use it properly because Rails humanizes things in a lot of places. Let the inflector be with you. Okay. I should end this post now. :P

Hatkirby on December 14, 2010 at 12:30 pm

Kirby Week 2010: Welcome to Rails 3

Hatkirby No Comments

On the first day of Kirby Week, Four Island gave to me: A tutorial on how to get Rails 3.

Oh my god, it’s Kirby Week. That. Was. Fast. I just remembered yesterday (which was the first day of Kirby Week, but I didn’t have to post on Sunday anyway) that I usually post once a weekday for Kirby Week (except Friday, which I have traditionally failed at life on :P ). Right. Anyway, since I have been doing a lot of work with Ruby on Rails recently with Four Island 3, I think I should focus this year’s Kirby Week on Rails! :D

Now, I have been using Rails 3 to develop Four Island 3 (OH MY GOD THE THREES! RUN AWAY!!!!!) and it’s quite nice. It doesn’t seem beta-ish at all, and do you know why? Because it isn’t beta-ish at all! :P Today, I’m going to show you how to install Rails 3 (as well as some other stuff) onto your computer because Rails 3 is pretty awesome yo dawg business. O_O

Now, as you may know, Rails 3 requires Ruby 1.9. Ruby 1.9 is pretty awesome, but it breaks a lot of old Ruby programs, so we’re going to install it alongside your system Ruby installation by using something called "rvm", or the Ruby Version Manager. Note that this will only work on UNIX-based OSes, that means Linux and OS X (no Windows! :P ). First, ensure that you have "git" installed. Second, open a terminal and run this command:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

It seems pretty mysterious, but all it does is download rvm. You’re not quite done yet–you have to inject rvm into your bash session. To do this, follow the instructions that the above command showed you, or just add this line to your ~/.bash_profile file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Next, open a new bash session or just source the profile (source ~/.bash_profile) to load rvm into your session. Finally, just ensure that everything worked by running the following command:

type rvm | head -1

If it replies with rvm is a function, then congratulations! You’ve successfully installed rvm, and not much else yet! :P Just to keep things safe, run rvm notes to see if there’s anything special you have to do for your particular operating system (for instance, I believe you need to have Xcode installed for OS X).

Great! Now, let’s install Ruby 1.9.2. It’s fairly simple–just run the following commands:

rvm install 1.9.2
rvm --default use 1.9.2
rvm default

The first line is the one that will take a while, but it’s a fairly simple process overall–it just installs Ruby 1.9.2, sets it as the default ruby and then chooses it to be the interpreter for the current session.

Finally, let’s install Rails 3. Run the following command:

gem install rails

Note that you should never use sudo when installing gems when you are using rvm. Anyway, yes, it really was that easy. Now that you have Rails 3 installed, you should explore the great wondernesses of its wonderness! :P You should read that page. Yes. Anyway, I’m going to be writing about some cool tips and tricks of this you can do with Rails this week and it’s going to be great. :D And, now that you have Rails 3 like I do, you can be sure they’ll work! :P

Oh, and if you ever want to switch back to your system’s default Ruby, run this command:

rvm use system

Hatkirby on December 13, 2010 at 12:30 pm

Some Random Stuff And Perhaps A Cookie

Hatkirby No Comments

Okay, so, wow! It’s December already! Please allow me to say:

WHAT THE AMANDA FRIBBING PALMER?!?!!?

Yes, this year has gone by incredibly quickly, though if you notice, we had a much better year this year than 2009. 2009 was just plain… bad. But 2010 isn’t quite over yet, so let’s keep things going semi-well!

Anyway, first of all, I just realized that 24 Ways started again! IT REALLY IS THE CHRISTMAS SEASON! :P It really is quite a good blog, so if you’re not subscribed to it yet, make sure you do so before the letter self-destructs!

Next, I want to apologize to yet another person who commented on the Annetenna post and whose comment was deleted. My blog software majorly sucks and I’m working very hard at rewriting it. If the author of the comment is reading this (the comment mentioned something about the author’s versions of the MP3s getting ruined and contained a link to the Internet Archive), please resubmit your comment and I’ll ensure it gets through.

Do you know what else is fun? NONSENSE! I’ve been playing with it a lot recently and it’s come up with some humorous quotes:

* JAL is melting Hatkirby's pants
Smiley: What the fsck
Bluemonkey: Good day fine sir or madam
Drifty: I am useless when I am sawing a Douglas.
Tamasys: THE CHEESE GATE IS OPENING!
Bluemonkey: Do you want a nicely skinny Smiley's Bender?
Tamasys: I'm sitting on Ozzyfrog in bathroom
Bluemonkey: ....bie
* Drifty is asking "Do you want a mindnumbingly immense protein bar?"
Bluemonkey: ....bie
Drifty: I hate Pyro because she's so fat!
* Ozzyfrog is eating Mary Poppins
JAL: GAH
JAL: I desire JAL!
* Tamasys is being square
* Bluemonkey thinks Tamasys is round
Pyro: I love Bluemonkey because he's so Oklahoman!
Sammi9494: My computer is going to a toilet because it is so white!
Hatkirby: I collect bootleg drugs.
Pyro: WHERE IS MY CAT????
Gryphic: It's in a fireplace!
Pyro: YOU PHONE! I PUT YOU THROUGH A FIREPLACE, AND THIS IS HOW YOU TREAT ME?
* Gryphic is found ugly 253 days later at The Land Of Coincidence with a printer in her mouth
Pyro: I despise Gryphic!
Drifty: Your mom is mushy?!?!?!! 
* Drifty is found dead 32 days later at a salad bowl with a Cooaso in her mouth
* Pyro is listening to Grace Kelly with her Illinoisan Jolly Ranchers 
* Pyro thinks Pyro is great
* Pyro is about to sing 
* JAL runs far away

Yes. Lolwhut? :P Anyway, that was a pretty random post to start a pretty random month. Yes. Here’s your cookie. *steals a house*

Hatkirby on December 3, 2010 at 12:30 pm