Crunchytoast.com

What’s better than toast? Crunchytoast!

crunchyt sez:

This is my first website ... after 15 years of making them for everyone else! Hope you enjoy it too.

Last year I re-posted some obsure Kana & Romaji converter code for Ruby. Although I had fixed it to work with modern versions of Ruby, the romanization converter just didn’t want to work! Finally after dedicating an afternoon to it, I found that the regex used to split the source string was returning nil. At some point in the distant past it worked, and then broke irreversibly.

In posting this update, I have also added support for “tsu” being transliterated to “つ” which the original author (being Japanese) did not include. In working this out, I discovered a bit about the internal design. As such I have added some helpful comments (helpful if they’d been there originally!)

Full credit goes to the mysterious K.Kodama who wrote this in 2002. Some 8 years later, now that it works better, this is the best kana/romaji converter available in Ruby!

Full code is included after the break! Read the rest of this entry »

Technology commentators have noted that Amazon is trying to improve the Kindle browser experience. With the iPad only weeks away, I don’t blame them for trying to play catch up. However, I do wonder if this is really going to be a net win for end users?

Wired Magazine’s Michael Calore has described the Kindle’s browser experience as:

… notably sub-par. It’s good enough to check your e-mail, post to Twitter or read Wikipedia, but it doesn’t handle images or more complex web apps particularly well.

Source: Amazon Is Building a Better Browser for Kindle

I would disagree with the browser being described as “sub-par”. The Kindle browsing experience in fact is so far below par that “sub-par” is by contrast a compliment tantamount to the most obsequious flattery! Read the rest of this entry »

84 Web Application Pricing Pages

February 18th, 2010

Have you ever wanted to compare the pricing of many web based applications? Me too! Let me know if you ever write a blog post about it. All I have is a rather large list of pricing pages that I compiled for a project!

Payment Model Types

Annual Freemium - Can upgrade to a Pro Account for one off annual payment
Monthly Freemium - Can upgrade to a Paid Account per month
Trialware - Can trial for 30 days, thereafter it is paid per month (usually from $9-12/mth for entry level)
Corporates Pay - Only costs money for businesses

Read the rest of this entry »

Everyone is talking about the iPad. I reckon all we’re going to hear for a while will be “iPad iPad iPad!”

Having read countless comments about the new iPad having “no SD card slot” and it being made only for fanbois, I found myself considering the question:

Is the iPad better than a Netbook?

Many early commenters expressed hopes for a Mac Netbook instead of an over-sized iPod Touch (with no camera and limited storage). So the first thing I did was look for some articles on Netbook Hackintoshes.

Read the rest of this entry »

You remind me of someone! If you’re reading this, then like me you must forget regex expressions frequently. Despite the chunky snippets found within the Net’s regex libraries, I can never find the Japanese related ones I want. Of course if you search for 規制表現 you are more likely to find them! Surprise, surprise, Japanese speaking coders write about them more than English speakers :(

So here is a small compilation of essential kisei-hyogen (regexes in Japanese) that you will need if you do any Japanese text or data processing.

These should all be PERL compatible, and assume UTF8 encoding. If you are using a different encoding and get errors, try converting using ICONV or a platform specific function.

Without further ado, let the download begin:

Read the rest of this entry »

This is only a quickie, but important enough to spread the word (oh, btw IE blows!)

In all versions of Internet Explroer (IE 5,6,7,8 apparently), the browser silently creates an immutable global variable for every element ID. This can lead to naming clashes when using jquery.

For example, I had the following code:
startDate = $('#startDate');

Here the DOM element ID is startDate. However, whenever I tried to access the jQuery functions such as startDate.attr() or startDate.val(), i received this terse Internet Explorer error:

“Object doesn’t support this property or method”

Simply by renaming your local variable to something else, such as myStartDate, you can avoid this problem! Peace at last.

Kudos shout out to Rick Strahl whose March 2009 post is the only resource I found confirming this!

Aside from the obvious indications of geekiness (a blog about programming & human language), Google has found me geek-worthy enough to join the Google Wave preview! Read the rest of this entry »

Hilbert’s Pallette, by Anton Sherwood
Awesome colorful boxes!

If you’ve been using the Colorbox Plugin for jQuery, you may have noticed that it rocks! Compared to the bevvy of other JavaScript modal dialogs, this one animates smoothly, loads quickly, is lightweight and well suited to jQuery projects.

However, the standard way to call it is from a click event. In fact, I couldn’t find any resources documenting how to launch a Colorbox programatically. The examples from the Colorbox website were strictly “on click” oriented. After digging through the source code, I tried a few things and hey presto, the answer was simpler than expected. For calling Colorbox from a function (i.e. without an click directly preceding it), you should do this…

//Launching jQuery Colorbox without a click
$.fn.colorbox({href:'/href.html', open: true, iframe: true, width:300, height:400});

This will open the colorbox immediately upon execution, this example opens in an iframe with width/height as shown. Note, the only options required to make it work are href and open:true. See the documentation for all other options.

For those of you wanting to write your own plugin, the Colorbox internals are a study in good jQuery plugin design. It features some nice techniques, including code optimizations that increase compression, and aliasing of otherwise long function names.

The Business Japanese Test held in 2009 recently delivered their results to my door. Without any further ado, I am happy to announce I got a high J2 (well above the test average). I was a little disappointed about not being in the lofty J1 or J1+ leagues, despite having JLPT 1 bragging rights! However I was close enough to J1 to make me want to try again.

Result Spread

Here is an overview of the BJT ranks and the number of people who attained each rank, out of the 2,788 people who sat the test in 2009.

Rank # People
J1+ (600-800) 198
J1 (530-599) 509
J2 (420-529) 1,402
J3 (320-420) 515
J4 (200-419) 134
J5 (0-199) 10
TOTAL 2,788

Read the rest of this entry »

Back in Black

August 25th, 2009

Because of the locals’ penchant for wearing dark colors in winter, they call Melbourne the Black City.

The weather occasioning this first post since my return home is more than appropriate. Today, Police recommended people in Melbourne’s central business district leave work early to avoid “torrential rain” and “destructive winds”. Yikes!!!

Looking over my posts this year, I am mostly happy with the coverage of my various obsessions; mostly. I still owe you a few iPhone Tutorials. These were promised in July 09, but moving countries got in the way. Apologies to you iPhone fans.

With regular, ADSL2 speeds connecting me to the Internet, I feel I can be productive again. Only time will tell, but check back soon, it should be fun.