Categories
computer

Writing Good Error Messages

I received this little note from my Mac today.

mac_low_battery_warning.png

This made me feel all warm and fuzzy inside despite the interruption of my work because it satisfies my general criteria for displaying error messages to users.

  1. A graphical severity indicator is given so I know whether or not to care.
  2. It provides a succinct, human-readable desciption of the issue. (No “ERROR CODE: 23DD8” crap which is meaningless to the user.)
  3. An immediate, resolvable course of action is given to the user. Providing this makes the user feel empowered and accomplished for acting. Neglecting this makes the user concerned and irritated.
  4. A description of future symptoms is given for when/if the user does not take the suggested course of action. This gives the user reason to do what you’re asking.
  5. It shut up about the issue when I clicked OK and let the failure happen like it told me it would. When I noticed my mouse wasn’t responding I immediately remembered why.

The dialog is in stark contrast to this nifty gem constantly pooping out of my Solaris kernel..08-21-07_1354.jpg

“Pin widgit 27 is EAPD capable.”

WTF??? What the heck is a “pin widgit” and why do I care if it’s “EAPD capable”? Is this even a bad thing? Do I need to do something here? What happens if I ignore this, which I most definitely will since I have clue what it’s talking about? Why does it tell me this every time I start the machine?

Criteria failure on all counts. Bad computer!

Categories
computer

Request For Invention: Ultimate Skype Conference Phone

Attention IPEVO: Go ahead and bill me for one of these Skype conference phones as soon as you meet this feature set.

  • Clear voice quality with good range and crosstalk reduction. (Duh.) At least as good as that popular Polycom model everyone uses.
  • Color LCD and interface like the SOLO, but with a few conferencing features. (Actually, go ahead and add those conferencing features to the solo as well. It needs some! If Skype doesn’t allow for this, I’ll pay a minimal monthly fee for a 3rd party integration.)
  • Bluetooth pairable with OS X, with a tolerable amount of latency when used wirelessly. No special drivers must be used for this.
  • Ethernet port (and LAN pass-through) just like the SOLO for computer-free operation.
  • USB port for wired laptop operation. Special drivers are OK here, but I don’t want to have to run some special app in the forground to use basic features.
  • Optional: Power-over-ethernet operation. Add $20 for this feature.
  • Optional: Clustered operation. Add $20 for this feature.
  • Optional: Network discovery and AirTunes support. Add $20 for this feature.
  • Optional: Gigabit ethernet with four extra switch ports. Add $40 for this feature.

You may charge me up to $250 for one unit (plus extras), which includes all cables neatly packagable in a box that can be used for transport. Thanks!

Categories
computer

Skype Phone Reviews: IPEVO SOLO, FREE.2

solo_3.jpgWe‘ve recently started using Skype hardware by little-known vendor IPEVO. SOLO models for the desktop (pictured) and FREE.2 USB handsets for the road. The SOLO plugs straight into your ethernet network, and also functions as a tiny ethernet switch, providing a port for your computer if you only have one RJ-45 jack at your desk. It took me less than 5 minutes to get running with no “Quick Start Guide” crap or drivers required. Since I already had a fully juiced Skype account, the SOLO logged in flawlessly with no hassle. Happiness ensued.

The full-color screen is easy to read and the angle can be adjusted. Unlike more “enterprisey” phones, there is no excess buttonage, and the unit in general is very easy to figure out and use. Despite a couple minor nitpicky items (could be easier to access voicemail, not enough speed-dial stuff, needs conferencing built in), the SOLO is a solid practical phone at less than $200 (USD) per seat.

I’m less fond of the FREE.2. I suppose it works well for what it is, but I don’t like having to think about starting special software to take advantage of all the features. Everything should Just Work without having to worry about additional moving parts. (Oh, and everything should integrate flawlessly with Address Book too.) The hardware itself seems to work well enough, but until the software side is more streamlined and polished I’ll likely stick to headphones and the MacBook Pros built-in microphone.

IPEVO also offers a dedicated conference unit named XING which we may pick up in the future, but have not played with so far.

Categories
computer

New OpenRain Homepage / IE Woes

