Ask HN: Do you agree with white board coding interviews? - <AUTHOR> Posting with an anon account so i don't get identified by potential interviewers.
I have been happily employed for many years and just recently started looking for new opportunities. I was a bit shocked at the white board interview methods being followed at major companies (FB, Goog etc). Whiteboard interviews were initially devised on the idea that it helps us understand the thought process of candidates, while things like syntax and getting the code to be perfect were less important. Looks like nobody even pretends anymore. It is all about getting the code to be in compilable and bug free state.
So my question to HN is this: Do you agree with these kind of interview practices at your current company? If so, why? I am genuinely interested to see if there is any evidence that correlates ability to do this with actual job performance. If not, why do you continue to participate in it as an interviewer in your current company? <comment><USER2> There's been a backslash against whiteboard interviews, at least on HN. Not sure if you remember this popular thread from 9 months ago [https://news.ycombinator.com/item?id=13874026](https://news.ycombinator.com/item?id=13874026)

</comment><comment><USER3> Yes. Personally, I have poor enough eyesight that I have difficulty sharing a monitor with someone. On the other hand, I've been a consultant for ages; I haven't worked a 9-to-5 job in rather a while. Whiteboards don't come up much in that context.</comment>


Year 2038 Problem - <AUTHOR> https://en.wikipedia.org/wiki/Year_2038_problem <comment><USER2> I saw somebody mention recently how we're closer to the Y2038 problem than we are to the Y2K problem, and that made me feel old.

<comment><AUTHOR> Haha, I hadn't thought of that. Yes, we are :)</comment></comment>


The Libertarian Case for a Basic Income - <AUTHOR> https://www.libertarianism.org/columns/libertarian-case-basic-income <comment><USER2> >Furthermore, the Swiss proposal seems to involve implementing a basic income in addition to their currently existing welfare system. Few libertarians would be willing to sign up for that deal. But as a replacement for traditional welfare programs, there is a lot for libertarians to like about a basic income.

Is there any conceivable political world in which UBI is set up as a replacement for the current costly welfare system, and _stays that way for more than two weeks_?

Imagine the headlines:

\- This poor single mother spent her UBI on lottery tickets, now her four kids are starving!

\- He got hit by a car. Now this man has to choose between hospital bills and food!

\- You won't believe which filthy-rich billionaire is pocketing his UBI check instead of donating it to charity!

It's hard to envision an outcome in which the public isn't immediately clamoring for adjustments, deductions, and exceptions to try to tweak the UBI system to be more fair.

I'm sympathetic to the concept of UBI, especially the method of reducing waste as described in the article. But I can't help but feel that these "UBI will replace the welfare system" articles are inherently dishonest by promising an unstable house-of-cards outcome to a political bloc just to get their support for something that they wouldn't support otherwise.

<comment><USER3> If a single mother is spending all her money on lottery tickets, the amount of money she has is not the problem. As for billionaires, the policies should be made up on the tax side, not the distribution side. We already have a system for auditing and enforcing tax laws, and that lets us keep the distribution part very simple, and cheap.

I don't really know how the current system treats people with high hospital bills, but I think guaranteeing an income from which they could pay a consistent amount every month for the foreseeable future would probably let them come to some arrangement with the hospital.

</comment></comment><comment><USER4> I get the sense that these self-styled "bleeding heart libertarians" can just drop the "libertarian" piece and it'd be a bit more honest. these are not libertarian arguments (they basically amount to "well it's not as bad as the current welfare system") and basic income goes against fundamental libertarian principles.

<comment><USER5> You can steer society more towards your philosophy by compromising. Or you can stamp your feet and try the all or nothing approach.

Without a supermajority control of the legislative branch, the latter is pretty much useless.

<comment><USER6> The problem is that compromise essentially happens based around what's profitable for entrenched interests. So _every_ political movement is rooted in the inherent desire of people to be left alone, but mostly succeeds at applying its philosophy where it can enable enslavement.

</comment></comment></comment><comment><USER7> 15% of the population having an IQ below 85 should be reason enough.

</comment><comment><USER3> I don't think the last objection was stated very well. If fewer people are in desperate poverty, that will create more economic growth, not less.

</comment><comment><USER8> Basic Income is literally taking money from people by force of law (and therefore, threat of violence) and giving it to other people, against the first person's will. It is communism and completely antithetical to any reasonable definition of libertarianism. An argument that it's less bad than other forms of government-sponsored theft isn't exactly a solid libertarian argument.

<comment><USER6> And yet continual rent for a place to sleep (whether paid to banks and cities, or abstracted to private landlords) is also literally taking money from people by force of law.

I'm personally against BI in that pouring more gasoline on the inflationary fire is not going to put it out, but deflationary economics have never been popular - trying to get people to stop partying while they're having a good time is impossible, but so is bringing up the topic when they're hungover!

So long as the overriding monetary environment remains a biased towards centralized extraction, there most certainly is a libertarian argument in that those who wish to distance themselves from that technology should be able to, rather than being forced to cope within it.

<comment><USER9> > And yet continual rent for a place to sleep (whether paid to banks and > cities, or abstracted to private landlords) is also literally taking money > from people by force of law.

I concur. And we, IMO, ought to have a CIVIL way of determining land rights lest we go back to tribalism and might makes right determinations (individual violence).

>So long as the overriding monetary environment remains a biased towards centralized extraction

And how do we pay for the resources needed to civilly determine and enforce the outcomes of claims to land? Whatever government oversees the process, local, county, state, or federal will need a way to extract something of value from those governed which is why we have fiat currency and why taxes must be paid in the form of currency controlled and dictated by said governments.

>I'm personally against BI in that pouring more gasoline on the inflationary fire is not going to put it out, but deflationary economics have never been popular

