HNHacker News
TopNewBestAskShowJobs

curveship

1,097 karma · joined December 16, 2010

submissionscomments
curveship··on Capital Man: Thomas Piketty is economics’ biggest sensation and fiercest critic
Piketty's argument, as well as the findings of the IMF report, is that what you've called relative wealth and absolute wealth are linked: greater inequality leads to lower growth rates. The entire economy suffers for the benefit of a few. Eventually, inequality might choke growth out entirely, leading to crisis.
curveship··on Gun – Distributed, embedded graph engine
So CAP: which does gun throw off the island? Based on this statement ...

> It bridges the distance with a realtime connection, so updates propagate at the speed of the raw pipes linking them.

... I'm assuming it's the P.

curveship··on Mercedes Is Owning This Formula 1 Season
cool air = more dense = more oxygen to burn
curveship··on DEC64: Decimal Floating Point
> There are also 255 representations of almost all representable numbers.

This isn't true. Only zero has 255 representations. All other numbers are limited by the size of the coefficient, 16 digits. So a number with 1 significant digit would have 16 representations, one with two would have 15, etc. Not that I'm defending the format, but if we're critiquing it for being sloppy, we need to be careful about such things.

curveship··on BTC Stolen from Poloniex
Seriously. I thought this bit of code from the MtGox leak was interesting. Sure looks like a potential double-spend race condition:

  $out = \DB::DAO('Money_Bitcoin_Block_Tx_Out')->searchOne(array('Hash' => $bean->Hash, 'N' => $bean->N));
  if ($out) {
      if ($out->Claimed == 'Y') {
          $bean->Available = 'N';
          $bean->commit();
          continue;
      }
  }
What if someone else claims $out between the read and commit? Is no one at BTC exchanges really asking these kinds of questions?
curveship··on Goodbye Academia
My own theory is that it will take academia another generation to figure out what it has done to itself. With entry-level conditions becoming more and more terrible, the best students will increasingly seek careers outside the academy, and academia will become populated by the second tier. At that point, it will have lost a prestige which will take another century to repair.
curveship··on Mono 3.2.7 is out
That sounds like the kind of growing pains experienced when you set up any new largish development environment. If we're up and running with ecosystem X, we forget how much work it took to get there, because it was amortized over time. When we start out with a new ecosystem Y, we spend a lot of time in the steep part of the learning curve before reaching Hello World. Java is, IMHO, the worst for this.

Just curious, I've never installed Mono, but my first thought would have been to look for a PPA. Are there none out there? Let someone else figure out the dependencies and configs for you.

curveship··on Introducing Bing Code Search for C#
But that's just the issue: IntelliSense isn't a GPS. Tell a GPS what your goal is and it will give you an explicit list of instructions to achieve it. IntelliSense can only tell you what your available next steps are. It's really more like a map -- give it your location (i.e. a type), and it will tell you what roads lead on from there (the type's methods). It won't, because it can't, tell you how to string those choices together into a solution. A GPS does, but not IntelliSense.

Don't get me wrong, I love IntelliSense. It digests a huge amount of information for you without forcing you to switch context, like having to look up library documentation or how a particular module was written. But it's only part of the puzzle. What I was seeing in our candidates was that they'd come to rely too heavily on IntelliSense and forgotten how to design. You need both.

curveship··on Introducing Bing Code Search for C#
Hah! Yes, I am (or pretend to be) competent, just not when writing HN comments ;). Thanks for the daily serving of humble pie.

I do wonder if there's something about .NET and a business environment that encourages this kind of behavior. When the organization's values are in their business rather than mentoring programmers, when they tell their programmers to "just get it done," you end up with IntelliSyn...Sense programmers? I've worked in various different programmer ecosystems, and I've never seen this pattern so strongly. There are of course excellent .NET programmers, I don't mean to say otherwise. And I got the feeling that several of the people we interviewed had basic talent, they'd just been trained, intentionally or not, towards this kind of behavior.

