Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ahoge
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
421.
▲
by
ahoge
14y ago
Check out Dart. It has less problems than JavaScript, not more.
422.
▲
by
ahoge
14y ago
I didn't notice any difference when compared to regular small ovens. Well, I guess there is some accelerated crust build up if you let your microwaved food splatter around and then bake it in. If you repeat that cycle a few times, it will l
423.
▲
by
ahoge
14y ago
There are microwave/oven combos. Haven't seen one with hotplates on top yet. I have seen microwave-sized ovens with 2 hotplates on top though. I used one of those for a couple of years. Okay, after looking around at Amazon for a bit, there
424.
▲
by
ahoge
14y ago
The closure compiler uses doc comments. YUIDoc or JSDoc comments look pretty similar, for example. However, since this stuff isn't standardized, there are some differences between different flavors.
425.
▲
by
ahoge
14y ago
> You made an example of how not to write documentation and then you shown that the code was better without. Both code snippets are equally documented. That triple slash thing is a doc comment and the type annotations will be also used
426.
▲
by
ahoge
14y ago
The output is more optimized now. However, there is a one-time cost for some of the language features. So, it grows kinda quickly initially. There is some sort of bump, basically. Thanks to "tree shaking" (=dead code removal), you'll reach
427.
▲
by
ahoge
14y ago
>It's made some strange choices (IMHO) like optional typing. Yes, this may look a bit weird, but it actually makes perfect sense. Those types are annotations. If you use them at the "API boundaries" (parameters and return values), you a
428.
▲
by
ahoge
14y ago
On average, the size of a website triples every ~5 years. Nowadays there are lots of really fat websites with tons of resources. Personally, I think that's kinda convenient. This way it's a lot easier to make sites which are much faster tha
429.
▲
by
ahoge
14y ago
>My theory is that Flash doesn't make Adobe any money They would have dropped it like a hot potato if that would have been the case. They make money with the fairly expensive authoring tool.
430.
▲
by
ahoge
14y ago
function foo () { x = 5; // totally fine ... var x; // because we declare it here }
431.
▲
by
ahoge
14y ago
>What's the bug that results from the "var i; for(i=0)" pattern? Someone refactors the "var i" away and you end up with a global var. Wrong. JSLint will complain and then you'll fix it. That's why you use JSLint. It can find stupid thin
432.
▲
by
ahoge
14y ago
>due to the 'for(var i=0...' failing even with -vars enabled That's because `for(var i=0...` is completely bogus. What if you have two of those loops? Are you going to put `var` in the first one, but not in the second one? Are you going
433.
▲
by
ahoge
14y ago
Ahm... yea, I forgot that I put them into `Handlebars.templates` myself if they aren't there yet (i.e. during development).
434.
▲
by
ahoge
14y ago
Well, you send something to the server, then the templating happens, and then it's sent back to you. Even indefinitely fast templating would be slow due to network latency. Also, sending JSON back and forth is kinda nice because it's fairly
435.
▲
by
ahoge
14y ago
I use: Handlebars.registerPartial("Foo", Handlebars.templates.Foo); Your approach is kinda amazing. Makes me wonder why not all templates are automatically available as partial by default. Are there cases where you wouldn't want th
436.
▲
by
ahoge
14y ago
>Thinking about this leaves me asking: why don't we just send the javascript template function to the client instead of doing all the template parsing/compiling on the client? You can do this with Handlebars. I use a Grunt task to pre-c
437.
▲
by
ahoge
14y ago
>"it's important to get the requirements right" for instance Well, we've all been there. If you don't get them right, it will really hurt. A lot. Also, moving things in a wireframe or diagram around is basically free whereas moving thin
438.
▲
by
ahoge
14y ago
Well, you get more pixels if your display has 1.5x or 2x DPI.
439.
▲
by
ahoge
14y ago
Firefox + XP = the GDI flavor of ClearType, which only does horizontal anti-aliasing. This only looks good with text at small to normal font sizes. Firefox + Vista/Win7 = the new Direct Draw flavor of Cleartype, which anti-aliases on both a
440.
▲
by
ahoge
14y ago
Numbers are IEEE 754 floating point. It's a separate standard which they just had to reference. I do agree that it's bad style, because it doesn't clearly communicate the intention. If you want something that returns true or false, you shou
441.
▲
by
ahoge
14y ago
It turns -1 (indexOf's "not found" result) into 0 (i.e. something falsy). Any other value is turned into something which isn't 0 (i.e. something truthy). Basically, it's a smug version of: return item.toLowerCase().indexOf(this.query.
442.
▲
by
ahoge
14y ago
This is often due to color profiles. You take a screenshot (or a mockup), grab the color, and use that value. If you didn't explicitly disable color management beforehand, you've created a new color. Another reason are JPEGs. You get a mock
443.
▲
by
ahoge
14y ago
It's a style choice. You don't have to use classes and/or do anything with the prototype chain.
444.
▲
by
ahoge
14y ago
>Has there been a particular event raising the awareness of this? Not that I know of. You probably just started hanging out with people who tend to complain about this kind of thing. I, for one, complain about this stuff because it's a
445.
▲
by
ahoge
14y ago
This was 100% deliberate. It's just some spin. The post gets more attention this way, which makes it more likely that the underlying problem will be fixed somewhat sooner. Besides, with a headline like this it will also get automatic upvote
446.
▲
by
ahoge
14y ago
Don't put spaces in front of question marks. If you're French, okay, you're forgiven. However, a regular space is still completely wrong and it will totally break word-wrapping.
447.
▲
by
ahoge
14y ago
>Change the game design slightly? There aren't many game concepts which work with just one button. Actually, having just one button is so absurd that people turned this particular limitation into a competition (similar to <=4kB and
448.
▲
by
ahoge
14y ago
It doesn't support fenced code blocks (from GFM). That's kinda inconvenient. Uhm... it actually does, but the preview does not. E.g.: ```ruby def foo puts 'bar' end ``` This results in a `pre>code.ruby` blo
449.
▲
by
ahoge
14y ago
Yes, we can of course reinvent our own untested and undocumented triangular wheels. But is that really the best possible use of your time?
450.
▲
by
ahoge
14y ago
>Array.prototype.slice.call is the way to go. The point was to demonstrate that the API is somewhat flawed since it doesn't return something usable. The "clever" short version was used to show that you have to write quite a bit more cod
More ›