HNHacker News
TopNewBestAskShowJobs

gruseom

30,328 karma · joined August 18, 2007

submissionscomments
gruseom··on Why you should move that button 3px to the left
Absolutely. To nearly everyone, the user interface is the program. This sounds like a truism but really is the opposite. It has important practical consequences.
gruseom··on Why you should move that button 3px to the left
Wow, this is a superb article that resonates with me as much as anything I've ever read on the subject. It practices what it preaches, too. Reading it made me feel the very things it's talking about.

I sense, though, that the author's tactics for working with teams that don't share his values are half-measures. It reminds me of the large and sad literature on "organizational change" in software development, wherein people trade stories about how to cajole managers into letting them do fragments of good engineering. None of that works very well. The satisfying solution is to be part of an organization that values good engineering in the first place.

Similarly, a designer like the author would be better served by working with–I'm tempted to say better engineers, but that's my bias–engineers who feel the same way that he does about product. These exist; I'd consider myself blessed to collaborate like that.

gruseom··on Why Loneliness Matters in the Social Age
I love that book. Just browsing through it brings relief to the soul. Imagine if all buildings were alive like that!

Alexander's critique of modern architecture is devastating, but his later, hugely more ambitious work is somehow less compelling. Perhaps I should give it another chance.

gruseom··on How I want to write Node: Stream all the things
Ok, thanks, I get it now. In my case a macro transforms the body of each callback to catch exceptions and pass them back as error args through the callback chain. So in your example, there would be a generated try-catch around the JSON.parse(data). I forgot this detail (sign of a successful abstraction?) and it does seem an example of something macros can do that functions cannot.

Re null reference checks, to get behavior analogous to a null exception you have not only to check for null, but also pass back an explicit error if you find it. That's a lot more work than adding in an extra question mark. Null checks that do nothing but not crash are a mixed blessing; 90+% of the time they do what you want, but when they don't, you get a silent failure and a debugging goose chase. I'd be surprised if you told me that that never happens.

I took a look at Node.js domains and they do seem really complicated. If I were working in Javascript instead of having control over the language, I doubt I would use them; I would probably just crash-and-restart as one of the other commenters described. That's not a good solution, but probably the best tradeoff given the alternatives.

gruseom··on How I want to write Node: Stream all the things
I don't understand most of this. For example, I don't know why you say that the async library couldn't try-catch every place that an exception might occur (mostly its calls to the functions that get passed in to it). It would be interesting if it couldn't, since then we'd have an example of something macros can do that functions cannot. But it seems obvious to me that it could; you'd just need a lot of try-catches. What am I missing?

As for domains, I don't know what you mean by them, but if they're catching errors at a higher level than the async library, my guess is that they must be some more sophisticated sort of top-level handler; perhaps something that keeps track of which async calls are in progress and attempts to bind exceptions back to their context? Whatever it is, it sounds complicated.

But what I understand least of all is how you guys all seem to write Javascript code that generates almost no exceptions. To me that sounds almost like bug-free code. No null references, for example? I get stuff like that all the time.

gruseom··on 95% of climate models agree: the observations must be wrong
There may be a few, but there are countless more who falsely believe this about themselves. Therefore it is wiser in most cases, especially one's own, to presume that this belief is self-deception. Self-observation quickly reveals how often the emotional reaction precedes and conditions the cognitive one.
gruseom··on The world's smallest and fastest classical JavaScript inheritance pattern
Naive questions are often the best questions. You'd be smart not to let go of that one.