We started putting VS in front of candidates precisely to deal with the kind of fuzziness you mention. We started with whiteboarding code, but a lot of candidates would have a wrong design, then add a line of pseudo-code that they claimed magically made it work. By having them write actual code, it forced them to be explicit and to deal with unexpected outcomes.

curveship··on Introducing Bing Code Search for C#
As someone who has recently been hiring .NET engineers, I have to admit that this inspires mixed feelings. On the one hand, I can see huge power from combining AI and search with the structured context of programming. On the other hand, a disappointing number of the people we interviewed weren't software engineers, they were IntelliSync engineers. We'd give them a problem, and their first instinct was to hit a period and start hunting through the method options that IntelliSync gave them to see if one got them closer to their goal. Instead of stepping back and thinking about the problem generally, they'd try to solve it by stringing together IntelliSync suggestions, like stepping stones across a pond.
curveship··on “The working group should not agree to freeze whatever syntax Chrome ships”
The phrase "div-soup" makes me reach for my revolver. It seems to be a straw man that means "Either you're for Web Components or you're for the worst of web engineering."

- How does ShadowDOM (or Web Components more generally) make your DOM shallower? It's still the same box model. Deeply nested DOM structures are usually the result of engineers who don't understand the box model and so over-decorate their DOMs with more markup than is semantically or functionally necessary. Nothing in ShadowDOM (or, again, Web Components) changes this.

- Are custom elements really more transparent than divs? If "View Source" shows <div><div><div>...</div></div></div>, do you really gain much if it shows <custom-element-you've-never-heard-of-with-unknown-semantics><another-custom-element><and-another>...</etc></etc></etc>? Proponents of Web Components seem to imagine that once you can define your own elements, you'll magically become a better engineer, giving your elements nice, clear semantics and cleanly orthogonal functionality. If people didn't do that with the existing HTML, why will custom elements change them? At least with divs, I can be reasonably sure that I'm looking at a block element. Custom elements, I got nuthin'. They're not transparent. They're a black box.

- Finally (and more importantly), we already solved the "div-soup" problem. It was called XHTML. Custom elements in encapsulated namespaces! Composable libraries of semantically-meaningful markup! How's that working out today? It's not.

TL;DR: a common presentation DTD is the strength of the web, not its weakness. Attempts to endow web applications with stronger composition/encapsulation should not be directed at the DOM layer but at the CSS and JS layers above and below it.

curveship··on “The working group should not agree to freeze whatever syntax Chrome ships”
Thank you! I thought I was the only one who felt this way. I truly do not understand why Google feels that application composition should happen at the presentation layer rather than the code layer, particularly when the presentation layer is as weakly typed as HTML. This was tried and failed in the very first round of server-side web frameworks back in the mid-late 90s. More recently, the complexity of Angular's transclusion logic should have clued them in that this is an unwieldy idea.

I agree that some kind of style scoping construct would be a good addition, and far simpler than ShadowDOM. Simple namespacing would be a good start. It would be a more elegant solution to the kludgy class prefixing that has become common (".my-component-foo", ".my-component-bar", etc.)

curveship··on Chromecast now open to developers with the Google Cast SDK
Netflix, HBO GO and Google Play Music. That's almost all I watch/listen to anyway, the two exceptions being Amazon Prime video and Spotify music, neither of which are supported yet on the Chromecast.

I bought when it still came with 3 months of Netflix credits, making the effective cost around $10. It's well worth that to me just to be able to control the music while I'm sitting at the dinner table. For video, it's not as clear a gain. It's nicer to browser Netflix and HBO on my phone than on the (clunky) "Smart TV" apps of my TV, but I rarely watch video alone, and browsing on the TV means everyone can discuss the options, while browsing on my phone means only I am seeing them.

