HNHacker News
TopNewBestAskShowJobs

ender7

5,056 karma · joined February 1, 2011

submissionscomments
ender7··on UTF-8 Everywhere
JavaScript source can be encoded in any way that the browser can handle, yes.

Within the JS language, strings are represented as sort-of-UCS-2-sort-of-UTF-16 [0]. This is one of the few problems with JS that I think merits a backwards-compatibility-breaking change.

[0] http://mathiasbynens.be/notes/javascript-encoding

ender7··on Why I want Bitcoin to die in a fire
Great, so as long as we solve six of the major technical hurdles of the day, we can avoid the societal and technical dangers that BitCoin poses. What a pleasant ultimatum.

As you pose it, it's now a race between the darker aspects of BitCoin and our ability as a world society to check off the items on your wishlist. I don't disagree that those are all good things to have, but I don't see how holding a gun to everyone's head and demanding short-term solutions to long-term problems is going to accomplish anything. I don't see a world where we get there in time.

ender7··on The Most Misleading Measure of Response Time: Average
Using FPS as a measure of your UI's performance is equally problematic. FPS is a great measurement for for games since performance dips usually occur over a span of many frames, but for UIs a lot of work tends to get concentrated into a single frame. A single frame that takes 110ms (or, heaven forbid, 500ms) to render won't move the needle on your FPS meter, but it will be instantly recognizable by the user.

I've complained about this before; use maximum frame delay [0] instead of FPS when measuring UI responsiveness.

[0] The maximum time elapsed between any two sequential frames during your test.

ender7··on HTML: font color=”red” becomes green
No, the OP is correct. You're right that <red> is a valid CSS color keyword, but <”red”> is not. Because of this, the CSS spec treats it as a "legacy color value" and attempts to interpret it as a string of characters (including the quotes) rather than a keyword.
ender7··on Jolla
The UI is pretty, but it's dropping frames like crazy during your demo video. It's super smooth most of the time, but not at the critical times. Horseshoes and hand grenades, etc.
ender7··on End the N.S.A. Dragnet, Now
It has always been this way.

“In this age, in this country, public sentiment is everything. With it, nothing can fail; against it, nothing can succeed. Whoever molds public sentiment goes deeper than he who enacts statutes, or pronounces judicial decisions.” -- Abraham Lincoln

ender7··on Motherfucking Website
The issue is not the size of the text (which is small but still legible) but the line length -- that is, how wide the lines are. If lines are too long, then reading becomes an exhausting experience as you sweep your eyes back and forth across the page like a lighthouse.

It's not really possible to enforce line-length with a user stylesheet (increasing the point size doesn't solve the problem, it just balloons the letters up to goofy proportions). This page just needs max-width set somewhere on the text container.

ender7··on Motherfucking Website
I can certainly relate, but please don't try to pretend that this is a pleasant reading experience on a desktop. Lines of text should be about 45–90 characters long (including spaces) in order to create a pleasant reading experience. Do not make me resize my browser window to do this for you.
ender7··on The Transparent Chinese
For almost a decade, “weiwen,” or “maintaining social stability,” has been the government’s public mantra[...]“Stability” has been deemed more important than education, health care and even national defense.

Political and social fixity (to use an obnoxious historian term) has been one of the overriding goals of the dominant Chinese polity since before the Great Wall was built. It's something that Westerners have a lot of trouble understanding -- Communism might be a fairly recent addition to China, but the value the Chinese place on stability is a tradition that dates so far back we have trouble measuring its age.

ender7··on Google to reject Chrome extensions outside of Chrome Web Store
IIRC, the CWS allows you to distribute alphas and betas to a specific set of users.
ender7··on Animation to Explain CSS Triangles
width and height are automatically 0 if the element is inline (i.e. a span) or absolutely positionrf (which is usually true for these kinds of triangles)
ender7··on Git concepts simplified
This is exactly what I was getting at. git's command layer is much like the "new" keyword in Javascript -- it's a false abstraction of a relatively elegant underlying system [1]. As it is, the command layer encourages a naive mental model that is both inaccurate and leaky. You end up having to learn both the abstraction layer and the actual system underneath in order to actually understand what any of the commands do.

[1] I assume this was originally done to make git seem more approachable to SVN or CVS users.

ender7··on Git concepts simplified
There's also a bit of "people in glass houses..." to this comment. I don't think git really wants to start a fight when it comes to poor design decisions.
ender7··on Confusing UI in iOS7
The iOS 6 version of the alarms app for iPad had a similarly confusing interface. It's a complete disaster -- one that I was hoping they would remedy in iOS 7, but that doesn't seem to have happened. I've always been surprised that this app managed to get out of Apple's internal UI review -- now not once but twice.
ender7··on 'Grand Theft Auto V' Crosses $1B In Sales
Advertising is not usually included in development costs; the total expense was probably higher.
ender7··on Fat arrow functions in Javascript
First and probably most useful is that they gain the lexical scope of the environment they’re defined in.

Nit: technically, all Javascript functions are lexically scoped. The fat arrow permanently binds the value of "this", which is sort of like modifying the scope, but again not technically because "this" is a special keyword and not a variable.

ender7··on Node's Unicode Dragon
This behavior is actually part of the ECMAScript standard [0], so it's unlikely that V8 (or any other conformant JS engine) would behave the way you (and many others) would want.

