Recent submissions

Comment · 4 years ago
The Japanese language actually does have an idiom for "in the red". It's written as 赤字, which literally means "red letter" or "red text". The opposite is 黒字, or "black letter" / "black text" which is equivalent to English's "in the black".

I guess this just doesn't carry over into the charts used in the financial sector?

Comment · 6 years ago
Not sure about bananas, but in general products are individually wrapped due to the high humidity in Japan.
Comment · 8 years ago
I learned Dvorak in high school and was proficient in it after a couple weeks. In addition to actual practice, I found it helpful to just practice mentally during downtime.

I used Dvorak exclusively and lost the ability to type on qwerty keyboards. This became pretty inconvenient, so I re-learned qwerty, but then I couldn’t type in dvorak any more.

A while later I practiced dvorak again and have been able to switch back and forth without issue ever since (even though I don’t use dvorak very often now).

I found that dvorak wasn’t actually that good for programming due to the positioning of punctuation, math, and auxiliary keys. It’s also annoying for gaming or using hotkeys in general (especially copy + paste).

Comment · 10 years ago
The .ts files will be compiled to AMD modules, so none of the declarations will be in the global scope.
Comment · 10 years ago
I used to use a project called now on npm that was abandoned a few years ago (https://github.com/Flotype/now). I was curious how this new project was using the same name on npm as the previous now that I had used.

Looking at the npm release history, versions <= 0.8.1 are the old project, and the new project picked up at 0.9.0 (should have been 1.0.0 I guess). This is consistent with npm's statements about package name transfers during the leftpad debacle, but there's just something weird about reusing package names for totally different projects...

Comment · 10 years ago
I think the branching factor is somewhat higher given that the order of actions makes a big difference. Also remember that when playing a card you have to choose where to place it, which can multiply the branching factor by up to 7.

If both of you have 3 minions on the board, each of your minions has a choice of 4 targets, which is already up to 4^3=64 choices. Then considering each order of attacks, and the fact that you can play any card of your hand before or after attacks, and the branching factor has the potential to explode.

Comment · 10 years ago
https://github.com/scriby/asyncblock-generators

That's a control flow solution I wrote on top of generators to make it a little easier to manage parallel tasks, timeouts, error handling, and so on.

I originally made asyncblock, which was based on fibers a few years ago. This module uses the same underpinnings as asyncblock, just based in generators instead of fibers.

Comment · 10 years ago
The browser's built-in same origin policy will prevent the iframed content from being able to access cookies in the containing frame because it is being hosted from a different domain.
Comment · 12 years ago
I think simply not using Safari will mitigate most of the impact for most users on OSX.
Comment · 12 years ago
The whole paragraph can be translated like this:

"I didn't really think I'd be able to write this [program], but somehow I was able too. Ruby is scary, isn't it? I wonder if you could write this in another language?"

Comment · 12 years ago
Good point.

Check out https://github.com/scriby/browser-harness-bootstrap-tests for a full example. Browser harness itself is just a conduit between node and a browser - you need to provide the test framework yourself (mocha, vows, etc.).

Comment · 12 years ago
I'm working on https://github.com/scriby/browser-harness. It's a little different in approach because it doesn't use selenium at all (rather it uses a websocket connection with the browser to control it).

It's considerably more lightweight and compatible with all browsers you care about, but you can't do everything you can do with selenium.

We've been using it for about 6 months at work and having good results.

Comment · 12 years ago
Comment · 13 years ago
I don't see anything fundamentally wrong with this programming question, except that it might be a little involved for a short interview.

The purpose of this question isn't to tell you whether the candidate can program chess boards or not. It could be used to help find candidates who:

* Have experience with search algorithms

* Specifically have experience with backtracking solutions

* Can reason through a complex problem (and communicate while doing so)

* Paid attention in school / knowledge retention (for recent grads)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton