“http://”, thou shalt be required no more!
August 2, 2010 at 6:41 pm Filed in:Design | code | geek | user experience No Comments
Over the past few weeks, I’ve discovered that most web forms that contain a field for a url have a major usability failure when it comes to validating the content of the field… the validation fails if you neglect to enter “http://” preceeding the variable portion of the url.
Sure, sure, I get it. Perhaps the form is anticipating that a user may be linking to a site using https://, and thusly requires the user to specify the protocol… but for users linking to blogs, corporate websites, and the other most common use cases for these types of fields, the likelihood of linking to a secure server is (or should be) inversely proportional to the number of users on the site… or in other words, as the number of users increases, the probability of a user’s url requiring https:// approaches 1/∞ (remember algebra? it gets close to zero).
So, a note to all my fellow developers out there… chances are, if someone is linking to something on your site, it’s far more likely that it will require http:// rather than https://… Browsers don’t require that you type http:// before your URL anymore… neither should our forms. Adhering to the same conventions users are used to elsewhere in their travels throughout the internet will create a much more satisfying user experience. Here are a couple of recommendations:
- Write up your validations accordingly. Don’t require a prefix, but allow users to add one, on the off chance that they *are* referring to a secure server.
- If, for some reason, you deem it necessary to require users to specify the appropriate prefix, gosh darn it, specify the format for a valid url below the field, or at least display the required format as a tooltip/popup when the user is focused on the field, and draw attention to the required prefix. Novice – and even seasoned users – may otherwise gloss over it – and be forced to endure the frustration of a failed attempt at submission.
- When the field loses focus, alert the user to the fact that their url is not formatted properly. In big Red letters, and all caps if necessary… preferably somewhere near the field (if it’s still visible in the user’s frame of vision) or near the submit button to remind them to fix their error before continuing
Sure, chances are if they submitted the field once, they’ll fix their error and submit it again… but they’ll be mumbling and grumbling under their breath at you, and I know that some of you out there wouldn’t want to hear the names I’ve called you after a failed form submission. So be good to your users, and build your forms and validations with an eye towards the most common use cases, and make those who subvert convention be the ones who do the work.
For the less geeky, in case you’re wondering why http vs. https matters at all, take a look after the cut for the random facts.
Setting up geokit.
July 3, 2010 at 2:43 pm Filed in:code No Comments
A quick checklist for creating a new app with geolocation on heroku’s 1.8.7 stack… so you can use the count method to your heart’s content. I’m sure that there’s something I’ve missed, but it’s a start…
- sudo gem install geokit (if you haven’t already)
- script/plugin install git://github.com/andre/geokit-rails.git
- for new app, create heroku app (
- on 1.8.7 stack – heroku create APPNAME –stack bamboo-ree-1.8.7 –remote REMOTENAME
- add the following to app’s .gems file:
1
2
3rails -v 2.3.5
pg
geokit --version '=1.5.0'
- get new developer keys for your heroku app
- http://developer.yahoo.com/maps/simple/
- http://code.google.com/apis/maps/signup.html
- add config.gem “geokit” to config/environment.rb
- edit your application controller file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20include Geokit
include Geokit::Geocoders
include Geokit::IpGeocodeLookup
class ApplicationController < ActionController::Base
helper :all
protect_from_forgery
geocode_ip_address
before_filter :geokit
def geokit
store_ip_location
@current_location = session[:geo_location] # @current_location is a GeoLoc instance.
end
def store_location
session[:return_to] = request.request_uri
end
end
From this point forward, the geocoding methods of the Geokit gem are available. There’s more that needs to be done if you want to treat one of your models as geolocatable… but I’ll pick that up later :)
Creating Visual Studio projects from Parallels
May 22, 2010 at 9:54 am Filed in:code No Comments
If you’re a Mac user forced back into the world of .NET, you might come across the following error message when creating a new Visual Studio project over Parallels:
Invalid URI: the hostname could not be parsed.
Chances are, you are trying to create the project in a directory that is inaccessible to Windows. In the New Project window, check out the Location field. If it contains psf://, you’re trying to save to the Parallels shared folder – a location Visual Studio apparently can’t handle. Change the location to somewhere on your C: drive, and you should be good to go.
Display Line Numbers in Visual Studio
May 22, 2010 at 9:44 am Filed in:Fail | code No Comments
Why Visual Studio 2008 doesn’t display line numbers by default? I don’t know. Why there isn’t a way to toggle line numbers on and off from the interface? I don’t know. Why it…. well, you get the point. Here’s how to fix it so you don’t have to waste time figuring it out:
From the Tools menu, select Options > TextEditor > All Languages > General…… then check the box beside Line Numbers.
You can also turn on line numbers for specific languages too – just select the target language instead of “All Languages.”
If you’re on the right screen and you still don’t see it, make sure the “Show all settings” option in the bottom left corner of the Options windows is checked.
First sign of the geekpocalypse
March 27, 2010 at 12:41 pm Filed in:code | geek No Comments
I just witnessed the first sign of my impending geekpocalypse… rather than go through the ‘hassle’ of working with a gui-based calculator, I launched irb to do a few quick calculations.
Oy vey.
Recovering Address Book and iCal calendars from a backup drive
November 24, 2009 at 8:43 am Filed in:code | geek | user experience No Comments
After a clean up-stall of Snow Leopard, all seems well… but I realize I neglected to create easily importable backups of my address book and calendars.
Not a problem – I had backed up my hard drive en toto, so recovering my addresses and calendars wasn’t difficult… but since a quick google search didn’t return any suggestions, I thought I’d share what I did in case you find yourself with the same need.
note:
~/ = /Users/soychicka/ = my user home directory, just like ~/ = /Users/yourHomeDir/ = your home directory.
Sadly, it appears that although they now have much nicer names, all of my screenshots in Snow Leopard are no more than black boxes of appropriate dimensions…. so that means you’ll actually have to *gasp* read directions (just for the time being).
Continue Reading
Back to the top: navigation and design failure.
November 22, 2009 at 12:03 pm Filed in:Design | Technology No Comments
One of my pet peeves that I consistently see with businesses who traditionally relied on the sunday advertisement insert is a reluctance (or perhaps overt refusal) to format their weekly ad in a manner more appropriate for the web.
Case in point: I was looking for a new backup hard drive today, and after becoming frustrated with the lack of usability on the ShopLocal.com, I reverted to switching back to viewing the weekly ads of individual retailers, where I happened to stumble across this perfect example – a weekly ad from Best Buy.
We’ll leave aside the fact that this opened in a pop-up, cosmetic issues and the use of flash for the time being…. What’s key here is that the majority of advertisement content that is of interest to the consumer is below the fold, requiring that the user scrolls down the page to see the content that is of interest to them. And if you look at the next image, you’ll see why.
The layout of the ad is intended to reflects the dimensions of a page in those the traditional weekly newspaper advertisments… the ones that were so unwieldy, where you had to either clear a 3′x5′ space to read on, or make a real effort to keep the paper from flopping over on itself… the ones that have been largely replaced in print by a more manageable tabloid format.
Perhaps the old-style ad layout was selected by the designer to reinforce metaphor of a print ad by as a way to make users comfortable with the notion of viewing an ad online. Or perhaps they are simply unwilling to put their ads in a more usable format in order to force more user interaction with their content in hopes of increasing conversions.
Regardless, this format, utilized by grocery stores and other big-box retailers on their sites might be palatable, were it not for one key problem that always appears to be found in near proximity:
Pimping out Radiant Apps on Heroku: extension bling
November 16, 2009 at 2:28 pm Filed in:code | geek 1 Comment
/*headdesk*/
Do you find yourself with a migraine from the incessant *headdesk* associated with trying to figure out why your Radiant app that works so beautifully on your dev box turns into a megaFAIL after you try to deploy it on Heroku?
/*headdesk*/
Wait… are you using any radiant extensions?
Aha! Something isn’t explicitly clear in the vast majority of documentation on Radiant extensions: when you install an extension using ./script/extension install extensionName, you’re actually installing the extension as a submodule. There are some good reasons to install an extension as a submodule: it’s super-easy, and it provides an easy way to update your extensions when the master branch has been updated.
But there is one very good reason NOT to install extensions as submodules: at this time, Heroku doesn’t support the use of submodules. So that means even if you’ve followed the instructions and gotten it to work in your development environment, once you deploy to Heroku, the extensions disappear. No listing in the admin panel, no files in your extension directories, everything is broke-ass, and…. /*headdesk*/
So what to do? Most offering advice recommend that you find a way around this by installing the extension “normally”. But what is ‘normal?’
Radiant Heroku… getting your Radiant App live on Heroku in about 10 minutes.
November 16, 2009 at 12:54 pm Filed in:code | geek No Comments
I’ve discovered various degrees of up-to-datedness and accuracy in some of the tutorials out there for deploying an app built on Radiant CMS to Heroku, so here’s one that is valid for the latest Radiant CMS release (0.8.1).
This tutorial assumes that you have already installed and configured the following:
- Rails (2.3.4)
- Git (1.6.4.1)
- Heroku gem (1.3.0)
Specifically, it also assumes that you either a) have configured an ssh keys for use with git, or b) know how to deal with it if you haven’t.
If you don’t meet all of the above criteria, get crackin’… but once you’re ready, read on.
Restart Apache without restarting OS X
October 29, 2009 at 11:37 am Filed in:code No Comments