I agree with you. Rather than collect taxes to force value extraction the government could just inflate the money supply by paying those that operate it with newly created dollars. No taxation needed. I think this is a worse solution as it's easy for loose money policies to snowball. People at least feel the pinch and pain of taxes to help restrain and reign in the cost(s) of government.

>there most certainly is a libertarian argument in that those who wish to distance themselves from that technology should be able to, rather than being forced to cope within it.

I believe people should be allowed to conduct business using whatever currency they wish except for paying taxes. They'll need to obtain or convert their currency into the fiat currency of choice.

I heard there's a Libertarian paradise East of Ethiopia and Kenya for those purists that can't accept compromise.

<comment><USER6> I don't see how purporting to agree while then stating the direct opposite _or_ talking past someone with a bunch of strawman would ever be productive.

<comment><USER9> See POTUS.

<comment><USER6> I meant for productive _conversation_.

Sure, a person can employ a combative communication style to get ahead in the monkeysphere. But still, the road to being a shithead president doesn't start off with being a shithead forum commenter.

<comment><USER9> Fair enough.

I failed to understand your stance from your reply to cgore. I took your response to be "agreeing while pulling back a bit on cgore's position.

I am interested in your thoughts on how to address "taking money from people by force of law (gunpoint)" You pointed out the parallel between cgore's point the BI is no different than rent on land.

It appears you're against inflationary policies and pouring gas (BI) onto the situation adds to it (unless money is taken out of supply via taxes, however the symptom of inflation is still likely to appear: an overall increase in prices.). Inflation of prices is a symptom of inflation of the money supply. But an overall increase in prices does not necessarily mean there is inflation (of the money supply).

I am also interested in your thoughts on how should we pay for the civilized framework (government) that sorts out disputes?

<comment><USER6> It's disagreement, but based on _emphasis_ not axioms.

Singularly focusing on the tax aspect while ignoring the rest of the government-created conditions produces a biased conclusion. Basic Income seems to have gained appeal because of people's need to meet rent. But said rent is itself almost entirely due to government created conditions - the natural cost of building and keeping up dwellings is a small part of their budget.

Similarly while I do agree that taxes are inherently theft, applying this condemnation to any specific topic will just gain legs or not based on who stands to benefit. Condemning any new proposed program based on spending (rather than considering it in the context of rearrangement) is fallacious, and more befitting conservatism rather than libertarianism. I would be in favor of generally disbanding USG. But I'll be damned if such a push is going to result in cuts to eg NPS, NSF, NIH, EPA, NASA, and even USPS, while leaving eg NSA, FBI, ATF, DEA, and Raytheon intact.