curveship··on Args.js – Optional and Default parameters for JavaScript
The ES5 spec specifically allows (but doesn't require) implementations to create an Array.prototype.slice that accepts 'arguments':

> NOTE: The slice function is intentionally generic; it does not require that its this value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method. Whether the slice function can be applied successfully to a host object [ed: 'arguments' is one such] is implementation-dependent. [0]

'arguments' isn't just array-like. It's got some very weird behavior. For instance, if your function also has named parameters, and you set an index on the arguments object that corresponds with a parameter, then it changes the value of the local parameter as well.

0 - http://es5.github.io/#x15.4.4.10

curveship··on Args.js – Optional and Default parameters for JavaScript
Not cleanly. You have to pass the arguments in explicitly, and you also need to convert them to an array (the arguments object is not an array [only array-like] and it's not supposed to escape its function body). So you need to do:

var args = Args([ ... defs ... ], Array.prototype.slice.call(arguments));

curveship··on Args.js – Optional and Default parameters for JavaScript
'Args.caller.arguments' gives me the willies. That's a non-standardized extension combined with a deprecated one [0][1]. I'd have to be itching quite a lot to scratch it like this.

0 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

1 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

curveship··on Show HN: email - Send emails easily in Go
I'm a novice at Go, but I've written several email libraries in other languages. Two lessons from that experience that I thought I'd pass on:

- I've found it a more flexible architecture to separate the send functionality off from your email object itself and into its own service class. So instead of doing email.Send(), you do emailService.Send(email). The content of an email, and how to send that content, are separate responsibilities. Separating the two also allows for alternate implementations of the Send functionality: one (like here) that does a synchronous SMTP transfer, one that might drop the message into an internal queue so that client code doesn't need to wait for the (potentially fairly slow) SMTP transfer, one that simply appends to a local file for debugging, etc. (These are all examples from real apps.)

- Have you considered making required properties (to, from, subject) properties of the constructor? Doing so makes guaranteeing that they're set a compile-time check rather than a runtime check, which can make a library more robust and suss out bugs earlier.

curveship··on Gmail blows up e-mail marketing by caching all images on Google servers
Wait, do I understand you correctly that Google fetched the image even before you requested that images be displayed in the email? That seems like a boon to marketers, not a bane.
curveship··on Sheerwind
Right, drag scales with the square, but you're also going into that drag at a higher velocity, so power scales with the cube.

Or to break it out at more length, work is force times distance, right, and power is work over time. If it takes X amount of work to cover a distance at a given speed, it takes 4X to do it in half the time, since, as you point out, the drag (force) scales with the square of velocity. But you also accomplished that work in half the time, so the power required is 8 times the original. Make sense?

curveship··on Google Wallet Card
edit: rohansingh posted the FAQ entry before me
curveship··on Visual Studio 2013
This is uninformed FUD. You can "see" what's in VS's project files just fine. The file format is straightforward XML with fairly obvious semantics. Having worked with both VS's .csproj files and UNIX makefiles, .csproj is far far easier to understand and make changes to. I dive into it all the time. The most common case is when I've got WIP changes that conflict with another dev's checkin and I have to resolve them by hand.

Just because they supply a GUI doesn't mean it's the only way to change project settings. I'm not sure what led you to believe that.

curveship··on A spreadsheet in fewer than 30 lines of JavaScript, no library used
No, unfortunately. If a reference isn't found in your context object, it falls through to the ambient namespace. So say you run ...

    context = { foo: 1, bar: 2 };

    with (context) {
        foo = 2;
        bar = 3;
    }
That will probably do what you expect. But now say you run it where context is just ...

    context = { foo: 1 };

    with (context) {
        foo = 2;
        bar = 3;
    }
... you might think this would add a 'bar' property to your context object, but in fact it creates a global variable bar. Whoops!

In short, 'with' is pointy on both ends.

curveship··on Patent war goes nuclear: Microsoft, Apple-owned “Rockstar” sues Google
You realize that suit was from before the two companies merged.
curveship··on Facebook Perl source code from 2005
11, the forgotten prime.
curveship··on Why Meteor will kill Ruby on Rails
It concerns me that the selling points of Meteor are the same as the old selling points of ASP.Net.

- Both seek to make the divide between server and client "seamless", marshaling data back and forth so that you can "call" server code from the client and vice-versa.

- Both tout the ability to do all your development in a single language

- Both claim impressive gains for RAD

ASP.Net had some impressive demos for its time. But as we know, the warts emerged:

- as apps grew larger and more complicated, the claim of "seamless" integration started to break down. The background traffic increased until the latency became untenable. Now you had to diagnose problems in a system that had been designed to be "invisible," meaning it was hostile to exploration. Why will Meteor be different?

- The "one language" (VB.Net for ASP.Net, before C# became big) wasn't so hot a foundation. One word: Javascript.

- It was an island. The background data-marshaling framework meant that it didn't play well with other software unless that software had been explicitly written/adapted to work with ASP.Net. ASP.Net wasn't bad at first, but the vaster ecosystem of the web quickly distanced it. What's the upgrade path for a Meteor app? What if I want to use Angular with it?

curveship··on Healthcare.gov technology stack (infographic)
In techempower's web framework benchmarks[1], Java-base frameworks top most categories. One C++-based framework, CPoll, gets a few percentage points more in a few tests, but Java servlets are the highest performing across all tests. (As always with micro-benchmarks, take all this with a grain of salt, but at least it's some data.)

1 - http://www.techempower.com/benchmarks/#section=data-r6

curveship··on For modern development Javascript indeed is a shit language
> a function is not an object, not a datastructure that can carry data

Wait, what? That's the definition of a closure.

Most of this seems to boil down to the author saying "my programming brain was hardwired by Ruby, and I'm annoyed JavaScript is different." OK, I feel your frustration. As a reader, though, I'd far rather see a post from someone who has spent the time to become proficient in both ecosystems and can offer more considered pro/cons.

On one point, I'll agree: I wish Javascript had an easy way to say "referencing an undefined property of this object should throw an error."

curveship··on Technology Change: .Net to Scala
No, thank you for replying. I'm not sure I deserve it -- a little while after I posted, I realized that my C# in many cases missed the point, and in a couple was flat out wrong (BitSet). That led me down a path of researching more about Scala ... and after some neat reading, my "gotta get back to real work" timer dinged, and I never got back here to clarify. So thank you for the insightful and detailed reply. My post's main value was in eliciting yours :).
curveship··on Technology Change: .Net to Scala
The parent commenter was mostly asking about C# to Scala, so for comparison, here's you snippet in C# with LINQ. It's a little more verbose -- C# generics need to be a little more explicit -- but I think you'd agree it's pretty close. It's equally typesafe, but it is not immutable.

            var list = new List<int>() { 9, 7, 5, 10, 11 };
            list.Sum();
            list.OrderBy(i => i); // list.Sort() is in-place, so using functional OrderBy instead

            var stringList = new List<string>() { "a", "b", "c" };
            stringList.Sum(); // C# signals a typing error

            var bitSet = new HashSet<int>() { 1, 2, 3, 4 }; // not sure what a Scala BitSet is, but it looks a collection of ints?
            bitSet.Select(b => b + 1);
            bitSet.Select(b => b.ToString());

            // map wasn't defined in the snippet.  Assuming it's like a Dictionary<int, int>?
            var map = new Dictionary<int, int>() { { 1, 2 }, { 3, 4 } };
            map.ToDictionary(kv => kv.Key + 1, kv => kv.Value + 1);
            map.Select(kv => kv.Key);
curveship··on Wysiwtfftwomg
I respect your experience in publishing, but I think it misses my point. It may be that you work with different genres. My point was that for many authors, particularly authors on the high end of the fiction market, appearance does matter to them. These people love books, not just the words but the physical feel and appearance. They have opinions about the physical form their book takes. Are they wrong?

I've helped a few authors get set up with their own websites, and the same concerns translated. They cared very much about how the site appeared, and had intelligent opinions about why that was the case. They weren't web ingenues -- they'd been reading other author blogs for years. Why would their concern with the appearance of the written word change when that word was online?

I can't name names, but these authors were far from self-publishing. They had substantial contracts from major houses. Their books were all covered in the NYTRB. The publisher of course paid for one lay-out of the book, but it was not customary to cover three. That's why the author used his personal funds -- for the extra two lay-outs.

← PreviousPage 4 of 7Next →