watch this  

the official mrchucho blog

Firefox Growl Plugin Updated

Posted 2005 Sep 14

The Growl plugin has been updated for Firefox 1.5 beta. Also added an update.rdf to automate update handling. Enjoy!

comments (2)

NextImage Updated

Posted 2005 Sep 14

I have updated my Firefox extension Next Image for Firefox 1.5 beta. I also added an update.rdf file so that updates will be available automatically.

comments (10)

On Changing Languages

Posted 2005 Aug 30

A post on the Tucows blog caught my eye because it mentions a situation in which a developer chose to “port” a Java application to Rails. One of the key points against the switch highlights something that developers (myself included) tend to take too lightly:

  • Experienced Java programmers are easier to hire than Ruby hackers, as a general rule

It is easy to overlook the fact that while it’s easy (not to mention kickass) to port a Java app over to Rails, someday someone else is probably going to be supporting it. And it will likely be your employer or your client who is tasked with finding that person…

I had to write a “throw-away” data conversion script and to minimize the boredom and give myself a challenge, I wrote it in Ruby. That being said, it is very simple script and most of the complexity is in the SQL. But it use closures and a few other Ruby-isms. Now the larger project - of which my script was but a small part - has gone well over schedule and is out of control. But, instead of being able to pass my script off to one of the many Java developers at the client and move on… I’m stuck supporting it.

So, now, faced with re-writing another webapp in Java, I will pass on Rails - superior though it may be - in the interest of being a good citizen.

comments (0)

Glorious Ruby

Posted 2005 Aug 24
I’m sorry, but all of this cool stuff is blowing my mind.
<pre><code>
class DwemthysArray < Array
  alias _inspect inspect
  def inspect; "#<#{ self.class }#{ _inspect }>"; end
  def method_missing( meth, *args )
    answer = first.send( meth, *args )
    if first.life < = 0
      shift
      if empty?
        puts "[Whoa.  You decimated Dwemthy's Array!]" 
      else
        puts "[Get ready. #{ first.class } has emerged.]" 
      end
    end
    answer || 0
  end
end
</code>
It takes a minute to grok, then… Whoa.
comments (0)

Programming Language Examples

Posted 2005 Aug 24

Whenever I use a new language or framework I always want to do things the canonical way. So, a lot of times, this involves spending a lot of time hunting for good examples. I certainly think this is the best way to do things, as I always want to exploit a language to its fullest. I mean, it doesn’t make any sense to just write a C program with Ruby syntax!

This is probably old news, but I found PLEAC, the Programming Language Examples Alike Cookbook. It takes common tasks and provides language-specific examples in a “cookbook” style. It has examples in Ruby, perl, python, C++, haskell, and so on. All of the examples are commented and syntax-colored. Very helpful!

For Ruby, another fun one is Ruby One Liners. Though, some of them are a little esoteric. Surprise, surprise.

I know it isn’t a language, but I wish they had an entry for Cocoa! Instead, try CocoaDev.

comments (0)

Text Wrangler

Posted 2005 Aug 23

While I’m still a die-hard vim fan, gvim on OS X isn’t pretty and it was giving me headaches whenever I tried to edit Python scripts. So, I downloaded the free Text Wrangler from Bare Bones Software.

Firstly, it is very much an Mac application. So, A+ on that count. Even better, it’s surprisingly powerful. Some BBEdit plugins work, too (including one that adds Ruby support).

I’ve been using it to edit some Ruby code and have found it to be an entirely enjoyable experience… of course, after I realized you could disable1 mapping shift-backspace to forward delete. Gawd, that was annoying.

1 Preferences -> Editing: Keyboard -> uncheck “Enable Shift-Delete…”

comments (0)

Deleting Duplicates with SQL

Posted 2005 Aug 19
Deleting duplicate data in a database is a very common endeavor, especially when dealing with legacy databases and applications. I found this little gem and wanted to share:
<pre><code>
delete from employee
where (rowid, empssn) not in
    (select min(rowid), empssn from employee group by empssn);
</code>
It’s simple and generally applicable and - even better - doesn’t require a CURSOR.
comments (0)

MrChucho wiki

Posted 2005 Aug 19

I was talking about Wikis with someone the other day and decided I’d set one up to demonstrate their power and ease-of-use. I’ve used MoinMoin before, but I was looking for something much simpler. I wanted to use Instiki because of my on-going infatuation with Ruby. However, my hosting provider doesn’t have a very up-to-date version of Ruby and Instiki doesn’t appear to integrate with Apache (as opposed to running standalone).

I was looking for a couple of things: easy setup, no database and (hopefully) Textile support. I found PmWiki a PHP wiki that meets all my criteria except Textile support. It couldn’t be easier to setup and comes with a very straightforward Theme configuration. So far, it appears to be very robust and featureful. I certainly recommend it!

As it stands, there isn’t much on the wiki ; just some notes about a MUD book I’m reading. Another infatuation…

comments (0)

Site Update

Posted 2005 Jul 28

If you are visiting mrchucho.net, you will see that I have updated my WordPress theme. I’ve tried to minimize the customization in order to make upgrades and site maintenance even less involved. Plus also: I, too, was getting a little tired of Kubrick…

Let me know if you find anything missing or otherwise awry!

comments (0)

Projects

Posted 2005 Jul 27

Rbot Plugins

updated 11/06 version N/A
rbot is an Ruby IRC bot. I have developed numerous plugins, most of which are now included in the distribution. They are also available here.

Quicksilver Weather Plugin

updated 11/08/05 version “beta2”
Plugin for Quicksilver provides quick access to current weather conditions (including temperature, wind,visibility and conditions summary) via the NOAA XML-based web services. Updated for beta44

Cocoa Textile

updated 01/23/05 version 0.5
CocoaTextile is a Textile Editor for Mac OS X. Using CocoaTextile, Textile and Markdown can be used to convert plain text to XHTML. Includes all the standard Mac text editing capabilites (e.g. spell-checking, multi-level undo, etc.) and an HTML preview and source view.

Firefox Extension: Next Image

updated 11/01/06 version 0.7
A handy little extension for automatically incrementing (numerical) image URLs, allowing you to make your own “ad hoc” image gallery.

Firefox Extension: This Window

updated 11/01/06 version 0.5
A pretty trivial extension that adds the ability to force a window to open in the current window. This is helpful if you don’t want to open another browser window.

Firefox Extension: Growl Notifications

updated 04/29/2007 version 0.6
Enables download complete notifications through Growl. Requires Firefox 1.5 or greater. Compatible with Firefox 2.0.

Pytego

updated ??? version 0.2
Pytego is a two-player, cross-platform, networked clone of the classic boardgame “Stratego” from Milton Bradley. It is developed using Python, PyGame and SDL. It’s out-of-date and probably doesn’t work, but is included here for posterity.

NetHack Patch

updated ??? affected file src/botl.c
This patch colors the Hp monitor at the status line with the tty interface. If your Hp is lower than maxhp but more than 2/3 of max, it is shown green. If it is less than that, but more than 1/3 of max, it is yellow. If it’s less than 1/3 of max, the color is red. And with values less than 1/10 of max, it is highlighted, blinking or whatever your screen shows with the ATR_BLINK attribute.

#define HPMON in include/config.h to activate the patch.

Checked against 3.4.1 ; Bones / save files NOT affected.

DieRollerApp

updated ??? version 0.1
DieRollerApp is a KDE application that simulates rolling the standard D&D dice (e.g. d4, d6, d20, etc.). This was mostly an excuse for me to play around with KDE, QT and KDevelop.
comments (0)
atom rss