FWIW, This is my specific critique of BI: [https://news.ycombinator.com/item?id=12782244](https://news.ycombinator.com/item?id=12782244)

Regarding taxes and jurisdiction, there really is little point in going back and forth between wildly differing perspectives, and I've stopped asserting that I have _the_ answer. I will say that I've come to view libertarianism heuristically (as opposed to axiomatically), and things like the federal government collecting lots of money just to dole it back out to the states with strings attached can still be pointed at as decidedly broken.</comment></comment></comment></comment></comment></comment></comment></comment>


How many floating-point numbers are in the interval [0,1]? - <AUTHOR> http://lemire.me/blog/2017/02/28/how-many-floating-point-numbers-are-in-the-interval-01/ <comment><USER3> The correct answer is 1,065,353,216.

This is easy to work out yourself if you remember one basic, handy property of floats: adjacent floats are adjacent in bit representation, except -0.0f and 0.0f.

For example, 0x00000000 is +0.0f. 0x00000001 is the smallest non-zero positive float. 0x00000002 is the second smallest.

The only exception to this is -0.0f and +0.0f, which are 0x80000000 and 0x00000000. The rule works with denormal floats, normal floats, and even right on the line between the two. If you want the next positive float, you always just add 0x00000001.

Now, +1.0f happens to be 0x3f800000. Recall +0.0f is 0x00000000. The number of values between the two is 0x3f800000 - 0x00000000 == 0x3f800000. Write that in decimal and you get 1065353216.

<comment><USER4> The correct answer is 1,065,353,217. You have an off-by-one error in the following line of argument:

 _> The number of values between the two is 0x3f800000 - 0x00000000 == 0x3f800000_

This should be corrected to:

 _> The number of values between the two is 0x3f800000 - 0x00000000 == 0x3f800001_

In general, the number of numbers in the closed integral interval [a, b] is not b-a, but 1+b-a. For example, the closed interval [0,10] contains 11 integers, not 10.

(The above assumes that the original question assumes the floating point number -0 to be outside of [0,1]. Otherwise, you'll have to add 1 more.)

<comment><USER5> I was under the impression (after several thousand attempts) that the correct answer is infinity, limited only by your addressable memory and bitspace.

<comment><USER6> I think people are assuming IEEE 754 floating point (as per the article). Your memory is finite, 32 bits. [https://en.wikipedia.org/wiki/Floating_point](https://en.wikipedia.org/wiki/Floating_point)

</comment></comment></comment></comment><comment><USER7> Honestly, I think IEEE 754 floating point numbers are a pretty bad way of dealing with real numbers and just cause tons of headaches that every math library has to deal with. Even high level programmers aren't shielded from the NaN nonsense. It would be great if we had an underlying implementation we could ignore and that allowed us to think at a more mathematical level.

I actually found something recently on this topic while googling for any alternatives, its called Unum and looks very interesting: [https://en.wikipedia.org/wiki/Unum_(number_format)](https://en.wikipedia.org/wiki/Unum_\(number_format\))

Does anyone know more about this? Are there any chips out there that support it?

<comment><USER8> If NaN is nonsense, what would you have 1/0 or acos(2) to produce? (An exception is the same NaN, only less convenientlying packaged.)

<comment><USER9> > An exception is the same NaN, only less convenientlying packaged.

I prefer an exception because I'd rather have my code fail fast, and immediately point me close to the source of the bug, rather than letting a NaN or Infinity propagate through my code base and cause some harder-to-debug problems down the line.

That's the main thing I don't like about JavaScript. 1/0 is Infinity, Math.acos(2) is NaN, Object().foo is undefined, etc. I find myself wasting a lot of debugging time just figuring out where those (usually expected) values came from originally.

<comment><USER10> Exceptions are utterly painful for vectorized operations. Goodbye Tensorflow if you say goodbye to NaNs

<comment><USER11> That's an excellent explanation for why scientific computing has been using vectors for a long time and has traditionally faulted when hitting the first NaN. Is there something about Tensorflow that makes propagating NaNs useful? And if so, why are you generalizing from Tensorflow to all "vectorized operations"?

<comment><USER12> my guess is that this is a performance argument. If you don't have to check the results, your circuits to do huge vector calculations can be simpler.

</comment></comment></comment></comment></comment></comment><comment><USER13> He references one of my favorite functions, 'nextafter'. [http://en.cppreference.com/w/cpp/numeric/math/nextafter](http://en.cppreference.com/w/cpp/numeric/math/nextafter)

I'm the kind of person who understands floats by looking at the underlying bit patterns, and nextafter makes it easy to traverse the integers.

<comment><USER14> > He references one of my favorite functions, 'nextafter'. > [http://en.cppreference.com/w/cpp/numeric/math/nextafter](http://en.cppreference.com/w/cpp/numeric/math/nextafter)

It is a cool function. I remember using it for some testing I did while checking the accuracy of various implementations of basic math functions.

</comment></comment><comment><USER15> > Of all the float-pointing point numbers your computer can represent, a > quarter of them lie in [0,1].

Many people think floating point numbers are magically precise. They're not. They're far more accurate at lower magnitudes and precision fades as you work with larger values.

<comment><USER16> Correct me if I'm wrong, but my understanding is that a consequence of this is that it's better to store, for example, angles as radians from -pi to pi rather than as degrees between 0.0 and 360.0, in order to take advantage of all that precision between 0 and 1.

<comment><USER17> I don't see why that would help. Of course there is more precision in terms of decimal places around 1 than around 360. But if you use 360 each 1 represents a much smaller piece of the circle.

To put it another way...it's about significant digits. A float has about 7 and a double about 15. It does not matter whether you use 0 to 360 or 0 to 3.6 million...the number of digits that are meaningful remain the same.

<comment><USER18> For binning data in spreadsheets for histograms etc, I typically use text() to set significant digits, and then value(). It's also good sometimes to make sure that 0 is really 0.

</comment></comment></comment></comment><comment><USER19> Ummm... maybe I am mistaken, but as the fp numbers are not uniform in [0,1] chances are I don't want to pick one at random. Rather I want to pick a fp representation of a random real between 0 and 1. In that case the readers suggested strategy seems fine.

Am I wrong?

<comment><USER20> The author says in a comment

> If hitting exactly zero is much less probable than hitting exactly 0.5, then > I would argue that you do not have a uniform distribution…

But due to the non-uniformity of floating point numbers, I think the author is wrong here.

We can think of each floating point number as an interval. The probability that it is picked should ideally be equal to the size of the interval.

<comment><USER21> Yes. The effect of having a coarser partition around a mesh point is countered by the effect of a higher frequency of hitting that partition. This actually is the essence of importance sampling. For the purposes of numerical integration, as long as the integrand is relatively smooth with respect to the partition size, there shouldn't raise any serious problem. On the contrary, if the integrand does vary wildly between two adjacent floating point numbers, then the real issue here is that the precision (single, double, quadruple, etc.) used is not fine enough, rather than the deviation from uniform distribution.

</comment></comment></comment><comment><USER22> I had a similar question a while ago: how many decimal digits does it take to represent the smallest possible 80 bit float. The answer is ~16000:

      #include <stdio.h>

      int main(int argc, char **argv)
      {
            unsigned long long int mant, exp ;

            mant = 0;
            exp = 1;

            typedef struct _bitfield80 {
                    unsigned int sign:1;
                    signed int exp:15;
                    unsigned long long int mant:64;
            } bitfield80;

            union {
                    long double a;
                    bitfield80 b;
            } union80;

            union80.b.sign = 0;
            union80.b.mant = mant;
            union80.b.exp = exp;

            printf ("%0.17000Lf\n", union80.a);
            return 0;
      }

<comment><USER23> Depends what you mean by "represent".

The smallest positive "denormal" 80-bit float is (I think) 2^(2 − 2^(14)). I just represented it using 5 decimal digits and two minus signs. :-)

<comment><USER24> The Berry paradox takes this a bit further.

It may appear that "the least integer not nameable in fewer than nineteen syllables" is 111777. But "the least integer not nameable in fewer than nineteen syllables" is itself a name consisting of only eighteen syllables, and therefore the least integer not nameable in fewer than nineteen syllables can be named using only eighteen syllables (!).

There are alternative expressions, for example wikipedia mentions "the smallest positive integer not definable in fewer than twelve words" and "the smallest positive integer not definable in under sixty letters".

</comment></comment></comment><comment><USER25> for many applications, consider randomizing in [1,2) and then subtracting one. Although many of the fp values in [0,1) will be inaccessible, you are guaranteed uniformity, and also the lattice that you're drawing from will be fixed.

<comment><USER26> How do randomize in [1,2)? You might as well just generate numbers from [0, 2^53) or [0, 2^24) and divide.

If you didn't do that on the way to generating in [1,2), you're going to have fine-grained non-uniformity anyway.

<comment><USER27> >How do randomize in [1,2)?

0x3f800000 + 23 random bits

<comment><USER26> Well. That'll do it. Probably no slower than the integer to float conversion too. It gets you multiples of 2^-52 instead of 2^-53 though.

<comment><USER28> I see your talking 64 bit floats there which is my habit too. Having only 24 bit mantissa float32s seem insufficient for producing practically uniform variates - the missing 2^24th can be spotted averaging just a billion or so of them. I dont know if it has been improved recently but last year Chrome's Math.random was only putting 32 bits into its float64 - the missing four- billionth can be suggested from the average of a few hundred billion variates.

<comment><USER26> Yeah, I really think a better way is to imagine generating a uniform real and rounding -- generating [0,1) instead of [0,1] is just sick. If you do rand() * k + n you can get [n, n+k] anyway, so it's not a good primitive to get a half- open interval with. You can generate an integer n in [1, 2^25], then take (n >> 1) * (1 / (float)(1 << 24)) to get a pretty good [0,1].

<comment> mark-r For a 64-bit floating point number, the difference between [0,1) and [0,1] is for all practical purposes nonexistent. The chances of getting 1.0 exactly are so low that you can't build a test to know if it's excluded or not.

For a 32-bit floating point number it's more of a problem, but your application would have to be extremely demanding to detect the difference.

<comment><USER28> A rough calculation, a float64 rng which might reasonably supply billions of rnds an hour for simulations, would have a fair risk of hitting '1.0' every million hours of use, which means its important for production quality code to not run that risk.

A prng called Alea works with floating point arithmetic to generate rnds securely confined to [0,1] using a 'subtract with carry' scheme. It involves this kind of arrangement:

      state=state*something+carry
      carry=floor(state)
      return state-carry //this is 0<1

Its very similar to linear congruential generator where top bits are masked away, in this case they are 'floored' off and fed back into the state. Alea seems to generate high quality rands and works extremely quickly in javascript engines by avoiding integer math.

My rnd utility module uses a similar algorithm. There may be a note of caution whether floating point math is standardised enough to use for a seedable prng, but so far my machines and phone have agreed in tests.

[http://strainer.github.io/Fdrandom.js/](http://strainer.github.io/Fdrandom.js/)

<comment> mark-r My argument was for the other direction, using [0,1) when you actually want [0,1]. I agree that if 1.0 would cause a problem in your code you should use a rng that avoids it. All of the floating point random number generators I'm familiar with deliver [0,1).

<comment><USER28> Interesting, I assumed java and javascripts behaviour were common. I dont recall seeing this notation before either [0,1) maybe i will now %)

<comment> mark-r I usually use C++ or Python, so I had to look up the others.

From Java: "Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0."

From Javascript: "Return a random number between 0 (inclusive) and 1 (exclusive)"

So yes, all 4 are consistent in _not_ including 1.0 in the range of random real numbers. I'd call that common.

For more on the notation see [https://en.wikipedia.org/wiki/Interval_(mathematics)#Includi...](https://en.wikipedia.org/wiki/Interval_\(mathematics\)#Including_or_excluding_endpoints)

<comment><USER28> Apologies I wasn't following properly, and thanks for the interval math pointer.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER29> I don't like the divisions, though, and all the analysis that comes with it.

A way that is intuitively more robust would be to generate 23 or 52 random bits from an integer RNG for the mantissa (given you trust you integer RNG is unbiased). For example, take a random uint64_t, clear the sign bit, rewrite the exponent with a predefined value, and let the mantissa be untouched. That will give you a random floating point number in the range between 0.5-1.0, 1.0-2.0, or 2.0-4.0 etc, depending on the exponent you choose.

You can trust that the value is entirely random to the precision offered by the mantissa's size. Then you can control the accumulation of error by what you choose to do with the random number.

You still can't get to numbers that aren't representable by floating point, of course, but everything will start from the most random and unbiased value you can think of. You might have to introduce some error by subtracting the lower bound and multiplying appropriately to get to your desired range. Or, if you have the luxury to choose your desired range appropriately, you might be able to use the random value directly.

<comment><USER30> Hitting each representable floating point number with an equal probability does not generate an approximately uniform distribution of [0,1). For a sufficiently small positive number, eps, you have to have equal probabilities of numbers falling in [0,eps) and [0.5,0.5+eps) for a uniform distribution, and using random bits would fail this requirement.

</comment></comment><comment><USER31> Article says 1,056,964,609 / 1,056,964,610

Quick Java program says 1,065,353,216 / 1,065,353,217

Which one is right? Or are Java floats just "different"?

      static {
        float a = 0;
        long count = 0;
        while (a < 1) {
          count++;
          a = Math.nextAfter(a, 2);
        }
        System.out.println("count = " + count);
      }

<comment><USER32> nextAfter is probably also including the denormals (an additional 2^23 values near 0).

<comment><USER33> Yep:

      1,056,964,609 - 1,065,353,216 = 8388607 = 2^23 - <USER2>

because the denormal that is all-zero is already present.

</comment></comment></comment><comment><USER34> Slightly OT but regarding floats - I was wondering if we could get by just with an exponent and ditch the mantissa. Each number would be represented as an integer exponent of 2^-n for n corresponding to the precision.

</comment><comment><USER35> The more I read about the gnarly details of floating point specs and implementations, the more they look like a messy hack. I think it'd be nice to just use rational numbers in my programs.

</comment><comment><USER36> What about nan? The test '!(x < 0 || x > 1)' will say yes, while 'x >= 0 && x <= 1' will say no.

Or -0 for that matter.

<comment><USER37> Common sense approach: like the name says, NaN is not a number. The question was about floating point numbers, not floating point values. So I suppose we shouldn't count NaN. Further, -0 (an arbitrarily small number less than 0) doesn't logically fall in the range [0, 1], so it is excluded.

<comment> mark-r There's no need to exclude -0.0, since mathematically and by all tests available to the floating point unit it's equal to +0.0.

</comment></comment></comment><comment><USER38> I can't believe I'm the only person to ask "what bit depth?"

There is a pretty big assumption baked into the title.

Edit: hi, I see that I made a mistake, can someone correct my misunderstanding?

<comment><USER39> IEEE 754 floats are 32-bit. Doubles are 64-bit.

</comment></comment><comment><USER40> What is the practical application of this?

<comment><USER41> Currently working on monetization strategy.

Doing A/B tests with ads.

Looking for first round investors.

<comment><USER42> ): I will buy your IPO.

</comment></comment></comment><comment><USER43> Asking how many "are" in the interval implies that these numbers exist in some sense in that interval.

A clearer way to phrase the question might be: "How many floating-point numbers between 0 and 1 can be generated without duplicates?"

</comment><comment><USER44> (I invoke my pedant-pass.) As formulated in the title, "How many floating- point numbers are in the interval [0,1]?" you could argue that this is the cardinality of the Real Numbers. What the article says it is really talking about are single-precision IEEE 754 floating-point numbers. However, I could define any number of my own floating-point representations at various sizes. The cardinality of all possible floating point representations would be the same as that of the real numbers. This is true even for irrational numbers, as one could formulate floating point representations that specially represent those numbers.

(Also, this is arguably an exception to Betteridge's Law, and arguably not an exception to Betteridge's Law.)

<comment><USER23> What makes you think any arbitrary real number qualifies as a "floating point number"?

I have never seen the term used in anything like that context.

To me, the term "floating point number" is about number representation, not number identity. It is an inherently finite quantity in every instance I've ever seen.

Examples of floating point numbers: The sexagesimal cuneiform 42 25 35 written on the Babylonian tablet YBC 7289; 3.1415 × 10⁰; 1.010101010101₂ >> 2.

Not examples of floating point numbers (in my opinion): 1/√2; _π_ , 1/3.

<comment><USER45> The GP is claiming that all possible floating point systems, taken together, would contain the same number of values as there are points on the real line.

Consider a floating point system based on [https://en.wikipedia.org/wiki/Golden_ratio_base](https://en.wikipedia.org/wiki/Golden_ratio_base)

<comment><USER44> Thanks! To be just a bit more precise, I am claiming that all possible floating point systems, taken together, would contain the same number of values in [0,1] as there are points on the real line.

<comment><USER27> Nobody uses "floating point number" to mean "a number that could theoretically exist in a floating point system I will invent for you after you tell me the number". That's not being pedantic, that's insisting on a wrong definition.

<comment><USER44> _Nobody uses "floating point number" to mean "a number that could theoretically exist in a floating point system I will invent_

Put a full stop there -- Oh yes, people do mean that! Most of the time, people are referring to a bit representation in a specific system like IEEE's.

 _a floating point system I will invent for you after you tell me the number "_

The above part of the sentence isn't a definition of "floating point number." It's how I use the common notion of "floating point number" in my argument. Your objection only looks like it works because you conflate the two concepts. If you don't conflate the two concepts, then you are arguing that most low level programming that deals with 32 bit floats doesn't actually deal with "floating point numbers." That is a reasonable assertion for a reasonable set of definitions. However, it's not the one I'm using, which also fits the reality of the mental models most people are actually using.

In terms of program correctness, you can find many examples where using an abstract concept of "floating point" instead of the concrete representation will produce errors. So then why is it "the correct one" as you say?

<comment><USER27> I can't parse what you're saying. What two concepts are you accusing me of conflating?

There are many different floating point systems, but they all share certain attributes. None of them can exactly represent sqrt([insert large prime]). If you want to invent a bunch of such systems post-facto, you are abusing the term. The union of all systems that can reasonably be called "floating point" is not the set of real numbers. It's countable, as a very loose upper bound.</comment></comment></comment></comment></comment></comment></comment>


Show HN: MacUpdater v1.0 is released. Keep your apps up-to-date effortlessly - <AUTHOR> https://www.corecode.io/macupdater/ <comment><USER2> Hmm. Isn't this some pretty well-known malware?

See [https://blog.malwarebytes.com/cybercrime/2015/11/has- macupda...](https://blog.malwarebytes.com/cybercrime/2015/11/has-macupdate- fallen-to-the-adware-plague/)

<comment><AUTHOR> Hey! you are confusing the macupdate.com website which has been running for years with our MacUpdater

</comment></comment><comment><USER3> I have recommended _(open-source)_ Cakebrew [1] to non-technical people.

It offers a graphical user interface to interact with the Homebrew repository.

[1] [https://www.cakebrew.com](https://www.cakebrew.com)

</comment><comment><AUTHOR> we've had a look at "MacUpdate Desktop" and it barely works and requires a super-expensive subscription … and there is nothing else. we thought we could do better. 9 months later, MacUpdater 1.0 is born</comment>


U.S. Economy Contracted at Record Rate Last Quarter - <AUTHOR> https://www.wsj.com/articles/us-economy-gdp-report-second-quarter-coronavirus-11596061406 <comment><USER2> It didn't. It contracted by 9.5% in Q2, which, if repeated for four consecutive quarters, would become 32.9%.

Annualized figures _might_ make sense in ordinary times, but these are not ordinary times.

<comment><USER3> [this is terribly wrong: "It did contract by 32.9% in the second quarter (not in the four quarters ending in June 2020)"]

Edit: I assumed it was compared to the second quarter 2019, not sequentially to the first quarter 2020, I didn't stop to think that 33% was just too much. 9% is bad enough: from $21.34 trillion to $19.41 trillion (Q2 2019 to Q2 2020).

<comment><USER4> No. Goes to show how misleading the headline is (particularly the HN headline - was there no space for the important clarification "annual rate"?)

@Dang? add "annualised" or "annual rate"?

<comment><AUTHOR> The article headline changed since this was posted. I've updated it to reflect the new title.

</comment></comment></comment></comment><comment><USER5> So what I find interesting--even scary--is the disconnect between the economy and the stock market. Back in April near the bottom the advice I gave was that this was pretty serious and it's going to knock the economy off its feet so don't treat this like a short-term buying opportunity.

Here we are a few months later and the market has gone gangbusters. This is probably a consequence of zero-interest rates as there's really nowhere else for money to go. You have amateurs jumping into the market based largely on the market can only go up and you can't lose.

Once the market is disconnected from the economy like this it's just a question of when not if you have a reversion to mean and the market will typically get oversold when that happens. But how long will that take? I honestly have no idea. It could be months. Hell, it could even be years.

But a drop in GDP this large is shocking, probably even more shocking than people suspected. And before this I think a lot of people expected things would just get back to normal at some point. But a certain number of businesses and jobs are simply gone. That'll affect demand and probably take years to recover.

I've got a bad feeling about this.

</comment><comment><USER6> This is getting into scary territory given that the US also spent 3.5 trillion to prop up the economy.

Some more "fun facts":

\- this is the biggest drop on record for GDP: 32.9%.

That far surpasses the previous historical contraction of 10% in 1958.

\- 19th reporting period where initial jobless claims came in above 1,000,000 that is stunning

\- Personal consumption: -34.6%

\- Government spending: +2.7%

\- 2Q GDP Price Index Falls at A 1.8% Annual Rate

\- Domestic investment: -49%

\- 2Q Core PCE Price Index Falls at A 1.1% Annual Rate

\- 17 million people collecting money from teh government

\- 2Q Personal Consumption Falls at 34.6% Annual Rate

and the kicker

When you compare the last three years of Obama's Presidency vs. Trump's first three years, Trump's deficits will be almost $1 trillion greater at $2.47 trillion to $1.51 trillion for Obama. It doesn't look like Trump's tax cuts will pay for themselves.

The US under Trump will add about the same amount to the nation debt in 4 years as Obama did in 8 and Obama inherited the "great recession"

[https://www.whitehouse.gov/wp- content/uploads/2020/02/budget...](https://www.whitehouse.gov/wp- content/uploads/2020/02/budget_fy21.pdf)

For those of you who like to dive into the numbers

[https://www.bea.gov/sites/default/files/2020-07/tech2q20_adv...](https://www.bea.gov/sites/default/files/2020-07/tech2q20_adv.pdf)

From Bloomberg:

\- Some categories actually added to GDP: consumer spending on cars, recreational goods, housing and utilities (as people worked from home and ran air conditioners longer?), and financial services and insurance.

\- Other categories in positive territory: information processing equipment at companies (all other categories detracted from GDP), net exports, and government spending.

\- China has only bought about 23% of its promised purchases for the year from the phase 1 trade deal so we probably can't look to China to buy the US out of its depression

<comment><USER7> > When you compare the last three years of Obama's Presidency vs. Trump's > first three years

If you remove the pointless politicking, this is a very informative comment. Thanks for putting all that data together. It seems strange to lay out the completely unprecedented context, then proceed to ignore it in order to make a political claim though.

<comment><USER8> Facts aren't political. They're just reality.

If you feel that facts reflect poorly upon your political position, that sounds like something you should address.

And to be clear: the statements you're quoting _specifically exclude_ the pandemic, so I'm not sure what you feel is "the completely unprecedented context" here.

</comment></comment></comment><comment><USER9> Please add "Annualized Rate" to the title.

<comment><USER10> @dang Seems like an accurate and fair update

<comment><USER11> just mentioning his name doesn't do anything. The mod e-mail address is in the page footer if you want to reach him.

<comment><USER4> Thanks, didn't know that - they often respond so promptly that I actually thought the invocation of the name or "mods" triggered some sort of notification..

<comment><USER11> Yeah, I wouldn't know either if I didn't remember him saying that there isn't actually a running keyword search for it. It'd be interesting to know what percentage of all HN comments he reads...

</comment></comment></comment></comment></comment><comment><USER12> GDP is a flow statistic, though we often discuss it as a stock. (Cash in the bank is a stock statistic. Cash inflows is a flow. Amount of stuff versus delta.)

It's difficult to compare this quarter to those in 1918, given the dramatic differences in the composition of the economies and statistical methods. But a ~10% reduction in flows doesn't strike me as _that_ bad to the country's long- term potential.

The assets are mostly still there. And nobody is forgetting how to do their job in 3 to 6 months, though productivity in some sectors will take a hit from the changes.

</comment><comment><USER13> > Congress has approved trillions of dollars in stimulus to help U.S. > households and businesses get through the pandemic, and another package is > now being negotiated on Capitol Hill. One key component—an extra $600 in > weekly jobless benefits—is due to expire at the end of July, but lawmakers > are still discussing whether and how to extend the aid.

This is the part that isn't getting enough attention. That "stimulus" came in the form of treasury bonds. Those bonds need to be bought by... someone.

Foreign central banks stopped net buying US treasuries a few years ago. At the same time, gold holdings by central banks have climbed. The world outside the US is thumbing its nose at US federal debt as a reserve asset.

Without deep-pocket buyers, the interest rate on US debt will rise, and continue rising until a suitably-high interest rate can be found to justify the risk of loss.

So the Fed has stepped into the void and bought the treasuries in unprecedented quantities:

[https://fred.stlouisfed.org/series/WALCL](https://fred.stlouisfed.org/series/WALCL)

It turns out even this isn't enough to soak up all the debt being issued. Regulations have been relaxed so that banks can claim treasury holdings as reserves. The Fed has deputized banks as holders of US debt.

[https://www.federalreserve.gov/newsevents/pressreleases/bcre...](https://www.federalreserve.gov/newsevents/pressreleases/bcreg20200515a.htm)

This sets up a situation in which US treasury yields simply can't be allowed to spike because if that happened:

1\. banks would suffer capital losses

2\. the US government would become unable to sustain interest payments on new debt. That means forced cuts to entitlements and even the military.

Clearly, this would spell disaster. So it's not going to happen. The Fed will keep buying and buying and buying. If need be, regulations will be changed to allow the Fed to buy things it has never been able to buy before. Like US stocks.

The party can never, ever end. The balance sheet expansion will continue until some factor emerges that causes more pain as the balance sheet expands. I'm not sure what that factor could be, but it would come as a very big shock.

For clues regarding the limit of Fed money printing, look to the enormous asset bubble that's developing in US stocks. The more the balance sheet expands, the bigger this bubble gets. And for the foreseeable future, the Fed can't stop printing.

What breaks first?

<comment><USER14> Japans central bank has 3 times the asset sheet to gdp ratio that we do. I think we got a while before anything breaks.

<comment><USER15> The Japanese fiscal hole was way, way too deep a long time before it got as bad as it is now.

</comment></comment></comment><comment><USER16> Was the US lockdown so hard? I thought Europe locked down much more and the contractions there were in the 6-13% range.

<comment><USER11> You're probably comparing Q2 numbers of 6-13% to the annualized rate from the headline (which is based on a 9.5% contraction in Q2)?

<comment><USER17> Yeah, as I understand it reporting quartaly economic changes in annualized terms is an Americanism that isn't generally done in Europe, so you have to be very careful when comparing figures.

</comment></comment></comment><comment><USER18> Stockmarket fine though. What a joke.

<comment><USER19> The stockmarket is denominated in US dollars... Investors see two possible futures:

1\. Economy is fine, their stocks end up growing in $$$ terms. Hence high price.

2\. Economy tanks, US prints new dollars to pay off loans, US dollar loses lots of its value, but because the company stocks are denominated in dollars, the stocks are still worth a lot of dollars.

<comment><USER20> This is an overly simplistic view in my opinion. #1 assumes a strong relationship between the stock market and the overall economy which hasn't been true in recent years (corporate profits are growing way faster than the economy). #2 assumes that the Fed printing money will decrease the value of the dollar, which it might, but in the last 10 years, the Fed has greatly increased the money supply and the dollar has strengthened a lot.

It's best to use terms like the Fed, the US government and US corporations rather than "the US". They're all different.

The possible scenarios investors see are much more varied and nuanced than the two options you've outlined.

<comment><USER21> From option 1, are corporate profits up because of expanded share buyback operations of those corporations? In the current economic downturn buyback-ing seems to be the way to show earnings to shareholders...

<comment><USER20> I was referring to net corporate profits (revenue minus expenses) which aren't impacted by share buybacks. Share buybacks reduce the number of shares outstanding and increase the earnings per share, but don't impact net income.

</comment></comment></comment></comment></comment><comment><USER22> These numbers are not useful. We need to know if the economy will spring back when we reopen, not if it closed when we closed it. Picking this number because it's the closest thing we have to a useful number doesn't make it useful.

<comment><USER23> Not sure why the parent was modded down, they're exactly right. This is not normal times, all bets are off. Current economic numbers have no relevance to the past nor the future.

edit: It will be interesting if Biden is elected and then a vaccine comes out, the economy rebounds, will he take credit? I would expect him to as would any other politician would but, man, Trump's twitter rage will be epic.

<comment><USER22> I don't want to push the metaphor too far, but...

Every night most of us go to sleep between 11pm and 6am. National economic output drops around 90%. Massive disaster, recession, depression level issues. And no one bats an eye lid. Because there is a good reason for this and everyone will wake up in the next 7 hours and go back to work.

This is that but for 7 months instead of 7 hours.

The question everyone should care about is "Will we wake up, when and how many companies will have died in their sleep?" Not "How much work are companies doing while they sleep?".

Those two numbers are barely related IMHO. In fact, the safer we make it to sleep, the less activity we will see now BUT the more we will see in a few months, years etc.

<comment><USER17> The length of the interval matters. Everyone's heart pauses for a second or so tens of thousands of times a day, but if your heart pauses for an hour you're dead. The economy is a lot like your blood circulation - it relies on a continuous flow of money in order for businesses to keep on running and providing people with stuff, and the longer it's shut down for the worse we can probably expect the damage to be.

</comment></comment></comment></comment><comment><USER24> Not bad, the market was pricing in expectations of a 34.7% contraction.

</comment><comment><USER25> Monthly and quaterly figures are bound to show the largest drop.

For annual figures, a first approximation is that a month is worth 1/12th of the annual output so I would expect a 8.3% drop for every month that the economy is completely stopped.

34% contraction for a quarter means that the economy essentially stopped for a whole month, and would lead to a 8% contraction for 2020, everything else being equal. But we're not through yet...

<comment><USER26> > I would expect 8.3% drop for every month that the economy is completely > stopped

Yeah. Everyone knew this was going to be bad, which is why the experts were saying we need to get it under control quickly and figure out how to safely operate while the pandemic is in effect. But 2016 happened, so instead we get months and months of lockdown and the accompanying economic devastation.

<comment><USER27> The "experts" are saying many different things. Currently, the new situation is being analyzed, but it seems that even pervasive non-pharmaceutical interventions (masks obligatory in all closed spaces, ban on public events, etc) are still not enough to keep Rt below 1.0 and "get it under control" (see the second wave effects in Europe). Lockdowns seemed to work, but economically unsustainable. As of now, there is no clear answer about how to proceed.

And that's before the epic blame game even started. Boy, that would be interesting to watch.

<comment><USER28> Masks would work if everybody wore them

<comment><USER29> the problem is that masks have a minor effect at best thus in no way represent the solution so many seek

<comment><USER27> Not "a minor effect", they seem to improve Rt more or less significantly (according to preliminary studies). But they are probably not enough on their own.

</comment></comment></comment></comment></comment></comment><comment><USER30> Has anyone in currency exchange noticed signals of inflation? I track GBP=>USD and even in a post-Brexit COVID economy the rate changed from 1.23 in April to a peak of 1.30 on Tuesday. This really looks like inflation to me, but I'm not an expert.

</comment><comment><USER31> Give me just a little more time, and our love will surely grow. Election delay!

[https://www.bbc.co.uk/news/amp/world-us- canada-53597975](https://www.bbc.co.uk/news/amp/world-us-canada-53597975)</comment>


Yes You Need a Co-Founder - <AUTHOR> http://giffconstable.com/2010/08/yes-you-need-a-co-founder/

<comment><USER2> These become a lot more fun to read (after the 5th one or so) by replacing the debated term with something else. Let's say, 'pants', for instance -

Yes, You Need Pants

Don't think about pants in terms of equity.

[...]the ideal number of pants is two or three.

I feel incredibly lucky to have my brilliant pants[...]

Revel in the intensity of your pants team.

Oh and if the author happens to be reading, it's 'for all intents and purposes' rather than 'intensive purposes'.

<comment><USER3> All the more so if you are in the UK

</comment></comment><comment><USER4> oh my god, give me a break. Everyone has their own opinion on what works for them. Single, co, tri, quad, what does it matter? Sure if you have the perfect people working together in unison then it will be easier. It comes down to YOU, as you allude to. And just because you can't do it alone doesn't mean that you have to lump everyone in together.

This is like the NYC vs SF debate, we are like schoolchildren. "My way is better". Now it's the single vs co-founder debate. Statistically, two people starting a company are usually better than one. But remember that every situation is unique, and what works for people works for people. That's the reason that we have so many different types of companies.

<comment><AUTHOR> Your critique is totally fair. I agree that every situation is unique -- tried to say that in conclusion -- but I did want to take a strong stand especially for newer entrepreneurs trying to figure out their path. I've seen these pieces saying you don't need a co-founder, and haven't seen much recently saying, "wait a minute, hold up there."

I also tried to clarify twice that I'm talking about companies with a strong software component, where team is so essential. At the end of the day, everyone has to carve their own path, no arguments, but there are general points that can increase the odds in your favor and that's merely the warning I tried to give.

<comment><USER4> You are exactly right Giff. I didn't mean to sound like I was criticizing your post in general, it's just the whole discussion in general. I just finishing reading 3 posts this week on NY vs SF and then solo vs co. So this happened to be the post that I commented on :D.

I believe that if you happen to find a co-founder that truly works well with you, amazing things can happen. That is definitely the highest percentage way to go. I am a newer entrepreneur so I get what you are saying. But with very little connections and no real experience, it is much better to start as a solo guy (like you mentioned) and then hopefully find someone along the way.

Although, I still see no reason why those people can't be employees. It all depends on the type of leader that you are. Regardless, good post (and I love your list of lawyers, that's how I found mine, so I appreciate it).

</comment></comment></comment><comment><USER5> I like that he links to how to choose a co-founder down the bottom, but what I want to know, how the hell do you find one in the first place?

If your in SF or any other startup hub then thats fine, but what if your in a proverbial co-founder desert?

Now my situation will be somewhat unique, being in China and all(not even a big city, some backwater, the main industry here is agriculture, this is China's rice basket) but I really wouldn't know where to start and many others would be the same.

</comment><comment><USER6> This is that I think.

Sometimes finding a "co-founder" could take more time than developing the whole project. Time, that btw, you don't have. Time = Money. Money that you don't have either.

So...

If I ask you "Name a friend that you would love to work with and believe he is up to the entrepreneurial challenge of this project" and you take more than 10 seconds to figure out who might be suitable for the challenge, you simply don't have one.

I believe co-founders, partners (however you wanna call them) is more of an attitude thing than a skill thing. Startups require a lot of balls to jump in, even more if you have a full time job and you need to quit it to get this project on track.

Searching for the right partner could be just like waiting for the bus. I could just stay at the bus stop or start walking (coding) to the next stop and then maybe wait there. You could even get to meet your new biz partner half way the road.

It's a good head-breaker paradox. Wait till I find someone to work with or simply start doing it by yourself.

Partners don't always have to actually START the startup with you. They could jump in at any time and it could be extremely handy. Having an extra pair of eyes and hands is always good (you will have to learn to filter critics that you didn't have before and convert them into feedback)

</comment><comment><USER7> _You cannot do this alone — it is way too hard, both work-wise and emotionally._

Who's "You"? Does he know every person planning to be a single founder that well?

<comment><USER8> I also disagree with a lot of what he says, but then I realized it's his personal blog.

I know plenty of people running small companies by themselves.

<comment><USER9> The fact that it's his personal blog doesn't make his opinions on what I can do any more or less valid.

</comment></comment></comment><comment><USER10> Generally, articles that make complex issues seem black and white are silly.

</comment><comment><USER11> i've given up on finding co-founders ....

<comment><USER6> then stop looking for one and start building, eventually you will get to meet people that would be interested in your work.

This could be actually better in terms of equity. Since you already started the work you could ask for 50+% ;)

<comment><USER11> that's the spirit lad, wish i had 10 man like you

</comment></comment></comment><comment><USER12> ...Because you're weak

Because you can't stand the pain.

Because you would like to end up with 10% of the company after working 14 hour days.

Because you need someone to complain to after every setback.

Because you don't have the money or patience.

Because you don't know how to hire the right employees.

Because you're not an entrepreneur.</comment>