Markets are efficient if and only if P = NP - <AUTHOR> http://arxiv.org/abs/1002.2284v2 <comment><USER2> A while ago I studied a paper where the author proposes using high frequency trading to exploit price patterns. If that can be done profitably it would mean markets aren't even weak form efficient! Lately however there have been emerging views that "efficiency" is not black or white but a continuum. i.e The market will only be efficient enough such that the marginal cost of making the market more efficient is equal to the marginal benefit of doing so.

Anyway, I wonder if solutions to NP-complete problems can be approximated using a market.

EDIT: According to the paper, they can.

<comment><USER3> "The market will only be efficient enough such that the marginal cost of making the market more efficient is equal to the marginal benefit of doing so."

Do we have a model of what markets are like under this type of model? It is not clear to me that prices are even close to what efficient ones might be under this situation (though they could be).

Also of course most of the missing markets are the contingent and future ones, which suggests the ways in which things might be biased (forward planning, the firm, the business cycle etc) which are quite important inefficiencies.

<comment><USER2>
      "Do we have a model of what markets are like under this
      type of model? It is not clear to me that prices are even
      close to what efficient ones might be under this situation
      (though they could be)."

I don't know what markets are like under this type of model but here are a two papers recommended by my lecturer on how efficiency is not an either-or proposition.

 _Adaptive Markets and the New World Order_

"Under the AMH, markets are not always efficient, but they are highly competitive and adaptive, and can vary in their degree of efficiency as the economic environment and investor population change over time."

