Ask HN: What to do when an offer is pulled? - <AUTHOR> Hi HN
I'm reeling as I had recently interviewed for a role as a senior developer at a startup. All went well except for the fact that I mentioned I'd like to work remotely for four months. This was declined and the offer was pulled.
I responded asking for a negotiation and we eventually came to an agreement. I was happy with this and was going to hand in my notice next week. Today I received an email saying they were pulling the offer as their investors didn't like the compromise we'd reached. There was no option to negotiate.
How would you respond to this? I'm now stuck in a job I dislike and just want a developer role that is flexible on location.
Thanks <comment><USER2> Don't get down on yourself, you did nothing wrong. Sometimes things don't work out.

Just look for another position. There's another one out there, you found two, you'll find another.

<comment><AUTHOR> Hey

Thanks for the kind message, that's a good point! Guess I'll just get back on the applications!

</comment></comment><comment><USER3> How would I respond? I'd tell them I was disappointed and move on with my life. You can't control the actions of others, only your response to them.

</comment><comment><USER4> Interview with more companies</comment>


Python community request to postpone breaking changes in Python 3.9 to 3.10 - <AUTHOR> https://email@example.com/thread/EYLXCGGJOUMZSE5X35ILW3UNTJM3MCRE/ <comment><USER2> > So in 3.8, they kept code that had deprecation warnings so that they could > be compatible with 2.7. They'd like to now drop that code and be 3.9-only > compatible, but they don't have enough time to do that because they couldn't > start that work as long as they were supporting 2.7.

> So the dilemma is essentially how hard we push users to abandon 2.7 -- how > much tax we incur on them for keeping its support.

Its fascinating to see how the details of Python 2.7 EOL are still being figured out, and nuisance of the decision are still being debated.</comment>


The case for privatization of everything - <AUTHOR> https://www.youtube.com/watch?v=AqvRgl0mUWo <comment><USER2> I really reject his founding principle around the value of efficiency. The efficiency he declares as better appears to be in the axis of production of wealth and takes no consideration for the distribution of that wealth.

The idea that everything should be privatized for the efficiency (and later other reasons) is just broken in its own right.

I also really don't like how he repeatedly throws out "commies" as an insult.

This guy reminds me of the "architect of Gilead" in the handmaid's tale. He is obviously a smart, abstract, theoretical thinker, but they're so abstract that they wind up being reducto-ad-absurdum.

I shudder to think there are people in the world that take this guy seriously. (To say nothing of the Mises Institute, who appears to have a crazy amount of money with which to spread this stuff)

<comment><USER2> I think the thing that gets me most about his argument is the ignorance of nefarious actors and monopolies.

It isn't reasonable to say "free market, they'll go out of business" if real people need to suffer while they do that.

Look at Comcast for example. When and where in history has an entity like Comcast gone out of business? How many people suffer under one or more of their "policies"? Who can step in to challenge them? Why are there no challengers in any markets?

After all that, he talks about all the rules that these systems run by, who enforces them? Which organizing body holds them or updates them? If all taxation is theft, how are laws compiled and how do we ensure fairness and equitable access?

This guy like so many other economists seem to work so far into the realm of theoretical and philosophical systems, there appears to be no accounting for _major_ flaws.

How do you deal with a warlord who rises up to claim all the roads in a tiny fiefdom without taxes?

In his examples of interpersonal violence how does he defend himself? That soft squishy old intellectual with lots of resources? How is he protected in his libertarian utopia?

How does it not devolve into an oligarchy or a dictatorship?

<comment><AUTHOR> > It isn't reasonable to say "free market, they'll go out of business" if real > people need to suffer while they do that.

Real people will suffer even more if these corporations don't go out of business. The worst scenario here would be a monopoly enforced by the state that you cannot escape.

If they go out of business then at least you've gotten a chance to reset and hopefully apply previously learnt lessons.

> How do you deal with a warlord who rises up to claim all the roads in a tiny > fiefdom without taxes?

Why do you assume that only the state can provide security? This was the original sin. There are many ways in which this is possible in a free market environment.

> When and where in history has an entity like Comcast gone out of business? > ... Who can step in to challenge them?

There is no problem with monopolies unless they're state enforced. Businesses grow because they serve their customers well unless the state intervenes.</comment></comment></comment>


Show HN: Paul Graham Markov Chain Autocomplete for Twitter - <AUTHOR>

Start a tweet with @letpgfinish, and it will be finished as if by Paul Graham himself.
This was a weekend project I undertook with a couple of friends just for fun.  The original one was @letkanyefinish, so you might like to try that out too... in fact, it seems to work much better (funnily enough, there's a definite inverse relationship between literacy of bot and literacy of its human counterpart).
Anyway, the output is based on pg's essays and various tweets/quotes.  Having used HN silently for a while, we thought we'd share this - so hope you enjoy :) <comment><AUTHOR> Links to try them out:

[https://twitter.com/letpgfinish](https://twitter.com/letpgfinish) (Paul Graham)

[https://twitter.com/letkanyefinish](https://twitter.com/letkanyefinish) (Kanye)

</comment><comment><USER2> this is pretty good given the length for the return message is limited & answers are (usually) long.

        me: What should I do first?
        pgsays: what should I do first? - Get ramen profitable.

        me: Lisp
        pgsays: 'lisp programmers divide up their minds,
                 and excessive dilution in series A stage.'

        me: Computer language
        pgsays: 'computer language choice for founders
                to read is Dale Carnegie's How to hack
                also means that when you can tell them they'

        me: hackers, geeks & nerds
        pgsays: 'hackers, geeks & nerds should be
                 just as worried about premature design
                 - designing too early what a program
                 should do'

<comment><AUTHOR> Haha, yea - although perhaps not quite ready for me to start following his advice ;)

</comment></comment><comment><AUTHOR> Okay, so it looks like the pg bot spouts complete startup gibberish... Kanye is doing much better though

</comment><comment><USER3> This is a cool weekend project! Do you have the source available?

<comment><AUTHOR> It's not available publicly just yet, but we'll put it up if you're interested</comment></comment>


Forget TrueCrypt, use self-encrypting drives.  Gear-level crypto.  - <AUTHOR> http://www.seagate.com/www/en-us/products/self-encrypting-drives/

<comment><USER2> This does not compute. The linked page says _"Seagate Secure™ encryption hard drives keep your data safe even if your drives are lost, stolen, or misplaced."_ This and other documentation, including the FAQ at [http://www.seagate.com/docs/pdf/whitepaper/mb605_fips_140_2_...](http://www.seagate.com/docs/pdf/whitepaper/mb605_fips_140_2_faq.pdf), constantly refer to physical drives getting out of users' control.

That FAQ describes the levels of security defined by FIPS 140-2 as:

> Level 2 requires role-based authentication. (Individual user authentication > is not required.) It also requires the ability to detect physical tampering > by using physical locks or tamper-evident seals.

> Level 3 adds physical tamper resistance to disassembly or modification ....

> Level 4 includes advanced tamper protection and is designed for products > that operate in physically unprotected environments.

Why is this not Level 4? Theft or loss are situations in which the product is in the most physically unprotected environment possible. It's in your attackers' clean room or EE lab, having the TPM die exposed, the keys read out, and the controller glitched to decrypt all the data.

Why wouldn't/couldn't Seagate get Level 4 protection for this device?</comment>


Generators in Firefox now 22 times faster - <AUTHOR> https://wingolog.org/archives/2014/11/14/generators-in-firefox-now-twenty-two-times-faster

<comment><USER2> On an aside: what javascript really needed was async/await instead of generators. I have no clue why something as abstract as generators is being pushed.

I mean the bane of javascript is the whole async programming with callbacks. Instead of solving the specific problem, this solves some problem which I don't see most apps having. Can someone in the know how care to explain?

<comment><USER3> generator = async

yield = await

Also, async/await themselves have a proposal accepted into ES7: [https://github.com/lukehoban/ecmascript- asyncawait](https://github.com/lukehoban/ecmascript-asyncawait)

<comment><USER2> From what I can tell, The generator pattern requires you to make all your functions generators. My understanding is that you can use yield only inside generators.

For example, var data = await downloadSomething();

function *downloadSomething() { // check somethings

        return await http.get('foo.com', function (result) { yield result; });

}

The above won't work since the callback to http.get is not a generator.

You cannot make the callback a generator because it's not what a http.get expects. AFAIK, you have to instantiate a generator unlike a normal callback.

Did c# actually require all the code to be changed into generator functions/new syntax to support await/async?

<comment><USER4> > My understanding is that you can use yield only inside generators.

Async/await has identical limitations. You cannot call an async function from a synchronous one. Asynchrony poisons the entire callstack—everything that calls you must also become async.

> Did c# actually require all the code to be changed into generator > functions/new syntax to support await/async?

I'm not sure if C# has this limitation, but if not, it's because C# has threads. If you call an async method from a sync one, it can just pause the sync one and run the async one on a different thread. JS can't do that.

<comment><USER5> This is only true if you are building the implementation of async/await as a compilation hack (maybe a "transpiler", as people now like to say) rather than as a feature of the virtual machine. You don't need "threads" to implement this, you just need the ability to work with multiple stacks and then have use the techniques from coroutines. (Some people call this "green threads", but that's not the kind of "threads" you would refer to when saying C# has threads.)

I imagine the reason they avoided doing this was to not require browser vendors to make half their browser internals safe for usage in reasonable coroutines ;P. I can also see them having wanted to guarantee that the feature could be implemented using a transpiler rather than requiring it to be a native feature of the browser, and generators being explicitly marked at both the declaration and call sites (or async await with the limitations you mention) have that property by allowing a continuation passing transform to be applied to the generator's code. (Which could be applied to all code, of course, but not native browser code. edit: Well, you could so that as well, but it would violate other assumptions about how the code is supposed to work, and isn't something anyone has infrastructure to accomplish ;P.)

<comment><USER6> To condense what you're saying to its core: you can avoid the need to make callers async if you simply make everything async.

In essence, that's the choice Go made. It's certainly simpler for the programmer. It probably makes optimization trickier, and it probably makes efficient parallelism harder (since real threads are completely abstracted away, the VM needs to understand when to start real threads, and when to use promises).

For a language like javascript, it sounds like these tradeoffs are certainly worth it.

</comment></comment></comment></comment></comment></comment><comment><USER7> The author shows a micro benchmark in which the state of the generator is a single variable and discuss the history of generators from the first tier (interpreter code) to the second tier (using the Jit). Perhaps some more complete examples with should be analyzed since the case discussed here seems to be the simplest and so the 22 times faster perhaps doesn't hold except in very simple cases.

<comment><USER8> The benchmark is mostly superfluous anyway. It's enough for me to know that generators no longer bail out to the interpreter.

</comment></comment><comment><USER9> Of course generators are completely unusable until other browsers start to support them.

That is, unless you use a compiler to convert your generator code into more mundane javascript [1]. It would be nice to see these "emulated generators" in the comparison too.

[1] [https://facebook.github.io/regenerator/](https://facebook.github.io/regenerator/)

<comment><USER10> Generators will be on by default (not behind a flag) in Chrome 39, which will be released to stable in the next couple of weeks I believe.

[https://www.chromestatus.com/feature/4959347197083648](https://www.chromestatus.com/feature/4959347197083648)

<comment><USER9> But what about IE?

<comment><USER11> IE is lagging behind, as usual. See the HTML5 Test.

<comment><USER12> That's not true. If you look at [http://kangax.github.io/compat- table/es6/](http://kangax.github.io/compat-table/es6/) you'll see IE11 preview (their "canary") has more green than any other browser including Chrome or Firefox. Yes, even more than Firefox nightly or Chrome canary.

<comment><USER13> > _their "canary"_

while that's sort of true, the big distinction is that the features in their "canary" aren't going to hit "stable" for another year or so, which is a lot of iterations of Firefox and Chrome in the meantime.

However, it is fantastic to see where they're headed with IE12.

</comment></comment></comment></comment></comment></comment><comment><USER14> Nowadays, every time!, I am hearing some news about Firefox getting better, I feel that's a lie. I feel Firefox is actually getting worse and worse, from disappointment to disappointment. Either when it's a new feature or new UI modifications (I loved to have a separation between the URL and the Google search != Chrome), or new web services (Mozilla "Labs"?), or new dev. tool (Firefox inspector is at best full of small bugs and seems to be an ugly copy and paste from Firebug). Hopefully the Mozilla CEO being fired will make things better but I feel now being mediocre it's new culture trend @ Firefox.

<comment><USER15> I'm not sure I completely agree... Honestly, there are many developers each working on stuff they are either required to do, or want to do. The only time I find the unibar in chrome annoying is when I'm searching for something specific to google... and effectively have to type google twice (first time sets the search site to google).

As for the developer tools, I do wish it was closer to either the chrome dev tools or firebug myself, it looks too much like the IE10+ tools, which I find annoying. But that's a matter of preference.

This is a matter of raw performance, not a subjective UI.. FF has made a lot of effort into improving JS at its' core... Chrome has worked to expanding the DOM in interesting ways. IE has taken a pragmatic approach to refining what comes from both, though having their own issues. The browser ecosystem today is so much better than it has ever really been, and I couldn't be happier about it.

You can relatively easily create your own skin against a Firefox base. AFAIK it's still all XUL wrapped around a web view, and pretty easy to get into, admittedly last time I tried was 6+ years ago. Chrome is still my favorite browser, but I do appreciate what the others are doing... the best ideas do get copied, and it works.</comment></comment>


Facebook worker living in garage to Zuck: challenges are right outside your door - <AUTHOR> https://www.theguardian.com/technology/2017/jul/24/facebook-cafeteria-workers-wages-zuckerberg-challenges? <comment><USER2> "the couple were among about 500 Facebook cafeteria workers who elected to join a union, Unite Here Local 19."

Hence, the Guardian article.</comment>


The Mandelbrot Set by A. K. Dewdney (1985 Scientific American article) - <AUTHOR> http://www.math.uwaterloo.ca/navigation/ideas/articles/mandelbrot/index.shtml

<comment><USER2> I came across the article in "The Magic Machine". [http://www.amazon.co.uk/Magic-Machine-K- Dewdney/dp/071672144...](http://www.amazon.co.uk/Magic-Machine-K- Dewdney/dp/0716721449)

I seem to remember doing a very blocky Mandelbrot set on a 286. Good times!

</comment><comment><AUTHOR> Did you read this article in 1985? Did you code your own Mandelbrot Set program? For which computer? How fast was it?

<comment><USER3> My father read the article in 1985, and promptly wrote a program that used the fancy-pants dedicated hardware of the computer vision systems he worked on at the time. I remember going into the office with him when he had to work on a weekend; he showed me how he was using something like $100k worth of parallel processing hardware to make a little gray-scale Mandelbrot set.

His first response to any new system is still to write a Mandelbrot generator. When he semi-retired from his position doing system-level C stuff a few years ago, he decided to give Java a try. He occasionally emails me video explorations of the Mandelbrot sets he has generated. I have a photographic print he made hanging up on my wall right now.

First time he tried to get them to print out one of his images, the person at the one-hour photo at Wal-Mart told him the picture was unprintable, despite multiple tries. The multiple 8x10s were retrieved from the waste basket, and my father got three for the price of one.

</comment></comment><comment><USER4> I was expecting a parody of Peter Mandelson, somehow.

</comment><comment><USER5> If you like Dewdney try to find a copy of 'flatland'.</comment>


Kodak directors awarded RSUs prior to 'blockchain' rally - <AUTHOR> https://www.marketwatch.com/story/kodak-stock-pulls-back-directors-disclose-acquisitions-prior-to-blockchain-rally-2018-01-11 <comment><USER2> When I initially heard "derivatives", I assumed a bunch of board members bought calls right before the news. Off to jail with ya!

Oh, they were actually issued RSUs that vest a year from now? _phhht_ , KODK will have long since fallen back to earth by then. If there is a tempest over this, it'll fit in a teacup.</comment>


14 Year Old App Developer {Shovel Bird} - <AUTHOR> https://itunes.apple.com/us/app/shovel-bird/id879300258?mt=8

<comment><USER2> My thoughts - I'm going to be super blunt to you: You've contributed nothing at all other than repeated app store links, and everything you've made is a ripoff of something.

I'm a kid too - what you're doing spamming knockoff apps while using a title like ^ accomplishes nothing but makes people dislike even more.</comment>


Ask HN: To delay or not delay, that is the question? - <AUTHOR>

Been working on a big project since October, after building it originally it needed to be rehashed for usability. I'm still working on that now, but I'm frustrated with the way I programmed it. Should I stick it out and release, then rebuild if it proves to be worth while, or change it now and further delay release? <comment><AUTHOR> The code is overly complicated and overly extensive, I could probably rebuild it with half the code and make it so much better. But I've been delaying as it is....

<comment><USER2> Having faced the same situation in the past, I encourage you to simply release it. No need to spend months upon months improving the backend while no one is using the damn thing.

How long has the refactor been on your mind? Has it been at least a month or two? Has your mental picture of the rebuild been consistent, or does it change week-to-week?

Here's my advice to get you going: Write down your general refactor plan in detail. Next, create a todo list / timeline that gets you to production deployment as quickly as possible based on your current codebase. Focus on other things a bit. Launch, marketing, etc.

Once this thing has been out in the wild for a bit, reassess that refactoring plan you wrote down and see if it still makes sense based on your application's performance - both as a product, and as a piece of software.</comment></comment>


The Pirate Bay down after police raid in Stockholm Sweden today Dec 9 - <AUTHOR> http://www.smp.se/nyheter/tt_inrikes/it-razzia-hopkopplas-med-pirate-bay(4564961).gm

<comment><AUTHOR> Google link to English translation:

[https://translate.google.se/translate?sl=sv&tl=en&js=y&prev=...](https://translate.google.se/translate?sl=sv&tl=en&js=y&prev=_t&hl=sv&ie=UTF-8&u=http%3A%2F%2Fhd.se%2Finrikes%2F2014%2F12%2F09%2Fit- razzia-hopkopplas-med-pirate%2F&edit-text=&act=url)</comment>


3D Flipbook Library released - <AUTHOR> http://www.joerezendes.com/projects/flipbooklibrary/ <comment><USER2> An absolute killer gift idea for the person who has everything-create a web- based flipbook of family photos</comment>


You Are Not Late - <AUTHOR> http://kk.org/thetechnium/2014/08/you-are-not-late <comment><USER3> February 2004 I was a third year CS student in Boston. I remember complaining to a friend of mine that we had missed the boat - Yahoo, Amazon, etc - the web had matured without us and the window of opportunity was closed. If only we had been born 5 years earlier! As fate would have it, that was also the month I signed up for an account on a tiny site called thefacebook.com.

Domains. Google. Facebook. Pinterest. Uber. Bitcoins. It's so easy to feel like you JUST missed the wave. While you look back with anxiety at the wave you missed, you increase your odds of missing the next wave headed straight towards you. And there are always more waves. I had to learn this the hard way, after many missed waves and a lot of anxiety. So now I do what the article says: try to remind myself that the web's best days are ahead of it and there is likely more opportunity now - today! - than ever before. Calm down, take a deep breath and look to the future. Whether it's true or not, who knows, I guess time will tell, but it definitely helps keep me sane.

<comment><USER4> And how many get stuck on "false waves", I.e. survivorship bias. Sure, there are more waves, but the ability to spot a wave is incredibly difficult.

Why not just stop everything you're doing now and invest in ethereum?

What would be really interesting is to calculate some kind of first derivative of a wave so as to know what the optimal risk/reward tradeoff is.

Or perhaps to know what the density of false to true waves are. For example I imagine everyone knew about the potential opportunities during the gold rush. What can we say about the potential opportunities now?

</comment></comment><comment><USER5> The Internet is not just a technical innovation; the Internet is perhaps the greatest _social_ innovation of all-time.

For the first time in human history almost everyone on earth is instantly connected. This changes _everything_. Sometimes I'll just sit and think for hours about how different this makes the world we live in. We're playing by a completely new set of rules -- we're playing a completely new game, and even the most innovative people on earth are just barely starting to make sense of it all.

I think we're barely even scratching the surface of what's possible and what is to come.

It's not as obvious as you would think - consider any of the great companies of the past 10 or so years. If they had never been founded, it probably wouldn't be painfully obvious that we need them. It only becomes obvious in retrospect that we were actually in dire need the whole time.

Or look around the room you're in. What will change under the circumstances where everyone is instantly connected to each other and simultaneously to the largest data store the world has ever none? I can imagine ways that almost everything in the room I'm in now will be different. Most won't be good startup ideas, but I would venture a guess that some would.

We're all treading on very fresh ground. This is only the beginning.

<comment><USER6> "almost everyone on Earth"? Not even close: [http://www.internetworldstats.com/stats.htm](http://www.internetworldstats.com/stats.htm)

</comment></comment><comment><USER7> The difference now is that it's much harder. The overall competence and just general knowledge level is higher. Sorta like physics - essentially no one is going to make a discovery today just sitting around and thinking, unlike hundreds of years ago. Even comp sci: look at the algorithms that are named, coming from the 60s or 70s. You could invent them just by thinking about a problem. (I did exactly this. I spent a month designing some information retrieval code, because I've got no education, and then my friend pulls out a textbook and shows me my work, down to the same drawings.)

It's a good sentiment, because there still is tons of stuff out there still waiting. And not going out there and doing things is a sure way to not get s hit. But it's certainly more crowded and expectations seem a lot higher these days.

<comment><USER8> That's only really the case in mature fields (e.g. compsci), but the article pointed out several newly emerged fields, where yes, you could well create a significant discovery just by sitting and thinking about it (providing you have a decently broad background knowledge).

<comment><USER9> This finally has really hit home for me while getting neck-deep in the crypto- currency world, and in particular the realms of "smart contracts" and "DACs". In that world, even the most straightforward things have yet to actually be built. We haven't even solved the easy problems yet, much less the hard ones. I'm honestly more worried about being too early than too late.

The problem is that most people haven't even heard of these fields, and the ones that have generally aren't that interested. And they very well may be right to not care. In retrospect, it's obvious that the internet was a huge deal, but in the 80s it was entirely possible to be skeptical of whether the average person had much use for accessing other people's computers.

My recommendation is therefore to research the various things happening at the fringe of modern technology, and see what catches your eye. There are great strides to be made in a variety of fields, and one or more of them might turn out to be important. At the very least, it'll be fun.

</comment></comment></comment><comment><USER10> Charming, feel-good piece for all the devs in the room, I'm sure.

But here are some other things to think about.

The availability of this cheap, ubiquitous networking technology is intimately linked to the availability of _extraordinarily_ cheap energy from carbon-based fuels as well as cheap manufacturing in various emerging markets. How many more years of that do we have? Let's not forget too that the planet keeps warming up in spite of us.

Next, there are plenty of folks out there who seem keen on changing this giant network into a tiered shopping-plex. All of this optimism about the future is implicitly dependent on a neutral network. Is there anyone on this forum who isn't gravely concerned about the damage that will be done to free enterprise if network neutrality (in the most generic sense) is lost?

Finally, there is a solution space to consider here. All of the incredible dev that has been possibly in the last few years has been made possible because the barriers to entry have been brought down by things like online tutorials, IDEs, high-level languages, and object-oriented frameworks. It might be the case that there are is a limiting number of interesting problems that can be solved without the need for more complex technical work, which might proceed at a far slower pace than we've becoming accustomed to.

</comment><comment><USER11> Fantastic. It's never too late to build or start something. I here a lot of this from 30+ year old entrepreneurs ("but he's 23 fresh out of school" or "am I too old?" \- NO! Not even close. The 23 year old with the traction and venture money is a) extremely lucky and b) doesn't know half of what you know!)

An inspiring little feel good article here for those 16 hour days when you just hit your head against the wall. Or for when you need a little inspiration.

Author is right - even in 2025 so many products will have been invented today and tomorrow. Does anyone really think Snapchat will be around in 10 years? The Internet is still in its infancy. Sure, we can communicate with multimedia and watch streaming video but think of the myriad of problems and challenges facing modern day society? Endless and endless opportunity. From biotech, hardware and sensors, energy, communication, health care, VR, AI, machine learning, etc. - all very, very early problems to work on. Each of which will create dozens of profitable and dynamic technology companies.

We have to work on the future and use the amazing platforms currently in place to make something that lasts and makes an impact. I remember 5 years ago what a royal pita it was to setup a physical webserver + app server. Nightmare. Now, it happens in a click. The platforms are getting better in better for entrepreneurs to build on top of them.

This is exciting and should be exciting for anyone and everyone who has a passion to build something. And the future is not 20 chat apps, 20 youtube's, or 20 e-commerce sites selling subscription underwear. The future is wild ideas, things that seem strange and things that don't even seem possible today. But seemingly impossible ideas on the surface today are the ideas that leave a mark in the future.

Let's get nuts.

</comment><comment><USER12> This is the single best article I've read that explains why I'm writing the novel I'm writing.

It's called Solarversia, and it's about a game played in Virtual Reality by 100m people in the year 2020. I'm going to publish it on the same day that Oculus Rift goes on sale to the public, and plan to make the game for real by using the profits from the book / film to form a company (the same one mentioned in the book). My entire marketing plan is based around the book and my lofty (naive / innocent / stupid) aim is to create "the" VR app, or at least one of the VR apps that everyone knows and loves.

It's the first time in my life (I'm 38) that I feel like I'm ahead of the curve on something. Exciting times.

<comment><USER13> You should read "Ready Player One" if you haven't already. The VR in the book is called Oasis. It might give you some ideas to go with yours:

[http://www.amazon.co.uk/Ready-Player-One-Ernest- Cline/dp/009...](http://www.amazon.co.uk/Ready-Player-One-Ernest- Cline/dp/0099560437/ref=sr_1_1/275-2691187-5632453?ie=UTF8&qid=1413121559&sr=8-1&keywords=ready+player+one)

Best of luck, man.

<comment><USER12> Hey, sorry the late reply! I already read RPO as soon as someone else told me about it, and I absolutely loved it! Thanks so much for mentioning it. I'm even going to brand Solarversia as:

"Hunger Games meets Ready Player One"

(but someone told me it work better using Hitchhiker's Guide as more people know it.)

</comment></comment></comment><comment><USER14> I've been too early a few times. I was working on secure operating systems in the late 1970s. Proof of correctness in the early 1980s. My major work on the Internet was in the early 1980s. I was working on robotics in the 1980s, and legged robots in the 1990s. I was working on automatic driving in 2003-2005. I figured out how to stop search spam in the 2000s. I have issued patents and published papers on most of this. None of this generated much money.

(Fortunately I also did one of Autodesk's early products, and got pre-IPO stock because they couldn't afford to pay me. I also did the first ragdoll physics engine that worked, and made money off of that.)

In some ways, it's harder now, because there are so many people doing stuff in computing. In the 1980s, the number of people who knew how to make a big program work was quite small. Now everybody can do that. The few people who knew anything about AI had been to Stanford, MIT, or CMU. Now everybody serious takes machine learning class, and you can download good code for it.

There's plenty of opportunity to make money out there, but much of what people are working on is, well, pretty banal. "The best minds of my generation are thinking about how to make people click on ads. This sucks." \- Jeffery Hammerbacher, Facebook.

Here's an opportunity to think about. Replace Facebook, and all the various messaging services and streaming video services, with a pay service that costs about $1 a month, with no ads. Computing has become so cheap that you can now undercut "free with ads" on price. Think of a social network as a package like Wordpress - host it anywhere, it talks to everybody else, and it just works. The authentication and spam problems are tough - solve them. There have been a few attempts at federated social networks, such as Diaspora, but the people behind them have no clue how to make them usable or popular. "Ello" is making progress on popularity, but their UI sucks and it doesn't do much. Fix all that.

If you want to do socially useful hardware, look into handheld medical devices. The medical industry tends toward big, heavy equipment designed by doctors. Dean Kamen has made a lot of money downsizing some rather clunky medical devices. Also, the UIs of systems used by doctors for medical records are awful. Doctors used to dictate medical notes. Now they have to type them, worst case on touchscreens. Make that work with voice recognition that understands not only medical terminology, but has access to the patient record for context.

Another possible area - the paperless police car. Cops hate doing paperwork. There's also a movement to make cops carry cameras. Come up with a system which takes the cop's video and audio, and fills in all the info a cop needs to book somebody. Tie the collected video and audio to that for later review if necessary. It would both help to keep cops honest and let them focus on doing their job instead of their paperwork.

So there are a few technically challenging things to do. Quit trying to find the next "Yo". That's like hoping to win the lottery.

<comment><USER15> _" The best minds of my generation are thinking about how to make people click on ads. This sucks."_

Love your comment but man, I really hate this quote every time it comes up.

The "best" minds _aren 't_ doing that.. they're working on the Large Hadron Collider, doing cancer research, coming up with pioneering surgery techniques, programming and landing robots on Mars.. the relatively small group of software engineers and data scientists working on pay per click advertising are nowhere near the top of the genius ladder.

Separate thing entirely, a great example of being too early I came across recently while reading a biography of Larry Elison was Larry Ellison and the "networked computer".. only 15 years too early with that one, alas :-)

<comment><USER16> agreed about "best" but in terms of population it's not a "relatively small group" it's the majority.

They are all working to sell stuff - digital marketing for other companies or having ads as a core income for a site. They don't need to be devising the advertising frameworks, they just need to be thinking "how to make people click on ads".

<comment><USER17> chippy, I'll agree with you about the population (the number of people working with the LHC or Mars landers---even indirectly, as the majority of Google employees aren't working on ads---is _tiny_ compared to say, the ad- and social-media-supported technical population of Silicon Valley), but I'm going to have to disagree with "best".

The cohort of people working on the LHC, cancer research, etc., is largely the same as the faculty of any medium sized or larger university. If you went to any research-oriented university, your professors were the ones doing that kind of research. Still impressed?

</comment></comment></comment></comment><comment><USER18> The thing about "late" is really "I wish I had seen that". But even if I had travelled back in time and left myself a note about Facebook I still am very unlikely to have built a billion dollar company - because I don have that brain / personality of Zuckerberg or Musk or Bezos or ...

So I do regret many turnings I did not take, but only because of a misguided hope that a turning would have made me a different person to the one I am. I was building an email to web page maker long before twitter, but I am still working for a living.

I need to learn how to build a company online by building a company online - and learn to accept my personality for itself.

</comment><comment><USER19> Turing award winner John Hopcroft[1] has a similar message about the future of computer science research[1]. He talks about how a lot of early CS research was to make Computer Science useful by focusing on languages and algorithms but how the focus is and will be changing.

Pretty cool topics like sparse vectors, zero-knowledge proofs and social networks with applications in biology and digital medical records.

[1][http://www.heidelberg-laureate- forum.org/blog/video/lecture-...](http://www.heidelberg-laureate- forum.org/blog/video/lecture-friday-september-27-john-hopcroft/)

</comment><comment><USER20> In the mid 80s I had shortly this impression that computer science and programming now are mostly done. It was when I had read the books (blue, green, orange and purple [http://www.world.st/learn/books](http://www.world.st/learn/books) ) on Smalltalk 80. OOP, large class library, UI, ... All done. What would be needed more?

<comment><USER21> Strong AI has a way to go.

</comment></comment><comment><USER16> Perspective.

That's what this great article delivers to us. We are not living in the most important exciting times in our respective fields. We've only just scratched the surface.

With a bit of perspective, and thought about how humans think, you will agree with me that we always think, at the time that we are living in, that the time that we are living in is the most important and exciting of all times.

It's not natural to think that in 100 years time things will be more exciting and important. It's not natural to think that in the 1980s, people were thinking that they were working on the most exciting and important times. It's not natural that we don't have perspective of the past and in particular the future, with regards to how the humans will be perceiving their present. But this thinking - that _right now_ is the most crucial time in history ever - <USER2> not objective - it's not true - it's because our brains lack perspective.

</comment><comment><USER22> If only I had the benefit of the perspective that a "2044 greybeard" presumably will have.

<comment><USER23> At least don't write the code in an assembly of your times :).

<comment><USER24> Yeah, those assembly-writing badasses making $500k at HFT funds are really hurting. :)

What you want to avoid is writing 2014 COBOL, and that's what typical enterprise Java is. There'll be jobs maintaining that stuff for a while... But little mobility into anything more exciting.

<comment><USER23> > _Yeah, those assembly-writing badasses making $500k at HFT funds are really > hurting._

Yeah, all ~100 of them.

Better normal Java than it's scripting counterpart though (the assembly of the web).

</comment></comment></comment></comment><comment><USER25> Hindsight is always 20/20\. If you'd only knew what you should be paying attention to now.

</comment><comment><USER26> I don't know, I think the past was definitely better but there is no point in thinking about it. You just have to move forward and not lose hope.

"The best time to plant a tree was 20 years ago. The second best time is now." \- Chinese Proverb

</comment><comment><USER27> Adding to this, for every new app, there are three new apps you can spin out of it. Take AirBnb, now there are dozens of AirBnb for X models. Uber? Dozens of Uber for Xs as well. AirBnb for boats, office spaces, parking lots. They all worked.

You could start an AirBnb for X RIGHT NOW. :)

<comment><USER28> Airbnb and Uber are the same model.

<comment><USER27> What do you mean? AirBnB is for renting out stuff that is actually yours, Uber is for getting something to you with the press of a button.

</comment></comment></comment><comment><USER29> That post was published by Kevin Kelly too on Medium a few days sooner. I wonder why he published it first there :o

[https://medium.com/message/you-are-not- late-b3d76f963142](https://medium.com/message/you-are-not-late-b3d76f963142)

<comment><USER30> I knew I had read this article before, but couldn't remember where. Thanks.

</comment></comment><comment><USER31> I always try to tell myself this. At the end of the day, I still think it partly still has to do with "luck". Who knew bitcoins could explode? Just strive now to find the next big thing is all we can do...

</comment><comment><USER32> Yes! We need More brains to focus on solving real problems: clean water, education, internet access, transparency, and less "Uber for X", candycrush, Rovios, facevook, etcetera.

</comment><comment><USER33> I've never heard anyone complain that they were too late to build anything cool.

</comment><comment><USER34> lower barriers --> more competition

</comment><comment><USER24> What I learned in my 20s is that I'm not an island. I may be a +4 or +5 sigma "visionary" (not to say that I am one) but if I refuse to learn the people- hacking skills necessary to make people like and trust me (and for a long time I thought that game was "dishonest", which was defensive rejection) then it doesn't matter. Strong teams beat brilliant individuals, so if you're the latter you _still_ have to understand the needs of the former (including how to build great teams in the first place).

The problem is that I see _tons_ of opportunity. OP is right. Anyone who thinks the important problems are all solved has no creativity and no clue.

That said, I'm not a 50x people-hacker, nor am I a 125x money-haver. The confluence of excellent people-hacking, resources, and visionary creativity almost never happens. So we have people like me trying to make people click ads, and an startup industry founded around the sale of techie cantrips to creatively crippled conglomerates.

<comment><USER35> Your first point here is critical. I've been lucky enough to get to know several extremely successful people (outside of tech), and while all of them are bright, they're probably about average for most of the people I went to high school and college with. The thing they have in common though is that they're all very good with people and got their starts through favors others did for them.

</comment></comment><comment><USER36> I think there's a real argument to be made that the attempts by corporate america to stifle and limit the internet could prevent the amazing future internet of 2044 from looking much different than what we have now. Latency, bandwidth, reliability, data transfer caps have all been problems for decades, and ISPs are actively fighting to keep them as problems or even to make them worse (pay us extra to access netflix).</comment>


A kind of map/reduce using CTE's - <AUTHOR> http://jc00ke.com/2014/09/09/a-kind-of-map-reduce-in-sql/

<comment><USER2> Wonder how this would look in MongoDB

<comment><AUTHOR> Probably much more mappy and reducey ;)

Actually, I'd be curious to see this done in another system too.</comment></comment>


How our favorite tech companies make money - <AUTHOR> http://rcs.seerinteractive.com/money/

<comment><USER2> UI is really cool! Learned some stuff I didn't know, for instance, Pandora still profitable? The source sited for Mint isn't very credible but kudos for including it. Finally, IMO, your footer can be incorporated in the header without being intrusive.

Very cool!</comment>


Ask HN: Moving to Bangalore from the US - <AUTHOR>

Can anyone comment as to what the job market in Bangalore might look like to a 26-year-old American with a couple years of "hard core"* JavaScript skils?
I'm interested in moving to Bangalore for a year or so, mostly out of curiosity. (If you must know, I'm relatively new to developing software processionally (2 years at a startup), and my life plan at this point is to roam around to an interesting combination of places and see what happens.)
On one hand, one of the senior developers I work with told me that American software developers are highly sought after in most of the world. On the other hand, the Bangalore Craigslist is offering $3.00/hr for PHP work. I've also heard that Bangalore is one of the more expensive cities in India, but I don't know what that means.
*Such as MVC browser applications and toy Node/CouchDB projects, as well as traditional web development and Arduino-level prototyping. <comment><USER2> You can get a new nice largeish 2 bedroom apartment with backup generator, swimming pool and gym(small) for about $450/month. You could also get something much more cheaper at $100/month which would be really low. The tradition is that the security deposit is 10*monthly-rent and paid before you move. Also its always month to month so there is no 1-year lease like in the US.

A new decent car will run you $8000 but you could use ezdrive.in or some cab service. Or you could buy a Nano for $2500 (or a second hand car) and get a full time driver for $140 a month. Maintaining a driver is a pain in the butt I've heard. Or you could just use Autorickshaws every day at $1 each way for a 45 minute trip. ($50 a month?) but they are a hassle.

Traffic is THE horrendous pain in the ass. Make sure your not driving at 8:10am - 10:30am or 4:30pm - 7pm.

Cellphone - you can get prepaid with the same number of minutes as Rupees. So 300 minutes would cost you $6. Also calls to the US are Rs.7/minute or 14cents/minute.

Vegetables are cheaper than the US. Fruits are about as expensive as in the US here unless they are in season. But you get exotic stuff from jackfruit to lychees.

Internet is like $30/m for really fast access. And Electiecity about $20/m max. Cable is like $10 for a bunch of channels including HBO.

Clothes and such are about 50% the cost of india for mid-range stuff. All medium-high to high end stuff is the same cost or more expensive than the US (and usually slightly cheaper looking for some reason).

Bangalore is full of pubs and clubs. I dont know about hte dating scene as I've never lived in Bangalore per se.

Interest rates are high. You cna get like 5% in a bank savings account here but I dont know if you can take it back wtih you and so on. You'll have to look that up.

Thats about it.

You should start applying before you move here so at least you have a process started. Also to get a VISA to work in India you might need a job offer. I dont know.

My brother works at zynga (in bangalore) so email me if you have a strong resume and want it forwraded. The decision to forward would of course be upto my brother based on your resume.

<comment><USER3> Godo one but here are edits.

~$450 would give you a starter place? Nothing fancy as the post mentioned.

$1/each way rickshaw is incorrect too

<comment><USER2> Hmmm I am right now IN bangalore.

My brother pays Rs 25,000 ($500ish) for a brand new 3 bedroom with swimming pool, gym, badminton court, 1/2 basketball court and backup generator. Its on Bannerghetta Road which is on the outskirts but its also where most of the new residential complexes are. Lots of young couples live here.

If I go to to his office by autorickshaw I pay Rs50-Rs60 which is $1.2 - $1.5ish ...

I dont know where your living in Bangalore but your probably gettign ripped off.

</comment></comment></comment><comment><USER4> > On the other hand, the Bangalore Craigslist is offering $3.00/hr for PHP > work

Not many use craigslist in Bangalore, that's why.

</comment><comment><USER5> Getting a good job in a startup shouldn't be hard for a JS developer like you. Check out <http://jobs.hasgeek.in/> You can also send me your resume and I will forward it to people I know.

<comment><USER6> +1 for the HasGeek job board. Kiran's done it very well. It's one of the best startup job boards I can find for India. HasGeek runs local tech events. There's one phpcloud coming up next month and another JS event in September.

Also if the OP and you don't mind :) InfinitelyBeta itself might be hiring a nice guy, atleast that's what your site says.

To the OP, if you can get a remote job and work 'from' India, there's nothing like it. But working for a local startup lets you to socialize with people here.</comment></comment>


Richard Clarke: China's Cyberassault On America - <AUTHOR> http://online.wsj.com/article/SB10001424052702304259304576373391101828876.html?mod=googlenews_wsj <comment><USER2> I've always wondered what the US would do if China started flying sigint surveillance planes along the edge of US territorial airspace. Or if Americans discovered that the Chinese had interception equipment in critical telecom switching stations throughout the world that allowed them to divert America's commercial and governmental communications to Chinese supercomputers for decryption.

There are a lot of things that America does to other countries that would be taken as acts of war if they were done to America.

<comment><USER3> _There are a lot of things that America does to other countries that would be taken as acts of war if they were done to America._

I have to call bullshit on this, sorry.

The Russians did this sort of thing all the time during the cold war: parking nuclear submarines off the East Coast, flying bomber runs along the border, reconnaissance -- the list goes on and on. On both sides. There was never an "act of war" Even the Cuban Missile Crisis (which did not have mutants, by the way) ended peacefully.

Look, I think it's great to point out there are two sides of every story. But this type of statement goes beyond a simple plea for "take a look at the other side, guys" and heads into propaganda territory, i.e. everything is mostly the same. So I had to call you on it. Let's not go there.

Why? Because this is a good topic. It calls into question the intersection of governments, technology, and rule of law. The whole point of the article is destroyed if you just say it's all the same. It's not.

Every bad thing in the world can't be erased by an over-application of equivocation. That kind of thing is for spinners. We head down this road next you'll be telling me that China owns vast hunks of ocean and various islands that everybody else says they don't.

<comment><USER4> Nations unfortunately engage in a lot of belligerant actions that can easily spiral out of control. The long term risk with the USA conducting operations in international waters around China - which they are perfectly entitled to do so - is that areas of contested territory such as the Spratly islands in the South China Sea could easily become flashpoints for needless conflict.

<comment><USER5> It is a flashpoint irrespective of whether we're there. That area has been contested for years. It's not belligerence on our part to attempt to maintain order.

</comment></comment></comment></comment><comment><USER6> Interesting paper, but not a smart approach. Well, a very ...uhm American approach to the problem. Unilateral.

Better would be to think about an internationally accepted (within the UN framework) mechanism to deal with these attacks. Define what is permissible and what is "over the line". Then define required actions and accepted sanctions when an attack occures.

Governments will always blame it on some "hackers". But a mechanism could define how a government MUST procede when a grave attack is carried out from within its territory. Maybe it MUST accept that law enforcement of the target nation has the right to check equipment used in the offending nation.

Overall, such an international mechanism should be set up to make it more difficult to sneakily carry our those attacks and hide behind some "hackers" accusation.

However, I doubt that the US would be willing to submit to such a mechanism. Because I believe they would be sitting more often on the offending site than on the target site. Until now, the US has not even submitted to the International Court of Justice (ICJ) and similar important mechanisms to stop and procecute attrocities against humanity committed during war. The US knows very well why they don't submit to such a court, of course. Same would most likely be the case for any international mechanism against government cyber crimes.

<comment><USER7> That's a terrible idea. The US and China both have UN veto votes.

<comment><USER6> No, they have Security Council veto votes. This has nothing to do with the UNSC.

However, it would only be useful if nations like the US and China could be made to participate, so negotiating this would not be easy. At the end however, it would be beneficial for all participants.

Now, why would it be a bad idea? Any argument, or "just because"?

</comment></comment></comment><comment><USER8> A while back my gmail account was hacked by someone with a chinese IP. It made me wonder.

What if they goal of all this is to build a giant database of identities and known passwords. Say the chinese govt has 50 million online identities each associated with an email address, and known passwords for each.

If they do decide to launch a massive cyber attack, it doesn't matter what security we have in place; they could just log in.

They wouldn't need to find backdoors, they could log in as customers to every major bank and start moving things around. It wouldn't matter if the banks caught it, the only way to stop it would be to shut down all transaction-- which would cause the panic the attackers are looking for.

They could do this with any public website, and with enough computing power and bandwidth, do it fast enough to really cause a problem.

Just imagine if they had 0.1% of all public logins and passwords.

<comment><USER9> Same thing happened to me last year. Freaked me out, I know that that password was the same for a few sites (I know I know but I keep a few levels of passwords) So they had to obtain it from one of those. I never received a message from anywhere telling me that my info had been leaked which means some sites I vist I can't trust. I have no way of knowing which.

</comment></comment><comment><USER10> Ya, that sounds about right. The sad truth is that defending our cyber space, or cyber space in general, is a Sisyphean task. No one can do it, least of all the government. There are just too many vectors of attack and too many targets and, frankly, not enough people who know anything about cyber-security. Even people who do know about security are routinely hacked, see Google, RSA, Lockheed, et al.

The only rational way to combat catastrophic cyber warfare is to disuade our enemies from engaging in it. Some say it has worked for us before, MAD[0] (note section on criticism, which obviously plays here). As mentioned in the WSJ[1] a few weeks ago:

"One idea gaining momentum at the Pentagon is the notion of "equivalence." If a cyber attack produces the death, damage, destruction or high-level disruption that a traditional military attack would cause, then it would be a candidate for a "use of force" consideration, which could merit retaliation."

This notion that a cyber attack could result in a real military response must be delivered to the highest levels of decision making throughout the world. We can only hope that the message is received.

Obviously, we must do all we can on defense but no defense will be foolproof. It is just not possible. Stating our intentions in the event of a devastating cyber attack is the only real option we have.

Everything short of national catastrophe should be dealt with in other ways. Industrial espionage is a major consideration but that should be taken to arbitrage at forums like the WTO. I'm all for free trade and everything it has to offer as long as there is an even playing field. At the risk of conflating issues I will simply say that China's ongoing espionage is an extension of unfair trading practices that work to create an uneven playing field between them and everyone else.

[0]<http://en.wikipedia.org/wiki/Mutual_assured_destruction>

[1][http://online.wsj.com/article/SB1000142405270230456310457635...](http://online.wsj.com/article/SB10001424052702304563104576355623135782718.html)

<comment><USER11> The pentagons posturing on using force in retaliation to cyber attacks, would be a hard sell [to the public] to ever actually perform one of these retaliations... Especially with such a prominent target as China.

Rather than an arms race in cyber-warfare, is it possible to work out why these attacks are occurring? A militarily non-aggressive nation (outside of its own borders) continuously attacking external targets for no reason, feels like we are missing some of the story.

<comment><USER10> I'm pretty sure the US public would require retaliation in the event of, say, a prolonged regional blackout, a breached dam, a meltdown at a nuclear facility or any other number of real world insanity caused by a cyber attack.

"for no reason" I'm sure there are reasons. LulzSec does it for the "lulz". China has their own reasons, whatever they are they are and we can sit and discuss them but there needs to be red lines. Figuring those reasons out does not mean we should not have a well known military posture in certain eventualities.

</comment></comment></comment><comment><USER12> "Cyber warfare" has far more in common with international espionage than actual warfare. China and the US have been constantly spying on each other for 65 years, maybe longer. Rarely do such actions constitute grounds for a war.

The big differences now is that the espionage extends to a significant number of non-government actors, and that there's a greater degree of plausible deniability to any attacks. Still, the Chinese are capable of physically blowing up a lot of American infrastructure (and vice versa), and the Chinese may be capable of disguising a physical attack as a terrorist attack.

Cyber-warfare is another vector allowing states to attack each other, but it's still less powerful than conventional warfare, and not that much more powerful than conventional espionage.

</comment><comment><USER12> From the article: "The targeting of specific U.S. officials is not something that a mere hacker gang could do."

This is patently false. Anyone could target a U.S. official, and many could even succeed. Nevertheless, the other arguments the article presents are sufficient to support its conclusion.

<comment><USER13> I assume he means that a large number of officials were individually targeted, requiring large numbers of hackers working in tandem.

</comment></comment><comment><USER14> Perhaps this kind of thing is going to eventually fundamentally change the way we build software? In most of the common development stacks is an afterthought if it's addressed at all. If even security "experts" are getting hacked something is deeply wrong.

<comment><USER15> This is the most important comment here, IMO.

What should we be doing about this, now, individually, collectively?

</comment></comment><comment><USER16> The Aurora attacks were followed by systematic penetrations of one industry after another. In the so-called Night Dragon series, attackers apparently in China went after major oil and gas companies, not only in the U.S. but throughout the world \---

One more "for" argument: in Asia, China's been accused by Phillippines and Vietnam, as well as Japan of aggressively invading their territorial waters, islands. Those areas are likely rich of oil. Actions such as sending war boats to damage fishing boats are a sign of China's ambition to seek more oil, oil and oil...

Relevant link: <http://news.yahoo.com/s/ap/20110614/ap_on_re_as/as_china_us>

<comment><USER17> Why make an unsubstantiated link between the hacking incidents and the South China Sea conflicts? The South China Sea has been a source of territorial conflicts though-out history.

In modern times there have been brief shooting conflict between China & Vietnam in 1974, and 1988 [1], and there have been numerous incidents since.

[1] [http://en.wikipedia.org/wiki/South_China_Sea#Territorial_cla...](http://en.wikipedia.org/wiki/South_China_Sea#Territorial_claims)

<comment><USER16> If you look at Paracel Islands, yeah, maybe China's close to it. But if you look at Spratly islands, which are very much territories of either Vietnam, Indonesia or the Phillipines. And China is to claim it? <http://en.wikipedia.org/wiki/File:South_China_Sea.jpg>

Plus, the attacks happened around Spratly islands, 2 days _right after_ Shangri-la Dialogue, with the participation of top military bosses, including Robert Gates, where China promised to use peace talks to resolve the problem.

My 2 cents here:

1\. China has always been a world of its own, it acts by its rules and what it promises is just what is says, what it does is another thing.

2\. China has become BIG, and worse, it IS aggressive. We'd better be prepared for a coming war, be it cyber or economical or traditional.

We might be under a much bigger threat than what the media could convey, like that picture by David Gothard [http://si.wsj.net/public/resources/images/ED- AN742_clarke_D_...](http://si.wsj.net/public/resources/images/ED- AN742_clarke_D_20110614180051.jpg)

<comment><USER11> War mongering ethnocentric bullshit.

China are aggressive in what they believe is 'their' territory, and nothing else. They have no (modern) history of invading or even being involved in other conflicts around the world. Most [large] countries could not boast a similar history.

On the UN security council they veto most aggressive action the US/England/EU press. If further pressed they generally abstain from the vote. Other than territorial disputes where do you get the idea they are 'aggressive' ?

China is out to protect it's interests just like every other nation. The worry is, they are big, and CAN protect their interests. The western super powers are not used to being challenged like this.

<comment><USER16> Yeah, even Napoleon Bonaparte once said: "China? There lies a lion, let her sleep, for once she's awake, she will shake the world"

Another point is, I can't remember who (pretty famous analyst) said this, but something like: "There's nothing wrong with China's getting richer and stronger. The only problem is China was once depressed by other countries like Japan, England... And like a child, when he grows up, he will take _revenge_ "

So China is not just-like-every-other-nation like you said

</comment></comment></comment></comment></comment><comment><USER18> I wonder what America's Cyberassault on China looks like?

</comment><comment><USER19> What useful `cybersecurity' legislation could you possibly pass? The only thing I can think of is "do not connect x, y, and z systems to the internet," but that still leaves plenty of ground.

</comment><comment><USER20> Both governments are on the same team...total Control........

</comment><comment><USER21> I don't know about anyone else, but I felt this article had the vibe of:

"Guys! The internet is dangerous! We NEED a way to turn it on and off! It's for YOUR safety!"

<comment><USER21> Well, I won't be surprised when the powers-that-be put forward a plan for a "method" to cut us off from the rest of the internet. And it will be accepted, because they'll have convinced the public there are too many harmful cyber attackers out there. National Security, don'tcha know.

<comment><USER8> Cutting us off from the rest of the world doesn't work, b/c it would be easy to deploy a botnet inside the US.

<comment><USER21> It's also tremendously easy to detonate a bomb on American soil a kill a lot of people. Yet they're still strip searching small children and hammering us with radiation at the airport.

I don't think they care much about logic....

</comment></comment></comment></comment><comment><USER22> This is just scare mongering nonsense. WSJ just keeps getting better and better.</comment>


Announcing Flatpak – Next Generation Linux Applications - <AUTHOR> http://flatpak.org/press/2016-06-21-flatpak-released.html <comment><USER2> "Flatpak is designed to run inside a desktop session and relies on certain session services, such as a dbus session bus and a systemd --user instance. So, is not a good match for a server."

Well darn. I was hoping this would be a good way to package and install deployable artifacts in a continuous delivery pipeline, instead of having to write separate build tasks for rpm and deb

<comment><USER3> I love how again and again we get a case of "we are not dependent on systemd, but we are" from the Gnomes.</comment></comment>


Show HN: WebGL Procedural Badlands - <AUTHOR> https://github.com/wwwtyro/badlands <comment><USER2> This is really gorgeous! Any chance of a high-level write-up on the techniques you're using?

<comment><AUTHOR> Thanks! Yes, I plan to; I'll put it here when it's ready: [http://wwwtyro.net](http://wwwtyro.net)

</comment></comment><comment><USER3> Only slightly related: I just rendered that on an hp chromebook. Computers these days are mad powerful.

</comment><comment><USER4> Great stuff!

</comment><comment><USER5> Thats great.</comment>


Reprogramming Government: A Conversation With Mikey Dickerson - <AUTHOR> http://bits.blogs.nytimes.com/2014/08/17/reprogramming-government-a-conversation-with-mikey-dickerson/

<comment><AUTHOR> FTA: " _One theme we've hit again and again is, when possible, use things that have already been invented. Use off-the-shelf products, not custom software. There are things that work in the private sector; there's no reason we can't use these in government, too._ "

Also: " _We're encouraging open-source software and access to government data everywhere it is possible to do it. In the campaign, we combined a lot of different data to create successful outcomes — open access to data is our best friend. The government has a ton of data. Nonprofits need to see it; the states need to see it._ "

</comment><comment><USER2> Mikey Rocks.</comment>


Curated list to achieve visibility for your product / startup - <AUTHOR> https://github.com/dehenne/awesome-visibility <comment><USER2> [https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html)

<comment><AUTHOR> ahhh sorry. _facepalm_ on me</comment></comment>


Google Best Place To Work Two Years In a Row Says Fortune - <AUTHOR> http://www.centernetworks.com/fortune-best-companies-2008-google <comment><USER2> In fact, it's the best place to work four years in a row and then quit promptly. Or so it seems anecdotally.</comment>


ReactOS 0.4.12 Released - <AUTHOR> https://reactos.org/project-news/reactos-0412-released <comment><USER2> Nope. Still won't install due to faulty USB keyboard drivers.

<comment><USER2> I see I've been downvoted for this message.

Downvoting won't change the facts. If the drivers _do_ work on some USB keyboards, but _won 't_ work on other USB keyboards, the USB drivers are NOT GOOD ENOUGH.

Note that I've said "won't INSTALL" so it may just be that the USB drivers available to the INSTALLATION aren't good, but the kernel's USB drivers DO work.

 _Either way, if you can 't install ReactOS, you can't use it._</comment></comment>


Markup validation of http://www.google.com - <AUTHOR> http://validator.w3.org/check?uri=http://www.google.com&charset=(detect+automatically)&doctype=Inline&group=0

<comment><USER2> Whenever I see things along this line, I think back to something a mentor and close friend of mine has said, repeatedly:

      You should never do this.  Unless you have a really good reason.

Do not think for one second someone from Google is going to see this and go, "Oh darn it, I knew I was supposed to do something before google went live."

</comment><comment><USER3> Virtually all of those are "use CSS instead" or "use & instead of &".

External CSS on Google's home page would mean billions of extra HTTP requests. Adding the amp; would mean terabytes of data transfer to fix something that works just fine in all browsers.

<comment><USER4>
      Adding the amp; would mean terabytes of data transfer to
      fix something that works just fine in all browsers.

If thats the case even more can be saved by optimizing the current version. Don't be blinded by the fact that it is Google: the code clearly shows that it is this way because nobody cares, not because it was thought out very throughly. Point in case:

      <input autocomplete="off" maxlength=2048 name=q class="lst" title="Google Search"
      value="" size=57 style="background:#fff;border:1px solid #ccc;border-bottom-
      color:#999;border-right-color:#999;color:#000;font:18px arial,sans-serif
      bold;height:25px;margin:0;padding:5px 8px 0 6px;vertical-align:top">

Could be just:

      <input autocomplete=off maxlength=2048 name=q class=lst title="Google Search"
      size=57 style="background:#fff;border:1px solid;border-color:#ccc #999 #999
      #ccc;font:18px arial,sans-serif bold;height:25px;margin:0;padding:5px 8px 0 6px;">

Even more, it could be just

      <input autocomplete=off maxlength=2048 name=q class=lst title="Google Search"
      size=57>

because there is already .lst in CSS section, why not to specify attributes there?

</comment></comment><comment><USER5> See <http://www.seoconsultants.com/validation/google/>

</comment><comment><USER6> I read somewhere that they would rather have the page load as fast as possible on all kinds of browsers rather then have a standards compliant slow loading page.

</comment><comment><USER4> Is my memory failing me or was there indeed the time when google.com had no DOCTYPE? That makes perfect sense if you are not going to adhere to any standards. I suppose the reason they have a doctype now is to force browsers into standards compliant rendering mode (it would be quirks otherwise). What baffles me why did they choose HTML5 doctype if they don't care about actually adhering to the spec. They can go with <!DOCTYPE google> and it will work just fine (any unknown doctype triggers standards compliant mode in browsers) without false claim of being compliant with some actual standard.

</comment><comment><USER7> Ehm, they are either using obsolete tags or failed escaped the & sign. Nothing to be worried about.

</comment><comment><USER8> How has this reached the front page :|

</comment><comment><USER9> It seems obvious to me, but I will point it out anyway.

The Google homepage contains all sorts of 'non-conformant' code, so as it supports legacy browsers which don't implement css properly, or require some sort of quirk for them to work correctly.

</comment><comment><USER10> This is probably related to a really old HN post: <http://news.ycombinator.com/item?id=677125>

</comment><comment><USER11> So if it's OK for Google to skip on standards, it's OK for the rest of us too. right?

<comment><USER8> It's a conscious business decision they have made, you can do whatever you want to with your business. As long as it looks right in all browser/os configurations I don't think your customers will mind.

</comment></comment><comment><USER12> Google is well aware and proud of that fact. They cut their bandwidth in half by not validating.

I was playing with jQuery in the dev console in Chrome yesterday on the Google homepage and realized that I was writing valid jQuery, but that $("body") simply didn't exist.

<comment><USER4>
      They cut their bandwidth in half by not validating.

Care to elaborate on this bullshit about cutting bandwidth in half? I just want to remind you that quoting attributes and leaving out some tags is perfectly valid in HTML5 and HTML4.01. Even in strict.

Converting their markup to the valid one would not be difficult, and they could even save some bandwidth. For example: drop those stupid attributes for body tag. drop <html><head> \- these tags are optional. Why do you waste precious bandwidth with <meta http-equiv="content-type" content="text/html; charset=UTF-8">? Your DOCTYPE claims that page is marked up in HTML5 so use it: <meta charset=UTF-8>. Drop thet method=GET from your form: it's default. Alias your document.getElementById: you repeat it 7 times what a waste. Etc., etc.

<comment><USER13> I have to imagine that Google.com is the most bandwidth optimized page EVER.

Big picture, the W3C spec is not what matters here. What matters is making the same HTML document render exactly across different browsers. So maybe they could drop <html><head> according to W3C, but does that break the document in other browsers?

My guess is that Google doesn't care about the W3C spec in this specific regard. What matters is delivering the smallest document possible that can be rendered by as many browsers as possible.

*Grammar edit.

<comment><USER4>
      I have to imagine that Google.com is the most bandwidth
      optimized page EVER.

Sure it is not, because I can see how it can be optimized even more — and that's just at a glance.

      So maybe they could drop <html><head> according to W3C, but does that
      break the document in other browsers?

No it doesn't.

      My guess is that Google doesn't care about the W3C spec in this specific
      regard.

Ok, it is their call. Anyone is allowed not to care, but why put doctype of existing standard then. Just put <!DOCTYPE foobar> or <!DOCTYPE idontcare> and be done with that.

</comment></comment></comment></comment><comment><AUTHOR> I would have expected better from google.

<comment><USER14> You're unintentionally hilarious. You know nothing about Google's technological challenges nor the decisions behind the various circumstances where they chose to ignore the standard.

I guarantee you that there are thousands of people working at Google who are:

1\. Smarter than you

2\. Know more about web standards than you

Seriously, get the hell out of here.

<comment><USER15> Please do not attack other users personally like this.

<comment><USER14> Rewrote a reply in response to your feedback.</comment></comment></comment></comment>


The Hunt for the Fastest Zero - <AUTHOR> https://travisdowns.github.io/blog/2020/01/20/zero.html <comment><USER2> Way back in my 6502 days I entered a competition for the fastest sieve program. My program had self modifying code running on the zero page. To reset the 8K memory the program employed 24k memory for the store instructions.

The winning entry left me in the dust - rather than zeroing the memory in the winning program's array was initialized with a template of the first few primes. There can be solutions that are even faster than the fastest possible zeroing.

</comment><comment><USER3> I've always wondered how much CPU time and memory bandwidth is taken up by the OS zeroing out pages before handing them out, as well as programs and libraries clearing chunks of memory.

I guess it's enough that I'm surprised that there's no hardware support for the memory system to support a way to handle it by itself on command, without taking up bus bandwidth or CPU cycles. Kind of like old-fashioned REP STOS but handled off-chip, as it were.

[Added:] Concerning various instructions for clearing whole cache lines in one go, you still end up with lots of dirty cache lines that have to be sent to L1, L2, ..., RAM (not to mention the stuff that was previously in those cache lines), so there's still lots of bus bandwidth being consumed.

<comment><USER4> Zeroing memory is probably already really fast compared to other things the system is doing. Something that happened to me a couple years ago: I was writing a benchmark that needed a lot of memory. I just used a vector<char> for that. Of course, the vector zeroes the memory, so I thought hey, I don't actually need it to be zeroed, so why not just use unique_ptr<char[]>? Well it turns out (and most people here probably know what's coming next) that when you reserve memory, you don't actually get any physical pages. They get reserved as you access them. And since apparently the access pattern was worse (or something to that effect), the benchmark ended up running way slower than it did without explicit zeroing, _even if I put the zeroing into the benchmark_ which it hadn't been previously. It turns out compared to reserving memory, zeroing was essentially inconsequential. So I'm not too optimistic that there are a lot of gains to be had here.

<comment><USER5> That's not actually what's happening.

When you allocate memory that needs to be initialized to zeroes, it doesn't actually allocate memory and zero it. Nor does it allocate memory without mapping the pages, and when a page fault occurs, allocate and zero it.

Here's what actually happens. Upon boot up, the OS allocates a page, zeros it, and marks it read only. When pages are requested in the future that need to be zero, it assigns an address and maps the zero page to it. This zero page could be mapped to hundreds, thousands of pages. If you try to read from the page, it happily tells you it contains zeroes. So you still haven't allocated new physical pages to that address, despite the fact that you're actively using it. Only when you try to write to it does a page fault happen. (because you're trying to write to a read only page) Then it allocates a new page of physical RAM, zeroes it, and gives you a real physical page to use.

It's clever hacks and abstractions all the down.

<comment><USER6> You're mixing up zeroing here, virtual memory is backed by physical memory and that is what is getting zeroed, in fact Linux recently got zeroing on free or malloc as a security feature.

</comment></comment></comment></comment><comment><USER7> If you're routinely zeroing this much memory and the performance matters, you might benefit from idle-zeroing it. That is, when you need to zero the massive block, just switch to a different block that has already been zeroed or partly-zeroed in the background. Whatever hasn't already been zeroed, finish synchronously. The background thread doing the zeroing would be scheduled with the lowest priority, so that it only runs when the system otherwise has nothing to do.

At first, I thought you might just want to get fresh pages from the kernel (which are always zeroed), but this answer convinced me that might not actually be faster because of the overhead from syscalls and fiddling with virtual memory [https://stackoverflow.com/questions/49896578/fastest-way- to-...](https://stackoverflow.com/questions/49896578/fastest-way-to-zero- pages-in-linux) . And Linux doesn't idle-zero or pre-zero pages (though I believe there's a switch to enable pre-zeroing for purposes of security hardening), so you're probably gonna end up with the OS doing a synchronous[1] zeroing anyway.

[1] Synchronous from when you actually first write to each page. My understanding is that when your process gets new pages, they're all mapped to a special zero-page and set to copy-on-write. So there is still some efficiency here in theory: you don't have a long wait for the entire range to be zeroed all at once and you never have to zero pages that you don't modify.

<comment><USER8> Is that how languages that always give you zeroed arrays (e.g., java) do it?

<comment><USER7> I doubt it. Needing to zero ultra large chunks of memory often enough that you care about performance to this extent is a very niche scenario. If I had to guess, Java probably just zeroes the memory upon garbage collecting it or before handing it back out; fresh pages from the OS are already zeroed.

But anything is possible. Maybe some big customer used this pattern and now Java detects it and does something fancy like what I suggested. But really, this is an unusual scenario for an application.

</comment></comment></comment><comment><USER9> This goes to show that sometimes it really pays to read the docs: the doc comment of "fill" says "For char types filling contiguous areas of memory, this becomes an inline call to @c memset or @c wmemset"...

<comment><USER10> arguably is still a standard library bug (or better, missed optimization). What triggers the optimization should be the value type of the range, not the type of the value to be filled in.

The issue here is a quirk of overloading rules: after template instantiations two overloads of __fill_a are available, one with a deduced 'int' type for the fill value type and another with a 'char' type. Both are perfectly valid instantiations, but the 'int' valued one is preferred by the partial ordering rules as it does not require a conversion.

I think this might easily be solved by making the type of the value to be filled in a separate template parameter even for the pointer variant.

Also, in addition to pointers, the memset optimization should really be applied for all contiguous iterators (for example std::vector::iterator).

Just use -O3.

edit: minor fixes and rewording.

<comment><USER11> > What triggers the optimization should be the value type of the range, not > the type of the value to be filled in.

As the article says, you have to do at least some checking on the type of the source value, because it could be a user-defined type with an overloaded implicit conversion operator (operator char()) that does something non- trivial. (I'm not completely sure that my comment contradicts what you've just said, but that's because I don't quite see what you're saying.)

<comment><USER10> Sure, but the enable_if<is_scalar<> > already takes care of it, I'm not suggesting taking the check away (although it might be possible to relax it to checking whether a type is trivially constructible and copyable). Now that I think of it you probably need to check that both the iterator value type and the value itself are trivially copyable, constructible and that the value is trivially convertible to the iterator value type itself. No wonder that the std library maintainers went for the easier way.

</comment></comment></comment></comment><comment><USER12>
      jmp memset

Classic plot twist.

</comment><comment><USER13> > If this were C, we would probably reach for memset

Actually I was thinking about bzero().

Seeing memset() made me smile :-)

<comment><USER14> Would you mind you explaining what you mean by that? I don't have much C experience, and don't understand what makes you smile.

<comment><USER13> It brings me memories from my old Turbo C 2.0 years ([https://en.wikipedia.org/wiki/Borland_Turbo_C](https://en.wikipedia.org/wiki/Borland_Turbo_C)) ;-)

</comment></comment></comment><comment><USER15> Author here, happy for any feedback or questions.

<comment><USER16> Your links in the article to the HN discussion point to a different submission, not this one.

<comment><USER15> Thanks, it got submitted twice it seems: the links are to the original submission. I'll update them to this one.

</comment></comment></comment><comment><USER17> Interestingly the std::array::fill member function is identical in the case of int or char, I suppose because there's only one overload of fill and it has to take the element type. No idea if the generated stosq is as fast as built-in memset: [https://godbolt.org/z/4iYGup](https://godbolt.org/z/4iYGup)

<comment><USER15> Recent glibc seems to use 'rep stosb' for largish regions of memset. At least for the numbers I give in this post, the ~30 bytes/cycle is actually coming from rep stosb inside memset.

The q variants (as opposed to b) are a bit of a grey area: Intel has this REP ERMBS thing [1] that promises fast performance for rep movsb and rep movsb specifically, but not for the w, d or q variants. However, I think all Intel hardware that has implemented it has implemented the d and q variants just as fast. It would be good to verify it though...

\---

[1] [https://stackoverflow.com/q/43343231](https://stackoverflow.com/q/43343231)

</comment></comment><comment><USER18> Daniel Lemire compares std::fill in C++ with memset in C in agreement with Travis Down [https://lemire.me/blog/2020/01/20/filling-large-arrays- with-...](https://lemire.me/blog/2020/01/20/filling-large-arrays-with-zeroes- quickly-in-c/)

</comment><comment><USER19> Thumbs up, but at least on macOS both is equally fast :-(

<comment><USER15> Probably you are using clang, right? As mentioned, clang does the _idiom recognition_ even at -O2.

Try at -O1.

If it's still fast at -O1, I guess the libc++ implementation is different (AFAIK clang uses libstdc++ on Linux but libc++ on OSX).

</comment></comment><comment><USER20> Types are meaningful. At least to me, the discovery would have been to be mindful of your types when invoking idioms you've learned.

<comment><USER15> Agreed, but it is especially insidious here because for integer literals like 0 or 1, etc - it is common to simply assign or pass those directly to other integer types, and 99% of the time, C++ does the right thing. Here it still does the right thing in that the code is correct, but you walk off a performance cliff.

</comment></comment><comment><USER21> another day, another reason I am glad I only know _some_ C++ idioms. If I had a byte-oriented block of data, it would never occur to me to use std::fill() ... because it would never occur to me use std::fill() for anything at all ! :)

</comment><comment><USER22> As an anonymous `mmap()` returns zeroed pages it's likely the fastest mechanism for large arrays.

<comment><USER15> The kernel doesn't really have any tricks that userspace doesn't have to zero arrays quickly. In fact, it is somewhat hamstrung when zeroing since use of SIMD instructions in the kernel is discouraged and generally avoided. It usually ends up using `rep stosb` which is nice and fast on modern Intel (up to 32 bytes/cycle for AVX-supporting boxes), so that's not currently a problem, but it was slower in the past.

Furthermore, this doesn't help you for repeatedly zeroing existing memory, which is probably the most important: are you going to mmap fresh pages every time you want zeros in there rather than just zeroing in userspace the memory you have?

<comment><USER5> This isn't actually true. The kernel has two giant tricks up its sleeve when it comes to serving zero pages: the kernel gets to decide what happens when a page fault happens, and it gets to decide what to tell the mmu.

At boot, the kernel allocates a physical page of RAM, zeroes it, and marks it read only.

Some time later, a user process requests a zeroed page. The kernel finds a new address in virtual memory, and tells the mmu to point that address to the zeroed page.

The user process reads from the page, and gets zeroes back, because that's what's in the zero page. And there's nothing wrong with reading a read only page.

Then the user tries to write into the zero page, and a page fault happens, because the page is read only. The kernel allocates new physical RAM, zeroes it, and updates the mmu mapping.

This doesn't appear to do any less work, but gigabytes of virtual memory can in 4kB of cache, because it's all the same page. So it's way faster. One of my favorite benchmarks of all time is creating an identity matrix by using malloc, memset(0) it, then assign ones to the diagonal, vs using calloc, (which as per its specification zeroes it) and assigning ones to the diagonal. Then comparing the run time of multiplying the two identity matrices by some other matrix. The calloc identity matrix is multiple orders of magnitude faster.

<comment><USER15> Sure, I know how the zero page works - so for "sparse" scenarios like your diagonal matrix examples, it works great.

You can of course also implement this trick in userspace, or at least without relying on the zero CoW thig on fault, e.g., by mapping /dev/zero.

Sometimes the zero page thing comes out worse: if you first read from a zero page and then ultimately write to it, for every page, you take 2x the number of faults.

</comment></comment></comment></comment><comment><USER23> Another leaky abstraction.

</comment><comment><USER24> Discussion on cpp subreddit [https://www.reddit.com/r/cpp/comments/erialk/the_hunt_for_th...](https://www.reddit.com/r/cpp/comments/erialk/the_hunt_for_the_fastest_zero/)</comment>


New Java 7 Language Features - <AUTHOR> http://loianegroner.com/2011/07/new-java-7-language-features/ <comment><USER2> I was waiting on how Java will implement closure (Project Lambda) but it was deferred :-(.

<http://openjdk.java.net/projects/jdk7/features/#deferred>

</comment><comment><USER3> it real wonderful and has a lot of potential</comment>