News for hackers. Stuff that matters.
Re:The resource leak bug of our civilization by bonobo3000 on Monday December 01, 2014 @12:01AM (#8679580)
There is no mention of all the benefits that encapsulation gives us - to take the blogs argument to the extreme imagine writing your own web server, caching layer, load balancer, JSON/HTTP parser, frontend logic for every platform, and a hundred other layers of abstraction I may not even know about every time you want to write a blog.

There is a real tradeoff between programmer productivity and resource usage, because every library that isn't tailored for your exact use case (i.e every library) is an inefficiency. Given programmers wages vs. cost of CPU/RAM/storage, and the long term trends (technology makes one cost lower, the other cost higher!), it is economically insane to reject encapsulation.

I definitely see the appeal viewing programming as craft. In that case, its no coincidence that "reinventing wheels" is good advice to learn how to program. Its just not how to run a business.

Re:The resource leak bug of our civilization by userbinator on Monday December 01, 2014 @12:41AM (#8679695)
to take the blogs argument to the extreme imagine writing your own web server, caching layer, load balancer, JSON/HTTP parser, frontend logic for every platform, and a hundred other layers of abstraction I may not even know about every time you want to write a blog.

I see the argument as saying that all those layers are not really necessary. Take HTTP for example: it's a large complex protocol that requires plenty of code to handle correctly (e.g. the size of a request, and the various pieces inside it, are not specified and the parser has to read through the whole request sequentially to figure this out), and the majority of applications using it never need the full functionality. What if it was a simpler, easier-to-parse format that was as extensible?

One of the points I get from his argument is that encapsulation has encouraged us to build massively overcomplicated systems by piling layers upon layers with little understanding of how everything fits together, when we could instead be building much simpler and more efficient systems that could still be using abstraction but in a far more cautious manner.

Re:The resource leak bug of our civilization by jerf on Monday December 01, 2014 @08:51AM (#8680906)
"What if [HTTP] was a simpler, easier-to-parse format that was as extensible?"

Then it would become HTTP. It would take time but it would be inevitable.

HTTP didn't just happen. Using Fred Brooks' terminology, the real world is essentially complicated. We may pile accidental complexity on top of it at times, but the real world is essentially complicated.

While I agree that there is room for accidental complexity to occasionally be swept away and a new clean slate presented, I do not believe that a new protocol for HTTP could solve all the problems HTTP solves without being at least nearly as complex as HTTP. The set of problems that HTTP solves is a great deal larger than "request page -> get page". There's caching, proxies, security, encryption, policy enforcement, needs that schools have, needs that Facebook has... and that's still just the high-level table of contents of the table of contents of the world of HTTP. And if you think you can just ignore those cases and simplify... try it and you'll see how wrong you are.

Note I do think there is room for improvement in HTTP, and it probably isn't the direction of 2.0. But it's not like there's some sort of brilliantly simple protocol in there struggling to get out, buried under layers of cruft. It's a thorny hard problem and the result will be a thorny hard protocol. It often fails to work not because the protocol itself is broken but because people doing work in HTTP have truly failed to account for a fundamental use case properly, like caching or the use of proxies.

Also note that there's no guarantee that "simple protocol + time" will yield something any simpler than HTTP. Under HTTP is a fairly powerful idea, and there's a reason why so many Internet protocols look very similar to it. It would be easy to start with something "simpler" that turns out to grow much, much worse.

Re:The resource leak bug of our civilization by crpatino on Monday December 01, 2014 @02:18AM (#8679878)
I think you are partially right, but the situation (I'd rather not label it as a problem just yet) goes on many levels.

By example, Moore Law has allowed us to pack incredibly large amounts to transistors in reasonably affordable machines, and what we do is... virtualization, a.k.a. write software that (presumably) simulates being a (much slower and limited) hardware system so a third party can run other programs on top of it, for a fee.

That kind of makes economic sense (because customers have a big appetite for computing power... just as long as they do not have to keep those pesky sysadmins on the payroll), but from a purely technological point of view is craziness. Every component you add into your stack is a potential source of error, and you do not gain any extra features because you are simulating real hardware... so, why to do it in the first place?

I think the answer is: because nobody would buy all those transistors if we didn't do so.

Re:The resource leak bug of our civilization by talideon on Monday December 01, 2014 @12:39PM (#8682390)
> That kind of makes economic sense (because customers have a big appetite for computing power... just as long as they do not have to keep those pesky sysadmins on the payroll), but from a purely technological point of view is craziness.

...which is part of the reason why you're seeing people in Linuxland rediscover things (LXC) the BSD community (Jails) have known for ages.

Re:The resource leak bug of our civilization by marcosdumay on Monday December 01, 2014 @11:10AM (#8681757)
Another, possible answer is: Because transistors are really cheap, and energy only a bit expensive. But that wasting saves competent people time, what's a very expensive and limited resoure.

Why does everybody ignore the obvious explanation, that you'd get from the mouth of any participant, for a convoluted one that only fits the criterium of political correctness?

Re:The resource leak bug of our civilization by crpatino on Monday December 01, 2014 @12:38PM (#8682381)
I do not think anything you say here contradicts what I originally said. Yes, there are economic reasons why this makes sense, probably having to do with labor compensation.

Having said that, please excuse my ignorance on system administration but, how does running a virtual machine that pretends to be a Linux/x64 box... on top of a real Linux/x64 box saves anybody at least some time? As a software developer who drank the Java kool-aid back in the 90, at least the "write once, run everywhere" mantra did make some kind of sense in those terms, but this other example is genuinely beyond me.

To me it has more to do with a tech company being able to put together an A-class team to serve a large number of customers that would not stand to pay the salary of a single full-time B-level IT guy if their business model depended on it.

Re:The resource leak bug of our civilization by ethbro on Monday December 01, 2014 @01:32PM (#8682753)
"[...] how does running a virtual machine that pretends to be a Linux/x64 box... on top of a real Linux/x64 box saves anybody at least some time?"

To borrow someone else's words: https://blog.engineyard.com/2014/pets-vs-cattle

Or, in summary, it's a heck of a lot easier to instantiate a new instance of a machine from a snapshot than instantiate a new machine from a set of directions and some auto-config scripts.

Re:The resource leak bug of our civilization by crpatino on Wednesday December 03, 2014 @01:17PM (#8695366)
I agree standard images are much easier to set up than a hand configured system. That does not mean said image should run on top of an emulator.

I see some value in having a running system right now, instead of waiting for a long latency while the image is downloaded to real hardware... at least in some situations. However, is taking a permanent performance degradation of an order of magnitude worth that advantage?

Re:The resource leak bug of our civilization by jdmichal on Monday December 01, 2014 @11:53AM (#8682080)
http://xkcd.com/927/

Sure, you can create a simple transfer protocol that meets 80% of the use cases. Now add on the other 20% of the use cases, and you will end up with equatable complexity. And then, congratulations, you now have two competing standards.

Re:The resource leak bug of our civilization by mattdw on Monday December 01, 2014 @12:38AM (#8679687)
Perhaps, though, computing resources are priced artificially low due to externalities (e.g. third world wage inequality, environmental impact not paid for), and perhaps a sane long-term approach would find a different balance between programmer wages and physical tech components.
Re:The resource leak bug of our civilization by AnthonyMouse on Monday December 01, 2014 @02:50AM (#8679926)
Moore's law eats the difference between first world prices and third world prices for breakfast. Changing how the hardware is manufactured wouldn't materially affect the choices programmers make even if it doubled the hardware cost, and it probably wouldn't even do that.