HNHacker News
TopNewBestAskShowJobs

unfletch

418 karma · joined June 15, 2009

submissionscomments
unfletch··on Getty's New Watermark
A QR code? What did you have in mind for interaction?

As far as I know you'd need at least two devices (the one whose screen is displaying the image with the QR code, and the one you're using to snap a photo of it). And then you'd probably want send the decoded URL back to the original device to load in the original browser.

Edit: Maybe you were thinking about the analog world, but watermarked images tend to show up in the digital space (in mockups especially).

unfletch··on Space Station grabs SpaceX Dragon ship
If we had moon lobbyists, it would probably be because the coal/oil/defense/farming/etc. industries discovered a way to make some money up there.
unfletch··on The Lazy Man's URL Parsing
The interface is officially called "URL decomposition IDL attributes." IIRC it's only implemented by <a/>, <area/> and the Location object.

Here are the canonical docs: http://dev.w3.org/html5/spec-LC/urls.html#interfaces-for-url...

And here's a prettier (but less detailed) version: http://developers.whatwg.org/urls.html#interfaces-for-url-ma...

unfletch··on Getting Beaten By A Voting Bot In 50 Minutes
Slate thinks so, as of 2008:

  Even after allowing for discounted entry fees, the back of
  the envelope says the Webbys could be taking in more than
  $2 million from its contestants.
http://www.slate.com/articles/news_and_politics/press_box/20...
unfletch··on Getting Beaten By A Voting Bot In 50 Minutes
Since you obviously wanted to win, sorry you got cheated, but at this point I think the only people who pay any attention to the Webbys are those who've paid to be "nominated."
unfletch··on An employee, whose last name is Null, kills our employee lookup app
I know someone named Null who's had similar problems as a user of web apps. In fact I mentioned it here a while back: http://news.ycombinator.com/item?id=1440890
unfletch··on Try right clicking GitHub's logo
You're thinking of preventing the default action, not stopping propagation. (Event.preventDefault() vs. Event.stopPropagation() in modern browsers.) But you're right, if they handled the right-click and did not explicitly prevent the default action it would do both.
unfletch··on Notifications are Evil
"Evil" ain't what it used to be.
unfletch··on Your address book is mine: Many iPhone apps take your data
Which ones are lumped in? Facebook and Instapaper are explicitly mentioned as examples of apps that prompt for permission before accessing the address book. Instagram, Foursquare and Path's prompts are only mentioned in passing, but those apps only added a prompt after the original story broke a week or so ago.
unfletch··on What Would The End Of Football Look Like?
Or extra point, punt, kickoff, or, on occasions so rare as to almost be extinct (only 1 since 1941 -- in 2006), a drop kick: https://www.youtube.com/watch?v=P0Jsz-fSNd4 (It's hard to see in the video, but this differs from a punt in that the ball must bounce before being kicked: http://en.wikipedia.org/wiki/Drop_kick)
unfletch··on Don't use class names to find HTML elements with JS
The title of this article should have been "Don't use class names to store data." Finding elements by class name is fine. This is about misusing the class attribute.
unfletch··on I quit my high-paying job to follow my dream of launching a startup. Here it is.
I think the "web sites bundled as apps" is speaking more of an app that consists only of a webkit view which loads some web site. A single-site browser app.

There's a service called Tapatalk that does something very similar to what Appifier does, but for forums, and has a number of generated "native forum apps" in the App Store.

unfletch··on Stop whining and start hiring remote workers
Does anyone have pointers to good resources for workers looking for remote positions?
unfletch··on Marriage Chances Rise with Your Salary
Obligatory: http://xkcd.com/552/
unfletch··on Don't use the jQuery .data() method. Use .attr() instead.
Then what's the problem? You stored float 1.410 and got back float 1.41. They're equal. That's not jQuery, it's javascript: http://jsfiddle.net/kgp2H/1/

Edit, after the parent was edited to include the data attribute example:

You should update your post to clarify that you're talking about data attributes. That's a significant detail and shouldn't have been left out.

Now that you've clarified, jQuery does behave as you've stated, but it's not a bug. I can see how it could be unexpected behavior to some, but it's explicitly stated in the .data() documentation:

  Every attempt is made to convert the string to a 
  JavaScript value (this includes booleans, numbers, 
  objects, arrays, and null) otherwise it is left as a 
  string. To retrieve the value's attribute as a string 
  without any attempt to convert it, use the attr() method.
http://api.jquery.com/data/#data2
unfletch··on Don't use the jQuery .data() method. Use .attr() instead.
As far as I can tell this might just be false. If you go to github.com (a random site which happens to include query 1.7.1 -- the latest version), open the console in either firebug or webkit inspector, and run the author's example:

    var foo = $("body");
    foo.data("mykey", "1.410");
    foo.data("mykey");
...you get your original "1.410", not 1.41 as the author reports.

Secondly, he says there are "several bug reports on the jQuery website, where people are also confused by this behavior and all of them get closed with a wontfix" but links to none of them. Linking to them should be trivial and they'd help his case (or at least make it easy for me to figure out why he sees a bug and I don't). I searched and couldn't find any.

Finally, you shouldn't use .attr() to store arbitrary data as he recommends. Hanging javascript data off of DOM nodes will cause serious memory leaks if you're not careful. That's the reason .data() exists in the first place. See the "Cicular References" section of Understanding and Solving Internet Explorer Leak Patterns: http://msdn.microsoft.com/en-us/library/Bb250448

