Live data from Hacker News

Open Source Visitor.js

github.com

51–56 of 56 posts

Re: Open Source Visitor.js

#51

The only thing that would make this better is to have it in coffeescript... :) which I might do for you if you don't.

I thought about doing that. I've used a lot of coffeescript in the past, but I just didn't see it being a big advantage here. The biggest issue with using CoffeeScript here is that I wanted control over the syntax as I wanted to have less code. CoffeeScript (generated) really creates more code than what it's worth.

I get it. Thanks for writing it.

Re: Open Source Visitor.js

#52

What are the ethical concerns about using this and storing the data? If I wanted to use this on my site, should I let visitors know, or is this data fair game to store? I rather not use the location data (or any of it) if there could be an issue.

1: You can turn off location data.

2: None of this is being stored, beyond a cookie. Of course, you can call back to the server with that data, but the server has your IP address, which is where the location data came from.

Re: Open Source Visitor.js

#53
Having a "first session" and "current session" exposes very interesting functionality. It suddenly provides a quick way to keep track of what search keywords they used to get to the site, and could be later linked to an account if later created.

Re: Open Source Visitor.js

#54
post #45

Earlier quoted context omitted.

>" and it may be a trademark violation. " "visitor.js" isn't distinct in the field, particularly as it's descriptive and of a common form, I'd warrant it's not novel either. That doesn't mean that you wouldn't be sued for using it just that any sane TM office shouldn't allow it to be registered and that a sane IP judge should dismiss a case brought against it's use as passing off. The law isn't sane of course .... I…

It's because the scope is co-terminous that having different names is so important. IANAL, but trademarks don't have to be distinct or novel to be legitimate. They are allowed to be descriptive (like Windows or iPhone). The fork of OpenOffice.org was named LibreOffice, because it would be unfair to name a competing product with the same name. I'm glad the author of this library has decided to do the same.

First up, "iphone" is definitely not descriptive, it's abstract, a made up word. "touchPhone" would be descriptive. "Windows", well ... it's a generic term now but at the time, despite it being to some extent descriptive of a WIMP system it was arguably a distinctive term for an OS (but I'm surprised it was allowed).

OpenOffice.org is interesting because they previously named the project "Open Office" and suffered trademark problems and had to be very careful to use the full name of the project. But had the former project been called "Computer Office Suite" then trademark issues wouldn't have arisen because that's not a distinctive mark and so couldn't be protected, it's descriptive anyone selling such software could use that description.

It's not unfair to use an identical descriptive name for things that serve the same function - for example Microsoft and Apple both sell something that they use the term "Operating System" to describe. OS is a descriptve term that is expected to be used in the field and so can't be a trademark, it doesn't serve to indicate origin.

I'd argue that visitor.js is an expected name for a piece javascript that logs visitors in some way, it's not distinctive of origin. Moreover it is descriptive of the function of the code. Kinda like having an ad loader that's called ads.js.

FWIW, and I've not been paying too much attention (!), only one of the pieces of code labelled visitor.js appears to be a product.

Re: Open Source Visitor.js

#55
post #42

Earlier quoted context omitted.

HTML5 Geolocation requires people to opt-in, which is pretty messy. Better off getting the free version of the MaxMind city database[1] and running it on a server somewhere. [1] http://www.maxmind.com/app/geolitecity

The opt-in button is messy but results are very precise and reliable. Some use cases warrant it, some do not. Maxmind claims 79% accuracy on a city level: is the google api worse? All other things being equal I would be inclined to pick the one that didn't require me to frequently install binary patches or update a database.

But I agree with you, it's a ux dealbreaker for most situations. Solution: control the hardware. :)
Post reply on HN