JS's treatment of strings is even more wacky than you might think -- it is neither really UCS-2 or UTF16. Engines are semi-required to use UTF-16 representations of strings internally, but the API surface that is exposed to the JS code makes them look like UCS-2 strings (i.e. no surrogate pairs). However, if you stick a JS string into something that is UTF-16 aware, such as a DOM node, then the surrogate pairs will display correctly.

See [1] for a very clear explanation of this muddy subject.

[0] http://www.ecma-international.org/ecma-262/5.1/#sec-8.4

[1] http://mathiasbynens.be/notes/javascript-encoding

ender7··on Tutor reveals the Ivy-admissions madness of rich penthouse parents
I think you're right, but with two caveats. First, students with shockingly blue blood tend to keep company with other upper-crusters, frequently in exclusive fraternities or sororities that seek to carve out new depths of exclusivity in an already exclusive environment. This makes them less obviously evident than people expect. Second, I would caution that you, too, are more likely the exception to the rule. The unfortunate fact is that most kids who get into prestigious schools have had the benefit of extensive preparation while the students who lack this preparation have very poor chances. Sometimes you can outwit the test with a massive intellect or a knack for test-taking, but those sometimes are seldom. I salute your seldomness, although a bit sadly. :)
ender7··on Google and the NSA: Who’s holding the ‘shit-bag’ now?
While "Google Ideas" makes it sound like a random VC fund or corporate "vision & innovation" wankery, according to that website:

Google Ideas is a think/do tank that explores how technology can enable people to confront threats in the face of conflict, instability or repression.

Their list of projects makes much more sense in that light.

ender7··on PS1 generator
Please add "cursor: default;" or "cursor: move;" to the draggable items. Draggable things should not use the text selection cursor. :)
ender7··on How Bad is DOM Interaction Really?
The real hits to performance do not come from "I did X writes" or "I did Y reads", but rather from situations such as "I did X writes interleaved with Y reads, which caused Z reflows". Or "I needed to update a tiny part of the screen but triggered a full-page repaint". Or "I'm doing complex animation X, but am not triggering hardware acceleration."

Reflows are very expensive. So are repaints. Chrome dev tools will allow you to detect issues with both of those.

ender7··on Kids can't use computers, and why it should worry you
To extend your car analogy, I wonder if the author knows how to fix his own car? I certainly don't. I know it involves pistons and carburetors and...tubes.
ender7··on Firefox 23 is available
It was, but there are many addons that will turn it off for you.
ender7··on “A book is a sneeze”
Moreover, while White's style of writing is simple and straightforward, it is not representative of how people talked then (or talk today). That's part of the magic -- his words are so carefully crafted that we mistake elegance for simplicity and structure for straightforwardness. There is none of the common unevenness of natural speech to trip up our reading ears; the words flow so easily into our minds that it feels like we're talking to ourselves.

White was also the co-author of a famous prescriptive book on writing and grammar [1]. He knew what he was doing :)

[1] https://en.wikipedia.org/wiki/The_Elements_of_Style

ender7··on Scoping in CoffeeScript and JavaScript
I don't think I agree with your point. Javascript is a very small language, and while there are a number of gotchas they are enumerable and well-defined.

Central concepts:

- Objects

- Prototypes

- Scope chains

- Closures

- Function.bind, Function.apply/Function.call

Gotchas:

- Behavior of the "new" operator

- Value of "this"

- Type coercion, falsiness of "", == vs. ===

- var hoisting

- if/for/while do not create scope

- function expression vs. function declaration

Many of the gotchas are self-evident if you learn the central concepts.

ender7··on Google Chromecast
While its primary mode is indeed method-for-sending-pointers-to-media, it also has an option for streaming the contents of a Chrome tab directly to the Chromecast device [1] ala-VNC. With caveats: that feature is still in beta and requires a fast computer/connection.

[1] https://chrome.google.com/webstore/detail/google-cast/boadge...

ender7··on Google Doodle of Roswell anniversary is a point-and-click adventure
Sigh. Google does not have a "partnership" with the NSA. They give the NSA data when they are required to do so by law. The problem is the law, which should be changed.
ender7··on How to know when someone is in trouble in the water
Beware: it is very dangerous to attempt to rescue a full-grown person who is drowning. A person who is drowning has temporarily lost their mind and will happily drown their would-be rescuer in an attempt to stay above the water. Approach a drowning person from behind and hold them above the water by their armpits.
ender7··on Acquisition and maintenance of a band of minions
Nit: I know we like to be all anti-intellectual here at HN, but Rachel's claim that "having a PhD" correlates strongly with "lacking the ability for independence of thought or action" is pretty ridiculous. Undergraduate and masters programs may be fairly structured, but once you get into a PhD program you are shockingly, horrifyingly alone. Those without the ability to act, plan, or motivate themselves independently do not make it through the 4-8 year (depending on your domain) process. Very occasionally, you'll find an advisor or a lab that will hold your hand through the entire multi-year process, but those experiences are a rarity.
ender7··on CSS3 Animations with special effects
The key to many of these effects is to animate both the transform and the position of the transform-origin simultaneously. Done correctly, it can give the animation a sinuous behavior that makes it much more interesting to look at.
← PreviousPage 5 of 15Next →