The Man Who Tried to Redeem the World with Logic - <AUTHOR> http://nautil.us/issue/21/information/the-man-who-tried-to-redeem-the-world-with-logic <comment><USER2> Having read _Principia_ did Pitts read Kurt Goedel[1]? I would very much like to know what he thought of it!

What an incredibly sad story - burning years of work in meloncholy, all thanks to the lies of an angry woman. Wiener, though, shares a great deal of blame - a man should not pass judgement in on his friends without inquiring into the truth of the matter.

[1][https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_...](https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems)

<comment><USER3> Given that Gödel and Pitts most likely wrote to one another (although their correspondence doesn't survive), it's very probable that they were intimately familiar with the work of one another.

There's an entire chapter dedicated to Walter Pitts in Kurt Gödel: Collected Works, Volume V.

</comment></comment><comment><USER4> Such a terrible tragedy, both personal and for the world. I highly recommend the book referenced: "Dark Hero of the Information Age: In Search of Norbert Wiener, the Father of Cybernetics".

R.I.P. Walter Pitts

(One thing that troubles me slightly: this article mentions a possible cause of the break between Wiener and the others which is presented as speculation in the book, if I remember correctly, but stated here as a bald fact. In any event I wish that Wiener hadn't acted so rashly.)

</comment><comment><USER5> This article is fascinating. I had no idea that the Von Neumann machine was an extrapolation of a mental model. Even more fascinating, that the existince of a symbolic computation machine made the possibility of purely symobolic epistimology impossible. It's like they abstracted a lever higher than they wanted to and then made a cleaner, simpler implementation of it. And now with modern AI we are doubling down on that implementation and trying to build a new kind of intelligence no top of it.

<comment><USER6> Even Alan Turing, in "On computable numbers, with an application to the Entscheidungsproblem", practically invents turing machines modelling how a mathematician works: He has a pencil, some paper and a number of different states inside his brain.

<comment><USER7> Everyone was directly motivated at the time to solve Hilbert's Entscheidungsproblem [0] which was about mathematical proof not universal machines. Turing, along with a few other mathematicians, recognized that proofs involved notions of algorithms and computation and all, together, generalized these into notions of computation we have today—Turing Machines, Lambda Calculus, Recursive Functions. So it's not terribly surprising that Turing's model was a human one. It was exactly his goal (originally).

[0] [http://en.wikipedia.org/wiki/Entscheidungsproblem](http://en.wikipedia.org/wiki/Entscheidungsproblem)

</comment></comment></comment><comment><USER8> "But three years later, when he heard that Russell would be visiting the University of Chicago, the 15-year-old ran away from home and headed for Illinois. He never saw his family again." Assuming that 80% of humanity lives on less than $10 a day, and are, therefore, poor, I can just imagine the number of geniuses born poor that will not ever be able to show their geniality to the world.

Imagine how the world would be a better place with all these people working as scientists, philosophers, mathematicians, etc.

<comment><USER9> I've taught in (Mexican) state programs for gifted youth and I can testify that a lot of the kids (many of them poor or almost) end up wasting their potential and having hard times, monetary wise. Meanwhile, significantly less hard working and less bright kids from private schools go on and get comfortable jobs.

A local think tank ([http://pipe.cide.edu/talento-en- mexico](http://pipe.cide.edu/talento-en-mexico)) calculated the economical implications of not developing this talent. According to their model, on a 40 year span, developing it would give a 132% increase in the GDP per capita in comparison with staying at current levels.

</comment></comment><comment><USER10> > Nature had chosen the messiness of life over the austerity of logic, a > choice Pitts likely could not comprehend.

Regarding "Nature had _chosen_ ...", I wonder if this was actually how Pitts saw it (he seemed more clever than that), or whether it is the article's author's misconception that he considered there is in fact something in Nature that "chooses", instead of applying mechanistic rules entirely.

It is as if the part of the story about the frogs is meant to show that Nature has a "spirit" after all, that evaded being captured in logic. I can't really fathom why Pitts, after all his history, would come to that conclusion. Just because the retina turned out to possess a certain amount of analog computing power?

</comment><comment><USER11> The brain doesn't do logic, it does pattern matching, and selects the appropriate reaction based on the match that offers the biggest chances of survival.

</comment><comment><USER12> So basically Margaret Weisner was the Yoko of the scientific world?

</comment><comment><USER13> I thought that article was going to be about Leibniz, and his "let us calculate" approach to decision making.

"What the Frog's Eye Tells the Frog's Brain" ([http://neuromajor.ucr.edu/courses/WhatTheFrogsEyeTellsTheFro...](http://neuromajor.ucr.edu/courses/WhatTheFrogsEyeTellsTheFrogsBrain.pdf)) is still worth reading. It's the first paper on what is now called "early vision".

I'm painfully familiar with that world view. I went through Stanford CS in 1983-1985, when logic-based AI was, in retrospect, having its last gasp. I took "Dr. John's Mystery Hour", Epistemological Problems in Artificial Intelligence, from John McCarthy. The logicians were making progress on solving problems once they'd been hammered into just the right predicate calculus form, but were getting nowhere in translating the real world into predicate calculus.

For computer program verification, though, that stuff works. For a time, I was fascinated by Boyer-Moore theory and their theorem prover. They'd redone Russell and Whitehead with machine proofs. Constructive mathematics maps well to what computers can do. I got the Boyer-Moore theorem prover (powerful, could do induction, but slow) hooked up to the Oppen-Nelson theorem prover (limited, only does arithmetic up to multiplication by constants, but fast) and used the combination to build a usable proof-of-correctness system for a dialect of Pascal. It worked fine; I used to invite people to put in a bug in a working program and watch the system find it.

But it was clear that approach wasn't going to map to the messiness of the real world. Working on proof of correctness for real programs made it painfully clear how brittle formal logic systems are. Nobody was going to get to common sense that way. The logicians were in denial about this for a long time, which resulted in the "AI winter" from 1985 to 2000 or so.

Then came the machine learning guys, and progress resumed. Science progresses one funeral at a time.

<comment><USER14> And next come the probabilistic programming guys, I'd bet.

</comment></comment><comment><USER15> I thought that was Spinoza.

<comment><USER16> I was going to guess Hegel. Either one would work though

<comment><USER17> Wasn't Descartes partially motivated by the horrors of the Thirty Years war?

</comment></comment></comment><comment><USER18> Ayn Rand?

<comment><USER19> I thought this was a joke until I read your HN profile. Then I discovered that the joke is _much_ bigger than this solitary comment.

<comment><USER20> Please don't post unduly personal comments on Hacker News.</comment></comment></comment>


Ask HN:  Is finishing codecademy resume worthy? - <AUTHOR>

<comment><USER2> Yes if it's an extra, ie. you're a designer and you did this extra. Or your a marketing person and did this extra. Not in a resume for a dev.

</comment><comment><USER3> I would like to see it on the resume of an otherwise unskilled person or a person with skills in another area as it demonstrates interest in our field. I would not be impressed to see it on the resume of a developer or web designer, though.

</comment><comment><USER4> Not really. What IS resume worthy is what you made with your knowledge of codeacademy.

</comment><comment><USER5> I've listed all the coursera courses I have taken at the end of my resume, in one line. I think it shows that I believe in teaching myself new skills all the time, on my own time, without needing an employer to train me. But it doesn't have much value beyond that.

Given two candidates of equal skill and experience, I would hire the one candidate that still likes to learn new things on their own. It's a good trait in a developer.

</comment><comment><USER6> For a junior developer or a recent grad then absolutely. Granted it's not an indication of phenomenal ability but it's a clear indication of effort and eagerness to improve yourself.

</comment><comment><USER7> No.</comment>


Codified startup advice - <AUTHOR> http://www.gabrielweinberg.com/blog/2011/03/codified-advice.html <comment><USER2> I love it, Gabe. I've been running Hackers and Founders Silicon Valley for several years, and this flow chart pretty much nails it.

I would suggest at the "Have a Hacker Founder?" level, to add a "learn how to code" box. I run in to a lot of BizDev people at our events, and the business people that have had the most success are the ones that...

1\. Learn how to code. It proves to hacker founders that you are serious, and every level of technical knowledge that a business person brings to the table makes them exponentially more valuable to the technical founder.

I'm not blithely saying this. My day job is as a nurse, and I went back to school for software engineering because I wanted to do the startup thing. It took me years, but I decided early on that I was going to have to build 10 startups before one succeeded. So, I learned what I had to, to be able to build 10 startups without breaking the bank. And, they key factor there was learning how to code.

2\. Leave their idea behind. Instead help hackers take their too technical ideas and turn them into proper businesses.

3\. Learn how the open source model works and give away their ideas and advice freely to hacker founders. Eventually, if the've helped enough hacker founders, they gain enough street cred, karma and friendships that hacker founders will ask you to join their startup.

\</comment><comment>-----

When I tell business people to "learn how to code" the most common response I hear is that "it takes too long". To which I say, It's going to take you at least 6 to 12 months to find a technical co founder, even in Silicon Valley, if you're lucky. You might as well start learning how to code while you're looking.

<comment><USER3> This is true. Nothing gets my attention more than non-technical people that learned how to code, and even if it's not the world's most brilliant code, it demonstrates umph and a willingness to do what they can for their business and for understanding.

Having learned how to code will also give you perspective, even if you're not going to be doing it later in the company. When you've broken your back coding, you'll realize that no feature is ever 'trivial', among other things.

It'll make you get along and understand your technical team a lot better.

</comment></comment><comment><USER4> I don't get why "seek advice" is the generic end point. Surely "have traction -> know how to get more users -> not seeking investment" shouldn't result in "seek advice".

<comment><USER5> I think the flowchart is there to give all the major advice to the startup, and if they get that far in the flowchart and are still looking for the next step, then that's when they should seek advice because the problem is more complex than can be shown in the flowchart.

<comment><USER4> Ah yes, I see. The only reason someone is looking at this chart in the first place is because they were seeking advice. If you have traction, know how to get more users and aren't seeking investment AND don't need advice, plz refer to the rest of the world.

</comment></comment></comment><comment><USER6> Symptomatic of something that there's no 'profit' node on here.

DID YOU KNOW: there are other ways to get money than from investors?

<comment><USER7> No, it is not. If you are not raising money (bc you have profit or whatever) you just answer no to that question and move on.

</comment></comment><comment><USER8> EVERYONE.READ.THIS. Very simple illustration highlighting pretty much all the principles I've been reading about for so long. Printed and posted on my cork- board! Thank you.

</comment><comment><USER9> This assumes that you _must_ get funding and investment.

Neat concept though.

Need a similar thing for 37signals style advice. Anyone?

<comment><USER7> No it doesn't. If you're not raising money you answer No to "Raising money?" at which point I suggest you seek advice (if needed). I personally haven't yet raised angel/VC money for my startups and often advise people against it until if and when they really need/want to.

<comment><USER9> Well, I read it as "If you think you don't need funding, you're wrong".

All paths go to "seek advice" except the path where you're raising money, know how much, know the terms, and know the investors.

If the author (is it you?) thinks it's ok not raise money, the diagram should be altered to reflect that.

Maybe a bit like this:

      .. -> [Raising Money?] -> [No]
          -> [Do you need to?]
                -> [Yes] -> (Seek advice)
                -> [No] -> [Profitable yet?]
                                   -> [Yes] -> [Cool, good luck]
                                   -> [No] -> (Seek advice)

<comment><USER7> I've been doing startups for over 10 years and haven't raised any VC/angel money :). The chart is about when to ask for advice, not a chart to path your startup career.

In any case, I do think you should seek advice if you are bootstrapping. You read it as seeking advice to raise money, whereas I meant seek advice generally about your startup. I think people benefit from having mentors, which I tried to write up here btw <http://ye.gg/mentors>

</comment></comment></comment></comment><comment><USER10>
      +</comment><comment>-+   +</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--+
      | Start |   | Learn how to read a flowchart. |
      +</comment><comment>-+   +</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--+
          |               /             ^
          V              /              |
      +</comment><comment>---+       /      +</comment><comment></comment><comment></comment><comment>-+
      | COUNTER |      /       | Add 1 to COUNTER. |
      |   = 1   |     /        +</comment><comment></comment><comment></comment><comment>-+
      +</comment><comment>---+    /                   ^
           |        /                 +----+
           |       /                  | no |
           V      V                   +----+
      +</comment><comment></comment><comment>--+                   |
      | Can you read |  +----+   +</comment><comment></comment><comment>-----+
      | a flowchart? |--| no |-->| Is COUNTER > 3? |
      +</comment><comment></comment><comment>--+  +----+   +</comment><comment></comment><comment>-----+
             |                           |
          +-----+                     +-----+
          | yes |                     | yes |
          +-----+                     +-----+
             |                           |
             V                           V
      +</comment><comment></comment><comment>-----+          +</comment><comment></comment><comment>-+
      |    Proceed to   |          |   Open a    |
      | Gabriel's chart |          | restaurant. |
      +</comment><comment></comment><comment>-----+          +</comment><comment></comment><comment>-+

</comment><comment><USER11> What's the start state? Is there one? I'd think to start at the top, but that has an incoming arrow...

<comment><USER12> "Are you serious" is the start. It's a loop to weed out people who aren't truly committed.

</comment></comment><comment><USER13> So much valuable info in a nifty flow chart. Usually I hate flow charts, but this one is good.

</comment><comment><USER14> This really drives home the need to launch as soon as you can. Most of the actual work of building a startup actually happens after that. Great visual reminder!

</comment><comment><USER15> "Have a Hacker Founder?" While that is a great idea if it happens to work out that way, what about "Hire a Hacker/Architect"?

Sometimes you don't meet anyone you want to be a co-founder. If that's the case and you are able to raise the funds to pay a good coder what they're worth, then hiring the right person should be an option.

<comment><USER16> What about optimizing or customizing the website later and answering technical questions about your website?

This is not criticism. I'm just wondering if you hire someone to code, what do you do about the product post completion?

<comment><USER15> Ah, I wasn't clear, apologies. I meant hire someone to code as in hire them to be an actual part of the company, not just a temp hire.

This is my situation at the moment actually. I've got the majority wireframed but will need it coded by a skilled person (I'd just butcher it). In my case I know there will be a lot of customizing and optimizing later as the first iteration is just to get it up & running, so it will be imperative to bring someone on board who will be part of the team, not just a hired gun for a few months.

</comment></comment></comment><comment><USER17> The site's not loading for me for some reason. Could someone please upload the image to imgur.com or some other site? I read the text via Google cache, just can't see the chart.

</comment><comment><USER18> I like how the flowchart passive-aggressively puts you into a loop if (for instance) you don't have a hacker founder and don't think you need one.

</comment><comment><USER19> This is great, thank you! I am currently on the "Talk to users" step. Should I be excited to be halfway there?</comment>


Rowhammer.js: Root privileges for web apps? - <AUTHOR> https://media.ccc.de/v/32c3-7197-rowhammer_js_root_privileges_for_web_apps <comment><USER2> Hmm, it seems that all the pieces aren't in place yet. If I'm understanding correctly, the exploit technique they use relies on cross-page errors (causing errors in one page with accesses to another page), because the page with errors needs to get freed to the operating system to potentially reuse as PTEs, while still having the ability to cause the errors. There's a line on one of the slides that says you can use timing information to get cross-page information, but I'm really not sure what that means, and how feasible it is.

In addition, they need to find a double-bit error, one that would change both the writable bit and an address bit, if a PTE was in that place in memory. They mentioned that they tested their laptop for these errors, and they're possible, but much rarer--how rare? This point was kind of just glossed over.

I'd guess that these two combined would make an exploitable error much more unlikely.

<comment><USER3> > how rare? This point was kind of just glossed over.

It varies widely between memory chips, memory controllers, and a variety of other factors.

Not to mention, Rowhammer was first disclosed early last year, and many vendors started shipping BIOS updates to prevent Rowhammer on the memory controller level _months_ ago; additionally the problem has been fixed from the start on DDR4 RAM (the bug has been known to memory vendors before, but not been deemed a security problem, so the fix wasn't applied retroactively to DDR3).

So finding actually exploitable devices _now_ is going to be difficult.

<comment><USER4> Who has ever updated their BIOS? Unless Windows now does this silently.

<comment><USER5> Apple machines handle firmware updates like any other software update.

<comment><USER6> Yea, I think they even started bundling them with Mac OS X updates now.

</comment></comment></comment></comment></comment><comment><USER7> Nice work, but didn't show an exploit or have one.

The "?" in the end of the talk title should tip you off, same click bait as everyone else uses, sad.

<comment><USER8> Theres nothing wrong with presenting work at an intermediate stage. For instance, Chris Valasek and Charlie Miller presented their automotive research a year before they could control cars remotely[0].

They cobbled together the primitives you'd need to build an exploit, thus proving it to be exploitable. That seems like a reasonable time to share your work to me. The title is provocative, but not to the extent which makes it clickbait.

[0] [https://www.youtube.com/watch?v=tnYO4U0h_wY](https://www.youtube.com/watch?v=tnYO4U0h_wY)

<comment><USER7> Then I didn't made myself understandable. I didn't say that it is. The title of Chris talk is modestly worded as "A Survey of Remote Automotive Attack Surfaces" not "A root exploit of the car bus system and engine management?".

I wanted to express that the title of the talk suggests that there exists something that is called Rowhammer.js that gives root access through the browser. And there isn't.

<comment><USER8> It takes more than an attention-grabbing headline to make something clickbait. There is no real financial incentive here; they gave their talk a provocative title so people would show up. There are not misrepresenting the facts; you can get root from JavaScript using Rowhammer, and they'll tell you how.

Additionally, there is something called Rowhammer.js:

[https://github.com/IAIK/rowhammerjs](https://github.com/IAIK/rowhammerjs)

<comment><USER7> Again, I feel the need to represent the facts from the video for people stumbling over this thread (as of 2016/01):

1.) Rowhammer.js does not (yet) give root access through JS on a website, this is work in progress. The current Rowhammer JS script can create bit flips in DRAM lines.

2.) They do not show how to get root access with Rowhammer.js, they describe a scenario they are working on and that might work in the future, which involves getting access to memory pages with memory cached versions of scripts that someone might execute as root.

</comment></comment></comment></comment></comment><comment><USER9> Slides: [https://events.ccc.de/congress/2015/Fahrplan/system/event_at...](https://events.ccc.de/congress/2015/Fahrplan/system/event_attachments/attachments/000/002/815/original/slides.pdf)

</comment><comment><USER10> The paper is available here: [http://arxiv.org/abs/1507.06955](http://arxiv.org/abs/1507.06955)

</comment><comment><USER11> Interestingly, in response to the first question they state that allegedly some brands of ECC memory are also vulnerable (by also hammering the checksum rows).

<comment><USER12> SECDED ECC will be vulnerable to hammer attacks that flip more than 2 bits in a row.

</comment></comment><comment><USER13> The speaker makes fun of Intel for calling a relatively trivial mapping of CPU physical address to DRAM addresses in the memory controller a "hash function". I'd like to point out that it is actually a hash function mathematically. The term "hash function" has a much looser definition and does not necessarily have any of the cryptographic properties that are common in _cryptographically-secure_ hash functions. It's a clash of terminology, not a poor design decision by Intel. Intel has probably no interest in obfuscating that mapping and the fact that they leave it undocumented is probably just because they don't want to make compatibility guarantees if you somehow rely on the mapping for some reason.

</comment><comment><USER14> Video : [https://www.youtube.com/watch?v=LT54Jq_0kJk](https://www.youtube.com/watch?v=LT54Jq_0kJk)

</comment><comment><USER15> I can't load the page: "Secure Connection Failed".

edit: video file is here [http://c3media.vsos.ethz.ch/congress/2015/webm- hd/32c3-7197-...](http://c3media.vsos.ethz.ch/congress/2015/webm- hd/32c3-7197-en-de-Rowhammerjs_Root_privileges_for_web_apps_webm-hd.webm)</comment>


Why Python doesn't need blocks - <AUTHOR> http://stupidpythonideas.blogspot.com/2014/06/why-python-or-any-decent-language.html <comment><USER2> Guido himself has said no multiline lambdas is an explicit design choice, and it's not really a technical issue:

 _" But the complexity of any proposed solution for this puzzle is immense, to me: it requires the parser (or more precisely, the lexer) to be able to switch back and forth between indent-sensitive and indent-insensitive modes, keeping a stack of previous modes and indentation level. Technically that can all be solved (there's already a stack of indentation levels that could be generalized). But none of that takes away my gut feeling that it is all an elaborate Rube Goldberg contraption."_

source: [http://www.artima.com/weblogs/viewpost.jsp?thread=147358](http://www.artima.com/weblogs/viewpost.jsp?thread=147358)

EDIT: This was from an earlier proposal in 2006.

<comment><AUTHOR> This is the only case where I think that using whitespace indentation for delimiting blocks of code is not a good idea. It makes this particular problem very difficult to solve elegantly. In languages where blocks are delimited by brackets is easer.

<comment><USER3> ...perhaps this is a hint that significant whitespace is a bad idea?

<comment><USER4> ... like $[ in Perl?

<comment><USER5> Fortunately $[ was disabled from v5.16.0 (released in 2012).

ref: [http://perldoc.perl.org/perl5160delta.html](http://perldoc.perl.org/perl5160delta.html)

</comment></comment></comment></comment></comment><comment><USER6> This is one of those pieces that is simultaneously very correct and very wrong. Technically, it's mostly correct, but the fact is Ruby has blocks, lambdas, and the ability to pass around a method attached to an object instance. That gets you a superset of functionality really. It's just all syntactic sugar.

As a lisper I could easily point my finger at ruby blocks and point out they're more complicated than just always using a function, but the fact is, in practice, it just doesn't matter. Ruby blocks cover 95% of the cases you hit in a pretty way, and when they don't you can still use lambdas!

Now macros, those are a better solution to what blocks, but it's a 95% solution, so I've stopped caring.

<comment><USER7> Sure, once you understand the differences between bound and unbound methods, blocks, lambdas and Proc's. That's a lot to understand for something that's fairly simple in many other languages.

<comment><USER6> You don't need understand that much. If all you know is "a block is just fancy syntax for passing an optional lambda into a method", that will suit you just fine. Does it capture 100% of the nuances of a block? No. But it's a fine bit of functional knowledge. If you throw in calling Object#method(:foo) returns what amounts to lambda {| _args| Object.foo|_ args| } you have 99% of what you'll ever need.

</comment></comment></comment><comment><USER8> This article doesn't seem to address continue, return, and break. These are control-flow features that are often allowed in blocks (though not all languages) that can't be done in a function. That is, in a block "return" will return from the enclosing function, and continue/break are a sort of signal to code calling the block. You can simulate the second, like jQuery.each(function (item) {if (timeToStop) return false}); but I don't know of good conventions for this so typically the functionality is skipped. But it's demonstrably useful functionality because it is so widely present in languages.

</comment><comment><USER9> It seems the author overlooked how `return` works in a block, compared to a function. It was one of the main reasons why Yehuda Katz proposed adding blocks to javascript (I see the reasoning behind it, but I think javascript doesn't need more concepts).

<comment><USER10> This. That the author doesn't understand this completely undermines the article.

</comment></comment><comment><USER11> That's hardly fair to use the term "any decent language". Is the author really saying that SmallTalk is not a decent language?

Of course Python actually _does_ have blocks (lambda), they're just very limited, so it's a strange article none-the-less and to a non-Python user come across as a bit of a hack so that you aren't constantly passing method pointers around. But maybe that's just me.

<comment><USER12> Lambdas and blocks are different things.

</comment></comment><comment><USER13> I think the author's correct here, there's really nothing uniquely wonderful about blocks, but he's railing against people that don't exist. Pythonistas would like some sort of way to do inline functions, beyond one-liner lambdas, in Python. Whether those are just generic functions or Ruby-inspired blocks is really not all that important. As long as we can inline 'em.

<comment><USER14> I don't understand this. You can just define a function anywhere in python and use it (in local scope). I do this all the time, and it's a lot more clear than an unnamed lambda function. What's the use case here?

<comment><USER13> It's nice for chaining. E.g. in CoffeeScript:

      list
        .map (el) ->
          el * 2
        .filter (el) ->
          el % 2 == 0

I suppose in this case a list comprehension would work too:

      list = [el * 2 for el in list if el % 2 == 0]

... but as these things get more complex, inline functions become really useful.

It's also nice for various DSL purposes, e.g. unit tests with Mocha

      it 'should be able to multiply a number', ->
        a = 2
        b = 3
        (product a, b).should.eql 6

Which in Python would become

      def test():
          a = 2
          b = 3
          assert product(a, b) == 6

      it('should be able to multiply a number', test)

Probably doesn't look that impressive, but once you're used to them from other languages, it gets to be really frustrating to not have them in Python.

You also start noticing that Python has a couple of features that are actually entirely unnecessary if only you'd have multiline inline functions. For example, you could do away with decorators and `with` blocks.

      view = authenticate (req, res) ->
          res.send 'hello world'

<comment><USER15> "Which in Python would become ... assert product(a, b) == 6"

Python's got a lot more capacity for "DSLs" than it may immediately seem. Writing "it.shouldBeEqual(product(2, 3))(6)" would be quite easy in Python, actually; it's got all sorts of overloads and you can return all sorts of excitingly overloaded values. You don't see it because it isn't considered "Pythonic", not because Python can't do that.

(And I'm with Python on this. Those "fluent" APIs spend way too much effort being cutesy and verbose and not enough effort being simple, transparent, and composable. It looks good in the common case but when you write _good_ test code it stops looking so good when you're writing map(it.shouldBe.eq, testTable), and the fact that the cutesy "fluent" style takes even a baby step in the direction of discouraging anything like that is an immediate disqualification in my book. Oh, don't try to defend it by saying you can still do the map I said... I've got enough experience in such things myself to know that it's actually a _bigger_ problem than I'm making it out to be, not a smaller one.)

<comment><USER13> Kind of besides the point though -- that line in particular had nothing to do with blocks/inline functions.

</comment></comment></comment></comment></comment><comment><USER16> > _Promises /A has been ported to Ruby, with basically the same API…_

This is, to me, the core of the problem.

> _The Promises /A spec from CommonJS defines Promise.then as taking three > (optional) callbacks: fulfilledHandler, errorHandler, and progressHandler. > The code above is passing two of them at once._

Shoehorning things from different realms (e.g desperately trying to write JS in Ruby or vice-versa) is not a good idea.

Instead of either:

        db.select_one(sql, thingid)
            .then((proc {|rowset| rowset[0]['foo'}), (proc {|err| log_error(err)}))

or:

        db.select_one(sql, thingid)
            .then {|rowset| rowset[0]['foo'}
            .then(nil) {|err| log_error(err)}

Why not do:

        db.select_one(sql, thingid)
            .then {|rowset| rowset[0]['foo'}
            .else {|err| log_error(err)}
            .each {|whatever| the_progress(callback_is)}

Also, _method(:log_error)_ will happily turn the method into a proc.

This last case is actually extremely important. Contrary to what the author claims, functions and methods _are_ first class in Ruby. The problem is that in Ruby's grammar an identifier without parentheses is a method call if that identifier does not resolve to a variable. Therefore, you cannot refer to an existing function by its name, merely because it would resolve to a call.

Therefore the difference between those is _purely syntactic_ :

        Python  Ruby
        foo     method(:foo)
        foo()   foo

Also, this[0] explains how _& :to_i_ works, which can be leveraged with great success, should one implement the promise class in a sufficiently idiomatic way (turning the above _log_error_ reference into &:log_error)

[0]: [http://ablogaboutcode.com/2012/01/04/the-ampersand- operator-...](http://ablogaboutcode.com/2012/01/04/the-ampersand-operator-in- ruby/)

</comment><comment><USER17> ...huh? Having piece-of-code A call piece-of-code B which in turn calls some other piece of code _as determined by A_ is useful. Whether you call this idea a "block" or a "lambda" or a "function pointer" or a "first-class function" is an implementation detail.

</comment><comment><USER18> Next up: Why we don't need higher level abstractions because we can do it all in assembly.

</comment><comment><USER19> Python already has multi-line lambdas, you just need to be creative [http://ideone.com/ybf63a](http://ideone.com/ybf63a)

</comment><comment><USER20> If anyone has used block-happy smaltalk, you know how amazing it can be to do dependency injection easily and arbitarily. Almost function you write can be generic, and only become specific when it needs to in the business code.

</comment><comment><USER21> Hmm...I am not sure what difference the author is making between closures and blocks, the terms at least overlap substantially.

For example, Smalltalk blocks have been "upgraded" to closures in most dialects (and not implementing them as closures in the first place was not a choice of semantics, but one of implementation simplicity).

Also, Swift closures _are_ the same as Objective-C blocks.

       +(void)logMe: (void (^)(void))block
       {
           NSLog(@"object of class: %@",[(id)block class]);
       }

Called from Swift with a closure:

        func applicationDidFinishLaunching(aNotification: NSNotification?) {
            logger.logMe( { } );
        }

Results in:

        2014-06-30 19:55:37.973 SwifTest[94782:303] object of class: __NSMallocBlock__

So much ado about nothing?

</comment><comment><USER22> I was a ruby developer, who then had to do a lot of C and am writing CL/Clojure for fun.

Then I went back to a ruby project, and realised - the language I used to adore kinda sucks, because it's _so_ un-functional.

</comment><comment><USER23> > JavaScript, for example...

What an odd appeal to authority...</comment>


Blog about my research into CompTIA A+ - <AUTHOR> http://valentin-ict.nl/category/a/ <comment><AUTHOR> I am trying to make the content of the A+ exam is understandable as possible for as many people as possible. I don't shy away from the occasional cringy joke. I hope you'll like it.</comment>


How is China able to provide enough food to feed over 1B people? - <AUTHOR> https://www.quora.com/How-is-China-able-to-provide-enough-food-to-feed-its-population-of-over-1-billion-people-Do-they-import-food-or-are-they-self-sustainable?share=1 <comment><USER3> The country I don't understand how they do it is Bangladesh. A country the size of New York State with 164 million people. (50% of the US population). As I understand it, they generate 90% of the food they require.

<comment><USER4> The subcontinent, and especially India and Bangladesh, have ridiculous amounts of arable land. India has more than any other country in the world.

<comment><USER5> besides the US

<comment><USER4> According to Wikipedia[1] the title goes back and forth. In 2012, the latest year for which the article has numbers, India had more. Despite being 1/4th the size of the US.

1\. [https://en.wikipedia.org/wiki/Arable_land](https://en.wikipedia.org/wiki/Arable_land)

<comment><USER5> didn't know that! Thanks.

</comment></comment></comment></comment></comment><comment><USER6> Chinese farm productivity is shite, and the government knows it.

It is true that the state throws absolutely colossal amount of resources on geoengineering and agriculture, yet to little effect.

China is nowhere near Holland or other advanced agriculture player in calories production per unit of labour.

Out of close to a 100 officials I went by through my career, I only managed to befriend two. From those two, I barely know in the most generalised terms of what is happening in top tiers.

Agriculture meetings are alleged to be the non-stop shit show, an every day crisis, and a way to demotion for the prime majority of cadres put on the agri committees, as most of them fail at the task.

Provincial level party executives all send their deputies instead of themselves to them as they fear demotion and penalties if they say something silly at those meetings.

Chinese bureaucracy does not deserve much credit there. Were that much of money be given to just anybody moderately competent, China would've long beaten even Holland on that.

<comment><USER7> I don't think that calories production per unit of labour is a big concern when you don't export produce and you've got access to so much labor and a socialist economy where food prices are fixed and jobs are all but guaranteed.

The Dutch have a stronger focus on produce export and a higher income per capita, so they have to be a lot more efficient in order to be competitive in the global economy.

<comment><USER8> calories per unit labour is a good measure of how advanced the agriculture tech is. Just because labour is cheap, doesn't mean it's efficient - <USER2> imagine if that labour could be spent on other things (while still maintining the output).

<comment><USER7> I understand that, but China is still industrializing and has an enormous abundance of labor. They have over 425 million farmers (and a decade ago, that number was 700 million). At achievable efficiency, that could easily be done by as few as 50 to 100 million, but then there just wouldn't be any available jobs for the other 300+ million people. China is already using workers in massive unneeded building projects and has an army of over 2 million soldiers and who knows what else, just to keep the unemployment down.

A higher produce efficiency is not only not needed, it is unwanted. Full labor market participation is of much more value to the Chinese right now than the efficiency of the produce industry.

</comment></comment></comment></comment><comment><USER9> One thing that's not mentioned is that the freshness and variety of produce available in China is fantastic. There's much less refrigeration and transportation, so there's a good chance the produce you buy at the local street market came from nearby fields very recently. Seeing this as a visitor from the US is quite a revelation.

<comment><USER10> Which places did you visit, and observed this?

I bet it's characteristic for large cities where the amount of produce consumed is large, and prices are higher.

<comment><USER9> Beijing, Xi'an, Chengdu, and a handful of villages nearby them. Also some roadside farmer stalls in between. I'm sure the quality and variety vary, but the sample I saw was impressive.

</comment></comment></comment><comment><USER11> The author has made no efforts to hide the fact that he's a China apologetic and CCP propagation puppet. The fact is that the majority of the country's rice and corns are imported (from SE Asia or N/S America), which are Chinese main calory source. Another often overlooked fact is that China has built a vast crops storage network across the nation, for the fact that a small interruption in food supply chain could cause huge humanitarian disaster, and the new crops will rotate out old stale crops, which are barely eatable but sure, they're better than nothing. Most Chinese even have no idea of this, that their daily rice supplies are usually 5+ yrs old, unless you pay a premium to buy them from Whole Food equivalent super markets in China.

<comment><USER12> > Most Chinese even have no idea of this, that their daily rice supplies are > usually 5+ yrs old

Even during the Maoist period 'new rice' was given out/sold once a year for celebration. Everyone was aware they were eating rotated granary rice.

Storing crops against famine (and eating the old, stored grain) is an ancient tradition [1] dating back to at least 6000 BC, and in China, guarding against famine was one of the earliest tasks of the Chinese proto-state.

[1] [https://en.wikipedia.org/wiki/Granary](https://en.wikipedia.org/wiki/Granary)

</comment></comment><comment><USER13> " most of the population in India claim to be vegetarians"

At most a third of India is vegetarian.

[http://theconversation.com/the-myth-of-a-vegetarian- india-10...](http://theconversation.com/the-myth-of-a-vegetarian-india-102768)

<comment><USER14> Sure, but even among the remaining 2/3rds, meat consumption is much lower, compared to other regions where they typically eat meat every meal.

</comment></comment><comment><USER15> This whole post has a Factorio vibe of x->y->z, I'd read a blog from this author just breaking down infrastructure.

<comment><USER16> You should check this out. Same author. He has quality answers on Quora.

[https://www.quora.com/As-a-Chinese-person-what-do-you- think-...](https://www.quora.com/As-a-Chinese-person-what-do-you-think-of-the- future-of-Vietnams-economy-compared-to-those-of-other-Southeast-Asian- countries)

</comment></comment><comment><USER17> What's also overlooked is that China went through one of the worst man made famines in history, and the government has internalized many of the lessons (paid in blood) from that affair.

</comment><comment><USER18> The author has other great answers in a similar structure too!

[https://www.quora.com/profile/Janus-Dongye- Qimeng](https://www.quora.com/profile/Janus-Dongye-Qimeng)

<comment><USER19> The author writes well, but presents an unbalanced, Mainland-Chinese- Propagandist views. This does not make for "great answers".

Also.... who is asking the questions?

<comment><USER18> true, I can stomach the propaganda, but that aside, the way he links each chunk of the story together is really fun. Hes like a college professor that I would of loved to have , where every lecture was a mini adventure.

</comment></comment></comment><comment><USER20> Wow, Japan consumes more seafood then all of the US states combined and the EU countries combined? That's amazing.

<comment><USER21> Japan has 50% more coastline than the United States.

Where I sit, 1000km from an ocean, seafood is pretty remote. Sure, it gets flown in and flash frozen isn't horrible, but it isn't fresh.

<comment><USER22> A lot seafood is flash frozen these days, even next to the coast and even in japan. It's just the best way to deal with parasites. I don't think you can eat sashimi in the USA that hasn't been flash frozen.

<comment><USER23> lake/river fish usually have parasites and must be cooked.

I was under the impression that ocean fish don't have the same level of parasites.

You would never eat a catfish raw.

<comment><USER22> [https://www.nytimes.com/2004/04/08/nyregion/sushi-fresh- from...](https://www.nytimes.com/2004/04/08/nyregion/sushi-fresh-from-the- deep-the-deep-freeze.html)

</comment></comment></comment></comment></comment><comment><USER24> Those sat shots totally remind me of the intro to the blade runner where they show the densely packed structures [https://i2.wp.com/rosettedelacroix.com/wp- content/uploads/20...](https://i2.wp.com/rosettedelacroix.com/wp- content/uploads/2018/01/5a.png?resize=474%2C210)

</comment><comment><USER25> The question should really be "How are many national economies keeping innumerable people hungry, even though there's plenty of food to go around several times over?"

In most places in the world it's easy and cheap enough to produce food and distribute it. Actually, it's so easy and cheap that many world states artificially subsidize agriculture/livestock farming/etc. to prevent them from collapsing due to low prices.

<comment><USER26> > "How are many national economies keeping innumerable people hungry, even > though there's plenty of food to go around several times over?"

I never see this question on TV. What I mainly see on Tv is talk about political strategies, result surveys and the like. Climate change is one of the few things that I see being discussed. And even that has a lot of this let's talk about politicians positions and poll results.

I want to see more about how to improve the world. Does anyone know any good on-line resources about this? Because mass media is doing a poor job. And we need them to do a better job.

<comment><USER27> Opinion:

The tough truth is that improving the world at that scale is mostly about politics. Politics is how the nations allocate resources to problems.

You maybe want them to talk about the technical fundamentals of the problem but the important bit is usually the politics.

[A sibling comment says to look at TED talks. This is an excellent idea. Then, after a couple of years, ask why none of the solutions have been implemented, and you are ready to get interested in the politics.]

<comment><USER28> In the 1950s, building a moonbase would have been an engineering and technological challenge.

Today, it's basically a political and economics challenge, to convince enough people it would be worth while to spend the time and effort to do it. Which is not to say there wouldn't be engineers involved, solving new problems, but we already know enough of the solutions that it's not really the sticking point now.

(Which is to agree with you, a lot of things are organizational problems at this point.)

<comment><USER29> > "Today, it's basically a political and economics challenge, to convince > enough people it would be worth while to spend the time and effort to do > it."

There's a quote by (I believe) Winston Churchill - which I can't seem to find atm - that goes something along the lines of:

Winning a war/battle is relatively easy. It's convincing them to let you fight that's far more difficult.

</comment></comment></comment></comment></comment><comment><USER30> One thing that is not mentioned in the article is the massive amount of soy beans that China imports each year (approximately 90 mmt in 2019) to produce feedstock for their hog herds and acquacultures. Most of the soy beans are imported from the US (pre trade war), Brazil and Argentina.

</comment><comment><USER31> I see 3 sushi restaurants on the same street, start to extrapolate in my head, and wonder how we hadn't extinguished most edible fish species decades ago.

From what I've read and heard on the subject, my understanding is: (1) some we have (touched upon at end of Jiro Dreams of Sushi, for example), (2) we are in the process of doing so to most the rest, (3) fish farms are increasingly making up the difference.

<comment><USER32> Fish stocks are being depleted. We are running the earth down.

</comment></comment><comment><USER33> Another perspective on how China is able to provide enough food:

\- In Shanghai 96% white-collar workers have at least one disease of the "food triad" (diabetes, fatty liver, hypertension), up from ~80% in 00's.

\- In Beijing 26% of the whole population is overweight or obese, up from 11% in 00's.

\- China has the largest percentage of obese children in the World, only competing with Mexico.

So there is enough food, but this food is low quality empty calories to "feed" 1B people, not nourish them.

<comment><USER34> more than 1/3 of Americans are obese. the US is one of the fattest countries in the world. Does that mean Americans are poor people who can only afford empty calories? wake up. people just like to eat unhealthy stuff when given the chance?.

<comment><USER7> >Does that mean Americans are poor people who can only afford empty calories?

I don't know if it's because they can't afford better or don't want to eat better, but in the US there is a considerable relationship between income/education and obesity. The poorer you are, the more likely you are to be obese. 50% of the US makes less than $30k a year, and that group probably amounts to somewhere around 75% of the obese people.

[https://www.stateofobesity.org/socioeconomics- obesity/](https://www.stateofobesity.org/socioeconomics-obesity/)

<comment> kube-system I don't think the difference is due to income directly, but more to do with class/social expectations. Eating is a very social activity, and the way people eat is strongly linked to their individual and group identity.

Healthy eating simply isn't prioritized by some people/groups, and others don't value it at all.

</comment></comment></comment></comment><comment><USER35> This quora answer is pure CCP propaganda, why is this post on the HN home page?

<comment> v-yadli Freedom of speech I guess?

<comment><USER36> Freedom of speech and I guess HN is an international community? On the post, as the author said, seeing is believing. Whether or not it's CCP propaganda, it's facts.

<comment><USER35> "Seeing is believing" really doesn't make any sense in the modern world. And facts don't exist in a vacuum, they are presented with a specific narrative, some are just omitted, some are plain lies (China bringing joy to Tibet population by providing better food, really?).

<comment><USER37> I find it informative to see other points of view and an impressive number of facts that are presented in this Quora answer, rather than just the Western point of view, which arguably could be also called as "propaganda". Let's not go this route.

</comment></comment></comment></comment></comment><comment><USER38> China leads world in production of:

\- Rice \- Wheat \- Lettuce \- Cabbage \- Cauliflowers \- Eggplant \- Potato \- Spinach \- Carrots \- Cucumber \- Pumpkin \- Sweet potato \- Grapes \- Peach \- Apple \- Plum \- Strawberry \- Tomato \- Tea \- Beer \- Pork meat \- Sheep meat \- Peanut \- Egg \- Honey

[https://twitter.com/spectatorindex/status/106956943987883622...](https://twitter.com/spectatorindex/status/1069569439878836225)

</comment><comment><USER39> This is probably the best article I've read on Quora!

</comment><comment><USER40> Imports of grain from Canada?

</comment><comment><USER41> Awesome self-burn about the quality of Chinese 'honey' there.

</comment><comment><USER42> Is an infrastructure planning issue, if they don't plan for food while expanding population, the population wouldn't expand anyways!

</comment><comment><USER43> Also more CO2 means increased plant growth.

</comment><comment><USER44> I can't imagine the US being as efficient at anything as China is at growing food.

<comment><USER45> What does this even mean? Almost 300 million people are agricultural workers in China, versus 6 million in the US. Despite that, we produce nearly the same quantity of food and export 140 billion dollars of food every year. The US has plenty of efficiency shortcomings, but in agriculture, the US agricultural sector is a modern marvel of engineering and efficiency.

<comment><USER46> US produce is industrial feedstock, not food.

In the Brexit-headed UK there is considerable discussion about this, some Brits don't consider US food to be edible. Phrases like 'chlorinated chicken' get mentioned.

Are those soy beans fed to people or pigs? Same with all that corn. None of it can be eaten, it has to be processed into corn syrup or fake potato crisps. There is no modern marvel of engineering, it is monoculture, as if nothing was learned from the dustbowl. It is also heavily subsidised. Watered by fracked aquifiers. To international tastes it is all bland, adulterated and not really food.

Those exports also put people out of work on the global market so they are not growing their own food, just importing nonsense like American maize.

I am not into Chinese food but I know that Chinese people don't consider U.S. food as having much taste, not even real food.

<comment><USER47> The funny thing with US soy beans is that the majority of our edamame and fresh soy beans are frozen and imported from China or Thailand even though we literally have fields everywhere growing soy beans across the country.

</comment></comment></comment></comment><comment><USER48> What about India or that whole part of the world

</comment><comment><USER49> Yeah sorry - that answer is the sort that glosses over a huge amount of facts to present a clean a-b-c dependency tree along side a decent heap of sino philia.

So in particular the point on fish farms- fish farms are _hard_ , the fish need many different things to be happy and not sick or affected by parasites.

This means medicines, treatment and more - further this is only viable if you have transportation, refrigeration and markets.

Those make a larger difference than the base technology. Without the transfer and storage tech, the rest is simply bottlenecked.

Further this

>Those Tibetans have no time to go to temples for worshipping any more, instead, they have to work in the greenhouses taking care of tomatoes. This is why Dalai Lama is not so happy to hear this.

Is simply Chinese propo. The Dalai Lama is unhappy, if at all, because China has taken over what used to be an independent nation, decides how their religion should operate, crushed dissent and even ostracized their own citizens who made the mistake of talking to Tibetan protesters to do the very simple human thing of figuring out the other side.

(Voting behavior and soft shilling of the poster in the thread is also pretty odd.)

<comment><USER50> > fish farms are hard

Yes and no. Some fishes are really, really hard to culture. Other are very forgiving and easy if you know what to do. Aquaculture shaped China since thousands of years. They have a lot of population in part because they have carps. Is a very efficient way to recycle waste in food.

</comment></comment><comment><USER51> How is it possible that Quora knows my first name?

</comment><comment><USER52> Oh boy. Lots of things in the top answer that western folks will, uh... question. Informative and complete nonetheless!

</comment><comment><USER53> I was really impressed by the top answer until I read this statement.

"I mean, the Chinese government has also forced Tibetans to build a massive amount of greenhouses on the Tibetan plateau. Those Tibetans have no time to go to temples for worshipping any more, instead, they have to work in the greenhouses taking care of tomatoes. This is why Dalai Lama is not so happy to hear this."

What??

<comment><USER54> You should post the following paragraph as well:

"As a result, the average vegetable price in Tibet has reduced by 90% over the past decade and they don't have to import vegetables from nearby provinces anymore. Most of the Tibetans can finally afford to eat watermelons. Who doesn't like eating watermelons?

You know that most Tibetans historically only eat yak meat, milk, cheese, and bread? They couldn't grow anything in such a harsh climate. Only monks could have the luxury to eat vegetables. Now it is the solid proof that the Chinese government didn't just destroy temples in Tibetan culture but helped them eat vegetables and fruits."

<comment><USER55> The logic is a bit dubious. The Chinese had a pretty crappy diet when they invaded Tibet. Whether the China invaded or not, the food quality would have risen, just like most of the rest of the planet.

</comment></comment></comment><comment><USER56> A lot of superdefensive people over at quora everytime you ask a question about china.

<comment><USER20> Even the first answer has "Western media won't tell you this". Like there's some western conspiracy to downplay Chinese agriculture industry.

The Chinese media is constantly telling their people that the US is plotting against China and is hostile to them, so the citizens don't get any crazy ideas like democracy and human rights. While simultaneously amplifying the bad news coming out of America to show the 'dangers' of western culture.

Plus there is a large group of astroturfers constantly scanning the web for mentions of China (aka "50 cent army").

I don't blame the individuals for holding these views but it's something to always be conscious of when reading anything online about China. And I say that as someone who loves their country and people, just not their cultural controls.

<comment><USER57> The tone is honestly understandable. It pains me to bring up this cliched point, but is the US media not constantly telling us that China is hostile, China is plotting? As someone with a foot in both worlds, US coverage of China is _at least_ equally warped. It's funny; to my parents and relatives in China I'm perceived as having a US bias, but everywhere else I get characterized as being too Chinese.

It's hard for me to emphasize enough how little typical Westerners understand about Asia. It goes both ways but I think they're doing a better job of it - at least in my opinion, China appreciates US culture much more than the US appreciates Chinese culture.

<comment><USER58> > It's hard for me to emphasize enough how little typical Westerners > understand about Asia.

I bet the typical human knows very little about life and culture outside of their specific environment. A typical city-dweller knows little about rural life even in their own region, and vice-versa.

It's weird how easily we fall into a trap of saying "look how ignorant x people are". I mean, of course, it's a big world, and we're busy, so it's pretty hard to not be ignorant.

Maybe a bigger mistake is thinking that "Media" (news etc?) is an education system. It's not and maybe it's not supposed to be. We need to come up with a better system/expectation/culture around continuous education, but even in the best case that can only apply to the subset of the population that has the time and resources and interest to take part.

<comment><USER59> > I bet the typical human knows very little about life and culture outside of > their specific environment. A typical city-dweller knows little about rural > life even in their own region, and vice-versa.

I think this is certainly true, but at the same time, I've never met an American (even an otherwise 'uneducated' one), who was under the impression that London or Berlin are backwoods villages that struggle to keep the lights on, whereas I have certainly met people that think Hong Kong is. So then the question becomes "yes people are generally unaware, but what is it about Asia specifically that makes it seem like there is an even larger lack of awareness compared to somewhere like Europe?"

In regards to the rest of your comment: I wholeheartedly agree, but I don't think it comes down to "time or resources". Some of it does just come down to personal habits/preferences. Without passing any judgement, there are plenty of people who spend their evenings watching The Bachelorette when they could just as easily be using that time to watch The Travel Channel (or Discovery Channel if it was still actually educational), but they actively choose not to. I think that's a societal thing much more than it is a time or resources constraint.

<comment><USER60> When the US was a backwoods nation, London and Berlin were world capitals, and Hong Kong was a backwater fishing village, so American culture does not have the same ingrained respect for Hong Kong that it does for European cities. That being said, I don't know if you are using Hong Kong as a stand in for major Chinese cities, but Hong Kong emigres make up a disproportionate amount of ethnic Chinese American immigrants, and the way many of them talk about the mainland, one might think mainland China is having a problem with the keeping the lights one.

<comment><USER61> At the founding of the US, China was the #1 economy in the world. This view of the world among Europeans is partially based of racism and racist accounts of the world going unchecked.

The most investment-worthy economies on the planet have been in Asia for the past couple centuries (if you understand buying the dip), this fact is an economic threat to Europeans with a zero-sum view of global capitalism (has been for at least 2 centuries). The rest writes itself....

</comment></comment></comment></comment></comment></comment></comment><comment><USER62> This and watching HBO's Chernobyl have prompted me to ask: how do communist countries work? Is there something I can read or watch to best understand things like who owns these farms, who profits from them, how do they pay workers, how do you buy a house, etc

It's all as foreign to me as medieval peasants and nobles so I don't know how it works from day to day. The fact that China now has billionaires, and billionaires spoiled kids doing donuts in supercars also confused me.

<comment><USER63> It was pretty simple in the USSR: the government owns the farms, the government profits from them, they pay the workers (very often in product).

The government/party says a new farm will be created here, the order goes out.

It is all controlled from the top (communist party) through the regional council, through the local council (often a few councils inbetween). After the farm is established, a few inspections by party officials and it's all set up and operating.

This created the perfect opportunity to fudge reports like there's no tomorrow and essentially the party had no idea what is actually going on.

Papers say production is fine, orders are to maintain levels, report comes back saying everything is proceeding as ordered. In reality, production was higher than reported (with no room to grow if ordered), workers are skimming product, managers are skimming product, local council is skimming product and money, regional council is skimming money. To make up for the shit pay, but also because why not, the party won't miss it.

Orders come in to increase production, report says "no can do, need more equipment, need more land, need more workers". Of course, more than is actually needed, so someone can have their own tractors.

The black market, often in barter, was huge.

The party in Moscow could not contain its spread even with their network of spies. People trusted each other, not the party, the police were in on it.

Not sure if that's how it works in China, but they have the advantage of instant communications, instant checks on any level, modern surveillance.

This turned out messy, I'm too tired.

<comment><USER64> Wonder how this could change with modern technology and controls.

</comment></comment></comment><comment><USER65> Perhaps the question should be how do 1B people feed themselves despite the government of China.

</comment><comment><USER66> The author's answer to the question 'How do mainland Chinese feel about the protests in Hong Kong on the extradition law amendment?':

[https://www.quora.com/How-do-mainland-Chinese-feel-about- the...](https://www.quora.com/How-do-mainland-Chinese-feel-about-the-protests- in-Hong-Kong-on-the-extradition-law-amendment/answer/Janus-Dongye-Qimeng)

<comment><USER67> At the very end author compares hong kong island to langkawi portraying lankgawi as some unatractive island and that hong kongers should be happy they are connected to mainland. This is where I started look more critical at the whole article having been in those islands before myself - it was a great reality check that you have read everything very critically these days.

I recommend everyone not only to check google images how langkawi look like but even more recommend to go there for a holiday [1]. It's called 'bali of malaysia' and popular tourist destination. Very close to another great malaysian island - penang.

Author says "You can rent this island for 99 years and start to develop your economy." I would happily rent it for even 10 years if the price is right!

[1] [https://www.google.com/search?q=langkawi](https://www.google.com/search?q=langkawi)

<comment><USER68> I'm majorly surprised you needed to read until the end to figure that out. To me it was and is impossible to read from the beginning without having my propagandometer going off-limits nearly instantly. I wanted to take parts and comment here to substantiate my claim, but the post is too extreme and long. It's obvious. The linked post is outright /r/sino material.

<comment><USER69> The quora question is "How mainland Chinese feel about protests in Hong Kong", and the answer IMO is same as the reality of how mainland Chinese really feel about it.

</comment></comment></comment></comment><comment><USER70> Yeah definitely liberated Tibet with all those greenhouses and tomatoes in xinjiang.

</comment><comment><USER71> Without reading the link...

This kind of question is dumb. It imagines there is an entity called "China" that's tasked with feeding 1.3B people.

In reality, it's just 1,300,000,000 individuals tasked with feeding themselves, just like anywhere else in the world. We do it by division of labor. Some grow food, others build goods, others provide services. We all trade with each other so everyone can specialize at what we do best.

It's no different if the nation border happens to enclose 1.3B Chinese nationals or 300K Icelandic ones.

<comment><USER72> Read the link and then delete your comment.

<comment><USER73> This comment breaks the site guidelines: [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html). Please don't be a jerk on HN.

<comment><USER72> Thank you for the reply. Won't do it again.

</comment></comment></comment></comment><comment><USER74> China is investing heavily in Africa.

</comment><comment><USER75> He forgets to mention: Africa</comment>


Python at StackOverflow [audio] - <AUTHOR> https://talkpython.fm/episodes/show/86/python-at-stackoverflow <comment><USER2> What a great guy. I know immediately when I see with his name on a Stackoverflow answer that it's authoritative and can be trusted (which is a lot for Stackoverflow, especially when you've exhausted the manual and the source code).

<comment><USER3> Jon Skeet is another great guy for this

<comment><USER4> I used to do .Net programming a few years back and I used to love Jon Skeet's answers for any .Net question on SO. Precise, informative and simple explanations.

It's been a few years since, but if I remember correctly, it was an interview of Jon Skeet on an episode of Scott Hanselman's podcast where he spoke about reading the C# spec, and as a young beginner in programming I loved that advice because when I did read the spec, I was pleasantly surprised, perhaps naive, that all the information I needed to learn the language was right there, available for free when I thought I had to purchase books etc. to learn more. :)

<comment><USER5> > when I did read the spec, I was pleasantly surprised, perhaps naive, that > all the information I needed to learn the language was right there

This...I couldn't place enough emphasis on it.

If I could attribute a single factor which has had the most impact in differentiating my performance vs. peers who were hired around the same time, it'd be a philosophy of setting aside time to study specs in detail and keeping up with them.

</comment></comment></comment></comment><comment><USER6> If there's a python question, he doesn't fail to reply within 5 minutes.

<comment><USER7> I'm genuinely curious how that works. I know once you get up to a certain level you can thrive just by crafting high-quality answers to random peoples' questions. But still. For me, even if I don't work on some routine production stuff and simply try to learn things, it takes quite a bit of uninterrupted time to master a certain topic. And with our field being what it is, there are more and more topics getting rolled out every day no matter what stack you use. So how is it possible for one person to run essentially a one-man commercial-grade support operation for a complicated ever-changing technology?

<comment><USER2> Reply with a correct one sentence answer within 15 seconds, then continuously improve it until it's a 2 paragraph answer citing source code and documentation, with code examples to boot. Stackoverflow is incredibly easy to "game" if you have the time.

<comment><USER8> None of which removes the fact that Martijn is incredibly helpful to Python questioners.</comment></comment></comment></comment>


What are the best resource for learning intermediate to advanced python? - <AUTHOR> <comment><USER2> The meanings of 'Intermediate' and 'Advanced' are vague and context dependent.

The _Programmer Competency Matrix_ has some objective criteria that are language independent. A popular HN discussion of it is here: [https://news.ycombinator.com/item?id=4626695](https://news.ycombinator.com/item?id=4626695)

And the matrix itself is here: [http://www.starling- software.com/employment/programmer-compe...](http://www.starling- software.com/employment/programmer-competency-matrix.html)

</comment><comment><USER3> You could try [https://pythonspot.com](https://pythonspot.com) or a Python course on [https://udemy.com](https://udemy.com) / [https://edx.org](https://edx.org)</comment>


Sleep less for better productivity - <AUTHOR> http://leanminded.tumblr.com/post/9800643432/sleep-less-for-better-productivity

<comment><USER2> This is a little incomplete. It is true that it matters _where_ in the sleep cycle you wake up. You want to wake up during light sleep, or most ideally, during the occasional waking moment (which you forget, but there are usually 0-5 such periods during sleep). Sleep latency is a lot higher when you are woken during deep sleep or REM. (I don't have citations for this off hand, but I'm pretty sure it's well-accepted sleep science.)

So if his sleep cycle is very regular, and his alarm time happens to be at a frequently REM/deep portion, then less sleep could lead to a better wake up. But he is still cutting sleep off his schedule! All the research he alludes to about how less sleep is harmful still applies; he's still losing some mental capacity or resilience or something _because_ he has trimmed his sleep.

This may or may not be a worthwhile exchange for having a better morning.</comment>