Hundred Year Mistakes - <AUTHOR> https://ericlippert.com/2020/02/27/hundred-year-mistakes/ <comment><USER2> I once asked my college professor about operator precedence in C. He had been writing C code in industry for decades.

"I have no idea" he told me.

He said many programmers try to make their code as short and pretty as possible, as if there was some kind of character limit. Instead of falling into that trap, he just used parentheses. And the order of operations never was an issue.

<comment><USER3> I agree with your prof, and have a peeve with linters that complain about unnecessary parens. They may be unnecessary, but they can sure be helpful for those of us who don't have the precedence tables fully embedded in our neural code scanners.

<comment><USER4> Even when I have no issues with the precedence order, I often add parens anyway because it helps with mental grouping at a glance, instead of having to scan and mentally parse the line.

<comment><USER5> A wise practice.

As a young egotist I would often omit parens in complicated C expressions. I did this intentionally and in a very self-satisfied way - writing multi-line conditionals and lining them up neatly without parens with a metaphorical flourish of my pen.

Then one day, chasing a hard-to-find bug, I realised it had happened because I'd mixed up the precedence of && and || in a long conditional. I was an idiot. Since then I've made a point of reminding myself that I know nothing and that there's nothing to be gained from pretending I do, and putting parens in everywhere.

Sometimes, even now, I get those grandiose moments when I think the code I'm writing cannot possibly go wrong. Those are the moments that call for a bit of fresh air and an extra unit test or two.

<comment><USER6> I heard an aphorism once I've tried to live by since:

It is twice as hard to debug code as it is to write it. If you write code as clever as you can make it, you will never be able to debug it.

<comment><USER7> Ironically enough, given the article, this is attributed to Brian Kernighan.

<comment><USER6> I'll try to remember the attribution as well as the aphorism in future, thanks :-)

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> _> The moral of the story is: The best time to make a breaking change that involves updating existing code is now, [...] It's fifty years since this mistake was made_

Another possible moral is: The languages that stay in use for fifty years are the ones that avoid making breaking changes. :)

<comment><USER9> Though I get the humour and agree with the sentiment, the history of C tells us that a language can massively succeed even with constant "breaking changes". One of the things I learned working at Coverity is that there is no such language as C or C++; rather, there are hundreds of mutually incompatible languages with those names. Almost no compilers implement any of the standards exactly, and there are so many standards to choose from. The vast majority of real-world line-of-business C programs are designed to work with a single compiler and are therefore never evaluated in terms of their correctness when ported to another compiler.

That said, the C# compiler team was and continues to be extremely concerned about breaking changes because we very clearly perceived the cost to customers and the barriers to upgrading entailed by breaking changes. I introduced a handful of deliberate breaking changes in my years on the C# design and compiler team, and every one was agonized over for many hours by members of the design team who were experts on the likely customer impacts.

</comment></comment><comment><USER10> Similar story: Stuart Feldman, the author of `make`, on why Makefiles require tabs by default:

> _After getting myself snarled up with my first stab at Lex, I just did > something simple with the pattern newline-tab. It worked, it stayed. And > then a few weeks later I had a user population of_ about a dozen _, most of > them friends, and I didn 't want to screw up my embedded base. The rest, > sadly, is history._

</comment><comment><USER11> Here's what clang does with this code ([https://godbolt.org/z/Ar2qt6](https://godbolt.org/z/Ar2qt6)):

      <source>:5:11: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
      int t = x & y == z;   // ?
                ^<comment><comment>~
      <source>:5:11: note: place parentheses around the '==' expression to silence this warning
      int t = x & y == z;   // ?
                ^
                  (     )
      <source>:5:11: note: place parentheses around the & expression to evaluate it first
      int t = x & y == z;   // ?
                ^
              (    )

Seems like a mostly solved problem.

<comment><USER9> The problem is "mostly solved" by adding a warning to a single compiler?

Sure, there are plenty of ways to mitigate the problem. That's not the point. The point is that the problem should not have arisen in the first place to require ongoing mitigation fifty years later!

<comment><USER12> What are you going to do about it? a) just use parenthesis like everyone else, or b) turn the time back to 50 years ago and change that?

Seriously, the article was just a rant. Yeah, people 50 years ago did something wrong. So what.

<comment><USER9> My blog is about the design and implementation of programming languages; by understanding the causes of past mistakes we can learn to recognize them again today. The best mistakes to learn from are other people's!

</comment></comment></comment></comment></comment></comment><comment><USER13> There's a similar problem that comes up in business often enough, where a change in your software leaves behind "legacy" code or data. When developing you almost always have to write things such that the new model and old model can live side by side, and customers using the old model can (at least for a time) just keep going while new users go on the new model.

Whenever a project like this is done, it's very tempting from a business point of view to just leave the "legacy" users / data alone. But, technically, all your code continues to have to support two different models. Yes, with the right abstractions you can make this work without being terribly painful, but in practice there are always rough edges.

The time and effort it would take to migrate the old stuff into the new format is high, and the perceived business value is low. In many cases the migration never happens, and the old code is never removed.

But the problem is, you are now paying a tax to deal with that old code for all time. Every time a decision like this is made, the tax goes up. The tax slows you down, and it makes all future work you do more complicated.

So, there is a game theory problem here: for each individual decision, it arguably makes more sense to leave the legacy case alone and move on. But if you choose that path every time, it is a mistake, because the costs compound.

So far, the only thing I've seen that prevents this is very strong technical leadership that ensures the migration is baked into the project and made non- optional to the business teams. That's really hard to do though, and arguably not always the right decision for the business, which may need to move fast _now_ just to survive.

</comment><comment><USER14> The operator precedence rules that are discussed here are a bit tricky and programmers could be excused to have to think a few secs before knowing how it was again. Therefore, it is better to use parentheses for these tricky cases. On the other hand, everybody should know without thinking that * has precedence over +, therefore, a * b + c * d should not have parentheses if it is intended to mean what is written. Parentheses would just be needless clutter in this case.

<comment><USER15> I know * and + precedence without thinking about it, but when I see it without parentheses, I can't help but pause to be sure I'm not having a brain fart, and then also question why it wasn't just put in parentheses. So I just put in the parentheses or split up the steps, every time.

</comment></comment><comment><USER16> Same thing about frame rates derived from NTSC, where e.g. 60 fps in not really 60 fps, but 60/1.001 fps. Those extremely inconvenient frame rates are ubiquitous in systems that have nothing to do with analog broadcast television (e.g. on your YouTube).

<comment><USER17> Pedantic nit: That's the field rate, not the frame rate. The frame rate is 30/1.001 fps. This is because NTSC is interlaced.

<comment><USER16> No, I really meant what I said. If you see a video that's labeled "60 fps", quite likely it's actually 60/1.001 fps. It applies to the entire 24/30/60/120 range.

<comment><USER17> I re-read, and your claim was "derived from NTSC", not that NTSC itself was 60/1.001 fps. So, yeah. NTSC itself was (30 frames or 60 fields) / 1.001. "Derived from NTSC"... yeah, that could be "60 frames".

</comment></comment></comment></comment><comment><USER18> I think the author discounts the cost of "there are only a few users, so it's not a big deal to have breaking changes". I think stability and the backwards compatibility of a tool are important considerations to make in "is this worth using?".

If a tool has a large community of usage, breaking compatibility affects a large number of users. If the tool doesn't have a large community, then a lack of stability means there's risk the tool won't in-future support current use cases, or that I'll have to spent much more time maintaining my use of it than with 'boring' tools.

It's fine for a tool in v0.x to have breaking changes. I think not supporting stable versions of a tool would make it hard to retain users in the long run, though.

<comment><USER19> Here's a counterargument: if a tool starts developing userbase, it's likely to have _even more_ users in the future. Up to a point, the more users it has, the more it will have. So a breaking change while the userbase is still relatively small can be justified on the grounds of making things better for a larger number of soon-to-be users.

<comment><USER20> I agree. People complain that Swift changed too much in the earlier versions but I'm glad it did and I'm kind of sad that it's slowed down now and there are things I wish could be changed but can't. Yes it was a bit of a pain but there were migration tools that helped. And that pain is long since forgotten.

</comment></comment></comment><comment><USER21> I think elaborate syntax is in itself a "hundred year mistake". I've been messing about with a language that uses Reverse Polish Notation (like Forth) for a bit, so of course there's no operator precedence at all. Also the distinction between short-circuiting Boolean combinators and "mathematical" Boolean operators is obvious, the former require a quoted function as one of their inputs (to conditionally execute) while the latter just take two ints (or bools or whatever, primitive values rather than quoted functions).

In a crude type notation:

        bool -> (... -> bool) -> bool

vs.

        int -> int -> int

<comment><USER22> You could go the next step for symmetry and make _both_ operands quoted functions, at which point you're just working in a lazy language. :D

<comment><USER21> That's actually how I did it at first, but then I realized that it was silly because you _always_ run the first quoted function right off anyway so it's cleaner to just require a Boolean value.

(There's a way using Category Theory to firm up that assertion into proper math, but I'm not good enough at CT to do that.)

:D

</comment></comment></comment><comment><USER23> > _You might say "just search all the source code for that pattern" but this > was two years before grep was invented! It was as primitive as can be._

If you control the compiler, you can make the compiler diagnose all the cases which are affected by the precedence of &, emitting a file name and line number.

That was the thing to do with those several hundred kilobytes of code. Get the precedence right, and then warn about any code actually relying on the precedence. The compiler then "greps it out" accurately; even instances that are obfuscated by preprocessing.

Or, add the warning _first_ before rolling out the change to the precedence:

      foo.c:35: warning: obsolescent & precedence: use parentheses

Let the programmers go through a period of obsolescence whereby they rid their code of these warnings by using parentheses. Then, the compiler can be changed, while maintaining a diagnostic in that area of the language for some time. Eventually, when everyone has forgotten the old dialect with the bad precedence, the diagnostic can be removed.

When the new precedence is rolled out, a compatibility switch can be included for compiling code with the obsolescent precedence. Actually, that option can even be rolled out first (so it initially does nothing).