The terms "object" and "object-oriented" mean so many different things that it's hard for any discussion not to run aground on semantics. But I'll chip in with this anyway: in my experience, you don't need OOP, and it's a particularly obscuring influence in JavaScript. Certainly you should not take for granted that OOP reduces complexity, but rather ask yourself in the context of particular programs how true that really is. (Games may be a special case, since they're closer to the simulation-of-an-external-system paradigm that is the sweet spot for OOP.)

In my view, the fundamental problem with OOP may be premature encapsulation. Once the core concepts of a program have gotten clear enough to be very well-defined, it makes sense to put them in the kiln and bake them. The rest of the code can then just use an interface and care nothing about the details. But as long as the core concepts and their relationships are still in the process of being discovered, which is actually the default case for most programming, what you need most is malleability. The OO infrastructure of encapsulation impedes that. This manifests as unclear classes with unclear names and unclear dependencies between them. Such a program is harder to work with than a loose collection of functions would be. And the fact that JS wasn't designed to be used this way makes its effects worse in JS.

gruseom··on Why I Dropped Out Of YC
"Not a net good in this medium" is exactly the right way to look at this. In a more robust environment, your (IMO) true and well-intentioned original comment would not have been a problem.
gruseom··on How I want to write Node: Stream all the things
The correct way to deal with an error in asynchronous code is to pass an object describing the error as the first argument to the callback.

Sure, but what if the error is thrown at you as an exception in the first place—which happens a fair amount, because that's how the JS runtime tells you when something is wrong? How do you get from there to the callback way?

What the Lisp macro I mentioned does is generate a separate try-catch around each block of code that runs at a different time and thus might throw an exception that would not otherwise get caught. In that way it catches every exception that's thrown, converts it to an error object, and passes the error back through the callback chain. The async library could do the same, albeit with a lot more code. I'm curious why it doesn't.

From a practical perspective, it doesn't make sense to try to catch exceptions in asynchronous code, anyway.

I don't think that's right. Asynchronous code is just synchronous code that runs at different times. Each block of synchronous code can generate exceptions. I agree that if you don't catch them then, they become useless; but you can catch them then. The reason this is not a "practical perspective" in JS is not that it doesn't make sense, it's that the language doesn't support it. Even the minimum code necessary to catch every exception involves so many try-catch blocks as to obscure the rest of the program. So no one writes such code by hand in JS.

Yet it is, I think, code that one wants, because without it you don't have a consistent error model. You end up having one model for first-class errors—the ones you detect and pass to callbacks before an exception has a chance to arise—and a second one for the dregs—the ones that come from any code that didn't know about or follow the callback convention (which, critically, includes the language runtime). The latter kind of error either crashes the server or gets caught by a top-level handler so it "only" crashes the request it was processing. That's a half-baked system.

gruseom··on 95% of climate models agree: the observations must be wrong
The tell is the angry sarcasm, which releases chemicals of pleasure in the brains of the already-convinced, but turns off anyone else.
gruseom··on 95% of climate models agree: the observations must be wrong
nothing more than a rationalization and opportunistic bolstering of his preexisting belief system

Whose behavior does that not describe?

gruseom··on 95% of climate models agree: the observations must be wrong
Considering how strongly your sources disagree with the OP, I find it surprising that the opposing graphs are not all that far off from each other.

The graph from the last article you linked to: http://skepticalscience.com//pics/ProjvsObs.png

The graph from the OP: http://www.drroyspencer.com/wp-content/uploads/CMIP5-90-mode...

In both cases the actuals are at the low end of the predicted range. They disagree as to how low, obviously, but not as much as I expected.

gruseom··on How I want to write Node: Stream all the things
But runtime errors are exceptions, so even if your code doesn't throw them, you have this problem. No?
gruseom··on How I want to write Node: Stream all the things
I have a question about the async library: what does it do if an asynchronous function or a callback raises an exception? The word "catch" doesn't appear in https://github.com/caolan/async/blob/master/lib/async.js.

I ask because I wrote some Lisp macros (I work in a Lisp that compiles to JS) to implement a few async patterns I need, and making sure that exceptions are trapped and threaded into the callback chain correctly was the most complicated part.

gruseom··on How I want to write Node: Stream all the things
Please don't bikeshed in technical threads. One comment on something like this is more than enough; zero is probably better.

When a new thing comes out, the discussion should focus on what's significant about it.

gruseom··on Tell HN: My Brother Died Last Week. His Death Will Not Be In Vain
have control over their own feelings and that Prozac is no better than a lobotomy

dreamdu5t said neither of those things, and there's no need to be rude.

gruseom··on Tell HN: My Brother Died Last Week. His Death Will Not Be In Vain
I like Szasz too, as well as his hippie counterpart R.D. Laing (whom you might check out if you're interested), but please, don't play intellectual hardball in this thread. The OP just lost his brother.
gruseom··on Obama Sued by Rand Paul Over Phone Surveillance Program
That study is a classic that belongs alongside Milgram (obedience to authority) and Zimbardo (Stanford prison experiment). I'm not sure why it isn't better known. The three go together perfectly.
gruseom··on Hemingway makes your writing bold and clear
That wasn't Hemingway. The first recognizable version was by William R. Kane. Never heard of William R. Kane? Me neither; hence the Hemingway. Quotes always bond to the nearest plausible famous person.

http://quoteinvestigator.com/2013/01/28/baby-shoes/

gruseom··on Gisp: A Lisp that compiles to Go
But putting an s-expression front end on the language doesn't do anything to escape Greenspun, does it? Two different phenomena.
gruseom··on Gisp: A Lisp that compiles to Go
That's about the evolution of complicated programs, so quite different.
gruseom··on Sony sells its waterproof mp3 player inside a bottle of water
It's an urban legend.
gruseom··on Did English ever have a formal version of “you”?
Do you have an example? That seems like a howler that surely his editor would have caught if he didn't.
gruseom··on Did English ever have a formal version of “you”?
In Polish, you don't use the plural vy as a formal singular. In Russian you do. I took Polish lessons at one point and my teacher would wince every time I accidentally called him vy. He told me the Russians used to force Poles to address each other that way in their own parliament. So sensitive was he to this long-past linguistic oppression that he couldn't help but be offended when an English speaker who happened to have studied Russian did it by mistake.
gruseom··on Did English ever have a formal version of “you”?
It seems that where all y'all is used, you have the re-emergence of the distinction between the formal (y'all) and plural (all y'all). Which is pretty fascinating.
gruseom··on Anonymity
This reminded me of an excellent post the other day about an anonymous messaging network ("Rumor Monger") that ran inside Apple until management shut it down:

https://news.ycombinator.com/item?id=7204558

It got very little discussion, so if you didn't see it, I recommend it.

gruseom··on Girls and Software
Well, I'm glad I didn't come to the wrong conclusion. It's too bad, though, because Minecraft modding got this kid really excited, and there are many (maybe millions) like him. It seems like it could be a really fruitful area for work.

Actually, when I was looking through stuff for him, I found a project that implemented Minecraft bindings for JavaScript with the aim of creating a friendly environment for kids. The author was an HNer and had posted it here a year or two ago. But the project had languished since then, and it struck me (perhaps unfairly) that it probably wouldn't work out of the box in all configurations. The last thing one should put in front of a kid is something that immediately frustrates them by failing in strange ways. Tools like that need to be really, really well-hammered. Which is one of the advantages of Scratch.

gruseom··on Edward Bernays
I used to think it an astonishing coincidence that Bernays was Freud's nephew. But then I learned that Bernays was involved in making Freud's reputation in the US (a reputation which was odd in the extreme if you think of, say, Dale Carnegie as a native species of American popular psychology). So the two variables weren't independent: Bernays helped make Freud Freud in the first place.
gruseom··on Girls and Software
High school boys in tech are much more likely to be misogynistic

That rings very false to me. It was not at all the case when I was in high school. In fact it was just the opposite, and I see no reason why that would have changed.

gruseom··on Girls and Software
> this behavior will be exhibited at a very young age, or not at all

That's so obviously false that I doubt she's saying it. I suspect it's more like: these qualities tend to come up in childhood, so if we want to see more of them, that's where we should focus.

Everything about your comment ("I figured out HTML on my own") makes me bet you that had these qualities in spades as a kid long before you had a computer. All this existed before computers, after all. I remember Jerry Weinberg saying that he knew he wanted to devote his life to computers from the day Time Magazine ran a futuristic cover story about them in the late 1930s. Another farm kid, as it happens. He went to college to study computers and found they didn't exist yet, so he majored in physics and bided his time until programming became a thing.

I wonder sometimes whether any of this is about childhood per se or the fact that children are more likely to do things out of play, to figure stuff out, see what will happen, and so on. If that's it, then we can dispose of the controversy by agreeing that people who come to programming purely as a career or (god forbid) for status will do worse not if they're too old, but if they're too uncurious.

← PreviousPage 4 of 34Next →