Milestone for MIT Press's bestseller, "Introduction to Algorithms" - <AUTHOR> http://web.mit.edu/newsoffice/2011/introduction-to-algorithms-500k-0810.html

<comment><USER2> One of the most exciting things that has happened to me recently was finding a brand new copy of this in a used bookstore (real version, not EE) for $8. No marks, no anything.

(And my life is _full_ of excitement, trust me!)

Great book, one of the must-reads. Though I'll admit I've only gotten like a third of the way through it...

<comment><USER3> I had a little bit more excitement than that when I found Intro to Algorithms for 10 cents at the local library. Hidden within many pages were $20 and $50 bills. Over $500. There was no name in the book and the library said they had no way to figure out who the book belonged to. I assume the owner did not trust banks or his room mate. I now have a habit of looking for money inside whenever I see a used book for sale.

<comment><USER4> I occasionally "hide" bills in selected sections of textbooks I've been meaning to read. It serves as a perk or secondary means of positive reinforcement (the primary being learning interesting/useful stuff). It also indirectly brings the material near where I've stuffed the bill to the forefront of my mind, even if I'm not incentivizing myself with cash. "Where was that $20? Oh, near Djikstra's algorithm. I'd been meaning to look that over."

</comment></comment></comment><comment><USER5> Nope - the book sold far more: They are not taking into account Eastern Economy Editions. The book is quite popular in Indian colleges.

</comment><comment><USER6> The Monzy quote made by Cliff Stein caused me spit up my diet coke with laughter :) <http://www.monzy.com/intro/killdashnine_lyrics.html>

Monzy was my TA for CS147 (intro to HCI). Small world.

