Categories
computer

Fixing "wrong number of arguments" Error w/Rails 1.2.3 Upgrade

If you’ve just upgraded your Rails gem from 1.2.2 to 1.2.3 and are getting the following error on database hits..
wrong number of arguments (1 for 0)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/vendor/mysql.rb:566:in `initialize’

..note that updating RAILS_GEM_VERSION in environment.rb appears to be required. Running a 1.2.2 application on 1.2.3 (even when 1.2.2 and all dependencies installed) will yield this error. Whatever.

Categories
personal

For Geeks w/Allergies: The Air Purifier To Buy

I am deathly allergic to the blooms of the Sweet Acacia tree, which happens to be a popular choice of landscapers in Phoenix. I can physical sense the presence of Sweet Acacia from a good 20 meters, and the mere thought gives me a Pavlovian response. The blooms are my kryptonite.

My allergies hit so hard this year that I decided to invest in a quality air purification unit. I’ve had several inexpensive HEPA-type units over the years, but none that have made a significant difference to my nose. I am very attracted to the filterless design of the Sharper Image Ionic Breeze, but various accounts show that not enough air moves through it, and it’s measured effectiveness at removing allergens is comparatively small. The nicest, hospital-quality units still use filters, so you’re likely to have to live with paying for filter replacements if you want a nicer air cleaner.

I purchased the Friedrich C-90B (click for picture). It’s a combination of a powerful fan, reusable pre-filter, replaceable activated carbon filter, and a large washable ionizing section. While not cheap (mine was $425 USD here, though the price has since increased), it moves a significant amount of air for a household model, does both electrostatic precipitation and conventional filtering, and produces relatively little ozone. It’s also large, hideously ugly and must be placed unobstructed on both ends for optimal air flow, but I’m more than willing to pay that price to be able to breath again. Now why the heck didn’t I buy a decent model years ago? If you have bad allergies, seriously consider ordering one. I’ve found it well worth it.

Categories
computer

Updated Google Code Prettify Bookmarklet

My poor blogless friend Henri has made some small updates to the original Google Code Prettify JavaScript Bookmarket.

Categories
computer

Shell Magic: Globally Find/Replace Text Using RegExps Within Many Files

Here’s one of my favorite Perl-based one-liners which I whip out when I need to find a bunch of files and replace text based on regular expressions at the command line.

find . -iname ‘*.js’ -exec perl -pi.bak -e ‘s/2006/2007/g’ {} \;

This example first finds all JavaScript files (using a case-insensitive file extension) in the current directory. Each file is then parsed. If the string “2006” is found within the file, it is backed up to a file of the same name with a “.bak” extension, after which all occurances of “2006” are replaced with “2007”. w00t!

Categories
computer

Convince Your Manager You Need A Wiki

self-portrait-poster-2.pngSometimes the pointy-haired manager just doesn’t “get” the wiki concept. Here’s something to email him/her..

The business benefit of a wiki is two-fold. First, project members and team have a single, common platform for managing documents which is easy to reference (in email, IMs etc), cross-platform, accessible, and perhaps most importantly, searchable. Second, it gives the business instant transparency into project state. By standardizing on a wiki as a place for status reports, minutes, project plans, design documents etc., both business and development has a shared, direct place to go for information, reducing expensive request/response cycles incurred when the business requests information.

Categories
computer

Please Stop Saying "Google Simple"

It should be generally assumed that designs should be as simple as possible. So if you’re working directly with a competent designer, you need not say so. If your designer does not hold this as a core working principle, get a new one.

Client: “We’d like you to design a next-generation car dashboard for our new line of luxury vehicles. The car will feature all the latest gizmos: GPS, iPod integration, satellite radio, automatic environmental controls, you name it. And the interface needs to be simple. Google simple.”

Me: “Ok.. here’s what we’ll do. We’ll remove the wheel, pedals, and all conventional buttons and displays. Instead, we’ll mount an LCD to the dash, and display a single text input box. Voice recognition will fill in this box for the driver, and when (s)he says “Search”, the car computer will return the first 5 million commands (s)he most likely meant. The driver can then touch the command which they meant and have it execute. Alternatively, the driver can say “I’m feeling lucky!” to have the car automatically execute the most likely desired command, such as “Turn right”, or “OMG STOP NOW BEFORE WE DRIVE OFF THAT CLIFF!!!” If the driver survives long enough, they’ll get to enjoy the lumbar support and tunes from their iPod.”

Client: “…”

Me: “We can call it ‘Sue-gle’.”

Categories
computer

Why Outlook Sucks: Part 2 of 900,000

Note: Yes, this is still on an older version of Outlook because that’s what I’ve had to use. Please feel free to contribute to this series in your own blog via trackback/ping, and I’ll post links en mass to the front page when I get enough!

Let’s delete a folder to which messages are directed via a rule.

error.jpg

Outlook does some dependency checking and found that deleting the folder will hork a rule. Good. Unfortunately we get a disgruntled little dialog box entitled “Rules in Error”. (Shouldn’t this be “Error in Rule”?) The use of a table I surmise would be to support display of a laundry list of errors, but since there’s only one in this case and the table won’t wrap the error text, we get to scroll all the way over to the right. Not that it really matters, because I don’t have a choice on how to proceed. The “Close” button gives me no indication as to what will happen when I click it.

I never have this issue in Mail.app, because when I delete a folder related to a rule, the rule automatically becomes disabled and folder reference unselected. Here’s what a simple rule looks like after you delete a folder to which it directs email.

rule.png

No annoying dialog, and I can easily rewire the rule since it wasn’t deleted. Also, if I create a new folder with the same name, the folder automatically gets wired into the old rule. Makes sense!

Categories
computer

Advice For The Telecommuter

If your laptop has a fan on the bottom, don’t use it when you’re naked.

Update: Stop looking at me like that. It’s never happened. Honest. 🙂

Categories
computer

Why Outlook Sucks: Part 1 of 900,000

Let’s find an email from Toni regarding her party next weekend. There appears to be a search box in the toolbar.
full.jpg
Wait.. that seems to be only for contacts. Nevermind.

menu.jpg

There’s a find button to the left which brings up a toolbar, but it appears to search only the Inbox. Unfortunately I have a bazillion folders and rules and have no idea where the message is located, so I’ll go over to the “Options” menu (of all places) and start an “Advanced Find”.

advanced2.jpg
Uh.. ok. I have no idea why I need “More Choices” or “Advanced”, and apparently I’m still searching only the Inbox. Let’s “Browse”..

select.jpg

Now that we’ve systematically selected every possible place the email could be–which could apparently be in my Calendar or Contacts–we can click OK and go back to the “Advanced Find” dialog and click ‘From..’

sub.jpg

Great.. the engineers decided to reuse the same old contact finder dialog. There are a lot of people with a ‘Toni’ in their name, so we’d better embark on a separate sub-find quest to identify the correct contact record. Make sure you click ‘Find Now’ and not ‘New Search’ when you’re done.

res.jpg

When we come back from a coffee break, we see Outlook proudly presenting a result set, sorted by date, most recent first. That’d be great, except that if I’d received it recently, I probably wouldn’t need to use an ‘Advanced Find’ to locate it, would I? The results are also displayed within the dialog for some reason instead of the main window, so I guess I’ll have to keep this up on my second LCD, which I’ll now repurpose as the “Dedicated Advanced Search Dialog Monitor”. Whatever.

Just for shiggles, let find an email in Apple’s Mail.app.
picture-1.jpg
Holy freaking crap. I typed in ‘toni party’, and it gave me emails from Toni about her party, sorted by likely relevance. It was immediately clear how to search and the results took less than a second to display, despite the fact the PC is apparently faster spec-wise and I have magnitudes more email on my MacBook Pro. Huh.

Update: Part 2 of 900,000

Categories
Uncategorized

Conspiracy Theory: Blue Man Group Recruits Seth Godin

When I saw Blue Man Group at the Venetian I knew one of them looked familiar. It was none-other than entrepreneur Seth Godin! Ok, probably not. But there is a resemblance, no?

Seth Godinseth_godin.jpg

Blue ManBlue Man