Ask HN: How do you choose your technical books? - <AUTHOR>

Hi,
  For any given language/framework/concept there are several technical books available.
How do you choose your technical books?

  1.I just read amazon reviews.

  2.Go by friends recommendation.

  3.Check out what others have said on Hacker News, stackoverflow or a relevant subreddit

  4.I read the book reviews in blogs.

  5.I get the book recommended on the technology's site or the book recommended by a tutorial I used.

  6.I don't think. I just get the first one I see.

  7.I get multiple books and use-them-all/choose-the-one-i-like.
 Do you search online about the book you are going to purchase?
Would you like a site that collates all the relevant recommendations in one place? <comment><USER2> Some books I choose, some books I see mentioned (like here on hn).

To find books on a fresh topic, I google _site:stackoverflow.com books TOPIC_ to find an already-curated list or two (ex: [1]). I find a few of those books on amazon, inspect the reviews. Positive reviews often all sound the same, so negative reviews are usually more worthwhile. I try to ignore the reviews (and the books) from people who've never read another book in the genre. If the book is on Safari, I skim the ToC and jump right to the middle to see _what_ they're building, _how_ they're building it. I may even look for a pdf to skim (but not read, I don't like to keep/read e-books, I only buy paper).

If the book is on Amazon for $0.01 (+ $3.99 shipping), I just buy it. If I still want the book, I check CamelCamelCamel for the ' _proper_ ' price to buy it at, and I set an alert. For example, I recently waited for Koza's _Genetic Programming_ to hit $15, then I purchased.

