Writing JavaScript

December 4th, 2006

This began as a post for the JAG internal wiki. But I wound up looking up a lot of good links, so I thought I’d mirror the post here in order to keep those links handy.

When I want to implement a requirement, such as a business rule or DHTML behavior in JavaScript, sometimes I find that I don’t know how to implement that behavior. Sometimes this might be because the requirement is complex, as in the case of DHTML animation. Or the algorithm I am searching for may just be obscure, such as a unique ID generator that uses a closure instead of a global counter.

When I do not immediately know how to implement a requirement, I usually need that information in a hurry. I do not have time to make extensive flow charts, or to research the deep features of JavaScript. What I want is to find someone else who has already implemented something ‘’similar'’ to the requirement. And I want to see their source code.
Read the rest of this entry »

What makes del.icio.us different

December 2nd, 2006

I’ve explained del.icio.us to a lot of people over the last few weeks. When I explain a new technology to a bunch of novices, that’s usually when I start to understand it myself. As I was explaining what del.icio.us does, I had to think a lot about how del.icio.us works. And I had a few insights about what makes del.icio.us a different kind of online community.

  • No batch import. Sure, I can import as many bookmarks as I want. But to make them public, I have to edit each one individually. This makes it harder to spam.

    It also means that all you ever see when you look at del.icio.us are links that I have chosen to display since I created my del.icio.us account. And somehow, that makes a very large difference in the quality of the community.

  • No batch edit, except for tags. I can change my own tags, but (as I mentioned) I can’t make all of my bookmarks public without visiting every one individually. And I certainly can’t apply a new tag to a whole bunch of bookmarks all at once (unless they all already share a tag).
  • Because of the two restrictions noted above, there is effectively no way for me to change my user name.
  • Even though del.icio.us is a “social bookmarking” service, there is no way to directly contact another member. If I like you, I can add you to my network. But that’s it; no “del.icio.us mail,” or “notify me when someone in my network is online,” not even the option to “invite so-and-so to join your network.”

    In fact, while the word “share” occurs frequently when discussing del.icio.us, I don’t think I’ve ever heard the word “invite.” Perhaps this might imply that del.icio.us is marketed mostly to people who are interested in interacting with the other people that are already on del.icio.us. Then perhaps the people who join the community tend to be people who already know and like the existing community.

Configuring a Linksys WRT54G router to work with a Westell 6100 modem for Verizon DSL

November 24th, 2006

Tonight I’ve been having a bitch of a time configuring a Linksys WRT54G router to work with a Westell 6100 modem for Verizon DSL. After an hour or more of bushwhacking through help forums, I was lucky enough to run across this post in this thread at Broadband Reports. I made a couple of changes to the WRT54G’s “Basic Setup” screen, and suddenly everything was fine!
Read the rest of this entry »

Event Selectors JavaScript/Ajax library at Encytemedia — Design and development crossfade

November 20th, 2006

http://encytemedia.com/event-selectors/

Another js library that I’d like to use some time.

"event:Selectors allow you to apply an event such as mouseover, mouseout, click, et al using a CSS style syntax."
Read the rest of this entry »

Turn a plain text URL into a hyperlink wrapped in an LI

November 18th, 2006

Add these lines to your .emacs:

(fset 'list-hyperlink-from-URL
[? ? ?\C-y ? ? down ?\C-a])

Barneys.com rated second most effective luxury e-commerce Web site

November 16th, 2006

Barneys’ website is… first for trust and security. …the top-rated site for exceeding customer expectations and for improving overall brand favorability. Respondents who found that the site exceeded their expectations say the site has excellent quality and images, and is easy to use.

links I’ve tagged with Barneys

Article is mirrored after the jump.
Read the rest of this entry »

Choose a value with two select menus

November 6th, 2006

Intermediate Web developers often stumble over the problem of getting select menus to talk to each other. One common problem is the situation where the options that are in select menu B, are dependent upon the option that has been selected in menu A.

Here is one solution to a somewhat different problem, that also involves getting two select menus to cooperate.

The problem is that we have two menus, one of which contains the first part of a choice, and the other contains the second part. Once a selection has been made, how do we collect both parts of the choice; and how do we decide what that particular choice means, in the context of the application? Here is how I would probably implement that.

Choose a value with two select menus

BlogLines inside NetVibes

November 1st, 2006

I’ve been using NetVibes for a while. But I just discovered the Web Page Module. And that has greatly increased NetVibes’ usefulness to me.

First, there are several visualizations (newsmap, delicious map, delicious LiveMarks and digg spy ) which cannot be replaced by an RSS feed. Web Page Module allows me to view each of these interfaces from within Netvibes, each in its own tab. NewsMap is so flexible that it fits into one column of a 3-column layout.

Netvibes is a smooth interface for reading 10 or 20 important feeds. Beyond that, I either have to scroll deeper than I’d like, or I have to start breaking up my feeds into tabs; and then I have to go back to BlogLines. Reading a bunch of little boxes spread across many tabs, does not appeal to me. I cannot make a good case for just why that is, however.

In any case, tonight I realized that the Web Page Module means that I can put BlogLines inside Netvibes. So now I truly do have all my feed-reading on one page.

Logging and reporting

October 5th, 2006

I wrote my first reporting script yesterday. It crawls a source tree and reports each occurrence of a specific regular expression.

Today I will be trying out SSMTP under Cygwin. I’m not sure where I can send mail from. I guess I can use one the SMTP that’s already running on one of the servers.

Automated reporting has been a dream of mine for a long time. The trouble has been building a work environment where it was possible to develop a best practices document. Forming a list, of consensus best practices, took a long time. However, the reporting script was written within 24 hours of completion of the first draft of the best practices document.
Read the rest of this entry »

How to run a command and save the output, in Perl

September 20th, 2006

Assuming we are in a directory that contains a file called

myfile.

>perl -e “open(FOO,’cat myfile |’)|| die ‘cat failed’; while (){ print }”

Now I can treat FOO just like I would any other filehandle.