HNHacker News
TopNewBestAskShowJobs

buddydvd

269 karma · joined January 12, 2010

submissionscomments
buddydvd··on How not to do URL redirects (… the way Quora does)
It's most likely done intentionally to protect against leaking the clicker's identity. See the issue Facebook had back then: http://www.benedelman.org/news/052010-1.html
buddydvd··on The Problem with Implicit Scoping in CoffeeScript
I found one of the referenced links in Github issue #712 quite interesting:

http://www.rubyist.net/~matz/slides/rc2003/mgp00010.html

Source: https://github.com/jashkenas/coffee-script/issues/712#issuec...

buddydvd··on Markdress - Render any markdown URL
A quick workaround would be to add the `<base>` tag: https://developer.mozilla.org/en/HTML/Element/base to your generated HTML and have it point it to the target URL.
buddydvd··on Paul Graham's long-lost 2006 Infogami essay, "Startup Names"

    EVOC  Evocativity       Conveys at least a hint of what it’s naming
    BREV  Brevity           Shorter = better
    GREP  Greppability      Not a substring of common words
    GOOG  Googlability      Reasonably unique (and domain name available)
    PRON  Pronounceability  You can read it out loud when you see it
    SPEL  Spellability      You know how it’s spelled when you hear it
    VERB  Verbability       The name (or variant thereof) can be used as a verb
Source: http://messymatters.com/2011/10/31/nominology/
buddydvd··on IOS 4 vs. 5, Pixel by Pixel (jp)
Ah, that makes perfect sense.

I guess, this would be pointless:

36+38+36+38+36 (18+19+18+19+18)

since the 2nd and 3rd icon wouldn't get the benefit of the extra spacing.

So the reasonable option would be: 34+38+40+38+34 (17+19+20+19+17)

buddydvd··on IOS 4 vs. 5, Pixel by Pixel (jp)
You mean 37 pixels?

(640-(4*114))/5 = 36.8 pixels.

I wonder why they didn't choose this instead:

38+36+36+36+38

That would be most evenly spaced, symmetrical, and compatible with non-retina displays.

buddydvd··on Rob Pike: Dennis Ritchie has died
For functions declarations, K&R style says braces open on new lines.

http://en.m.wikipedia.org/wiki/Indent_style

buddydvd··on Chrome Privacy
I noticed awhile back that even if you disable Chrome's safe browsing feature, Google still sends data to their server. I'm not sure if this is still the case today.

http://superuser.com/questions/236637/how-to-disable-google-...

buddydvd··on Why Microsoft is abandoning the PC and Android tablets are expensive?
In a few years, phones will likely be powerful enough to displace laptops for their ability to run a full desktop OS. The transition will be seamless -- you just wirelessly connect your phone to your keyboard, mouse, and monitor and you'll be able to use a desktop OS like how you're using it today. The Metro UI gives existing Windows users the option to make that transition.
buddydvd··on Ask HN: What API to the physical world do you wish existed?
Prices of auto services local to where you live (e.g. oil change).
buddydvd··on Metro
It will only be a matter of time before mobile phones start replacing laptops for desktop-like use cases. People will likely use their phones as if they were laptops with wirelessly-connected keyboard, mouse, and screen. I can totally see businesses start buying Windows-ready phones for their employees than the alternatives.
buddydvd··on Call ObjectiveC methods from Javascript in a UIWebView
Very similar code exists within PhoneGap. In addition to bi-directional message passing, PhoneGap also provides: 1.) JSON serialization/deserialization, 2.) callback tracking, and 3.) white-listing of domains that may pass messages to the host.

https://github.com/phonegap/phonegap-iphone

buddydvd··on Introducing a new data structure, streams, in Javascript
Here's a project that simulates the "yield" keyword with current version of JavaScript: https://bitbucket.org/balpha/lyfe/wiki/Home
buddydvd··on Introducing a new data structure, streams, in Javascript
Yes, I use them liberally in C# projects. In fact, I prefer to use them over the standard looping constructs because of the pipe-like characteristics. It's very useful.
buddydvd··on Introducing a new data structure, streams, in Javascript
It's not required, but you'd have to write your own generator function:

    Enumerable
      .Generate((function() {
        var i = 0;
        return function() {
          return i++;
        };
      })())
      .Take(10)
      .ToArray()
Output:

    0,1,2,3,4,5,6,7,8,9
buddydvd··on Introducing a new data structure, streams, in Javascript
Actually, we're talking about the same project. I linked to its reference page for the examples.
buddydvd··on Introducing a new data structure, streams, in Javascript
You can create lazy enumerables with linq.js as well.

http://neue.cc/reference.htm

    Enumerable
      .Range(0, 1000000000000)
      .Take(10)
      .ToArray()
Output:

    0,1,2,3,4,5,6,7,8,9
