HNHacker News
TopNewBestAskShowJobs

ble

272 karma · joined December 28, 2011

submissionscomments
ble··on How I learned to stop worrying and love React
You're welcome!

Using the web inspector has been such a massive and continuous boost to my learning/work with webpages and I'm extremely glad to share it with someone it might help.

ble··on How I learned to stop worrying and love React
You want to look at the DOM structure of the page as it exists in the loaded page and have I got a treat for you! Figure out how to open the web inspector for your browser; the keyboard shortcuts are ctrl-shift-I or cmd-shift-I or cmd-opt-I on a few (platform, browser) pairs.

(This will show you the actual DOM, not the React components... but since you were talking about 'view-source', this might help you too.)

ble··on Show HN: This page exists only if someone is looking at it
It's great! Will the client complain if it receives content that doesn't hash from a malicious client?
ble··on Show HN: This page exists only if someone is looking at it
From

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

9.1.1 Safe Methods

Implementors should be aware that the software represents the user in their interactions over the Internet, and should be careful to allow the user to be aware of any actions they might take which may have an unexpected significance to themselves or others.

In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested.

Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the side-effects, so therefore cannot be held accountable for them.

ble··on Please stop calling databases CP or AP
Impossibility results are really good for proving that one or more things are impossible.

The CAP theorem is an impossibility result.

ble··on Ask HN: What made you choose your current career?
A desire to work at an intersection of programming, physics, and statistics.
ble··on Scientific Bug Hunting in the Cloud: An Unexpected CEO Adventure
I don't think it's too disrespectful to summarize this article with a TL:DR.

They were using RCS to do version control of some unknown files in their language. This caused a bunch of IO to happen intermittently when they were doing relatively simple operations.

This looks like the most common cause of "wow it sure is hard to figure out what causes this occasional problem": "we didn't know all of the stuff our code was doing."

ble··on Mozilla Brick
Brick is for reusable UI elements; unlike Polymer, it doesn't use custom elements to solve non-UI problems.

Brick uses vanilla syntax for the creation of custom elements, where "vanilla" means "as defined in the relevant standards." Brick uses the platform.js polyfill from the polymer project.

From http://brick.readme.io/v2.0/blog/welcome-to-mozilla-brick

    We have very specific goals for Brick- to make building 
    webapp interfaces easier. There are other projects that
    use the same technologies (like Google's excellent
    Polymer) that provide a more complete web application
    development solution. The motto on the Brick project is
    "strong opinions, tightly scoped"- meaning we don't
    intend to solve the problems of code stucture, module
    loading, data binding, or really any other problem other
    than webapp interfaces.

    ... the rising popularity of Google's Polymer and its
    syntax for describing Custom Elements grew, and when
    users came to contribute to Brick and x-tag, they found
    themselves facing an unfamiliar syntax and an underlying
    library that was frequently not well documented. The
    decision was made that if users encounter Custom Element
    registration syntax, it should be the standards-based
    syntax. Brick components are now written in a 'vanilla'
    style, using the standards-based APIs directly.
ble··on The Web’s Declarative, Composable Future
I feel you about the inadequacies and oddities of JS, HTML, and CSS, but who's going to engineer this clean break with the past? What entity or entities are cohesive enough in purpose and broad enough in interest to produce something that could ever hope to rival the existing, impressive-if-frequently-kludgy, broadly-installed functionality of the web platform?

What is so broken ("broken"-broken, not just "hard to do correctly", "inconvenient", or "inconsistent") about JS/HTML/CSS?

You bring up general software development, so I want to say: "custom elements defined with HTML templates rendered in a shadow dom" must just sound like layering crazy on crazy, but it's actually a really old-school idea: encapsulation. Encapsulate the HTML structure, the CSS that styles it, and the Javascript that adds behavior and/or fully elaborates the structure into a single thing and maybe some of the crazy can be controlled.

ble··on It's Go Time On Linux
spacetime.WhereAndWhen, because you might be representing a time in the past, somewhere else, and because most timezones aren't UTC. Good job astronomers of Britain!
ble··on Developer Competition is Heating Up
Did you have a particular statement in mind? Given that the comment was several sentences long, it's not clear to what you are referring.
ble··on Focus on Ocean’s Health as Dolphin Deaths Soar
I liked Collapse, but I really liked "The Collapse of Complex Societies." Written by an archaeologist, addresses many other scholars' theories of collapse, and provides an excellent economics / complexity argument.

http://www.amazon.com/Collapse-Complex-Societies-Studies-Arc...

(not an affiliate link)

Also, the idea of "diminishing marginal returns on added complexity" suggests a lot about why maintenance, extension, and management of software systems becomes harder over time.

ble··on Focus on Ocean’s Health as Dolphin Deaths Soar
True, so let's be even more exact: "presently" is the wrong tense; present acidification and warming are consequences of actions taken over the last several decades.
ble··on Focus on Ocean’s Health as Dolphin Deaths Soar
Laws are better at protecting individual rights and maintaining public order than protecting future generations from the unintended consequences of present and recent economic history.
ble··on Focus on Ocean’s Health as Dolphin Deaths Soar
Pardon the profanity, but fuck! On a logarithmic scale, a decrease of 0.1 on the pH is a 25% increase in H+ concentration...

... and a decrease of 0.7 is a 500% increase in H+ concentration. That sounds apocalyptic, at least for ocean ecosystems.

Warming and acidification are increasing jellyfish blooms, right? Do you know any good recipes for grilled jellyfish?

ble··on Webdesign tool Macaw raises $275k on Kickstarter, $200k more than original goal
From macaw.co:

ABSOLUTE TO STATIC CONVERSION Macaw offers designers the freedom of absolute positioning within the interface but will convert to a static document flow upon export by calculating the necessary margins, padding, floats and clears. It's the best of both worlds.

ble··on Replacing Clever Code with Unremarkable Code in Go
tell 'em about package "robustly"!
ble··on Polymer, a Web Components library built by Google
Have you tried using the polyfills yet?

From the sound of it, they are good enough that future is already here-- except for some glaring exceptions like shadow DOM re-projections.

ble··on Law school applications are collapsing
A "civil law system" as opposed to a "common law system" draws less on precedent, past decisions made by judges on points of law similar to those at issue. Compared to common law, this simplifies the operation of courts and reduces the role that lawyers play in proceedings, which one might reasonably expect to diminish the demand for lawyers.

http://en.wikipedia.org/wiki/Civil_law_(legal_system)#Differ...

ble··on If Peter Thiel And Garry Kasparov Are Right, Then We're In Trouble
The phrase 'diminishing marginal returns' is missing from this article. The essence of diminishing marginal returns is something like, "low-hanging fruit gets picked first"; problems that have a good ratio of effort in to reward out are preferentially attacked and so, over time, the average problem is harder to solve or has lower yields.

One could argue that 'stagnation' is occurring not because absolute innovation (however you make up a way to measure it) is down but because the average real-economy impact of a unit innovation (in made up measure) is getting smaller.

ble··on TSA Removes X-Ray Body Scanners From Major Airports
The reason for the controversy is

1) this level of dose is thought safe if absorbed throughout the body; 2) there is no consensus on whether this level is safe if absorbed solely in the skin; it sounds like the question simply has not been studied.

ble··on Why I Two-Space
Narcissism of small differences, anyone?
ble··on We’ve Already Passed the Tipping Point for Orbital Debris
The article specifically mentions material ablation (vaporizing part of the debris) rather than light pressure as the source of impulse.

If it could vaporize debris that came off of satellites or boosters or what have you, it could vaporize parts of satellites. Possibly at the rate of the metaphorical little bird that sharpens its beak on a mountain. :)

ble··on We’ve Already Passed the Tipping Point for Orbital Debris
There is the idea of a laser broom [1], a ground-based system for pushing debris into more elliptical orbits that bring them closer to Earth at perigee.

It might not be feasible for political reasons; I imagine most designs would also be excellent tools for disabling satellites, thus could start a space arms race. (Both China and the US have blown up satellites, but both were done with anti-satellite missiles; lasers might be more useful for starting a disastrous space war.)

[1] http://en.wikipedia.org/wiki/Laser_broom

ble··on Show HN: Matches.js -- Powerful Pattern Matching for Javascript
Last I heard, jashkenas was not a fan of adding such.

"... [P]attern matching inspired by static languages is a particularly poor fit for JavaScript (and by extension CoffeeScript), because types are extremely weak in JS." -jashkenas [1]

"[... P]attern matching is not nearly as useful in a language without rich types [...]" - jashkenas [2]

I'm on that reddit thread, respectfully disagreeing with him.

[1]: https://github.com/jashkenas/coffee-script/issues/1419#issue...

[2]: http://www.reddit.com/r/programming/comments/er0qj/coffeescr...

ble··on I am unreasonably proud of this recursive anonymous quicksort done in Matlab
Nice.

I find it annoying to have to EITHER -write one file per function and completely crap up a directory OR -write multiple functions in one file that can only be called by code in that file (nested functions / subfunctions)

The clear solution is to write utility functions as anonymous functions. The major limitation of anonymous functions is that they evaluate an expression and cannot contain statements... unless you use eval()!

    %come to the dark side

    if_ = @(cond, then_fn, else_fn) ...
            eval('if(cond) then_fn(); else else_fn(); end');
    %this can make code better and it can make code terrible;
    %whether it is a better terrible than the MATLAB you have
    %to deal with on a regular basis is unclear.
ble··on There is No Such Thing as Proprietary Client-side JavaScript
Obfuscation is perhaps DRM, but a very specific subset of DRM.

Obfuscation: "I will provide a functional copy of my code that is not (human) reader-friendly; I want people to execute my code but present a barrier to extensive understanding or modification of its implementation."

When someone says DRM, I usually think of its least pleasant incarnations- platform lockdown software that must be installed to play a game or (interestingly) take a test, content that may only be accessed after phoning home and verifying that one is in good standing with the rights holder, etc.

To my mind, JS obfuscation protects IP in a way that more closely resembles compilation.

ble··on 6 month read-through/discussion of Gödel, Escher, Bach starting 1/17 on Reddit
I finally created an account and stopped lurking to say:

I don't think this comment is a troll. GEB teaches a relatively thin stream of technical ideas through very precious, "cutesy" prose.

← PreviousPage 4 of 4