Visual Guide to NoSQL Systems - <AUTHOR> http://blog.nahurst.com/visual-guide-to-nosql-systems <comment><USER2> Submitted <http://news.ycombinator.com/item?id=1191075> because a lot of people in this thread could use an explanation of what CAP actually means. :)

<comment><USER3> I think P should be an S ("split"), a lot of people seem to confuse partition in the context of "partitioning a database" with a network partition ("split- brain" scenario).

Perhaps a better example to use should be a distributed chat room.

</comment></comment><comment><USER3> This doesn't look entirely right to me.

Some comments:

Some RDBMS actual perform background asynchronous replication. If you're doing your reads from slaved replicas, you've got an "eventually consistent" system ("A{possibly, P}"). If you're only doing reads from the master node, you're no longer highly available. If you're "promoting" slaves in the case of a master failing, you're _AT_ best back to the case of eventual consistency (if the master comes back and the replication backlog is replayed correctly) or you might not be consistent at all. To echo others, let's call this "potential consistency".

Eventual consistency isn't something Amazon decided to make up, we've dealt with eventually consistent systems on a daily basis long before (DNS, usenet, some distributed file systems, etc...).

BigTable and co. are not "CP" and much more true to the "CA" definition than say MySQL replication or Postgres + Slony. They use protocols like Paxos with leases (BigTable) and Zab (used by ZooKeeper based systems). These are modified 3PC protocols: unlike 2PC protocols, they still guarantee fault tolerance ("A") even if the coordinator node fails; unlike pure 3PC protocols they offer certain guarantees of liveliness (e.g., through the use of leases) and even some degree of partition tolerance. Still, Google had to build Spanner on top of BigTable to provide partition tolerance / true multi- datacenter operation.

<comment><USER4> > If you're "promoting" slaves in the case of a master failing, you're again > back to the case of eventual consistency.

I don't think so. If you use asynchronous replication and the master fails directly after acknowledging a new request but before forwarding it to the slaves, this request may be totally lost. So you'd have no consistency at all (or at least not eventual consistency).

<comment><USER3> My bad. Editing the original comment. You're completely right, I forgot the case of master failing before all writes made to it are replicated.

</comment></comment></comment><comment><USER5> Given that it's been proven that there is a tradeoff between C, A, and P, this triangle is a good idea, one of those ideas that is obvious as soon as you see it (but not before).

It's fascinating how much disagreement there is in the comments, here and in the OP, about where to place the various systems. We know that a system can't occupy more than one edge, yet apparently it's non-trivial in several cases to decide which. I wonder why? Are people are defining terms differently? Are some of the systems themselves poorly specified?

<comment><USER4> It's unfortunate, but a lot of people participating in these discussions have no clue. They read that CouchDB claims to support "ACID" and then conclude that it fulfills the C in CAP. Now in reality, CouchDB isn't ACID compliant because it doesn't even support transactions. Additionally the C in ACID is not equivalent to the C in CAP.

Or take a look at this sentence from the article "Consistent, Available (CA) Systems have trouble with partitioning and typically deal with it with replication and sharding.". I assume that instead of "partitioning" he meant "partitions". Even then, partitions can not be dealt with by sharding in any sense. And mentioning "replication" is totally misplaced here because obviously all of these data stores use some kind of replication.

<comment><USER6> "Additionally the C in ACID is not equivalent to the C in CAP."

It would help if the people writing papers about CAP knew what the C in ACID meant before they wrote their papers.

