Main menu

Monthly Archives: September 2013

Let me be clear on this point. I love programming in Ruby. I haven’t been as excited about a programming language since the time I got to work on a major project in Smalltalk. Ruby is awesome! I am having a LOT LESS fun with RubyGems.org. I have been muddling my way through reams of confusing documentation, knocking down problem after problem.

Now one still remains. My code contains rdoc documentation. I chose rdoc as it is the system used in the “pick-axe” book. Issue 1a) When I test install my gem locally, the rdoc docs are not built unless I explicitly add the deprecated –rdoc option. 1b) When I push my gem to RubyGems.org, the documents link points to an empty page with no info. It’s so bad, I’ve taken to adding this note to the description:

A very brief announcement. I just released my first ruby gem. It’s called option_list and it is a ruby class for processing symbolic function arguments. It makes it easier to process arguments that are clearly documented and understandable. So instead of:

my_fun(">", false, true, 66)

You could use:

my_fun(:nohistory, :paginate, prompt: ">", page_len: 66)

Long winded? Maybe. Clearer? I think so! Now I know; this is NOT going to set the world on fire. In fact it’s more of a “Hello Ruby World” than anything else, but please take a look.

The documentation for it can be found here and the gem itself is found here!

Any feedback on this gem or other topics would be most appreciated.

Thanks, Peter Camilleri (aka Squidly Jones)

PS: While my code contains full rdoc info, the documents link on RubyGem.org goes to an empty page for some reason. If someone could explain my error, I would be most appreciative and grateful for the help..

Share this:

Like this:

RANT PART 1

I like the Google Chrome Browser. In fact, I like it a lot! Still, Google, through Chrome, seems bent on propagating the myth that there are two distinct groups of web users:

Content consumers, the vast and huge majority who watch videos, blog pictures of their cats, and tweet about shoe sales. People in this group are not expected to type or think or have to deal with information in any useful way.

Content creators, the teensy tiny minority who create the interesting content by slavishly entering vast amounts of data on antiquated desktop machines running a custom Linux distro they created specially for their needs.

The myth adds that the two groups are fully distinct. A person is either in group one or group two. No mixins! The myth goes on to say that since group one is huge and group two is tiny, focus on group one and ignore group two; they don’t matter.

OK; We’ve heard from Apple, Google and friends, so, what’s really going on? The truth? Almost everyone belongs to both groups! Anytime you fill in a form, you are creating content on the web! Writing a blog entry involves the creation of new content. Even emails, tweets and instant messages require typing (even if not using human language grammar). The time has come to stop this pointless discrimination (and I chose my words very carefully here) and treat all web users fairly!

RANT PART 2

So how is it that my beloved Chrome browser is the target of these rants? Backspace! This harmless little key has a simple purpose in life: “Oh please delete the stuff I just typed”. That’s all it does, that’s all it’s supposed to do. If there’s nothing to delete, the backspace key should do NOTHING! Nice and simple!

This simplicity was not good enough for some though. Since the majority never need to type, they had a higher purpose for this key. They reasoned that if there were nothing to delete, the backspace key should take on the new and unrelated role of navigating back to the previous web page. So that’s text deleting AND web navigation on one key. More is better; right?

Wrong! Imagine you are filling in a complex form with a lot of data. You type away at a field and change your mind, the easiest way to erase the old data is to backspace. Now if you are VERY careful all is well, but if you accidentally hit backspace ONE time too many, you are whisked away to the previous page and all your data entry is LOST!

Now in most browsers, this odious behaviour can be turned off, but not in Chrome! The kind folks at Google are so committed to treating all web users as mindless sheep that this behaviour is mandatory. Not to worry, the Backspace means backspace plugin restores sanity to the world, except for one teesny problem. The Chrome super-brains decided that this freedom to choose was too dangerous and removed it from there app store. Further, if you try to download the plugin from somewhere else, Chrome gives you a nasty message saying “No, no, no… you can’t do that you rambunctious toddler!” No choice, no “Are you sure?”, nope, just NO! I was faced with this absurdity and frustrated by it! I tried several times from several web sites. No, no, no! I ended up downloading the file with Internet Explorer and copying it to the desktop and then ordering Chrome to install the file! This finally worked. I would never have figured Microsoft as a beacon of internet freedom, but there you are.

Since I do not like knuckling under to pointy haired managers, bullies, tyrants, and dictators of ANY kind, and since this valuable plugin is hard to find, I am including a zip of it below:

The file is zipped for two reasons. One; WordPress is too cautious to allow a plugin to be uploaded and Two; Chrome is too ornery to let it be downloaded. The zip file should side-step both of these issues. A further FYI, the plugin file include is the one I am running right now! It works, at least for me. END RANTS!

Note: The readers of this web site will surely have noticed that this blog has gone silent lately. Quite simple, my interests have taken me elsewhere for the last year and I have not had the time to devote to further content creation. This issue however, bothered me SO much that I just had to speak out and ACT!