unfletch··on Path(v2) fly out menu already recreated and open sourced.
Nice work! It definitely looks very similar, but if you compare the animations closely I don't think you can say it's been recreated. (And I'd bet perfecting the animation is one place some Path engineer and/or designer spent a lot of time.)

Specifically I'm looking at the path (small 'p') each icon takes out of and back into the +/x button. When they're close to the button these seem to stack on top of each other more than those in Path, which instead almost follow each other around. Also, something about the "bounce" at the end of the open animation looks a bit different (easiest to see looking at the bottom-most icon).

A nice start though. And I'm sure it looks even better in person than in that demo animated gif.

unfletch··on Groupon shares open up 40%
I agree with the sentiment, but the quote is misattributed. It was probably first said by Gary Shilling, a writer for Forbes, in 1993: http://quoteinvestigator.com/2011/08/09/remain-solvent/
unfletch··on Netflix loses 800,000 subscribers (stock drops 28%)
I wonder if this includes customers who've put their account "on hold" rather than canceling. My wife decided she didn't need it anymore, but may someday want to go back. She's effectively cancelled, but the account still exists in their database.
unfletch··on Sprint ditches unlimited 4G plans
This has nothing to do with the amount of data you use on your phone. Those plans remain the same. As for their "mobile data" (hotspot) plans, there's still an unlimited one of those, too. Granted it's 4G only.

What they've changed is this: If you subscribe to one of the 3/5/10GB limited data hotspot plans, you'll no longer get unlimited 4G for free.

Yes, things just got a little more expensive for customers with those plans taking advantage of the free 4G clause, but Sprint has not "ditched unlimited plans."

Neither Sprint's notice nor the HN headline was well written.

unfletch··on Rob Pike: Dennis Ritchie has died
.
unfletch··on CVE-2011-3230 - Launch any file path from web page (Safari/OS X)
Or until you install today's update. It's fixed in 5.1.1, which is included in the OS X 10.7.2 software update: http://support.apple.com/kb/HT5000
unfletch··on Why music ID resolution matters to every music fan on Facebook
There are real-world problems that get in the way here, but that's a misapplication of the spec. A given recording is supposed to be assigned one ISRC. If that recording is released by another entity in another region, it should use the existing ISRC.
unfletch··on Why music ID resolution matters to every music fan on Facebook
This is why ISRC exists. It's like ISBN for recordings, and it's in active use.

http://en.wikipedia.org/wiki/Isrc

A few years back I worked for a startup that was cataloging recorded music. I recall that the major labels would provide us with ISRC, among other things, for all of their recordings. I don't recall whether independent labels and artists used it though. I would guess that it varied.

(See also ISWC, which is for the composition, not the recorded performance of it. ISWC/ISRC is a bit like class/instance.)

unfletch··on White House Petition to End Software Patents Is a Hit
You may have seen something about the Air Mag auction over the last few weeks. (Nike's limited edition run of the sneakers Marty McFly wore in Back to the Future 2.) When the auction popped up in the news I ended up on Nike's promotional site and read that the idea was born when "...in 2005, [the shoe designer]’s attention was caught by an online petition asking that the shoes come back." (http://www.back4thefuture.com/#!shoe)

It struck me as the first time I'd ever heard of an online petition achieving its goal.

Here's hoping this becomes second time.

unfletch··on Bash Shortcuts For Maximum Productivity
The things he calls "bang commands" are actually "event designators" (!!, !blah), "word designators" ($) and "word modifiers" (:p). There are links to docs for each at the bottom of this page: http://www.gnu.org/s/bash/manual/html_node/History-Interacti...

I use them all the time, and anyone watching over my shoulder always asks what that was. Learn !!, !$, and a few modifiers. You'll be glad you did. Personally, I use !$ constantly (and variations like !-2$, which gets you the last arg from 2 commands ago). The "h" modifier is handy, too. It's like dirname for the word. Consider this example, where you copy a file to some deep path, and then cd to that dir to continue working with the copy:

    $ cp foo.txt /some/really/long/destination/bar.txt
    $ cd !$:h
    $ # (do more with ./bar.txt)
The substitution (:s) and global substitution (:gs) modifiers are also useful:

    $ echo some args
    some args
    $ !!:s/some/more
    more args
(Also, note that his explanation of !* is actually incorrect. He says it leaves off the last arg, but actually leaves out $0 (the command name). !* is all of the previous command's arguments.)

Finally, one really useful thing he doesn't mention at all is brace expansion. For example, these are equivalent:

    $ cp foo.conf foo.conf.bak
    $ cp foo.conf{,.bak}
http://www.gnu.org/s/bash/manual/html_node/Brace-Expansion.h...
unfletch··on Researchers’ Typosquatting Stole 20 GB of E-Mail From Fortune 500
I get a ton of misdirected email, but for different reasons.

The first is that I have a common nickname @gmail.com. There are many other users with some variation on that nickname @gmail.com, and people are careless about typos, including suffixes, etc. It's a similar cause to the article, but the username instead of the domain.

The second case is a more interesting one:

I bought an expired domain.

Now I get all kinds of email sent to what used to be legitimate email addresses of the old domain owners. For more than one of them it was clearly their primary email address. I was getting emails related to bank accounts, Netflix, Facebook, etc. I thought about trying to get in touch with those users, but ultimately decided to bounce their email.

It was something I hadn't considered when buying an expired domain, or about my own email addresses, but it's a real problem. Here's hoping my email provider never lets their domain expire.

unfletch··on Researchers’ Typosquatting Stole 20 GB of E-Mail From Fortune 500
It's not bizarre, it's sensationalistic. If you hadn't heard the phrase "link bait", you've now been introduced.
unfletch··on Of Gravatars and Robohashes
Nice work, but the "they look like they were drawn by programmers" comment makes me think you missed the point of Gravatar's specific default avatars.

They're intentionally ugly. The theory is that an ugly default avatar makes the user more likely to upload their own image.

unfletch··on Underscore.php
Also, the double underscore prefix is reserved for magic methods:

    PHP reserves all function names starting with __ as magical. It is
    recommended that you do not use function names with __ in PHP unless you
    want some documented magic functionality.
It's only explicitly reserved for functions, so you're technically ok here, but it still may cause confusion.

http://www.php.net/manual/en/language.oop5.magic.php

← PreviousPage 3 of 5Next →