Hacker News new | past | comments | ask | show | jobs | submit | torus's comments login

There's even a name for this specific case of disappointment:

https://en.wikipedia.org/wiki/Paris_syndrome

"the disorder is caused by positive representations of the city in popular culture, which leads to immense disappointment as the reality of experiencing the city is very different from expectations: tourists are confronted with an overcrowded and littered city ... and a less than welcoming attitude by French hospitality workers like shopkeepers, restaurant and hotel personnel without considering the higher safety risks to which tourists used to safer cities are suddenly exposed."


Nice, I like the -T option.


The wikipedia page for Tyrosine suggests yes:

https://en.wikipedia.org/wiki/Tyrosine#Medical_use


> People are increasingly using Pages, Groups and Albums for all kinds of things that would previously have justified a whole startup

This is a snarky comment, but if a company can be replaced by a facebook page then it isn't adding much value.


No, that's kind of the point of the article. You might have a nice SaaS for someone to manage pot-lucks at the office, but if someone in the office just passes around an Excel spreadsheet, your startup is going to go.

I think we're both just re-iterating the point of the author--maybe slightly differently


While Haskell is undoubtedly better suited to writing concise implementations of sorting algorithms, the C++ versions given could have been written in a much shorter and clearer fashion.


For C/C++ all that is usually needed is to implement a few helper functions.

E.g. the quicksort example is one of my favourite pet peeves, because the reason the C version sorts in place is that the archetypical C implementation after Hoare sorts in place.

Many of the FP versions of quicksorts like this end up requiring a lot of additional memory. Maybe it is becoming reasonable to assume they will optimise it into an in-place sort these days, but it didn't use to be.

Meanwhile, with a couple of small, generic helper functions, you can get down to nearly the same complexity in C/C++. For C++ the only helper you absolutely need to cut down on the verbosity has been a part of the standard library since C++98

I wrote a blog post about this back in 2005 [1] about one of the other typical Haskell quicksort examples, and referenced an article by Alexandrescu that gave an example implementation of quicksort in C++ with the (generic) partitioning, as well as the pivot selection split out that looks like this:

        template <class Iter>
        void Sort(Iter b, Iter e)
        {
          const pair<Iter, Iter> midRange = Partition(b, e, SelectPivot(b, e));
          Sort(b, midRange.first);
          Sort(midRange.second, e);
        }
You can do the same in C easily enough. So what Haskell had over C/C++ in this respect was mainly a more expressive standard library. C++ has long had std::partition(), so it can be done entirely with the standard library too if you're willing to do the same (bad) fixed/dumb pivot selection that the typical Haskell versions (as well as the archetypical C version) use.

Unfortunately the link to the CUJ article is dead, as it was a quite fascinating walk through optimising sorting (including better pivot selection).

[1] http://www.hokstad.com/archives/2005/03/about_haskell_a


> Americans spend about $100 billion on illegal drugs every year

So that's $350 per capita on average. That's a lot higher that I expected.


Wikipedia:

>The Organization of American States estimated that the revenue for cocaine sales in the U.S. was $34 billion in 2013. The Office of National Drug Control Policy estimates that $100 billion worth of illegal drugs were sold in the U.S. in 2013

34 sounds more realistic to me


$34b refers to cocaine; $100b refers to everything.

It's not an unreasonable guess.

The numbers are hard to get right. Here's something about different statistical methods that end up with very different numbers (about 650,000 people who used heroin in a year vs about 1.5 million people; about 60,000 people who use heroin nearly daily vs neary a million people who used heroin nearly daily.)

> http://www.forbes.com/sites/jacobsullum/2014/03/10/how-many-...


$34 billion is the OAS cocaine estimate.

$100 billion is the ONDCP illegal drugs estimate.

You'd sort of expect the total value of illegal drugs sold in the US to be greater than the total value of cocaine sold in the US, since there are other illegal drugs besides cocaine.


If its anything like Alcohol, the top 10% of buyers spend $3500 per year.


"Beelzebub's tales to his grandson" is probably the only book I've found that I really, really, couldn't read. I'd love to know what it means though.


IIRC, he deliberately wrote it to make it hard to read. Out of curiosity, why did you try to read it?


I was fascinated by what I'd heard about him and wanted to understand his philosophy. I don't think I realised he'd deliberately made it obscure!


"Everything should be made as simple as possible, but not simpler." Einstien


This is a better approach, but as you say it does put the configuration overhead on the user - and many users will just click "yes" when asked whether to allow something.

So user eduction is important, but hard to ensure across a whole organisation for example.


One way to look at it is that optimising for testing is optimising for correctness


Not always. The GP post is more insightful than it might appear. A lot of reasoning used for arguing in favor of adding more unit tests is circular. "Good code is unit testable, so unit testable code is good."

Very often, optimizing certain kinds of code for unit testing makes it significantly more complicated, with none of that complexity helping you in the actual program. This is especially true for "end user" code, such as controllers.


I agree with what you said about "end user" code actually. I guess I am really arguing in favour of testing, not specifically unit-testing.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: