Friday, May 2, 2008

Spaces and focus

Man, I really really wish there was a system wide setting for 'focus follows mouse' in Leopard. Or at least an easy way to launch GUI apps in the background that won't grab focus.

Reason being that if you use spaces and you launch an app in one space, switch to another app in another space... the launching app will keep grabbing focus and switching the space you're in over and over.

This is particularly annoying with Vienna, which I use for RSS. I launch Vienna in the morning, switch over to mail to start catching up and Vienna grabs focus and takes me away from Mail 3 times. 3!!!! Not once it's done loading and I can switch back really quick.

It's really freakin' annoying. OS X 10.5.3 is sposedta have spaces fixes... I hope this is one of them. Because I'm about to stop using spaces altogether.

Thursday, April 24, 2008

Javascript, content and navigation

One error in judgment that many web developers make is assuming that everybody is running javascript, and therefore it's OK for js to present content or navigation. To the extent that if javascript isn't running content and nav don't show up.

This is a bad idea. First, you have to divorce yourself from the idea that your most important audience is humans viewing pages on a web browser. Google's spider isn't running javascript. If your navigation isn't present in the markup, it can't crawl your site. And if your content isn't there, there's nothing for users to search. And some people don't view web pages. A program speaks it's content to them. Screen readers read the content that's present onload. If you run javascript after page load, the screen reader doesn't see the update and skips the content. There goes your accessibility, which is mandated by laws in some places. Further, mobile browsers are more ass than a donkey farm. Most don't run javascript, so there goes most people in the world when they're not at home. Your audience is software programs that mediate a users web experience. Code to them first.

Second, pobody's nerfect. If your script barfs then the user is S.O.L. It may work perfectly in dev and when it launches. Then a site user adds malformed content in a blog reply, the people who hired you to make the site paste in markup from MS word or some other such mishap and the page isn't what you assumed it would be when you created the script. You have to plan for your site to degrade gracefully. If for some reason the script doesn't run, the CSS doesn't get applied, the site should still be navigable and the content should still be available. Bells and whistles may not work... but the website should still function as a collection of hyperlinked pages with content.

So, I wouldn't say depending on JS to display nav and content is a pet peeve per se as much as it's an example of not adhering to best practices.

Wednesday, April 2, 2008

darwin calendar server client tool

Cyrus Daboo posted a set of tools for working with CalDAV/Darwin Calendar Server. It's got a learning curve... but some helpful tips:
  • in the client tool, ? brings up a list of commands.
  • in pyclient, the syntax for help on one of those commands is "help [command]"
  • when inside a command's interactive mode, 'help' lists options
So, for instance, say you want to edit the ACL on a principal's calendar, but you don't know how.
/ > ? acl - Manage the access privileges of a directory or file.
cat - Display contents of a file or directory.
cd - Change working directory.
exit - Terminates this session.
help - Displays help about a command.
history - Displays the history of all commands used in this session.
logging - Changes the current state of HTTP logging.
ls - List the contents of a directory.
principal - Displays the current server login id.
props - List the properties of a directory or file.
proxies - Displays the delegates for the chosen user.
quit - Terminates this session.
server - Displays the current server.
whoami - Displays the current server login id.
As you can see, using ? pointed me to the acl command. Now, to use it:
/ > help acl
Command: acl
Description: Manage the access privileges of a directory or file.
Usage: acl [OPTIONS] [PATH]
PATH is a relative or absolute path.

Options:
-i interactive mode for adding, changing and deleting ACLs.
if not present, existing ACLs will be printed.
So, I just do as follows:
/ > acl -i /calendars/users/tack/calendar
Entering ACL edit mode on resource: /calendars/users/tack/calendar/
ACL >
but what do I do from here?
ACL > help
add - Add ACL to existing resource.
change - Change ACL on existing resource.
exit - Terminates this session.
help - Displays help about a command.
list - List current ACLs on existing resource.
logging - Changes the current state of HTTP logging.
quit - Terminates this session.
remove - Remove ACL on existing resource.
Help tells me how to work on the ACL's for this.

Saturday, March 29, 2008

Inaugural post

If you don't like developing for IE ad you're on facebook, you should check out the group "Internet Explorer is the Bane of My Existence"