When the option is eventually removed, the compiler will refuse to run if it is specified.

So anyway, Ritchie had a few fairly easy and cheap alternatives to sticking with bad precedence; he perhaps wasn't aware of them.

</comment><comment><USER24> So... yeah, I totally agree with the moral of the article. Unless you are actually planning for how to handle a user uprising due to incompatible changes, fix your stuff now. But let's talk about operator precedence instead, because that's more interesting:

The boolean operations are the biggest gotcha, but these are everywhere. Similarly the "*" indirection operator binds more strongly than many programmers think it does (and the same symbol in type expressions too, which is why those parentheses in function pointer declarations that no one really understands are needed). The shift operators got picked up by C++ to do I/O of all things, where get to wreak havoc in a whole new regime.

Frankly the only precedence rules that most programmers understand (because we were taught them in grade school!) is the two-level/left-to-right grammar for the four basic arithmetic operations, along with a vague sense that these should bind more tightly than an operator with "=" in it, because that separates the "other side of the equation".

Given that, why don't new programming languages just require fully parenthesized expressions for expressions involving other operators?

<comment><USER25> "Given that, why don't new programming languages just require fully parenthesized expressions for expressions involving other operators?"

That would be excellent and be in line with the trend towards "safe" languages. I have countless examples where I read code with several expressions and when I asked the dev if they really understood the situation rules of this language they usually didn't. They just wrote something they thought should be ok.

</comment></comment><comment><USER26> > _C++, Java, JavaScript, C#, PHP and who knows how many other languages > largely copied the operator precedence rules of C_

Ok, that's understandable for C++, but for all the other languages I really wonder what the reasoning behind this (if any) was - "our language looks similar to C, so we have to copy as many of its warts as possible so C developers feel at home" ?