Here is the relevant paragraph from the paper "Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services" Created: 10/08/2003 14:42 [http://lpd.epfl.ch/sgilbert/pubs/BrewersConjecture- SigAct.pd...](http://lpd.epfl.ch/sgilbert/pubs/BrewersConjecture-SigAct.pdf)

"Most web services today attempt to provide strongly consistent data. There has been significant research designing ACID2 databases, and most of the new frameworks for building distributed web services depend on these databases. Interactions with web services are expected to behave in a transactional manner: operations commit or fail in their entirety (atomic), committed transactions are visible to all future transactions (consistent), uncommitted transactions are isolated from each other (isolated), and once a transaction is committed it is permanent (durable). It is clearly important, for example, that billing information and commercial transaction records be handled with this type of strong consistency."

Notice it says "... committed transactions are visible to all future transactions (consistent), ..."

This is not correct because the data can be overwritten by a subsequent transaction.

In this version of the same paper [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20....](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.1495&rep=rep1&type=pdf) Created: 09/11/2007 01:17 the paragraph is the same except it says

"... transactions never observe or result in inconsistent data (consistent), ..."

If we go back to the people who seem to have coined 'ACID' in this paper "Principles of Transaction-Oriented Database Recovery" Theo Haerder and Adreas Reuter 1983. [http://www.minet.uni- jena.de/dbis/lehre/ws2005/dbs1/HaerderR...](http://www.minet.uni- jena.de/dbis/lehre/ws2005/dbs1/HaerderReuter83.pdf)

We see

"Consistency. A transaction reaching its normal end (EOT, end of transaction), thereby committing its results, preserves the consistency of the database. In other words, each successful transaction by definition commits only legal results."

and later they say

"... a database is consistent if and only if it contains the results of successful transactions. Such a state will hereafter be called 'transaction consistent' or 'logically consistent'. A transaction, in turn, must not see anything but effects of complete transactions (i.e., a consistent database in those parts that it uses), and will then, by definition, create a consistent update of the database."

that is for consistency the trasaction only has to have isolation and to commit consistent results, not 'observe' consistent data. This is because the database up to the point where the transaction starts has been created by a number of committed transactions against an originally empty database. By induction the data the transaction 'observes' must be consistent because the previous transactions have only committed consistent results.

I do not know what the C in CAP means.

<comment><USER4> > Notice it says "... committed transactions are visible to all future > transactions (consistent), ..." > This is not correct because the data can > be overwritten by a subsequent transaction.

It seems the paper is completely wrong here. AFAIK the C in ACID means that the integrity constraints in the database will always hold, i.e. no foreign key may reference a non-existing row. This would explain why they changed it in the later version of the paper.

Your reference to the Haerder, Reuter paper is interesting. It seems they kept the definition of consistency pretty vague.

<comment><USER6> Yes, that seems correct. The Wikipedia entry explained consistency best for me

<http://en.wikipedia.org/wiki/ACID#Consistency>

which is as you say with the keys for normal databases.

It made clear for me the distinction between application level consistency, the bits that have to be enforced by the program, and database level consistency, which can vary depending on the sophistication of the database, and is enforced by the database. I hadn't really thought about that before. I suppose you could have a database that was less clever and left most of the consistency to the application but still be ACID compliant so long as you defined the scope of the database consistency carefully.

</comment></comment></comment></comment></comment><comment><USER7> I'm not familiar with some of the solutions, but some of them got me wondering:

\- Why is Tokyo Cabinet on the AP line? It's not distributed in any way by itself. It's protected by a single write lock, so it's definitely consistent. If they mean Tokyo Tyrant which provides a simple way of replication (even master-master replication), then...

\- Why is MySQL _only_ on AC line? If you do master-master setup with it, it could be on the AP line too. (and probably any relational db that does replication / clustering)

<comment><USER8> Partition Tolerant really means that it doesn't rely on replication/sharding which means something like Cassandra that is truly distributed.

<comment><USER7> Then TC is definitely in the wrong place, even if they meant TT, because it's simply replicated.

MySQL Cluster on the other hand.... It does have a consistent view works on many nodes and in some configurations doesn't depend on the number of data nodes. It's properly distributed, not replicated. Doesn't seem to violate any of C A P. What am I missing in this example?

<comment><USER4> Mysql Cluster performs 2phase commit for every transaction, so availability is not guaranteed.

</comment></comment></comment></comment><comment><USER9> You can tune Riak to have whichever your qualities you need with its NRW values. N is the number of replicas of your data which can be specified per- bucket. R is the number of nodes that have to successfully respond to a read operation before it's considered to succeed overall, and W is the number of nodes that must respond to a write. R and W are specified with each read and write operation which is quite flexible.

If you want consistency you push R and W closer to N. If you need availability and partition tolerance then you lower R and W. You get to choose the mix of CAP that you need, for each bucket and each request.

I'm a Riak noob but this is my understanding of the system so far.

</comment><comment><USER10> Since Riak has tunable NRW parameters, it could be in any of these groups.

</comment><comment><USER11> Can anyone explain to me how redis supports partitioning? I'm still learning but so far I haven't found any support for it.

<comment><USER4> You mean something like "store all keys with an even hash value on server X, and all keys with an odd hash value on server Y"? You can do this yourself in your application: Just hash the value and then send the request to the corresponding server.

<comment><USER11> How is that any different than how you would do it with MySQL? If both products have the same solution to the same problem (handle it in your application) then why aren't they on the same edge?

<comment><USER4> Read the comment by "strlen". Partitioning and network partitions are two totally different things.

<comment><USER11> I did, but I still don't see how redis and MySQL differ in how they handle either type.

<comment><USER4> If you want to partition (shard) your data, then this will work roughly the same in MySQL and Redis. But this article is only about partition tolerance. Neither MySQL nor Redis are inherently distributed, so it's not possible to generally state that either is partition-tolerant or not. The article is misleading here. You could use a replication strategy that is partition- tolerant or you could use a strategy that's not partition-tolerant.

<comment><USER11> Thanks, that's what I thought. I was hoping I was wrong. :P

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> Oracle Coherence (formerly Tangosol) can be configured to be more or less anywhere you like on this triangle, including persisting everything to disk. Makes me sad that it's so expensive, and it chats a lot if you replicate fast- changing data across too many nodes, but man it sure is nice to have around.

</comment><comment><USER8> I could be wrong but it seems like MongoDB isn't really partition tolerant since it relies on replication or sharding (just like an RDMS). I think it is more of an AC (with a caveat on the C)

<comment><USER13> As you say, MongoDB has support for replica pairs that are partition tolerant, but part of this functionality is in client libs. For Ruby, you register both dual masters in a replica pair with the client library. This seems like a practical approach to me, or at least fairly easy to work with.

<comment><USER8> replica pairs are replication though, they aren't truly distributed. (they negotiate which one is master on launch)

</comment></comment></comment><comment><USER13> Nice! A well thought out reference. One thing: I wish that people would add RDF data stores to NoSQL discussions.

<comment><USER14> <http://quotes.burntelectrons.org/683> comes to mind. :)

</comment></comment><comment><USER15> Not entirely sure why Postgres, MySQL are in a NoSQL guide -- maybe the title should be different? Interesting chart to look at, though.

FWIW: yourtinnitus.com is down right now.

<comment><USER16> "Compare and Contrast." They're on the chart to show what your options are when you select CA from CAP, and to provide a basis for comparison with the other options.</comment></comment>


Atlassian adds free tiers for Jira and Confluence - <AUTHOR> https://www.computerworld.com/article/3435838/atlassian-adds-free-tiers-for-jira-and-confluence.html <comment><AUTHOR> [https://taiga.io/](https://taiga.io/) is an open source version for agile, not sure how good it is.

</comment><comment><USER2> I though the free tiers, at least for Jira, was downloading the trial version and updating the trial code every month

</comment><comment><USER3> Yeah and just jacked up the price by 70% for existing customers!

Terrible service, terrible pricing!</comment>


How to speed up the Android Emulator by up to 400% - <AUTHOR> http://blogs.nuxeo.com/dev/2011/10/speeding-up-the-android-emulator.html <comment><USER2> I think any experienced Android dev will tell you, the best solution is to buy a bunch of used Android devices, plug them in, and publish to the device directly for testing. Wasting any time with the emulator or this "virtual machine" isn't going to cut it in the end anyway.

The only time I fire up the emulators is to make sure my assets are scaling properly for the various screen sizes of devices I don't own yet.

<comment><USER3> As an Android dev, I have to say this is very true. Emulators either don't simulate or don't simulate well enough a lot of stuff that you really want to test, like picking up audio from a microphone, or getting your location from GPS. There are also a lot of device specific quirks that make code run differently on different devices, meaning if you really want to make sure your code runs everywhere you can't just get one phone, you need to get a few.

<comment><USER4> Also, on the emulators you don't usually have Sense UI, Motoblur or any other custom crap the manufacturers decide to put on the real phones. At one point I had 10 Android phones for development & testing just to make sure everything runs the same way on all phones

<comment><USER5> Ahhh, "write once, debug everywhere", where have I heard _that_ before?

(for me, that was a lesson learned in 1995 doing Macromedia "cross platform" Mac and Windows development)

</comment></comment></comment></comment><comment><USER6> I've been using Android-x86 in a VirtualBox for development for a long time, and totally recommend it if your app is pure Dalvik (i.e. no native ARM code). It's a night and day difference after using the emulator.

One pain point I have, though, is the need to always hit the VirtualBox host key when switching between Eclipse and VirtualBox, since there's no true integration. Sometimes I also get some weird effects with the mouse pointer not being able to move around the entire framebuffer. (Hmm, maybe a VirtualBox integration module for android-x86 would be a good weekend project...)

</comment><comment><USER7> This is another symptom of why Android development is such a pain. You have to jump through hoop after hoop after hoop just to get to the point where you can get actual work done. If a tool ends up wasting more time than it saves, it isn't a tool, it is an obstacle.

<comment><USER8> "Such a pain" as compared to what exactly? This will depend entirely on what it is that youre trying to do. In all my experience, Android is notoriously easy to develope on, being fully open-source the way it is. Try developing for iOS beyond a the basics and I think you'll come to agree.

I dont think its fair to call the emulator an obstacle, it just comes with limitations. After all, emulators are only designed to emulate, they can't replace areal device. A hammer is still a tool, its just not the appropriate tool when you're trying to assemble a clock.

Maybe its just time to upgrade your tools.

<comment><USER7> Please don't put words into my mouth or make assumptions about me. I am primarily an iOS dev. An app I worked on won an Apple Design Award and multiple other apps are in the Top 5 paid apps for their category in the iTunes store. To say that I develop for iOS at a basic level is laughable at best.

XCode isn't perfect, but I don't need google for blog posts or spend hours writing scripts or messing with configuration files in order to get it into a usable state.

Being open source has nothing to do with how easy a platform is to develop on. All that means is that the platform's source code is available.

<comment><USER8> My appologies, I didn't realize I was putting words in your mouth. I believe it was your post that called Android dev. a pain though, and unless I'm mistaken it was also you who referred to the emulator as an obstacle. Finally, I said all these things in relation to MY experience. As for my assumptions, i simply assumed you were an amatuer Android developer because, despite the fact that Android is known to be used on a wide selection of devices--all of which couldnt possibly be accomodated on one emulator in any effective way--you are still fixating on the fact that the emulator doesnt cater to your expert needs. I suppose I simply assumed that someone like yourself would have moved on from such a basic method of developement, since "to say that [you] develop for iOS at a basic level is laughable at best."

Just watch that your horse desn't fall off that precariously-high ledge and crush us lowly startup operators.

</comment></comment></comment></comment><comment><USER9> Someone should sell a usb dongle with an ARM chip on it that can run android using the emulator on your dev machine for display and input.

Debugging on a phone is not so bad, but it's not quite as nice as the iOS simulator experience.

<comment><USER10> That's exactly the purpose for which I bought the Nexus S, the Nexus One, and the HTC G1.

They are the Google Reference devices. Admittedly, it's perhaps not as lean as what you're referring to, but as a testing sandbox, I've tried a lot of different phones, but nothing has worked as well, in a general sense, as the reference models.

<comment><USER11> I ended up buying the popular phones (HTC Desire HD, Samsung Galaxy S2, etc.) just for testing, I'm on iOS myself.

But just working from (non reference) phones is dangerous too, it's so annoying to implement the volume controls with a BroadcastReceiver for the ACTION_MEDIA_BUTTON Intent (works great on Motorola's), but fails on HTC, and you should just override onKeyUp()... all (Android) phones behave differently, and not only in (screen) specs. Samsung Galaxy S (<2.2) is notorious in not following the Android specs, for example it shows the versionCode instead of versionName to the user [[http://developer.android.com/guide/publishing/versioning.htm...](http://developer.android.com/guide/publishing/versioning.html)] and if you do some (proxy) audio stream playback there is the [[http://google.com/search?q=PVMFMemoryBufferReadDataStreamImp...](http://google.com/search?q=PVMFMemoryBufferReadDataStreamImpl)] error with no real solutions...

The problem is, in the end, it should work on the popular devices, not the 'perfect' Android reference phones..

<comment><USER10> Thanks for the insight. I personally have yet to have any issues running on any devices, but most of what I'm doing is internal to our company and doesn't have a very large user base. Also, our code is pretty standalone from the OS itself.

Regardless, there's always going to be the issue of supporting multiple devices, but I have found that if I develop in the 'perfect' environment first, it speeds development time considerably. It's akin to web development against standards. I feel very sorry for the developers (if there are any left, this used to be accepted practice) who developed for Internet Explorer, and then had to cobble in "support" for other browsers. In much the same vain, it's easier to work against the best possible outcome, and then revisit your code for the edge cases.

I don't know, or have any numbers to know whether or not the Galaxy S2 is 'edge' or not, as I'm guessing it's quite popular. :-\ Sorry.

</comment></comment></comment></comment><comment><USER12> I've tried this. It's faster even than developing with a device -- once you get a good test/debug flow going it's awesome. Some big caveats though:

* No Google APIs. So no MapView.

* The various builds are quirky. I couldn't get networking to function in the "Stable" Froyo build. Meanwhile, the Gingerbread build used in the linked post reports the wrong SDK version (it claims Honeycomb but is actually Gingerbread). The deprecated Froyo build I tried didn't support Google Accounts. And so on.

Meanwhile, new builds are currently impossible due to the ongoing kernel.org outage (android-x86 has some hard submodule deps on git.android.kernel.org), so my attempts to go in and tweak the build were thwarted.

Still, very cool stuff. I think the iOS simulator is fantastic and I've been pining for something similar for Android. This doesn't quite meet my needs at the moment, but it would save me multiple hours per week if I could get it set up properly.

<comment><USER13> Ugh, no Google API support!? That is a pretty big deal.Wish I would have seen that earlier.

</comment></comment><comment><USER14> This is for me the main reason google finally needs to release the Honeycomb Source, so we can have Honeycomb running on x86.

<comment><USER15> Technically, it's out there. The Google TV SDK (which is Honeycomb) runs on x86. Running it requires a Linux distro with KVM though. I'd bet the ICS SDK will come with some form of x86-based images as well (since they've promised x86 support for all future Android releases)

</comment></comment><comment><USER16> based on the data in the article QEmu + Android ARM runs at approximately same speed as Nexus One phone which is a good thing, right? I dont want my development emulator to run twice as fast as actual hardware, do I.

The question is whether you can make the emulator run as fast as modern dual core android phones.

<comment><USER17> > I dont want my development emulator to run twice as fast as actual hardware

Why not? A lot of programmers develop native apps on high-performance workstations because it makes development faster.

Once in a while, you might hit a bug in which the execution time on a phone or in a slow emulator will cause problems. These are the exception to the rule. Use good programming practices especially with respect to multithreading and time-sensitive code and use sensible algorithms (don't under- or over- optimize), and these will be few and far between.

In general, you want fast builds, fast tests, and fast iteration. Anything that allows you to iterate faster is a good thing.

<comment><USER18> I think his point is that it's easy to ignore serious usability problems when you're using better hardware than your customers. For example, developers with big screens are more prone to create GUIs that do not work well on small screens. Similarly, some Xbox games are unplayable in 480i or 480p mode because nobody ever bothered to check whether the interface elements were readable at low resolutions.

<comment><USER19> > I think his point is that it's easy to ignore serious usability problems > when you're using better hardware than your customers.

Only if you don't test on real devices.

<comment><USER18> Testing is not a boolean. You won't notice if some item on a checklist took a couple of seconds during your daily device test, but a user will notice when that action is all he's doing, over and over.

<comment><USER19> You say "testing is not a boolean", then imply that testing "over and over" is? Developing on the emulator doesn't stop you from doing nice, lengthy real usage testing on the devices once you've got everything in decent shape.

<comment><USER18> That's true, and there's no reason most people can't use their gym memberships, but statistically they won't. Nobody's saying that you _must_ do all your testing on average hardware — just that they prefer it because it forces them to put proper time into it.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> It's not really an emulator if you're running the x86 port of Android virtualized on x86 hardware...

<comment><USER21> Sure, but to most developers the functionality of seeing their mobile application running on their desktop machine is "emulation". And they probably don't _need_ true emulation, they just need to test their application

<comment><USER20> That depends on whether or not there are any bugs or quirks in Android x86 that may or may not be present in Android for ARM and vice versa.

<comment><USER22> As an iOS developer that seems like a moot point. There are device bugs that cannot be replicate in the simulator, but everyone knows that. That's why you need devices.

But for general everyday development, I much prefer the simulator - I can look at the result of a code change in under 5 seconds with a simple keystroke, and not even have to pick up a device off my desk. It's empowering to be able to tweak your UIs and see the results in almost-real-time. I cannot do that if I'm forced to push the app to devices every single time.

Not to mention the debugger runs a hell of a lot faster on the host machine than any device - for the vast majority of bugs that _isn't_ based on device quirks, it makes them much quicker to isolate and resolve.

<comment><USER20> Sure my point is that this article is mistitled. They're not increasing the emulator speed 400%, they're switching to Android x86 and achieving speed ups. This may be a good thing to do but is entirely different from improving the speed of the emulator itself.

</comment></comment></comment></comment></comment><comment><USER23> Makes me wonder why the SDK doesn't use an x86 vm by default in the first place.

<comment><USER24> Wouldn't all the NDK programs at least have to be recompiled?

<comment><USER15> You'll effectively have* to post ICS; Intel is an officially supported platform now (and Google TV is currently Intel only, provided you want to be on that platform).

* Presuming you want your NDK app to run any Intel-based tablets/phones.

</comment></comment></comment><comment><USER25> What system takes 55 seconds to boot an Android Virtual Device?

I get to the home screen with everything loaded in about 18 seconds. I'm on a fairly new system with decent processor and memory to spare, but even on my old single processor 4GB laptop I get the emulator launched in about 35 seconds.

<comment><USER26> An core i5 with 8 GB of ram and a 7200 RPM 500 GB hard drive.

Actually, it is closer to 70 seconds.

Then the lag while attempting to use it is unbearable, it stutters, input is completely ignored, or it crashes randomly when we try to replicate that bug on an actual device we can't.

<comment><USER14> What kind of Android? 3.1? the 2.3 emulators are much better than the honeycomb ones.

<comment><USER27> Honeycomb emulator is slower because of the 1280x800 resolution. Google mentioned at I/O that it seems the emulator lags from the lack of hardware acceleration, and they said it would come by end of the year I think. I wonder if it's ready for 4.0. It should be.

<comment><USER28> Honeycomb emulator is also much slower because more parts of the UI use 3d acceleration which the emulator has to, well, emulate in SW

</comment></comment></comment></comment></comment><comment><USER29> This doesn't help much if you are using Google APIs in your Android application. There are no x86 builds available for Google APIs AFAIK.

</comment><comment><USER30> hmm why not set the avd ram size to 512?..even on my slow 32bit 4 gig ram 2-cpu core desktop ubuntu I do not get his slow figures..</comment>


Percentage of young U.S. children not receiving vaccines quadrupled since 2001 - <AUTHOR> https://www.washingtonpost.com/national/health-science/percentage-of-young-us-children-who-dont-receive-any-vaccines-has-quadrupled-since-2001/2018/10/11/4a9cca98-cd0d-11e8-920f-dd52e1ae4570_story.html <comment><USER2> This science has been so intensely disproven it shocks me that parents do this to children. How is this not considered child abuse?

<comment><USER3> It should be considered a form of child abuse.</comment></comment>


Uber will be a common carrier and I can't wait for the Uber API. - <AUTHOR> https://plus.google.com/116773172436846625909/posts/MUu883sjiE3

<comment><USER2> I can't wait to use Uber to carry several palates of mercury across the nation.</comment>


Antipatterns for sale - Discussion on Twitter API phishing and OAuth - <AUTHOR> http://simonwillison.net/2009/Jan/2/adactio/ <comment><USER2> It's great to see a company's API lead engaging in a discussion like this. I feel like he's missing the point of the critics, though. OAuth may not solve the phishing problem, but it has _demonstrable_ advantages over handing out your passwords:

\- finer grained levels of access

\- ability to block one app without blocking the others

\- ability for Twitter to block an app entirely, across the userbase, if it misbehaves</comment>


Heroku data loss on shared database - They are restoring from backups - <AUTHOR> https://status.heroku.com/incidents/377#update-1113

<comment><USER2> This is one of the worst parts of running database on EC2, IO can basically go to crap and cause drives to eat themselves. Databases don't like this much.

If you use a database on top of EC2, make sure it's replicated. This saves you a ton of headache. We (MongoHQ) spent all night getting single server databases back up and functional (though we didn't have to restore any from backups), while our replicated plans just hummed along throughout the outage.

</comment><comment><USER3> Talking about a bad week. I guess their availability percentages are gonna look quite bad (when and if they switch from the May ones).

<comment><AUTHOR> June _ahem 2011 cough_ uptime = 99.9%

</comment></comment><comment><AUTHOR> Not a good 24 hours to be a heroku user

</comment><comment><USER4> Ouch, Heroku seems to be going through a rough patch.

</comment><comment><USER5> It's somewhat heartening to see that this report doesn't talk about the control rods for their dyno manifolds creating unintended flux in the tachyon emitter.

It's not great, but at least it's easy to understand what went wrong without finding a marketing/english translator.

<comment><USER6> ha! Good point on their "naming". Who knows what those things actually do.</comment></comment>


Electric Car Runs 170 Miles On Single Charge--And It's 98 Years Old - <AUTHOR> http://www.allcarselectric.com/blog/1049744_thomas-edisons-1912-electric-car-gets-a-chance-to-shine

<comment><USER2> My electric bicycle also goes 25mph like that old electric car.

I can tell you it takes exponentially more power to go faster than that because of wind resistance, so that's why it could go that far at that slower speed. There's some nonsense in their numbers though, because my battery is state-of-the-art and it can "only" go for 2 hours, so that's 50 miles max.

Also, the batteries they used a century ago were very dangerous because of their liquid (acid) chemicals and had to be replaced constantly. The lifepo4 battery my bike uses is good for over 5 years and can survive being crushed without any explosion/fire.

<comment><USER3> Polynomially, not exponentially: <http://en.wikipedia.org/wiki/Drag_(physics)#Power>

<comment><USER4> People often (in a non-formal context) use exponential as meaning "more than linear". Any idea why this happens?

(don't mean to offend the poster here)

<comment><USER2> No offense taken. I am not familiar with the term "polynomially" but I assume it means it grows at a rate that is a more complex calculation than a simple exponential curve.

(useless to me: <http://en.wiktionary.org/wiki/polynomial> )

<comment><USER4> A polynomial is the sum of terms with powers in them.

For instance:

      y = 3*x
      y = x*x
      y = 3*x*x*x + 5*x - 7*x

Any polynomial you can think of will always, at some point, grow slower than an exponential curve. So it's not necessarily "more complex", but it's somewhere in between linear and exponential (informally speaking).

There's a whole theory behind linear/polynomial/exponential growth that is at the basis of algorithms in computing. If this interests you, you should read up on _complexity theory_ \- though learn the basics and stop when it gets too abstract :-)

</comment></comment></comment></comment></comment><comment><USER5> A few issues with this article:

Edison did not "come up" with the lightbulb - he improved upon the existing design.

Range isn't the only important thing in a car. Efficiency, speed, torque, and hundreds of other factors have to be taken into account. If you want range on a single charge, a camel might be your best bet.

It's an entertaining read, sure. But I wouldn't consider it hacker related news by any means.

</comment><comment><USER6> Lots of companies made electric cars at the turn of last century, Edison was not the only one nor the first.

Electric cars were marketed to women as they had far less maintenance required and were not as noisy or as dirty.

At the same time a century ago that electric cars were available, you could also buy a number of gasoline cars that got 40-60 miles per gallon.

<comment><USER7> I think that is the big oversight in a lot of green tech. Sure we could make items that have super impressive green specifications, but making them to achieve the same/similar performance to the not so green counterparts is the tricky part.

<comment><USER6> Yes, this is a good point. There do exist normal cars now that have good performance and get good mileage, around 60mpg. Most of these are not available in the US due to "safety regulations" unique to the US, proposed and written by oil company lobbyists, which effectively require that cars sold in the US be very heavy.

On the electric car side, the electricity is coming from things like burning coal and oil, or natural gas which we will run out of in a few years. The cars use batteries that contain highly toxic chemicals that are somewhat difficult to extract from the earth, and are done using strip mining. And the batteries lose their capacity after a few years of use and have to be replaced with a new set costing $30-$50,000 at least every five years. But bring up any of this and there is a lot of handwaving and claims that battery technology is getting better. Sure it's getting a tiny bit better, but it's not in the direction of batteries made of air or water or harmless inexpensive materials, and the charge capacity and lifespan are not so dramatically changing that it changes any of the basic dynamics of this technology.

In short, even the super green techs don't seem so green when you start really looking at the details.

In addition, we have a fetishization of things like electric cars, when the issue of efficient public transport, or getting rid of suburbs so people don't have to commute, are completely ignored even though the gains from this would be massively higher by several orders of magnitude. No, we must have electric cars for each person to drive alone by himself 30 miles to and fro work each morning. That is the only option.

I have preferred to live close enough to walk to work and have often managed this. I am often told this is an unrealistic expectation and I need to get real or get with the program. Including by people claiming to be environmentalists, many of whom drive giant gas guzzlers because of some perceived need.

Someone walking to work each day is getting infinite miles to the gallon and is going to live longer and have fewer health problems and costs as they age.

This is universally considered a non-solution compared to toxic batteries and recharging them using non-renewable resources.

</comment></comment></comment><comment><USER8> It's easy to make an electric car with a useful range, it's a centuries old technology. The hard part is making an electric car that is quickly re- chargeable, reliable, affordable, safe, and has good enough performance to be suitable for routine driving. You can manage a few of those, but all of them together is as yet an unsolved problem.

<comment><USER8> To be more specific: lead-acid batteries are dead simple technology. Reliable, provide tons of power, etc. However, they take forever to recharge (about 5x as long as they take to discharge) and they are _heavy_. You can build an EV by just attaching a motor to an axle and adding enough lead-acid batteries until the thing has a decent range, but you'll create a horrible vehicle by the standards of today's commuter automobiles.

And then you've got a vehicle that's mostly batteries and little else and has horrible acceleration and top speed. If you use more modern batteries (NiMH, LiIon) you improve the situation greatly but it's still a troublesome equation. Batteries are heavy, putting enough in a vehicle to give it decent range and performance is a struggle to avoid compromising vehicle comfort and safety. And then if you use advanced materials to make the vehicle lighter then you end up raising the cost significantly.

The good news is that technology is catching up. Hybrid technology is maturing and with it plug-in hybrids, fuel-cell vehicles, and entirely battery powered vehicles are becoming feasible, even if a bit on the expensive side. But the even better news is that as more money gets spent on R&D the technology will get better and cheaper, until it's a legitimate competitor to gasoline.

The bad news is that currently the concentration of hybrid / electric vehicle development is mis-targeted at small, commuter vehicles (making the small slice smaller, basically) when they really need to target bigger vehicles (long-haul freight, etc, although fortunately there are inroads being made there). The far worse news is that at best all of this is just step 1. Even if suddenly overnight every automobile was replaced with s shiny new electric vehicle all that would mean is that we'd transferred the problem to the base power generation infrastructure, which today is dominated by coal and oil in much of the world.

<comment><USER9> > target bigger vehicles (long-haul freight

Trains excel at freight.

In some cases, you want to use "gravity hybrids", where a train going down a hill sends power to a train going up the hill at the same time.

</comment></comment></comment><comment><USER10> What's all the fuss with electric cars? Isn't methane green and cheap enough?</comment>


Don't Take Your Vitamins - <AUTHOR> http://www.nytimes.com/2013/06/09/opinion/sunday/dont-take-your-vitamins.html?pagewanted=all <comment><USER2> First of all, the author sells a book about vitamins being bad, so he's probably not being objective about it.

I'm also biased in favor of taking daily supplements, because I take daily supplements and don't want to feel like a fool. That said, here's some analysis of his sources:

Most of the articles he (doesn't) link to are about harmful effects of beta- carotene and vitamin A, which coincidentally turn out to be mostly the same thing, just in a different form. Checking out the one article I found [1], they gave 30mg of beta-carotene (16K UI), and 25000 UI of retinyl palmitate, which converts to a total of 41000UI of vitamin-A, or 800% of the recommended daily dosage.

That dosage is _insanely_ high. I have a very good "mega multi" vitamin, and it only contains 200% of vitamin-A, because it is well known that vitamin A and vitamin D are one of the few vitamins that are actually harmful at large doses, and you can get poisoned/die from overdoses. It's the reason why you don't want to eat polar bear livers. To OD on vitamin A is quite easy, with effects being seen starting at daily 21000 UI doses. So no multivitamin pills actually contain that high of an amount of vitamin A. I find it strange that he's not talking about specific brands, probably because none of them contain the high amounts that are used in the articles he talks about.

It doesn't surprise me that taking 41000 UI has adverse effects, since it's known that this is already well over OD limits, and is especially risky for smokers, who have a lower OD limit.

All in all, the reasons he puts forward why mega doses are bad, are not relevant to consumer vitamin pills because the doses are not in the same ballpark. I would also like to see the amount of lives saved because of the pills - much like airbags and car belts, there might be people who die from using them especially, but there might be many more people saved as well, turning it into a net profit.

[1]: [http://www.ncbi.nlm.nih.gov/pubmed/15572756](http://www.ncbi.nlm.nih.gov/pubmed/15572756)

<comment><USER3> "First of all, the author sells a book about vitamins being bad, so he's probably not being objective about it."

That's a cynical glass-half empty perspective. The other way to look at it is that he might be an expert...

For example, assuming this is the same Paul Offit...you could claim that his book on the importance of vaccination makes him non objective, which would be a silly claim given that he's widely considered a leading expert in the field of vaccination.

Edit:

I'm going to get a little more personal because, for some reason, your opening line _really_ bothered me.

You're dismissing someone's opinion, in a field for which he holds an M.D., where he spent 25 years of his life building a vaccine against a disease which kills 600 000 children a year . You've been barely alive for that period of time and you've studied computer science....the guy's an expert. Doesn't make him right...but there's no reason to disrespect him by assigning him false motives.

<comment><USER2> I'm just adding to the body of facts here. There's an almost identical article by him in the Guardian linked below which contains a plug to his book. It feels a lot like a marketing campaign for his book which will be released next week.

Edit: what do any personal facts matter here? Could you please stay on-topic and not make this about me vs him, but more about the content of his article? On top of the logical fallacies[1][2] you're committing, I feel really creeped out that you're posting personal details about me.

[1]: [https://yourlogicalfallacyis.com/ad- hominem](https://yourlogicalfallacyis.com/ad-hominem)

[2]: [https://yourlogicalfallacyis.com/appeal-to- authority](https://yourlogicalfallacyis.com/appeal-to-authority)

<comment><USER3> That he's "probably not being objective" isn't a fact. You opened up with the ad-hominem, do you really not see that?

<comment><USER2> [https://en.wikipedia.org/wiki/Ad_hominem#Ad_hominem](https://en.wikipedia.org/wiki/Ad_hominem#Ad_hominem)

"Conflict of Interest: Where a source seeks to convince by a claim of authority or by personal observation, identification of conflicts of interest are not ad hominem – it is generally well accepted that an "authority" needs to be objective and impartial, and that an audience can only evaluate information from a source if they know about conflicts of interest that may affect the objectivity of the source. Identification of a conflict of interest is appropriate, and concealment of a conflict of interest is a problem."

<comment> brown9-2 To be fair though, the author does not hide any conflict of interest - it is stated in the footer - and the argument is made with evidence, not simply "I've been a doctor for 25 years, listen to me!".

This is coming dangerously close to dismissing all arguments from experts because their expertise has made them "biased" or presents a "conflict".

</comment></comment></comment></comment></comment></comment><comment><USER4> Paul Offit seems to be irrationally biased. In his longer guardian piece on the same topic he is extremely selective in his referencing of the scientific literature. This is his summary of the findings on one popular herbal treatment for depression:

"Depression is a serious illness; to treat it, scientists have developed medicines that alter brain chemicals such as serotonin. [...] Alternative medicine practitioners, however, have a better idea – a more natural, safer way to treat depression: St John's wort. Between November 1998 and January 2000, 11 academic medical centres randomly assigned 200 outpatients to receive St John's wort or a placebo, finding no difference in any measure of depression."

He omits the fact the same study also did NOT detect any effect of Sertraline/Zoloft (one of the very medicines he refers to so approvingly):

"Neither hypericum nor sertraline could be differentiated from placebo on the primary efficacy measures."

This points to a lack of statistical power in the study (which the authors of the study acknowledge).

He also omits to mention the many studies showing st john's wort to be as effective as SSRIs, with fewer side effects (eg see the cochrane summary here [http://summaries.cochrane.org/CD000448/st.-johns-wort-for- tr...](http://summaries.cochrane.org/CD000448/st.-johns-wort-for-treating- depression.)).

I don't trust this author.

<comment><USER5> The author has a pretty big conflict of interest that he doesn't disclose. He invented one of the major vaccines, regularly consults for pharmaceutical companies, etc. If an alternative to vaccines was found to be effective in preventing or treating diseases, he would have much to lose.

<comment><USER6> He would have very little to use. He helped create one vaccine. His royalties are not _that_ significant (according to him). He'd have just as much to gain from scientifically valid alternatives if they existed. He could do the same as he does now (treat patients, speak, and write) with any valid disease treatment.

</comment></comment></comment><comment><USER7> This article feels annoyingly incomplete or very poorly edited.

 _In December 1972, concerned that people were consuming larger and larger quantities of vitamins, the F.D.A. announced a plan to regulate vitamin supplements containing more than 150 percent of the recommended daily allowance. Vitamin makers would now have to prove that these "megavitamins" were safe before selling them. Not surprisingly, the vitamin industry saw this as a threat, and set out to destroy the bill. In the end, it did far more than that.

Industry executives recruited William Proxmire, a Democratic senator from Wisconsin, to introduce a bill preventing the F.D.A. from regulating megavitamins. On Aug. 14, 1974, the hearing began.

Speaking in support of F.D.A. regulation was Marsha Cohen, a lawyer with the Consumers Union. Setting eight cantaloupes in front of her, she said, "You would need to eat eight cantaloupes — a good source of vitamin C — to take in barely 1,000 milligrams of vitamin C. But just these two little pills, easy to swallow, contain the same amount." She warned that if the legislation passed, "one tablet would contain as much vitamin C as all of these cantaloupes, or even twice, thrice or 20 times that amount. And there would be no protective satiety level." Ms. Cohen was pointing out the industry's Achilles' heel: ingesting large quantities of vitamins is unnatural, the opposite of what manufacturers were promoting.

A little more than a month later, Mr. Proxmire's bill passed by a vote of 81 to 10. In 1976, it became law. Decades later, Peter Barton Hutt, chief counsel to the F.D.A., wrote that "it was the most humiliating defeat" in the agency's history._

Well, what more did the industry do than destroy the bill? After making such a strong clear case for regulation, how did the bill forbidding it pass with such an overwhelming majority? Were there payoffs, or was it something the vitamin makers said in testimony, or did they gin up a massive publicity campaign, or what? I'm quite frustrated at how little information this article contains.

On the plus side, I'm glad that I've stuck to getting my vitamins from food rather than supplements.

<comment><USER8> Why hasn't this issue been revisited in congress? Shouldn't everything be revisited very X years to ensure that the law is still relevant with current information?

<comment><USER9> The are a great many laws I would prefer the current Congress _not_ revisit.

<comment><USER8> I see your point and it's an unfortunate situation.

Shouldn't our representatives be the smartest and most upstanding citizens available? How do we make that a reality?

I found a few sites similar to these:

www.popvox.com

www.opencongress.org/bill/all

</comment></comment></comment></comment><comment><USER10> The article gives calm, sensible advice.

It misses the importance of (normal quantities of) Vitamin D. Many people live in places where they're unlikely to get correct amounts of Vitamin D, especially because of the (correct) caution about sun exposure and the move away from dairy fats.

For those people a Vitamin D supplement is a good idea.

Also, women wanting to become pregnant should strongly consider folate supplements.

And children probably need (correct child dose) multivitamins up until about 4 or 5 years old.

EDIT: Some sources.

UK National Health Service: ([http://www.nhs.uk/conditions/pregnancy-and- baby/pages/vitami...](http://www.nhs.uk/conditions/pregnancy-and- baby/pages/vitamins-for-children.aspx)) - notice how it stresses the importance of healthy diet, but also advises for Vitamin D supplements.

Scotland: Warning over Vitamin D levels ([http://www.bbc.co.uk/news/uk- scotland-11355810](http://www.bbc.co.uk/news/uk-scotland-11355810))

<comment><USER11> It's simple enough to get a test for deficiencies, then take the specific supplements you need, if you need them.

<comment><USER12> Is it simple like a urine pregnancy/drug screen test that gives quantitative recommendations?

Or is it more like arrange with your doctor to draw some blood, have it tested, then get an expert appraisal of the results which recommends a set of supplements?

Either way, it should probably be done periodically, to account for changes in diet and personal circumstances.

I wonder if this is something that personalised medicine could start with -- A machine which combines the blood analyser, expert system for determining requirements, and a set of dispensers that load the exact quantities into capsules while you wait. Ideally it'd work with something like a glucose test finger-prick sample, but I have no idea how much blood you need to run some of the more complex blood analyses.

<comment><USER11> >>Is it simple like a urine pregnancy/drug screen test that gives quantitative recommendations?

Not that I know of, you have to get blood drawn.

>>A machine which combines the blood analyser

Yea, that would help a lot.

</comment></comment></comment></comment><comment><USER13> All the referenced studies (none of them are behind a paywall):

The Beta-Carotene and Retinol Efficacy Trial: incidence of lung cancer and cardiovascular disease mortality during 6-year follow-up after stopping beta- carotene and retinol supplements.

[http://www.ncbi.nlm.nih.gov/pubmed/15572756](http://www.ncbi.nlm.nih.gov/pubmed/15572756)

Antioxidant supplements for prevention of gastrointestinal cancers: a systematic review and meta-analysis.

[http://www.ncbi.nlm.nih.gov/pubmed/15464182](http://www.ncbi.nlm.nih.gov/pubmed/15464182)

Meta-analysis: high-dosage vitamin E supplementation may increase all-cause mortality

[http://www.ncbi.nlm.nih.gov/pubmed/15537682](http://www.ncbi.nlm.nih.gov/pubmed/15537682)

Effects of long-term vitamin E supplementation on cardiovascular events and cancer: a randomized controlled trial.

[http://www.ncbi.nlm.nih.gov/pubmed/15769967](http://www.ncbi.nlm.nih.gov/pubmed/15769967)

Multivitamin use and risk of prostate cancer in the National Institutes of Health-AARP Diet and Health Study.

[http://www.ncbi.nlm.nih.gov/pubmed/17505071](http://www.ncbi.nlm.nih.gov/pubmed/17505071)

Antioxidant supplements for prevention of mortality in healthy participants and patients with various diseases.

[http://www.ncbi.nlm.nih.gov/pubmed/18425980](http://www.ncbi.nlm.nih.gov/pubmed/18425980)

Dietary supplements and mortality rate in older women: the Iowa Women's Health Study [http://www.ncbi.nlm.nih.gov/pubmed/21987192](http://www.ncbi.nlm.nih.gov/pubmed/21987192)

Effect of Hypericum perforatum (St John's Wort) in Major Depressive Disorder A Randomized Controlled Trial [http://jama.jamanetwork.com/article.aspx?articleid=194814](http://jama.jamanetwork.com/article.aspx?articleid=194814)

</comment><comment><USER14> Interestingly, the opposite is true for vitamin D. For years, study after study shows that most people are severely deficient in vitamin D and that supplementation helps. Yet, officially recommended doses are way below the levels that scientists recommend.

<comment><USER2> And importantly, a lot of countries do have laws against mega doses, causing pills with more than 150% of RDA to be illegal, making it really hard to get a decent supplementation, especially during winter.

<comment><USER15> In a case like that, what prevents somebody from taking more than one pill at the same time, if one pill alone is insufficient?

<comment><USER2> Nothing, but it becomes quite expensive.

</comment></comment></comment></comment><comment><USER16> Ok, what looked liked a passable article shows some new things:

"The likely explanation is that free radicals aren't as evil as advertised. (In fact, people need them to kill bacteria and eliminate new cancer cells.) And when people take large doses of antioxidants in the form of supplemental vitamins, the balance between free radical production and destruction might tip too much in one direction, causing an unnatural state where the immune system is less able to kill harmful invaders. Researchers call this the antioxidant paradox.""

I wouldn't be worried at 150% vitamin dosages, worry if it's 1000% of the daily dosage (and some people take huge doses of Vitamin C with no major side effects. But if you do that with Vitamin A, yes, this could be very troublesome)

</comment><comment><USER17> Not taking one side or the other, it's important to note that when it comes to nutrition, we know very little. Or rather, we know many disparate facts but very little about how they interact. The reason is that there are very few good "unit tests" for human physiology, and we're not even sure about what _they_ really mean (for example, current research suggests that what we thought we knew about the significance of blood cholesterol levels might be wrong). And if all we have are "integration tests" (like mortality rates), the number of variables affecting them becomes so huge, that in order to get truly statistically significant results we would need to conduct randomized trials on very big populations. Add the difficulty of conducting a double-blind randomized nutrition trial even on a small population, and you get results that have little actual "results" (although a randomized double-blind trial with vitamin pills is possible).

When John Ioannidis proved that most published medical research is false[1], he singled out genetics and nutrition[2] as the two most problematic fields, where very, very few findings are true. The fact is that we know alarmingly little about what constitutes a healthy diet. Let me clarify: we know hardly anything about significant difference in total health one relatively "normal" diet has over another. Ioannidis's advice: completely ignore any nutritional "scientific" claims because they are anything but. Any supposed claims for "healthy" eating are no more than wishful thinking, pseudoscience and good-old snake-oil salesmanship.

What is interesting from a scientific point of view, and this is one subject we know a lot more about than actual nutrition, is _why_ people who are otherwise scientific minded skeptics are superstitious when it comes to nutrition (if you believe that eating more green vegetable or less, consuming more vitamin C or less, more saturated fat or less is actually better for you, then you are superstitious, unless you are knowingly placing a scientifically unfounded bet on one diet over another).

Obviously, the well-known psychology of magical thinking applies to everyone, and even skeptics are not immune to it (Charles Darwin, if one anecdote about him is correct, quite amazingly identified the effect magical thinking had on his own research, and took measures to counteract it). But why is food such a focus of superstition among skeptics? It probably has to do with their political leaning.

Jonathan Haidt hypothesizes that the value of "purity" is ingrained in human existence, and every society seeks to fill it with particular meaning[3]. Because liberals wholly reject giving "purity" sexual or racial content, they choose to purify themselves through health, and in particular, food. It seems that people have such a strong desire to feel pure, that those that cannot achieve it through religious means, try to achieve it with food. And because food is, after all, subject to scientific study (though mostly bogus), it gives that little something to grab onto and construct magical thinking around.

Consider this if you don't believe me: pick one scientific nutritional finding that you particularly like, and have chosen to adhere to. Let's suppose that the finding is true as published. Now, look at what statistical effect-size that particular research claims your chosen diet has. For example, by how much does it prolong life? 10%? 5%? 3%? Or by how much does it reduce the risk of getting a particular form of cancer? Does it take it from 1/100 to 1/10000? Or, perhaps, from 1/1000 to 1/1200?

Now think if in other areas of life, such effect-sizes would change your behavior as much.

Theres definitely a lot of psychology when it comes to people's diets. Science? Not so much.

[1] [http://www.plosmedicine.org/article/info:doi/10.1371/journal...](http://www.plosmedicine.org/article/info:doi/10.1371/journal.pmed.0020124)

[2] [http://www.theatlantic.com/magazine/archive/2010/11/lies- dam...](http://www.theatlantic.com/magazine/archive/2010/11/lies-damned-lies- and-medical-science/308269/)

[3] [http://www.ted.com/talks/jonathan_haidt_on_the_moral_mind.ht...](http://www.ted.com/talks/jonathan_haidt_on_the_moral_mind.html)

<comment><USER18> What counts as scientific evidence has fairly high standard. What we know may not reach that level of rigor, but isn't it still a bit more than 'very little'.

If, say, it's 80% (rather than 95%) likely that eating more than 4 servings of fruits and vegetables per day helps reduce your chance of having cardiovascular diseases by 35%, and you don't mind the food group anyway, why shouldn't you try?

In any case, there are very few (or no?) studies that say eating a lot of vegetables and fruits (within reason) will cause you health problems.

A principle of entrepreneurship is that whenever a bet yields either positive or neutral results, you should do it. Why shouldn't this principle be applied to such an important area as our health and wellness?

<comment><USER17> There's actually evidence to support that eating fruit is quite detrimental to your health, as modern fruit contain so much sugar. What are you eating fruits for? Water? Vitamins you can get from meat anyway? A lot of people say fruits are bad for you.

Now, I'm not saying you should or shouldn't do one thing or another when it comes to nutrition. All I'm saying is you should be aware that it's little more than superstition and magical thinking. It's very hard to resist magical thinking, but it's often good to know when you're doing it. Sometimes doing things with your eyes open is better than doing them with your eyes shut. Although in this case I'm not 100% sure about that: there's clearly a lot of (positive) placebo effect at the cause of many anecdotal reports about nutrition, and knowing that it's mostly superstition may negate it.

<comment><USER19> OK, this is a pretty ridiculous claim. Other people have already pointed out, "There's actually evidence" requires some evidence. You have none.

Why would modern fruit contain "more sugar"? More sugar than when? How much more sugar? Who miraculously put the extra sugar in the fruit? The fact is, even if we selectively bred fruit to be sweeter, we're not going to get it much sweeter than it already was. Nobody's going around injecting apples with extra fructose with a syringe.

Getting all your vitamins from meat is ridiculously inefficient; you can do it, but you're creating a tremendous ecological burden. All of that meat has to be raised, fed, watered, and pastured. Fruits and vegetables cut out the middle man; they use much less water and land to get the same nutrients into your body.

It's fine to say that 'magical thinking' is bad, but you're not doing any better. If anything you're ignoring facts based science in favour of 'what some people say'.

<comment><USER20> > Why would modern fruit contain "more sugar"? More sugar than when? How much > more sugar? Who miraculously put the extra sugar in the fruit?

Selective breeding, of course. Modern vegetables are, in general, less bitter than in earlier times. Fruits are often sweeter---and easier to farm industrially and bring to market. Also, we live off less different kinds of fruit and vegetables than in earlier times. There used to be hundreds of different apples in widespread use for examples.

Not saying that it's necessarily bad. Just that pron's hypothetical argument isn't actually all that hypothetical.

<comment><USER21> > Modern vegetables are, in general, less bitter than in earlier times.

That does not necessarily mean more sugar - it just means less bitter. (These axes are independent).

Selective breeding puts pressure on easy-to-grow-and-sell (shelf life, size, shape, resistance to pests) and only afterwards on flavor.

And another important (and often forgotten) point about modern frutis and vegetables is that they are mostly picked when green (when not all sugar has ripened yet), and then chemically ripened in a process that does not yield as much sugar as natural ripening.

I would like a reference before I believe that today's fruits and vegetable contain more sugar than those of 50 years ago.

<comment><USER20> Oh, sure, wasn't meant as a reference, but just some evidence that it's not totally implausible.

<comment><USER21> This is very loose wording. "Evidence" this is not. It is an argument supporting an idea, which is still therefore hypothetical.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> I really would like to have links to the studies mentioned, the most interesting one I could find is:

[http://jama.jamanetwork.com/article.aspx?articleid=205797](http://jama.jamanetwork.com/article.aspx?articleid=205797) — 2007, Cited by 1214

      Treatment with beta carotene, vitamin A, and vitamin E may increase mortality.
      The potential roles of vitamin C and selenium on mortality need further study

Who would have guessed eating too much of something could be bad for your health</sarcasm>

</comment><comment><USER23> Somebody should tell Kurzweil about this. "Kurzweil does not believe in half measures. He takes 180 to 210 vitamin and mineral supplements a day, so many that he doesn't have time to organize them all himself." [http://www.wired.com/medtech/drugs/magazine/16-04/ff_kurzwei...](http://www.wired.com/medtech/drugs/magazine/16-04/ff_kurzweil?currentPage=all)

</comment><comment><USER24> About these supplementary pills I think the advice of Taleb is very good:

\- When there is a very strong reason to medicate or do surgery, do it immediately.

\- When it is just for convenience, don't do it. The long term risks are unknown.

His diet advice is "don't ingerate anything that has been invented in the last 50 or 100 years", so wine: yes, Coke: no, vitamin pills: no, etc.

However in case of a cancer with a very bad diagnostic, he would try even the newest unverified cure.

I think this advice should be heard in the US where so many people seem to fill their stomack with aliments that did not exist 50 years ago (processed food, chocolate bars, soda, pills being the worst).

(I am rephrasing)

<comment><USER25> Can you link to where he says that? I'd like to read more, it sounds interesting.

Also, coke (both the drug and the soft drink) is well over 50 years old, but I understand the point you're getting at with being wary of consuming substances that are not well understood.

On a side note, some people who argue in favour of legalising cannabis are also argue in favour of legalising cocaine, as they reckon keeping it illegal does more damage than legalising it (Mexican cartels). In places like Bolivia, people chew coca leaves as a natural stimulant (cocaine comes from processed coca leaves). I'm not sure where I stand on legalising cocaine though, I can see two sides to the argument.

<comment><USER24> I read this in his Antifragile book.

<comment><USER25> Thanks, I've been thinking about buying it, this gives me the excuse I need :-)

</comment></comment></comment></comment><comment><USER26> Ahh, yes! The further we go from nature, the more problems we create for ourselves. The Taoists are right.

<comment><USER27> A taoist would say that everything is "natural" , including man-made vitamins, cars and chemical plastics.

<comment><USER26> Ancient Taoism, ie. the real deal, emphasized living as simplistically as possible and eschewed such novelties. It later became politicized as a court tradition around the emperors of Ancient China, and underwent significant modification. It is this latter period from which much of the surviving literature derives - a common historical trajectory to most ancient philosophies.

</comment></comment></comment><comment><USER28> The Guardian recently ran an article on the same subject:

[http://www.guardian.co.uk/lifeandstyle/2013/jun/07/vitamins-...](http://www.guardian.co.uk/lifeandstyle/2013/jun/07/vitamins- stop-taking-the-pills)

Its longer than the NYT article and contains some interesting links to clinical trial results.

<comment><USER29> It's written by the same author!

</comment></comment><comment><USER30> It is nearly impossible to know definitively what to eat, but it seems like a reasonable approach is to: eat lots of organic vegetables, some organic fruit, limit meat intake, and perhaps take some vitamins.

It drives my wife crazy (because she is pro-vitamins) when I take specific vitamins just 2 or 3 times a week. I have a weekly pill dispenser and I randomly put in 2 or 3 each of vitamins E/D/C, and Coq10, calcium, magnesium, etc.

My thinking is that we evolved as hunter gatherers and we would not get the same nutrition every day, so why not mix it up a bit in modern times? I am fairly sure that I get what I need from my diet (I am a card-carrying food junkie; my food web site: [http://cookingspace.com](http://cookingspace.com)) but taking small random amounts of vitamins during the week maybe helps. Who knows. I think that it is as important how you eat (i.e., eat very slowly, appreciate the food) as what you eat.

<comment><USER6> > eat lots of organic vegetables, some organic fruit

"Organic" is an unscientific ideological term. It has absolutely nothing to do with the nutritional quality of food. Study after study has shown "organic" food to be nutritionally equivalent to scientifically farmed food, including quantities of pesticides found on them.

(Yes, citation needed but I don't have refs in front of me right now)

<comment><USER30> You should talk with my pet Parrot. If we give him non-organic food, he doesn't much like it. My wife and I agree: organic tastes better. I can not scientifically vouch for it being better for you, but I am very certain that it tastes better.

My Dad is a member of the National Academy of Science and he used to roll out the "no proof" argument. My argument, which he eventually accepted and he now eats organic:

1\. it really does taste better

2\. what can it hurt to eat locally grown organic food? Is it worth a small amount of extra money, just in case it is better to eat food not grown with petroleum fertilizer?

Anyway, make up your own mind.

</comment></comment></comment><comment><USER31> I used to get really bad headaches like every other day.

One extra busy and strange week I forgot to take my multivitamin a few days in a row.

And it dawned on me my headaches went away.

Now I've stopped taking my multivitamin for a year and I've only had headaches I can count on one hand.

Tried another brand multivitamin and same headache problem happened so I'm done with that.

<comment><USER20> I wonder whether it was a specific component, and if yes, which.

<comment><USER31> That was my thinking too but there are so many things in them, doing it scientifically would be quite a feat and not sure how to go about it.

For all I know it might even be the inert compound binding it.

<comment><USER2> Might be the Vitamin B, anecdotally I've heard some people getting headaches from high doses of it.

<comment><USER32> It is one of the known possible side-effects of vitamin B3, but I have no idea how common or at what doses.

</comment></comment></comment></comment></comment><comment><USER33> > Please log in.

Can we do something about paywalled links here, please? This is the 5th one on the front page today.

<comment><AUTHOR> Perhaps someone can help you with that, but I'm not logged in, have never logged in, don't intend to register, and don't get the "Please log in" message.

I wonder what's different between your setup and mine.

<comment><USER33> _In order to access our Web site, your Web browser must accept cookies from NYTimes.com._

In that case, I have no interest in any of their articles.

<comment><USER34> Why are you afraid of cookies? The cookie monster, maybe. But cookies, no!

I use Firefox. In Firefox it's easy to "clear history when Firefox closes". That includes cookies.

So all you do to be as close to anonymous as possible is: 1) set FF to clear cookies on close (this is my default) 2) close FF 3) open FF, go to nytimes.com 4) when done reading, close FF

That's it. All my cookies get deleted before and after I use the web site. I fail to see _any_ harm in allowing the Times to set as many cookies as they want to for the duration of my browsing session with them. I even allow third party cookies. I don't care, they're all gone as soon as I exit my browser. BTW to combat sleazier sites I also use the Better Privacy addon. That can easily be set to clear out Flash cookies every time the browser exits.

One other thing. Use NoScript. Don't whitelist NY Times. Then you will _never_ be bothered in the slightest by their paywall; it relies on JS.

<comment><USER35> A private browsing window is another solution to this problem. I use it frequently! :)

</comment></comment></comment></comment></comment><comment><USER8> So... should I take a daily multivitamin or not?

<comment><USER36> No, you should have a balanced diet instead.

<comment><USER8> Hypothetically, let's assume that I don't eat vegetables but once a week. Should I take a multivitamin daily?

<comment><USER36> Why do you eat so little vegetables?

</comment></comment></comment></comment><comment><USER37> For most people who eat correctly, taking Vitamins is more of a placebo than anything. I tried to start the discussion about it in scientific subreddits many times and got shut down. Vitamins are used way more than homeopathy and do works in many cases so it's hard for people to understand that it doesn't do anything, and might actually harm you if you take too much, if you're eating normally already (well in most cases).

</comment><comment><USER38> For what it's worth, regarding the multivitamin and prostate cancer study: [http://www.rayandterry.com/blog/prostate-cancer-and- vitamin-...](http://www.rayandterry.com/blog/prostate-cancer-and-vitamin-use/)

</comment><comment><USER39> This is a bit disingenuous.

Top title: 'Don't Take Your Vitamins'

Base : 'As a result, consumers don't know that taking __megavitamins__ [...]'

♫♫ One of these things is not like the others. ♫♫

If the advice is just don't mega-dose the things, well - duh. The things even have warnings to that effect:

[http://i.imgur.com/5bS4gl2.jpg](http://i.imgur.com/5bS4gl2.jpg)

Right there on the tube - 'do not exceed the recommended daily dose.'

I take that advice to be fairly uncontroversial. Lots of things are going to kill you if you take too much of them. Just don't be a bit silly and expose your body to really high levels of things that it'd never get anywhere near in nature without doing the research first.

I suspect that people don't think it's particularly risky because it's so concentrated - if they had to sit down and eat their way through packets of much less concentrated pills maybe they'd start to worry about loading their systems with so much stuff. :/ -shrug-

</comment><comment><USER40> oh New York Times, always a fine reading in the Sunday morning, in fact very interesting. Just to show what lobbyist and the private sector are willing to do, in order to stay in business.

</comment><comment><USER41> So should I take vitamins or not?

</comment><comment><USER42> The vitamins that most take provides fractional amounts of the RDA -- at most 100% (e.g. Centrum, etc.) -- and is truly intended to be an offset of an imperfect diet. Using the case of mega-doses, especially against compromised peoples, as the demonstration of the dangers of normal supplementation is dishonest, just as it wouldn't be reasonable to discourage water consumption through the example of someone consuming tens of gallons a day.

I am not speaking of this specific author, a very respected researcher, however there are many who essentially make bank on the anti-vitamin bandwagon (never underestimate the motivation of getting broadly quoted and referenced, which is a likely outcome when you "prove" counter-intuitive conclusions), and the techniques are often highly dubious.

One of the most common tactics to discourage vitamin use is to compare the mortality of general vitamin supplementation users and those who don't, ignoring the _immense_ self-selection bias that comes into play. Namely that people in compromised health or at risk often flock to vitamins -- wrongly -- as a snake-oil fix for ailments, thus providing plenty of data in the "mortality" side.

I take the odd multi-vitamin, primarily on days where I know I've eaten terribly. I do supplement Omega 3s daily.

<comment><USER43> I used to take daily Centrum. Had a few years where my liver enzymes (AST/ALT) were elevated. Doctor asked if i took a multivitamin to which I told her I did. She said stop taking it. That was about 8 years ago and I haven't had an elevated liver enzyme test since then. She said some people have a really hard time processing all those vitamins in their system and it hurts their liver.

Now I just take Vitamin D (tested as mildly deficient) and Omega 3 from krill.

<comment><USER42> Makes sense, especially given the fluorescent yellow urine that often comes shortly after taking a vitamin (the liver/kidneys working hard to eliminate something, which is telling enough). It seems like vitamins would be improved to come in smaller, multiple-doses (though that becomes less convenient) -- the one I occasionally take is dosed as two pills through the day to hit the 100% mark, and it has removed the nuclear pee response -- or slowed delay, etc.

<comment><USER32> The fluorescent yellow is usually specifically due to high doses of vitamin B2, and is because vitamin B2 is orange. It's not by itself an indication of a problem.

Some of the B-vitamins can have nasty side effects in huge doses, but those doses are _far_ above the RDA for most people.

EDIT: Note that "huge doses" are still within range of quite a few "megadosed" vitamin supplements. I've experienced annoying side-effects from vitamin B's as a lot of pre-exercise products have high doses as it is believed to have an effect on energy levels (I don't know if the science stacks up or not), but "neon pee" occurs with very low doses of B2 and is by no means an indicator you'll run into any of the other side effects.

</comment></comment></comment></comment><comment><USER44> Read Ben Goldacre's Bad Pharma. [http://www.amazon.co.uk/Bad-Pharma-companies- mislead-patient...](http://www.amazon.co.uk/Bad-Pharma-companies-mislead- patients/dp/0007350740)</comment>


Fair Job Scheduler on Mesos for Spark/Batch Workloads - <AUTHOR> https://github.com/twosigma/Cook <comment><USER2> Hey HNers! One of the authors here, happy to answer any questions.

<comment><USER3> Not a Cook specific question, but do you use Spark + HDFS much together for your usage of Spark on Mesos?</comment></comment>


Ask HN- Could any one person have all of these skills? - <AUTHOR>

I own a popular discussion forum that has grown over the past few years into one of the top resource sites for it's niche. I am looking to transition the site away from being just a discussion forum and more toward a full blown site, similar to one that a trade publication might have, with news, articles etc... I already have the base of traffic and now I want to serve them additional content and add new features.
I need to have a site built around the forum, or modified, to enable a quality interface, easy editing options, simple advertising interface, email marketing etc...
There is also a current database with the posts and the users and if there is a larger infrastructure created, then that database would need to be accessed by several new parts of the site in different manners.
I think I could afford to hire maybe one full time programmer at this time, while I handle all of the marketing, content creation, community management etc...
Is it possible to find someone who is a jack of all trades that can build out the infrastructure, figure out how the databases need to run and interface with different parts of the site, integrate them with an email marketing solution like Aweber, etc...?
The features that I am looking for for the website to have all include things that currently exist, from q and a to article display to commenting and rating, profiles etc... nothing too revolutionary or proprietary.
I have no technical skills whatsoever, I don't eve know basic html, and I need to know if this is the type of thing that could be reasonably expected of one person, or am I being too greedy in what I expect?
Assuming said programmer exists, is that a very rare skill set, or could any normal programmer working full time bang something like this out?
Also, what would an appropriate salary range be for a programmer like this if I offered no equity?
Would that range change substantially if I offered equity? Would my chances of landing someone good change?(The site is already profitable, although the profit would be eaten up by a programmers salary)
Finally, are there people I could hire to help me figure out the technical requirements I will have and to help me hire someone appropriate, since I am in no position to judge anyone's technical abilities?
Thanks a bunch <comment><USER2> sounds like you need something pretty basic, pretty much every freelancer would be able to do all of that.

Cost wise it can really differ, from $2-3K for some freelancer code monkey, 5-10K for someone who is a little bit more advanced(HN quality), 60K-100K/yr if you hire someone, And a few million if you hire some big design house.

Having dealt with freelancers, I'd avoid those guys like the plague. Unless you can sit on them to get them coding, it's a waste of time and money.

Personally I'd go with the HN solution, surely you'll find someone here who can help you, and you know you are getting someone competent.

</comment><comment><USER3> Short answer, yes.

Slightly longer answer, it depends.

What you're looking for can basically be done by any "good" programmer. Most are actually jack-of-all-trades kind of guys. The things they don't know, they learn. The things they can't learn well enough, they pay someone else to do it.

If you can hire someone, then that's great. If not, I would look into freelancers.

Freelancers are not born equal. Use your gut instinct, and don't bother trying to judge him/her on the technical skills.

I used to do this for a living(programming and consulting), and I'd always explain to my customers that I am not a server administrator, for example, but I'd do it to help them out if they can't find anybody else. And I think of this as just being helpful. I try to make sure that they understand the risks. Most people will react favourably to this.

I'll keep this short. If you'd like any more help, I'll be happy to answer a fellow HN'er questions via email.

</comment><comment><AUTHOR> Thanks. I have added an email address, but have not been contacted by anyone. What would an appropriate methed be to try and find an hn type person who could help with a broad range of things? Should I just post something to the effect of what I am looking for?

</comment><comment><USER4> You should post some contact info and Im sure you'll get some good response.</comment>


Forgotten Soviet Moon Rover Beams Light Back to Earth - <AUTHOR> http://spectrum.ieee.org/aerospace/robotic-exploration/forgotten-soviet-moon-rover-beams-light-back-to-earth/0

<comment><USER2> I love the look of that Lunokhod rover.

It reminds me of Russian author Victor Pelevin's wonderful satirical mini- novel "Omon Ra". The Soviet moon missions carried a heavy secret...

There's a free English translation of Omon Ra available online:

<http://a7sharp9.com/Omon.html>

I don't know about the quality of this translation, but I'd absolutely recommend the book to anyone who's interested in post-Soviet Russia... And can stomach Pelevin's sprawling irony, which may be the only appropriate literary tool for approaching contemporary Russia :)

<comment><USER3> The Lunokhod rovers have an unusual and unique appearance because they used pressure vessels to contain the electronics.

<comment><USER4> Holy pressure vessel batman! I did not know that and find it weird and fascinating.

</comment></comment></comment><comment><USER5> Slighty deceptive headline. At first I thought it sounded like thus ancient robot was transmitting light to earth.

Not so. It merely has a reflector that bounces earthbound researcher-gnereated laser photons back.

</comment><comment><USER6> Apparently Lunokhod 2 is now privately owned by a certain "Lord British":

<http://en.wikipedia.org/wiki/Lunokhod_2>

</comment><comment><USER7> > For every 1018 photons shot at the moon, only a single photon returns to the > telescope.

Is that really 1018, or did 10^18 get mangled on its way onto the web?

<comment><USER8> The latter. There's no way that it's reflecting a million watts back to the Earth's surface (1/1018 of the main beam power). Or to put it another way, with a beam "footprint" of 2km across, and with the size of the rover rather less than 100 m across, there's no way it alone could return that high a percentage of the light sent to it.

</comment></comment><comment><USER9> This is such an interesting story. This guy has quite the gravity labratory.

I like the analog rover, even if it doesn't run Python. What a difference 30 years makes.

</comment><comment><USER10> Wow, without parachutes, how did they land that thing?

Looks like a ancient ancestor of Spirit/Opportunity.

<comment><USER11> > Wow, without parachutes, how did they land that thing?

Erm... parachutes work through friction generating air resistance. There is no air on the moon so parachutes don't do anything. They'd be pointless encumbrance.

Much like apollo, the Luna landers used retrorockets (or tried to, anyway, all attempts resulted in surface crashes until Luna 16)

> Looks like a ancient ancestor of Spirit/Opportunity.

Pretty much, and prefiguring Spirit/Opportunity Lunokhod 1's mission was intended to last 3 lunar days (a bit under 3 earth months) and went through 11 instead (the mission clocked in at 322 earth days)

<comment><USER12> Your comment incorrectly states that Luna 1 to Luna 15 crashed into the Moon. Luna 16 was not the first to successfully soft land and not all crashes were accidents. Only 6 of the 14 Luna missions intended to soft-land on the moon actually crashed. (There were a lot more Luna missions in total, some were not supposed to try soft-landing, and some failed to even reach Moon orbit.)

For those who are interested in Space trivia:

According to Wikipedia[0], Luna 2 intentionally crasheded into the Moon, making it the first human-made object to land on it. Luna 5, 7, 8 failed to soft-land, making Luna 9 the first object to soft-land on the Moon. Luna 10, 11, 12 and 14 were designed to orbit the Moon and crash into it after they failed. Luna 13 successfully landed on the Moon.

Luna 15 was supposed to bring back soil samples, but it crashed into the Moon as well. (More space race trivia: It was supposed to bring back lunar soil samples before Apollo 11 returned to Earth. Armstrong and Aldrin were on the surface of the Moon when Luna 15 impacted.)

Luna 16 was the first unmanned probe to successfully land on the Moon and return a soil sample (which is an event even rarer than manned moon landings).

Luna 17, which carried the Lunokhod 1 roboter mentioned in the artcile landed successfully as well.

Luna 18 (another planned soil return) crashed, Luna 19 successfully orbited the Moon for a year and later crashed into the Moon.

Luna 21 also soft-landed carrying Lunokhod 2, the second roboter mentioned in the article.

Luna 22 and Luna 23 were also soil return probes, but Luna 22 crashed and Luna 23 damaged the return probe on landing (the landing was a soft-landing though).

Luna 20 and 24 both successfully landed on the Moon and returned to Earth with soil samples, making Luna 24 the last man-made object to return from the Moon to Earh.

0: [http://en.wikipedia.org/wiki/List_of_man- made_objects_on_the...](http://en.wikipedia.org/wiki/List_of_man- made_objects_on_the_Moon)

<comment><USER11> > Your comment incorrectly states that Luna 1-15 crashed into the moon.

Not exactly. It incorrectly states that all luna _landers_ (therefore landing attempts) resulted in crashes, not that all luna missions preceding 16 were or contained landers.

Thank you for the correction on 9 and 13, though, I had forgotten about them.

<comment><USER12> My bad, I misread your comment as "It took 15 tries to land on the moon".

<comment><USER11> Fair enough. No harm done.</comment></comment></comment></comment></comment></comment>


An accesible & intuitive layman's explanation of Bayes' Theorem - <AUTHOR> http://oscarbonilla.com/2009/05/visualizing-bayes-theorem/

<comment> loup-vaillant Links to other explanations not mentioned in the article :

<http://wiki.lesswrong.com/wiki/Bayes%27_theorem>

<http://lesswrong.com/lw/2b0/bayes_theorem_illustrated_my_way>

<http://commonsenseatheism.com/?p=13156>

(I don't mean to critique the article, which by the way looks great — short, yet comprehensible. It's just that different explanations may suit different people or be complementary.)

</comment><comment><USER3> You know an explanation is good when you read it and think "Wait, that's _it_? Well of course I get _that_ \- I thought this was supposed to be complicated!"

Thanks for posting this. I have been trying to read & understand the Yudkowsky article linked to from this one for literally months without quite getting it - or I'd think I got it, then get confused again 2 paragraphs further down.

This one is MUCH more accessible and intuitive. "What we've effectively done is change the Universe from U (all people), to B (people for whom the test is positive), but we are still dealing with probabilities defined in U."

It's… almost like a closure for probability? [disclaimer: I don't really "get" closures yet either ;) ]

<comment> loup-vaillant I think I can help with closures. Basically, you just have to keep in mind that functions are mathematical objects like any other:

      (* A named integer, then a named function *)
      let x : int        = 42
      let f : int -> int = fun x -> 3 * x + 2

      (* an anonymous integer, then an anonymous function *)
      42
      fun x -> 3 * x + 2

So functions, like integers, can be expressed literally. Expressions (`2 + 2`, `map ((+) 2)`) can denote functions as well as integers. (You can make the analogy with C, where function _pointers_ (not the full thing) can be the result of an expression).

Now imagine you pass an integer around (as parameter, return value, bound to a name, or stored in a variable), surely you don't expect it to be modified behind your back? For instance:

      let x = 40    in
      let y = x + 2 in (* so, that's 42...         *)
      let x = 0     in (* ...right?                *)
      print_int y      (* right.  It does print 42 *)

So, `y` hasn't been modified behind your back. How is this possible? Well, there's 2 ways to see this: either

(i) `y` was completely computed at the time it was defined. So, we grabbed the `x` that was in scope by the time we defined `y`, computed 40 + 2, and _bam_ , we got 42. Of course, the value of 42 is not at all dependent on the value of the `x` name that is _currently_ in scope.

(ii) `y` was _not_ completely computed by the time it was defined, but only by the time we really really need it (here, at print time). But it still prints 42, not 2. The catch is, the value under `y` is made up of two things: the expression `x + 2`, and a key-value store, which will tell you the value of that `x` in the expression (here, that would be [("x", 40)]). Those two things do _not_ change when you define a new x. And when you need to compute `y`, then you compute the expression, knowing that the above key-value store has the priority (you will see `x = 40` first, and won't bother to look up the _other_ `x`, which has value `0`).

Functions work in exactly the same way. No trap. No trick. For instance, the program

      let x = 40             in
      let f = fun a -> x + a in
      let x = 0              in
      print_int (f 2)

will still print 42. Also, the two interpretations above still hold. Just remember that functions are values like any other.

Now there _are_ some caveats. If you allow side effects _and_ it is not clear whether you enclose over _values_ or over _variables_ (or references), then some things may indeed be modified behind your back. (Imagine that the closure uses a key _variable_ store where you thought it would be a key _value_ store. Then it would be possible to change the content of the variables behind your back.) Anyway, my advice is to avoid side effects as much as you can[1].

[1]: <http://www.loup-vaillant.fr/articles/assignment>

<comment><USER3> Hey, thanks for that. Makes perfect sense. I definitely had an "oh is that all?" reaction.

I wish I could +1 you more than once for that, cheers! Now I get closures and bayesian reasoning, not bad for 2 days ;)

</comment></comment></comment><comment><USER4> I'm impressed: this actually _is_ accessible and intuitive.

</comment><comment><USER5> I worked through the Yudkowsky article yesterday, and had to picture/sketch venn diagrams to get my head round it. I find this far more intuitive - <USER2> way it translates back to the notation is really clearly presented.

</comment><comment><USER6> Khan Academy - Probability part 7 and 8 also explains it with pictures

<http://www.khanacademy.org/video/probability--part-8>

</comment><comment><USER7> This is actually the precise definition of conditional probability derived from Kolmogorov's measure theoretical construction of probability. It's easily the most popular construction of probability.

<http://en.wikipedia.org/wiki/Probability_space> <http://en.wikipedia.org/wiki/Probability_axioms></comment>


9-to-5 is obsolete - <AUTHOR> https://medium.com/i-m-h-o/566a184b323b

<comment><USER2> This sort of freedom is available to perhaps the top-earning 1% of the world. At least 80% of humanity lives on less than $10 per day [1]. Many people have to live in 40-square-foot foot apartments [2], or cages [3], or have to spend their entire waking lives carrying bricks on their heads [4].

You are in a rare position where you're capable of living a leisurely life, but do not misconstrue this as long work days and factories somehow becoming obsolete.

[1] [http://www.globalissues.org/article/26/poverty-facts-and- sta...](http://www.globalissues.org/article/26/poverty-facts-and-stats#src1)

[2] [http://inhabitat.com/chinese-human-rights-group-releases- sho...](http://inhabitat.com/chinese-human-rights-group-releases-shocking- aerial-photos-of-hong-kongs-locker-sized-apartments/)

[3] <https://www.youtube.com/watch?v=HU4jjdRzy3w>

[4] <http://www.lisakristine.com/atlantic-slavery-exists/>

</comment><comment><USER3> The problem is that there are a lot of employers trying to ditch 9-to-7 in order to institute 9-to-whenever-they-please (hint: don't expect daylight after exiting the office, not even in summer). Wide acceptance of 9-to-5 means guarantee of going home soon, that's what I don't want to lose. Yes, 9-to-5 it's broken for the kind of work we developers do, but be wary of everyone trying to dismiss it without talking about alternatives.

</comment><comment><USER4> I see a lot of articles that try to apply the current power good developers have given the relative scarcity of computer programmers today.

Others talk about how everyone should start a business (software), not worry about degrees, or even stop whatever they're doing and just start programming.

It's this same bubble where we look around and think everyone is using an iPad, on gmail, etc.

The truth is most people don't have the bargaining power some of us enjoy, and that's not going to get better, our bargaining power will probably just shrink over time.

<comment><USER5> It doesn't even apply to most people in the programming/IT/design fields.

I'd be willing to bet it doesn't even apply to most people working at Google/Microsoft/Facebook/Whatever.

</comment></comment><comment><USER6> Yes, 9-to-5 is obsolete, because for the majority of office workers in 2013 it's 8-to-5 (if not longer).

<comment><USER3> I've seen things like 8-to-7 quite often.

</comment></comment><comment><AUTHOR> thanks everyone for your comments.

You're mostly right, the article is focused on a specific target, it doesn not apply to the majority of people. I might say that the article is futuristic in the fact that it can apply to a lot more people than it does right now yet a lot has to change for that.

It will require a redistribution of wealth, even a different economic model (I personally go for: <http://www.youtube.com/watch?v=D3Z2cXK5mhc>)

But a lot of people are in a position to make the jump and set their own rules. This article is for them.</comment>


Flexibits _tried_ to provide a good experience on Fantastical 3 Launch - <AUTHOR> https://twitter.com/flexibits/status/1222545669405265920 <comment><USER2> That's $85 CDN _every year_ for a calendar app. I'm not opposed to subscription models, but this pricing is beyond ridiculous.</comment>


Electronics hack: guy solves infinite resistor puzzle by actually building one. - <AUTHOR> http://www.youtube.com/watch?v=v1YrANSmOGY

<comment><USER2> Direct link to the interesting part for those who already know about the puzzle: <http://www.youtube.com/watch?v=v1YrANSmOGY#t=03m20s>

</comment><comment><USER3> Not only did he built something that approximated an infinite grid of resistors, he also found a way to approximate an infinite rise in the inflection of his voice....

</comment><comment><USER4> It's weird I can't find a wikipedia article about this puzzle. I want to understand it. Any advice?

</comment><comment><USER5> I love this. The guy is like the Steve Irwin of electronic engineering.

<comment><AUTHOR> I watched nearly all the vids. He's amazingly enthusiastic.

</comment></comment><comment><USER6> see <http://xkcd.com/356/>

<comment><AUTHOR> Randall once explained in a talk at Google how he got obsessed with this puzzle to a degree that he saw these patterns of infinite grids on toilet tiles. ;)</comment></comment>