We never spent a ton of time on the OpenRain homepage, so we decided to shake it up today in response to user feedback. I wanted to make our proposition clearer while keeping the existing brief one-page style, and add some awesome sauce yet stay business friendly. Check it.

As usual, a significant percentage of the development time was spent figuring out a combination of hacks to make IE6/7 render as close to “normal” as possible. Below is a screenshot of how FireFox, Safari and IE6 (from left to right) lay out the floating divs and images after a couple hours of IE-specific work. Three stupidity points are awarded to IE for the following reasons..

  1. The scrolling film strip at the top is completely disabled for IE because IE6 insists on reloading a CSS background-image if you change its background-position programmatically in JavaScript.
  2. IE also has issues determining float positioning, so the sticky note has a few IE-specific lines to keep it from shooting through the top of the body.
  3. Transparent PNGs have never worked correctly in IE6, and the hack to “fix” the issue severely distorts affected images.

ie.png

Categories
computer personal

Photos: One Laptop Per Child (OLPC)

Here’s Marc on his new OLPC laptop, which he received for a generous donation. It has a surprising amount of functionality packed inside that adorable green exterior, and found all the local WiFi hotspots immediately. Mega philanthropic props to Marc and all involved. Full resolution shots are available on Flickr._mg_9867.jpg_mg_9870.jpg_mg_9871.jpg_mg_9873.jpg

 

Categories
computer personal

Welcomed To The RRoD Club

I powered on the ol’ Xbox 360 this weekend to finish Mass Effect, a feat which I was especially pumped about since I’ve been told I’m extremely close. Much to my surprise, Microsoft had left a super special, albeit slightly belated Christmas surprise up in my tubes.Xbox 360 RRoDAwesome!! Thanks, Redmond!!

Categories
computer

Rails 2.0: Gmail SMTP With ActionMailer

Marc just checked in a nifty little Rails 2.0 plugin to the OpenRain public subversion repository which encapsulates the voodoo required to use a Gmail SMTP server with an otherwise ordinary ActionMailer configuration. Gmail requires TLS security, which is why this is useful. Grab the plugin for your Gmail-mooching Rails 2.0 site, here.

Note: I previously wrote about how to do this for Rails 1.2.x here.

Update (2008.06.25): Broken download link fixed!

 

Categories
computer

Small Office VoIP: Skype Pros/Cons

skype_logo.pngBefore the 2007 tax year ended, OpenRain decided to finally solidify a telephony strategy for the next year or so. Key requirements were..

  • Easy ad-hoc and scheduled conferences.
  • Mobile flexibility and continuity across physical locations.
  • Scalability for the next couple years.
  • Voice mail
  • Call forwarding.
  • Little to no management overhead. (I don’t want to run a dedicated PBX.)
  • Usable hardware.
  • Practical prices for worldwide incoming/outgoing calls.
  • Less than ~$2K initial investment.

It came down to one of two primary directions..

  1. Hosted VoIP (such as with Vonage or Qwest) with SIP phones such as from Cisco or Avaya.
  2. Skype with 3rd-party hardware and Mac soft-phone.

After some debate, we chose to use Skype exclusively for services, and have been fairly satisfied. I have a few beefs, but at less than $100 per year per person, I can’t complain too much.

Skype Pros:

  • Instant gratification. Easy to set yourself up for calls to/from landlines.
  • Good soft-client with videoconferencing support; Address Book.app integration is present in the latest Mac beta client.
  • Inexpensive. Less than $100 per seat per year for SkypePro and SkypeIn (an incoming number).
  • Awesome value when bundled with an IPEVO SOLO.
  • Extremely simple web interface for distributing company credits.
  • Concurrent logins from multiple locations. I leave my SOLO on 24/7 and use the soft-client on the road.
  • Great quality on Skype-to-Skype calls. Good quality to landlines.

Skype Cons:

  • My biggest gripe: In the U.S., outgoing calls do NOT show your SkypeIn number on the recipients phone.
  • Vendor lock-in, since Skype uses a proprietary protocol. Since cost of entry for services is so low, however, it may not be a huge deal if your want to switch to a SIP-based provider.
  • The WiFi-Phones all suck. The IPEVO SOLO is the only desktop model I like.
  • Possible future screwage of SkypeIn numbers if they ever change.
  • No 911, which is a general issue with VoIP services.