</comment><comment><USER7> I powered through nearly the whole book in a pretty short period of time, preparing for my Google interviews. It was a great review (and a great intro to a few classes of algorithms (e.g. max flow) I hadn't seen before). Congrats to the authors.

</comment><comment><USER8> I didn't study CS, but have found this on almost every developer's bookshelf, impressive run.

Since my friend has it, I wanted to get something different and picked up Skiena's Algorithm Design Manual. Anyone have thoughts between the two?

<comment><USER9> I'm still going through Skiena's book (we used CLRS in school, so I figured I'd use Skiena's as a counterpoint), but so far I've been impressed with Skiena. It's a lot more terse (as evidenced from the size differences between the two), and so far I seem to be grokking it better (although it's been over a decade since I even cracked CLRS open).

</comment></comment><comment><USER10> I consider this book and Sedgwick's "Algorithm's in C" to be the two algorithm books to have if you don't own any. Mine is signed by Dr. Rivest but I never managed to get Verterbi's autograph for it.

</comment><comment><USER11> It's strange - the article talks about it being this 20-year favorite, but I didn't see it show up in US bookstores until the last few years.

<comment><USER12> Which bookstores? Most don't sell textbooks, except for university bookstores.

<comment><USER11> Every Borders and Barnes & Nobles that I lived near. They do carry a few hard- core algorithms books and eventually it did show up there.

It's true that I don't get to university bookstores as often as I'd like.

</comment></comment></comment><comment><USER13> For those of you just getting into this book, there is also a great course with video lectures up on MIT's OCW site: [http://ocw.mit.edu/courses/electrical-engineering-and- comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer- science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/index.htm)

</comment><comment><USER14> Its an excellent book. I am proud to own a copy. Authors have done a good job!

Anyone who want to learn algorithms & data stuctures should get this & read it cover-to-cover. PERIOD

</comment><comment><USER15> I agree with gary4gar, this is such an excellent book.

CLR is sitting by my desk now. Seeing this book inspires me to code.

</comment><comment><USER16> I own two copies of this book, the best algorithms book you can own. One sits at home and another in my office at school.

</comment><comment><USER17> Is there a legal ebook version?

</comment><comment><USER18> I've got mine sitting at my desk right now

</comment><comment><USER19> I'm sure that there is a lot of good material in that book, especially on core computer science topics. But the book is only an 'introduction' since for many of the topics for serious interest in practice it will be important to go deeper than the book.

In places the authors of the book have bitten off more than they can chew well. E.g., in linear programming they have:

"Gaussian elimination begins with a system of linear equalities whose solution is unknown. In each iteration, we rewrite this system in a equivalent form that has some additional structure. After some number of iterations, we have rewritten the system so that the solution is simple to obtain. The simplex algorithm proceeds in a similar manner, and we can view it as Gaussian elimination for inequalities."

NO! They blew it! That just ain't the point! They failed to 'get it'! They don't understand! With liberal grading, they get a gentleman C- for effort!

They get a grade of B until they get to:

"we can view it as Gaussian elimination for inequalities."

where they get a big red mark through their effort!

They emphasized the role of inequalities, but that is really trivial. With no difficulty at all, we convert a linear programming problem with inequality constraints (<= or >= but not < or >) to one with (a) equality constraints and (b) all the variables greater than or equal to zero. Fine. But notice the part (b) where we still have some inequalities although some simpler ones.

That conversion was easy. But it didn't do us any good at all for the main point of linear programming or the simplex algorithm for finding solutions since the main point is optimization, that is, doing good things for the objective function.

So, with the equality constraints, in the simplex algorithm, we proceed with elementary row operations. Yes, each "iteration" is in terms of elementary row operations on a system of linear equations. It is MUCH better to mention "elementary row operations" than "iterations"(s) because the 'iterations' can't be easily justified but the elementary row operations can. That is, there's no doubt that elementary row operations yield an equivalent system of linear equations; either we learned this well enough in high school or we can easily establish it ourselves in a few minutes.

Yes, so does Gauss elimination use elementary row operations. But, for the simplex algorithm itself, directly, that's the end of the connection with Gauss elimination!

Why? Gauss elimination, for numerical stability, should emphasize careful selection of the 'pivot' elements, e.g., as in

George E. Forsythe and Cleve B. Moler, 'Computer Solution of Linear Algebraic Systems', Prentice-Hall, Englewood Cliffs.

and the simplex algorithm of linear programming does not have that freedom or luxury.

So, each 'iteration' in the simplex algorithm is just an application of elementary row operations on a system of linear equations. Nice to know this.

Next, and the main point of the simplex algorithm, which elementary row operations are selected? That is, there is enormous freedom, and all the freedom would result in an equivalent system, so how to exploit the freedom?

Well, the authors omitted a step! Once we have converted the given linear program with, possibly, some <= or >= constraints, to all equality constraints and all variables >= 0 (and all the right sides >= 0), we want an 'initial basic feasible solution'. How do we get one? We in effect just 'glue it on'!

So, if for some positive integer n we have n constraints, then we glue on, that is, append, n more variables, that is, n more columns, where the n x n matrix in the constraints is just the identity matrix. These variables are called 'artificial'. We (temporarily) modify the objective function: We set each of the old cost coefficients to, say, 0 and the cost coefficients of each of the artificial variables to, say, 1.

What's going on with the artificial variables? Sure: The first question about a linear program is, does it have a feasible solution or not? We say that a solution, that is, values for the variables, is 'feasible' if it satisfies the constraints. It may be that there is no feasible solution; we want to know.

So, this work with artificial variables answers the question about feasible or not.

How? The problem with the artificial variables is obviously feasible (before we appended the artificial variables, we multiplied some of the equality constraints by -1 so that all the constants on the right side were >= 0). So, if we just assign the right side variable values to the artificial variables (the only way we can given that n x n identity matrix), then we will have a basic feasible solution to the problem with the artificial variables.

Then we apply the simplex algorithm to minimize. We look at the resulting optimal value of the objective function. If that value is positive, then the initial problem is infeasible. If the value is 0, then the initial problem is feasible and we have a feasible solution for it. With some inspection, we also have a basic feasible solution for the initial problem after dropping some redundant rows.

Also, easily we can put the original cost coefficients back where they belong in place of the 0s we inserted.

So, due to the artificial variables, we have a basic feasible solution and, if you will, an identity matrix that is the goal of Gauss elimination. So, Gauss elimination can't really help us.

But some elementary row operations can help us, and they do, that's what we use, and that's the core of the simplex algorithm.

Now we address a crucial issue: Looking at what are called 'reduced costs', it may be that they tell us that our present basic feasible solution is optimal. If so, then we stop.

Else, we pick a variable not in the basis and ask what would happen to the objective function value if we (a) increased this non-basic variable and (b) adjusted the basic variables to maintain equality in the constraints.

Now we address another major point: Looking at increasing the value of this non-basic variable, it may be that we can increase it all we want, without bound. In this case we have just discovered that our problem is unbounded. That is, assuming we are minimizing, we can save all we want. Else, there is a maximum value to which we can increase this non-basic variable without driving one of the old basic variables negative and, thus, giving us an infeasible solution. That is, increasing this non-basic value to its maximum value drives one or more old basic variables to zero.

So, we say that this non-basic variable 'enters' the basis and some old basic variable at zero 'leaves' the basis.

This calculation needs only elementary row operations.

So, each iteration of the simplex algorithm, actually including finding the reduced costs, needs only elementary row operations on a system of linear equations.

Then, the big point, the HUGE point, the main point about the simplex algorithm is WHAT elementary row operations are used. The answer is, we use elementary row operations that, one non-basic variable at a time, improve the value of the objective function.

THAT'S what's special in the simplex algorithm and NOT that it's 'Gauss elimination on systems of inequalities'.

For more, geometrically, the feasible region is an intersection of finitely many half spaces and, thus, is a closed, convex set with extreme points, edges connecting pairs of extreme points, and flat sides. Each basic feasible solution corresponds to an extreme point. One simplex iteration, when it improves the value of the objective function, leaves its extreme point and moves along an edge from that extreme point.

It is possible to move from one basis to another with no change in the value of the objective function; in this case it is possible for the simplex algorithm to 'cycle', that is, return to a given basis infinitely often. By being more selective about entering variables, we can avoid cycling.

If there is an optimal solution, then there is an optimal basic feasible solution; there is an optimal basic feasible solution where the reduced costs will show that the solution is optimal; and the simplex algorithm that does not cycle will find such a solution in finitely many iterations.

Once again, don't go to computer science people, not even the ones at MIT, to learn some applied math, not even applied math as simple, elementary, old, and beautifully polished as the simplex algorithm of linear programming.

<comment><USER20> "Once again, don't go to computer science people, not even the ones at MIT, to learn some applied math, not even applied math as simple, elementary, old, and beautifully polished as the simplex algorithm of linear programming."

Well said. I've taken courses both in CS and Math. CS people think they know math, but most of the time they have very poor math skills, and this is true even in Theoretical CS. Most proofs in CS are way too complicated and badly written. I think this book is one of the reasons for this -- most of the time the proofs are extremely complicated and verbose, it is a bad example for students that want to learn algorithms. Sedgewick's book is much better, in my opinion.

<comment><USER19> Learning 'math' as a good ugrad or grad student is NOT easy and involves a special step often called 'mathematical maturity' where the student learns to be good at reading and writing definitions, theorems, and proofs in math. This step is NOT easy to learn and in practice is nearly impossible to learn without some careful teaching. The usual place to learn the step is in a very precise course, with a lot of very well graded homework, in abstract algebra and then to strengthen the learning via very precise courses in advanced calculus and, maybe, point set topology or measure theory. Without that step, nearly no one knows how to do well writing definitions, theorems, and proofs in math.

Mostly fields outside math try hard to teach math within their fields. Examples of such fields include physics, chemistry, economics, psychology, sociology, electronic engineering, and, yes, computer science, In all cases, the results are at best poor. Of course, those fields are helped by the fact that the math departments don't want to do well teaching service courses, say, in second order stationary stochastic processes for signal processing in electronic engineering with the fast Fourier transform!

But you noticed the problem: The CS profs make a mess out of math.

For the book of this thread from MIT, that fact is a bit surprising: For one, among the authors, at least Rivest has done some good math. For another, for each math topic in that book, MIT has some high expertise. E.g., in optimization, Bertsekas is there and long there have been others.

Once the basic ugrad lessons in math are learned, one still has to learn how to communicate in less severe forms. So, the book failed there, too: Their algebra for the core steps of the simplex algorithm was too long. And, their intuitive explanation, as I objected to here, really was not correct. Sadly they just wrote their chapter on the simplex algorithm too quickly from too little study. This is especially sad since there are many highly polished presentations of the simplex algorithm.

They got pushed into attention to linear programming, and the simplex algorithm, because of some important connections with some problems, e.g., flows on networks that they want to regard as part of computer science, where linear programming is a very important tool.

So, really, it's a strain to call 'flows on networks' computer science. Instead, it's a topic in applied math, back to Ford and Fulkerson, yes, with some by Dantzig, but more from Cunningham and Bertsekas, in particular, part of operations research. So, CS wants to hijack flows on networks. Not really good.

I omitted a more serious objection to the book: It makes a mess, a really bad mess, out of probability. Yes, in the study of the performance of algorithms, probability is important. So, once again, CS wants to borrow and use or just hijack some applied math and makes a mess. That at MIT they make such a big mess out of probability is something of a surprise. Still, in the US, the good courses in probability require both measure theory and functional analysis and are rare, even in math departments. Sad situation.

In using probability for performance of algorithms, in TACP Knuth did better: He stayed with a more elementary approach to probability and made it powerful enough.

E.g., in the book, I saw where they mentioned that the need for probability was that the data had a 'distribution'. Mostly that's not what have to pay attention to: E.g., don't much care about Gaussian, uniform, exponential, etc. Instead, what care about most of all is independence and, then, sometimes, lack of ties. Sad situation.

For both teaching and research, CS needs to clean up its act in math.

Still better, math should just open up, welcome, take in, and take over all the more important fields that are heavily math -- physics, economics, social science, electronic engineering, computing, operations research, etc. Instead of being one of the smallest departments on campus, teaching a few service courses, and otherwise struggling, math could be one of the biggest departments on campus, awash in both funding and students, and one of the most important pillars of growth in our economy.

I have an example: Some years ago I took a problem in practical computing and derived some new probabilistic math for a solution. Right, I used measure theory. I wrote prototype software, ran it on some real data, etc., and wrote a paper. So that I could get the paper in front of people in computing, where the applications are, I looked for journals in computer science. From one editor in chief of one of the best journals, a chaired prof of computer science at one of the best research universities, I got back "Neither I nor anyone on my board of editors has the prerequisites to review your paper.". Later I got almost the same statement from a second such person. For a third such person, at MIT, I wrote custom tutorials for two weeks before they gave up. But in the end the editor in chief of a good Elsevier journal seems to have walked the paper around campus and gotten feedback enough to get the paper reviewed -- the editor couldn't review it!

The paper was a nice contribution to computer science. Generally nice contributions will want some math. For all concerned, CS needs to learn some math.

Here's what they need to do: After calculus, get a good book on abstract algebra, pay full attention to the proofs, and learn some 'mathematical maturity'. Then get a good, first book on linear algebra and learn some important material, still paying attention to the proofs, and get more maturity. Then get Halmos, 'Finite Dimensional Vector Spaces' and learn from one of the best writers of math ever and get an introduction to Hilbert space theory. Then go carefully through Rudin's 'Principles'. Then do some more in ordinary differential equations where get to use both Rudin and Halmos. Then do some optimization -- e.g., pick from linear programming and some of Bertsekas. Then learn some measure theory, functional analysis, and probability based on measure theory. Cover basic stochastic processes, e.g., Markov, Gaussian, and martingales. Then learn some mathematical statistics. THEN return to computer science.

<comment><USER21> I think there's validity to your argument, but you come across as a bit arrogant. A few comments to your post:

>The CS profs make a mess out of math.

Properly done CS _is_ maths. Maybe most of it is not in the branches you're interested in, but the core of CS is maths (think Turing, Church, Von Neumann, Codd, Hoare, Martin-Löf, etc.).

>it's a strain to call 'flows on networks' computer science.

I've always heard it called part of operations research, which happens to be an rather useful field to teach CS students. Yes, it is taught at probably a very basic level, but it is still useful as taught. And saying that:

>So, CS wants to hijack flows on networks. Not really good.

is disingenuous at best. Actual networks, like the one you're using now to post about your discontent with CS are basically run on computers, and are, not surprisingly, part of what CS people worry about. There's a whole field of very applied CS that's a direct application of some basic operations research results.

>For both teaching and research, CS needs to clean up its act in math.

In a general sense, yes, it would be good. Maybe you also need to read some better CS stuff?

>I have an example: Some years ago I took a problem in practical computing and derived some new probabilistic math for a solution.

You go on to rant how editors of CS journals weren't smart enough to understand your paper. That might well be the case, but it is obvious that you were not any smarter, sending a paper which is pure maths in nature to several CS journals, when the "problem in practical computing" was merely an application of your result, and not the main point of your paper. If you were a physicist working on some very deep results of quantum mechanics that happen to have a direct application to, say, molecular biology, you would still send it to a physics journal, not a biology journal, wouldn't you?

>Here's what they need to do:...

That's a good plan for learning a bunch of maths, not CS.

<comment><USER19> "Properly done CS _is_ maths."

Okay, then you would agree with my thought on this thread that the math departments should just take over CS! The CS would get some much better math, and the math departments would get a big head and tummy ache from the much needed contact with applications. Fine with me.

"is disingenuous at best."

No. That chemistry uses some group theory for molecular spectroscopy and makes a mess out of it, which it has been known to do, doesn't mean that a mathematician who sits in a chair with plastic fake leather shouldn't comment. So, yes, IP routing has been based on some network shortest path algorithms. So, they used some operations research material since really it was operations research that first dug into networks that deeply -- yes, I know, there was a Nobel prize in economics for some work by Kantorovich (?) in the late 1940s on the transportation problem and, earlier, work in circuit theory as in Kirchhoff. Still, e.g., with Ford and Fulkerson and then Jack Edmonds, network shortest path and flows on networks should be attributed to operations research. If IP routing got to use it, then fine. Once I used Cunningham's version of the network simplex algorithm on a problem in allocating sales forces in a tricky situation: The problem looked like just integer linear programming, but if looked again it was just network flows where can get integer solutions for no extra effort. That doesn't mean that network flows should be part of courses in selling!

But CS is not just using network flows but calling the subject part of computer science. That's hijacking! Or it justifies my "Not really good.".

But, such things will happen. There is no law that says that have to be an operations research person to publish in an operations research journal or to publish about networks in a computer science journal. The NSF even works to encourage 'cross-cutting'.

Since my writing is so 'succinct', maybe I wasn't clear! If CS wants to take a field like network flows for their own, then actually do a competent job of it and don't mess it up. So, when there's is need, as there is, for the simplex algorithm, and not just using it but calling it part of CS, then do a competent job with the simplex algorithm. If probabilistic analysis of the performance of algorithms is to be part of CS, then CS should do a competent job with the probability. Else, CS is diluting the quality of these subjects. I argued elsewhere on HN that CS has diluted the meaning of dynamic programming, also essentially hijacked by CS.

If you want to say that CS done well is math, then they should do the math well.

When I was in grad school, I took some courses in measure theory and functional analysis from a department not the pure math department. And I took some statistics. When the statistics got to sufficient statistics, which is from the Radon-Nikodym theorem of measure theory, the prof totally blew it. I just walked out of the class; mostly I knew the material at the elementary level anyway, and at the level I wanted to learn the material the course was a waste of my time. Well, in the courses in measure theory and functional analysis, the profs maintained quality only slightly short of Bourbaki. They didn't have less than a beautifully polished proof for anything. Any hint or suggestion that there was a logical gap was a very big deal in the department. When I walked out of the stat course, the department dumped on me. Then I dumped back on the mess made of the R-N theorem. The next year the stat prof was gone. That department, not pure math, took the math fully seriously: A prof who blew a good proof of one important theorem was looking for a job. The situation was SERIOUS. We weren't a pure math department, but we did the math in rock solid ways. The department also had some operations research: Similarly. The math was rock solid. E.g., at one point in the Kuhn-Tucker conditions, I objected that a proof had used but not assumed continuous differentiability. I worked up a proof with just differentiability, and my proof was in the course the next semester.

So, broadly, just because we were interested in some math topics not common in pure math departments, and interested in applications, didn't mean we did the math at a lower level of quality. We were as close to Bourbaki as anyone. It can be done. CS should do it, too. Sorry 'bout that. Low quality is not good; I called out some low quality. I was fully correct to do so. The problem is not my arrogance but their low quality.

"In a general sense, yes, it would be good. Maybe you also need to read some better CS stuff?"

So, we are in agreement, "it would be good".

For my reading, that's about me, and that's not appropriate. The issue is the book CLRS or whatever it is called. I'm not the issue.

But for some "better CS stuff", you mentioned von Neumann. Right: In my favorite source of the R-N theorem, the proof is by von Neumann. In my current project, there's some math at the core, some original, and some due to von Neumann. I credit him and Kolmogorov.

For the paper I sent, I sent it to an appropriate journal. The motivation for the research was a problem in computer science. The main application for the original part of the research was just to that problem. That there was some original math at the core of the paper was part of the work as in your remark that CS should be math.

You are agreeing with my main point that CS should clean up its math and then calling me arrogant for making this point. Can't have it both ways.

For the course of study I outlined, what important about CS does that omit! I know; I know; it omits heap sort! And AVL trees. Gee, looks like that course of study needs more, maybe a lecture, maybe even two, of an hour each?

Do the math. For the CS, do that in the exercises and footnotes!

<comment><USER21> >Since my writing is so 'succinct', maybe I wasn't clear! If CS wants to take a field like network flows for their own, then actually do a competent job of it and don't mess it up

I really hope you were being sarcastic when referring to your writing as succinct. Anyway, who is claiming anything for their own? If some problem in CS leads to some new result in operations research, then a paper will be published in a nice operations research journal, and everyone will be happy. If the math is not good enough, the paper will not be published, and the author will have to rework it. Now maybe your claim is that CS journals with a focus on operations research are not sufficiently rigorous to your taste, but that's a different matter altogether.

>Okay, then you would agree with my thought on this thread that the math departments should just take over CS!

No, I don't. Firstly, CS is in itself a branch of maths, but in practice, most of the stuff that CS people do is of basically no interest to pure mathematicians, and vice-versa. Hence, I don't see any point in having a math department take over a CS department. Secondly, there are many things that normally fall within the purview of CS departments which are not at all related to maths (in any meaningful, abstract way), such as OSs, computer architecture courses, software engineering, compilers, etc. While all of those have a basis in maths, they certainly don not belong under a maths department. Of course it could be argued that there should be some "Applied CS department" or "Software Engineering" department or some such that would take those courses and research areas out of the "Pure CS" field, but that would end up doing a disservice to students and researchers alike.

>For the paper I sent, I sent it to an appropriate journal.

Sorry, but I disagree. If none of the reviewers, and none of the editors, or anyone they knew was able to understand your paper, either you wrote something incomprehensible, or you submitted it to the wrong venue. I don't doubt that you're a math genius who rocks measure theory and functional analysis, but I find it hard to believe that it an on-topic paper flew over the head of all the editorial staff and reviewers in any given area.

>You are agreeing with my main point that CS should clean up its math

Only up to a point. Better maths in CS research could be an improvement, as long as it doesn't veer into non-CS areas just for the sake of doing maths. I don't agree at all that CS students should master mostly unrelated areas of pure maths, though, as there are much more relevant issues within CS (plus its "applied" branches) and only so much time students can spend at the university.

>For the course of study I outlined, what important about CS does that omit! I know; I know; it omits heap sort! And AVL trees. Gee, looks like that course of study needs more, maybe a lecture, maybe even two, of an hour each?

I would think Donald Knuth would be in disagreement with you there. Also, your suggested program veered into pure maths for things that are 99.99999% out of scope in CS, while neglecting seemingly all applications of CS.

Also, I called you arrogant because that's how you come through in your writing. As I said, I don't doubt you're a very gifted mathematician, but from what you just wrote here, I think your grasp of actual CS topics is not so great.

<comment><USER19> Part II

For the CS topics you listed, e.g., programming languages, that field has for decades just cried out for some good math but gotten nearly none! Clearly compiling and executing a program are necessarily mathematically something, understood or not, powerful or not. For progress, we need to understand the subject mathematically. E.g., given a programming language statement, what are its mathematical properties so that given a sequence of two such statements, what are the mathematical properties? Can't see any? Okay: Change programming languages until can. Then with the properties, what can we conclude about the program? Anything useful, say, about correctness, running time, storage utilization, approaching limitations? Given some properties, can we have some code transformations with some known properties? Are some such useful? If not, can we define some useful programming languages that admit such transformations?

There are some simple, illustrative, pregnant cases that just leap off the screen: Write a collection of routines for sort by surrogate, i.e., finding a permutation, maybe honoring sort 'stability', applying a permutation to an array, chasing through the fact that each permutation is a product of disjoint cycles, etc. Then with such routines, will see some properties that are close to algebraic, e.g., where some combinations of the routines are the identity transformation, where one routine is the algebraic inverse of another, where we might have commutativity and/or associativity, or are equivalent to other combinations, etc. Can we preserve sort 'stability'? So, we see that we should have an 'algebra' of those routines and be able to derive known properties. Then we see that due to 'boundary' limitations, etc., our algebra is only roughly correct. So, maybe we should fix that.

This is old stuff. It has leaped off the screen for decades. We want some known properties we can use to derive new, useful properties. Instead all we get is programming languages that compete in some absurd 'beauty contest' or that 'encourage' programming 'styles' seen as 'helpful'. Sicko.

E.g., it has been common now in server farms to be concerned about reliability. So, we set up systems so that when system A gets too busy or fails, then system B takes over, etc. However, what we've seen, including at some of the most important farms, for decades, up to this year, is that these intuitive approaches far too easily go "splat" in the mud: They are 'unstable', have problems that propagate, and are surprisingly UNreliable.

So, we need some new math of 'reliability' for such server farms, math that can write us some guarantees. That math will start with the real problems, have definitions, theorems, and proofs, and, if successful, some solid tools for building reliable server farms.

All across computing, CS needs to give us progress, and for that they need to proceed essentially only mathematically.

It's the math. The CS is the math. Server farm reliability is just the application of the math and is not the CS. Ignoring math, CS is "A little people. A silly people."! Until CS gets serious about the math, it is writing checks its methodology can't cash.

To get serious about math, CS first has to learn LP well!

The would you believe probability? How about stochastic processes? Any stochastic processes in server farms and networks? Any uses of the axiomatic derivation of the Poisson process? Any roles for one of the strongest inequalities in math, the martingale inequality and the associated convergence theorem? Measure preserving transformations as in ergodic theory -- I'll answer that one, "Yes!". The renewal theorem and loads at server farms? How 'bout a little in probability?

Understanding now?

<comment><USER21> >Understanding now?

Not really, as your raving all over the place and still not making a lot of sense, argument-wise.

I guess I'll just agree to disagree, I feel bad for making your write so much.

Just a few of parting shots:

>Clearly compiling and executing a program are necessarily mathematically something, understood or not, powerful or not. For progress, we need to understand the subject mathematically.

If you think that there has been no progress in these areas, I'm sorry, but you really don't know what you are talking about. Could that progress have been faster, had the maths behind it been formalized? Maybe so, yet I don't see that many mathematicians working on branch prediction on deep pipelining processor architectures, and plenty of other things that lowly CS-ers have worked out. Want to see more maths in all of CS? Maybe you need to bring them to it, in the form of useful tools that can deal with fast moving targets.

>what are the mathematical properties? Can't see any? Okay: Change programming languages until can.

I regret to say that that's not as easy as it sounds. There are issues of tractability, and more importantly, there's this not-quite-cottage industry of software development, which needs good-enough languages to use _today_.

> this is old stuff. It has leaped off the screen for decades. We want some > known properties we can use to derive new, useful properties.

You mean like Agda, Epigram, and countless other formal systems for program specification, derivation and correctness proving?

> Instead all we get is programming languages that compete in some absurd > 'beauty contest' or that 'encourage' programming 'styles' seen as 'helpful'. > Sicko.

This coming from a mathematician is strange to hear. Elegance and expressiveness are important when programming. It makes for succinctness and less bugs, and improves programmer productivity (which down here in the real world, means $$$).

>How about stochastic processes? Any stochastic processes in server farms and networks?

How about them? Plenty of very CS-oriented research based on stochastic processes. I should know, I did my doctoral research within a 45 person team on networks and network modelling, where most of the big guys were mathematicians. These people (not me, I do very applied stuff in a very bastardized field) breathe and live Markov processes and queuing systems. I don't see what you're complaining about here.

>E.g., it has been common now in server farms to be concerned about reliability. So, we set up systems so that when system A gets too busy or fails, then system B takes over, etc. However, what we've seen, including at some of the most important farms, for decades, up to this year, is that these intuitive approaches far too easily go "splat" in the mud: They are 'unstable', have problems that propagate, and are surprisingly UNreliable.

The folks over at Google would like a word or two with you on this.

> Until CS gets serious about the math, it is writing checks its methodology > can't cash.

Maybe, and yet it seems to be doing not at all bad, as far as I can see. Would more and better maths be useful? Surely so. Would relegating CS to "footnotes" make any sense? We surely disagree there.

There's a whole continuum in CS, from the highly abstract and "math-y" to very applied stuff that has a very faint, if any, relation with what mathematicians normally worry about, and yet is critical for actual applications. I just find it odd that you don't see that fact.

There is a trend towards more maths in plenty of CS topics that were once just "practical stuff", so maybe the day will come when maths departments will branch out into real-world CS, and CS students will need more math, as you'd like. Given that we've been doing "maths" for 3K years, and CS for less than 100, you might need to wait a bit, though.

Anyway, thanks for the discussion, and have a nice weekend.

<comment><USER19> You are starting with an axiom that I'm talking nonsense and then bending everything I write in that direction instead of reading what I write. E.g.,

"I regret to say that that's not as easy as it sounds. There are issues of tractability, and more importantly, there's this not-quite-cottage industry of software development, which needs good-enough languages to use _today_."

I didn't say it was "easy", and clearly my point is progress and not current software development. Sure, for my project, I'm typing in code in Visual Basic .NET. For writing code today, all things considered for my context, that is about the best option.

But what I'm typing in is hardly different from what anyone might have typed in all the way back to Algol.

Here's the point: People type in all that code, and then what? Can some software go over it, report properties, do some transformations with known, useful properties? Not very much. Such things won't be better for Visual Basic than they were for Algol or anything between.

So, they type in the code, and then all they have is just that code. They can desk check it, test it, try it, revise it, etc., but it's all still digging the Panama Canal with a teaspoon one canal at a time. That is, there's no real automation and no significant exploitation of mathematical properties that could lead to automation.

Or, return to most of the rest of engineering where we have specifications of resistors, capacitors, inductors, transistors, fans, copper wire, steel sheets, aluminum bars, etc. with ohms, farads, density, tensile strength, electrical conductivity, etc. Okay, now compare with some DLL or its source code: What engineering properties do we have. Essentially none. It's like building with iron before we knew about tensile strength.

Sure, with some such research progress, eventually programmers would benefit. Obviously the intention is real progress in software productivity. We're not going to get such productivity by more of the same that got us C, C++, Java, Python, Visual Basic .NET, C#, etc.

Also for another of your points, I'm not talking about anything like branch prediction or deep pipelining. That's basically what to do with with the hardware to execute an existing instruction set.

Also the point is not math or not. The point is progress. Math will be necessary but not sufficient. That is, just stuffing in some math won't yield more than the old trick of putting two extra, unused transistors in a radio to claim nine transistors instead of seven.

Your point that there's a lot of good CS to do without 'mathematizing' the field is not promising for research or significant progress.

<comment><USER21> > Sure, for my project, I'm typing in code in Visual Basic .NET. For writing > code today, all things considered for my context, that is about the best > option.

Maybe you should try something other than VB.NET, then. There are ways of constructing correct code, if you're patient enough, that is. If you're using the CLR, why not use F# instead of VB? That'd be a big step towards being able to prove some things about your code. Or if you really want to take out the big guns, go for Coq, Isabelle, Agda, Epigram, etc.

> Can some software go over it, report properties, do some transformations > with known, useful properties?

Yes, in many cases. There's a whole lot of work in static code analysis, and refactoring tools. It's not perfect (the halting problem being non-decidable and all that) but there have been _significant_ improvements since the Algol60 days, and that's not counting functional languages and type-theoretic approaches.

> Or, return to most of the rest of engineering

That goes a bit off topic, but at the stage we are in, for most practical purposes, "software engineering" is not really engineering. Except maybe when done by NASA, but then again, that's not a practical approach either.

> Also for another of your points, I'm not talking about anything like branch > prediction or deep pipelining. That's basically what to do with with the > hardware to execute an existing instruction set.

Oh, but you were talking about compilers. Modern optimizing compilers have to take those things into account, among many other things.

> Clearly compiling and executing a program are necessarily mathematically > something, understood or not, powerful or not. For progress, we need to > understand the subject mathematically.

(from your previous post) My point was that very significant progress has been made in many fields, even if not necessarily formalized.

> Also the point is not math or not.

Sorry, but when you state that CS should be a footnote in a math book, you are kinda making the point that everything in CS (even in those sub-domains that are eminently practical) should be math-based to do anything meaningful. This is demonstrably not true.

> The point is progress.

And I've agreed with you on this. More and better maths can help advance CS. But we knew that already.

> Your point that there's a lot of good CS to do without 'mathematizing' the > field is not promising for research or significant progress.

I contend that there has been significant progress in many CS areas without 'mathematizing' them. That is a fact. I also stated, in my previous post, that I agree that maths could help improve this progress. I think my problem with your position is that you're talking in absolutes in topics where those absolutes clearly don't hold.

<comment><USER19> "Sorry, but when you state that CS should be a footnote in a math book, you are kinda making the point that everything in CS (even in those sub-domains that are eminently practical) should be math-based to do anything meaningful. This is demonstrably not true."

I'm exaggerating, but, still there is a reasonable point here. CS is about some 'science', and call that the mathematical part where we have some solid material worth being called 'science', For the rest, call that 'computer practice' or some such.

The upside of my view is that for some serious progress we're going to have to use some serious methodology. So, I'm proposing if not mathematical physics envy then applied math envy. Applied math didn't take on how to design the display lights in a scientific pocket calculator although without the lights the thing wouldn't work.

My view is not the most extreme: Last year I communicated with a CS prof whose position was that CS is looking for the 'fundamentals of computation'. Hmm .... It sounds like he believes that the P versus NP question should be right at the top of the list, and I don't. I'll settle for anything that is solid and a contribution, even if small, to the 'science' and not just to current practice.

LIkely many people here know the current state of programming language research much better than I do. If that field has gotten nicely mathematical with some solid material, great. The progress from Fortran, Cobol, Algol, Basic, PL/I, Pascal, C, C++, etc. was pragmatic and important and of enormous value to the economy but not much progress in a 'science' of programming languages, and that progress, with poor methodology, has slowed as we might have expected.

Maybe I'm saying that, in 1920, if we wanted a really good airplane, then maybe we should set aside the wood, linen, and glue and go do some aerodynamiocs calculations, discover Reynolds number, and discover that those really thin wings were a mistake. Or, observational astronomy was just a lot of curiosity until Newton came along and made progress in understanding the universe. The practical chemists had discovered a LOT, but by applying quantum mechanics they made HUGE progress.

If we are going to make the huge progress we want in computing, then history suggests that we can't be just pragmatic and that "theory is under-rated". We can't expect that chemistry will do much to help CS, but the obvious tool is math, to turn CS, the science, part into some applied math.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Weblite-Go – A simple webserver written in Go - <AUTHOR> https://github.com/ActuallyFro/Weblite-Go <comment><USER2> For anyone that doesn't know, python has a handy one-liner on the command line.

python -m SimpleHTTPServer

Works like a charm.

<comment><USER3> I have had problems with it streaming medium sized video files. Node's http- server was able to serve it.

<comment><AUTHOR> I shared the link, since it was hosting webm based videos like a champ. I figured Fro wouldn't mind :)

The old solution we had been trying was weblite, and that needs all the user- content data to be manually added to weblite. Now I get to be lazy, cross platform, and have stand alone binaries ;)

</comment></comment></comment><comment><USER4> Any obvious reason why this is significantly different than the built-in http.FileServer?

[https://golang.org/pkg/net/http/#FileServer](https://golang.org/pkg/net/http/#FileServer)

<comment><AUTHOR> It's not. It's extended from that.

However, that code won't deal with other things like changing the port, having a built-in index, or having the server run for a discrete amount of files to serve.

Also, go is no different than Java: [https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver...](https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html). The server just allows it to be stand alone as an application.</comment></comment>


The first hack at TechCrunch Disrupt's hackathon is called TitStare. - <AUTHOR> http://www.aol.co.uk/video/titstare-demo-at-hackathon-sf-2013/517925671/

<comment><USER3> Not only is this offensive and misogynistic _(and that point well covered here already)_ but it also sets a clear marker of the slow decline of hack days/hackathons.

In addition to being disrespectful to women, this kind of "joke" hack is also disrespectful to hacker culture and the people that want to participate in hackatons. Time is wasted presenting this crap which could have been spent showcasing real innovation and real hard work spent producing meaningful hacks and projects.

It pains me to link to Valleywag, but they have a video of both inappropriate demos, and unlike AOL (which owns TechCrunch) are unlikely to remove the videos.

[http://valleywag.gawker.com/techcrunch-disrupt-kicks-off- wit...](http://valleywag.gawker.com/techcrunch-disrupt-kicks-off-with- titstare-app-and-fa-1274394925)

<comment><USER4> IMO this is exactly the kind of event that demonstrates the purpose of Valleywag.

</comment></comment><comment><USER5> Making something called "TitStare" or even starring at breasts aren't the worst kind of sexism. Making something called "TitStare" and then thinking it would be ok AND funny to give a presentation on it in public to an unsuspecting audience at a tech conference, and therefore deciding it was ok to make the women in the audience feel objectified and unwelcome, IS.

This is just such a remarkably ugly and hateful thing to do, it makes me sick.

<comment><USER6> I think it's hilarious. At the same time, they make fun of stereotypical phone applications and people staring at tits. Also, I don't believe it actually exists. They only show a screenshot and the presentation is way too funny.

<comment><USER7> Something can be a parody (and I'm unconvinced parody was their intent) whilst also being offensive, sexist, inappropriate and awful.

</comment></comment></comment><comment><USER8> A few notes from someone who watched this streaming live:

* The headline is wrong (according to my memory, haven't been able to confirm yet); this was roughly the 68th hack (minus no-shows) since they made a joke saying that the next act was #69. The headline text has been tweeted a bunch (and reported by Valleywag :)), though, and probably came from there.

* There was laughter during the presentation and applause afterward. A few hacks earlier was an adult-themed hack called CircleShake ([http://www.aol.co.uk/video/circle-shake-demo-at-hackathon-sf...](http://www.aol.co.uk/video/circle-shake-demo-at-hackathon-sf-2013/517925667/)) which might have set the mood for the audience a bit.

* They had a break a few minutes later and after they came back the announcer mentioned that hack presentations need to meet a certain professional standard and that they wanted to have a better tone going forward.

* TechCrunch has apologized via Twitter ("We apologize for two inappropriate hackathon presentations earlier today. We will more carefully screen from now on.") and on their site ([http://techcrunch.com/2013/09/08/an-apology-from-techcrunch/](http://techcrunch.com/2013/09/08/an-apology-from-techcrunch/))

* Here is a mirror of the video: [https://www.dropbox.com/s/ausf5taq1vy4g04/AOL.co.uk%20-Video...](https://www.dropbox.com/s/ausf5taq1vy4g04/AOL.co.uk%20-Video%20-%20Titstare%20Demo%20at%20Hackathon%20SF%202013.mp4)

<comment><USER9> Pretty sure it was 68. I'm in the audience and presented my back earlier.

Although the hack was ridiculous, I think it's important to keep the facts straight. There was also a pretty awful 'asl' hack pitch later on, given by a woman. It definitely says something about TechCrunch that folks think this behaviour's OK at their event, but it was not their Disrupt keynote as some folks are seemingly interpreting! (It'll still hurt them a lot, though.)

The 9 year old girl (who went later) is far more worthy of the coverage. :-)

</comment></comment><comment><USER10> Ugh. One of the things Twitter's blowing up about is that this occurred after a 9 year old girl presented her hack. I'm one of the 'privileged young white males' people love to talk condescendingly about, and as someone fairly new to the tech scene I had thought all the sexism hand-wringing was a little blown out of proportion, but...really? Blows my mind that there really are people who think this is okay/funny and that the adults in charge didn't serve as an (unfortunately necessary) line of defense against this asshattery.

<comment><USER8> This happened before the 9 year old's presentation.

<comment><USER10> Thanks for the correction, though the fact that it occurred at the same event is really the point.

</comment></comment></comment><comment><USER11> There is a lot of sexism out there for sure, but is this app doing any more than poking fun at men who were caught looking at womens' breasts? Are men out there really going to say that we never sneak a peek at a woman's cleavage? Is that sexist?

I understand that there are a lot of different perspectives though, so maybe some women out there could explain what I'm missing.

<comment><USER12> "Sneaking a peak at women's breasts" is fundamentally different than "presenting an app related to staring at women's tits at a tech conference to an audience of mixed gender and age, with widely varying sensibilities".

Checking out an attractive individual in a non-aggressive manner? Totally fine, carry on. Making as ass of yourself and possibly offending a ton of people? Not fine, GTFO.

This isn't about checking out attractive members of the opposite sex, it's about being potentially offensive in a totally inappropriate setting.

<comment><USER11> I don't see how there's anything fundamentally offensive about it. Maybe immature, but harmless from my point of view.

<comment><USER4> I'm going to throw out a wild theory here: you're not a woman, are you?

<comment><USER11> No, but it's not just men versus women. I know plenty of women that would think it's funny. It seems like the thing here is that it was unprofessional, and some people don't like that. It's a valid opinion, but it's not along gender lines.

</comment></comment></comment></comment></comment><comment><USER13> How is this HN material?

But while we'ere here, can someone explain why the feeling of offence is something beyond the control of an individual, but is instead directly controlled by every other person on the planet?

Is it completely illogical to suggest that someone (or a room full of people) can /choose/ not to be offended, because they fully understand the the idea of freedom of speech?

Why is it always:

Someone said something -> I'm OFFENDED BY THAT. AARRGHH!!

Not:

Someone said something -> I didn't agree/like it -> That's OK.

<comment><USER7> Freedom of speech exists in the public, not private spheres.

In this case, apps such as Titstare being presented at an event (aimed at all ages), such as this, only reinforce the perception that such events are boys clubs for 18-35 year old guys who like staring at tits. Presumably, you want that image to change: isn't it worth imposing restrictions to reduce the amount of "offence" caused to people in order to bring this about?

</comment></comment><comment><USER14> \- Women who wear clothing designed to show cleavage

\- Men who stare at cleavage

Discuss.

Wait, just to make it a little more useful:

\- Men who giggle like children about their project aimed at the above two groups

<comment><USER15> Men that ridicule Men who giggle like children about their project aimed at the above two groups [https://twitter.com/kyledrake/status/376821198488731648](https://twitter.com/kyledrake/status/376821198488731648)

</comment></comment><comment><USER16> Disrupt: Junior High School Edition.

</comment><comment><USER17> Quick, monetize the trend! Someone make a Cowclicker spinoff called 'Teatstare'!

</comment><comment><USER7> They posted a screenshot to Twitter: [https://twitter.com/HateYouCards/status/376735190434840576](https://twitter.com/HateYouCards/status/376735190434840576)

</comment><comment><USER18> Someone is hacking Twitter accounts to defend TitStare:

[https://twitter.com/search?q=%23titstare%20is%20awesome&src=...](https://twitter.com/search?q=%23titstare%20is%20awesome&src=typd&mode=realtime)

"#TitStare is awesome. Stop hating you feminazis (or whiteknights) and take a joke"

</comment><comment><USER19> Clearly a hack called Jackass that you run your presentation through to determine if you're a jackass or not is needed.

</comment><comment><USER14> ...and, video not found 11 minutes later.

</comment><comment><USER20> video seems to be unavailable

</comment><comment><USER21> Gotta love an inclusive environment.

</comment><comment><USER22> Ah, our friendly reminder that we still has a few immature boys who think the tech scene is their private bachelor party.

</comment><comment><USER23> in any case, the guys at Hacker News have now hidden this thread & the other one about TitStare, so we can all pretend the problem's gone away.

</comment><comment><USER24> Is staring at tits sexist, or is it just a result of human evolution that affects us all, regardless of how sensitive we are to gender equality issues?

[https://www.google.com/search?q=hillary+staring+at+christina](https://www.google.com/search?q=hillary+staring+at+christina)

[https://www.google.com/search?q=sophia+loren+staring+at+jayn...](https://www.google.com/search?q=sophia+loren+staring+at+jayne+mansfield)

<comment><USER25> Overused and misused babble science theory.

Humans are emergent species. Even optical illusions, despite being used as evidence of 'hard wiring', have been further studied to be learned and emergent phenomena[1].

[1] EG: The Influence of Culture on Visual Perception, MH Segall, DT Campbell, MJ Herskovits - <USER2>

<comment><USER24> That culture influences visual perception does not seem to preclude other evolutionary or biological influences on visual perception. I don't have the reference you provide, maybe you can tell me if that reference or others you have preclude evolutionary or biological influences on visual perception?

And even agreeing, okay, tit staring is a culturally influenced, a social construction, so what? You still don't describe how that makes it sexist and so should be shamed, especially in light of evidence that it affects both men and women.

Why are natural harmless instinctual reproductive behaviors that the culture associates with males worthy of shame?

</comment></comment></comment><comment><USER26> Zero fucks being given by these guys...</comment>


In Praise of Plain Text - <AUTHOR> https://lucasfcosta.com/2018/08/05/In-Praise-of-Plaintext.html <comment><USER2> >>Try naming one GUI based application that has been around for longer than grep, sed or awk with so few changes. Spoiler: you can't, no matter how small that application is.

A watch dial.</comment>


European regulators: We're not ready for new privacy law - <AUTHOR> https://www.reuters.com/article/us-europe-privacy-analysis/european-regulators-were-not-ready-for-new-privacy-law-idUSKBN1I915X <comment><USER2> Sounds like they don't have the crew to investigate _so many violators_ , not yet at least.</comment>


Former Zoox employees sue, alleging rival offer was better than Amazon's - <AUTHOR> https://www.reuters.com/article/us-zoox-lawsuit-idUSKBN25G2TB <comment><USER2> For all the ire on this site about the likes of Google, Apple, etc. screwing over the small company with their 30% app store fee, why isn't there even more outrage over the founders and startups who screw over their even more deserving-of-help employees?

You know, the employees who get subjected to unregulated dilution, tyrannical bosses, unreasonable hours and unclear compensation for trading off the prime years of their life? The ones who sign papers that look like an official company that has rules and structures, only to find that it's really "whatever the CEO wants to do"?

You would think people would be up in arms about that.

<comment><USER3> Oh gonna need a throwaway for this one.

I had an exit interview where the founder told me their endgame was to destroy the value of the company to buyback the equity they sold to investors. I've never been more insulted in my life.

<comment><USER4> And you're still protecting them even after they admitted to fraud!

This is in response to someone saying we need to look out for each other. Our fellow devs and employees.

Y'all need to stop being so nice. Your founder isn't. You need to stop trying to _play fair_ , your founder isn't. You need to put the people you work with on a higher level than your founder and get over this appeal to authority.

<comment><USER5> Generally if you're doing that, you want to make the first move, and you probably don't want the first move to be exposing yourself to a libel suit.

</comment></comment></comment></comment><comment><USER6> The board of directors has a fiduciary duty to act in the best interest of ALL stock holder EQUALLY.

The case law that established this was the Trados[1] case.

If your company issues a huge bonus to executives for completing a sale of the company, you might have a case against the company. There are lawyers that make a very good living taking cases like this on contingency. I'm sure that's what these employees are doing in this case.

[1][https://corpgov.law.harvard.edu/2013/09/03/delaware-court- of...](https://corpgov.law.harvard.edu/2013/09/03/delaware-court-of-chancery- upholds-trados-transaction-as-entirely-fair/)

</comment><comment><USER7> Isn't it pretty common for early employees to be screwed down the line during IPOs and acquisitions? That's been my experience and that of many colleagues, and has been a topic here on HN over the years, driving the idea that working for a startup is usually not in your interests except for particular cases.

<comment><USER8> I wish YC with all of its power and influence could try to change things for the better here. Early employees' blood, sweat, and tears, not to mention burning the midnight oil, often go into actualizing the founders' vision. Often these key early hires are alongside the founders working equally hard since day 10 or even day 1.

I remember Sam Altman posting lamenting that the most talented engineers are more interested in working for FAANG than startups. If anybody could insist on their portfolio companies' founders writing founding team friendly employment contracts, it's him.

While I'm against wealth taxes on principle, I can certainly understand the motivation for having them. I'm sure founders with fresh $100+M paychecks from acquirers can spare a few $M for those that believed in their vision enough to sacrifice the often-large opportunity cost of working for Google.

One of the reasons Woz is a personal hero of mine (alongside his engineering brilliance) is that he made sure his colleagues who toiled in their garage were treated fairly. When Jobs and Apple's investors didn't spare any would-be lucrative Apple stock for said employees, Woz made sure to "give away" some of his own to them. I'd argue Woz was still compensated quite lavishly after the "damage".

In fact, any YC startup that is currently having trouble hiring engineers might want to look into this. I would be interested in working for one that gave me more than 1% of the pie (alongside the usual "VP of Engineering" title that they always bestow to their first employee, which actually doesn't mean anything at all) as a founding eng.

EDIT: Also kudos to Cruise, which is a YC company, for actually stepping in and offering to make the founding employees whole.

<comment><USER9> There are so many VCs now, and all of them are looking for an edge. There is an obvious edge in building a term-sheet that creates a full ratchet for the employee stock option plan at 10%, where each employee earns points toward the total based on days worked, and 10-year exercise windows.

Then that VC needs to lead rounds and talk constantly about how the employees and companies they fund have the best chance of an equitable exit for all. How if you are not at one of their companies, you will almost definitely be screwed through dilution and bad founder actions.

YC took VC from shareholder focus to founder focus. The next YC will balance employee and founder interests in a way that delivers outsized outcomes the way that YC delivered outsized outcomes for shareholders by understanding that the founders were more important than getting an extra 1% or some other BS term in the deal.

<comment><USER8> I'm just not sure how someone who is not already able to command lead investor-ship through their reputation and added value would be able to sell such a "short deal" to founders. YC can. Maybe they could demonstrate much more effective recruiting.

<comment><USER9> If you picture a cap table having 3 components

1) Investor's Share 2) Founder's Share 3) Employee's Share

Founders try to optimize for their own share, but investors basically destroy the employee share to get founders to agree. I don't believe most founders are sophisticated enough to model employee interests until it is too late.

My belief is that a new structure could be sold to founders by being a thought leader. In a world with tons of money and no edge, I believe its worth it for someone to try.

But... I'm not a VC, and personally believe its the most difficult gig in investing (which investing is the most difficult gig in any job long-term). So, take anything I say with a massive grain of salt.

</comment></comment></comment></comment></comment><comment><USER10> Would it matter? When presented options, they aren't required to choose the best on a given metric. They can choose any, as long as the votes align.

Perhaps the founders believed their product would go further (not die) under Amazon or that they stood to benefit more from stock rewards long term

<comment><USER11> The board has a fiduciary duty to act in the interest of shareholders.

If the shareholders were not part of a vote, ie. the board voted, then the board is potentially liable for damages.

<comment><USER12> That is not true. It is a talking point that is repeated but has no bearing on reality.

<comment><USER13> It is absolutely true that the board has a fiduciary duty to shareholders, and many states have statutes specifically protecting minority shareholder rights. Delaware is fairly unfavorable to minority shareholders though.

<comment><USER14> If you're hired by a Delaware Corp as a California resident holding shares in that company, wouldn't the California rights be the ones the individual suing would have?

Otherwise one state would have a monopoly based on it being business friendl... oh wait, maybe that is the case.

<comment><USER15> In contracts that our lawyers gave us (and that we use) the state whose law will govern the contract is specified. It's always Delaware.

The corporate charter, and the bylaws of the corporation are all explicitly governed by Delaware law. These documents control what powers different share classes have regarding corporate ownership and operation.

TLDR: Delaware law is almost certainly the controlling law regardless of where the shareholder lives.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> employees probably got nothing from the actual sale given they had raised $800M before the acquisition assuming standard liquidation preference terms, so can't really blame them

</comment><comment><USER16> One important factor in deciding which buyer for a startup, especially for the founders, is which company will most likely carry out the vision and mission of the original startup.

For example, if the higher rival offer was from Yahoo/Verizon, then Amazon almost assuredly the right choice.

This sucks for those employees though.

<comment><USER17> That would be fine if only the founders were shareholders but there are also other shareholders.

</comment></comment><comment><USER18> How would they possibly know the terms of either offer as former employees?

<comment><USER19> If they exercised their stock options before they left the company, they receive all details (including executive comp). But they wouldn't know what the other offer was.

Btw this applies to those who are still employees too (if they explicitly bought vested options)

My advice to anyone joining a startup - if you have the negotiating power, insists that you must pre-exercise and purchase all options immediately when you start your job. You must put some money, but if you don't believe in the company, why spent years there. Most companies don't like this and their VC will object. This is why I said "if you feel you have the power to ask that". If you can't do that, exercise as soon as they vest

Edit: to clarify - this isn't same as accelerated vesting. Vesting rules still apply - but you become a shareholder with appropriate rights.

<comment><USER20> It's my understanding that early exercise is mainly only useful for tax purposes. You still won't be a shareholder until at least 1 share vests, which for a new employee, likely won't be for a year. Is that incorrect?

<comment><USER21> Also, you're prepurchashing common shares. These are only worth money if the sell price is over the valuation of the last raised round

<comment><USER22> that's the risk of investing in equity. The employee needs to come to terms with it - there's no situation where this risk can be mitigated (without someone else taking a hit).

</comment></comment></comment></comment></comment><comment><USER23> > including employees who put in years at the company but left before May > 2020. Zoox was founded in 2014.

I mean, I don't want to get into the legal side, or even the ethical side, but on a practical note, former employees with stock should really expect to be at the very bottom of the pecking chain here. If you leave and hold stock, you're coming out in decent shape if you aren't completely screwed over.

Like, Amazon doesn't care about you -- you're not joining the company. The startup doesn't care -- you've already left, there's no need to retain you. Even your former coworkers likely don't give a shit; you're profiting off of work they put in to get over the finish line (to paraphrase their thoughts).

You kind of have to be on the rocket when it reaches orbit, to get the payout. I dunno what they're trying to accomplish other than make a few quick bucks to make them go away.

<comment><USER24> On the practical side breaking the law doesn't always work though. Shareholders are owners, and regardless of how they got their shares (vesting, purchase, gift, poker game) there are rights that go along with that.

<comment><USER23> Sure, the right to get paid out the same as all other common shareholders.

But will the company structure an acquisition so more of the payout is golden handcuffs than equity payout, if it's better for retention? Well, yes.

<comment><USER25> Following this logic, all acquisition should have 0 cash, with what would've been the money for the acquisition going to retention bonuses instead.

This is definitely better for retention, and the share holders that aren't working there anymore? Well they aren't working there anymore so have nothing more to contribute right?</comment></comment></comment></comment>


Burger by mblode - <AUTHOR> https://github.com/mblode/burger

<comment><AUTHOR> Burger is a minimal hamburger menu with fullscreen navigation. It is created by mblode.

It requires jQuery as a dependency.</comment>


ROT13: good version - <AUTHOR> https://qntm.org/files/rot13/rot13.html <comment><USER2> Technically ROT13 can only handle 26 characters. The "good" version would be to deny any inputs outside an accepted character set.

Ok so this doesn't really matter for a joke algorithm like ROT13 but in more serious cases it's important to refuse any inputs that aren't handled and not try ad-hoc fixes to make them "work".

<comment><USER3> Can a cipher invented 2000 years ago have a technical standard ascribed to it?

<comment><USER2> Caesar ciphers? I believe they are well defined, yes. Although ROT13 itself only dates back to maybe the 70's or 80's.

Besides, I was honestly just using this as an excuse to make a more general point. I've grown frustrated with bugs and security issues arising from "fixing" input to work in a domain which was not designed to handle that input.

But as I said, it doesn't really matter with ROT13 because it isn't a serious algorithm.

<comment><USER4> > But as I said, it doesn't really matter with ROT13 because it isn't a > serious algorithm.

Depends on what you use it for. I've seen it used for "spoilers" text when other tricks were not available.

BTW it is funny that Caesar's cypher cannot handle "Latin" characters.

<comment><USER5> Rot13 is not Caesar's cipher. Rot13 is in the family of rotational ciphers, but it's a more modern concept designed around a 26-letter alphabet (so that running it twice produces the plaintext again)

</comment></comment></comment></comment></comment><comment><USER6> øbol comes through as øoby.

Rot13 is not defined for characters outside [a-zA-Z].

<comment><USER7> German "ß" works neither (which could at least be substitued with "ss").

<comment><USER8> Neither does (æ or Æ).

</comment></comment></comment><comment><USER9> ROT26 is 2x as secure.

<comment><AUTHOR> This is a classic entry-level security mistake. You have to pick a work factor _k_ and then do 2^ _k_ iterations of ROT13.

<comment><USER10> k=1 FTW!

</comment></comment></comment><comment><USER11> But emoji is not handled correctly, the cleartext and ciphertext are identical

</comment><comment><USER12> rot8000[1][2][3] is a similar idea.

[1] - [http://rot8000.com](http://rot8000.com)

[2] - [https://news.ycombinator.com/item?id=18495518](https://news.ycombinator.com/item?id=18495518)

[3] - [https://news.ycombinator.com/item?id=6659687](https://news.ycombinator.com/item?id=6659687)</comment>


On Dat - <AUTHOR> https://www.kickscondor.com/on-dat <comment><USER2> > The prolonged obsolescence of distributed protocols like Bitcoin and > torrents means we're maybe skeptical or jaded about any new protocols

Funny choice of examples, personally I would have pointed to bitcoin and bittorrent as two examples of distributed protocols with runaway success

<comment><USER3> Yeah, Bittorrent is actually getting fairly old compared to many other technologies in use today; it's _older than_ Windows XP. :D

<comment><USER4> A newcommer compared to nntp, which arguably is a kind of p2p network!

<comment><USER5> nntp relied on central servers which clients connected to, so not fully decentralized.

That the servers did inter-server replication and forwarding doesn't really change that.

<comment><USER4> But the servers are p2p between them, i.e. they propagate the content to the other servers. If you take down one of them, you can still connect to any other server to get the same data. Keeping in mind this is 1980s technology, it looks pretty close to p2p to me.

</comment></comment></comment></comment></comment><comment><USER6> I tried beaker when it first featured on HN. My website isn't particularly heavy. It completely crashed the client trying to upload it. We're talking < 100mb of data. I believe they're still working on the issue [1].

[1] [https://github.com/beakerbrowser/beaker/issues/952](https://github.com/beakerbrowser/beaker/issues/952)

<comment><USER7> The next major release of Beaker (0.9) is going to have a new version of Dat that improves scaling quite a bit. Mafintosh and his team has done some amazing work using trie indexes for much faster reads across the network. Beaker's also gotten much better at syncing with folders, which was the issue in your link.

<comment><USER6> I believe the issue was with the client, not the protocol :)

</comment></comment></comment><comment><USER8> While we're at it, could someone share their experience with Secure Scuttlebutt vs dat vs ipfs? My interest is to have the simplest thing that could possibly work to make existing static and moderately dynamic sites p2p-publishable. From what little I know, ipfs seems too heavyweight, requires/repurposes git with GPL license, etc. and isn't rooted in HTML/http concepts, while dat/beaker is at least targetting my use case directly. But I'm open to get convinced otherwise.

<comment><USER9> I don't have a lot of experience with these, but I tested each of them a little bit and know mostly how they work.

I believe that for small sites, the main aspect that differs between them is how peer discovery/name resolution is done. For this, IPFS has the most distributed approach (using a DHT and IPNS) but is also the most fragile and highest latency one. DAT has plans to switch to a DHT in the future (hyperswarm) but relies on centralised DNS discovery servers + local network multicast right now. Secure Scuttlebutt takes a more social approach and organises its network in terms of pubs. There is no central discovery, you can only find users that you "meet" in a pub.

This means that DAT has the most website-like feel because their solution provides low latency (only DNS lookup) and is global. I also think that DAT is much more pragmatic compared to IPFS thus at the moment it is much more stable and its us ability is better (also because it has more focus on stable, core components compared to IPFS which is a bigger project trying to do lots of things at once). I like secure scuttlebutt's idea of focusing on communities but that is a different approach to how the web works right now.

<comment><USER10> > Secure Scuttlebutt takes a more social approach and organises its network in > terms of pubs. There is no central discovery, you can only find users that > you "meet" in a pub.

The caveat is: those users can't meet _you_. I used SSB for a few months, joining pubs, commenting, trying to participate. No responses. (Not a huge surprise—you can get lost in the piles of people on Twitter, Reddit, etc.)

However, eventually I discovered that no one could see my contributions unless they added me—and SSB (or Patchwork, in this case) gave me no way of advertising my presence. This was pretty self-defeating. So now I don't have to just build a 'presence' inside the network, I also have to build a 'presence' outside the network to announce that I'm somewhere inside the network. The SSB tools also give you no inkling that this is the case. So just know to bring friends!

<comment><USER11> Yes, they consider this a feature, not a bug, though. Their social network is proudly invite-only, so you need someone to pull you in. Once somebody subscribes to you, your content will be visible to all their subscribers.

</comment></comment></comment></comment><comment><USER12> >IPFS is really cool—but how do I surf it?

If a site has a domain that's set up with a IPFS DNSLink record, then you just go to its domain name and access it over HTTP(S). But if you have the IPFS companion extension, then your browser will access the site through IPFS peers instead of HTTP. So even if the site's webserver is down, you'll still be able to access the site if any other IPFS peers have its content pinned. You could then pin the site's content and help host it.

This all would work through a normal web browser, and gracefully degrades to a plain HTTP connection to a web server for people without the IPFS companion extension.

If you have a domain name and are able to keep your site content available in IPFS (on your own machines you keep up, on a pinning service, on a vps, on some friends' machines who you convince to pin it, etc), then you could have someone else host a ipfs web gateway for your domain scoped to your domain such as Cloudflare ([https://www.cloudflare.com/distributed-web- gateway/](https://www.cloudflare.com/distributed-web-gateway/)). Then you don't need to keep your own web servers up, and the only maintenance you have to do for the ipfs web gateway on your domain is to keep your IPFS DNSLink record correct. Regular users will access your content through Cloudflare (who fetch it from IPFS and then aggressively cache it), and IPFS companion users will access it directly through IPFS.

There's also the concept of IPFS links (like ipfs://QmQB1L5PDwcEcMW6hWcLQrNMTKWY3wxX4aDumnKi385KPN/introduction/usage/), which you can access directly if you have the IPFS companion extension, or you can access through a public ipfs web gateway (like [https://ipfs.io/ipfs/QmQB1L5PDwcEcMW6hWcLQrNMTKWY3wxX4aDumnK...](https://ipfs.io/ipfs/QmQB1L5PDwcEcMW6hWcLQrNMTKWY3wxX4aDumnKi385KPN/introduction/usage/)). But you probably don't want to give links like either of those to your users unless you don't care for domain names. I think the IPFS documentation makes a mistake by emphasizing raw IPFS links so much as opposed to DNSLink records.

<comment><USER13> Too complicated for very little gain.

<comment><USER12> Assuming Cloudflare is being used, then the effort on your side is to run "ipfs add -r directory_of_your_site_content" on a machine that stays up (or a pinning service), and then you copy the hash into a DNS record.

The gain is that you don't manage any webservers, and other users can help host your site content and can keep your site alive after you stop hosting it on ipfs.

I find the concept of being able to make a site that outlives my ability to host it (and hopefully outlives me) as long as people find it worth pinning is super interesting.

</comment></comment></comment><comment><USER14> The thing that always rubbed me the wrong way was how much Dat seems to embrace mutability. That the content behind every URL is mutable is one of the things I dislike the most about the current internet. A lot of the content and data I consume on a daily basis is rarely-changing, so it would be fine to be immutable.

I feel that dragging along all the problems of mutability-by-default that plague the current internet when rebuilding it in a more decentralized way is a big mistake. Yes, I know that there are some fringe efforts to enable more immutability with "hypercore-strong-link" etc., but they look like an afterthought, that won't be supported by most of the Dat ecosystem if it finds major adoption.

<comment><USER15> >A lot of the content and data I consume on a daily basis is rarely-changing, so it would be fine to be immutable

Would you want to see typos corrected, facts checked and other improvements on that content?

<comment><USER16> You could simply make all content versioned, with a full history available. Browsers would probably want to show the "latest" content by default, but they could implement a function to view previous versions or even to highlight changes. Ideally versions would come with Git-style comments so you could read the reason for the change.

This would provide an amazing archive for anyone wanting to see, for example, what was on a "front page" on a certain date. It would also let you see if someone had altered a specific article for whatever reason.

<comment><USER10> This is true of Dat, though. You can jump back to a website's prior history at any time, so long as those chunks are still seeded.

<comment><USER16> So in theory an archive.org type entity could continue seeding old versions of websites, allowing you to go back in time, and it could be verified that it was an older version? If so, that's a good compromise.

<comment><USER10> For sure! And the URLs aren't theoretical - you can view an older version of my own blog by adding '+version' to the end of the URL. Like so: dat://kickscondor.com+1600/.

Each atomic file change creates a new version.

</comment></comment></comment></comment></comment></comment><comment><USER17> On the question about how a search engine would work. The Dat team have thought (and implemented) quite a bit about building performant indexes for distributed file systems. I've wondered if we relaxed the time requirements for search whether there are other processes that we could use that would e more robust. "Who has 10.19.20.13?" seems like it might be a little bit too low level, but what if it was "Who has the most reliable data about the publishing industry between 1500 and 1600?" expiration in 30 minutes with an extension of up to 90 minutes for each preliminary result with more than two nodes responding.

Could it work? What kinds of use cases could it support? How would a bot that had a good model of which forums to post things to do in comparison if it had 2 hours, 24 hours, 1 week? What about if we put _lower_ bounds on the amount of time that had to be spent looking (this seems like a fun challenge for proof of 'real' work).

While this is at a much higher level than the current dat protocol, it is in a sense quite similar to the query "Who has 353904391670d2803b34990e37f4d2e96f49351998e162d0e335b16812daf592e0f71470af7bee31f6a1da03744d03bcde659d73a0ebf56fd4a9fc6ef67edf60 that is 5 bytes long?"

<comment><USER18> > "Who has the most reliable data about the publishing industry between 1500 > and 1600?"

So, to verify I understand: the backend of this would be handled by grad students (working with some kind of 30/90 minute timer alarm), and would experience distributed consistency failures caused by differences in which departmental tradition they did their major area exams?

<comment><USER17> Pretty much. Though for that question you might have to go all the way up to tenured faculty, which could incite a full on Byzantine war over which particular source was more reliable, however I think at that point it is clear that we have lucked out and found two really great sources of information instead of just one and potentially triggered the creation of a third :)

</comment></comment></comment><comment><USER19> I wrote a small essay about Dat for a course on distributed systems: [https://bernsteinbear.com/dat-paper/](https://bernsteinbear.com/dat-paper/)

In it I do some analysis of its strengths and weaknesses.

</comment><comment><USER20> Having to stay on a website 24/7 to get new content sounds not very usable or user-friendly.

<comment><USER21> Great for engagement metrics though.

<comment><USER10> Haha! :) Actually, as long as one peer is connected 24/7, everyone will see everything. Which seems reasonable.

</comment></comment></comment><comment><USER22> Has anyone looked into PJON? I see a lot of work done in the direction of decentralization, but is all at a really high level, shouldnt we re-work the layer 2, 3 and 4 to be compatible with a decentralized structure before thinking about content ids? See [https://github.com/gioblu/PJON](https://github.com/gioblu/PJON)

<comment><USER23> Some of this high level stuff is really important for thinking about stuff like data structures and "asynchronous ux design". These problems don't strictly depend on the exact underlying transport or discovery mechanisms, although there is definitely work to do there as well!

Thanks for sharing this interesting thing I'd never heard of!

<comment><USER22> Ciao macawfish absolutely :) the only issue is: until we don't rework the existing low level standards and we build our own private physical network infrastructure (each user takes care of his own router and provide others with connectivity for free without intermediation of any third-party or service provider) we will not have a truly "decentralized" network.

</comment></comment></comment><comment><USER24> I just tried the Beaker browser and their own main site is currently unaccessible through it.

<comment><USER7> Thanks for mentioning it, I just deployed a fix

</comment></comment><comment><USER25> If you need a custom browser for this to work then why not get rid of the entire HTML+JS+CSS+Wasm+whatever else complexity monstrosity and not build something much simpler based on almost three decades worth of hindsight?

<comment><USER16> It should be possible to build a DAT-capable browser for simple types of content (RST, MD, orgmode, etc); no HTML capability included. If you made it download media content instead of displaying it in-browser, it might even be simple enough to implement this without spending too much time chasing down security issues.

<comment><USER26> One could even go down to a slightly modified Gopher protocol. Just let publishers publish in whatever format they see fit (PDF, docx, html, ...) and let the users configure the viewer in their browsers.

</comment></comment></comment><comment><USER27> Why do we need node?

</comment><comment><USER28> This blog has a really cool page layout

</comment><comment><USER29> Multi-writer not working, and still requiring hacking workarounds?

This bothers me.

P2P Reddit ( [https://notabug.io/](https://notabug.io/) ) has been doing this for over a 1+ year.

All content there updates in realtime too, fully decentralized. (WebRTC or daisy-chained socket relays)

I did not build NAB, but I work on the underlying P2P protocol that powers it ( [https://github.com/amark/gun](https://github.com/amark/gun) ) which competes with DAT - but I've always recommended DAT to people because I thought it already had working multi-writer apps on it.

Paul, isn't this already possible? You've shown me demos!

<comment><USER30> I had a look at [https://notabug.io](https://notabug.io), oh my ... this is a great reminder that full decentralization may not actually be the most desirable thing to pursue.</comment></comment>


Show HN: I tracked every movie I watched for 10 years - <AUTHOR> http://snevsky.com/films/ <comment><USER2> For comparison that's not much compared to professional critics. Many are now on letterboxd with thousands of ratings and reviews per critic. 200-300/year is the usual rate.

A big festival screens 200 movies in two weeks, a programmer will probably see ~400 for this event, half of them plus many get rejected. Plus they go to other festivals to see 30-55. In two weeks.</comment>