jissa's comments

jissa | 3 years ago | on: Always use [closed, open) intervals

Not to mention the sweetness of saying:

* Jan 14 - Jan 10 = 4 nights

* Jan 16 - Jan 13 = 3 nights

I actually had to edit my previous comment, because I said [Jan 10, Jan 13] was 3 nights INSTEAD of 4 nights.

I caught the error when I saw the [Jan 10, Jan 14) interval :-)

jissa | 3 years ago | on: Always use [closed, open) intervals

Right, I think the hotel room use case helps a lot with the intuitions here. And it helps to see the COUNTER EXAMPLE:

* Hotel A [Jan 10, Jan 13] means 4 nights; same as [Jan 10, Jan 14).

* Hotel B [Jan 13, Jan 15] means 3 nights; same as [Jan 13, Jan 16).

These intervals overlap! That is, if I try to get them together I book Jan 13 on both Hotel A and Hotel B.

With the half-open interval is really easy to spot: you cannot concatenate unless the open-end and the closed-begin are the same.

So you can concat [Jan 10, Jan 14) with [Jan 14, Jan 16); BUT you have an overlap if you see this [Jan 10, Jan 14) with [Jan 13, Jan 16) as in the previous examples.

With the closed interval this is hard to see. As in the example by @parekhnish; it seems that [Jan 10, Jan 13] and [Jan 13, Jan 15] are concatenable and there's no overlap. But the final operation ends up booking on Jan 13 twice.

jissa | 3 years ago | on: Always use [closed, open) intervals

But I don't think these are equivalent.

When looking for a booking you are using an interval.

When looking at room capacity you are looking for a minimum. This is not the same as an interval. If you are looking for "sleeps 6" that is your bare minimum acceptance in capacity. You are not interested for the [1, 6] interval. Nothing below 6 makes sense.

Even if you wanted to force the interval use here, I'd say you'd be looking for the [6, INF) interval. That is, rooms with capacity of at least 6 (but having more capacity is fine).

jissa | 3 years ago | on: Ask HN: Is there an author who made a successful startup after publishing?

Sounds like the story of HP Labs Smallbase (now Oracle TimesTen):

"TimesTen was founded in HP labs by Marie-Anne Neimat, Sherry Listgarten, Kurt Shoens and Kevin Wilkerson, under the name of Smallbase" [0].

The you have that "Marie-Anne approached HP management about spinning out TimesTen as a separate company" [1].

Smallbase HP Labs publications (I couldn't find the originals) cited by [2]:

** “Smallbase API Reference Manual (Smallbase 4.1)”, Database Technology Department, Hewlett-Packard Laboratories, Palo Alto, April 1995.

** M. Heytens, S. Listgarten, M. Neimat, K. Wilkinson, “Smallbase: A Main-Memory DBMS for High-Performance Applications (Release 3.7)”, Database Technology Department, Hewlett-Packard Laboratories, Palo Alto, December 1994.

--

[0] https://en.wikipedia.org/wiki/TimesTen

[1] https://www.fastcompany.com/3019296/44marie-anne-neimat

[2] TPC-B on Smallbase and P21 -- https://www.semanticscholar.org/paper/TPC-B-on-Smallbase-and...

page 1