<comment><USER27> PHP, at least, is (or used to be, I've been out of that world for... oh wow, a long time now) a really thin layer over C, so that's its excuse.

</comment></comment><comment><USER28> The operator precedence in the article is just an example of a principle that does hold: A series of choices, each individually plausibly the right call, lead to a bizarre situation that doesn't feel right.

However, often (and I submit this very article as exhibit A), the logic is reversed: One observes a bizarre scenario, points at it, and goes: I don't know what or how, but clearly somebody somewhere messed up.

That's not true; sometimes seemingly simple things simply aren't simple, and you need to take into account all users of a feature and not just your more limited view.

Take operator precedence. __operator precedence is an intractable problem__.

Some languages try to make it real simple for you and say that all binary operators are resolved left to right, and have the same precedence level. This makes it easy to explain and makes it much simpler to treat anything as an operator; a feature many languages have. Smalltalk works like this. The smalltalk language spec fits on a business card; obviously, you must use such principles as C's operator precedence table would otherwise occupy most of your card!

But that does mean that `1 + 2 * 3` is 9 and not 7, and that is extremely weird in other contexts.

So, you're in a damned if you do and damned if you don't situation: There is no singular answer: No operator precedence rule is inherently sensible regardless of the context within which you are attempting to figure out how operator precedence works: It is an intractable problem.

One way out is to opt out entirely and make parentheses mandatory. If you then also make it practical and say that the same operator associates left to right regardless of what operator it is, you can still write, say, `1 + 2 + 3 + 4`, but you simply aren't allowed to write `1 + 2 * 3` – you are forced to write `1 + (2 * 3)` or `(1 + 2) * 3`. But now anybody who feels they can copy problems from math domains, or from technical specifications such as a crypto algorithm description now gets tripped up. You may disagree (I certainly do), but a significant chunk of programmers just prefer shorter code. I would certainly prefer my languages to work this way, and have configured my linters like this as well, but it's still not a universally superior solution regardless of point of view.

In other words, had Ritchie chosen to go with this 'when in doubt, do not compile it' strategy, this article could not be written. And we'd still have programmers unhappy with how the operator precedence rules work.

<comment><USER29> > No operator precedence rule is inherently sensible regardless of the context > within which you are attempting to figure out how operator precedence works: > It is an intractable problem.

I disagree. FORTH got it right. Postfix notation is inherently sensible, as any RPN calculator user will tell you. It eliminates the need for both precedence rules and parentheses, unambiguously.

1 2 + 3 * is 9. 1 2 3 * + is 7.

It's infix notation that's the problem, precedence confusion is a consequence of it. (Prefix notation can work too, but requires more parentheses).

<comment><USER28> Avoiding precedence issues is great. Absolutely. However, it's not crazy to want to write it like most humans are used to. I have no problem with the idea that it's more trouble than it sounds like, and '1 2 +' is the best answer to the dilemma. That still doesn't make it a slam dunk. Or should we start saying that just about every programming language out there has a major design flaw, in that it has infix and not postfix operators?

</comment></comment></comment><comment><USER23> The hundred year mistake is ambiguous syntax with hidden precedence rules _itself_ , rather than any specific choice of precedence.

At least, particularly poor choices of precedence can be diagnosed. Whenever the compiler applies a precedence rule between two operators that has been identified as awkward, it can emit a diagnostic mentioning those operators: "warning: quirky precedence: use parentheses when & is combined with ==".

</comment><comment><USER30> I guess it's my turn to be the dipstick who complains about the website's design instead of discussing the contents, but I'm finding the font extremely hard to read in Chrome. In Safari it's better, but it still doesn't look great in terms of kerning. Anyone else seeing this?

<comment><USER9> It's rendered using the default WordPress theme ("Twenty Eleven") with the sole customization being that the body text colour is changed to purple. If it is rendering poorly, take it up with either WordPress or your browser provider; there's not much I can do about it.

</comment></comment><comment><USER31> operator precedence is arbitrary to a language. There is no universal "right" or "wrong" and the LISP postfix people know this, there's no operator precedence there, just a sequence of operators and the operands that follow that explicitly declares the order of evaluation. It does have parentheses though :-)

So the mistake here seems to be expectation, which is arbitrary. Everyone knows the +-*/() precedence of basic arithmetic, but boolean operations and others? That isn't at the cultural level of basic schooling, so the author's contention that the precedence is wrong isn't a priori.

</comment><comment><USER32> The article rests on the notion that this is confusing, but fails to prove it:

      int x = 0, y = 1, z = 0;
      int r = (x & y) == z; // 1
      int s = x & (y == z); // 0
      int t = x & y == z;   // 0

None of that surprises me, but moreover I would never expect myself or anyone else to be sure about it, I would refer to the operator table to be check. The article also supposes that this line has some natural meaning that everyone expects, but I'm not seeing it:

      if(x() & a() == y)

I think the author is projecting their own cognitive patterns onto the rest of us without justification.

<comment><USER9> Sure, that's entirely possible.

I'm curious to know if you knew from the moment of your birth that you should look at the operator table in this case, or if you learned that mitigation on a particular day. If the latter, what might you have done _before_ you learned that?

<comment><USER32> I don't know. I feel like I've always needed to think about any line of code with several operators on the same line, but I've been in this business for a long time, so I might have learned the habit from negative experience.

I'm glad you mentioned it though, because now I'm curious if there's a difference among programmers who score well or poorly on a cognitive reflection test. Maybe people with a tendency to suppress their intuitive response are also less likely to think that a line of code has an obvious meaning?

</comment></comment></comment><comment><USER33> Personally I think the problem is right here:

        int x = 0, y = 1, z = 0;
        int s = x & (y == z); // 0

Other languages like Go dont allow this:

        package main
        func main() {
         n1, n2, n3 := 10, 11, 12
         n4 := n1 & (n2 == n3)
         println(n4)
        }

Result:

        invalid operation: n1 & (n2 == n3) (mismatched types int and bool)

<comment><USER2> TFA directly addresses this. The problem you demonstrate is that C does not have a bool type, and the == operator instead returns an int.

<comment><USER34> Ah, but C99 has a bool type: _Bool. Also available as 'bool' via stdbool.h:

[https://en.cppreference.com/w/c/keyword/_Bool](https://en.cppreference.com/w/c/keyword/_Bool)

But I otherwise agree with you.

<comment><USER6> It also has silent type coercion, so it will happily promote your _Bool to an int, neatly voiding any benefits the type might have had to offer.

</comment></comment></comment></comment><comment><USER35> Move Fast & Break Things approach yet again would save the day if applied

</comment><comment><USER36> Too bad he didn't post this on Precedence Day last month (February 17).

<comment><USER9> WOW. JUST... WOW.

I will definitely try to remember that for next year!

</comment></comment><comment><USER37> To get into this issue it's bad programming?

You should never write something so complex?

<comment><USER38> I only know not to write things so complex because either I have made the mistake or some generation of someone I've learned from has made the mistake. It's not a logic problem, where the less complicated, better understood and more general rules of precedence allow writing equations that are terse, objective, and easily parsed by humans: it was born with C's invented, abstraction-breaking rules of precedence. You only learn it with a C-like language. What's a bit to a mathematician?

I'd argue the practices that are most popularly known as 'good practices' are to avoid mistakes that are common.

</comment></comment><comment><USER39> A "nor only" language would eradicate the issue of operator precedence.

</comment><comment><USER40> Just use parenthesis.

</comment><comment><USER41> This article is really funny because it is true. I started programming C in 1987 and got my first programming job in 1992 (writing drivers for flash memory for windows 3.1). I was lucky to have a really good mentor. He beat me over the head to always use parenthesis whenever I used more than one binary operator and I never stopped. Sure, my macros looked more like LISP than C, but he burned the fear of god into me.</comment>


Carter Cleveland Says Art in the Future Will Be for Everyone - <AUTHOR> http://online.wsj.com/articles/carter-cleveland-says-art-in-the-future-will-be-for-everyone-1404762157

<comment><USER2> The author seems to be quite clueless: not even a single mention on [indie] games - the true art of the future (in extreme, but not uncommon case requires drawing, coding, composing and design skills). His understanding of future art reminds of vintage visions of coal-powered spaceships.</comment>


Code Less, Engineer More - <AUTHOR> https://increment.com/teams/code-less-engineer-more/ <comment><USER2> > we wouldn't insist that every bridge be built with bespoke girders and bolts

Bridges don't come with yearly bolthole updates that obsolete, or worse, add subtle failure modes to the bolts you bought off the shelf. When the BoltHub repo you pulled in doesn't support the newly-introduced thread pitches, you're going to be doing _something_ bespoke anyways, even if it's tearing out those bolts and replacing them with a new type. And if you anticipated that swap from the beginning and wrote an interface to cover the bolts, you _already_ wrote bespoke bolt code.</comment>


Why do brands like Coca-Cola need to spend billions on advertising? (2014) - <AUTHOR> https://www.reddit.com/r/AskSocialScience/comments/1rf6pk/comment/cdmnpfa <comment><USER2> I always balk a little at the idea that e.g. a higher price tag on the same wine "really tastes better" so there's nothing wrong or deceptive in it. Seth Godin makes the same point in his book All Marketers Are Liars, basically that people want a story and marketers are just giving people what they want.

Feels kinda like the rationalization of lying and exploitative psychological tricks. But there's some truth to it, it does seem like many people just don't care about the "scientific truth" of something and are happy to buy into a narrative about e.g. why some expensive wine glasses make wine taste better, when blindfold tests prove otherwise.

I usually try for the "real truth" and try to see past my emotional biases, but maybe in some ways that's a limited cerebral tech-person view of things. It certainly makes it harder to relate to people who would rather just hear compelling-sounding stories.</comment>


Bitcoin is at over 43K unconfirmed transactions - <AUTHOR> https://www.reddit.com/r/Bitcoin/comments/59e9su/bitcoin_is_43716_unconfirmed_transactions/ <comment><USER2> I like the idea of cryptocurrency, but I have some doubts about the longevity of Bitcoin. As Bitcoin grows, there is a greater need for mining. However, as Bitcoin grows, the returns for mining diminish.

<comment><USER3> The idea is that Bitcoin will become more valuable as it grows because of deflation.

<comment><USER4> That would be the idea, but the value of 1 bitcoin is still subject to heavy day-day fluctuation, so I'm unsure if deflation/inflation are relevant wrt. Bitcoin today (or in the next few years).

Simply news that transactions are taking hours to confirm is probably enough to influence the price a significant amount.

<comment><USER5> I realize there is a lot of politics etc involved - but would it be technically feasible to just drastically improve the performance? Could bitcoin be changed into a system that could e.g. handle the scale and throughput of some of the non-cryptocurrency money transfer systems (e.g. 10million transactions/day)?

If not - is there something fundamental about cryptocurrencies that limits their throughput or could another system be scaling much better than Bitcoin? E.g. does a cryptocurrency always need proof-of-work and does that always need to be time consmuing?

<comment><USER6> Uh, I definitely don't mean to be offensive at all but your question is very naive.

The short answer is that a lot of engineering effort has gone into improving performance and today's Bitcoin is already enjoying those benefits.

The long answer is an entire field of research. There are fundamental things about cryptocurrency that means global throughput is very low and also high latency.

The hard part is the decentralization. If you can delegate trust to a small handful of entities, it's much easier to get scaling.

<comment><USER5> No offense.

My question was really e.g. _are there newer "generations" of cryptocurrencies that have worked around some of the problems Bitcoin has with eg. scaling_?

mostly interesting wrt. whether Bitcoin will survive or be superceded by something else.

<comment><USER6> There are newer currencies that claim to have solved the problem. But the vast majority of them do not understand the problems that Bitcoin is trying to solve, and make security tradeoffs that would be considered unacceptable in the Bitcoin ecosystem.

Those that show promise are yet-incomplete. Most don't provide practical scaling benefits greater than 5x, not a strong number considering the amount of scaling we'd like to see is closer to 10,000x.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Would it be possible for someone to deliver the 'death blow' to Bitcoin right now, by DDOS-ing the network or flooding it with even more transactions, including invalid ones ?

<comment><USER8> Not really.

Invalid transaction wouldn't get propagated so you'd need valid ones and they cost money.

So an attack has a cost per hour and this cost is pretty high.

<comment><USER9> Only _confirmed_ transactions cost money. So in theory you could send each miner a different double-spend, which they'd have to hang on to until either they confirmed it or received a contradictory confirmed transaction.

<comment><USER10> You can't really send a different double-spend to each miner. In my experience, the transaction will be propagated in 1-3 seconds. Each miner will pick the one it prefers (some prefer first seen, some prefer highest fee)

</comment></comment></comment></comment><comment><USER11> Perhaps block chain should accept only hashes of a set of transactions without restricting the set size, and store the actual transaction data elsewhere. This can increase the bandwidth, but will it become less secure, I don't know..

<comment><USER12> This is the idea behind Lightning Network: [https://lightning.network/](https://lightning.network/)

<comment><USER13> How's things going with Lightning? It looks like an excellent idea - but is it making any progress towards actual implementation?

<comment><USER6> It's making significant progress. The optimists think it'll be ready by January.

I'm expecting it to be ready closer to June 2017.

</comment></comment></comment></comment><comment><USER14> Bitcoin confirmation time unchanged in 10 months

[https://blockchain.info/charts/median-confirmation- time?scal...](https://blockchain.info/charts/median-confirmation- time?scale=1&daysAverageString=7)

[https://www.reddit.com/r/Bitcoin/comments/59fnry/omg_bitcoin...](https://www.reddit.com/r/Bitcoin/comments/59fnry/omg_bitcoin_confirmation_time_unchanged_in_10/)

<comment><USER15> > Bitcoin confirmation time unchanged in 10 months

That's the problem with logarithmic scales; it's easy to make one that looks like it's showing something different.

Try taking a look at average and median times when the scale is flipped to linear:

[https://blockchain.info/charts/median-confirmation- time?days...](https://blockchain.info/charts/median-confirmation- time?daysAverageString=7)

[https://blockchain.info/charts/avg-confirmation- time?daysAve...](https://blockchain.info/charts/avg-confirmation- time?daysAverageString=7)

Both highlight quite a spike in recent days.

<comment><USER16> By "quite a spike" you mean a change from 8 min to 10 min in a value with a relatively high variance? That's a slight increase at best, and nothing here suggest anything else than the null hypothesis.

<comment><USER15> >By "quite a spike" you mean a change from 8 min to 10 min in a value with a relatively high variance?

Please don't put words in my mouth.

</comment></comment></comment></comment><comment><USER17> Well, if you query the state, you are bound to get quite a few unconfirmed number at any given time. But they EVENTUALLY do confirm, whether its 10, 15 or 30 minutes at most.

<comment><USER18> I've had transactions waiting for 8 hours now for a confimation. And some more new ones this morning for 3 hours now without a single confirmation.

All of these contains the default fees added by the clients and which were sufficient last month.

I was trying to demonstrate bitcoin to some friends last night. They made wallets and I tried to transfer some coin to them. After an hour they were saying it would have been quicker to drive to the ATM and get cash. I doubt they'll look at bitcoin again now.

This needs fixing and this needs fixing quickly. Waiting half an hour for a few confirmations used to be a problem that needed fixing. Waiting hours will quickly kill bitcoin.

</comment></comment><comment><USER19> Increase your transaction fees, get them confirmed faster.

[https://bitcoinfees.21.co/](https://bitcoinfees.21.co/)

<comment><USER20> ...because every user knows the satoshis/byte ratio of their transaction, right?

And even if they did, we'd even up with a backlog of the same transactions, all paying higher fees. Bitcoin is barely managing 2 transactions/second at the moment, higher fees won't speed this up.

<comment><USER21> if the fee would be higher on average, do you think that'll attract CPU power from other cryptocurrencies networks?

<comment><USER20> No, the fees are still insignificant compared to the block reward.

</comment></comment></comment></comment><comment><USER14> Is it possible to setup mining pool that would do only confirmations?

<comment><USER22> That's what a mining pool is. There is no other type of mining pool.

The purpose of mining is to find valid blocks to add to the blockchain. A transaction is "confirmed" when it is part of a block in a blockchain that has some number of blocks after it. The number of blocks after it is the number of confirmations the transaction is considered to have.

<comment><USER14> Don't mining pools concentrate on mining new blocks, as it's more profitable? Can't we have a mining pool with old ASIC/GPU miner that would do ONLY confirmations, and would do all confirmations, even those with minimal fee?

<comment><USER13> Transactions are confirmed through the mining of new blocks. There is no other way to confirm transactions, and it's the purpose of block-mining.

<comment><USER14> Ah, ok thanks. SO the only way to fix it is by deploying new miners.

<comment><USER23> If you deploy more miners the average difficult to mine each block will increase (as for the bitcoin rules) so you are back to square one.

<comment><USER14> Yup, I expected this.

<comment><USER24> The way to fix this is increasing the size of the blocks, which is trivial from a technical standpoint, but it has some implications that the current majority of miners are not willing to accept.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I'm not sure where this came from as I can see transactions going through just fine. Perhaps they have no fee.

</comment><comment><USER25> But how, though? Blocksize limits?

</comment><comment><USER26> The actual link should probably be:

[https://www.reddit.com/r/Bitcoin/comments/59e9su/bitcoin_is_...](https://www.reddit.com/r/Bitcoin/comments/59e9su/bitcoin_is_43716_unconfirmed_transactions/)

<comment><USER27> I wonder if this is rand corp finding a chink in the armour.

Increasing block size will only postpone the problem and splitting the network will introduce a whole raft of unknown vulnerabilities.

At a minimum it seems like a fairly cheap and easy dos attack vector.

<comment><USER25> That's not what the XT folk think, and they've got some of the most prominent bitcoin develpers behind them.

</comment></comment></comment><comment><USER20> Currency of the future! /s</comment>


GitHub Is Doing Much Better Than Bloomberg Thinks - <AUTHOR> https://medium.com/@moritzplassnig/github-is-doing-much-better-than-bloomberg-thinks-here-is-why-a4580b249044#.gslnf22wg <comment><USER2> I read somewhere that VCs don't mind burning cash at GitHub, because the fire helps power the greater Software ecosystem. If GitHub shuttered it doors, it would be like a bank closing. Something would fill the void, but the immediate shock would be hugely damaging.

Overall, GitHub should go the services route. Right now enterprises are footing the bill with private repositories and organizations. If they want to become positive by just jacking up the price, buyers are going to start shopping around, and GitLab looks better everyday. Services like setting up CI/CD pipelines for enterprises could be highly lucrative, especially if they can be templated with internal tools. Most software (and SaaS) companies eventually arrive at the conclusion that they are better off selling the expertise on how to use their software than selling the software itself.

<comment><USER3> Services are the worst route for a software company to go down. There's little to no economies of scale, they have no inherent advantage over other consulting companies beyond their brand, and companies are always looking to cut consulting costs from their books (since they're often considered OpEx vs CapEx for software).

Services only makes sense from the perspective that you can make your software "stickier" by adding consulting to help with implementation and customer success.

This is reflected in the multiples that VCs and acquirers give software vs. services companies - high-growth software companies often command a 10-14x trailing 12 month revenue, while services are lucky to get 4-5x. It's just a less attractive business.

</comment></comment><comment><USER4> > _Assuming GitHub calculates their ARR in a healthy and responsible manner, > there is no issue with their burn rate since it will result in higher > revenue_

The original Bloomberg article [1] frames more than decides on this assumption. In any case, it deserves more than a hand wave.

On one hand, every successful start-up pays for future revenues with prudent but present losses. On the other, "a lobby modeled after the White House's Oval Office" doesn't sound like that.

[1] [https://www.bloomberg.com/news/articles/2016-12-15/github- is...](https://www.bloomberg.com/news/articles/2016-12-15/github-is-building- a-coder-s-paradise-it-s-not-coming-cheap)

<comment><USER5> I've been in that lobby, it's funny but nothing special; I'm sure it costed a lot of money but it's not like they reproduced trump's bathrooms in the original materials...

</comment></comment><comment><USER6> I read Thiel's Zero To One recently and after reading it you can't help but think these kind of critiques are shortsighted. A technology company's worth is often a projection for what their value will be in 20 years. This is why tech startups can be expected to lose money for many years and still be valued highly.

<comment><USER7> Exactly - as long as the unit economics (revenue per unit is more than the variable cost to create and sell it) are positive, software companies can grow past their fixed costs. One SaaS companies grow past their fixed costs, they are machines for throwing out cash. People who are too short sighted to see this are better off investing in public equities rather than early ventures. If unit economics don't make sense, then the founders and early investors deserve to lose their money.

</comment></comment><comment><USER8> > Even if GitHub stops growing and doesn't reduce the Marketing/Sales costs, > it would still have enough money in the bank for another 20 months

20 months of runway if growth stops? That's it? Is that called "doing (much) better"?

<comment><USER9> Author here: The point I tried to make is that GitHub has plenty of time compared to most of the other companies the raised VC and burn a lot of $. GitHub's ARR went up drastically, the underlying assumption in the article is that their recognized revenue will perform well too because of that shortly. Because they have at least 20 more months of money (and that's a conservative projection, ignoring credit lines, pre-paid contracts, etc.), they will not go out of business before their actual revenue increases (which could make them even profitable again immediately).

<comment><USER10> "they will not go out of business before their actual revenue increases"

But how much will they have to increase spending to achieve those projected revenue increases? It's a classic error to think that the current trend of revenue growth will continue but expense growth will stop.

<comment><USER9> 2 important factors: \- High ARR ($140M) as of Aug'16\. That ARR will result (unless the ARR metric is calculated wonky) in a recognized revenue close to $140M. GitHub spent to acquire the revenue. Costs are frontloaded (hiring Sales ppl, etc.), revenue is more backloaded (SaaS, monthly payments at least in terms of revenue recognition). GitHub lost $66M over 9 months, let's assume linear growth of that (to make it simpler), so $88M over 12 months. The growth from $98 to $140 in recognized revenue would already offset a lot of it ($98M+$88M-$140M = -$46M in losses). \- Using those numbers, growth would have to be roughly another $50M, from $140M in ARR/Rec.Rev. to $190M which is realistic after they just went from $90M to $140M.

<comment><USER10> Yes, I agree - if the existing sales staff can increase the ARR by another $50M (which is plausible given the prior increase of $50M) while holding all other costs fixed then they will reach profitability.

My point is that "holding all other costs fixed" usually turns out to be a heroic assumption. More staff is needed to support the larger customer base, marginal sales become harder (i.e. more expensive), etc. Plus, as these revenue figures grow, a fixed churn _rate_ becomes more expensive in absolutely dollars. So customer retention becomes more important, which means more sales resources, which means more money. And so on. And in the meantime competitors are cutting prices, so "fixed" revenues turn out to be not so fixed after all, even before factoring in churn.

Don't get me wrong - I'm not predicting that GitHub will fail. I just think the slog will be harder than this meta-analysis of Bloomberg's analysis suggests.

</comment></comment></comment></comment></comment><comment><USER11> Bottom line - Are they overvalued, and is this an apology for their bloated value, with promises of stellar growth in the future?

</comment><comment><USER12> I hate how the author, a purported CEO, doesn't know the difference between "lost" and "spent". For example, "That means that GitHub lost $27M while generating $95M in revenue."

GitHub _spent_ $27M. To "lose" $27M, they would have had to spent $122M, and subtract their $95M in revenue.

A CEO should know these terms like the back of their hand, and should be more precise with their terminology.

<comment><USER9> GitHub didn't spend $27M. They spent far more, in a simplified calculation exactly how you described it: $122M in total spend - $95M in revenue = a loss of $27M.

To be more accurate, according to their P&L, GitHub made $95M in recognized revenue and showed a net loss of $27M.</comment></comment>


Ask HN: What happened to Mr. Robot? - <AUTHOR> The show's first season looked very promising but now I feel it has swirled into a chaotic and confusing show <comment><USER2> It seems to be suffering a bit from the Matrix Effect: The first installment promised far more than the sequels could possible provide.

Stories involving a protagonist with seemingly otherworldly gifts tend to craft a narrative where the possibilities and potentials are limitless. While this form of storytelling is very good at garnishing attention, it's mainly capitalizing on the mystery surrounding the main character. People tend to fill in those unknown personality traits by projecting themselves onto the character.

The problem arises when the Author attempts to choose a reality for their character to follow. No matter what reality you pick, the story will never live up to the quintessential version everyone has uniquely envisioned. The more we learn about the character, the less we feel a sense of awe and wonderment. This transforms something that once held so much promise into something that seems mundane. It's not because the story is bad, it's just that it could never live up to its own open-endedness.

</comment><comment><USER3> I've seen that sentiment in a couple of places, and the answer is fairly simple: The first season gave us a show about a heterogeneous team of hackers (plenty of ages, both males and females, different personalities, etc.) trying to "fight the man", so to speak.

The hacking, portrayed as fairly realistic, especially for people used to Hollywood craziness, and the fight (against financial institutions) pulled quite a lot of people.

Then, fairly suddenly, you get hit with a mental illness angle. A lot of people didn't ask for it, and don't really welcome it. It's not just a show about hacking now. It's a show about a very mentally ill man with a particular set of baggage trying to cope with it, while being part/the leader of a very notorious hack team.

So yeah, if you really like the first season, you might not like the second one much. At least so far.

</comment><comment><USER4> I heard a lot about Mr. Robot so decided to check out the hype. Started watching with interest - the first episode really blew my mind when they started discussing GNOME and KDE, I was like wow I love this show already. Like you said the mental illness took over and I'm like this is going into la la land now - there's less hacking and more of a human angle, which is great and all, until you realize the human angle is superseding the hacking and computers, which is what drew me in in the first place. There's some real "holes in this firewall" if you get my meaning, and not in a good way. I guess part of me wanted it to be this really geeky show, but I suppose they might have gone too far already for the (comparatively) 'technologically challenged' populace already. I guess I will save my dime and wait to spend on Season 2 until after reviews are out. I hope they fix it.

</comment><comment><USER5> The show is heavily inspired by Fight Club and season 2 essentially picks up where Fight Club (and season 1) ends. As someone who is both a "hacker" and a huge fan of Fight Club this makes season 2 even more interesting to me.

I remember reading the foreword to Fight Club where the author stress that the "Fight" in Fight Club is not what the book is about. He even considered other types of clubs/themes to convey the ideas in the book.

So perhaps that's a way to look at it: Mr Robot is Hacker Club and hacking play the same role as fighting does in Fight Club.

<comment><USER6> I was hoping the show would be more like the third act of Fight Club, where the protagonist's struggle with his alternative personality really drives the plot. Instead, the season doesn't appear to have any direction and the fight is between the protagonist's two personalities is one of the most boring parts.

</comment></comment><comment><USER7> I need more hacking</comment>


China's Nightmarish Citizen Scores Are a Warning for Americans - <AUTHOR> https://www.aclu.org/blog/free-future/chinas-nightmarish-citizen-scores-are-warning-americans <comment><USER2> Wow. This reminds me of Cory Doctorow's imagined whuffie social credit system [1], except in a terribly twisted way. I guess that's a logical extension of it though.

"Whuffie has replaced money, providing an esteem- and admiration-rewarding motivation for people to do useful and creative things. A person's Whuffie is a general measurement of his or her overall reputation and is gained (or lost) according to a person's favorable (or unfavorable) actions. Public opinion determines which actions are favorable or unfavorable."

[1]: [https://en.wikipedia.org/wiki/Whuffie](https://en.wikipedia.org/wiki/Whuffie)</comment>


16% of the queries on Google each day are brand new (never seen before) - <AUTHOR> http://www.google.com/ads/answers/numbers.html <comment><USER2> I actually don't believe that...or, at least, I don't believe it means what I think I'm supposed to believe it means.

If they do 3 billion queries per day[1], that's almost 500 million new queries every day. You gotta figure most misspellings and typos are repeats..

[1] [http://www.quora.com/How-many-search-queries-does-Google- ser...](http://www.quora.com/How-many-search-queries-does-Google-serve- worldwide-every-day)

<comment><USER3> I assume the 16% are supposedf to mean 16% for distinct queries. The well- known queries and common typos are entered a lot more frequently - so a huge portion of those 16% may actually just be bored people googling for "fist-on- keyboard"

<comment><USER4> If that's the case, it's a very misleading statistic. If you have 1 million each of "facebook", "fcaebook", "facebok", "faceook", and "fakebook", and one "asdweniviwnxoemmgmejvj v fef", it's kind of spin to say "we've never seen 16% of the queries we see every day."

</comment></comment></comment><comment><USER5> Interesting facts, but here's one I didn't understand:

"By 2012, there will be 2.3 billion mobile devices in use, the equivalent of 70% of the world's population."

What does that mean? Something bad will happen between now and beginning of January? Virus infecting drones (mobile devices), to terminate 3.5 billion people, so that 2.3 billion = 0.7 * world population in 2012, for example?

<comment><USER6> That statistic is weird however you might want to interpret it because it in no way accounts for people having multiple phones, which is in no way rare.

<comment><USER7> I'm sure it's not rare as in unheard of, but to have any significant impact on the number of people carrying 2.3 billion devices, there would need to be hundreds of millions of people with multiple phones. I have no idea of the statistics, but I wouldn't think it would be anywhere near that common.

</comment></comment></comment><comment><USER8> I'm interested to know whether the novel query rate is changing over time. If it's increasing, that might be an indicator that google users are trying to refine their search terms in response to the creeping SEOization of the search results they're getting.

<comment><USER9> "Creeping SEOization" could also be stated as keyword space filling up—a natural effect of the web growing—so queries are getting more specific.

Another possible factor is that users are becoming more savvy search users, or even trusting that they will get meaningful results for novel queries (e.g. Vietnamese Restaurants in Saskatoon).

</comment></comment><comment><USER10> Thought this stat from the "Search improves the bottom line" was a little lame:

89% of the traffic generated by search ads is not replaced by organic clicks when ads are paused.*

Google Search Ads Pause Studies, July 2011 *For those who have been running paid search campaigns.

My parsing of this interprets it as: "89% of advertisers aren't dumb enough to compete with their own organic SEO traffic by placing paid ads sponsoring the same keywords."

<comment><USER11> I have organic listings ranked in the top 1-3 spots for my niche and I'm still buying Adwords for the same keywords, because PPC really does drive different traffic compared to organic. A few months ago Google suspended my account (apparently by mistake) and I noticed a significant drop-off in traffic. When my account was reinstated, I was happy to be paying for traffic again.

<comment><USER12> Are you saying it is worth it for the NY Times to advertise on the search term "NY Times"? I see examples like this all the time but it makes no sense to me. In fact, the only ad-links I click on are these.

You just gave me my first data point from the web site owners perspective ... that your traffic goes up enough for it to be worth it. Why do you think this is the case? I would really appreciate any insight on this!

<comment><USER13> I would say it is. I know my parents routinely click on the ads at or near the top of the google page thinking they are the legitimate search results.

<comment><USER12> You're right. But that doesn't make sense to me. I do the same thing. The point is that I would end up clicking on the search result anyways had the paid link not been there. What am I missing here?

<comment><USER14> It is a very cheap way (quality score is high for your own business name) to advertise the fact that "this is a business that is reputable/savy/spending enough to invest in ads and appear on Google." I really don't know how much that is worth, but it must count for something. Especially if you use Adwords for branding campaigns.

</comment></comment></comment></comment></comment></comment><comment><USER15> A few years ago I heard Sergey say it was 20% ... so I guess the number is gently trending down.

Would be cool to see the curve for this.

</comment><comment><USER16> I would think search queries are getting less diverse now, especially with google suggest giving you autocompletion - I find it very often gives much better results to look at the top domain queries (e.g "online marketing strategies", "online marketing tips", "online marketing best practices" for marketing), look at the results, have a feel for what the right wording is, and then refine your queries.

I find that much easier to do than randomly type the first sentence that comes to mind.

</comment><comment><USER17> Very interesting. This one is one level up on the tree:

<http://www.google.com/ads/answers/>

<comment><USER18> I'm amused at the juxtaposition of these two:

>Five stars beat four stars every time.

> When you're hungry, the best sandwich is usually the closest one.

</comment></comment><comment><USER19> > By 2012, there will be 2.3 billion mobile devices in use, the equivalent of > 70% of the world's population.

Given that the world population is estimated to hit 7 billion next spring, I think this number is a bit absurdly off. 70% of 7 billion is 4.9 billion.

I think google should use google next time they need to find out the world population, because they're estimating it at 3.3 billion.

<comment><USER20> By population I think they are limiting it to 'people who use the internet and could use google'.

</comment></comment><comment><USER21> another proof human is actually creative :-)

</comment><comment><USER22> Thanks for defining brand new.

</comment><comment><USER23> Is this new? Am I just finding this after John Andrews' post a few days ago as a coincidence? <http://www.johnon.com/764/seo-myths.html></comment>


Solving 5th Grade Math Homework with F# and OCR - <AUTHOR> https://martinand.net/2017/02/19/solving-5th-grade-math-with-fsharp-and-ocr/ <comment><USER2> It's worth noting that the "," in this is the decimal "point", not a thousands separator.</comment>


Why can't we stop market during outbreak? - <AUTHOR> Is there a reason we can't stop  market trading during the outbreak until it passes? <comment><USER2> That's more disruptive than the outbreak.

The market drop is not just about the outbreak but because prices were too high to begin with.

Look at Boeing, it has political teflon, the stock was barely affected by the MAX situation. Now it has all hit, things are so bad they might not restart the 737 line.

<comment><AUTHOR> Thank you for the reply. Makes sense. It still feels we're not doing enough to stop spread of the virus or secondary issues it will cause.</comment></comment>


Arduino-assisted, mind-controlled TV using EEG - <AUTHOR> http://killerprojects.wordpress.com/2010/04/10/arduino-assisted-mind-controlled-tv-using-eeg/

<comment><USER2> Is this the same group of guys who built an EEG headset that shocked the shit out of the user if they started thinking too hard? If so, that was only a few weeks ago, they're making some pretty quick progress.

</comment><comment><USER3> He's got an EEG interface and the first thing he builds is a way to turn the TV on? Is that a joke?

<comment><USER3> Here is one from a few months ago: <http://www.youtube.com/watch?v=nZ6Y0I4jXhc></comment></comment>


Ask HN:  Recommended way to receive customer payments when just starting up? - <AUTHOR>

What do YC startups recommend?
PayPal?  Google Checkout?  Credit Card? (merchant account), Other?
Which provides the minimum hassles, delays, transaction fees, etc.?  Which do customers prefer?
Any positive or negative recommendations based on experience would be much appreciated. <comment><USER2> When I started <http://www.learnitfirst.com/> originally, we only accepted PayPal. I did it this way because getting a merchant account seemed like a big deal+hassle (at the time). After we integrated PayPal, we added Google Checkout which was a collosal waste of time. We now accept credit cards directly.

I'd say that my customers 10:1 prefer to pay by credit card. If I didn't offer credit cards as an option, I figure I would have 20-40% fewer sales. That being said, get up and running first and foremost - that's what I think. You can always add credit cards. I think PayPal, for my customers, is an important option. Since it was the easiest of all to implement, I'd say start with it.

<comment><USER3> Could you please drop a few words on how you fight credit card frauds and chargebacks ? This is the real and the only problem with CC processing we faced. We could not handle it, so our merchant account was blocked six months after we started due to high ratio of frauds. So now we accept through Paypal and Google Checkout only. Everyone who is going to start accepting credit cards directly must pay a thorough attention to CC fraud problem and there is no any ultimate solution for it.

<comment><USER2> Chargebacks through PayPal are almost non-existent. I think that in four years we've probably had a handful literally. Chargebacks through Google Checkout were so bad that we dropped them.

We went with Authorize.net as the gateway and another company for our merchant account. A lot of chargebacks can be handled by setting up your risk controls up-front correctly. Should the postal code be required to match? Should the card verification code be required? Those types of things have more to do with it than anything IMO.

</comment></comment></comment><comment><USER4> It matters a whole lot what sort of payments you need to take. Is your payment model a sale (one-time transaction) or recurring billing?

If you're going to take credit cards and/or do recurring billing:

I've built two recurring billing payment systems (braintree and paypal express checkout) and maintained a third (paypal payflow pro gateway) and am most impressed with braintree's api thus far. <http://braintreepaymentsolutions.com/> My braintree-based system hasn't gone live yet, so I can't say anything about long-term service, but their api was far more sane than the other two. That said, when we added express checkout to the payflow pro gateway, purchase rates increased substantially.

There are monthly minimums with braintree and a good bit of paperwork, but being able to directly take credit cards might add some degree of "seriousness" in the consumer's eyes.

If you're rolling on rails, you might want to check out <http://railskits.com/saas/> (although I have no personal experience with them) and <http://www.activemerchant.org/> (a payment library extracted from shopify).

If you're just doing one-time sales, you have a lot more options and the accounting is a heck of a lot easier.

<comment><USER5> Do you know what the monthly minimum for Braintree processing was? The last quote I got from them was $200/month if you're processing under $1mm/year. I've also heard of a couple recent cases in which it was negotiated down to $100 though.

<comment><USER4> I do think it's $200/mo, but as far as we've been able to tell, it's perfectly legitimate to run our own $200 transaction and pay the processor fee (a few bucks a month on $200). We've only had our merchant account for ~1 month, though, so I'll be able to tell you more at the end of the month

</comment></comment></comment><comment><USER6> You can seamlessly accept credit cards and use PayPal as your backend processor. To your customer, it looks like you jumped through all of the hoops of a merchant account, but you're really just interacting w/ PayPal's API.

They also provide a virtual terminal so you can accept credit card payments via phone//fax.

I think they call it website payments pro and it costs ~$30/mo depending on volume.

</comment><comment><USER5> PayPal is by far the most cost-effective way (in terms of % rates) to get up and running - compared to the time and costs involved in setting up a merchant account/payment processor.

As Aaroneous mentioned- Paypal Website Payments Pro allows you to process paypal payments and credit card charges invisibly in the background (there is no redirect to Paypal).

The processing fees/cost economics of establishing a merchant account/processor definitely make sense however once you're processing several $k/month.

</comment><comment><USER7> In my startup (<http://industrialinterface.com>), we started by manually creating invoices in Paypal and emailing them out. That got lukewarm response.

I'm the lead dev, so I buckled down and figured out the merchant stuff. There can be 1-2 weeks worth of delays in getting your merchant account, but our admin guy said it was pretty straightforward. Took me about a day or 2 to figure out the response codes and to program the cc processing.

In short, take the jump and just process your own CCs (assuming that you have the legal structure in place so that you can get a merchant account. If not, use the Paypal API). Took about 2 days of learning and coding to figure out cc processing (and the Authorize.net interface ain't the greatest).

Fees are all about the same, so unless your margins are under a percent, don't worry about the fees. And if your margins are that low, rethink your business model ;)

<comment><USER8> we are a startup and we are going with paypal for now. We will move on to authorize.net after a couple of months and then to merchant account.

</comment></comment><comment><USER9> I would work on a relationship with a bank, and get a merchant account. There are many providers that offer low enough rates for a startup. One that I heard of was Merchant Plus. Just get someone that supports authorize.net and you can't go wrong. This might take a little time, so I would recommend using Paypal AND Amazon payments WHILE you're getting this setup, since they seem to be easier to implement. I WOULD NOT however start with these initially, and not put any effort into a merchant account. You WILL need a merchant account eventually (if you're successful), so you need to already be working on it.

</comment><comment><USER4> Another note if you're doing recurring billing: Check with your payment provider if you can get your customer payment data out ever. At my previous startup, we were locked into PayPal because they wouldn't release the consumer CC#s and it's never good for business to have to ask your customers to input their payment info a second time (attrition is inevitable). This time, we did a bit more research and our two top payment services (braintree and trustcommerce) both allowed full data portability (with a fee).

</comment><comment><USER10> i don't like paypal much, so i'd probably use amazon's FPS

<http://aws.amazon.com/fps/>

<comment><AUTHOR> Can you give more details about why you would recommend Amazon FPS over PayPal?

<comment><USER10> almost purely reputation. i know people who have gotten specifically screwed by paypal. frozen accounts, sized assets. have yet to hear that about amazon.

</comment></comment></comment><comment><USER11> [http://www.codelathe.com/blog/index.php/2009/06/14/a-brief-c...](http://www.codelathe.com/blog/index.php/2009/06/14/a-brief- comparison-of-internet-payment-options/)</comment>


Ask YC: YC clones - <AUTHOR>

It didn't float the previous time. So here is a question. What do people think of YC clones, Betaspring.com in particular. Does it look like something worthwhile or a rip-off -- ~1% equity for no investment, with mentoring and some legal advise, access to online incorporation documents? It obviously doesn't have the highly successful entrepreneurs YC has. There seem to be a lot of hand-holding firms for startups. Are they really necessary or a created necessity? <comment><USER2> My only question: why would Betaspring NOT offer funding? If the founders have done such a great job raising money in the past (30 million, was it?), why not raise some more money now, and invest 20 grand in each of the young startups that they accept into the program? It's such a small amount of money, but when you ask a bunch of 20-somethings to move to RI for the summer (and give up equity), you should at least give them enough money to pay rent.

Betaspring offers to "line up investors who want to fund you" -- really? In this environment, that is a pretty ambitious claim. How many YC companies get the "immediate follow-on funding," that Betaspring refers to? Some...but we are talking Silicon Valley (and formerly Boston, the second largest entrepreneurial hub), and a really strong reputation.

I think these firms are generally a good idea, and a value add for young entrepreneurs. Look at the companies that have come out of YC, and see what they are saying about their experiences. I just think some firms are better than others...

<comment><USER3> I'm the Program Director for Betaspring. We will be offering funding in our next round. We've soft-launched this summer with a few local teams to prove the model will work here in Providence.

Our hope is that we'll attract smart, talented people to the city to help support the burgeoning technology/design scene that we currently have.</comment></comment>


NAACP members call for ban on privately managed charter schools - <AUTHOR> https://www.washingtonpost.com/news/answer-sheet/wp/2016/08/07/naacp-members-call-for-ban-on-privately-managed-charter-schools/ <comment><USER2> Lesser of two evils. Black communities in the U.S. are in a tough situation: one party is openly hostile and racist, and the other props up teachers' unions and failing school districts (not to mention "think of the children" tough-on-crime policies) that do tremendous real damage too.

In D.C.--a city where student performance continues to be abysmal despite nearly double the per-capita funding of surrounding "rich" counties--some of the most well-regarded schools in heavily-minority neighborhoods are charters. Indeed, D.C. charters educate about 45% of the students and are outperforming the district schools, despite having poorer students and less funding: [http://www.usnews.com/opinion/knowledge- bank/2015/10/05/wash...](http://www.usnews.com/opinion/knowledge- bank/2015/10/05/washington-dc-shows-why-charter-schools-are-taking-off;) [https://www.washingtonpost.com/local/education/more-dc- stude...](https://www.washingtonpost.com/local/education/more-dc-students-are- attending-highest-performing-charter-schools-ratings- show/2014/11/13/3d0a4cf0-6b57-11e4-a31c-77759fc1eacc_story.html)

Educating kids in poor minority neighborhoods is hard enough. There is no reason to hamstring the process--indeed, to make it intractable--by running schools like General Motors circa 1960.

<comment><USER3> I was going to say something similar but with less facts :-) We've talked with a number of charter school efforts and one of the supports for such schools is the notion that the students that attend _want_ to attend so being expelled is an actual deterrent. Further, teachers who want to teach classes of students who want to be there don't want to be fired which provides incentive to be better teachers.

I think the NAACPs primary agenda here is that they feel Charter schools create a policy "out" for the history of being unwilling to take the steps necessary to make public schools work (and union reform is high on that list). As a result they can't get any traction on getting the public schools fixed if the policy maker says "well get your children into the charter school if you have a problem with it." and since Charter schools cannot serve the entire population, people will not make it in who would have benefited from being in, and the school they are "forced" to go to, is being neglected by people who should fix it.

<comment><USER4> I see private schools with the same disdain as I see bottled water. People drinking bottled water and refusing to drink tap water is our failure whether it be actual investment in water infrastructure or in "optics" of our water infrastructure. People sending their kids to privately managed schools is a failure of our public schools or the "optics" of our public schools.

I remember that I just said the other day that we can train and retrain law enforcement all day long but we won't see any meaningful improvement without enforcement with "teeth" and that unions are actively hurting their members if not because of what they do then because of the "optics" of what they do. I think the same applies for teachers' unions as well.

We talked about the case of interns being fired en masse a little while ago and some of not many people in that discussion agreed that it didn't look good that the interns were riled up over something (dress code) that didn't help the business much. When teachers bring up the issue of low pay, I can't help but feel a lot of parents and voters see it as selfish in the same way. "The teachers should not spend so much time thinking about their own pay but rather about the students and what they can do to help students."

> I think the NAACPs primary agenda here is that they feel Charter schools > create a policy "out" for the history of being unwilling to take the steps > necessary to make public schools work (and union reform is high on that > list).

Absolutely! I kind of want to go back to the topic of tap water versus bottled water. The people who can't afford to buy bottled water are unlikely to have much of a voice in local government to have their issue fixed. The parents who can't get their kids in chartered schools or who don't care enough to get their kids in chartered schools are unlikely to have much of a voice in local government to make public education better either. Now that I think about it, it sounds just like segregation. The only difference is that instead of an official policy, it is a little more latent.

<comment><USER2> Charter schools are public schools, just managed by private organizations. And it's not a situation where only rich people can get their kids into charter schools. For example, in D.C. the public schools in rich white neighborhoods (Georgetown, Capitol Hill) are district-run. Charter public schools are concentrated neighborhoods with mostly minority populations.

Nationally, Charters often have comparable proportions (and in some cases, a larger proportion) of students from disadvantaged groups: [http://www.publiccharters.org/wp- content/uploads/2014/01/NAP...](http://www.publiccharters.org/wp- content/uploads/2014/01/NAPCS-2010-2011-Race_Ethnicity-Details-from-the- Dashboard_20120516T152831.pdf).

<comment><USER5> Charter schools can dismiss students without due process, can kick out or deny students with low grades, and are usually not obligated to provide special education services. They are not public schools. They are corporate-run political organizations that prop up dozens of these PACs pushing an pro- charter agenda.

[https://cloakinginequity.com/2016/08/01/breaking-news- aclu-f...](https://cloakinginequity.com/2016/08/01/breaking-news-aclu-finds- many-illegal-policies-in-charter-schools/)

<comment><USER2> > Charter schools can dismiss students without due process, can kick out or > deny students with low grades

Those are good things. These kids almost always have serious impulse control problems, and it's better for both those kids and for everyone else to have education tailored to those kids' needs. Teachers should be teachers--they shouldn't have to do double-duty as behavioral therapists.

> and are usually not obligated to provide special education services.

That's just false. The Individuals with Disabilities Education Act's (IDEA) requirement to provide education appropriate to individuals with disabilities applies to charter schools: [https://www2.ed.gov/offices/OCR/archives/charterqa/chardisab...](https://www2.ed.gov/offices/OCR/archives/charterqa/chardisab.html).

> corporate-run

Those aren't dirty words. Do you want your school run like an Apple Store, or like a DMV location?

<comment><USER6> We can debate whether they're good things or not, but they clearly confound comparisons with non-charter schools, which do not get to apply those kinds of selection powers to improve their published outcomes.

<comment><USER7> > We can debate whether they're good things or not, but they clearly confound > comparisons with non-charter schools

I don't understand your comment at all, but I am very curious to know what you actually mean. Can you please clarify and expand? To begin, what do you mean by "they" when you say we can debate whether they're good things or not?

<comment><USER4> I'll try. People often say that students from charter schools outperform students from (other) public schools. If we let charter schools kick students out, we should let all public schools let kick students out so as to level the playing field.

Imagine we compare Denver Broncos against Miami Dolphins. Just a small adjustment. We require Miami Dolphins to let anyone who is a resident of Florida in the team. We put no such restriction on the Denver Broncos (because Go Broncos!) Now, we compare average 40 yard dash between the "average" Denver Broncos player and the "average" Miami Dolphins "player". What do you think will happen?

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I don't understand why a prerequisite for other types of schools is a lack of privately managed charter schools. Inner city schools are such a disaster, it seems like the last thing we should be doing is blocking any new ideas -- privately managed or not.

<comment><USER9> > * Inner city schools are such a disaster*

Inner cities are a disaster, full stop. Which probably explains why the schools there _are also_ a disaster.

After all, wouldn't it be strange if inner cities were a disaster but the schools located there were a paragon of academic achievement?

</comment></comment><comment><USER10> Here comes a system that threatens to give some more power to lower income families, and the suggestion is that those systems should be abolished because it gives some parents/families more power than others. That is utterly insane. To disallow these other systems from existing is to perpetuate the idea that poor -- and usually black families -- need the state to decide what is best for them and their children. THAT is the really racist point of view.

There is this alarming trend in our politics which seems to have decided that the poorer and blacker you are, the less you ought to be trusted with your and your own family's livelihood. It's amazing for me to see all of the teachers that I know (I work in the ed. industry) speak often about trying to get into better placements in other schools and whatnot, but at the same time, when it comes to choice and mobility for lower income families, somehow then the "obvious" decision is to force them to be in the system that has systematically underserved them for decades.

If the arguments about needing to put money into public schools is real, and that the exit of certain students to charter schools serves to further undermine the quality of public education, then let's really go all out: Let's forbid charter schools from developing and let's strictly enforce the publicly-funded neighborhood school. But then, let's do the same with administrators, teachers, and staff: Let's have them all be assigned to a school, without any possibility of re-assignment.

See how well teachers/unions/NAACP like that policy...

</comment><comment><USER11> Disclosure: I work for Success Academy Charter Schools. I'm a software developer on the Data Science team here, and I'm obviously biased.

We were specifically called out in the article for having a board composition that is not diverse and also not representative of parents. It's not clearly stated but is implied that this combination of elements cannot lead to good outcomes for the students involved, and the NAACP is specifically saying that charter schools in general are bad for minorities.

I don't know the education landscape well enough to argue that charter schools are, in general, a good thing for society.

But I do know specifically about what we are doing and how we are doing it and how effective we are at it.

State testing results were released a couple of weeks ago, and we scrambled to make sense of the numbers. Results are here:

[http://www.successacademies.org/results/](http://www.successacademies.org/results/)

I can't speak for charter schools as a class, but I can talk about ours. We do outperform public schools consistently and by a wide margin.

There is no spin to these results. We--as a data science team--are ruthlessly and brutally honest with ourselves and with the organization and with the public about how we are performing.

Our organization is guilty as charged in the article of having a board full of mostly white, male, wealthy individuals. Facts are facts, after all.

What doesn't get mentioned is that we target our schools to the areas in NYC that are served the worst by public education. And we are out-performing not only the public schools that are closest in proximity but almost _all_ public schools in NYC and NY state.

The kids that go to our schools are overwhelmingly minorities, overwhelmingly in poor socio-economic circumstances, and overwhelmingly beating the odds and getting one of the best possible educations that's available anywhere. And they are getting that education as close to home as possible or, if they choose, as close to where they would like to be. That's the data that can't be argued with.

The personal anecdotal information that has no bearing on this situation is what I see on the subway day in and day out. I see kids in little SA uniforms with their little SA backpacks on the subway with each other or with a parent, talking about what they learned in school today, what they are excited about learning tomorrow.

None of this represents the official stance of SA, by the way. I'm just a guy writing code and posting on HN. But my opinion is that quality of education is one of the major factors driving inequality in this country right now. I think that we--Success Academy--are a positive influence.

I think that the NAACP stance as stated in the resolution would hurt us, our mission, and the students that we teach every day. I'm not an expert on education in general, and I'm not an expert on race-relations or equality. And I will happily accept critiques about how we can do things better and how we should.

But the NAACP ban on charter schools isn't something that helps the situation. As I see it, the situation is bad. Public schools are not getting the job done. Reform isn't working. We need innovation in this space, and that can't happen within the strictures of the DOE and unionized teachers.

This country needs a better, more equitable education model. And we are trying to find that model. And we are doing it with a data-centric attitude. Every decision we make is based on data. From where to open the next school to how we use technology in the classroom to how we decide to skip or hold back a student.

The article makes it sound like it's impossible for an organization run by wealthy white males to do anything other than make life better for other wealthy white males. It makes an implicit assumption that we are all incapable of working toward a goal of better for everyone. That is clearly not true. The real data does not support that at all.

To be very squishy and not data-centric about it, I devote my life to making the world a better place for minorities. I work hard on my nights and weekends to make life a little better for kids I don't know. Kids who probably wouldn't have a chance in the world if they went to a public school.

Everyone at SA does that. A blanket judgement that all charter schools are bad is wrong in at least one instance.

<comment><USER12> > A blanket judgement that all charter schools are bad is wrong in at least > one instance.

I don't think they made any such statement.

> We applaud the one out of five charter schools that are truly centers of > innovation, fulfilling their original intent.

> I suggest they all take a deep breath and read the resolutions again. The > NAACP does not want charter schools shut down. It wants a pause on new, > privately managed charters.

</comment></comment><comment><USER13> The recommendations at the end of the article sound pretty reasonable. Choice is great, but the switching costs are pretty high when schools mistreat students and parents. Transparent representation for students and parents seems required for good outcomes.

</comment><comment><USER14> This has nothing to do with fairness, the schools, the teachers, nor anything else they throw into the argument.

Most of the "bad" schools get the same (or even more) amount of funding, resources, coursework/material, as the "good" schools.

The difference that separates the two categories are the students (and their parents).

Charter schools simply don't have to put up with the same destructive students - and are able to create a productive environment for learning for the constructive students.

The problem is they tend to also not follow the NAACP approved racial demographics/splits.

<comment><USER15> There are several problems that are conflated.

Schools are being used to:

* Warehouse children while their guardian(s) work.

* Train young animals that they are more than wild animals.

* Educate children so that they can be functional in society.

* Allow society to examine children it's members are raising to make sure that things are going well.

The problem is a lack of recognition that these are the actual tasks being formed and the lack of positive feedback loops designed to promote success in these tasks.

I think it would also help if 'schools' were more like an MMO-RPG quest/leveling system than an assembly line.

</comment></comment><comment><USER16> So, less about the advancement of colored people, and more about being lock- step with the Democratic party (which in this case means the teachers' union).

<comment><USER17> The article states how the NAACP believes private charter schools hurt blacks and minorities specifically.

<comment><USER18> > The article states how the NAACP believes private charter schools hurt > blacks and minorities specifically.

Which is to say, the NAACP is reiterating the teachers' unions' talking points. It may even believe them — I can't say.

</comment></comment></comment><comment><USER19> Any organization which still refers to people of African and Middle Eastern descent as "colored people" should come under scrutiny before any of their causes are taken seriously.</comment>


Mathematicians Calculate the Longest Pub Crawl - <AUTHOR> http://vinepair.com/booze-news/drinking-maps-longest-pub-crawl/ <comment><USER2> But the real question is: Did they allow themselves to pass through the same pub more than once?

If I'm not mistaken, this is a computationally expensive operation, right? Traveling Salesman.</comment>


Training Customers to Be Stupid - <AUTHOR> https://shkspr.mobi/blog/2017/03/training-customers-to-be-stupid/ <comment><USER2> This article is perfect in showing the irony of Verizon's acquisition of Yahoo, Inc.</comment>


Iran's new stealth jet, or is it? - <AUTHOR> http://defensetech.org/2013/02/04/irans-new-stealth-jet-or-is-it/

<comment><USER2> Can anyone translate the video? "Se1" in the comments keeps saying we'd understand the purpose of this plane-shaped object if we just listen to the general on the video, and consider Iran's operating methods.</comment>


Boosting Nginx Performance with Thread Pools - <AUTHOR> http://nginx.com/blog/thread-pools-boost-performance-9x/ <comment><USER2> I think this would have been much better titled "Boosting NGINX Performance 9x with Asynchronous wrappers around blocking system calls".

Most people when hearing about "thread pools" in the context of a web-server think about using multiple threads for handling separate requests, which is NOT what this is about. It is using threads to enable some blocking syscalls (read and sendfile) to run asynchronously from the main event loop.

There's already a library for that! [http://software.schmorp.de/pkg/libeio.html](http://software.schmorp.de/pkg/libeio.html)

<comment><USER3> Similarly, there's libuv [0], which is used for Node.js and others.

[0] [https://github.com/libuv/libuv](https://github.com/libuv/libuv)

<comment><USER4> libuv is for C projects that miss the joy of javascript callback hell.

<comment><USER5> Or don't want to have 10000 threads. I have a Go server that regularly bumps 140k goroutines. Try that shit with native threads.

<comment><USER4> libuv isn't unique.. It's equivalent to libev + libeio.. in fact, that's what nodejs used before writing libuv. Whether or not it's faster than those is really case-by-case.. but what you'll definitely get with libuv is callbacks everywhere.

</comment></comment></comment></comment></comment><comment><USER6> That Flare Mobile crap on this site is constantly applying zoom CSS attributes and vertically centering the useless sidebar share buttons making the reading experience very horrible. The page freezes momentarily anytime a scroll event is triggered. And, I'm not even using a mobile device!

A bit ironic since this is an article about reducing blocking for improving performance.

<comment><USER7> Hi there - I work on Flare. Could you let me know what phone/OS you're using, so I can take a quick look? jason [at] filament (dot) io. Thanks very much!

</comment></comment><comment><USER8> The design seems similar to the one suggested in the 1999 USENIX paper "Flash: An Efficient and Portable Web Server". It's a good read on the topic. nginx came about in a time where you're a lot more likely to have your site cached in RAM than in 1999 (along with offloading large files to a CDN/S3 and reverse-proxying to an app server for a lot of other stuff), but it's nice to see them working on making performance better for the bad cases.

[https://www.usenix.org/legacy/event/usenix99/full_papers/pai...](https://www.usenix.org/legacy/event/usenix99/full_papers/pai/pai.pdf)

</comment><comment><USER9> "On the other hand, users of FreeBSD don't need to worry at all. FreeBSD already has a sufficiently good asynchronous interface for reading files, which you should use instead of thread pools."

Great to hear that.

<comment><USER10> What if Linux had a great asynchronous interface for reading files and FreeBSD had a terrible one ? Would NGINX team have bothered to implement this ?

<comment><USER11> Originally, as Igor has said in many talks, Nginx was written for FreeBSD, and supports what FreeBSD supports, and the Linux port has historically managed as it could. This is a case of actually adding something for Linux specifically, which is unuusual.

So the answer is it probably would have been implmented years ago if that was the case.

<comment><USER12> Originally. But the focus has shifted since then. There are a number of Linux- addicted developers in the team now.

</comment></comment></comment></comment><comment><USER13> A slight note on the terminology - reads and writes of ordinary disk files technically do not "block"; they "Disk Wait" instead. The difference is visible for example in that ordinary files are always considered by select()/poll() as readable and writeable.

</comment><comment><USER14> I don't think that a load of 172 is a good idea. I know this is a benchmark that is measuring how fast you can go ideally but in production the question is how fast you can go with with keeping the latency within the SLA. As a general rule you want to run your boxes around 1 normalized load ( load / # of CPU cores). The rest of the article is pretty nice.

<comment><USER13> Remember that processes in (D)isk Wait state count towards the load average even though they are not running or runnable.

<comment><USER14> As well as network IO. This is why just by the load you can't tell what is going on and this is exactly the reason why I don't like it too much in production. A box should do a have a smooth 15minutes normalized load over time. (If your workload changes you can do autoscaling, I think we used the normalized load as the metric for scaling up and down).

<comment><USER15> At least according to the linux documentation, network IO is NOT part of the load average, only processes waiting for disk IO and runnable processes.

</comment></comment></comment></comment><comment><USER16> I think it would be cool to see something similar from MS about IIS and .Net which have used thread pools for some time, though only relatively recently has asynchronous development taken hold at the application level (beyond lifecycle events)...

In practice, I've seen plenty of errant bugs because of race conditions in sites that start to come under heavy load. I wish more people would take the time to understand how their platforms work. That said, I've really come to appreciate the node.js approach.

</comment><comment><USER17> Great explanation of an event driven web server. Helped me understand ome of the benefits of the mongrel2 architecture that separates the tasks needed to be done completely by using ØMQ as the mechanism to decouple the connection handling from the message handling of the request.

<comment><USER18> While asynchronous messaging is generally a good idea, using a messaging middleware seem to be an overkill. One should use smallest hammer for the job.

Thread is a wrong idea in the first place - by broking isolation of processes (share nothing principle) they brought in the whole new class of problems with locking and synchronization. Only threads that share nothing is a reasonable choice, but without sharing the whole concept makes no sense anymore. So there are kernel lightweight processes which seems to be good choice for offloading the blocking operations from the main loop.

BTW, Erlang does it right from the very beginning.)

<comment><USER19> 0MQ _isn 't_ a messaging middleware. It's point to point (unless you build your own middleware).

</comment></comment></comment><comment><USER20> '[https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/890179](https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/890179)

</comment><comment><USER21> It is really unfortunate that Linux does not do proper async disk IO. Then again, for lots of websites, the static assets stores on disk fit in the OS cache so the boost won't really be nearly as big.

<comment><USER22> I'm not sure what you really mean by this. Linux has supported non-blocking I/O using _select_ and _poll_ since at least 2.4. 2.6 even added support for _epoll_ , which scales even further since the callbacks are _O(1)_.

It's a fairly common practice to spawn _2n_ processes/threads ( _n_ processors) to allow half to block on I/O and system calls though.

<comment><USER21> Well, TFA talks about Linux not having great support for async IO for the filesystem. You can use O_DIRECT and get async IO that way, but that completely bypasses the OS cache, so it's not a great way to do it, at least not for nginx. Just read the article to see the details.

Note that kqueue(2) in BSD-land supports a unified interface for async IO for both sockets and files, so you can have a proper event loop without having to resort to reading files in a thread pool. If Linux had something similar, a nginx wouldn't need to integrate a threadpool for this (though it might for other things, such as CPU-intensive plugins).

<comment><USER22> The nginx threadpools aren't strictly for I/O. One of the other major issues TFA mentions is that plugins don't use _epoll_ / _kqueue_ , and they block (with all the associated performance costs).

The detail I apparently skipped is that uncached file reads aren't handled uniformly through _epoll_ (which I'm surprised about). I don't see why files should be handled any differently than sockets. etc... in regard to non- blocking I/O using _epoll_.

Although, my issue is that everyone tends to look to methods starting with _aio__ to do asynchronous I/O. Those are fairly bad interfaces (POSIX AIO) and inefficient (effectively threadpools). Using the nginx model with an _epoll_ / _kqueue_ event loop is a better architecture.

</comment></comment></comment></comment><comment><USER23> Hardly exciting stuff, async libraries have been doing this for things like DNS queries (where there's no portable non-blocking API) for decades. Good for Nginx addon devs I guess.

<comment><USER24> Just because it's been done in other tools doesn't make it "hardly exciting" when an often-used tool that was lacking a feature adds it.

<comment><USER25> He conflated exciting with "new development in computer science".

</comment></comment></comment><comment><USER18> Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.

<comment><USER26> Linux kernel aio will often still block when dealing with the page cache even if you request nonblocking. The workaround for this is to use O_DIRECT, which is okay for databases that do their own cache management but not for something like nginx (which is depending on the OS cache).

Glibc's posix aio (aio_*(3)), on the other hand, does not use Linux's kernel aio AFAIK. It probably uses thread pools. It also uses signals to signal completion. It is not generally considered performant.

<comment><USER18> Yes, good points about caching, Informix does everything by itself, indeed, on raw devices or direct mapped files, which is the only way to maintain not evenrual, but strong data consistency Thanks for clarifying.

</comment></comment></comment><comment><USER27> 403 Forbidden

Well at least it isn't a 503

<comment><USER28> They deleted it for some reason, but here it is from Google Cache: [https://webcache.googleusercontent.com/search?q=cache:http:/...](https://webcache.googleusercontent.com/search?q=cache:http://nginx.com/blog/thread- pools-boost-performance-9x/)

</comment></comment><comment><USER29> Thanks, we run a few sites at work that might benefit from implementing this.

</comment><comment><USER30> If only the nginx-provided rpm build was built --with-threads.

</comment><comment><USER31> Open-source API Management KONG ([https://github.com/mashape/kong](https://github.com/mashape/kong)), which is based on NGINX, uses the same workaround of Async wrapppers to make requests faster.</comment>


What Makes A Great Programmer? - <AUTHOR>

<comment><USER2> the ability to ask good questions for example...

</comment><comment><USER3> creativity, curiosity and passion..</comment>


Where Apple would stand without the iPhone and iPad – Ole Begemann - <AUTHOR> http://oleb.net/blog/2011/04/where-apple-would-stand-without-iphone-and-ipad/ <comment><USER2> Let's face it, Apple has let OS X stagnate while focusing on iPhone etc, so it's Mac revenues might have improved by more than 119% without the i trilogy. OTOH, many macs were sold as iPhone dev platforms and because of the halo effect from the phone.

</comment><comment><USER3> This is pretty astounding.</comment>


Ask HN: What are some ways to learn system design/architecture for a recent grad? - <AUTHOR> I am a recent grad and I want to learn more about how to design big systems. I read engineering blogs by companies often, although most times I have trouble getting the big picture (the most recent one being understanding how Docker fits into the big picture). I guess it starts with getting to know the architecture of the product I work on, but the product is rather a small one with a simple design.<p>How should I go about understanding system design and eventually designing big systems? I'd love to hear some of your suggestions. Thanks in advance! <comment><USER2> The [http://se-radio.net](http://se-radio.net) podcast series has discussed many architectural and design topics. The [http://changelog.com](http://changelog.com) podcasts frequently discuss problems at that scale because their pain motivates open source solutions. Finally, there may be no better software design talks than Rich Hickey talking about designing Clojure.

Good luck.

</comment><comment><USER3> I like looking at old stuff from Bell Labs and Xerox Parc. If you dig around, you can find some tremendous papers about designing systems. For example, search around for books and papers in the 70's and 80's on Unix, the Alto, Ethernet, etc...and when you find an author you like, check the reference and find more like that. Checking the articles listed in a wikipedia article's reference is also a good starting point for this sort of thing. For example [https://en.wikipedia.org/wiki/Ethernet](https://en.wikipedia.org/wiki/Ethernet)

</comment><comment><USER4> One good resource is [http://highscalability.com](http://highscalability.com). It's got a number of good stories about scaling up and the architectures decisions used therein. There are also a number of articles and papers released by Google, Linkedin and Amazon that are worth reading.

One thing that I've found incredibly useful is diagramming application architectures, starting with applications you work on. That plus understanding the CAP theorem</comment>


Instagram for Windows 98 by Petrick Animation - <AUTHOR> https://www.instagram.com/p/B11voaGIfRM/ <comment><USER2> The icons aren't quite as explanatory as text, and the amount of white(gray?)space at the top is unusually high, but at least there's no confusion of what is a clickable button.</comment>