HNHacker News
TopNewBestAskShowJobs

mhansen

1,616 karma · joined June 20, 2009

submissionscomments
mhansen··on Hotel Wifi JavaScript Injection
VPN/SSH Tunnel.

But seriously, you're just as screwed if they inject HTML that changes the form submit URL for your password to an attacker-controlled site. The real answer to this problem is HTTPS, everywhere.

mhansen··on #1 CSRF Is A Vulnerability In All Browsers
That won't work without javascript, and then you need another URL to fallback to that'll respond to GET requests for non-javascript browsers. And then you could just XSRF the non-javascript URL.

[Disclaimer: I work at Google, but not on any area related to this]

mhansen··on Go version 1 is released
I use golang
mhansen··on Yahoo Decides to Fire Its Brightest Tech Minds. Facebook Will Gladly Take Them.
Google's always hiring.

http://www.google.com/intl/en/jobs/index.html

mhansen··on Microjs: an index of javascript micro frameworks
This is what Closure Compiler does, without the need to even dump in a large test suite.
mhansen··on Microjs: an index of javascript micro frameworks
Your HTTP headers alone per requested file is probably 1KB - 3KB is still tiny.
mhansen··on A Guide to Python's Magic Methods
being "liberal in what you accept" is a discredited software practice.

What? When did that get discredited?

mhansen··on Video shot from the Space Shuttle during launch
[after you're dead]
mhansen··on This American Life Retracting "Mr. Daisey & The Apple Factory"
FYI, This American Life is WBEZ, not NPR (although TAL cooperates with NPR for things like the excellent Planet Money)
mhansen··on Why I Left Google
And if you set it aside you get 40% time next quarter. It's very much alive and well.
mhansen··on Why we need Python in the Browser
This is ridiculous. I love python, but it has no language support for an event loop, and if you put it in a browser, everything would have to be done in an event loop. It'd be ugly.

Javascript excels at evented programming. Use the right tool for the job.

mhansen··on Why we need Python in the Browser
FYI, Dart does type checking.

If you want to give your javascript some type-checking, try running it through the closure compiler. This is what we do, and we annotate our methods with type signatures like this

  /**
   * Queries a Baz for items.
   * @param {number} groupNum Subgroup id to query.
   * @param {string|number|null} term An itemName,
   *     or itemId, or null to search everything.
   */
  goog.Baz.prototype.query = function(groupNum, term) {
    ...
  };
And then the Closure Compiler tells us if we've broken some type contracts.
mhansen··on The Markdown Mark by Dustin Curtis
Better: name the file README.md
mhansen··on Why I Left Google
Interesting that you choose Wave as an example, because Wave was run as a semi-independent startup, and it ended horribly.
mhansen··on Google I/O 2012
It's not zero-sum. The devs get a lot out of it, too. All the devs that buy tickets to IO think that IO benefits them more than the $900 they're parting with.
mhansen··on Show HN: I decided to document and share my high-level CSS best practices
Do you go back and refactor #promoCol to .promoCol?

Yeah, that's exactly what you do. Just because your new dev doesn't know how to refactor (and it's hardly even refactoring, it's like a two-line diff) doesn't mean we all shouldn't use IDs.

IDs have an extra bit of self-documentation when you use them - when I see #promoCol, I know instantly that there's just one promocol, and I don't have to worry about breaking the look of another promocol while I'm fiddling with the CSS in there. If there's a class, you don't know how many things it applies to until you've done a grep over your project.

mhansen··on Learning from 20 years of personal analytics
Yeah, I hear ya, it takes ages to load my data too. If there's a way to cache on the serverside without running into the API throttling, I'd love to do some caching.
mhansen··on Learning from 20 years of personal analytics
It's pleasant to look back over your life - the graph probably reminds him of great stories that are too private to share :)
mhansen··on Learning from 20 years of personal analytics
If this kind of thing interests you, I made an app that graphs last.fm song listens in the same way as Wolfram's graphed his emails.

I find changes in listening habits correlate well with big life changes.

http://markhansen.co.nz/scatter.fm

mhansen··on Big Data's invisible open source community
You've probably already seen this, but for the sake of others, Google recently released the research paper detailing their petabyte-scale ad-hoc logs analysis platform, "Dremel".

http://research.google.com/pubs/pub36632.html

mhansen··on Visualizing Reddit with my graph drawing library
Very nice! I like how the lines on the graph wrap to 45 degrees.
mhansen··on Learn from Haskell - Functional, Reusable JavaScript
FYI, this isn't as general, but I think it shows off underscore quite nicely:

  _(people).max(function(person) {
    return person.firstName.length + person.lastName.length;
  });
mhansen··on Learn from Haskell - Functional, Reusable JavaScript
I'm not sure where you got this idea. V8 does not optimize tail calls. It's easy to see this in the Chrome console, I just entered this now:

  var a = function(x) { if (x == 0) return 'done'; return a(x-1); };
  a(100000);
  RangeError: Maximum call stack size exceeded
http://code.google.com/p/v8/issues/detail?id=457
mhansen··on Open source blog as another Backbone, Slim, Rails, Bootstrap sample app
Yeah. It gets annoying when you just want to write one blog post, and you feel like it shouldn't have to recompile everything else.

I profiled it once, and most of the time was spent shelling out to python to do the syntax highlighting.

mhansen··on Aussies' fix for 'stagnated' email
Very smooth interface, from what I can see. FYI on demo.fluent.io I'm getting HTTP 400 error trying to connect to the websocket.
mhansen··on Stop Paying Your jQuery Tax
Another telling gem is StackOverflow page doesn't even have a proper encoding declaration.

They declare the encoding in the HTTP Response.

  Content-Type:text/html; charset=utf-8
That's totally proper. If you specify it again inside the HTML, are you gaining anything?
mhansen··on FTP Must Die
Uh, yeah, you needed flash. You can't read local files in javascript without the HTML5 file api. Reading the value of <input type='file'> tags is forbidden in javascript. Try it.
mhansen··on Roy: Small functional language that compiles to JavaScript
>> you lose static typing and type inference in the compiler

It doesn't matter what the target language is if you want to do static typing or type inference. For example, Haskell compiles down to assembly, but still has an extremely robust type system with inference and all.

>> severely restrict the target platforms and future growth

Are you serious? JavaScript is supported on every platform and is experiencing crazy growth.

mhansen··on Best TLD that can't be taken down by US/etc?
FYI to people considering .nz: WHOIS Privacy is not allowed in .nz.

I'm very happy with my .nz domain, but it's lame that I have to have my home address in a publicly accessible database.

mhansen··on Google+ spams GChat/XMPP contact lists with irremovable circle nonsense
To choose who is in your contact list, log into G+, and hit the little arrow menu next to the chat list. Inside 'Privacy Settings' you can restrict which circles appear in your chat list.
← PreviousPage 2 of 15Next →