1,097 karma · joined December 16, 2010
> 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.
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.
$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?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.
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.
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.
- 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.
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.)
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.
> 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.
var args = Args([ ... defs ... ], Array.prototype.slice.call(arguments));
0 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
1 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- 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.
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?
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.
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.
- 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?
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."
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);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.