[http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1977721&#...](http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1977721&);

 _Efficient Markets II_ (by Fama who was the one who originally came up with the efficient market hypothesis describing the three forms of market efficiency)

"A weaker and economically more sensible version of the efficiency hypothesis says that prices reflect information to the point where the marginal benefits of acting on information (the profits to be made) do not exceed the marginal costs (Jensen (1978))."

<http://efinance.org.cn/cn/fm/Efficient%20markets%20II.pdf>

      "Also of course most of the missing markets are the
      contingent and future ones, which suggests the ways in
      which things might be biased (forward planning, the firm,
      the business cycle etc) which are quite important
      inefficiencies."

You can often find sets of stock options' prices that you can arbitrage and make a profit, but only if there were no transaction costs. Information will only be taken into account of if the cost of the information (after taking into account all costs including opportunity costs and risk) is less than the benefit from exploiting that information. So, there are probably lots of information from the future that are missing in the market, which if properly exploited will provide a lot of benefit; but the costs of gathering that information is even greater, possibly requiring the use of a time machine.

 _My thinking: It could very well be that markets are only efficient only as far as everything else allows it to be; If investors are not able to evaluate information over more than one business cycle, (due to the cost of doing so, economical or psychological or otherwise), then so be it. The market will move its efficiency to match the environment and its participants._

</comment></comment></comment><comment><USER4> Previous discussions [Aug. 2011]:

\- <http://news.ycombinator.com/item?id=2895474>

\- <http://news.ycombinator.com/item?id=2868498>

</comment><comment><USER5> This is I think a bogus debunking of a bogus theory.

Try 'Debunking Economics' by Steve Keen for a good breakdown of real problems with many economic theories including EMH. Mostly by showing the logical fallacies in assumptions but also the naive maths and divergence from empirical reality.

[http://www.amazon.com/Debunking-Economics-Expanded- Dethroned...](http://www.amazon.com/Debunking-Economics-Expanded-Dethroned- ebook/dp/B006BG8UFY/ref=sr_1_1?s=digital- text&ie=UTF8&qid=1348943992&sr=1-1&keywords=steve+keen)

His blog is <http://www.debtdeflation.com/blogs/>

</comment><comment><USER6> Economics is clear when explaining its foundation: Markets are only as efficient as its participants are rational and fully informed. The entirety of modern economics is built upon the presumption that the last two conditions are 100% true.

<comment><USER7> No, it's based on them being true enough that other approximations are less useful models.

<comment><USER8> Unfortunately, most economists don't develop other models, so the other models are very immature.

</comment></comment></comment><comment><USER9> From the paper:

> Now, one may argue that a weaker form of market efficiency as per Fama > (1991) and Jensen (1978) is that patterns are exploited until the marginal > revenue of further discovery equals the marginal cost of further search. A > counterargument to that would be graduate students and other hobbyists and > day traders searching for an edge: to them, the marginal cost is zero and at > times negative because the value of the search itself, regardless of the > outcome, is a positive learning experience for them...

A hobbyist has to spend more computation time for every additional strategy they search, which costs real money. The hobbyist's cost is near-zero for small searches -- those that can be done by one person using the computers they already own. Once the size of the search increases beyond what they can manage with their immediately available resources, they have to hire assistants and/or buy computation time like anybody else.

</comment><comment><USER10> Is this a serious paper? I can't judge at all if it is, because I cannot find any useful definitions, exact statement of the claimed theorem or proofs.

Then again, I'm not an economist (coming from a mathematics backround), so maybe this is the expected form of a paper here?

<comment><USER11> The original papers proving similar results do prove theorems. This is one example which springs to mind:

[http://dpennock.com/papers/chen-ec-2007-betting-on- permutati...](http://dpennock.com/papers/chen-ec-2007-betting-on- permutations.pdf)

Here is a review of the literature from a while back, it cites plenty of actual math papers:

[http://dpennock.com/papers/pennock-ijcai-workshop-2001-np- ma...](http://dpennock.com/papers/pennock-ijcai-workshop-2001-np-markets.pdf)

</comment></comment><comment><USER12> Of course this doesn't mean markets aren't within some small constant factor of being perfectly efficient.

<comment><AUTHOR> Generally with NP-complete problems - that small constant factor is still often an order of magnitude away from optimal (path finding/search/salesman/shortest subsequence etc).

<comment><USER13> In general, approximation of NP-complete problems is not that simple. Assuming P /= NP,

Subset-sum can be approximated within 1+epsilon for any requested epsilon>0 [a PTAS]

MAX-3SAT can be approximated within 8/7 and not better. Vertex cover can be aproximated within 2 and its not known if that's optimal.

Set cover can be approximated within O(log n) and not better.

Clique and TSP have no sensible approximation.

I would argue that potentially a loss of factor 2 is not an order of magnitude away from optimal. I don't know what is the situation for markets.

</comment></comment></comment><comment><USER14> Does this actually contradict the _weak_ form of the EMH, that "future prices cannot be predicted by analyzing prices from the past"? If it's computationally unfeasible for the market to incorporate new information, surely its then equally computationally unfeasible for some outside observer to predict future prices? I'm not sure this even contradicts the semi-strong form of the EMH, though it clearly does rule out strong EMH.

<comment><AUTHOR> Weak form EMH is so pointless so as to be essentially useless in predictive value.

It's like those horoscopes that state - "you will meet someone of great personal importance soon!"

</comment></comment><comment><USER15> Direct link: <http://arxiv.org/pdf/1002.2284v2> [PDF]

</comment><comment><AUTHOR> A slightly long and/or dodgy video by the professor who wrote this (I'm setting your expectations): <http://www.youtube.com/watch?v=7iOJZZFDKpc>

I found it rather enlightening - but the paper is still highly readable and I encourage HNers to peruse it and perhaps check out the video as well.

Previous discussions:

<http://news.ycombinator.com/item?id=2895474>

<http://news.ycombinator.com/item?id=1144548>

More from the professor: <http://philipmaymin.com/cv.pdf?q=phil/cv.pdf>

</comment><comment><USER16> ... and if P = NP, the market doesn't matter because everyone will have cracked all your bank passwords.

</comment><comment><USER17> I have only had time to skim through this very quickly, but it seems entirely based on false definitions.

He begins so:

 _The efficient market hypothesis claims that all information relevant to future prices is immediately reflected in the current prices of assets. In other words, you cannot consistently make money using publicly available information._

Then, he encodes a 3-SAT problem into market orders and claims:

 _So what should the market do? If it is truly efficient, and there exists some way to execute all of those separate OCO orders in such a way that an overall profit is guaranteed ... then the market,_ by its assumed efficiency, _ought to be able to find a way to do so._

So he defines market efficiency to be all-knowing, and then gives at an NP- hard problem to solve. It seems like he could have given it the halting problem as well, only it might be harder to encode as market orders. But the point is that an efficient market is "all knowing" only that which is "knowable". The market isn't an oracle that can answer any question about the past, but a true machine that can answer all questions about the past that are answerable using the machine.

What he's doing seems similar to saying "if God exists then P=NP". After all, if God is omniscient and omnipotent, He could solve all NP problems in polynomial time. :)

<comment><USER18> I skimmed it quickly too, but I think you've misread. The "interesting" claim isn't the 3-SAT encoding; it's earlier where he claims that markets "naturally" have to solve NP-hard problems, in particular that to optimize an investment strategy you have to solve the Knapsack problem. (?!) It's hand- waving nonsense.

<comment><USER17> It doesn't matter. When people say efficient market, they mean that the market knows whatever is knowable by the present time using current technologies. They don't mean that the market knows everything that's theoretically knowable using unknown/impossible algorithms.

Before there were computers in an efficient market (supposing one exists), the current prices would reflect everything that is known and can be computed/deduced without computers by the present time.

Anyway, the paper misunderstands "known" to mean "anything which can theoretically be known", which obviously includes solutions NP-hard problems. It's just that nobody claims that's what efficient markets are.

<comment><USER19> RE: _When people say efficient market_

The hypothesis is predicated on perfect rationality. <http://en.wikipedia.org/wiki/Perfect_rationality>

vs

<http://en.wikipedia.org/wiki/Bounded_rationality>

</comment></comment></comment></comment><comment><AUTHOR> Honestly - stuff like this reinforces a feeling I have had recently that the social sciences are nothing more than pseudoscience dressed up most of the time.

Economists have essentially no idea what is going on and neither do their financial compatriots and the EMH is by far the clearest example of this.

I'm trying to make it a personal rule that anything outside of the hard sciences (math/physics/chemistry/statistics etc) is bullshit to me until further notice.

I mean really - I do advanced math and statistics in moderately complex systems - AI/robotics - and I can barely wrap my head around them. I shake my head in disgust at those who apply platonic and unrealistic theories to the extremely complex system that is the world. Indeed, the surety they display in their theories amuses me, because to even think that one can reason about the entire world all at once is, in fact, hilarious.

<comment><USER20> This kind of armchair criticism is not particularly enlightening, or productive. You can still make useful and largely correct predictions without understanding all of the dynamics in a system.

After all, all science amounts to an approximate model, even your vaunted "hard sciences".

<comment><AUTHOR> I'm sorry but were you alive during the last couple hundred financial crises?

I mean if your entire field is dedicated to predicting the future of finance and economics and you don't predict them - it kind of shows that you really don't know what you are doing.

All I'm doing is pointing out that the social sciences have no clothes on.

<comment><USER21> right....because the field of math has never changed course (see: Godel), nor physics (see: Newton, Einstein, )...

You're reading too much into the disproportionate effect mistakes in economics have had on society. Science get things wrong all the time...failure is part of the learning process.

<comment><AUTHOR> True but at least the hard sciences modify after being falsified.

The social sciences don't have to because they aren't based on the scientific method - mainly the design and independence of repeatable experiments with controlled variables.

Hard science equations have no room for bullshit whereas the social ones do - hence EMH is still taught.

<comment><USER11> _The social sciences don't have to because they aren't based on the scientific method - mainly the design and independence of repeatable experiments with controlled variables._

The same is true of many physical sciences - geophysics, oceanography, climate science, astronomy, etc. Your criticism applies to basically any scientific theory which has poorly understood microfoundations (i.e., a lot of them).

The EMH is taught because it's a useful approximation to reality, even if it's imperfect. Or, as the article puts it: _Whether markets are efficient or not, and whether P = NP or not, there is no doubt that there will be markets that can allocate resources very close to efficiently and there will be algorithms that can solve problems very close to efficiently._

Incidentally, the EMH claims that financial crises are unpredictable. So the lack of useful predictions of the financial crisis is evidence in favor of the EMH.

[edit: Note, in response to Dn_Ab that 3SAT, the problem considered by the paper, is NP complete.]

<comment><USER22> But he is not, in that quoted statement saying much. For example, if the problem is NP-Hard but not NP-Complete then we will not even be able to tell how well we are doing.

Or for markets, aspects of it may invovle solving NP-Hard problems with efficient approximations that are themselves NP-Hard (you are better placed to opine on whether such a possibility is likely).

</comment></comment></comment></comment></comment></comment></comment><comment><USER23> The ability of some traders to make consistent significant profits should be an "existence proof" of the inefficiency of markets. The EMH is just wrong.

<comment><USER24> Now you just need to point to some traders who are able to make "consistent significant profits".

<comment><USER25> And not just "some" but a proportion of profitable traders greater than what we would expect due to chance - i.e. the existence of some lottery winners does not prove that playing the lottery is in general profitable.

</comment></comment></comment><comment><USER26> Efficient Market Hypothesis isn't very well defined. It's more like a class of assertions, some of which are demonstrably true and some of which are false. Loosely speaking, it says the market price of an asset (or exchange rate between two assets) will be fair, which means that it corresponds to the expected value of its basic value. If you're talking about a bond, you can look at the (known) payment stream, discount the cash flow, and compute a fair value based on known market conditions. For an equity, there is no fair value other than "the expected value of its price in the future". Some stocks pay dividends, but many don't, so their values are based on something other than a current dividend stream, and largely that "something" is: what is the expected value of the thing in the future? The question is: what is the timeframe?

In the very short term, EMH is false for computational reasons. Efficient markets require someone (i.e. an arbitrageur) to keep them efficient. The profits of arbitrage are the incentive for people to keep markets as efficient as possible, and they tend to have this effect. This is an extremely competitive business, and in this day in age, it often comes down to _microseconds_ , but it can be done and billions of dollars are made every day by people who are doing it (and, contrary to popular depictions, arbitrage is actually _good_ for the markets and economy).

In the very-long term, EHM is probably also false. By very-long, I'm talking about 10+ years. The reason for this is rooted in the scarcity of money: there are a lot of projects and companies that will produce and capture economic value in the future, but people don't have enough money to fund them all. Hence, stocks are "cheaper" than they should be, and risky growth stocks (much less illiquid private equity) especially so. ("Equity premium.") There are some people who (demonstrably) "get" value investing and are better at predicting long-term corporate futures than others. The issue here is the long feedback cycle. If your frequency of investments is that low, you have no way of knowing if you're _actually_ good, or just getting lucky, especially in the context of the non-normal (i.e. fat-tailed) distribution of equity returns driven by "black swan" events.

EMH is true enough that if you don't have the technical machinery to trade at microsecond latency, nor the reputation that will allow you to invest for the very long term despite market caprice-- i.e. even if the market tanks, people will trust Warren Buffett's judgment-- you probably can't reliably make a better profit on the stock market than you'd get if you invested in an index fund.

What does EMH rely upon? Ultimately, it says that if there is _expectancy_ to be made selling or buying a security at a price other than P, it will be sold or bought until the price reaches P. This assumes an infinite amount of capital ("smart money") that people are willing to deploy in order to exploit pricing inefficiencies or inconsistencies. This is an obviously false assumption, but for liquid securities of _known_ expected value, it's close enough. Leverage (borrowing) generates a lot of "additional" smart money, so that even a 20bp (0.2%) discrepancy can be levered up into a 10% gain. (If you have $100, borrow $4900, and turn that $5,000 into $5,010, your equity position has gone from $100 to $110.) Microprofit opportunities will be exploited so long as there's sufficient leverage to make them worthwhile, but the willingness of lenders is not infinite.

EMH is usually used to make mathematical analyses work. It's a guideline, but no one who understands financial markets believes it to be literally and universally true. No one can actually predict the future or human behavior, but the (false) assumption that there is no arbitrage produces closed-form numbers that are often very close to the real values.

Also necessary is the distinction between smart and dumb money. The latter isn't a pejorative; "dumb money" means that there are incentives other than informed speculation. For example, when you buy a house because you want to live somewhere, that's dumb money. Or when an index fund buys stocks because of its chartered requirement to do so, that's "dumb money", not because the buyer is an idiot, but because his purchase doesn't convey information about the stock's real value in the way that smart money would. Markets are efficient when there's enough smart money to keep the dumb flow from pushing the price around. This is going to be true of highly liquid stocks, currency rates, and commodities, but not true of assets like real estate. Financial engineers tend to discount "dumb" activity as harmless Brownian motion, but the 2008 subprime mortgage meltdown established that not to be always wise.

<comment><AUTHOR> What happens when the smart money realizes that shorting a massive amount of dumb money would leave them freight trained by the crowds?

Smart money can be dumb as well - because it pays to do so. I'm quite sure that the number of rational investors/capital are greatly outnumbered by the irrational investors/capital such that many correct trades become essentially insolvent before the market becomes rational again. See value shorters for the last two booms.

<comment><USER27> _such that many correct trades become essentially insolvent before the market becomes rational again_

Keynes was quoted as saying "Markets can remain irrational longer than you can remain solvent."</comment></comment></comment>


S3://come-bucket  - <AUTHOR>

does anyone else think it's sort of an odd choice for an example bucket name? s3://come-bucket ??? WTF!
If you have s3cmd installed, read the --help:
--configure     Invoke interactive (re)configuration tool.
Optionally use as '--configure s3://come-bucket' to test access to a specific bucket instead of attempting to list them all. <comment><USER2> It's typo, should read as some-bucket.

<comment><AUTHOR> I checked and it's corrected in the most current version:

[https://github.com/s3tools/s3cmd/blob/master/s3cmd#L2048](https://github.com/s3tools/s3cmd/blob/master/s3cmd#L2048)

The version I have with the typo is 1.5.0-alpha1</comment></comment>


A killer adversary for quicksort (pdf) - <AUTHOR> http://www.cs.dartmouth.edu/~doug/mdmspe.pdf

<comment><AUTHOR> This is by no means new, but it's not terribly well known and I think it's both beautiful and hilarious.

Almost all quicksort implementations take quadratic time in the worst case. They generally do a rather good job of avoiding that worst case, by careful choice of pivots[1]. McIlroy has a very simple technique for making that choice produce bad results in almost all quicksort implementations.

Unfortunately, he has to cheat a bit. His code doesn't construct an array full of evil values. Rather, he has an adaptive comparison function that, in effect, constructs the array of evil _during the sorting process_. (But it always behaves consistently; the elements of the array are, so to speak, undecided until the sorting routine looks at them, but they don't change after they've been looked at.)

[1] For those who don't know, here's the quicksort algorithm: Choose one element of your array (the "pivot"); partition the array into things smaller than the pivot and things larger than the pivot; then, recursively, sort the two parts you just made. This works well, at least when you aren't facing McIlroy's evil adversary, because (1) you can do the partitioning operation very efficiently and (2) if you're not very unlucky with your choice of pivot you usually succeed in dividing the array into two parts of roughly equal size. But if the pivot is, say, always the smallest element of your array, you'll get terrible results.

</comment><comment><USER2> If you randomize the values, the expected running time of your algorithm will be O(nlogn). Worst case is still O(n^2). Additionally, the adversarial argument presented is voided because it relies on deterministically placed elements, which allows the adversary to actually choose them on the fly.

In general, a randomized algorithm is better than its deterministic counterpart.

Citation: I'm a 15-451 (Algorithm Design and Analysis) TA at Carnegie Mellon and I just gave this lecture in recitation.

<comment><AUTHOR> > it relies on deterministically placed elements

Did you read the paper? If you provide McIlroy's adversarial comparison function to a (no matter how genuinely) randomized quicksort algorithm, then typically it will provoke quadratic-time behaviour, and the final state of the array will be such that passing it into the quicksort function _would have_ produced that same quadratic-time behaviour, given the same random choices.

(See the paragraph beginning "The adversarial method works for almost any polymorphic program recognizable as quicksort".)

What the adversary can't do, of course, is to produce an array that on a subsequent run, with different random choices, will again provoke bad behaviour. The average case of quicksort _is_ O(n log n), and nothing McIlroy's adversary can do will change that.

<comment><USER2> "An adversary can make such a quicksort go quadratic by arranging for the pivot to compare low against almost all items not seen during pivot selection, so the partition will be lopsided. Those items may be regarded as a "gas" of values whose relationship to each other is unknown. The exact values don't matter as long as they are not compared against each other. Quadratic behavior is guaranteed since n − O(1) gas values must survive pivot selection among n items. Almost all partition high."

This paragraph from the paper is a false statement when applied to randomized quicksort. The adversary cannot "arrange for the pivot to compare low against all items not seen during pivot selection," if quicksort was randomized namely because the adversary has no information about the other elements. In deterministic quicksort he does. Thus, this is where his argument breaks down in relation to randomized quicksort.

I think he focused on deterministic and just tacked on the statement about randomized without thinking about it. Its a very subtle error to make when using the adversarial method against a randomized algorithm and because his analysis deals with deterministic quicksort I doubt he put much thought into the randomized case.

<comment><AUTHOR> > This paragraph from the paper is a false statement when applied to > randomized quicksort.

Looks OK to me subject to the criteria McIlroy gives for the success of his method. (You did read the whole paper, not just that paragraph, right?) His adversary effectively incorporates a heuristic for telling when the pivot is being selected!

See <http://pastebin.com/5B5qffJt> for a simple demonstration of McIlroy's adversary in action against a randomized quicksort implementation. If you run the code there, you'll find that the "good" case (without the McIlroy adversary) typically takes about 1.5 n log n comparisons, and the "evil" case (with the McIlroy adversary) typically takes about 0.5 n^2 comparisons.

<comment><USER2> The issue isn't with the code. What I'm saying is that the code you produced is effectively a counterargument to deterministic quicksort and doesn't apply in the random case. What McIlroy is doing is selecting an element on the fly during the algorithm. If quicksort was randomized, he would not be able to do so. Thus his argument breaks down there.

If you are constructing a "worst case" for randomized quicksort, the answer is still obviously O(n^2), but the purpose of randomized quicksort is that it is O(nlogn) EXPECTED running time. Thus, by constructing a worst case input, you really haven't broken randomized quicksort at all. In fact, you're doing exactly what its intended to do: perform badly sometimes, perform well other times, and in the expected case, perform O(nlogn).

I read the entire paper, and I'm, of course, no expert, but I've ran my argument past a professor in algorithms (who is a Turing award winner), and he also believes that McIlroy's argument does not work for the randomized case.

His heuristic cannot be legitimately applied in the randomized case because the adversary simply is not allowed to choose elements in the randomized case. That, of course, is the purpose of randomization. Thus, it doesn't matter what his code or heuristic shows. His argument has a logical fallacy and thus is illegitimate (only when applied to the randomized case of course).

<comment><AUTHOR> I think we're at cross purposes here.

1\. McIlroy _does not claim_ to have an algorithm that generates (ahead of time) arrays that make a randomized quicksort take quadratic time. (Of course not; there's no such thing, and he knows that every bit as well as you or I.)

2\. McIlroy _does claim_ to have an algorithm that you can feed into a randomized quicksort with the result that it takes quadratic time -- generating the array as it goes -- provided the quicksort implementation satisfies the conditions he lists.

3\. The statement you quoted from McIlroy's paper is not false. It just isn't saying what you think it's saying. When McIlroy says "an adversary" he means something like the comparator function he describes, _not_ something that looks at the quicksort algorithm (minus whatever information is needed to determine the state of any random number generators it uses) and generates difficult data for it to handle. For the latter, the theorem you're talking about applies. For the former, it doesn't. He's not claiming to have a counterexample to the famous theorem, he's claiming to have a way of making almost any quicksort implementation (randomized or not) misbehave if you're allowed a comparison function that makes decisions on the fly. Which, in fact, he does.

The reason I posted the code was simply to demonstrate that when McIlroy says "an adversary can do X", he's telling the truth (with the notion of "adversary" he's using) and has in fact provided an adversary that _does_ do X.

<comment><USER2> 1\. I don't think you understand my point (or possibly the adversarial method).

2\. Unless you generate an array ahead of time, you haven't broken randomized quicksort.

3\. For an adversary to have the ability to generate elements on the fly, he must have knowledge of the array, which requires the array to be generated deterministically.

4\. The purpose of a randomized algorithm is to prevent the adversary from choosing elements on the fly and forcing the worst case every time.

Putting these all together, for McIlroy's adversary to have broken randomized quicksort would be claiming that randomization is useless. We all know this is false.

<comment><USER3> Stop thinking about arrays. Think ordered relations. Think collections and comparators. The sort is vulnerable to an attack at the highest abstraction level, where only necessary conditions are used. The usual implementation, using arrays of integers, is not similarly vulnerable.

I'm not a fan of randomized algorithms, incidentally. It's selling your best case upriver to ward off offensive poisoning, and adds a multiplier to running time. Still, if you're offline, memory-restricted, timesharing and public- facing, I guess randomized quicksort's better than most alternatives. I'd still be looking at median-of-medians, but that's a fair bit of extra work (so much so that it isn't really even quicksort anymore).

<comment><USER2> ... Why does nobody understand how the adversarial method works? What I'm basically saying is that the usage of the comparator to create elements on the fly IS NOT LEGAL if you are trying to break randomized quicksort because this requires the adversary to have PRIOR KNOWLEDGE of the elements. He doesn't if its randomized.

<comment><USER3> First of all, we're not trying to break a proof of anything. There's a demonstrated attack on comparator-based sorts. Whether you want to allow the scenario doesn't much change the fact that that scenario is vulnerable.

Second, this method does not require prior knowledge of the elements. In fact, it disallows a large amount of information (the ordering). What prior knowledge are you claiming the adversary doesn't have but requires? He provides the set, so he has full knowledge of the members of the set (though the sorter doesn't, so this is useless knowledge). It's an unordered set with a full ordering relation, so a random permutation on initial indices will have no effect. He is the comparator, and thus has full knowledge of that as well. There is nothing else to know.

Now, you might object to the fact that the comparator is not a deterministic automaton, which is the assumption exploited, and I wish you good luck in enforcing that in your sorting routines.

<comment><USER2> Sigh. I give up. I'll just suggest you open up a copy of clrs and read the section on randomized quick sort. There is a section dealing with this killer adversary exactly and why this adversary does not kill randomized quick sort.

Your logic is failing because your thinking of this from a programmers perspective when, in reality this is an algorithm analysis problem which is theory.

<comment><USER3> I don't have that book, so you'll have to explain the reasoning if you want to convince me. I did find the MIT OCW lecture transcript on randomized quicksort, based on the book, and it described how randomization probably defeats an adversary supplying a worst-case initial permutation when the pivoting algorithm is known. That's a different adversary to the one we are discussing, even if relaxed; it has to supply an input that is consistent _and_ fixed. They also motivated the scenario in terms of competition, which I find less reasonable than actual malevolence, but that bears little relevance now.

When theory and practise diverge, there is strong reason to hold the practise as more defensible than the theory. How would you say the practice should be amended to not suffer from this problem that is apparently not extant in theory? I hold that it cannot, for this adversary is more capable than the other.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER4> This needs to be presented at Fun With Algorithms [1]. Also somewhat related is the bogosort algorithm [2] which was designed to be awfully slow (average case performance O(n * n!)).

[1] <http://fun2010.dia.unisa.it/>

[2] <http://www.tcs.ifi.lmu.de/~gruberh/data/fun07-final.pdf> (pdf)

</comment><comment><USER5> Randomized Quicksort?

<comment><AUTHOR> In typical cases the "killer adversary" will still be able to make a good guess at when the pivot is being found, and drive the quicksort routine into bad behaviour, even when the pivot selection is randomized. (Of course that means that the resulting array will typically not produce bad behaviour if it's sorted with the RNG in a different initial state, whereas for nonrandomized quicksorts the adversary produces an array that will reliably provoke quadratic-time behaviour.)</comment></comment>


F You Can't Find Dark Matter, Look First for a Dark Force - <AUTHOR> http://cosmos.nautil.us/short/138/if-you-cant-find-dark-matter-look-first-for-a-dark-force <comment><USER2> Typo in submission title: F → If</comment>


The Seven-Year Auto Loan: America's Middle Class Can't Afford Its Cars - <AUTHOR> https://www.wsj.com/articles/the-seven-year-auto-loan-americas-middle-class-cant-afford-their-cars-11569941215?mod=rsswn <comment><USER2> America's middle class isn't opting for home mortgages either - it has to do with not just affordability but with not wanting to be tied into long-term contracts in an increasingly unstable and dynamic economy. Main Street Revival is also banking on this trend for homes, as customers increasingly just rent. Here's a good read on the trend: [https://fortune.com/longform/single-family- home-ai-algorithm...](https://fortune.com/longform/single-family-home-ai- algorithms/)

</comment><comment><USER3> If Americans are really signing seven-year loans for cars, something is very, very wrong. It seems to me that we need to do more to help people get their credit score high enough where they won't have to sign such financially disastrous loans. Help is available via free credit counselling.

<comment><USER4> Getting your credit score higher doesn't reduce vehicle prices or increase wages, which is what is required to have shorter term loans. A combination of high vehicle prices and low wages is what creates the need for longer term loans to get the monthly payment down.

</comment></comment><comment><USER5> [https://www.fullwsj.com/articles/the-seven-year-auto-loan- am...](https://www.fullwsj.com/articles/the-seven-year-auto-loan-americas- middle-class-cant-afford-their-cars-11569941215?mod=rsswn)</comment>


U.S. Cities Relying on Precog Software to Predict Murder - <AUTHOR> http://www.wired.com/threatlevel/2013/01/precog-software-predicts-crime/ <comment><USER2> A quick blood test, and lead level could be added in. There is an ethical complexity that may be on our doorsteps. [http://m.guardian.co.uk/commentisfree/2013/jan/07/violent- cr...](http://m.guardian.co.uk/commentisfree/2013/jan/07/violent-crime-lead- poisoning-british-export)</comment>


Show HN: hnCommentWatcher (useful?) - <AUTHOR> http://christopherdebeer.github.com/hnCommentWatcher/ <comment><AUTHOR> I'm one of those many people that enjoy/procrastinate-by reading Hacker News. So in a helpless attempt to be productive/efficient I've created hnCommentWatcher. Yet another HN bookmarklet. Currently I swear by @mrspeaker's Hackemup bookmarklet [1], it really is brilliant, but its only for the front page, and I still find it painful to follow the comment threads for each individual post (which I believe is where I get the most use (see: intellectual stimulation) out of Hacker News). So this is my solution.

What it does:

hnCommentWatcher is a bookmarklet that you use on individual posts/threads, which then refreshes the page every so often and indicates which comments are new, and allows you to easily navigate between them, meaning you can open a thread read the comments then come back later and follow the discussion without having to decipher which comments are new and which you've already read.

Other features include, highlighting the original poster of the thread (OP), as well as assigning each user a colour swatch so it's easier to differentiate between them and identify when/where a particular user has contributed.

<comment><USER2> looks nice, thanks</comment></comment>


Show HN: Superset of Lisp and Lua Programming Language, a la JSX - <AUTHOR> https://github.com/meric/l2l <comment><USER2> This looks interesting... one of my pet peeves is writing imperative code in functional languages like Lisp or OCaml. For example, hand-written lexers and parsers are heavily stateful and don't really benefit from the functional style, even though they are pure functions from the outside.

It just feels and reads a lot worse than doing it in say Python. So you could make a program clearer by writing the functional parts in one syntax and the imperative parts in another syntax.

<comment><USER3> Have you ever used parser combinators? They're the absolute best way of parsing anything that I've ever tried. Parsing anything in Python definitely is much worse.

Also, I'd like second the other posters suggestion that most Lisps have many ways of writing imperative code and that it really is no different than your average C-like in that respect.

<comment><USER2> I'll take another look at parser combinators. I keep hearing people talking about them, but I had never seen them used for anything big. Now that I check again, I see that the ShellCheck lexer/parser in Haskell is written with Parsec, and it seems to do a pretty good job, and has good places to insert error messages and so forth.

Do you have any other examples of a production quality parser done with parser combinators?

The Lisp parser I was thinking about was Julia, which is bootstrapped in femtolisp. It looks like straight imperative code in Lisp to me.

I'm mainly concerned large parsers, like bash, Julia, Ruby, or C. You can write a small parser with any technology. FWIW I have a lot of posts about parsing here, towards the beginning of the blog: [http://www.oilshell.org/blog/](http://www.oilshell.org/blog/)

EDIT: What's the benefit of parser combinators over recursive descent in Python or say Java? Is it just that it's point-free so you don't have to explicitly pass the input around?

I suppose if I saw the same parser written in parser combinators and recursive descent it would be easy to tell what the benefit is, if any.

<comment><AUTHOR> Well I use a parser combinator to build the Lua parser here.

[https://github.com/meric/l2l/blob/master/l2l/lua.lua#L429](https://github.com/meric/l2l/blob/master/l2l/lua.lua#L429)

The parser generated is recursive descent.

</comment></comment></comment></comment><comment><USER4> Woah could you run this over Love 2D? Could also be fun with [https://github.com/nikki93/cgame](https://github.com/nikki93/cgame) (game live coding + live editing environment).

<comment><AUTHOR> That looks great I will give it a go sometime!

</comment></comment><comment><USER5> Cool looking project!

This will sound like a nit-pick, but I don't intend any real criticism here: the syntax does not look good to me. I have lots of Common Lisp and Scheme experience, and also a few years of using Clojure. It is easy for me to switch between reading and writing code in those three languages, but I would need a while to get used to this language's syntax.

<comment><AUTHOR> Thanks :-)

What are the syntax features most jarring to you? I suspect it's the ones that's been ported from Lua but I'm not sure.

<comment><USER6> for me it was the quoting/unquoting. i'd rather see something like {} to introduce a block of lua code and #{} to introduce lisp code within the lua block.

</comment></comment></comment><comment><USER7> I don't understand this clojurism of not making let-expression bindings adhere to the "parenthesise everything" of regular lisps. Why make let special? Why have a parser exception for some things?

It is just a cosmetic thing,but it bormthers my otherwise so paren-friendly eyes.

<comment><USER8> I dislike it, too, but if tweaks like that help a new generation get into Lisp, then _shrug_. And the parens in the original LET form really are a bit much.

In my own Lisp you go like

        (let a 42)
        (let b (+ a 1))
        (blorgle a b)

<comment><USER9> That looks more like (define) than (let). When do the bindings fall back out of scope, if not when the let-form ends? And can you do multiple bindings?

<comment><USER8> Yes, it's pretty much like Scheme define but with pattern matching (and correspondingly without the (define (do-it) ...) shorthand; you say (to (do- it) ...) instead).

They go out of scope at the end of a scope block, as usual; but conditionals introduce subscopes for the different branches. There's a (hide ...) macro I use occasionally.

To bind multiple things at once, there's the pattern matching, e.g.

        (let `(,x ,y) point)

(Not sure if that's what you're asking about.)

It's always bugged me in Scheme how binding forms are repeated, one type like DEFINE and another like LET, and DEFINE behaving not quite the same at top level vs. internally.

(Added: Another little nit that to me grew over the years is that Scheme is just kind of verbose. You don't want to see shorter, clearer code in Python.)

</comment></comment></comment></comment><comment><USER10> Why?

<comment><AUTHOR> I couldn't help it.

Take a look at map/filter/reduce loop collapsing, and function inlining using AST analysis. It makes the code go really fast in LuaJIT. [https://github.com/meric/l2l/#zero-cost](https://github.com/meric/l2l/#zero- cost)

That kind of abstraction can be written as an extension module and imported as easily in the language as if it were another Lua module.

<comment><USER10> Cool! I'm not literate in Lua so the context-switching is rough on my eyes, but I think it's a neat synthesis none the less!

<comment><AUTHOR> Hmm, that's an interesting concern....and thanks for taking a look. :-)</comment></comment></comment></comment>


Wanted: A Competitor to craigslist - <AUTHOR> http://www.pehub.com/47933/wanted-a-competitor-to-craigslist/

<comment><USER2> Renthop inexplicably seems to think I want to move to New York. I presume this is just while they're testing, but still.

I'm surprised the article doesn't mention kijiji.com, which is very CL-like in terms of categories, has national reach, and is enjoying some traffic.

I personally don't like it because of the overly-colorful graphic design and the fact that it hasn't built a network effect yet (so CL is still better in terms of selection) but it does seem better in terms of searching and preventing spam.

However, Kijiji suffers from some major flaws...no dating categories (duh!), no way for users to flag, and they want to be the intermediary for all communications.

What's WRONG with CL? It's hideously ugly, the search function is a joke, and they exert little or no spam control (to the point that I can no longer stand looking for computer parts there). And yet...most people don't seem to care that much. Fast loading, heavy traffic, and guaranteed first-option in most US local jurisdictions seem to outweigh the negatives.</comment>


The IT worker bucket list: If THIS happened at work, I'd die happy - <AUTHOR> https://insights.hpe.com/articles/the-it-worker-bucket-list-40-things-tech-pros-wish-for-1705.html <comment><USER2> If I got $10,000,000 and quit, I'd die happy.</comment>


Ask HN: What type of application would make your life easier? - <AUTHOR> <comment><AUTHOR> I'm not sure if this exists or not, but I would like to find a solid community centered around RC/Robots/Drone/DIY/Maker type of work. Something that would allow me to show off my own work or even contribute to other projects, all while keeping some sort of "score".

<comment><USER2> you should check out [https://hackaday.io/](https://hackaday.io/)

<comment><AUTHOR> Thank you!</comment></comment></comment>


The Same User Interface Mistakes Over and Over - <AUTHOR> http://prog21.dadgum.com/214.html <comment><USER2> >>It's also not clear that the model of background apps requesting the user's attention works. How many iPhones have you seen with a red circle containing "23" on the home screen, indicating that 23 apps need updating...and it's been there for months?

I would argue this is working as intended. The advantage of background notification rather than modal is that the user gets a choice. The user could very well decide that your EXTRA SUPER URGENT notification is, in fact, unimportant, and this right here is a perfect example.

No, I don't care if your bullshit app that I've opened a grand total of twice needs a 200 MB update. If anything, there should be an option to force old notification circles to go away after two weeks or so except for legitimately important apps like email and messaging.

<comment><USER3> Agree. I avoid updating apps that are working satisfactorily because many later add ads or other annoying functions.

<comment><USER4> Or remove functions, or change the UI needlessly and for the worse. I honestly don't know how people can update their apps without having a backup to go back to. I probably would not do it if I didn't have one of my backups around. The different app stores should offer the user a way of going back to a previous version (if you already had it installed) but it seems that none of them do so...

<comment><USER5> Apple's "app thinning" feature _implementation_ in iOS 9 makes it all the more difficult to "save a version of an app" because iTunes no longer syncs apps into the computer, like it used to before. Any app downloaded on to the device directly from the app store is a device specific thinned version. If you replace the device with a new one, you would have to just get all the latest versions of the apps from the app store. The only inconvenient solution, in my knowledge, is to always purchase and download apps and even update apps from iTunes on a computer. This would make iTunes download a "universal" (for lack of a better term) app file that would run on all compatible devices. Then sync the apps from iTunes to the devices. You lose the advantage of app thinning and use more storage (like in iOS 8 and previous versions), but you would have access to the specific version that you have used and want to keep using.

I emphasized the word "implementation" above because it was not necessary for Apple to disable iTunes from syncing apps on to a computer with the thinned apps. Technically, there are many ways to store device specific copies of an app with the same name on the computer, which for some reason Apple has not even considered. [Apple never allowed downgrading of apps without resorting to iTunes, but that's a different and larger topic]

Overall, the push to use the latest version of any app is really frustrating and will result in more backlash as people realize how much freedom they're losing.

</comment></comment></comment></comment><comment><USER6> If you decide to study how to build bridges, you will start out with calculus, build a background in science of materials and then a guided tour of approaches to structure-building. In addition, you have to learn typical environmental factors. And, of course, there are workflow patterns and human factors involved in actually constructing a typical bridge. Oh, and sure, there will be a bit of CAD.

Let's apply this metaphor to programmers working on UIs: a huge chunk of practitioners right now get by via simply having learned a bit of CAD (i.e. HTML/CSS/JS). And also, yeah, they have walked over a bridge once/seen a panoramic postcard, so there's that. Very ad-hoc, very disorganized, full of gaps.

Of course the impact of mistakes is magnitudes different between designing bridges and building UIs. Except for when that UI drives medical automation. Or finance (one of my faves is an anecdote about how a bad input form field cost a fund management company literally in the 8 digits of money).

Our industry is of course very young, and so I think this education gap is simply a temporary issue. I am looking forward to (and am personally investing into) a day when there will be a more systematic and comprehensive education on how what a good UI looks, behaves and feels like, not just how to code buttons and boxes on a screen.

<comment><USER7> Meh. If you read _The Design of Everyday Things_ and then look around, you see so many faults with the UI of physical things, even some which have been around for more than a century.

A good example is packaging: "The Consumer Product Safety Commission estimated that attempts to open packaging caused about 6,500 emergency room visits in the U.S. in 2004."

<comment><USER8> I highly recommend _The Design of Everyday Things_ to everyone I know who is designing any kind of user interface, whether machinery, houses, or software.

I believe that until there is some effective, easy, and universally-accepted metric of UI quality, there will be little to differentiate good designers from poor. ("Our UI meets UIQC Class 1 Standards", or in a specification, "All user screens must score level 96 or better on the UIQC test", or some such thing.)

<comment><USER9> There is the multi-part ISO-9241 that covers the ergonomics of human-computer interaction. It even provides a definition of usability.

</comment></comment></comment></comment><comment><USER10> Request to all designers - please stop building nested scroll and drag interactions. Common pet peeve for me recently is embedded map widgets in web pages. A user scrolling the page will find at some point that their mouse has come over a map which is now eating the scroll events and they are now scrolling the map instead. Only choice at that point is to move the mouse over and start scrolling over. Bonus annoyance - In many cases it is non trivial to reset the map to its default setting before the unwanted scroll interacted with it. Hovering over an item is a very weak commitment from the user that they want to interact with the element. Please do not use the hover to infer that the user means to interact with the element, at the very least put in some kind of timer and enable the interaction only on sustained hovers.

<comment><USER11> "A user scrolling the page will find at some point that their mouse has come over a map which is now eating the scroll events and they are now scrolling the map instead."

This annoyance has been widely extant for ten years or more - I think I first experienced it with google maps as I believe they were the first to zoom with scroll ...

Seems easy to fix - sub window elements in the browser cannot zoom until clicked on ?

It's amazing that behavior made it through one browser version iteration.

<comment><USER12> As long as you also track "going out of focus" , to disable the scroll capturing again.

</comment></comment></comment><comment><USER11> Can we talk about search dialogs that are not actually dialog boxes ?

I first saw it at netflix - instead of a search box in the upper right, there is a picture of the _word_ search and if you click on that picture of the word search it becomes a textbox[1] that you can type into.

As if that's not bad enough, the word "search" can turn into a textbox faster than it takes to fully load the control, which means you get the textbox but _cannot type into it_ for another few moments.

How much of an unimaginable asshole do you have to be to pervert a basic web UI component like this ?

[1] No, of course not a real textbox - some 50 kilobyte control from some web- authoring toolkit that masquerades as a textbox.

<comment><USER13> That's what Netflix got from using Reactjs. Facebook people search on mobile page version uses React too. It worked very well as a traditional AJAX search. Then they changed to to use React and now it takes a second or two to initialize and load the page (even it is in cache). And the search textbox doesn't feel like a native textbox, it's very laggy and shows inputs way too many milliseconds later. And on top of this the search result adds another delay. So searching for "Joe doe" means a laggy delay for every character as you try to type it in. Why? It tries to guess the person after every keyboard change event. Something that worked fine with the original AJAX version (Facebook optimized that version a lot an blogged about it / wrote a paper). Sadly with the React rewrite the forgot to read their own blog and probably React is an overkill for such a type of page and consumes to much CPU cycles on mobile devices. If you have to refresh 90% of the search results page anyway, why use React? Building and diffing a VirtualDOM isn't cheap (and ShadowDOM isn't supported), and it would be a lot faster to simply overwrite the DIV with innerHTML and traditional vanilla Javascript AJAX. Use the right tool, don't use a hammer for everything.

<comment><USER14> > _That 's what Netflix got from using Reactjs._

...for using Reactjs badly. IFTFW.

First, they could have had the item as a search box from the start, no need to make a label that when clicked turns into a search box.

>* If you have to refresh 90% of the search results page anyway, why use React? Building and diffing a VirtualDOM isn't cheap*

Actually it can be as cheap as directly changing the DOM with JS. And diffing can be just a single op e.g. when using an immutable data structure for their always changing part of the data.

It's just a change done crudely, not even non-optimized, because it doesn't need that much optimization anyway.

</comment></comment></comment><comment><USER15> The review of the QuickTime 4.0 player [1] at the User Interface Hall of Shame [2] should be required reading for user interface designers. Apple can't even follow their own guidelines, and keeps making the same mistakes (and worse), even today.

[1] [http://hallofshame.gp.co.at/qtime.htm](http://hallofshame.gp.co.at/qtime.htm)

[2] [http://hallofshame.gp.co.at/index.php?mode=original](http://hallofshame.gp.co.at/index.php?mode=original)

<comment><USER16> Thanks. A real trip into history. (I was about to say "memory lane" but I think most of these predate the point where I stared using computers a lot.)

</comment></comment><comment><USER17> I always thought "Don't make me think" was a bit of a UI reference that everyone should read.

<comment><USER18> I got a lot of grief from fellow software developers at Progeny (RIP Ian) for having that book lying around.

<comment><USER19> May I ask why? Is there anything wrong with that book from a developer's point of view?

<comment><USER20> It makes them think.

<comment><USER21> Well, __somebody 's __got to do the thinking...

</comment></comment></comment></comment></comment><comment><USER22> This really grinds my gears: I was just on pluralsight but seems like 90% of websites have this problem where existing members are treated as 2nd class citizens. I executed a search for "UX" and found a class I waned to see. After clicking int it I was given 2 options "sign up" and "cancel". So as an existing paid customer my only options are "login" on upper right which then puts me on main member screen so I can perform that search again. or go through login process, and then hit the back button exact # of times to put me back a that search results page. Then if they didn't fuck that up i'd be able to go to that course and see it. And believe me, some websites manage to fuck that up too. Other versions of this UX antipattern is where you try to get to the content and 99% of the screen is about signing up while 1% is the tiny "sign in" hyperlink. It causes much anxiety to actually locate it.

<comment><USER22> close cousin to this problem is lack of clear login area. Take Evernote for example, home screen has all of it's homepage taken with big photo, plan explanations, sign up form. But for existing users ? there's a tiny hamburger icon up top which you have to click to reveal the "sign in" link which will then finally give you the login form. This is so frustrating my only possible understanding is "f existing users since we already have their money"

</comment></comment><comment><USER23> Focus-stealing annoys me the most. Applications should never steal focus & should always open in the background.

</comment><comment><USER24> Mobile offered a bit hope. First, the screens were to small to clutter with complicated GUIs. Second, you could substitute some visual controls with touch.

<comment><USER25> I recently tried to get my mobile provider to set up data roaming while I was away from home. (You can't set up data roaming from home, for reasons that remain mysterious and unexplained.)

The fact I was using a mobile device didn't stop my provider's site from asking three times if I wanted to take part in a survey, or from displaying a floating "Would you like to chat?" dialog that was so big it literally covered a quarter of the mobile screen - and which moved to the same position whenever I try to scroll it out of the way.

It also didn't help my provider provide the right links to the right content.

Eventually I gave up. My gf already had data working, so we used her phone for everything.

The experience was impressively terrible.

Unfortunately if you don't have UI clue, mobile is just another way to get stuff wrong.

<comment><USER26> Try using an iphone (or spoofing your user agent as one). Often they don't test or care about any other phones, but iphone users get the VIP treatment.

</comment></comment></comment><comment><USER27> Looking back through time for all the horrible UI sins cataloged in the opening paragraph, I'm pretty sure all of those were much more common in the past than they are now. Somehow, we actually have made those pieces of progress.

Except for cryptic icons, those seem on the rise again.

</comment><comment><USER28> I tend to think that making a good UI is like writing a good technical document or good presentation slides. We should think UI as a kind of natural language. There could be some subjective guidelines, but I don't think there will ever be a definitive standard.

</comment><comment><USER29> Does anyone have enough experience with Tk and REBOL why these should be exemplar as far as UI and layout is concerned?

<comment><USER15> I implemented a gui for SimCity in Tk, and at the time (~1993) it was the best user interface toolkit for X11 available, but only because the competition was Motif and its ilk. The reason it was relatively good in that context is that it had a built-in scripting language: TCL. (So did WINTERP, but that was XLisp + Motif, so Motif made it suck a hell of a lot more than XLisp made it win.)

As a scripting language, TCL is terribly designed (but beautifully implemented). But all that mattered at the time was that there was a scripting language that was present at the time the GUI tooklit, Tk, was designed (so they did not overlap and squabble about what they were trying to do) -- not that the scripting language itself was any good. (Personally, I'd MUCH rather be programming GUIs in PostScript than TCL, which is what I did before, for the previous port of SimCity to NeWS.)

The fact that TCL was an integral part of the design of Tk from day 1 made it possible to use the scripting language for what it was good for, instead of Tk trying to do that in a half-assed non-turing-complete way: to glue everything together and do all the dynamic symbolic stuff, binding events to handlers, creating objects, naming them, plugging them together. All with wonderfully flexible simplicity and generality. Instead of trying to wrap the X Toolkit Intrinsic's and Motif's lame overlapping and incoherent attempts at object oriented programming, configuration, skinning and event handling in C and .XDefaults files.

Here's a typical TCL file that creates an instance of a SimCity editor window (it's more complex than a typical less dynamic TCL gui, since it's capable of creating any number of independent editor window instances, which is why it uses a $win prefix for everything it creates):

[https://github.com/SimHacker/micropolis/blob/master/micropol...](https://github.com/SimHacker/micropolis/blob/master/micropolis- activity/res/weditor.tcl)

No matter how much you love Lisp, WINTERP was still just using it to wrap Motif, even though Motif was suffering from a terminal case of Greenspun's tenth rule, and contained its own ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

Here's WINTERP:

[http://nielsmayer.com/winterp/](http://nielsmayer.com/winterp/)

<comment><USER30> Thanks again for your incredible work on SimCity.

</comment></comment></comment><comment><USER31> "Set of Standard Resources"

Check out Material Design by google - its been a lifesaver to me who is from a very technical background. Best part is with very little work you can really impress your bosses !

Good Luck

<comment><USER32> Material Design is just like Apple's guidelines. It's great for helping to create something that looks uniformly designed and not a hodge podge of UI gimmicks, helping design-ignorant coders create something that looks nice, and as you say it's easy to get management buy in, but is it actually good? Will following it actually reduce your count of UI mistakes? Personally I don't like it at all, and I've had many complaints, both functional and from personal preference, with Google's design changes over the last few years.

<comment><USER31> I agree.

But I do not have the time to go back and do another degree on design. Try convincing people with money to shell out extra for someone with good design experience.

I guess once we have millions of customers we might have to think about it - but small companies without much resources its hard to justify spending a lot of resources on good design.

<comment><USER33> Good design == lower churn, higher LTV.

</comment></comment></comment></comment><comment><USER34> IANAUIE (guess what that stands for. ;) )

Yet I am primarily responsible for the UI on the product on which I'm writing code. I started out with a bland and crappy interface expecting the client to look at that and provide their branding and suggestions for how it should work. Most UI elements are their default colors. Style? Please, I'm an engineer! I thought at some point they would provide a detailed list of requirements to provide a decent UI. I thought wrong.

I have done what I could to provide an easy to use intuitive interface. Unfortunately what is intuitive for me is not going to be intuitive to others.

Eventually I did receive some usability suggestions. I'm not sure they were carefully thought out. One point I would have suggested aligned with a marketing video on their web site but did not match their requirement.

Until producers of products of products care about the appearance and usability of their products, these things are not likely to get better.

As for my own feelings about UI, there are a few beliefs I hold deeply.

If a UI can model some sort of physical reality, it is going to be easier to use. If not a physical reality, at the least a consistent model.

I hate UIs that change depending on state. Disappearing menu items or screen elements drive me nuts. Think of shifting sands.

Discoverability is something that concerns me. Much of the S/W I work with has options or key shortcuts that I never know about because I'm too lazy to read through the manual. I do not know the solution to this, but I do know the problem.

</comment><comment><USER35> was hoping you were going to give a standard resource where I can find alternatives for common bad designs

<comment><USER36> Check out "About Face" by Alan Cooper et al.

A well respected interaction designer was so kind to give me her 1st edition many years ago and I still find myself coming back to it regularly.

New and updated 4th edition:

[https://en.wikipedia.org/wiki/Special:BookSources/9781118766...](https://en.wikipedia.org/wiki/Special:BookSources/9781118766576)

<comment><USER37> I had bought and read the 1st edition of About Face years ago. Thought it good generally. Might not have understood everything in it at the time. I remember him talking about "affordances". One point I thought was good, was his idea for a scroll bar with both the arrow heads at the same end of the bar, instead of at opposite ends. This saves you from having to move your mouse from one end of the bar to the other, to reverse scroll direction (since you have to click on either the up/left or down/right heads).

Like this (for a horizontal scroll bar):

<||> </comment></comment></comment><comment></comment><comment></comment><comment></comment><comment>=====

instead of this:

<|</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>|>

Cool. Later I heard from someone that some OS/GUI platform actually has his improved version - I forget which.

<comment><USER36> IIRC OSX had it at some point.

</comment></comment><comment><USER38> The most annoying "focus stealing" for me is what (some?) browsers do when actions initiated earlier on (like clicking on a bookmark that doesn't appear to load) finish while I'm typing in the address bar: they just overwrite what I typed with the new URL, or cause focus loss on the address bar so I suddenly type "nowhere". So frustrating...

<comment><USER39> IM clients that steal focus when a new conversation begins are fantastic about this. More than a few times a coworker has gotten half a line of random code as a response when they try to ask me a question over Sametime.

</comment></comment><comment><USER40> I think everyone knows that non-modal dialogs, live previews and obvious icons are better, but they're also harder to do.

</comment><comment><USER41> My biggest complaint is regarding web sites/applications that basically ignore the existence of keyboards. Some of this comes from the UI toolkit that they're using, but it's pretty egregious. For just "brochure" web sites, it's not that big of a deal, but some are really, really bad about tabbing order, or tabbing at all, and certain controls don't work correctly without the mouse/touch.

</comment><comment><USER42> I'd say bootstrap and the likes are killing the need for a fresh look at design by offering templates. For me the savior has been Basecamp's design. Always made sense and looked great.

</comment><comment><USER43> The fact that those are the faults you think are the worst shows how entrenched bad UX is.

E.g. drop down menus are a fail.

If you read Raskin's "The Humane Interface" you can see a whole host more.

Raskin, Jef 2000.The Humane Interface, Addison-Wesley ISBN 0-201-37937-6

<comment><USER14> > _If you read Raskin 's "The Humane Interface" you can see a whole host more_

Well, Raskin also has some bizarro ideas about what a good UI should be, and his later attempts of realizing one is not anything most people would want to use.

<comment><USER43> I use Acme text editor which uses some of Raskin's ideas It is the best I have ever used

[https://en.wikipedia.org/wiki/Acme_%28text_editor%29](https://en.wikipedia.org/wiki/Acme_%28text_editor%29)

<comment><USER14> You, Rob Pike and 10 other people.

<comment><USER43> mind yourself on that edge

or

not everyone can drive a Ferrari</comment></comment></comment></comment></comment>


The Peter Principle: Why Most Managers Suck - <AUTHOR> http://olivier.thereaux.net/2010/06/30/why-managers-suck/

<comment><USER2> The Peter Principle has been superseded by the Gervais principle: [http://www.ribbonfarm.com/2009/10/07/the-gervais- principle-o...](http://www.ribbonfarm.com/2009/10/07/the-gervais-principle-or- the-office-according-to-the-office/)</comment>


How to hire someone to design custom hardware? - <AUTHOR>

I'm a software guy.
How would I even begin to go about hiring someone to design custom hardware ideas that I have?
Do electrical engineers have shops? <comment><USER2> this is just a thought.. perhaps you could visit computex and ask around..</comment>


Do we need to worry about artificial stupidity? - <AUTHOR> https://www.thinkautomation.com/automation-ethics/do-we-need-to-worry-about-artificial-stupidity/ <comment><USER2> There's a lot to be said for this line of argument. The stupidity of the Youtube recommendation engine has wrecked Brazilian politics, for example: [https://www.nytimes.com/2019/08/11/world/americas/youtube- br...](https://www.nytimes.com/2019/08/11/world/americas/youtube-brazil.html)

(The deliberate construction of an AI that pays people to produce lies to damage other people's health and welfare sounds like a farfetched science fiction plot. _Accidentally_ building one, and then trying to deny responsibility for it, is a far more plausible thing for humans to do to ourselves. Just as Schneier talked about the "Exxon Valdez of privacy", what we have now is the tetraethyl lead of video entertainment.)

<comment><USER3> YouTube recommendations feel like a direct impediment to democracy. When your recommendations consist of the same crap all the time, it may seem as though that stuff carries more weight than it really does.

I wonder to what degree YouTube is responsible for the current political climate.

The same with Twitter really. When you only follow and see posts from people you choose, how are you supposed to give important issues a fair shake and debate viewpoints that different from yours.

<comment><USER4> Which calls into question the whole idea that democracy even works and that people can actually think for themselves and aren't just controlled by whatever propaganda happens to show up in front of their faces. I don't even argue politics with people any more because it's almost 100% what news sources they trust and find credible.

It's all just rumor and innuendo these days. Those news sources trust and find credible "anonymous sources" that say for example that Trump colluded with Russia or the Clintons are doing various unspeakable things and then you're arguing with these supposedly credible anonymous sources that each person reads and trusts. Since the sources are anonymous and nobody actually goes on the record, it's just a bunch of back and forth with no basis in facts except which news sources people trust and find authoritative.

<comment><USER5> Democracy was never intended to work. It's just better than the alternatives over the long run.

<comment><USER6> "Republics decline into democracies and democracies degenerate into despotisms"

-Aristotle

<comment><USER7> Aristotle also believed that some men were supposed to be slaves and that women held no intellectual value. So he can be wrong about things too.

<comment><USER8> So are you suggesting that if someone was mistaken in one line of reasoning or idea, that they are necessarily wrong on all?

If not... what's your point caller? All I can see in your statement is someone trying to avoid challenging an idea they don't like on its merits.

Actually, I'm surprised at how many participants in public discourse today, especially amongst the so called "educated" classes, actually are willing to make such arguments with a straight face and even give them credence. All it is is ad hominem... a logical fallacy. Shameful state of affairs. (...and maybe it was never different and I'm just noticing more now...)

<comment><USER7> No of course not.

I'm saying that he might not be right all the time, not that he is definitely wrong all of the time. It is possible that his "democracy is fundamentally broken" beliefs are correct, but we shouldn't just say "ooh Aristotle was smart and believed this so its a reasonable claim" and move on.

I think he is wrong about democracy and I bring up other cases where he is wrong so people will think twice about his beliefs about democracy.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> The article generalizes and remains superficial in what it asserts.

"AI that fails" currently will improve in the future and is currently being mitigated in use.

Then there's the toothless "dumbed down" section:

      "Some artificial intelligence machines and programs are deliberately 'dumbed-down'. This marks an entirely different take on the term artificial stupidity. By putting spelling errors in typed messages, not adhering to strict grammar and so on, AI seems less intelligent. These (fully intentional) errors are coded into the system with the goal of creating AI that appears human."

The writer than asserts this is actually a good thing because it provides more human-likeness in customer interaction for instance. Attributing "incapability" to AI because it has the technology has no moral compass is also a platitude. Technology can always be used for bad.

Fact remains, the current AI paradigm provides tremendous economic value and is merely an extension of the economic striving for automation. Harping on AI has become a bit of a trend and the author calls for cynicism but ends up with a pretty toothless analysis.

</comment><comment><USER10> A lot of what we call AI these days (especially neural network stuff) should really be called "artificial knee-jerk reactions". A neural network trained to detect traffic lights is 'intelligent' only insofar as your leg is 'intelligent' when it involuntarily kicks in response to a tap on the knee. Of course, automating a knee-jerk reaction in response to traffic lights can still be extremely _useful_ (say, for self-driving cars). But there's no contemplation involved, no thinking, no deliberation---no intelligence.

<comment><USER11> Agree. I would argue context makes all the difference in real intelligence and we can never define context because it's multi level, slightly different for everyone and constantly changing.

On top of all that forcing a certain context across the board can have countless unintended consequences.

</comment></comment><comment><USER12> For a literature review of Artificial Stupidity: [https://arxiv.org/abs/1808.03644](https://arxiv.org/abs/1808.03644)

</comment><comment><USER13> 'There is no doubt that AI may one day become much more intelligent than humans' Really?

<comment><USER14> "no doubt" and "may" are two words that contradict one another. Clearly whoever wrote that has no idea what they are talking about.

<comment><USER15> I disagree. They've constructed a sentence that will always be true by using the weasel word "may" and the emphatic "no doubt."

I have no doubt that one day someone may win big at poker in a casino. Someone may; or they may not - of this I have no doubt.

<comment><USER10> Technically the sentence could be falsified if we ever managed to formally prove that AI can never become more intelligent than humans.

</comment></comment></comment></comment><comment><USER16> Yes we do, it's called humans. This continual bashing of AI is so funny. We never measure the baseline of human activity which is chock full of stupidity, illogic and unreasonableness. Of course, AI is human directed, but it will likely be many times more predictable.

</comment><comment><USER17> I used Google Translate yesterday to translate a french phrase to english and got something like: "It's better to be alone than to be in bad _comapny_ ".

I looked around for a Duolingo-style "report bad translation", "rate" or "give feedback" action but couldn't find one anywhere on that screen.

Artificial stupidity seems like a natural step on the way to artificial intelligence, but we would likely benefit from building in some training wheels.

<comment><USER18> If you're in a browser the "send feedback" is at the bottom right in italic.

If you're using the application it's hamburger button, "help & feedback" then "Feedback" will be located at the top right.

</comment></comment><comment><USER19> One shouldn't underestimate the intelligence of stupidity. It can have its own utility, strength and creativity within certain parameters.

<comment><USER20> What do you mean? I don't understand

<comment><USER21> Not the parent but sometimes ignoring the rational choice leads to interesting discoveries or results. For creative endeavors it's also good to not overthink things and let the flow take over.

</comment></comment></comment><comment><USER22> I recommend this related talk by Vincent Warmerdam: "How to Constrain Artificial Stupidity" at PyData London 2019: [https://www.youtube.com/watch?v=Z8MEFI7ZJlA](https://www.youtube.com/watch?v=Z8MEFI7ZJlA)

</comment><comment><USER23> Ugh, human stupidity is more than enough for me to worry about right now... global warming will flood my city... US-vs-Russia jingoism will get us all killed in a nuclear war...

No more please (covers eyes and ears)!

</comment><comment><USER24> Artificial intelligence is certainly no match for natural stupidity..

<comment><USER25> And real weapons grade stupidity, at least in my experience, tends to be wielded by people who are actually very intelligent in general, but having a bad day or an attack of hubris....

</comment></comment><comment><USER25> I suspect something like the "artificial inanity" described in _Anathem_ so that the reputation of authors becomes a vital part of the infrastructure of their network.

</comment><comment><USER26> The world has plenty of organic stupidity, we don't need more.

</comment><comment><USER27> I think we don't need to worry about it no. Sooner or later they will learn. And will be smarter than us

</comment><comment><USER28> Hahaha, I would say we should be more worried about natural stupidity

</comment><comment><USER29> I can't blame Youtube, or any social media here at all. The enemy here is ignorance which is the root enabler for spreading this garbage. The only way to fix that is via education. Good luck. A well educated populace that thinks for itself is less profitable because you can't sell them a line of bullshit. And you wonder why education budgets are under attack.

Another issue is how we humans emotionally relate education with self worth in society. Ignorant people don't like to be called ignorant. Educated people telling them they need to be smarter is insulting. So there is a tendency to distrust educated people because the ignorant persons perception is that educated people think they are bad or broken and need to be fixed. If they don't feel bad or broken then there must be something more to this, why are we being manipulated... (conspiracy can then take over)

So perhaps we should rethink how to approach the problem and realize that ignorant impressionable people are a given. Instead of trying to fight propaganda with education we should disguise education as easy to digest propaganda. Don't fight fiction with facts because you're always going to lose. Just start your own propaganda machine and hope you can out smart the stupid. Sure it's manipulation but how much longer can educated people stay righteous while the world is being burned down around them by the ignorant?

<comment><USER30> "Instead of trying to fight propaganda with education we should disguise education as easy to digest propaganda."

How is this different from what we are already doing?

I do not just mean that as mindless snark. There's a selection effect, where children can only handle even more radically simplified versions of reality than even our feeble adult minds can handle, so by necessity, it's already been processed down to that level because nothing else would stick even a little. A common example is "The civil war was caused by slavery", which gets mocked, but it's not like there's any explanation you can fit into a middle- school textbook that isn't just as simplified and loaded with the biases of the simplifier. (Which themselves are the result of the bias-loaded simplifications that they were themselves fed....)</comment></comment>


Ask HN: Anyone here had to deal with studying and working and depression? - <AUTHOR>

I'm a college student who has to work to pay for my studies. Since the end of last year I decided to take a full time programming job and started doing distance education because I just couldn't pay for my studies doing a part-time job anymore. The problem with this is that I get back home very tired and I have little time to study or do anything else, my academic performance has dropped from being far above average (potential cum laude student) to being just below average since I don't study for exams and I submit my assignment late. I stay up late just to study and learn new things since my company doesn't offer much time for personal growth. I've also started dropping subjects just because I don't have time.
I've also noticed that my academic strength has dropped since starting to work full time. I can still write boring "enterprise" code that does the essential but I've started finding it more and more difficult to deal with some algorithms and mathematical concepts which I used to be quite comfortable with just about a year ago.
I've been applying for scholarships unsuccessfully for the last couple of years since high school. So work is the only way I've been able to pay for my studies. Now I've become a bit depressed, living away from home and family and not making any academic progress and being driven to exhaustion every day for sleeping late (so I just sleep on Saturdays and do little) .
Has anyone had to deal with this before?
Any advice on how to deal with this? <comment><USER2> I'm in the same situation as you. I transferred to my current university and was hired full-time within a year (age 20, pretty much as a sophomore), though I'm still trying to finish my bachelor's degree 4 years later. I work 40 hours per week. I take 2-3 classes. I have been working on a startup for almost a year and working on personal projects. It's very stressful for myself and my girlfriend.

I don't have much advice. I just know it's not worth it.

I took my job because I needed to pay for college, yet it seems to have turned into a career. I think I got carried away and excelled when I should have taken it easy and just graduated. Sure, I'll graduate with 5 years of experience and an expert in my field. I'm sure I'll be one of the few graduates without debt. But, I basically have no time to network with people at school, insufficient time to study basic concepts, no time to explore ideas further, very little time for friends, etc, etc.

It's just not worth it. I do it anyway hoping for some delayed gratification. I did quit the startup though and I'm putting the brakes on personal projects, hoping it helps.

</comment><comment><USER3> Yes, I have struggled with severe depression in the past during school and work to the point of coming home in tears because I'd have to make dinner and didn't have the energy to.

Suggestions:

1\. Set a level of activity that works - the things you simply must do to survive and the things that make you happy and don't stress you out. Everything else, try to turn down or delegate.

2\. It may be depression that can be treated medically. I don't know how it works in the USA, but if you have a doctor you may want to talk to him/her -- or go to the health clinic on campus once you resume studies.

Good luck. The good news is that you can climb out of a depression.

</comment><comment><USER4> Tough situation. "Real" Full time work + more than 1 hard class and 1 easy class is bound to leave you exhausted.

When I went to school I took advantage of "internships" and "special topics" classes. These let you remain enrolled in school while really working full time for an employer for a semester (+ summer). Went back to the same employer every year. This let me concentrate on one or the other and never had to mix the two.

I hate to recommend this, but can't you just get some student loans and worry about it later? In a high pay city, taking care of a 40-50k student loan is just a few years of living cheap.

</comment><comment><USER5> I second the student loan suggestion, rates are really low right now, I'm assuming you're in the US- you can get a loan for around 5%, $2500 of the interest that you pay will be tax deductible. This will allow you to work part time and reduce stress as you won't have to worry about paying for your schooling/basic expenses.

As for depression, exercise and socializing helps. A few years ago I was in a new country, heartbroken from a failed 5 year relationship- lowest point of my life. But you know what? That lowest point is a great time to rebuild yourself! Keep at it, things will get better!

</comment><comment><USER6> Suffered a short bout of it.

You are going to have to re-evaluate your priorities in light of your depression. Once you manage your depression everything will get better.

You are not superhuman. Full time work and studies do not mix especially if you are depressed.

If you are able to extract about 45 minutes of time from your busy routine, start exercising daily. Exercising daily is apparently equivalent to getting a dose of morphine. It has helped me immensely.

Are you able to identify what are the triggers? Is it the worry over your grades? Some specific aspect of work?

</comment><comment><USER7> you're overworked, and very stressed. You're probably also malnourished due to dietary decisions consisting of little more than "What's in the vending machine?" or "Where's the closest fast food joint?". If so, there's a high likelihood that your Liver and Gallbladder are both causing you problems. Depression is a common symptom of Liver issues. Add in a poor diet with high cholesterol, and your Gallbladder and liver a probably full of gallstones. increase your Ginger and Turmeric intake (to increase bile flow/digestion) for a few weeks, and spend a weekend doing a Liver Cleanse/Flush to remove the stones already in your system. I'll bet this helps you more than you'll ever realize.

Good luck in your studies.

<comment><USER8> Time management... Even people who know how to manage time get depressed. I agree that changing your diet is essential especially If you are overloading your schedule and are under a lot of stress.

I suffered a clinical depression and by changing my diet, running and learning to breath correctly (most of us don't take in enough o2), I was able to recover without using drugs and have not suffered another depression even under extreme pressure etc.

Go first to your doctor and make sure you don't have anything wrong. If the Doc clears you, change your diet and do a bit of sports (even walking) and take a few singing classes or yoga classes (To learn how to breathe correctly)

I am currently reading The China Study which is a pretty good book about nutrition.. I know you probably don't have time to read, if you want more info just contact me and I will send you some links.

</comment></comment><comment><USER9> I know how you feel. I work 35 hours a week at an internship and I try to keep up with school and my startup but there are not enough hours in the day. I'll keep it up as long as I can. Hopefully I can replace internship/job with startup exclusively.

</comment><comment><USER10> If you want to dig a big hole, you need to stay in one place. If you walk around town with a little shovel, you'll just end up digging thousands of little holes, not one big one.

</comment><comment><USER11> Everybody thinks they have "depression". Stop feeling sorry for yourself and learn some time management skills. Master some of the key concepts in the GTD literature.

Chances are you have a lot more time than you think you do.

Failing that, cut back on semester hours, the work hours, or both.</comment>


Postfix: A Simple Stack Language (2005) [pdf] - <AUTHOR> https://cs.wellesley.edu/~cs251/s05/postfix.pdf <comment><USER2> Maybe because the first calculator I had was RPN I learned postfix notation, but I have a really hard time with Lisps and their prefix notation. Lord knows I've tried.

<comment><USER3> I tried for years and eventually it becomes natural to the point that I now prefer it (or rather developed impatience with arbitrary syntax of in-fix notations).

Editor support helps (as it ought to), also the modern LISP style (indenting blocks). I still have difficulties reading ancient LISP style (but that's also due to the functional programming style eschewing temporary variable assignments while the names of those missing variables could serve to document the code).

</comment></comment><comment><USER4> Lyn T. is one of a small handful of the best CS educators on the planet. Good job HN!</comment>


Review my startup - RecipeTonite - <AUTHOR> http://recipetonite.com/

<comment><USER2> I love it! It solves a very real problem I have all the time. Honestly, I think a better idea is to do it weekly, so I can say "give me ingredients for 3 nights worth." There are several reasons for this.

* I can't cook _every_ night but it's convenient to have it there so I don't have to plan from the morning to cook if I end up staying at home. I think most people would do the same.

* 5x / 7x less shipping fees for everyone.

* If you have stuff for 7 nights worth of food already set, I can pick my favourite 3. This is very powerful because I get a lot of choice and thus, satisfaction. The main problem people have with CSA farm shares for example, is that they can't control what they get. Also, this way you don't have to come up with recipes and mass-source ingredients every single day (which is very hard). Instead, you get to do that over the course of a week.

I think you can learn a lot from the methodologies of <http://www.bostonorganics.com/>.

Also, if you really are considerate of the vegans and vegetarians, you will get rave reviews and the support of a vocal and big customer base who love to cook and blog.

Nice photos go a long way, especially in food. It's hard, but it makes the difference between whether I will cook a recipe or not (i.e. a good photo will make me do a $20 purchase and commit 1 hour)

Finally, I think you should encourage customers to "hack" your recipes with their own ingredients, and maybe even offer a few variations with every recipe.

Hope this helps, and good luck! :)

<comment><USER3> thanks for the feedback, this is some really useful advice. Increasing the frequency of our deliveries is maybe something we will consider in the future. For now, we just wanted to get something out there, test it out and see if people are even interested in it. The plan for the future is to have special recipes for people on certain diets; vegetarians, vegans, paleo, etc..

We're working on our new page already. This page will have much more details, pricing plan, sign up, etc... We definitely have to liven up the page and add more pictures

And I love the idea of hacking recipes

<comment><USER2> For some reason, I imagined you were sending daily, although I guess the website says nothing of the sort. Sometimes I make things up in my head! :)

I like the special diets idea.

Even better with hacking is that you can have a community-voted hack of the week (where you can't vote for yourself) and people upload their photos. Even better, you can offer those winners one of next week's recipes for free, in exchange for rights to their photos. So that you can uploads those photos in time for next week, and also get some valuable feedback.

Argh, even thinking about this is getting me excited.

<comment><USER3> Haha, that's great that you're excited. That's also a pretty good way to get our users involved with the service, good idea

</comment></comment></comment></comment><comment><USER4> Using a picture of a plane for the delivery icon is somewhat confusing. It implies an impersonal corporation far away with a one size fits all mentality to the whole country. What is preferable is (mostly) locally sourced ingredients and a realization that (for example) Californians have different tastes than Alabamans.

You'll want to provide some sort of "difficulty" level with the recipes. Not everyone is good or confident at cooking. Following on to what makmanalp said, that could be another factor in addition to vegetarian, number of diners etc. Being able to pick 3 meals for the week would help greatly.

I'd recommend you publish your recipes even to those without accounts etc so others can try them, even though they'd have to get the ingredients themselves.

You'll find that not everyone has the best cookware and tools. You may find a good source of ancillary revenue and/or "frequent flyer" benefits to be supplying nice tools (eg knives, spatulas, scissors) and pots/pans.

<comment><AUTHOR> These are from really good suggestions. You brought up some points that we didn't consider. In the future, we planned to post recipes along with blog posts and tips.

The difficulty level is also a great idea. I think giving them a choice of meals/difficulties is good, we also want to add the option like "surprise me" for people to discover new things. What do you think about that?

<comment><USER4> Presumably the "surprise me" would mean a random selection of the offerings rather than something not on the visible list? Americans are very fussy with their food so not knowing what it is until it arrives at your door may be going too far. But from a UX perspective I think that is shirking your responsibility to make the meals interesting.

You can certainly gamify things, and also take inspiration from the humour of Woot. For example bingo cards where you try to have meals covering the whole alphabet, or colours. Or "World Tours" where there are sequences of recipes that trace a path geographically around the world. Or voting certain ingredients off the "island". Or pick a film/TV show and make what the characters eat (or inspired by what they eat, or their locations). The Once Upon A Time In Mexico DVD has a 10 minute short on it showing how to make puerco pebil that I've done several times.

Here for example are the Indiana Jones locations: [http://indianajones.wikia.com/wiki/Travel_with_Indy:_Locatio...](http://indianajones.wikia.com/wiki/Travel_with_Indy:_Locations)

Out of that you'd get South America, France, Egypt, UK, India, Spain, Venice, Jordan and the US Southwest. My mouth is already watering :-)

</comment></comment></comment><comment><USER5> Do you plan to overnite / express mail the ingredients ? Because the recipe can contain produce / meat (perishables), you have to make sure the ingredients reach the customer within 1-2 days, else the perishables might go bad. Besides, you need to consider what impact the weather might have when shipping perishables (given the 100+ temps recently in east coast), even a few hours longer and they might spoil. If you do plan to overnite / express mail the ingredients (which can get expensive fast), will the cost be borne by you or passed on to the customer ?

<comment><USER3> Right now, we're only going to be shipping to SF and I'll be doing the deliveries for now. We have considered the weather and perishables and shipping that can get expensive especially including the insulation and ice pack for each box.

</comment></comment><comment><USER6> Great concept. This is something I would want in NYC. Lugging groceries on the train is a big hassle especially during rush hours and no seats. Driving to the city to get the freshest groceries is almost impossible. What's great about this is that you guys provide a recipe with the order! As a food lover, I'm always down to try new recipes and add it to dishes i would love to cook for family or friends

</comment><comment><USER7> I think this is a really smart idea. With working all day and living alone it's hard to get the motivation to cook well for just myself, but a program like this takes all the hassle out of it!

</comment><comment><USER3> Basically what we are is a subscription service that delivers ingredients and a recipe to your door, saving you the hassle of picking out ingredients, waiting on line, etc..

</comment><comment><USER8> it's a great idea. definitely gotta clean up the UI a bit though but its pretty good. Hope it takes off! and if it takes off, hope you guys have enough people to buy and ship all this stuff lol

</comment><comment><USER9> this is awesome! hope it becomes big!

</comment><comment><USER10> If you want this reviewed you should have a video on the front page at the very least giving a walk through and pitch of the service you are providing.

<comment><AUTHOR> We are trying to make a service where ingredients and recipes are delivered straight to your door. So that you can start cooking without the hassle of picking up every item.</comment></comment>


Ask HN: How did/would you transition from high paying jobs to entrepreneurship? - <AUTHOR>

I hope that the title is self explanatory. Just interested in hearing your stories for those who have taken the plunge. How did you actually go from six (or seven) figures to zero ? The "why" part is understood. Interested in the "how" . <comment><USER2> So far, just doing a bit of both</comment>