Categories
computer

Ruby Troubleshooting: Hpricot On OS X Leopard

If you upgraded to Leopard, you may be getting this nasty error when trying to install Hpricot, which is required by other popular gems such as mechanize..

preston$ sudo gem install mechanize
Password: ********

Bulk updating Gem source index for: http://gems.rubyforge.org
Install required dependency hpricot? [Yn]
Select which gem to install for your platform (i686-darwin8.10.3)
1. hpricot 0.6 (mswin32)
2. hpricot 0.6 (jruby)
3. hpricot 0.6 (ruby)
4. hpricot 0.5 (ruby)
5. hpricot 0.5 (mswin32)
6. Skip this gem
7. Cancel installation
> 3
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mechanize
checking for main() in -lc… no
creating Makefile

make
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.3 -I. -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -c hpricot_scan.c
cc -dynamic -bundle -undefined suppress -flat_namespace -L/opt/local/lib -L”/opt/local/lib” -o hpricot_scan.bundle hpricot_scan.o -lruby -lpthread -ldl -lobjc
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib load command 9 unknown cmd field
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
/usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__dof_plockstat) in load command 0
collect2: ld returned 1 exit status
make: *** [hpricot_scan.bundle] Error 1

Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/hpricot-0.6/ext/hpricot_scan/gem_make.out

The issue is that Xcode 3 must be upgraded as well; Hpricot’s native components cannot be built with the older Tiger development tools on Leopard. After installing Xcode 3 from either your Leopard DVD or Apple Developer Connection, run the install again…

preston$ sudo gem install mechanize

Install required dependency hpricot? [Yn] Y
Select which gem to install for your platform (i686-darwin8.10.3)
1. hpricot 0.6 (mswin32)
2. hpricot 0.6 (jruby)
3. hpricot 0.6 (ruby)
4. hpricot 0.5 (ruby)
5. hpricot 0.5 (mswin32)
6. Skip this gem
7. Cancel installation
> 3
Building native extensions. This could take a while…
Successfully installed mechanize-0.6.11
Successfully installed hpricot-0.6
Installing ri documentation for mechanize-0.6.11…
Installing ri documentation for hpricot-0.6…
Installing RDoc documentation for mechanize-0.6.11…
Installing RDoc documentation for hpricot-0.6…

Success!

Categories
computer

Rails 2.0: Validations Without Extending ActiveRecord::Base

In more “enterprisey” web stacks (such as Java with Hibernate and Spring MVC), it’s straightforward to design a validatable form whose contents do not correspond directly — if at all — to a persistent OR/M class: such as may happen in an ecommerce site where you’re collecting payment information but can only store some of it in the database for legal reasons. Just create a MVC-level view object using your framework-specific validation mechanism, and translate to/from the relevant OR/M classes as necessary in the controller.

This scenario isn’t always straightforward to handle in Rails since the stack layers are smooshed together. In Rails 1.2.x, you could use (some) validations in your non-persistent PORO objects by extending ActiveRecord::Base and overriding the initializer to skip the databases-related stuff. Alas, this hack does not seem to work in Rails 2.0, but I have a solution which, in my brief testing, seems to work better than the aforementioned Rails 1.2 hack.

Here’s how I used ActiveRecord::Validations in one of my view-only classes in a Rails 2.0.2 application without needing a dummy table in the database or ActiveRecord::Base.


require 'active_record/validations'

class Card

# Define your arbitrary PORO attributes.
attr_accessor :number
attr_accessor :expiration_month
attr_accessor :expiration_year
attr_accessor :verification_value

# For the ActiveRecord::Errors object.
attr_accessor :errors

def initialize(opts = {})

# Create an Errors object, which is required by validations and to use some view methods.
@errors = ActiveRecord::Errors.new(self)

end

# Dummy stub to make validtions happy.
def save
end

# Dummy stub to make validtions happy.
def save!
end

# Dummy stub to make validtions happy.
def new_record?

false

end

# Dummy stub to make validtions happy.
def update_attribute
end

# Mix in that validation goodness!
include ActiveRecord::Validations

# Use validations.
validates_presence_of :number
validates_presence_of :expiration_month
validates_presence_of :expiration_year
validates_presence_of :verification_value

end