buddydvd··on Startups should not use GoDaddy. Ever
I noticed transferring a domain to different Godaddy account immediately cancels that domain's privacy-protection service. You can probably try that first before transferring your domain out of Godaddy.
buddydvd··on Iran forged the wrong SSL certificate
There's a difference between the iframe version of Facebook's like button and the XFBML version. The XFBML version, for various reasons, is preferable to the iframe version (e.g. say you want to subscribe to the edge.create event to determine if someone clicked on the like button).

Now, if you want to add the XFBML version of the like button, you'd have to embed Facebook's JavaScript SDK script (https://connect.facebook.net/en_US/all.js) to your site. If connect.facebook.net ever gets compromised via a fake SSL certificate, your site will also be compromised.

Instead of letting third-party scripts run on your main site, it may be safer to let them run within an iframe based off of a different domain so that a compromised third-party script doesn't compromise your main site.

buddydvd··on [Show HN] Handpick: The most caring way to share links
Accumulating links and sharing them to selected groups of people are good ideas. Instead of emailing links to your friends, how about post the aggregated list of links to Facebook/G+ as a single post once per day and make it so that those posts will only be visible to people you select.
buddydvd··on Iran forged the wrong SSL certificate
> can you do something alternative which allows you to have a like button, but without including third party script?

How about create a JavaScript library that sandboxes execution of third-party scripts by loading them in iframes based off of a different domain? This would allow site owners to embed Google Analytics or FB Like buttons without worrying about the third-party scripts getting compromised or becoming malicious.

buddydvd··on Facebook’s Secret iPad App Exposed [Pictures]
From the screenshots, you can see the photo viewer displaying a scrubber view (row of thumbnails). This strongly suggests that this app is built using Jeff Verkoeyen's Nimbus framework. If you're building (or built) apps using Three20, it'll probably be good idea to follow the Nimbus framework on Github.

http://techcrunch.com/2011/07/25/facebook-ipad-app-pictures/...

http://jverkoey.github.com/nimbus/interface_n_i_photo_scrubb...

https://github.com/jverkoey/nimbus

buddydvd··on Test whether any website is blocked in China in real-time
Interesting, Reddit seems to be blocked half of the time: http://www.blockedinchina.net/?siteurl=reddit.com
buddydvd··on Show HN: I created a Chrome extension that reveals HN's hidden comment scores.
Andres says "PG wants API apps to be consistent with the HN interface so we removed points for items < 5 days."
buddydvd··on Show HN: I created a Chrome extension that reveals HN's hidden comment scores.
Yes. The comment score is queried from HNSearch's API. This extension was my submission to the HNSearch API contest under the name "HN Reveal":

http://news.ycombinator.com/item?id=2672793

Now, since the beginning of the API contest announcement, HNSearch's API does not reveal score for comments that are less than 5 days old. After studying the API, I figured out a way to bypass this restriction. If you construct a faceted query for the "points" field with a search query that is narrow enough to get exactly 1 hit, the facet result will reveal the vote score for that comment (e.g. "9 points" has 1 hit).

When I submitted my entry to HNSearch, Andres emailed me back and told me to disable revealing vote scores for comments that are less than 5 days old. In addition, they modified their API to restrict my query.

buddydvd··on Please Steal My Startup Idea
We created something like it a few years ago: http://biggestmenu.com/

Flan: http://biggestmenu.com/?q=flan

Pizza: http://biggestmenu.com/?q=pizza

Coffee cake: http://biggestmenu.com/?q=coffee+cake

buddydvd··on Implementing bookmarklets in JavaScript
Instead of polling, you can define event handlers for <script>'s onload and onreadystatechange event to detect when jQuery gets loaded. See Ben Alman's jQuery bookmarklet generator for an example: http://benalman.com/code/test/jquery-run-code-bookmarklet/
buddydvd··on How Perceptual Hashes Work
Isn't tineye's signature algorithm based on Fourier transform?

http://www.reddit.com/r/programming/comments/bvmln/how_does_...

buddydvd··on Twitter’s Shit Sandwich
Browser-based OAuth flow (like Facebook's new iOS SDK -- the one that avoids using embedded webview) has two advantages:

1.) Single sign on. If you're already logged in to the site in the browser, you don't have to enter your user/password again. Also, if you don't trust the app invoking the web browser, you can always exit the app and pre-login to site with the web browser before running the app again.

2.) Optional interstitial pages. Sometimes, your account may be accessed from some questionable location. The OAuth flow enables challenging users with additional security questions before giving authorization to the app (e.g. Facebook's identify-your-friends'-faces challenge, enter-your-birthday challenge, etc.)

buddydvd··on Text Me a Link
Facebook could modify their Send Button widget to let people send links to their own cell phone or email box without entering any information.
← PreviousPage 3 of 5Next →