[1] [http://stackoverflow.com/questions/1017017/what-is-the- best-...](http://stackoverflow.com/questions/1017017/what-is-the-best-way-to- learn-erlang)

<comment><AUTHOR> thank you very much, Arh68, for the detailed answer. If a site provides a summary of reviews for each book from different sources like stackoverflow and reddit, similar to rotten tomatoes does for movies, would that save you time? Will that interest you</comment></comment>


Gigster Does the Dev Dirty Work to Turn Your Idea into an App - <AUTHOR> http://techcrunch.com/2015/07/22/uber-for-developers/?ncid=rss#.nnywn4:J0ir

<comment><USER2> To me this seems like a great product at the right time. Looking forward to trying out the service. Given that the price range can vary so much on any particular project, how do they figure out the cost? That's one of the biggest areas of confusion for me.</comment>


Canadian Supreme Court: Reporter must give RCMP material about accused terrorist - <AUTHOR> https://www.thestar.com/news/canada/2018/11/30/vice-media-reporter-must-give-rcmp-material-about-accused-terrorist-supreme-court.html <comment><USER2> >[the court] said, in this particular case involving a deliberately non- confidential source, the "state's interest in the investigation and prosecution of crime outweighed the media's right to privacy in gathering and disseminating the news."

seems reasonable to me. if you're talking to a reporter and don't want the government seizing their notes, do it confidentially.

<comment><USER3> People considered terrorists by the government will not contact or speak with journalists if they can't trust that their conversations with the journalist will not be seen by the government. It's not a matter of "just don't go on the record." The source presumably has built up trust in the journalist and trusts their judgement to not compromise the source. An example that comes to mind is Robert Fisk interviewing Osama Bin Laden in 1993. The interview was on the record. He was even at the time a major world figure. People wanted to know what he had to say. He would presumably been unwilling to do the interview if he thought that the CIA would seize Frisk's notes determine his location and assassinate him.

<comment><USER4> > People wanted to know what he had to say

Sure. Also applies to modern sources of controversy and "view count": flat- earthers, anti-vaxxers, populist demagogues and other controversy generators.

I'm skeptical. How much of it is journalistic interest, how much is "wanting page views?"

<comment><USER5> What difference does it make?

</comment></comment></comment></comment><comment><USER6> What are the legal consequences if the records have been destroyed? And the reporter will answer any questions, but there are no notes, files, recordings, etc? Surely "contempt of court" isn't a life sentence?

<comment><USER7> If the records are willfully destroyed by the reporter, the government could choose to file charges that go beyond "contempt of court" — Canadian law defines a "terrorist offence" to include, among others, accessory after the fact. The prosecution would presumably then need to demonstrate that the reporter knowingly hindered the prosecution of a terrorist and that this fits the available laws. Also, destroying one's records to protect one's own reputation as a reporter might well qualify as "for personal gain", further worsening their chances of having a plausible defense.

(d) a conspiracy or an attempt to commit, or being an accessory after the fact in relation to, or any counselling in relation to, an offence referred to in paragraph (a), (b) or (c);

[https://laws- lois.justice.gc.ca/eng/annualstatutes/2001_41/F...](https://laws- lois.justice.gc.ca/eng/annualstatutes/2001_41/FullText.html)

<comment><USER8> Would this apply if the reporter had destroyed the data prior to the government request? What about in the case where such a destruction were a condition set by the terrorist in order to proceed with the interview?

<comment><USER7> Those are useful questions to consider, but as with the risks I describe, ultimately would require a court decision.

</comment></comment></comment></comment><comment><USER9> That's how you any future possibility of trust.

<comment><USER8> I think you accidentally a word.

<comment><USER9> Indeed.</comment></comment></comment>


HAProxy in 2018: HTTP/2 and dynamic reconfig - <AUTHOR> https://certsimple.com/blog/haproxy-http2-dynamic-load-balancing-ssl <comment><USER2> Author here: there's a bunch of existing HAProxy load balancing guides but outdated: specifically, this adds HTTP/2 (added end of 2017) and dynamic reconfig (added end of 2015), as well as the HTML5 SSE, a static server, and other common useful bits and pieces.

All configs and the 'swap-server' script are at [https://github.com/certsimple/haproxy-http2-load- balancing-c...](https://github.com/certsimple/haproxy-http2-load-balancing- config)</comment>


Why Peter Thiel Fears "Star Trek" - <AUTHOR> http://www.newyorker.com/tech/elements/why-peter-thiel-fears-star-trek?intcid=mod-latest <comment><USER2> That was unexpectedly fun.

This caught my eye - _" This, rather than the liberal-democratic setting of the U.S.S. Enterprise, is the political environment in which Thiel seems to feel most comfortable."_

Is the author right?

</comment><comment><USER3> The more I learn of Peter Thiel, the more I dislike him.</comment>


The Paris Compressed-Air Power Network (2018) - <AUTHOR> http://www.douglas-self.com/MUSEUM/POWER/airnetwork/airnetwork.htm <comment><USER2> Impressive! At the time, France was the world's leading power and accomplished great things (the tallest building in the world, advances in all scientific fields, etc.).

The two WW (both originating from Germany attacking) changed that and after 1945, the world order switched in favor of the US which had the immense advantage of not being impacted on its own territory by the wars.

<comment><USER3> >Impressive! At the time, France was the world's leading power and accomplished great things (the tallest building in the world, advances in all scientific fields, etc.).

It was pretty clear to everyone at that time that France is being eclipsed by the rising Germany next door. They got soundly defeated in 1870 and demographics coupled with economic growth rates were only going to make that disparity greater (and did).

</comment></comment><comment><USER4> Archive.org version since we brought the site down: [https://web.archive.org/web/20190320151607/http://www.dougla...](https://web.archive.org/web/20190320151607/http://www.douglas- self.com/MUSEUM/POWER/airnetwork/airnetwork.htm)</comment>


S2graph, an open-source graph database with a fully asynchronous API - <AUTHOR> https://github.com/daumkakao/s2graph

<comment><USER2> It's an RPC style API, surely not REST as stated in the documentation.</comment>


Yes, Robots Really Are Going to Take Your Job and End the American Dream - <AUTHOR> http://www.fastcoexist.com/3046203/the-new-rules-of-work/yes-robots-really-are-going-to-take-your-job-and-end-the-american-drea

<comment><USER2> ...

[http://i0.kym- cdn.com/entries/icons/original/000/011/129/RT....](http://i0.kym- cdn.com/entries/icons/original/000/011/129/RT.jpg)</comment>


Bad Notes on Venture Capital - <AUTHOR> http://www.bothsidesofthetable.com/2014/09/17/bad-notes-on-venture-capital/ <comment><USER2> With seed funding, founders need to accomplish several goals: (1) raise early money as a bridge to Series A to avoid having to take large money right up front when valuation is at its lowest and the dilutive hit will be at its maximum; (2) keep equity incentives priced relatively low so that a quality team can be assembled without giving its members tax grief; (3) keep transaction costs in raising the money reasonable; (4) move to close relatively quickly to avoid getting sucked into the fundraising time sink.

Convertible notes and convertible equity (SAFEs) both allow founders to meet these goals in ways that equity rounds simply do not. In this sense, they have incredible value as tools to be used by an early-stage startup.

Are they perfect tools? Well, no. Each has its own limitations and problems and each can be abused on either the company side or the investor side. Founders routinely used to take uncapped convertible notes, build value, stretch out the process, and leave the investors getting ever-diminishing rewards all the while that their money was being used to build that value. Investors wised up and began insisting on caps to avoid such abuses. They wanted to protect the idea that they would get significant extra rewards for taking the earliest-stage risk. It was not enough, e.g., to get a 20% price discount at Series A if you convert at $20M pre-money valuation when the company was probably worth no more than, e.g., $5M at the time you invested the seed money. The investor insisted on locking in that ceiling on valuation as a means of self-protection. Does this result in occasional windfalls to bridge investors who take capped notes (or SAFEs)? Yes, it does. Does this arrangement have attributes of something that resembles a liquidation preference in its functioning? Well, yes, it does. Ditto for the full-ratchet anti-dilution attributes. These things are very real attributes that do affect the value of using these tools for founders and their companies. They add to the negative side of the ledger.

But let us say that your startup had to give four times the value in Series A preferred stock relative to other investors to the hypothetical investor noted above ($20M valuation, $5M cap). What does this mean? If that early investor put in $300K and the Series A round was for $7.5M, the early investor might have gotten a windfall but the impact on the round is small because the dollars involved are not large. And if the venture did not do well and the Series A round priced at $3M, then that same investor would still get something like a 20% discount off the lower valuation instead of having had to peg his fortunes to the $5M value used for the cap as he would have had to do had he taken equity. But so what? The dollars are still small and it doesn't matter relative to the value and utility offered by using the convertible note (or SAFE) tool. And, for every "windfall" gained by such investors, you have all sorts of cases where the failure rate is particularly high because of the extreme risks existing at the earliest stages before it is even determined that a company is truly "fundable."

The value of notes and SAFEs is flexibility. Your occasional investor will get special advantages but these are not unduly costly to you as a company. And you have a good measure of control over how you do things. Your first note can be capped but, as you gain traction, later notes can be uncapped. You can raise money at any time without having to worry about creating tax risks and without having to mess up your equity pricing. You can do the number of notes and in the amounts you immediately need. You don't have to go through endless negotiations over the sorts of things that can accompany an equity round (especially protective provisions and similar restrictions on what a company can do). You avoid giving your new investors a veto right or other significant say on what you can do in future rounds, as you would normally have to do if you did an early-stage equity round using preferred stock.

Basically, there is a whole different dynamic in using notes/SAFEs versus doing an equity round. And, in most cases, it is a useful and valuable dynamic for founders and their companies notwithstanding the trade-offs. In this sense, the main idea of this piece that I would strongly disagree with is its suggestion that using convertible notes is somehow a sucker deal. It can be if done wrong but it most often is just the opposite.

Another metric for measuring the relative value of these tools is to see who is using them. Convertible notes have had massive and widely dispersed use now for many years. The most sophisticated investors have had no problem with them in general, and that includes the VCs who lead Series A rounds in which converting noteholders get the benefits of their caps and take more relative value in the round than the VCs themselves do.

As with anything else in the startup world, founders need to use good judgment. The points made in this piece are informed and technically accurate. And they do underscore some clear disadvantages in using notes/SAFEs. My point is that, notwithstanding these defects, notes/SAFEs retain great utility for founders in the context of the broader issues they need to address (minimizing tax risks, keeping stock price low, keeping transaction costs down, etc.). And so this is a good piece to add to your knowledge base but it should not deter you from using non-equity forms of seed funding as long as use of these tools meets your bigger goals. You have control at that stage. Use that control wisely.

<comment><USER3> Agree with all of this. But on your point about convertible notes not giving governance rights that can hold up a future financing - even though this is true from a technical perspective, in my experience the later round investors will insist that every noteholder sign the preferred stock financing documents at the time of the financing in order to acknowledge their note's conversion into preferred stock. So even though the noteholders don't get to vote on the deal as stockholders, they still can hold things up by refusing to sign, asking for additional information etc... My advice to companies is always to treat the noteholders as if they were already stockholders in terms of providing them updates on the terms of the financing as it develops, giving them time to review the term sheet, and making sure all are comfortable with the deal so that you don't have any holdouts when it is time to close the Series A.

</comment></comment><comment><USER4> Is there an entrepreneur willing to say "Yep, tried them, got bitten in the hindquarters", even anonymously? I don't necessarily disbelieve here but it strikes me that VCs have the curious property of always giving fundraising advice which is in the interest of VCs. I acknowledge that somewhere in this wide world there may actually be a VC motivated primarily by friends-and- family getting appropriate compensation for risky investments but that is not the way I will bet.

My understanding -- limited, in that I've been a party to two but from the other side of the table -- is that a major reason they became popular is because they take the fangs out of collusive behavior by investors. The Valley had evolved a "Well, I'll invest if you get a lead" "Well, I'll lead if you close $X" system which froze out a lot of companies if the founders didn't have deep, pre-existing social networks. "You want a lead!" sounds a lot like wistful nostalgia for this gatekeeping behavior. I understand why a gatekeeper would see it that way. I don't understand why the gated would.

<comment><USER5> This is mark (the author).

I totally get why i would be seen as biased. I have given this advice hundreds of times in small sessions verbally and I REALLY have no interest in driving my point of view for me. I do 2 deals a year. It barely matters to me personally.

Do me a favor. Ask around to experienced entrepreneurs who have done 3-5 companies and stretching back to at least the mid to late 90s. I promise you you'll hear similar views to mine. Also, ask some very smart lawyers for a balanced view. I think you'll mostly hear the same.

re: gate keeper protecting the establishment. I know you don't know me but truthfully it is nothing of the sort. I think in simple life lessons. When you matter more to a small set of people they have more interest in helping you in tough times. If you never make mistakes or struggle then the argument of not having strong leads makes sense. It's just that this is the edge case.

Good luck.

<comment><USER6> Thank you for your reply on HN. Can you also please reply to grellas's post (at or near the top)? grellas is a "very smart lawyer" who posted some excellent counter-points to your original article. Personally, I'd love to hear your response.

<comment><USER7> I think grella said the advantages of convertible notes are:

1\. First note is capped but later notes can be uncapped; 2\. Fewer tax risks; 3\. Doesn't mess up your equity pricing; 4\. You can do a number of notes with different amounts raised; 5\. You don't give your investors the kind of protections they would get in equity rounds.

I'd like to hear Mark's reply too. My opinion below.

I tend to think that all of these things (aside from the tax risks) are either inconsequential in comparison to equity financing (3, 4), or simply the result of having unsophisticated or uncaring investors (1, 5). The tax risks he did not explain; I assume he means the risk that the IRS would use an equity round to peg a value on shares or options given to employees that differs from what the company assumed. If so, this risk exists no matter what.

I agree that giving the investors less protective provisions or uncapped notes is better for the company. If you can get investors to agree to that, good for you, but that's separate from structure.

The primary problem with convertible notes as they are used today for entrepreneurs is that the investor gets the lower of the cap or a discount to the next round. This optionality is paid for by the entrepreneur. And while, as grella points out, the cost of this optionality is usually pretty low, so is the value of the benefits he points out.

</comment></comment></comment></comment><comment><USER8> Posts like this make me realize how amateur and inexperienced I am. Seriously.

I've taken it for granted for the past 3 years now that convertible notes were universally regarded as the best and smartest form of fundraising for seed rounds, just based on what I've found and read in various places online (lots of it here on HN, for that matter...)

And here we have Suster laying out clearly the opposite side of the argument in a way that humbles me. This is clearly an area that I have a lot to learn from people much smarter than I.

Most YC companies go on to raise rounds using YC's SAFE, which is an adaptation of convertible notes, right? If so, I'd love to hear a YC partner (or partners) address these points.

<comment><USER9> Everything has its pros and cons, and he's pointing out that if you have a note with a high cap and then can't raise the next round above the cap, or if you have multiple notes outstanding, then it _might_ mess with the mathematics of the cap table in a bad way when you raise a priced round.

The truth is that notes and YC's SAFE are still the way to go. Why? If the startup is taking off, then you're going to blow past your cap (which you should set fairly) and everyone's happy. If the startup isn't headed anywhere, well, why the hell are you raising more anyway? Consider selling or shutting it down. The problems he's pointing out apply in this case, and frankly you can always in such a situation consider re-negotiating prior deals if you have to. In other words, these are theoretical objections at best.

Most 'traditional' investors used to have it good in the (good, according to them) old days. They had the leverage, so they forced terms that were good for them. This meant lower valuations in general compared to today, and control in the form of board seats, which you generally had to have once you had different classes of equity. Those days are long gone, and this strikes me as a lament for the way things used to be.

<comment><USER10> I've done about 90 angel investments.

The average return for companies that start as a cap and not equity is < 1.

Companies that have sufficient success at the time of raise do not generally do debt. YC biases them more towards notes, though.

<comment><USER11> How many of those 90 were convertible notes, to put this in perspective?

<comment><USER10> Roughly half.

</comment></comment></comment></comment></comment><comment><USER12> Here's the thing that's left out of this investor-friendly analysis, and why Suster is wrong about the "irrationality" of no-cap deals: For smaller angels, _access to the deal_ itself is valuable.

Small investors don't have access to Series A. That's why the analogy with the stock market is broken:

 _" Can you imagine investing in the stock market where your price was determined at a future date and the better that company performed the HIGHER the price you paid for that investment."_

The reality is angels don't have the option of purchasing the stock after the seed round. So, it can make perfect economic sense for an angel to pay a premium to get access to a deal. And if that premium comes in the form of pre- paying for a chunk of the Series A (one way to look at a no-cap deal), that can make sense -- perhaps even more sense that an enhanced seed valuation would. A discount would be sweetener on top of that. But to be clear: there is a rational case for smaller investors taking no-cap deals in order to get a chunk of the next Facebook, which they otherwise wouldn't be able to get.

Seed rounds present a unique intersection point for founders & smaller angels where their interests overlap. I think the bigger-sized investor community are somewhat threatened by that, and that's why we're seeing such a sophisticated campaign against no-cap convertible notes. But the climate is now competitive enough and small-angel platforms are getting enough traction that you can sense their anxiety that no-caps may be coming back, to the great benefit of founders.

<comment><USER13> That is an extremely interesting point.

I never thought of it that way, seeing series 'A' with some regularity and being a (consulting) participant in the deals I never felt the urge to invest in these deals simply because that would create a conflict of interest. But the fact that the only investments that I did do were as an angel in 3 different companies was simply due to the fact that the rounds were very early and the amounts were still low enough that they were in my 'bracket' or 'comfort zone'.

I guess if I felt the need or desire to participate in series 'A' I would join an established VC as a limited partner.

One of the reasons VCs would not like to have a bunch of angel investors join in a series A is that there would likely spontaneously combust into existence a sort of Polish Parliament and then the deal would likely fall through.

Syndicated deals have some of these aspects already, especially if the geographic and/or cultural spread of VCs is large.

<comment><USER12> Exactly: Tech angels who are not LPs in a VC fund are largely limited to the seed-stage investment market. Therefore founders can negotiate better terms (e.g. no cap).

Superangels / mini-VCs / actual VCs like Suster don't find it as appealing because they have plenty of Series A deals come their way.

But then again I bet they would bite at a really quality opportunity at the seed stage, because the best companies will seek larger funds at their Series A than what superangels can offer. (So they're not necessarily seeing the best companies at Series A.) Part of me thinks this "no cap's for suckers" blogstorm is just FUD to improve their collective negotiating position.

The only thing dumber than a superangel taking a no-cap convertible debt deal is a superangel passing on the next Facebook's seed because they didn't want to pay Series A prices. That would be incredibly shortsighted.

</comment></comment></comment><comment><USER10> So here's how the preference multiplier happens: when the company raises an equity round, you calculate the new share price, and the noteholders are assigned the investment's worth of shares. However, because of the change in value, they would get more preferred shares per dollar invested than the new investors.

So generally you get just the original price's worth of preferred and the rest is common.

</comment><comment><USER14> Wow. this is misleading. Convertible notes are the best things to happen to startup founders in the history of fundraising.

Take a modern convertible note to an angel investor from the pre-bubble 90's and they'd laugh you out of whatever coffee shop you happen to be sitting in.

All of the "examples" shown in the blog post make irrational arguments. Show me one scenario (in numbers) where using a convertible note for a seed round was suboptimal compared to an obtainable equity deal.

If I didn't know better I'd think this was an example of a VC trying to smear an awesome instrument so hopefully they won't have to compete with investors willing to write them.

</comment><comment><USER15> The benefit of convertible notes / SAFE's is that you get the invested cash IMMEDIATELY. This is a non-trivial benefit for most startups.

When raising a full round of capital, say 1M, you don't get any of it until you 'close', after everyone is committed.

Convertible notes allow entrepreneurs to build progressively towards a close, without waiting for all the cash to come in -- which might come too late. So, sure, if you're flush with cash, then convertible notes are a worse idea relative to a priced round. But when is that ever the case when fundraising?

<comment><USER16> The article's discussion of 90 day "top up" terms seems to address that.

<comment><USER15> Yeah, but it still isnt the same -- because for the first investor, you still have to get them to agree to pony up the full 500k.

When dealing with smaller angels, its easier to get your first 250k - 500k in 50k-100k increments.

I _do_ like the idea of setting a price instead of a cap. Even if it means your price is a bit lower than the cap, it should be relatively straightforward to transition from a cap to a price with sophisticated investors, and it protects you in any weird situation.

<comment><USER7> You can certainly do smaller increments with an equity round. But because equity rounds tend to have leads and the lead is usually the biggest check, they also tend to have most of the money committed at first close.

Many note investors also ask that a certain amount be committed before the first close.

</comment></comment></comment></comment><comment><USER17> It's my impression that everything he says, if true, can also be applied to YC safe. Is that correct?

[http://www.ycombinator.com/documents/](http://www.ycombinator.com/documents/)

<comment><USER18> Yes. All of that applies to SAFEs as well, which are basically convertible notes that aren't "debt."

Basically convertible notes were kind of a financial hack that let you take money without setting a price by calling it "debt," even though no one really regarded it as debt. That brought along a couple small negative side effects, but the good outweighed the bad and let you close rounds quickly without $10-25k in legal fees and seemingly endless negotiation.

A SAFE is the same thing, but it jumps through the hoops necessary to not be called "debt" and gets rid of those side effects.

</comment></comment><comment><USER19> I don't really understand any of this. What are "convertible notes", what's a "cap"? Is there a beginners glossary somewhere?

<comment><USER20> Convertible notes are a way to invest money now (the 'note') at a valuation that will be decided later (at 'conversion'). It is mostly used by angel investors to invest in very young startups for which it is too hard to put a valuation on them. The conversion of the convertible note debt into equity happens at series A investment by venture capitalists. Often the convertible note holders get a discount on the valuation, to compensate for putting in their money earlier. There may also be time limits on the conversion or a cap on the valuation.

Example: Angel invests $500K in startup in convertible note form, startup raises 10M from venture capital firm at 90 million pre-money valuation later. The VC firm ends up with 10% of the equity, because 10 million is 10% of 100 million post-money valuation (90m pre + 10m invested). The angel will receive 500K / 100 million = 0.5% of equity if there is no cap or discount. If there is say a 50% discount, the angel gets 500K / 50 million = 1% equity so double the equity. Same effect would be if there is a cap of the conversion valuation at 50 million, i.e. no matter what valuation the VCs invest at the angel gets at least 1% of equity because 500K / 50 million = 1%.

Hope it makes sense.

<comment><USER21> This is a great and concise description. So in effect, are the terms on convertible notes just bets on the _following_ round's valuation? In that case, it seems to me that's not much different from valuing the company right now, because if you have enough information (from projections & standard multipliers for the industry/sector) to bet on the A round's valuation, you could just interpolate a valuation at the current time...

I'm starting to realize that my gut reaction to squint skeptically at convertible notes wasn't too far off the mark... it's like going to Vegas and betting your company, but everyone else at the poker table has been playing for years longer than you have...

<comment><USER20> Convertible notes are a way to incentivize great execution by the founder team between the angel round and the series A. Execute better => Higher series A valuation => Less dilution from the convertible debt.

At the angel stage there are very little metrics and multiples to go by, hence why you need to invest in the team and incentivize them using convertibles.

</comment></comment></comment></comment><comment><USER22> The second vignette in this article has Suster suggesting that convertible notes carry liquidation preferences and anti-dilution. Does he mean that some subtle property of convertible notes create those terms in practice, or does he literally mean that if you read the note paperwork you'll find a 2x liquidation preference and a full ratchet?

<comment><USER10> liquidation pref: a subtle property of conversion (if you buy preferred only at the cap price instead of effective price you are effectively getting >1x your preference by ending up with more shares.)

anti-dilution: only if negotiated

<comment><USER22> My current impression is that the "full ratchet" he's referring to is conceptually just the deferred valuation itself.

</comment></comment></comment><comment><USER23> Check my understanding?

So convertible debt isn't really debt-- it's an equity investment with deferred closing and terms. Right?

I can see then how this can lead to bad outcomes for the entrepreneur (behaves like a full ratchet if there's a cap) or bad outcomes for the investor (you've deferred the conversation and agreement on expectations). But at the same time it is in some ways simpler, and you get the cash immediately. Right?

Hmm... this is interesting. He suggests setting a price. So let's say I want to raise convertible debt... he's suggesting that one instead says "I'm raising one million at X" and sell convertible notes with a fixed price instead of a cap? What would that look like?

</comment><comment><USER24> Why don't convertible notes in the friends in family scenario just set a multiple that will be suitable in the case equity is diluted? In this case it seems the main interest in supporting an entrepreneur they believe in and getting their money back - ideally at a better return than they'd get elsewhere. For example, would a 2x return on a convertible note pose any real problem to investors in subsequent rounds?

Glad to see so much discussion about it. After taking Venture Deals with Brad Feld and Jason Mendelson through Kauffman Fellows Academy / Novoed, I'm quite curious about trends on this topic.

</comment><comment><USER25> All of this is a distraction game played by VC's to avoid the real point of entrepreneurship.

Make a product worth something to a target market. Sell it or get enough traction. Find a company who would like to buy you or go public based on your growth.

All this other stuff is a distraction created to keep you from focusing on what you are here for. To build great things and sell it for profit.

Otherwise... whats the point. The best negotiating term is having a great product. You won't raise your way to a product/market fit.

</comment><comment><USER26> Does anyone have a valuation model spreadsheet that accounts for multiple rounds of convertible note financing, and purposed towards a Series A conversation ?

As a founder, I have tried searching for these but never managed to find one.

I'm not sure if it is an India thing, where investors _actively discourage_ convertible notes because of the availability of several pounds of equity flesh in exchange for angel stage funding.

</comment><comment><USER27> How often do companies that end up doing a round below the original cap ( effectively a down round ) actually recover and do well? Does this really matter? Seems like it is such a big risk to investors to invest below the cap that they should be appropriately compensated for it, which is what the discount accomplishes

</comment><comment><USER13> Super good piece, required reading for anybody currently founder or co-founder of a start-up and considering convertible notes.

</comment><comment><USER28> according to this the main problem with notes is a down round can get you into a lot of trouble because of the liquidation preference multiplier. but what if you never have a down round? if you can avoid the down round, it seems like convertible notes are still preferable. down rounds are bad even with priced seed rounds.

<comment><USER10> The liquidation preference multiplier has to do with when noteholder gets preferred only instead of preferred + common on rounds that are a higher valuation than their cap.

<comment><USER28> According to Mark Suster's earlier article - [http://www.bothsidesofthetable.com/2012/09/05/the-truth- abou...](http://www.bothsidesofthetable.com/2012/09/05/the-truth-about- convertible-debt-at-startups-and-the-hidden-terms-you-didnt-understand/), there are 2 main downsides to convertible notes from a founder's point of view:

1) If an investor invests $500k at a $4.5MM cap, he signs up to get 10% of the company assuming the Series A priced round will be at a higher valuation. But, if Series A is at a lower valuation, say $2.5MM, then the investor gets 20% of the company. However, if there was a discount associated with the convertible note then the note converts at 80% of $2.5MM. So a down round is really bad for the founder. But I can't imagine a down round being much better for a priced round.

2) If the Series A is $3MM at $12MM pre with 1x liquidation preference, the Series A investor gets 20% of the company. The seed investor who invested $500k will have his shares converted at the $5MM valuation. However, he will end up with a 3x liquidation preference or $1.5MM in liquidation preferences. I think this is okay as long as you raise a few hundred thousand dollar convertible note seed round. If the convertible note seed round ends up to be in the $1MM range I think this can become an issue for the Series A investor which is Suster's main point.

Convertible notes have benefits like high resolution financing, less control & no board seats. I still think convertible notes are the way to go if you are raising a few hundred thousand dollars in seed. But if you raising a seed in the $1MM range, it seems like priced rounds are preferred.

<comment><USER10> re #2: Yes, many notes have the provision to make sure the investor gets a 1x preference on dollars invested (some preferred and some common for their investment.) and this is, IMO fair.

re high resolution financing: if you are offering different investors at different prices, you are likely to make your investors less than happy with you.

re less control and no board seats: in my experience, having a board correlates strongly with success. so i think this is a negative. to put money where my mouth is - for my last startup, I took a board even though I did not have to.

re raising a few hundred thousand or less: in my experience, strongly correlated with startup death.

<comment><USER28> re high res financing: closing dates can also vary in addition to cap. i've personally experienced varying closing dates with same cap and the initial bit was much needed at the time. haven't experienced priced yet but can imagine process being a bit slower.

re less control and no board seats: agreed. though i think it depends on the board member. in your case, i'm sure he was top notch :)

re raising few hundred thousand or less: hmm, don't have enough data. but uber's initial round was $200k. [https://angel.co/uber](https://angel.co/uber)

<comment><USER10> Uber was cofounded by someone with a large exit. This number does not represent the actual finances available and is likely misreported. I have a single exception to the low initial raise as well. Still anecdata and does not really refute the point. There are successes, but there are way, way more failures; early investors hate to reinvest pre-traction.

</comment></comment></comment></comment></comment></comment><comment><USER29> Any more good pieces regarding this topic? Super interesting!

<comment><USER13> [http://www.startupcompanylawyer.com/2011/01/09/is- convertibl...](http://www.startupcompanylawyer.com/2011/01/09/is-convertible- debt-with-a-price-cap-really-the-best-financing-structure/)

</comment></comment><comment><USER30> Only morons start a business on a loan - Mark Cuban [https://www.youtube.com/watch?v=KYneLGRTgy8](https://www.youtube.com/watch?v=KYneLGRTgy8)

</comment><comment><USER31> does this mean that the founders in that story accept money based on the agreeement that whatever the VC thinks their stake is is what will be the valuation? I'm a little fuzzy on how this works.

</comment><comment><USER32> VC wants to make money.

VC wants to make money off of your work/startup/company.

VC makes money using the given terms.

When it comes right down to it. The money they "give" is not given. It is a loan with terms and conditions. You need to be aware of this. You need to know what a loan is. It is money you are borrowing that you must pay back WITH INTEREST. Find out how much interest that is.

"It's like we need a finance 101 course for entrepreneurs"

Debt money is bad. I realize a lot of people will tell you that this is how the world runs, or this how they run their business, or I got successful in business taking out a big loan, etc and so on. Like the gambler, they don't tell you about all the losses.

Save your money. Keep your work/startup/company.

[http://www.gamesradar.com/nintendo-doomed-not-likely-just- ta...](http://www.gamesradar.com/nintendo-doomed-not-likely-just-take-look- how-much-money-its-got-bank/)

I've read that Microsoft has always had enough money in the bank to operate for a full year without making any money.

<comment><USER33> It is just impossibly more complicated than this. Financing a company with venture capital is no time to break out the folksy wisdom. "Well, it's just a loan with interest". Good lord, no.</comment></comment>


Mix of Bacteria in Gut May Depend More on Diet Than Genes - <AUTHOR> http://www.ucsf.edu/news/2014/12/122151/mix-bacteria-gut-may-depend-more-diet-genes <comment><USER2> We're slowly coming to understand that antibiotics are very unkind to our gut flora and are a prime suspect in subsequent weight gain. Post-antibiotic diet could be a critical intervention to keep patients from falling into the grasp of obesity.

A NY Times article earlier this year gives a background on how the rise of antibiotics has been accompanied by a rise in weight among animals and humans alike:

[http://www.nytimes.com/2014/03/09/opinion/sunday/the-fat- dru...](http://www.nytimes.com/2014/03/09/opinion/sunday/the-fat-drug.html)

Kids in particular seem to be at risk. A recent study of 64,000 kids has associated repeated antibiotic exposure before age 2 with early childhood obesity:

[http://archpedi.jamanetwork.com/article.aspx?articleid=19098...](http://archpedi.jamanetwork.com/article.aspx?articleid=1909801)

It's good we're investigating diet-based therapy, so patients can someday hear their doctors say "after finishing this broad-spectrum antibiotic prescription, you [or your child] should eat like this for this amount of time to restore digestive health."

<comment><USER3> Cipro did wonders on my intestinal tract, effectively killing everything including the good. Had nine days of that to fight an under the skin infection/etc. Months after I started having problems with food, restrooms were becoming my second home and my commute was planned around easy access to them. You never want to experience life where one bit of food can send you off.

Six doctor visits, stool and blood tests later, the doctors found what moved in. New antibiotics and replenishment medicines, diet with lots of probiotics, and within a few months I was back to mostly normal.

My story is simple, if you end up on harsh antibiotics it can change your life. Plan for it.

<comment><USER4> >Six doctor visits, stool and blood tests later, the doctors found what moved in.

Something other than C. Diff? Would you mind sharing what it was?

</comment></comment></comment><comment><USER5> Given the evident link between gut bacteria and mental health, it may be that we'll see diet as a component of psychiatric care in the future.

([http://www.nature.com/news/gut-brain-link-grabs- neuroscienti...](http://www.nature.com/news/gut-brain-link-grabs- neuroscientists-1.16316))

<comment><USER6> We _should_. Sadly, it's hard to administer, and harder to make money off of.

<comment><USER7> If somatopsychic medicine ever becomes a thing, I imagine it will not be called "psychiatry." And someone will figure out how to monetize it.

</comment></comment></comment><comment><USER8> Eh, as a researcher at the periphery of the Human Microbiome Project and American Gut project this has been the accepted (and already shown, experimentally) conclusion for quite some time.

<comment><USER9> This study examined two new things:

1\. The speed at which the microbiome can change (<3 days)

2\. The permanence of such changes (some of them are more permanent than others)

<comment><USER8> Those aren't particularly new things to study. We have tons of murine data on the subject and quite a few PhD students over the last 4-6 years have done their PhDs on microbiota and diet with themselves as the guinea pig, so to speak (2-4 year longitudinals).

There are a couple mouse papers out that don't directly address the issue in 2, but that permanence (or lack thereof) played prominent roles in their findings.

<comment><USER9> Yeah, you know what, you're right. Did a bit more googling around and there's tons of stuff on both. Sorry!

</comment></comment></comment></comment><comment><USER10> Study seems to follow common-sense - change the nutrients ingested and different gut bacteria will flourish.

What I'm really interested in is which types of bacteria create a feedback loop by releasing chemicals/hormones to increase hunger or cravings for specific foods. Definitely not an easy thing to determine given all the variables, but it seems very likely based on the other studies showing bacteria can promote fat or thin mice: [http://www.scientificamerican.com/article/how-gut- bacteria-h...](http://www.scientificamerican.com/article/how-gut-bacteria- help-make-us-fat-and-thin/)

<comment><USER11> Which means that a cure for obesity (or at least one of the components of a cure) can be as simple as an antibiotic that targets the "bad" gut bacteria. Very interesting.

</comment></comment><comment><USER12> Ask like this: Is it a mere coincidence that so many of poorest tropical and subtropical (hot and humid climate) populations traditionally use highly spiced food? Does it strictly a tradition of making a "poor" food taste hot, or there is a connection with bacteria population?

<comment><USER13> > Ask like this: Is it a mere coincidence that so many of poorest tropical and > subtropical (hot and humid climate) populations traditionally use highly > spiced food? Does it strictly a tradition of making a "poor" food taste hot, > or there is a connection with bacteria population?

Tradition? Capsicums are a new world crop. They didn't make much of a dent in cuisines outside of the Americas until the 18th century.

<comment><USER12> India? Sri Lanka? Thailand?

</comment></comment></comment><comment><USER14> This complements other research that has been done on gut bacteria across cultures -- in different places we humans eat different prevailing diets:

[http://blogs.discovermagazine.com/notrocketscience/2012/05/0...](http://blogs.discovermagazine.com/notrocketscience/2012/05/09/three- nations-divided-by-common-gut-bacteria/)

[http://www.wired.com/2014/04/hadza-hunter-gatherer-gut- micro...](http://www.wired.com/2014/04/hadza-hunter-gatherer-gut-microbiome/)

The second link is particularly interesting, as the Hadza hunter-gatherers have a lot of gut bacteria that cause disease in the west. So it seems that gut bacteria aren't the whole story. Something to complicate the story for people who want to cure mental illness or create skinny people via manipulating gut bacteria.

</comment><comment><USER15> Can someone speak to my theory (that's based on limited knowledge), that if we wanted to "reset" the gut, we could deliberately take antibiotics to wipe out good/bad colonies of microbes and tailor a hyper-specific diet for sought after results. The hypothesis being that if certain microbes flourish for years and that if it is impractical to genetically map the gut biome to identify which are thriving in every patient, this could help us get to a clean slate before therapy is attempted.

<comment><USER16> IMHO, that seems like a bad idea. Two thoughts (these are only very overly generalized opinions, biology is a little bit complicated):

1) You might not get them all, and the ones that survive might transfer the traits of antibiotic survival and pathogenic-ability (if present) to the new population.

2) You would need to ensure that your hyper-specific diet contains the right mixture of microbes, say, you would need to avoid irradiated food, and a bunch of other things. "Bad microbes" coming into an empty gut seems to me like a bad thing.

<comment><USER15> Thanks, both are good points! I assumed there were downsides to if you weren't able to wipe out the robust bad microbes but that's even worse than I had expected. Perhaps I'll wait on self-experimentation. The possibility of nefarious and now genetically enhanced microbes reigning supreme in my body is not cool.

</comment></comment></comment><comment><USER17> So do we know yet what sort of diet cultivates a microflora biome that encourages healthy weight loss? I'm asking for a friend...

It's easy to find diets for losing weight in general, but I'm curious if we know enough to create a diet to make a microflora composition that can help the weight loss process along. I keep seeing mentions of the microflora factor influencing weight gain, so I'm assuming there's a way to cultivate it to help with loss as well.

<comment><USER16> Turnbaugh was also an author on [http://www.nature.com/nature/journal/v444/n7122/abs/nature05...](http://www.nature.com/nature/journal/v444/n7122/abs/nature05414.html) (looking at parts of that question on mice) and also on: [http://www.ncbi.nlm.nih.gov/pubmed/21543530](http://www.ncbi.nlm.nih.gov/pubmed/21543530) (looking at parts of that questions on humans).

The answer in humans does not quite match the answer in mice so far. Possible reasons to explain this discrepancy : might be the lack of a large enough group to study, or a local variation in the groups that does not generalize to mice.

</comment></comment><comment><USER18> It would be interesting to hear both why the chose a "high fat-high sugar" diet and to see further research that did more isolated tests in the vein of "high carb", "high fat" and "high protein" instead of combinations of them. Also, what are the implications of altered gut makeup after adopting these diets? Surely we could come up with experiments to measure metabolism and behavior as a result of the altered gut bacteria.

It will be fascinating to see how our understanding of nutrition and diet changes as science finally catches up. Studies like this are just the beginning.

<comment><USER19> It does seem like a very simple study, that we would have guessed the results. Seems like a study like this would be to help facilitate laws or actions rather than finding the really important answers you are suggesting. I hope one day we come up with a model to fund research for the people, and not wait for larger organizations to fund, typically for selfish reasons. I think if we could find this model science will not only catch up, but trail-blaze new findings.

</comment></comment><comment><USER20> I know that antibiotics are a significant factor in the loss of gut bacteria, but another factor is all of the preservatives that pervade the manufactured food most people eat every day. I've often wondered what percentage of the loss is from these substances.

</comment><comment><USER21> Here is a case where the research is lagging the knowledge base. Every holistic MD has, for decades, preached eating foods enriched with healthy bacteria. What we need now is research that looks at outcomes.

<comment><USER22> These results indicate that you can eat anything, not just foods enriched with bacteria like probiotic yogurt (which has questionable benefits in itself [http://skeptics.stackexchange.com/questions/6180/do- probioti...](http://skeptics.stackexchange.com/questions/6180/do-probiotics- have-health-benefits)), and observe a change in gut microbiota.

"Turnbaugh's team found that switching mice to a high-sugar, high-fat diet reshaped the abundance of the community of microbes in the gut to a new, stable makeup within three days, in a reproducible manner that was largely independent of genetic differences among individual mice."

<comment><USER23> The real yogurt is the Bulgarian yogurt, not low-fat high-sugar ones sold at store in the States. Only an idiot will eat a probiotic "yogurt" with 30g of sugars in the small container and think they are doing good to their health! Fortunately, there are two brands [0] of the original sold at Whole Foods today (one, unfortunately, available only on the East Coast [1]), but they are too sour for the American to like. Does it have questionable benefits? Maybe you should try to research how yogurt got the attention of medicine. It was eaten by my predecessors for centuries and the benefits are without doubt.

When babies are born, their gut is sterile before it gets colonized from outside. The diet definitely can affect which strain will outgrow others, but all gut bacteria is exogenous.

[0] [http://www.whitemountainfoods.com/YogurtProductPage.html](http://www.whitemountainfoods.com/YogurtProductPage.html)

[1] [http://www.trimonayogurt.com/](http://www.trimonayogurt.com/)

<comment><USER24> If one is sufficiently motivated (and can utilize all the product), it's not hard to make ones own yogurt, with starter.

For that case, you could find your favourite local milk and make yogurt who's ingredients you are certain of, because you put them in.

[http://www.wikihow.com/Make-Yogurt](http://www.wikihow.com/Make-Yogurt)

<comment><USER23> This is true and might be surprising that Bulgarians are not accustomed to make their own yogurt, because stores are full of high-quality one that's cheap (unlike the $6-7/jar in the States). Kefir is also great and can also be made at home. My favorite is Lifeway [0].

[0] [http://www.lifeway.net/Products/OrganicKefir/WholeMilkKefir/...](http://www.lifeway.net/Products/OrganicKefir/WholeMilkKefir/OrganicWholeMilkPlain.aspx)</comment></comment></comment></comment></comment>


Agile Edge Cases - <AUTHOR> http://tiny-giant-books.com/blog/agile-edge-cases/

<comment><USER2> There are companies out there still sloshing thru waterfalls. They don't know any other way.

But really can you teach me how to breath if I am not already stressed out.? Agile is overkill. Its like teaching Object orientation. How many people still consult the GoF book or talk about patterns? The Java guys are already spent, exhausted.

The buzz industry and book industry are good at making companies and teams feel guilty of ignorance, and help lower their self-esteem.

If you can develop and bolster your common sense, and especially surround yourself with a community that resists bull-shit, buzz-words and fluff-talk, you will be in good shape without needs of all sorts of gurus.

I've been agile all along, my style was agile - but I don't need a brand or a buzzword ninja to help me come to that realization.

Drown out the noise and be more self-aware, and reflective. Buzzwords will only slow you down. "People just love to play with words"...

</comment><comment><USER3> Good read but also pretty frustrating. Sure, management has to buy in, but the author portrays a defeatist attitude. The ScrumMaster should help promote and foster agile acceptance.

An agile edge case should be a temporary catalyst to cut teeth and lead to full blown agile adoption, otherwise agile is pointless.

I've been a part of couple of cargo cult teams in the past few years and it's really frustrating to try to get others to think in Agile terms. Having an agile authority to help enforce various agile methodologies is beneficial when sometimes you're ignored as a piddly code monkey.

<comment><AUTHOR> _...Having an agile authority to help enforce various agile methodologies..._

I would be very careful with that position. It presupposes that a centralized knowledge-base is necessary for true adoption. If nothing else, this gives you a central point of failure. Also the word "enforce" gives me the heebie jeebies. Don't like seeing "enforce" and "Agile" used in the same sentence :)

How about his? "Having a trusted outsider to make non-binding recommendations about Agile practices can remind us that if we don't follow Agile practices, we're not going to get any improvement from Agile."

Most Agile adoptions, even ones with Agile authorities, achieve only a 5-10% improvement. This is because it's all too easy to give up on the team and take control, whether you're doing it for Agile or non-Agile reasons. You end up killing the very thing you're trying to promote.

EDIT: The only exception I would make to this is if the team really doesn't understand what they are doing, yet are convinced it's a bad idea. In that scenario, usually a coach or somebody can help teach the team (by insisting they try something) until they know enough to make their own decisions.

</comment></comment><comment><USER4> I appreciate his point has to buy-in to agile in order to make it work. He doesn't say it, but I expect the same applies for the management team.

</comment><comment><USER5> If you enjoyed this, you might enjoy an article I wrote:

[http://www.writemoretests.com/2011/09/agile-scrum- delivering...](http://www.writemoretests.com/2011/09/agile-scrum-delivering- broken-software.html)</comment>


Plundered by Harpies: An Early History of High-Speed Trading [pdf] - <AUTHOR> http://www.moaf.org/publications-collections/financial-history-magazine/111/_res/id=sa_File1/Plundered_by_Harpies.pdf

<comment><USER2> Loved the history. Don't imagine that traders will ever stop trying to get an advantage. I find it fascinating that even the postmaster thought an informational edge was unfair. Important to remember that those with a speed edge, even today, end up quickly converging the markets, and eliminating their own opportunity away.

Also there is a clear distinction between a speed edge and outright illegal acts. Cutting telegraph wires reminds me of modern day equivalents... ie. Enron calling generation plant operators to shut down.

</comment><comment><USER3> > _Receiving information first was so valuable that some speculators, at times > in cahoots with telegraph operators, were willing to cut the telegraph wire > after the news had been received!_

How nice to learn that scorching the earth, and destroying [anything of] value to create wealth has such a well-established pedigree and history.

One interesting idea from the the "Flash Boys" discussion comes to mind. What would happen if trade executions happened _ONLY_ in timed batches? When the exchange first opens for the day, pull a random number from RNG that provides values from a power distribution. The number will be the delay until the next execution time. Queue executions, and at the given time process them with the standard best-price execution algorithm. (Yes, some of the queued executions would be voided because the stocks on offer had been matched already at a lower price.) Then pull the next random execution delay. Rinse and repeat until stock exchange closes for the day.

I'd love to see how that would affect the HFT front-runners.

(Disclosure: I work for a betting exchange. I have a decent understanding how trading exchanges operate under the hood.)

<comment><AUTHOR> One nice thing about the U.S. equities market is that there's nothing stopping you from creating your own ATS that matches that way as long as it doesn't trade through better prices available at the exchanges.</comment></comment>


A Wrinkle in Clojure - <AUTHOR> https://www.johndcook.com/blog/2020/04/11/a-wrinkle-in-clojure/ <comment><USER2> Except (filter odd? [1 2 3 4 5]) does not return a list. It returns a lazy sequence.</comment>


Ask HN: Getting to 6 figures as a PHP dev - <AUTHOR> I've been making websites and apps in PHP for around 7 years now, always as a freelancer. Due to personal ineptitude, only recently did I transition from a poor hourly rate to a more respectable daily rate, which has made a big difference in the stability, and size, of my income. However I still feel like I'm treading water, and I read about other devs routinely commanding 6 figures p.a. I'm based in Berlin, but work remotely usually for British companies. How can I move from around 50k per annum to double that? Is that even a reasonable ambition? <comment><USER2> Being in similar position I'd say if you want to earn London rates you'll have to move to London. There is a reason why companies in London hire people from Europe and that's because they won't be paid London wages... Having said that you will see much less money staying in your pocket once you move to London, it's horribly expensive city. And if you have family it becomes even more expensive..

People do earn a lot when they find a niche - in example trading software. There is lots of money in trading (i.e. Forex) and trading software which is low latency type of software. If you go mainstream you will earn what mainstream earns, think outside of the box.

From another perspective in the very moment you start specialising you might find yourself out of work when your niche disappears. So it's always a chase for holy grail and there is none - take risk, invest your time, be different and you'll get paid more :-)

</comment><comment><USER3> Might be hard to get that as a remote contractor. £450pd is not unreasonable for a contactor working on site in London - though anecdotally PHP doesn't command such a high rate as say perl or java.

When people use remote contactors they are doing it to get a cheap rate

</comment><comment><USER4> Double your rates.

Spend your time on looking for clients.

Market yourself as a problem solver, not as a PHP dev. Companies have problems, you are there to make them go away.

I make up to $150/hr doing PHP, JS. Rates around $90-100/hr are common.</comment>


Apple's CVDisplayLink Doesn't Link to Your Display - <AUTHOR> http://thume.ca/2017/12/09/cvdisplaylink-doesnt-link-to-your-display/ <comment><USER2> If you use OpenGL or Metal with triple buffering (the blog post mentions MTLView which is a Metal view) I believe this doesn't matter. You'll only be using the CVDisplayLink timer events to generate frames spaced at a even interval - which is equal to the display vsync interval, depending how you configure CVDisplayLink. Then, the actual presentation of those frames _will_ happen in sync with the actual display vsync.

See Metal Triple Buffering ([https://developer.apple.com/library/content/documentation/3D...](https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/MTLBestPracticesGuide/TripleBuffering.html#//apple_ref/doc/uid/TP40016642-CH5-SW1)) and MTLCommandBuffer presentDrawable.

For OpenGL there are similar mechanisms, eg. NSOpenGLCPSwapInterval.

<comment><USER3> If you're aiming for the lowest latency possible, you will still want to have access to the actual display refresh timing information. But these days with variable refresh rate monitors growing in popularity, this gets pretty complicated.

<comment><USER4> Does Apple even support any of the variable refresh rate standards?

<comment><USER5> Not sure about Apple, but on a hackintosh you can install Nvidia Geforce drivers that allow you to turn on GSync.

<comment><USER6> Which is kinda buggy last I checked, crashing if more than one display was attached.

</comment></comment></comment></comment></comment><comment><USER7> tfw you do a bunch of research you're proud of and write an article that reaches the HN front page, and then someone chimes in on Twitter that actually the research is flawed and only applies to multiple displays, and you have to update the post about how wrong you were. :/

I'm just sad about all the people that already read it and won't see the update so will go away with incorrect knowledge.

<comment><USER8> Interesting. So if I'm reading this properly, CVDisplayLink _is_ still a timer --it's just that it tries to synchronize itself to the "vblTime" if there's only one of those to synchronize to.

If I'm not mistaken, then, it would seem you can do the same thing yourself by just blocking on CGLFlushDrawable() and setting up a timer on the refresh rate as soon as it returns. (I guess that's similar to what mstange suggested in the comments.) At least CVDisplayLink tweaks timer parameters in order to get the timer to fire more reliably.

</comment></comment><comment><USER9> The documentation ([https://developer.apple.com/library/content/documentation/Gr...](https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/CoreVideo/CVProg_Concepts/CVProg_Concepts.html)) doesn't mention vertical refresh interrupts.

It also says _"In the past, synchronizing your video frames with the display's refresh rate was often a problem, especially if you also had audio. You could only make simple guesses for when to output a frame […] which didn't take into account possible latency from user interactions, CPU loading, window compositing and so on. The Core Video display link can make intelligent estimates for when a frame needs to be output, based on display type and latencies. […] If for some reason the processing takes longer than expected (that is, the display link's estimate is off), the video graphics card can still drop frames or otherwise compensate for the timing error as necessary."_.

So, disassembling the code wasn't strictly necessary.

Combining this with this article, it seems they try to call your program as late as possible, possibly to decrease latency between the time you have influence on what is displayed and the time it is displayed. Could that _especially if you also had audio_ be the reason they do that, as it might make it easier to keep audio in sync with video?

<comment><USER10> > it seems they try to call your program as late as possible

Right. The point of the API is to trigger rendering as late as possible before the next frame swap, not immmediarely after the last frame swap, as the author expected.

To do so, it _has to estimate_ how long your app's callback will take to render a frame. (E.g. if it expects your callback to render a frame in 10ms it might call it 11ms before the next frame swap.)

It seems the heuristic it uses to estimate the duration of the callback execution is assuming a fairly constant duration. The documentation seemed to suggest that. But as the author has inconsistent rendering duration.

So, e.g., if it estimates 10ms and therefore calls back 11ms before the frame swap but you end up taking 20ms, you're going to drop a frame. If it then adjusts and calls back 21ms before, but you render in 1ms, you could render two frames in the space of one displayed frame.

Anyway, just thinking through it aloud.

I think the author may not want to use this API for his purpose, though perhaps by adjusting his rendering so that it always takes the "max" rendering time might let its estimates be correct and then things would smooth out.

<comment><USER7> Author here, that would make sense, except it doesn't appear to be doing that. I also don't see anything in the docs suggesting that it would. My test app takes 1ms to render yet, and the callback returns within 100us, but it's consistently calling me 7ms before vsync.

I'm also not actually working on anything that uses this right now, I was just curious. I'm just warning about the dangers if you have inconsistent rendering time.

</comment></comment></comment><comment><USER11> There's quite a few approaches, it's hard to figure out which one is appropriate for this one. I think that enabling setNeedsDisplay and dispatching commands asynchronously might do the trick? With asynchronous dispatch I've actually been getting 120 FPS. But it's very much case by case basis and I might not be understanding the use case.

IIRC this project Gets to 120 when you drag your mouse [https://github.com/jtbandes/metalbrot- playground](https://github.com/jtbandes/metalbrot-playground)

<comment><USER7> I have a lot of avenues to test but unfortunately testing each one requires setting up a sample app with signposts and recording a bunch of runs in Instruments, so there's a bit of work to do if I want to figure out the right way.

And do you have a 120fps+ monitor? If not I'm not sure what you mean by 120fps unless it's broken or not vsynced at all and painting twice per frame. If you have a proper way of waiting on vsync 120fps is just a waste of power with no benefits and you don't want that.

<comment><USER11> Haha welcome to gpu programming. You should hit up Warren Moore on Twitter (@warrenm), he's a real life savior.

Re: 120fps, I questioned it myself but the difference is perceivable. Idk if something is broken or not I was confused too. Re power consumption, that's why you enable setneedsdisplay.

<comment><USER7> Maybe the reason that 120fps is perceivably better is that your draw calls don't line up with vsync, so doubling the number of frames eliminates the dropped frame effect in @jordwalke's diagram!

And thanks for the Twitter recommendation, I followed him.

</comment></comment></comment></comment><comment><USER12> Bring back VBL tasks.

[http://mirror.informatimago.com/next/developer.apple.com/doc...](http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/Processes/Processes-74.html)

<comment><USER13> I like the Linux DRM atomic interface, they recently added native fences so you can pass in a synchronization object from the GPU for when it's done rendering and the flip can proceed and you get back a fence that is signalled once the flip is done. Basically all asynchronous now but it's still synced to the hardware flip, no timer bullshit.

IIRC it's somewhat inspired by Android SurfaceFlinger.

<comment><USER14> Hmm. I wouldn't mind finding out how that actually works.

One question though. Is this driver-dependent in such a way that it only works on newer hardware? For example on the 10+-year old machine I'm using right now, could I play with this?

<comment><USER15> Should work with anything that uses the open source drm drivers as I understand it.

<comment><USER14> Interesting. Thanks.

</comment></comment></comment></comment></comment><comment><USER16> Wow, this is bad. If the author is reading this, is there any chance this is a regression in recent OSes? I remember a WWDC video from quite a few years ago showing exactly why it's important to use CVDisplayLink which is linked to when your display needs new frames, showing a similar illustration to the one shown above about how otherwise you lose frames.

<comment><USER17> It's not bad, it's by design: [https://news.ycombinator.com/item?id=15890910](https://news.ycombinator.com/item?id=15890910).

</comment></comment><comment><USER18> Interesting turnabout from classic MacOS, where the VSync interrupt was both synced and really important. It was the way you got lots of non-graphical processing done, too - lots of event timers & the like went in there.

</comment><comment><USER19> You can synchronize to actual vsync on Windows.

<comment><USER20> Very helpful, thank you.</comment></comment>


Ask HN: We have a Who's Hiring thread, why not a Who's Interning thread? - <AUTHOR> For example, Bob needs 1 year experience to get foot in the door and initial contacts and to get positive feedback. Jill wants to hire interns and could help Bob get that experience.<p>Could you see this as being a successful regular sub similar to Who's Hiring? <comment><USER2> "INTERN" is already a keyword in the whoishiring threads. Also, new ones like that aren't wanted: [https://news.ycombinator.com/item?id=15151412](https://news.ycombinator.com/item?id=15151412)

</comment><comment><USER3> Everybody has their own favorite monthly question. Yesterday somebody submitted "Who is selling/trading a side project?" [https://news.ycombinator.com/item?id=15215331](https://news.ycombinator.com/item?id=15215331)

I can point to an answer from a moderator last week on the "Who's mentoring?" thread idea: [https://news.ycombinator.com/item?id=15151627](https://news.ycombinator.com/item?id=15151627)</comment>


UPDuino: a $9.99 FPGA - <AUTHOR> https://tinyletter.com/jamesbowman/letters/upduino-a-9-99-fpga <comment><USER2> "On board quality - I paid a High School/College kid in Sri Lanka to do the board; I will give him your feedback." the most beautiful thing i'll read today.

<comment><USER3> At once very cool and potentially very sad to me. Sad to think that skilled engineers are being underpaid because they lost the geographic birthplace lottery.

<comment><USER4> I pay some overseas developers way below the median faang salary, and yet, their quality of life is likely much better than your average faang employee due to the much lower cost of living.

In other words, they aren't making six figures and yet still sharing a 2 bedroom apartment with 6 other developers.

<comment><USER5> This was my grand scheme all along - after having a comically high quality of life on 2k/month in Taipei as an English teacher, I moved back to the states to learn frontend. Now I'm building out my resume and network so I can eventually fuck off back to Taipei, work a couple contract roles, pull in a cool ~4kish a month, and live like a king while having far more time for my own projects.

It was inspired when me and my dirty, sweaty, budget beer-drinking buddies were hanging out at a 7/11 with a foreign engineer we had just met. He said he wanted to go to the club, we were like "dude cover is pretty expensive, let's just drink our 50 cent beers." He did a quick count of us, then said "ok, I'll pay for everyone's cover."

Rent was 250USD a month, 100mbps internet 20 USD... this on top of the fact that you're getting nearly equal healthcare because all the doctors are US school trained anyway, way better public transit (trains are automated! and CLEAN!!). I mean, it's the dream.

<comment><USER6> How do the doctors get US school trained yet can afford a lower income? Medical school is quite expensive in the US. Do they get funding from their government to learn abroad?

<comment><USER5> Sometimes, yea. There's tons of scholarships. Also exchange programs etc. But it's a family oriented culture so oftentimes it's just the family pooling resources. low cost of living doesn't necessarily mean low comparative income, engineers can pull up to 60k USD yearly there which is a huge sum compared to cost of living.

</comment></comment></comment></comment></comment></comment><comment><USER7> Can someone explain why someone would choose an FPGA over a standard microprocessor? What advantages could this UPDuino have over an Arduino? Also, how do ASIC's figure into this comparison?

My understanding is that microprocessors excel at executing logic using an onboard general-purpose ALU sequentially and quickly.

On the other hand, an FPGA excels at doing a specified task as the hardware (gates) are programmed/hooked up in a certain way to execute that one task.

ASIC's are processors that are designed from the factory to execute a specific task (kind of like pre-programmed, non-reprogrammable FPGA's).

Can someone please fill in the gaps please? I have a general idea, but I'm not sure I understand all the differences correctly.

<comment><USER8> You are correct enough here. The interesting question is not how they are different, but what the advantages are.

An FPGA is really good at doing a single task a ton of times. A microprocessor is good at doing a lot of tasks a ton of times. And an ASIC is just a more permanent and more efficient FPGA.

So when would I use an FPGA? Let me describe an example: Stream processing.

Let's say I have a stream of data. Like a camera producing a video feed. As each frame of data comes in, we want to compare it to the previous frame and take the average of the two values to create a blurring effect.

On a microprocessor we process each frame. We iterate over groups of pixels one at a time, compare it to the value at the pixel in the previous frame and divide by two. Our processing time is a function of the number of pixels we want to look at. If we're lucky we have multiple cores so we can do work in parallel. Maybe even do 32 groups of pixels in parallel on a ryzen or something. But if we have a 1 megapixel image, we're going to still have to visit ~30k pixels sequentially on each core and perform some math. We're probably adding at least a few ms of lag on the feed. And if we're trying to do any multitasking on this cpu, then we may not have very predictable performance.

On an FPGA we approach the problem very differently. Instead of having sequential logic for visiting each pixel, we have combinatorial logic. Supposed each pixel came through on a different wire. That wire goes into a component that holds the previous value for the pixel and outputs the average of the current and previous value. We then take that output and rebuild the video feed with it. On a 1 megapixel image, our unit of work is a single pixel and we have concurrency of 1 million units. We add a cycle or two of lag, which is negligible. Additionally, we have very predictable performance because our computation executes in lock step with the system clock.

FPGA's are expensive (per unit cost) and aren't always the most efficient. An ASIC will drop per unit cost and power requirements significantly but has a large up front capital investment.

<comment><USER9> >That wire goes into a component that holds the previous value for the pixel

Wouldn't that need at least 24M flip-flops in the FPGA (assuming 8 bits per channel color)? I don't think anybody makes one that big.

<comment><USER10> what was written is clearly a simplification, but outlines the high level architecture differences. Say you want to do this with a 10 megapixel image, clearly you are not going to fully parallelize that, but you could load the whole thing into BRAM divide it up into 100 regions and itterate over that. This also ignores that most FPGAs are not just a pile of flip-flops you wire together, but instead have a whole pile of specialized blocks in addition to look-up-tables.

</comment></comment></comment></comment><comment><USER11> All these new affordable FPGA are getting really tempting to learn more about them. I've been debating for a while to get the TinyFPGA BX board from Sparkfun. Though I don't have a specific application yet. Are FPGA used in robotics often? Or is the response time so low (relatively) that it makes more sense to stick with a uC?

Side note, this might seem like stupid question, but can anyone explain what APIO[1] is (which TinyFPGA uses)? I'm kind of confused what it's used for.

[1] [https://github.com/FPGAwars/apio](https://github.com/FPGAwars/apio)

<comment><USER12> You aren't going to be able to build a super-fast CPU on an FPGA but there are plenty of other tasks you could give it. You can build a processor for analyze multiple sensors, looking for specific events that you could then feed to the uC or setup a DSP pipeline to filter the sensor data to look for patterns. The nice thing about an FPGA is that there is no interruption when it's running. The uC might be trying to feed data over wifi to the controller station and polling sensors/analyzing sensor data is going to bog things down really quick. Another task for an FPGA would be to act as a switch for a network within the robot. It would sit between all of the sensors/actuators and an ethernet-enabled uC located elsewhere in the robot. The FPGA would read command packets from the uC and translate tasks like "read temperature sensor #5" or "turn 15 degrees" into specific impulses on the pins while also turning sensor and feedback data into packets to send back to the uC. You could even run video feeds from cameras back to the uC over gigabit if the FPGA supports it. This way you can run a cheap, small uC to control things from a higher level while the i/o-plentiful FPGA does all the heavy lifting at 100Mb/s speeds.

<comment><USER11> Something like this sounds super interesting. Is it hard to get the FPGA to talk the uC? I own the DSP book by Proakis/Manolakis, but I picked it up only twice...so my understanding of DSP is pretty abysmal.

<comment><USER12> There are SPI, I2C, ethernet, and UART blocks that you can usually just drop right into your design for communicating with external chips.

</comment></comment></comment></comment><comment><USER13> I wanted to get into FPGA programming recently after feeling confident mastering my microcontroller skills and discovered that complex programmable logic devices (CPDLs) can be a stepping stone to full on FPGA prototyping. They somewhat of a similar high-level functional design and there are some nice guides online to get started on some projects.

</comment><comment><USER14> There's a v2[0] of the same board that includes a USB<->SPI to make it even easier to program.

[0]: [http://gnarlygrey.atspace.cc/development- platform.html#updui...](http://gnarlygrey.atspace.cc/development- platform.html#upduino)

<comment><USER15> Thank you for linking to at least one page on the company site. The [https://tinyletter.com/](https://tinyletter.com/) article links to it only very obscurely around an image. There are many normal links in the article, so I assume the failure to link clearly to the product under discussion was just an oversight.

</comment></comment><comment><USER16> Can this run a RISC-V core?

It would be very nice to bring the cost of experimentation in CPU cores down to something easily accessible to even students. In the same way that RPI brought computing and hardware interfacing down to basically anyone who can afford a cup of coffee.

<comment><USER17> [https://github.com/cliffordwolf/picorv32](https://github.com/cliffordwolf/picorv32)

<comment><USER18> Also written by the same guy who did a large chunk of the open source synthesis toolchain for the FPGA mentioned above.

</comment></comment></comment><comment><USER19> A critical advantage of these new FPGA boards is not only are they at the same price point like Arduino clones and many other common maker components, but they are also small enough to be useful as permanent component in a project.

With earlier FPGA Learning boards, the designers tried to cram a ton of stuff into them, usually a gazillion pins, leds, input devices and connectors. You can't easily put that on a Raspberry Pi or Arduino.

</comment><comment><USER20> Almost the same FPGA (Lattice Semiconductor FPGA ICE5LP4K) has been found in the iPhone 7: [https://web.archive.org/web/20160916230725/http://www.chipwo...](https://web.archive.org/web/20160916230725/http://www.chipworks.com/about- chipworks/overview/blog/apple-iphone-7-teardown)

</comment><comment><USER21> Is this powerful enough to run a NES? As in, can it run a 2mhz 6502 chip with some extra space for the sound chip, etc?

<comment><USER22> The FPGA seems to be a ICE40UP5K which has 5280 logic elements each configurable to any Boolean function of up to four inputs plus a flip-flop to store the result. Wikipedia gives two numbers for the transistor count of the 6502 namely 3,510 and 4,237 but both are smaller than the number of logic elements so fitting a 6502 should be easily possible. The FPGA has an integrated 48 MHz clock so a 2 MHz designs also seems quite achievable. I can not tell whether the remaining logic elements, the memory, and the I/O blocks are sufficient to build everything else because I know essentially nothing about the NES. It seems at least not wildly implausible to me but memory might become an issue because there is only about one megabit on the FPGA.

<comment><USER23> Remember that you also to implement need memory (the UP5K actually does have quite a bit of SPRAM, though), a memory controller, a ROM, the NES PPU (which was mixed signal) and that comparing transistors to LUT/DFFs is not really a fair comparison (as transistor based logic is not immediately always convertible to RTL logic, and that high-density FPGA designs are much more tougher to route while meeting timing).

Finally, the UP5K is actually fairly slow (when it comes to routing timing) compared to the iCE40 HX/LP, and especially compared to other, more modern FPGAs. The iCE40 routing in general also tends to be underwhelming at high density designs.

</comment></comment></comment><comment><USER24> How does one go about developing on an FPGA (i'm an absolute noob familiar only with Arduinos and ESPs)

Are there any go-to IDEs that everyone uses? Resources/tutorials towards a `blinkenlights 101` project that are especially useful?

Edit: thank you all for the very excellent answers! I'm going to lose so much productivity over this!

<comment><USER25> The equivalent tooling for FPGA programming is starting with a high level hardware description (typically Verilog or VHDL) then

\- synthesis -- this converts the text description from HDL into gates (fun fact you can write valid HDL which cannot be synthesized into hardware)

\- place & route -- this takes what is essentially a schematic from the first step and assigns it to resources within the FPGA. This is also where you specify which pins on the FPGA you want to be connected to the schematic outputs.

\- timing closure and simulation -- This is the process where the FPGA place and route core is trying to either make your design fit in as few gates as possible or run as fast as possible (these choices often conflict so you have to prioritize one over the other)

\- bitstream generation -- This is where an often encrypted stream of bits are generated such that if they are fed into the FPGA they will set all the internal switches etc to realize the design you've put together.

\- programming/flashing -- most systems use JTAG to do this.

When I started doing FPGA designs the hardest part for me was to break the notion of "software" when I was writing VHDL. You have to keep your head in the 'one clock' every variable gets to change exactly once in this block.

<comment><USER26> Good write up. However, I think saying synthesis turns hdl into gates is tangling with our digital design lingo.

Netlist is better, but to someone outside of digital design but with software background, I think I would call it a textual listing of the gates of the design and their interconnection. A graph.

<comment><USER25> I agree, and I struggled with calling out EDIF or just netlists. My choice was that the OP was "absolute noob just figured out Arduino" level and so netlists which are pretty obvious to anyone who has done schematic design are kind of a foreign concept to software only folks. But everyone seems to "get" that an FPGA dynamically wires together "gates" (even if they may be called LUTs, CLUTs, CLBs, or ALAs internally).

One of the ways I've helped SW types understand FPGAs was to describe the basic CLB as a subroutine that you program by setting very specific parameters and it has an input of some number of bits and a "clock" bit, and outputs the same number of bits. And the "program" is similar to the calling sequence of all these subroutines tied together.

Then I start rattling off VHDL books to read :-)

<comment><USER26> Yeah, I didn't really do any better. It just felt wrong to say gates at synthesis when it's still a file on a computer instead of something physical like a transistor.

Although now that I said that, I guess with fpgas that is sort of always true. Programming fpgas is the equivalent of sending a file via FTP. Nowadays at least.

</comment></comment></comment></comment></comment><comment><USER27> Word of warning: my UPDuino v2 (these have a USB connector so you don't need a separate programmer) worked, but it heats up a lot immediately. I suspect a short circuit somewhere due to bad soldering. Requests to have it replaced were never answered.

<comment><USER28> At $10 shipped I'd just get a new one. I don't think there's any reasonable expectation of support here.

<comment><USER29> Most companies will replace a faulty device with a new one or fix it if it's broken due to manufacturing issues. Maybe the price should be increased a bit to allow for further testing.

If you have an issue the solution shouldn't be to throw it away and buy a new one, that's incredibly wasteful and it encourages bad behavior by the manufacturer.

</comment></comment></comment><comment><USER30> Im interested in low cost FPGAs, like around the $5 range. My goal is to make a closed loop stepper microcontroller.

Ive never did FPGA design. what's good resources to start reading to get caught up with the basics? Figure I should ask those more in the know.. :)

<comment><USER31> if practicality is a concern at all, then you can get stm32's for about that which will have significantly more power than you'll be able to cram into a $5 FPGA, and the development environment will actually be pleasant.

(or just buy them, there's at least one on crowd supply, another was on kickstarter in the last couple years, etc)

</comment></comment><comment><USER19> My complaint about this new breed of maker-level FPGA boards is that the information on shipping is a bit sketchy. I believe most ship from the US (I think one didn't even tell where from) and that often leads to hazzles with customs etc. which I would prefer to know beforehand...

</comment><comment><USER32> This is pretty great. I have been wanting to get into FPGA programming so it's nice to know how low the "basement" price is for the essential equipment.

Can anyone else recommend any other cheap entry level boards?

<comment><USER33> Pretty much anything from Digilent. I've got an old Spartan6 board that has a boatload of horsepower. If you want to get fancy, look at the Zedboard family -- FPGA wrapped around ARM cores.

<comment><USER34> I also recommend Digilent, but they are not bargain basement. They're education targeted, often focused on the lab, rather than non-hobbyist R&D boards, but not $10.

</comment></comment></comment><comment><USER35> this thread might be dead now but can someone please explain why an FPGA is such a big deal, I always see them mentioned but just don't have an idea of what they can be made into? Can anyone give project ideas of why it would be better to use on FPGA? (not sarcasm, I'm genuinely curious)</comment>