A CP Solution for XKCD NP Complete Restaurant Order - <AUTHOR> http://www.roryhart.net/code/xckd-np-complete-restaurant-order/ <comment><USER2> Of course, Prolog makes it easy too.

        ?- member(Fruit,[0,1,2,3,4,5,6,7]),
           member(Fries,[0,1,2,3,4,5,6,7]),
           member(Salad,[0,1,2,3,4,5]),
           member(Wings,[0,1,2,3,4]),
           member(Sticks,[0,1,2,3]),
           member(Sampler,[0,1,2]),
           1505 is Fruit*215 + Fries*275 + Salad*335 + Wings*355 + Sticks*420 + Sampler*580.
           Fruit = Sampler, Sampler = 1,
           Fries = Salad, Salad = Sticks, Sticks = 0,
           Wings = 2 ; % << END OF ANSWER #1
           Fruit = 7,
           Fries = Salad, Salad = Wings, Wings = Sticks, Sticks = Sampler, Sampler = 0 ; % << END OF ANSWER #2
           false.

<comment><USER3> As a person not heavily invested in Prolog, can you explain how that works? Is it just branching by _choice_ s from the different groups and it backtracks/fails back up to the last choice if constraints are not met?

<comment><USER4> Pretty much that, yeah.

[http://en.wikipedia.org/wiki/Unification_%28computer_science...](http://en.wikipedia.org/wiki/Unification_%28computer_science%29#Unification_in_logic_programming)

</comment></comment></comment><comment><USER5> In Clojure's core.logic it's also pretty succinct ;)

       (run* [mf ff ss hw ms sp]
         (fd/in mf ff ss hw ms sp (fd/interval 0 10))
         (fd/eq
           (= (+ (* mf 215) (* ff 275) (* ss 335)
                 (* hw 355) (* ms 420) (* sp 580))
              1505)))

Also the post seems incorrect there seem to be two extra results that do not add up to $15.05?

<comment><USER6> I wondered how long it would be until a core.logic version appeared :)

I think the original post has one of the prices wrong.

BTW thanks for working on this stuff swannodette - I hope to look into core.logic in the not too distant future...

EDIT: Yes, his price for salad is 3.25 instead of 3.35

</comment></comment><comment><USER7> I must say I'm not familiar at all with constraint programming, but it looks like something I've been wanting to know for a long time.

A practical problem I have right now is writing a device driver that needs to configure Phase Locked Loops in order to generate certain frequencies. However the setup is not straightforward, I have to configure a set of divisors, multipliers and some muxes. To make matters worse, at each step I have constraints for the possible frequency range at that point. And finally I sometimes have several of those PLL in series.

The only solution I have right now is using a C program that bruteforces all combinations, checks if the constraints are satisfied and outputs an array of configs for the subset of frequencies I need. If I need a new frequency I have to re-run my program and update the array. It works but is far from ideal.

Unfortunately all the tutorials I find online for this CP thing are using prolog or some third party library in C++, which is of course not practical for kernel programming...

If I could implement a clever solver that would run fast enough (unlike my bruteforce solution) I could just do it dynamically in the driver and it'd be much more elegant.

But I really don't know where to start. Any pointers/things to google for?

<comment><USER8> Are you proposing to write a simple constraint solver in C? If it's specific to your problem i.e. not too general, it's not the craziest idea I've ever heard.

I don't mind fielding questions over the basic theory if you want to email me (iain at my domain).

<comment><USER7> That's very nice of you! I'll gather my thoughts and send you an email soon. Thanks a lot.

</comment></comment></comment><comment><USER9> His restaurant problem is a special case of the knapsack problem where we have some items to carry, a value of each, and a weight of each, and a knapsack with a maximum weight we can carry, and we want to know what items to put in the knapsack to maximize the value but not exceed the maximum weight.

For the restaurant problem, for each item on the menu, just set both the value and the weight to the price, and for the maximum weight of the knapsack just use the budget.

Now, knapsack problems are in NP-complete, as I recall, but they are, in practice, among the easiest to solve. The usual recommendation for solving a large knapsack problem is via dynamic programming.

</comment><comment><USER10> Something is missing from this discussion. The sample problem in the xkcd comic is from a class of NP-complete problems, but being small, it has a solution in "pseudo-polynomial time"[1] that can be solved by a variety of tools, as demonstrated in these comments.

Even though this simple example can be solved, the general problem (from a set of N integers, find all subsets that add up to a given integer x) is nonetheless NP-complete. The method of computation (Excel, Prolog, constraint programming, Turing machine) does not change this fact.

[1] <https://news.ycombinator.com/item?id=5780552>

</comment><comment><USER11> Why 0..10? I think it would be instructional to mention how you chose these domains. Is minizinc smart enough to only go as high as necessary? If you had put 0..1000 would it have tested all 1000 _1000_ 1000 _1000_ 1000*1000 combinations, or is it smart enough to ignore fruit > 7 and salad > 2?

<comment><USER8> There are three phases to Constraint Programming: (1) Model (2) Constraints (3) Search & Propagation.

The first step in solving a problem with CP is to come up with a representation for a solution. This involves deciding what your variables will represent (in this case, "How many orders of each appetiser") and what is their possible domain of values (in this case, "0 to 10" has been chosen, quite arbitrarily).

The solver itself is generally dumb. It will propagate some constraints sensibly but mostly it will just search over the entire space - equal to the size of the domain to the power of the number of variables. 11^6 = 1.8 million, quite a small CP problem.

There's a bit of an art in creating a good model for a CSP (Constraint Satisfaction Problem) to keep the search space as small as it needs to be.

EDIT: Just to be clear...

The way constraint solvers work is to make a decisions in a Depth First Search manner and judge the validity of the new state after each choice. So after fruit > 7 and salad > 2, bounds consistency on the constraint will rule out the possibility of reaching a solution from that node in the search tree.

<comment><AUTHOR> Yup pure laziness as it was a toy problem. Though in my experiments with a gecode sudoku model its propagation was amazing, reducing the search space to a handful of branches. Another toy problem of course but one of a significantly larger size. Am I over estimating the power of propagation?

<comment><USER12> Propagation power really depends on the problem. For some problems, propagation is amazingly good, and for some it does not do much at all.

One can characterize propagation algorithms for the amount of propagation they do. A domain consistent propagation algorithm will make all deductions that are possible to make in a certain state, removing all values for variables that are not a part of any solution to that constraint. Loosely, a bounds consistent propagation algorithm will do the same, but only for the bounds of the variables.

The constraint used in Sudoku (called all_different or distinct) has really good propagation algorithms (both bounds and domain consistent), and is one of the cornerstones of constraint programming.

</comment></comment></comment></comment><comment><USER13> This is just a linear programming problem. One-liner solution in Mathematica, just for kicks:

        In[1]:= Solve[
            Rationalize[2.15 a + 2.75 b + 3.35 c + 3.55 d + 4.20 e + 5.80 f == 15.05] &&
            a >= 0 && b >= 0 && c >= 0 && d >= 0 && e >= 0 && f >= 0,
            {a, b, c, d, e, f}, Integers
        ]

        Out[1]= {{a -> 1, b -> 0, c -> 0, d -> 2, e -> 0, f -> 1},
                 {a -> 7, b -> 0, c -> 0, d -> 0, e -> 0, f -> 0}}

<comment><USER14> Linear programming as it's usually defined allows for the solution to involve arbitrary real numbers, and it's that flexibility that allows general LPs to be solved in polynomial time. The restriction to integers turns this into an integer programming problem, which is NP-Complete. Though that doesn't seem to bother Mathematica (which presumably has a similar sort of constraint solver working under the hood). :-)

</comment></comment><comment><USER15> _> So it's not even that I figured out something clever. It's just I have the patience to do the thing that no one would think of, or that anyone would ever bother to do. And sometimes that's key. It's just like I have that much free time._

<http://www.maa.org/mathhorizons/MH-Sep2012_XKCD.html>

</comment><comment><USER16> Is the Z3 theorem prover an example of a CP tool? For those interested, Z3 is one of the world's fastest theorem provers and has been open sourced by Microsoft. Theorem provers have many interesting applications, but one of my favorites is using them to represent a program's state and reasoning about the exploitability of bugs. It has bindings to C, C++, .NET and Python. Check it out if it interests you: <http://z3.codeplex.com/> or try it online at <http://rise4fun.com/z3py>

<comment><USER17> Before you download Z3 and dive in, be aware that Z3 is _not_ Open Source. It's licensed under a non-commercial license[0], which is not compatible with the Open Source definition[1]. Muddying the term Open Source will diminish its descriptive usefulness.

[0] <http://z3.codeplex.com/SourceControl/latest#LICENSE.txt>

[1] <http://opensource.org/osd#fields-of-endeavor>

</comment></comment><comment><USER18> Personally, I'd solve this using an integer programming approach, but CP is really cool.

The IBM CPLEX CP optimizer is best for this kind of stuff IMHO.

<comment><AUTHOR> We use CPLEX for LPs but I've not read much on the CPLEX CP solver. Maybe because it isn't free so the academics stick with the OSS ones? How does it compare to gecode?

<comment><USER12> One of the driving forces behind the development of Gecode was that academics used to use the pre-cursor to IBM CP Optimizer, ILOG Solver, in research.

As for comparing Gecode with CP Optimizer, the largest difference IBM CP Optimizer is a closed-source commercial system, with paid support. CP Optimizer also has some (as far as I've seen) amazing automatic search heuristics, automatic symmetry breaking, and more advanced scheduling constraints. Gecode on the other hand is open for modifications, has nice parallel search built in, and can be embedded easily. Given a problem where both systems have the constraints, and the search heuristic is fixed, my guess is that they would be mostly equivalent in speed

<comment><AUTHOR> I have a cplex license on my work machine so that is another avenue to explore!

<comment><USER12> Note that CPLEX and CP Optimizer are two completely different products. AFAIK, a license key for one of them can not be used for the other. But I've never actually used either myself, so don't take my word for it.

Also, since you seem to be interested in using Minizinc for modelling, you can use other back-ends than the built in one for solving models.

For some more code examples, see also Håkan Kjellerstrands blog (<http://www.hakank.org/constraint_programming_blog/>) which, among other things, contains numerous solutions to the xkcd problem suing different systems.

<comment><AUTHOR> I have tested out using gecode as a minizinc backend as I like the look of gint. I've been skimming hakank.org but it is a little advance for me at the moment.

Is there a way to get a minizinc model into cp optimizer?

<comment><USER12> I have no idea if it is possible to use Minizinc models with CP Optimizer, but I would guess not. It doesn't feel like a feature that would be of business interest to IBM to develop.

As for Håkans pages, <http://www.hakank.org/common_cp_models/#xkcd> has a list of 21 implementations of the xkcd problem.

</comment></comment></comment></comment></comment></comment></comment><comment><USER19> cp is fascinating. if people are interested, here's a write-up from a similar exploration, using choco (a constraint solver in java) to solve a problem on stackoverflow:

write-up - [http://isti.bitbucket.org/2012/04/07/pipes-clojure- choco-5.h...](http://isti.bitbucket.org/2012/04/07/pipes-clojure-choco-5.html)

problem - [http://stackoverflow.com/questions/9689436/backtracking- solu...](http://stackoverflow.com/questions/9689436/backtracking-solution-for- programming-exercise-fitting-pipes/9692556#9692556)

and another problem on stackoverflow that i was going to solve with cp, but which ended up being analytic - [http://stackoverflow.com/questions/7076349/is-there-a- good-w...](http://stackoverflow.com/questions/7076349/is-there-a-good-way-to- do-this-type-of-mining/7237972#7237972)

<comment><USER20> I agree, it is! I did a light comparison[0] between a logic programming solution to sudoku (Prolog) and one using constraint programming (Scala + JaCoP). I thought Prolog was a little nicer because it was shorter and more declarative, but the JaCoP solution was still great compared to any non CP- solution.

[0] - [http://nickknowlson.com/blog/2012/08/06/seven-languages- week...](http://nickknowlson.com/blog/2012/08/06/seven-languages- week-3-day-3/)

</comment></comment><comment><USER21> Here is a brute force solution in factor:

        6 [ 10 iota >list ] replicate >list lcartesian-product* [ { 215 275 335 355 420 580 } [ * ] 2map sum 1505 = ] lfilter list>array .

Kind of cheating, but the solution space is so small that brute forcing it becomes viable.

</comment><comment><USER22> If anyone is interested in the problem in general, it is equivalent to finding solutions to a Diophantine equation. <http://en.wikipedia.org/wiki/Diophantine_equation>

<comment><USER23> It is not, because it is a single linear equality and all variables are >= 0. This is not just nitpicking: solving Diophantine problems is in general undecidable, but this problem can be solved in pseudo-polynomial time (linear in the sum of all coefficients)

<comment><USER24> The study of solutions to equations only in the positive integers, or other subsets of integers also falls under Diophantine equations, as far as I know.

Subset sum problems are obviously decidable since the number of values that must be tried to find a solution is finite. However, subset sum is NP complete even when restricted to positive integers [Garey and Johnson, p223] so there is no polynomial time algorithm.

<comment><USER23> It is NP-complete in the weak sense: the reduction from, say, CNF-SAT, introduces very large coefficients (in the order of 2^n). The pseudo- polynomial algorithm has complexity linear in the magnitude of the coefficients, not in the size of their binary representation (hence pseudo). If the coefficients are small, that algorithm is efficient. See: <http://en.wikipedia.org/wiki/Pseudo-polynomial_time>

</comment></comment></comment></comment><comment><USER25> Some time ago I wrote a wrapper for PyGLPK and used the same problem as example:

[https://github.com/mariorz/pytorovich/blob/master/examples/x...](https://github.com/mariorz/pytorovich/blob/master/examples/xkcd.py)

</comment><comment><USER26> Does anyone know what algorithm this CP implementation is using behind the scenes? I'd be a lot more impressed if it were using dynamic programming than plain brute force.

<comment><AUTHOR> Constraint propagation + depth first search.

</comment></comment><comment><USER27> Excel makes this easy as well:

<http://cl.ly/image/1X2S121l2C3O>

No nerd cred, but it crosses the finish line.

<comment><USER5> Wow I did not know that Excel ships with a constraint solver and has since 1991 - <http://www.utexas.edu/courses/lasdon/design3.htm>

<comment><USER18> It's not a constraint programming solver, but rather a linear programming solver. The algorithm the comment above used is "branch and bound" on top of the Simplex method to handle the integer constraints. Tutorial here: [http://analyticsmadeskeezy.com/2012/08/29/optimal- blending-o...](http://analyticsmadeskeezy.com/2012/08/29/optimal-blending-of- cocaine/) Wikipedia here: <http://en.wikipedia.org/wiki/Linear_programming> <http://en.wikipedia.org/wiki/Simplex_algorithm> <http://en.wikipedia.org/wiki/Branch_and_bound></comment></comment></comment>


WikiLeaks and Free Speech - <AUTHOR> http://www.nytimes.com/2012/08/21/opinion/wikileaks-and-the-global-future-of-free-speech.html?ref=opinion

<comment><USER2> As madison wrote, "The people shall not be deprived or abridged of their right to speak, to write, or to publish their sentiments; and the freedom of the press, as one of the great bulwarks of liberty, shall be inviolable", I wonder if he could have imagined the newly formed government would wander this far... I applaud Ecuador for bravely standing against yet another example of US imperialism and violation of human rights.

</comment><comment><USER3> Flagged.

<comment><USER4> Why?

<comment><USER3> Because this isn't reddit. Political stories used to be very rare here, as I'm sure you're aware, and that was a large part of the appeal.

<comment><USER5> WikiLeaks stories are upvoted around here because (I suspect) they reflect the massive _social_ changes that the internet is enabling, which the HN community is clearly interested in.

Anonymous, WikiLeaks, et al represent the changing power dynamic in society globally, and that's fascinating to a lot of us (especially considering it generally involves people with a hacker mindset).

I'd agree with flagging a real _political_ story (like a Dems v Republicans rant) but flagging a WikiLeaks story doesn't make sense.

<comment><USER3> Sorry. Wikileaks and the Assange drama is almost completely political. We don't need a story about Wikileaks every week. Not why I come here. I can go to reddit for that.

Just because there is a technology aspect to a story does not make it appropriate.</comment></comment></comment></comment></comment>


Why is Facebook supporting React? - <AUTHOR>

It seems strange to me that Facebook Corp. would want to create and support React for free. What is the play? How is React in Facebook's best interest? Is it only about attracting engineering talent? Or is there a long-term play here? <comment><USER3> I don't know why specifically, but I can point out some benefits that make creating/releasing React "enlightened self-interest" (i.e. doing something good that is a net-positive for the company).

1\. Facebook uses it. Instagram runs on it, and it's used in some other parts of Facebook. If the community tests it, fixes bugs, and creates a generation of young people who are already familiar with it, it's great for Facebook. They have a rock-solid library and a huge pool of potential developers to work on it with no ramp-up time.

2\. Great programmers like to invent. One of the most-lauded perks at Google was the ability to spend free time on anything, whether it helped Google or not. Facebook _has_ to offer its engineering teams fun, cutting-edge projects, or some of them will leave. Money alone doesn't retain tech talent.

3\. As you implied, Facebook ups its "cool" factor by offering a high-quality product for free, especially when it's at the cutting edge. A recent HN post said "Facebook just taught us how to build web apps" (meaning their recent announcements were a major evolution in the way we build them). That's huge for Facebook as they hire. Again, they can't pay every engineer $30M/year, and even if they could, they'd still have people who wouldn't join the company. They need the intangible stuff, as well.

</comment><comment><USER4> (I don't and have never worked for Facebook...this is my interpretation based on watching several technology cycles - Windows => Java => Web => Mobile - <USER2> by.)

They want to own the next generation UI layer that the rest of the technology industry writes their programs on. That's why they've focused on making React cross-platform with React Native, and it would give them enormous leverage in adapting the platform to their revenue-generating products' needs.

If you look at the difference between Google's and Facebook's strategic moves with the shift to mobile, a lot of it can be explained simply because Google owns a browser and a mobile OS, and Facebook owns neither. So Google puts out Polymer, and builds it into Chrome, and uses that as a carrot & stick to move the browser ecosystem in a direction it wants. Facebook can't build their needs into the browser, and so they put out React, which has to function as a layer _on top_ of the browser (or native platforms, now). That means you pay for the download cost, it can never be as fully performant as things that run natively on the GPU, it won't integrate well with the rest of CSS/HTML, etc.

I bet that if React becomes successful in the UI space and a majority of apps start using it as their framework, Facebook's next move will be to put out a mobile OS that runs it natively. Right now, Facebook's phone plans have been thwarted because there are no apps for it, and so no consumer would buy a Facebook phone. If they could instead say "All your favorite apps run twice as fast as they do on competing phones!", people would switch in droves.

<comment><USER5> Facebook supports React simply because it's a tool that allows them to effectively develop UIs that perform well. That's it.

> That means you pay for the download cost, it can never be as fully > performant as things that run natively on the GPU

If you're talking about the web, the virtual-dom diffing strategy employed by React performs better than other ways to render complex UIs in the browser.

> it won't integrate well with the rest of CSS/HTML, etc.

The whole point of React is to make writing CSS and HTML easier. It integrates wonderfully.

</comment></comment><comment><USER6> What was the purpose of bell labs making unix or linus torvalds linux? Why is apache free? open source C compilers? python, java, mysql, go-lang, rust, angular the list goes on.

Open technology helps evolve the type of applications we can build. There doesn't have to be a "play". Facebook made something good that makes their lives easier and their product better. By open sourcing or sharing react whichever it is they allow other people to contribute which in part makes their product better but also increases the quality or reduces development time of the applications that anyone else using it builds.</comment>


Data-as-a-Service: Running DaaS Companies - <AUTHOR> https://blog.safegraph.com/data-as-a-service-bible-everything-you-wanted-to-know-about-running-daas-companies-d4cf4c15c038 <comment><USER2> It took me two years of collecting and cleaning data before the model I have been training it with started becoming useful for my own specific needs.

[https://trends.getdata.io](https://trends.getdata.io)

The first challenge I see with data as a service is that not all features you need for your model will be made available by the vendor.

The second is their frequency of update might not be at the cadence that you need.

</comment><comment><USER3> As someone running a data startup, this is the first guide that really made me nod my head, and say yes, yes, yes! All the other SaaS articles felt like they weren't talking to me or understood the problems that come with trying to sell a data product. For instance, the idea of building a MVP in 3 months with a data product is laughable.

<comment><USER4> Curious to know how DaaS startups decide what to charge for their dataset?

<comment><USER5> Not a DaaS startup, but I've managed millions of dollars worth of data acquisition and sales before.

Having seen both the selling and acquisition side of the table, the only concrete advice I can give you is to pay handsomely for experienced sales staff. There is absolutely no rhyme or reason to data pricing, and no matter what you do you will invariably price out specific market segments while underpricing for other market segments. And as the article mentioned, there are a lot of potential licensing and usage covenants involved in data sales, which are all possible factors in pricing. Without a good sales team to do client and market discovery, it's really hard to understand what to settle on for norms as far as both pricing and licensing go.

On the flip side of that: if you're ever purchasing data at any amount of volume, ignore listed pricing. It's absolutely fungible, and well worth the tedious dance of traditional sales. In addition to better financial terms, you can usually get adjustments to the licensing and usage covenants to better accommodate your use case. Doubly so if your use case is nonstandard for that vendor - plenty of data-oriented services are tailored for specific industries and uses, and their pricing sheets and tiers are designed around the use cases and marginal value of the data within that industry. When sourcing data, I could get pretty incredibly deals from these companies, as their sales teams basically used the transaction as a form of market discovery and saw the relationship as a way to feel out a particular market segment they hadn't been going after previously.

</comment></comment></comment><comment><USER6> This is one of those companies that will pay you to bug your app so they can spy on your users. They also emailed me at least 8 times without any sort of opt-in.

<comment><USER7> Absolutely, but the author is not wrong in general about DAAS, and that there are many, many DAAS opportunities that have nothing to do with violating individual people's privacy.

<comment><USER8> Can you give a couple of examples of such DAAS opportunities?

<comment><USER7> I would suggest a way to look at DAAS is through the lens of what has long been called "Decision Support", and apply it to what might now be called "microdecisions."

So- think about the personal microdecisions you make on a daily basis, especially the small ones- shopping/cooking/eating; cleaning; dressing; commuting; etc- and appreciate how many of those are not data-driven, are rather just based on assumption, habit, history, etc. Appreciate how many things one wonders about, idly, throughout the day, in regard to those microdecisions.

With some reflection it's easy to see that having various kinds of data would lead to your making different micro decisions. Some of those microdecisions can substantively impact things that are important- health, wealth, happiness- so will become business opportunities. Apply that to microdecisions made in the course of work...

</comment></comment></comment></comment><comment><USER9> This is my space broadly speaking and personally I think the treatment in the article is unnecessarily idealised and elaborate.

People will buy data when it has a clear use which means most people don't sell just data, they sell "leads" or "clicks" or "followers": something actionable.

I think this is unlikely to change because having an internal data team producing leads typically doesn't make sense as a core focus.

There are a relatively small number of companies which do sell data and a slightly bigger number of companies that actually buy data. In the UK it's easy to quantify because they all end up buying some of exactly the same thing.

<comment><USER3> "buying some of exactly the same thing."

What exactly is this thing?

You are right though. People don't buy data, just like they don't buy a SaaS product. They buy something if it solves a direct need, saves them money, or helps them generate more revenue. And like all things, it does need to have a clear, understandable story and value proposition.</comment></comment>


Twitter's Retweet Button Is 'Loaded Weapon', Says the Man Who Designed It - <AUTHOR> https://digit.fyi/twitter-retweet-button-designer-chris-wetherell/ <comment><USER2> It's a catch-22 for Twitter, really.

You have the means to spread information very quickly in a beneficial manner - like natural disasters etc - but also false information equally as efficiently.

How do you regulate and stem this?

</comment><comment><USER3> There are just too many arse holes using Twitter. It's a haven for trolls.

<comment><AUTHOR> What is the alternative though? Realistically.

</comment></comment><comment><USER4> Gamergate must seem like a walk in the park compared to the garbage the platform has to contend with a moderate now.

</comment><comment><USER5> Twitter should have taken their own philosophy of constrainment much further: limit not just the number of characters, but also the number of allowed tweets and retweets a day. If you were allowed to do only three retweets a day, you would think twice about hitting that damn button.

<comment><USER6> Seems like a good way of losing your traffic to sites/services that don't have said limitations. Would Twitter have become so big in the first place with them? Doubt it.

And if they tried to implement it now, they'd just give both competitors (like Gab) and decentralised alternatives (like Mastodon) the best free advertising of their lives.

<comment><AUTHOR> This^^

Plenty of competitors that are more than willing to cash in on any changes. Can twitter afford to lose out in this regard..?</comment></comment></comment>


There are good reasons for saying hello. - <AUTHOR> http://www.esmerel.com/circle/wordlore/hello.html

<comment><USER2> Wait, people would just call somewhere and say the extension? That sounds awfully rude to me. Wouldn't you normally say, "Hi, can I have extension 432, please?"

It does the same thing the article says, but you sound like a decent human being.

<comment><AUTHOR> What it reminded me of is when, after waiting on hold forever, the CSR says something like: "Thanks for calling ABC Company. What's your account number?" or "What is your phone number?" Having the first "words" a customer utters be numbers is probably not the best idea. I wonder how many hours of waiting on hold could be eliminated if more companies understood this phenomena.

I also wonder if the full word "hello," would be necessary, since the word "hi," makes the similar cavity-sound as the spoken number "five"?

<comment><USER3> With something like Twilio I don't think you have any excuse for this part of the interaction: play a recorded greeting saying "Hiya, for fastest service, type in your account number . If you don't know your account number, hit 0 and one of our operators can help you look it up." If you get their account number, pick the appropriate CSR, bring up the details directly on their screen, forward the call and drop them straight into "Thanks for calling FooCorp. This is Melinda. To whom am I speaking please?" _Hears customer name, a necessary formality because many accounts have multiple people in charge of them -- the most common situation in B2C is husband and wife._ "Thanks for calling Mr. Smith. What can I help you with?" If Mr. Smith says his last order didn't ship yet, Melinda is a single keystroke away from pulling it up.

Ooh, the possibilities with Twilio make me giddy. If I can only productize one of them... (Crikey, the possibilities for per-company customization are _endless_. Do customers ever call you? You should be using Twilio.)

</comment></comment></comment><comment><USER4> I fully support being polite, but there's a lot more to vowels than relative pitch. When speaking a vowel, the geometry of your mouth creates multiple resonant frequencies. The ratio among those frequencies is far more important than the ratio of the dominant frequency of one vowel to the dominant frequency of the next.

Consider a couple of examples:

1\. A trombone can't say "I Owe You", despite the fact that it can produce any dominant frequency, and that phrase contains only vowels.

2\. Voice "Ahhhhhhhhhhhh", going from a high to a low pitch (I imagine the doppler effect of a cartoon screaming as he rides by on a cart), and then voice "Ohhhhhhhhhhhhhh" in the same fashion. At every point, they sound different. You can't take a clip from an arbitrary pitch range of an Ah and convince someone its an Oh.

3\. Shape your lips like you would for oo as in Moon, Noon, or Spoon, and try make the ea vowel as in Squeak just by changing your pitch. It won't happen. You'll get the German ö, but not the English ea.

<comment><USER5> "It won't happen. You'll get the German ö, but not the English ea."

Cool! Now I know how to pronounce a German ö!

<comment><USER6> And also the Turkish ö. But not `coöperate' from the New Yorker.

</comment></comment></comment><comment><USER7> Are you sure this isn't a troll? It's so easily disprovable.

Here's a sound clip of an adult male speaking, followed by a young boy.

Do you honestly have trouble understanding the number the boy says?

<http://soi.kd6.us/wp-content/uploads/2010/02/sound.mp3>

<comment><USER8> Bingo. I'm surprised nobody else has questioned whether the purported fact in the article is even true. I can't relate at all to not understanding the first few words someone says.

(Although I doubt it's an intentional troll.)

</comment></comment><comment><USER9> On a related note, the Oatmeal just posted 10 reasons to avoid talking on the phone:

<http://theoatmeal.com/comics/phone>

<comment><USER10> I always noticed the awkward goodbye, in other people, not so much myself because of lack of phone conversations really. But it seems people have to make an excuse for every time there hanging up rather than just saying im going to go now bye or something.

</comment></comment><comment><USER11> this is particularly true (in my limited experience) if you're not a native speaker - saying something like "hello i'd like to talk to extension 123" gives people a chance to figure out your accent. also, like smiling, saying something friendly encourages people to make an effort to understand you.

<comment><USER12> I wonder if attention plays a part. I have noticed that people can interpret what I say if I start with a grunt or other vocal sound, but if I start off with the thing I want to say immediately, I have to start over. I realize that it can be explained by this "human brain interprets your two syllables" idea, but if a mere grunt also does the trick, this suggests to me that attention plays at least as much an important part.

<comment><USER13> To me too, it seems attention is of more importance here. It seems the author has a degree in linguistics (<http://www.esmerel.com/wagons/ann/>), so I won't dismiss this theory easily, but the lack of any citations or references in the submitted page looks suspicious.

</comment></comment></comment><comment><USER14> Very interesting. I think phone skills are something a lot of people overlook.

I don't have the resources to do a study on this, but another tip is to smile when you talk on the phone. It might just be because my voice is deeper (making something like a smiling face lets you hit higher notes when singing too), but it seems like people understand me faster on the phone when I do this.

</comment><comment><USER15> Does any speech recognition software use vowel normalization?

<comment><USER16> Yes. See: "VTLN". Also, the audio feature transformations are adapted during recognition in most cases. For instance, speaker independent recognizers generally do runtime adaptation on a per conversation basis. Speaker dependent ones generally continually adapt to the user using the same techniques.

</comment></comment><comment><USER17> Are more or fewer syllables needed in various languages? Does it matter whether they are tonal languages?

</comment><comment><USER18> The word "the" serves a similar purpose, to reset the vocal tract so the next word can be resolved more easily than if it was following an arbitrary word.

<comment><USER19> [citation needed]

<comment><USER20> <http://en.wikipedia.org/wiki/Assimilation_(linguistics)>

</comment></comment></comment><comment><USER21> Sounds like a good practical explanation why in some cultures (French, for example), it's practically mandatory to say the equivalent of "Hello" and other pleasantries before getting to the actual content of the conversation.

</comment><comment><USER22> I'd like to see this theory put to the test. Get a number of differently-sized individuals record "see" or "saw" and test the ability of native speakers to identify which they heard.

</comment><comment><USER20> I upvoted this because I would love to see more linguistics-related posts come through HN.

</comment><comment><USER23> I like this little esmerel.com site ... it's quaint and interesting. Thanks.

</comment><comment><USER24> nevermind the fact that saying 'hello' is considered polite... But I still like this article :)

</comment><comment><USER25> I honestly can't believe people write posts about this.

<comment><USER26> I find it interesting that human voice communication seems to have a kind of built-in handshake to synchronize expectations of vowel sounds etc. It makes sense, but it hadn't occurred to me before now, and is probably part of the reason speech to text is so difficult.

<comment><USER27> I've known a few people who don't get the "conversation is ending" inflection and can't/don't express it. It leads to some awkward pauses on the phone and me having to ask continuously if there is anything else. May be the other person doesn't want to hang up first, but _I_ have no trouble hanging up first if there's an indication that the conversation is over and the other person isn't just stalling because they have more to say.

<comment><USER28> In my experience I know a couple people who don't understand how the conversation starting and ending works. Usually a person's tone and speaking pace has a distinct pattern at the beginning of the conversation, and also a distinct pattern at the end that shows that the conversation is ending.

These people just start off talking like it is the middle of the conversation. When they are done they just walk right off abruptly. It is interesting the way we come to expect certain speaking patterns based on how most people communicate.

<comment><USER6> > It is interesting the way we come to expect certain speaking patterns based > on how most people communicate.

Isn't this what language (and other practical conventions) are all about?</comment></comment></comment></comment></comment>


California higher-density housing bill blocked in first committee hearing - <AUTHOR> https://www.mercurynews.com/2018/04/17/major-california-housing-bill-dies-in-first-committee-hearing/ <comment><USER3> The housing shortage is a completely self-inflicted wound. Like Prop 13, it benefits current owners at the expense of their children and other newcomers.

And even when housing can be built, it is overly expensive due to insanely conservative zoning requirements. A great explanation of just how awful it is in LA is here:

[https://www.reddit.com/r/LosAngeles/comments/6lvwh4/im_an_ar...](https://www.reddit.com/r/LosAngeles/comments/6lvwh4/im_an_architect_in_la_specializing_in_multifamily/)

And SF and the Bay Area have been even _worse_ than LA at building housing.

Crazy conservative (in the sense of "no change allowed") people dominate all the planning meetings, which control what can and can not be built. Meeting code and zoning is not enough, you have to convince the extreme ends of your opponents to get _anything_ built.

<comment><USER4> These boards should all take a field trip to places like NYC and Tokyo where the buildings are tall and the density is high. I have no sympathy for these self inflicted wounds.

<comment><USER5> I'm a home owner and YIMBY here who shows up at city council meetings in support of more housing. You would be shocked just how horribly selfish existing home owners are. Very common statements are that "I bought here because I liked the town and I don't want it to change", or "I have my house already, I don't want more people here", etc. It's awful.

We're slowly losing everyone in Mountain View except dual tech income people who won the stock option lottery, houses are out of reach for most everyone. What does get built via ABAG (Association of Bay Area Governments) mandates is generally rental housing, and rents are astronomical.

This kind of short sightedness is disgusting, and people don't seem to realize that nice, high density areas didn't just spring up in their dense form, they were allowed to evolve over time.

CA also has a lot of red tape anyone can invoke on any construction project to drown it in bureaucracy for years. The only people willing to fight against the bureaucracy are giant developers who develop large lots into cookie cutter developments. It's a giant mess driven by greed and stupidity.

<comment><USER6> So on one hand you have people happy with the neighborhood they live in and not wanting change; on the other hand you have people not happy and wanting change.

Why is one group more "horribly selfish" than the other? Especially if you think there's a bubble, you don't want to change the character of the place for a short-term problem.

Why is "build more in one place" a more natural answer than "let tech companies geographically diversify themselves in response to pricing pressure"? Especially given an area that's kind of a natural disaster SPOF.

<comment><USER5> You have to react to the state of the world today, not some unknown future state. The Bay Area is very successful financially with tech, biotech, and finance jobs. People from all over the country and world are coming here. We need housing for them.

Basically, we can choose between two sets of problems, the problems of increased density, or the problems of gentrification. Yes, there is some amount of subjectivity here, and I clearly prefer the problems of higher density, but living here, I see a lot of very bad effects of gentrification. Service industry people have massive commutes from far away, yet we're dependent on their services, but we don't want to make housing affordable to make their lives better because we don't want change. We prioritize saving three big trees [1] over development, for example.

What is really disheartening is people saying, as you do, that we should drive tech away in some capacity. I've lived in the rust belt, in areas of low housing cost due to industrial decline, I really would hate to see that here, it's horrible.

[1] [https://www.mv-voice.com/news/2017/12/22/downtown- residents-...](https://www.mv-voice.com/news/2017/12/22/downtown-residents- rally-to-save-neighborhood-redwoods)

<comment><USER5> Oh, and one more thing - I'm glad that SB 827 died, despite being pro-housing. This is fundamentally a local decisions, it's just that the locals are being unreasonable. Whenever the state imposes a one-size-fits-all policy, you end up with different problems. San Jose, for example, is building housing like crazy, and tech companies are already building campuses near the new housing, as even Google employees can't afford to buy in Mountain View today. Basic 3 bed / 2 bath houses on < 6,000 ft lots go for over $2.5M in Mountain View. Owner condos are non-existent, rents are on par with Manhattan, but we don't have public transit to move people out into the boroughs. It's not a good situation. I'm lucky because I've been here since the 90's, but today, I'd be forced to leave the bay area given my income level.

<comment><USER7> > San Jose, for example, is building housing like crazy

And they have ruined what used to be beautiful farm land and orchards to create ugly urban sprawl punctuated by strip malls and plagued by violent crime. There's a very good reason San Jose, not San Francisco, was the site of the first major European settlement on the West Coast. Aside from having fantastic weather year round, San Jose was once beautiful. Few would argue that now.

I know people need jobs and housing but unrestrained urban sprawl is a terrible solution to that problem.

<comment><USER8> San Jose looks anything but urban. It's a big boring suburb, just like everything else between Gilroy and SF.

<comment><USER9> No way, our suburbs have way better restaurants than any other suburbs. Where else in the US are you going to find thirty different ramen shops?

<comment><USER8> Only if you count Napa as a suburb, too. Otherwise, SFBA's opinion of its restaurants is slightly exaggerated.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> California has the highest poverty rate in the US [1] in no small part due to the housing crisis. It's a sad fact that this bill dying in committee is the most progress in years to solve the root problem.

1) [http://www.latimes.com/opinion/op-ed/la-oe-jackson- californi...](http://www.latimes.com/opinion/op-ed/la-oe-jackson-california- poverty-20180114-story.html)

</comment><comment><USER11> California YIMBY organized this bill which, while destined to fail, has attracted a good deal of serious attention to the cause.

Donate/volunteer: [https://cayimby.org](https://cayimby.org)

(I am not affiliated with California YIMBY.)

<comment><USER12> If anyone from California YIMBY is reading this thread, I really hope you get a chance to read the following:

\- [https://dominiccummings.com/2017/01/09/on-the- referendum-21-...](https://dominiccummings.com/2017/01/09/on-the- referendum-21-branching-histories-of-the-2016-referendum-and-the-frogs-before- the-storm-2/)

\- "Win Bigly" by Scott Adams

<comment><USER3> That's a super long essay, and about 500-800 words into it there's still no thesis or general topic introduced.

It may help to provide a tiny teaser about why it's interesting and relevant if you'd like more people to read it, as the current introduction doesn't do it many favors.

</comment></comment></comment><comment><USER13> Disappointing. This was a way to save hours and years in aggregate for people around the state.

The goal is simple. To live closer to the areas you depend on and not have to lose everything doing so. A disappointment that it was not fully understood. So many hours commuting and pollution moving from A to B when we can use transit and live near it effectively if we can simply build.

</comment><comment><USER14> There were some good ideas in this one, but the requirement to force high density housing near bus stops has some serious problems in small and medium sized towns.

For one, bus stops are generally already near existing development, so unless property values plummet, that land won't be turned into condos.

The second problem is that bus stops can move. Yes - one of he big advantages of busses over rail is that the location of the stops is infinitely flexible. Forward thinking cities build bus pull-outs on major streets in new neighborhoods all the time, so they can be used in the future. Requiring a specific type of zoning at all of hear bus stops will effectively freeze this type of flexibility.

OTOH, building a new train station? Yeah - put up some condos!

<comment><USER9> The bill was based on transit stops as they are in 2018 - it doesn't follow you around if you make new ones. The idea there was to stop suburbs from just shutting down their bus lines.

I think it is difficult to get a bus line moved in California though, because of CEQA - didn't it take a decade to start a new one in SF just recently? This is why everyone does UberPool.

<comment><USER14> You're talking about SF and I'm talking about small and mid sized towns. Big difference. If a small town wants to move a bus stop 1 block, it doesn't take 10 years...

</comment></comment></comment><comment><USER15> Most infuriating about the SF housing debate is the the utter lack of economic knowledge that aligns groups like sierra club and low-income advocacy groups with rent-seeking or racist NIMBY homeowners.

<comment><USER16> You'd probably find those groups are all run by the same people.

</comment></comment><comment><USER17> As much good stuff as the bill had in it, I think I'm glad it failed. The idea of upzoning near transit is a good one, but tying it directly to transit growth is counterproductive. There was already talk of neighborhoods in LA lobbying to reduce bus service on their streets so they wouldn't qualify as a "high quality" bus line and be subject to the new zoning.

There needs to be a way to build transit-friendly neighborhoods without turning people against transit.

<comment><USER18> "There needs to be a way".

Like what? Given the dire housing situation in California, making perfect the enemy of good will end up badly in the long run.

<comment><USER17> setting up public transit as a villian isn't a "making perfect the enemy of good" situation. the bill as written wasn't good. it was actively bad. Pitting residents against public transit is counterproductive.

my first thought is that instead of tying the upzoning to transit lines or transit stations, it should be tied to transportation corridors. if a route carries a certain amount of people, whether by car or bus or train or jetpack, nearby buildings should be ineligible for certain height restrictions and parking minimums.

<comment><USER18> Why wouldn't the residents then become even more anti housing because more people will lead to corridoring? This is how all these anti housing debates go, a well intentioned person with just a no and no thought on any actual solutions.

</comment></comment></comment></comment><comment><USER19> If the state of California in incapable of imposing adult supervision on bay area towns and their NIMBYs, maybe it's time for the federal government to give it a shot. I'm sure the commerce clause can be construed to authorize a federal intervention.

SV is too economically important to the national and world economies to allow hysterical, superstitious, and irrational local interests to overheat its housing market.

</comment><comment><USER20> It may be that the only way to fight "not in my backyard" is to require, by law, "everyone's backyard". In other words, make every single neighborhood give _something_ up so that no one can say they're being singled out.

One method might be to require a tax increase in every neighborhood that is nullified if that neighborhood does certain things (like allowing dense condos). The important thing would be to make it absolutely clear that a whole city/region is in the same boat, that certain actions _will_ be taken on _all_ areas and no one will be allowed to squirm out of them.

</comment><comment><USER21> Damn this is being heavily down-voted yet has wide-reaching implications on tech.

</comment><comment><USER22> "Not in my backyard"

My best insight on what is driving the opposition is contained in a book by Zillow researchers called "Zillow Talk". Basically, housing shortages drive up home values.

</comment><comment><USER18> Yet another failure by an American state to do anything about an absolutely huge problem. As I see it, wages haven't risen materially for decades and governments are failing to do anything substantial about the big things people spend their money on - housing, education, healthcare. At this rate , grass roots revolution will be the only remaining avenue for change.

</comment><comment><USER23> I'm surprised that this is characterized only as a supply problem instead of a demand problem.

<comment><USER9> There aren't /that/ many tech people moving to Silicon Valley, though there certainly are a lot. What are you going to do about children who grew up in California and can't live in the same city as their parents? There isn't even enough supply for them.

<comment><USER19> One of the worst aspects of prop 13 is that the property tax cap is hereditary. It's outrageous and creates a real risk of an honest-to-god blood- based class divide in the region.

</comment></comment></comment><comment><USER24> As much as I hate voter propositions... It's time for a voter proposition on this one, if we can't fix the rest of the system.

<comment><USER25> I really wouldn't expect a voter proposition to do all that much better. There are a lot -- probably a majority -- of CA residents that benefit from the current policies and don't want change.

</comment></comment><comment><USER26> Individual property ownership should be outlawed. The perverse incentives outweigh the benefits. Private real estate is an exclusive monopoly protected by the government.

Housing appreciation is particularly appalling. Rarely is it due to any particular improvements an owner makes, rather its due to city or local changes which reward homeowners for no action of their own. Your schools received higher test scores, collect 35k, and pass Go. A factory ignored EPA regulations, lose 15k. There is no sense or reward for good decisions - <USER2> the whims of fate. In fast growing cities like SF, it's worse, home value grows off speculative home value, which grows off even more speculative home values. The monopoly self-reinforces.

There is no reason for such an artificial monopoly to exist. The native Americans got this right. Communists got this right. The Chinese 90-year lease model looks much better.

<comment><USER27> Or just institute a land value tax.</comment></comment>


Ask HN: The startup I just joined is in massive disrepair. What to do? - <AUTHOR>

First off, this is a throwaway. I'm an active member here, and in such a dire situation I have to turn to you guys to see what you will make of it.
The short story, for those of you who hate reading, is that I recently joined a startup. I expected things to be in good technical shape, but they're not. At all. In fact it's really fucked up.
Long story, if you've gotten this far. In my interview with the CTO, I was told that the language of choice was Java (I haven't any professional Java experience). I told him it wasn't a problem (which it's not). I started last week.
When I first stepped in the office last Wednesday, the code was uncompilable outside of Eclipse. Then I was in a meeting where the CTO mentioned how there is Java code in XSP templates (I didn't know what these were before this, god bless my soul now) that generates Javascript. This was good, he reasoned, "because Java and Javascript are so similar".
The rabbit hole just keeps on getting crazier.
I was tasked yesterday with writing some code to "log requests to the database". Shivers. There is no documentation, my entire first day was spent installing jar files, and there are hardcoded paths littered throughout the codebase.
The flipside is that the company is profitable. People are buying our stuff. And getting lots of investment. I'm considering bringing the issue up with the CEO, because I see the current situation as being a huge liability in terms of getting smart people to join the team.
I see four options:
1) Don't do anything. Watch the company crumble and struggle to hire new engineers.
2) Bring up the issues I've noted here with the CTO and see what happens.
3) Rewrite the codebase in a maintainable format and present it to everyone without telling the CTO.
4) Quit.
What do I do? <comment><USER2> I'm in a very similar situation to yours: A startup using java, quite profitable, outside funding, bad code, stubborn CTO, database used as dumping ground for everything: logs/stats/messages etc (this is very wrong when you're working at the kind of scale that we're at).

(Hey...! Are you the new guy that sits by the water cooler?! I hope thats not my code you were talking about!)

Here's what I did:

\- I ended up getting into a small argument with the CTO. He now knows that I'm smart enough and treats me with respect. I stood my ground but also offered solutions to improve and also accepted some of theirs.

\- After working for a few months, I've realized that even though there are bad parts, some parts are actually good. New/other devs are improving the codebase.

\- I file bugs with regularity- I didn't do this at the start but just picked it up. This way things that I come across go into a bug tracking system and can be handled eventually.

\- Now that I'm involved in more parts of the code, I can refactor small bits as I come across them with my daily tasks/projects.

\- There are other things that I'm collecting in a document which I'll converse with the PM etc about. Most importantly all these will be things that I can do and will not blame the CTO. For e.g. setting up a wiki, documenting the setup process for a new dev (win/unix both), common errors, people on the team, machine ips, purpose for each machine etc.

You have to realize that the world isn't ideal. Because of whatever reasons (bad coders, managers, deadlines etc) projects end up in a crappy state all the time. Make small changes to help and improve that, and you'll be worth 100x more to the company rather than if you just whine about it and blame someone else.

Note that this isn't about accepting crap policies just so you can have an income- this is about realizing that a lot of this stuff is common and being able to improve it. Also realize that you dont know everything in your first week. Your views will certainly change in the coming months.

Finally, the company is _profitable_. A lot of companies get that way by making compromises in the short term (one of those might be bad code quality). This is a situation that can be improved upon. Bad code and a profitable company is a better combination than elegant code and a bankrupt company.

</comment><comment><USER3> Now is the perfect time to start refactoring and start using standard, repeatable processes. You can sell it to the CTO as paying down technical debt to bring new hires onboard quicker, make the code more robust for expansion, and give you intimate familiarity with the code base.

Step one: single step, reproducible build process. This could take weeks (been there done that) but it prevents the business entirely stopping if one of your hidden dependencies dies on you.

Step two: documented Hello Newbie guide to turning a factory defAult machine into a development environment in under an hour.

<comment><AUTHOR> This is so far my most likely plan of action. You are a sage!

<comment><USER4> Be careful though. You want to make sure that you get the appropriate recognition for your work. Unless something is done explicitly to counter it, the default is that unsexy work does not receive recognition commensurate with it's impact. And paying down technical debt is the definition of unsexy work.

If the company is tech savvy enough (and it doesn't seem like it is), work with stakeholders ahead of time to define key metrics and how they are impacting the bottom line of the business. Then, get everyone to agree on what the current values for all key metrics are and try and establish goals & milestones you are shooting for.

eg: Time to deploy a release right now is 5 hours. This impacts the business because developers are unable to push out changes in an agile manner so currently, we release every 3 weeks. I propose to reduce deployment down to less than 15 minutes such that we can aim for 3 releases a week. This has business value because it allows us to respond to customer complaints in an agile manner and empowers developers to build experimental features that might end up turning into major business units. The value to the business in terms of increased customer satisfaction and more innovative development is <you have to fill this in yourself>

If you don't do this, you risk devoting blood, sweat and tears to a project which, once you've completed it, everyone forgets how painful the old system was and assumes that it was always this way.

</comment></comment></comment><comment><USER5> You are wrong! The code works. You are hired to make improvements. Do new stuff, and slowly fix up the parts of the code you don't like.

What you are describing sounds TYPICAL for what people always feel when they see a large chunk of code they did not write themselves. If you quit here, you will quit most other jobs.

The correct way is to spend a year with the codebase slowly fixing it up, while adding features (which is what you are paid to do). If you still feel the same way after a year, then quit.

For now, you were hired to do a job, and you accepted the challenge. What you see is how code usually looks like! Good code is rare. If you quit everytime you see bad code, I guess you're not cut out for software engineering.

That's like a doctor quitting everytime he gets a bunch of patients who insist on eating junk food and smoking cigarettes.

<comment><USER6> I agree - I've been in a similar situation where I inherited a huge chunk of Python code that worked great and played a very significant role in our product's core, but was horrific to understand or maintain (in Python, of all things!).

I stuck with it for the past 1.5 years and finally got the green light to rewrite it from scratch. Because I worked so hard to figure out what the hell was going on for so long, the actual coding from scratch took less than a month. Bottom line - if you're being paid well, like the environment and think the company has potential and that you have room to grow there, give it some time before you decide to quit.

</comment></comment><comment><USER7> I would go with #2, but in a non-confrontational manner.

Presumably the CTO got a lot of the existing codebase into place, and in a rush. If the flipside of that is that the company has a successful product which is attracting customers and investors, he had his priorities right.

There is a chance he'll get defensive and attempt to rationalise his decisions. The odds of this go up if you're confrontational about things.

He may also think he's right on some fronts. He could _be_ right on some fronts. If every engineer in the company is using Eclipse, is it really a problem that people haven't spent time making sure the codebase compiles outside of Eclipse?

I would advise you to be open about the way you would do things, and to do things that way if you don't encounter opposition. Getting argumentative and/or getting into commit wars is unlikely to help your cause.

(If you want to keep your job at all costs, shutting your mouth gives you the best odds, especially if the CTO really is a dick. But it doesn't sound like that's what you want to do).

<comment><AUTHOR> Yeah, absolutely.

You're probably right about everything here. I'm the third engineer, and you guessed correctly that everyone else is using Eclipse.

I think the best way to go about it may be to formulate my opinion in a way that makes it clear that I only have the company's best interests at heart, and this is nothing personal. It's just an honest assessment of the situation.

</comment></comment><comment><USER8> The correct choice is 2. The CTO is the one who's officially tasked with making those decisions, so that's the channel to go through. I'd approach it as "this code is very hard to work with for new people coming on board, here are some suggestions to improve, I'd like to spend 25% of my time working on cleanup type tasks."

If he's not reasonable, look for another gig.

For now, use the tools the rest of the team is using. For the future, get it building in ant on Hudson.

Step one on this path is probably to set up a wiki and write a "welcome to company x, here's how to compile our garbage" page. When it's all laid out in it's 35 step glory, it'll be apparent that you have a point.

</comment><comment><USER9> > _"The flipside is that the company is profitable"_

That's backwards.

The flipside is that the code is spaghetti. Profits are the hit single.

A good CTO puts profits before code aesthetics. The CTO is your boss. Going to CEO is a bad move.

Option 1: Bad code may limit the companies growth, but businesses can muddle along with less than optimum processes.

Option 2: Have evidence that the "issues" you anticipate are having an effect on profitability before having this discussion. After a couple of days you probably don't have enough information to make that judgment.

Option 3: Rewriting the code base is a team decision.

Good luck.

</comment><comment><USER10> This sounds fixable, but you absolutely must create some space to fix the problems. Don't even think about #3 -- it's not doable, and it sounds like the problem isn't just software. Start with #2, pointing out that it's going to get impossible to add features, scale, fix bugs, ... until the code and its environment improves.

Read Joel Spolsky's famous list of 12 things that a software company must do (<http://www.joelonsoftware.com/articles/fog0000000043.html>). If you aren't doing at least 9-10 of these, (and it sounds like you don't), you have to fix that. Or your company will die.

Your CTO may say that he'll fix things as you recommend, and then do nothing. If that happens, then go to the CEO, and explain why these things have to happen. If he says the right things and then does nothing, your company will die. This will all take 6 months to play out, at least. If after 6 months nothing has changed, you might want to consider your options. But hopefully your CTO listens and really does something.

If hiring is a top priority, you could point out that the horrendous code and environment will make it difficult to hire good people. Also, that fixing things is likely to reduce headcount requirements. Don't make your case in terms that make sense to you -- make your case in terms that make sense to your CTO and CEO.

</comment><comment><USER11> Technical problems at a company in a good market with a good team are the best problems to have. I'd far prefer that to finding out the team and founders are fundamentally defective, or that you've built an awesome product with a great term in a market segment which just doesn't exist (luxury goods for the poor and homeless, etc.)

Just remember, you need to resolve the technical issues while also building rapport with the team and maintaining your relationships -- don't win battles in which screw you in the long term.

</comment><comment><USER12> To be honest this sounds like a pretty typical gig. When you're rushing to get code together short cuts get made - paths get hard-coded, documentation doesn't get written.

Your gripes seem fairly minor. Not sure how something compiles in eclipse but not outside it (env variables, classpath, VM args?). And spending a day getting set up seems pretty rapid.

1) I don't think the business is going to crumble as a result of these issues. In fact it sounds quite the reverse, what with the investment and sales the business is making. If you quit they'll hire someone else who's maybe a bit more realistic about what real-world code bases look like.

2) You don't want to starting whining too early. Go with the flow, make incremental improvements as you go forward.

3) No. This will be a big job, and many things will have been doen the way they are for a reason. You risk annoying all your colleagues this way, and potentially creating more work when stuff breaks.

4) As I said above, this sounds pretty typical. Knuckle down. You are after all moving to a new language, it will take some time to get up to speed.

</comment><comment><USER13> The problem is not really specific to your company, we've been in the same situation also, although we were quite experienced, and I guess it happens to lots more companies. Fortunately we managed to turn it around.

We've started our company ~4 years ago and got our first customer immediately without even having a product. We build carrier-grade VoIP platforms for internet service providers, so it needs to be really reliable, and it needs to handle hundrets of thousands of customers. So we started out building the platform on a tight time-line (~6 months from nothing to go-live), taking all actions necessary to deliver. It was a great success, but it was really tailored specifically to that customer. Immediately afterwards, we did another project of that scale, and then another one. All of them worked really well, we've always been profitable, but it was quite hard to maintain them, let's put it that way. Beside that, it was next to impossible to scale the business in a reasonable way while keeping up the product's quality.

In order to fix this issue, we decided to make a bold move and planned to release the product as open-source (we're quite deeply involved in different large open-source projects, so we know the business behind it quite well). This forced us to convert the platform into a stage that literally everybody can install and maintain it. We hired two people to help us ripping apart all the different parts, review, package and document them, re-put them together in a standardized way and create a software bundle which allows reproducable builds (there are like 100 different software components involved, half of them from other open-source projects, half of them from us, and they need to be integrated with each other really tightly).

The result was a clean, well-documented platform, which now can be installed within 15 minutes with very small manual intervention. It now also allows seamless software upgrades, and we can plug different commercial modules on top of it to still have a viable business model. We're going to release it to the public next week, so we definitely succeeded cleaning up our mess. It took us 18 months to do so though, so it's hard, it costs a lot of resources (money, time, dedication of the people behind it), but it's definitely possible.

We did a presentation (sorry, German only, but you'll still get the idea I guess) about the concepts of it, see [http://glt09.linuxtage.at/slides/hochverfuegbare_voip- system...](http://glt09.linuxtage.at/slides/hochverfuegbare_voip- systeme_im_carrier-umfeld-glt09.pdf)

</comment><comment><USER14> The situation you are in sounds fixable but by no means easy. I agree with patio11 in that you need to start trying to make changes incrementally and try to presently in as positive manner to others as possible. Never try to start a conversation with the phrase "so there's this really messed up code that I'd like to fix".

The classic mistake that young, hungry developers make is wanting to come in and shake things up by pointing out everything wrong and then trying to come off as a savior by fixing everything. While this may actually be the possible, it's not likely how your PM or CTO will see it. More likely you will just be perceived as a "Dwight Schrute" and regarded similarly.

I would say go with your option #2 but make sure to:

A) Make changes in as small of increments as possible. Don't even call them changes. It's less recognition but will be easier to pull of in the long run.

B) Make sure you don't hold back on crediting yourself in the documentation though since that's what new hires will see first and should also be the first "change" that you make.

C) Make sure that you communicate any changes that you make in as positive of a manner as possible at all times. This is key for reducing resistance. You will probably basically find yourself having to regularly "sell" things such as new libraries, IDEs, ect...

D) If you consistently face ongoing frustration don't hesitate to send out resumes and job apps. Even if your not serious I find that getting "We'd like you stop by next week for an interview..." emails have been a great stress reducer when I've been frustrated with my job.

Anyway, that's probably more crappy advice than you need so I'll stop there. Honestly if I were in your situation, from what it sounds like, I would only give myself about a 20% chance of actually being able to stay there with my sanity.

</comment><comment><USER15> I agree with what others have said - if I were you, I would go for #2, and if that fails, #4. If you like your co-workers and the other non-codebase related aspects of the job, it is worth trying to make it work, but only if you can get the CTO on board :)

</comment><comment><USER16> You were hired to engineer, so, fix things.

No one steps into their ideal work place, we all get crap and make it work. Get your house in order, demand more power, put in more hours than you're paid to, show initiative.

</comment><comment><USER17> Have you asked the CTO (or another engineer) about the history of the codebase? It certainly sounds like they were busy getting something working, with little time for niceties.

After getting a bit more background, then maybe you could suggest that since there are now paying customers, maintainability has gained significantly in importance, especially since the company has gained a much better idea of what works for the customers.

</comment><comment><USER18> Lots of good advice here.

One other thing to keep in mind: everything is a business decision, whether or not the people knew it when they built it.

He may not be a great CTO but they do have a profitable product. There are many companies with beautiful code bases and no money.

</comment><comment><USER19> How long have you been with the company? Do you like the people you work with?

<comment><AUTHOR> I've been with the company less than a week now. I like my coworkers a lot.

</comment></comment><comment><USER20> I find it most efficient to simply ask questions in these situations. (e.g. "Why do we ...?", "Have we discussed...?", "Is it a concern that....?)

</comment><comment><USER21> I think #2 is the best option... If the CTO still doesn't have a clue, then you consider #4, but there's no reason you shouldn't be completely upfront with the CTO first.

<comment><AUTHOR> That's also my first inclination. I wouldn't want to do something that's completely rash and burn bridges. OTOH, I'm not really sure how I might bring it up.

</comment></comment><comment><USER22> As with any problem, I think the solution is to solve it:

1) Identify the problem

2) Come up with a solution

3) Present to your CTO

Don't just complain. That's probably the worst thing you can do. You might hint that you feel things need work and offer to fix them before putting too much effort in. If you're shut down, start looking for a new job.

If it was your company, what would you want your new engineer to do? Definitely not just identify the problem - because that's just easy and doesn't carry much credibility. Nobody likes a nay-sayer.</comment>


Micron puts Phase-Change Memory into production - <AUTHOR> http://investors.micron.com/releasedetail.cfm?ReleaseID=692563

<comment><AUTHOR> This, along with HP's memristor technology, are both potential disruptions in the non-volatile space. Phase-Change Memory (PCM) is faster than flash but both it and flash have issues with minimum feature size since they depend on very specific physics to work (heat in the PCM case, electrons in Flash's case).

A VC asked me if I saw these things disrupting the disk industry, and frankly I don't. At NetApp they used a term 'near line' to describe their SATA based filers. The concept was that these things were dense enough and cheap enough that you could put data that normally would be 'offline' on tape, online on disks, except with performance limitations (hence nearline rather than online).

I see these as nearline memory, dense and non-volatile so you don't have to re-initialize after a power failure, you put data in this stuff that would otherwise be in memory.

If we could get Intel to support a damn IO MMU such that the 64 bit PCIe space could bad added into the page tables like RAM is, we could actually make good progress in systems design. (insert rant about using a disk API to talk to memory chips here ...)

</comment><comment><USER2> Samsung had an 8Gb PRAM at ISSCC12, but I haven't heard if it's gone into production.

Most of the memory manufactures are aiming for cellphones where I guess they believe they have chance of going against flash even with lower density. The only other product I've seen with new ram technology is a hybrid SSD containing some MRAM as cache.

I can't wait for this to get mature enough to get a nice reliable (even if small) SSD without flash's issues.</comment>


US police shootings 'grossly underreported' - <AUTHOR> http://www.stuff.co.nz/world/americas/69010460/us-police-shootings-grossly-underreported

<comment><USER2> So, 16% of those shot are unarmed, or armed with toys (that presumably resemble real weapons).

That's something that should be considered - more than 84% of people shot by cops are armed with lethal weapons. Knowledge of that statistic might sway you when considering a shoot / no-shoot reaction.

I think there are many problems at work here, and police brutality and militarization are just two of them.</comment>


Palm Smacked Down In USB Dispute With Apple - <AUTHOR> http://www.businessweek.com/technology/ByteOfTheApple/blog/archives/2009/09/palm_smacked_do.html

<comment><USER2> This pointless game Palm is playing makes no sense to me. Has nobody at Palm ever owned a Mac and a Nokia phone or Blackberry?

I just don't understand why they didn't take the obvious and professional route (that many other companies have taken), and just access the public XML file that iTunes generates to allow 3rd party syncing applications.

It would be a much more significant issue had there been no way for 3rd party devices to access the iTunes library. But there is, and its been there forever & is in use by other phone companies for the exact same purpose Palm is attempting to achieve.

What does Palm stand to gain from a feature that can break at another companies whim with no advance notice?

Its a shame too, because besides this one really stupid move, I'm really starting to like Palm's current direction. A new OS that is actually out, on new devices, with more in the pipeline? And I can actually hold this device with this OS in my hand rather than just reading about it? Bring on the new Palm.

Just drop this one stupid issue, PLEASE. To everyone but Engadget commenters, it makes them look bad.

</comment><comment><USER3> Sure seemed there was no way this could go any other way for Palm. Their letter to USB seemed a PR stunt at best, and likely to backfire at worst. For the sake of OS stability, I'm glad it did.

Each vendor of devices and software for those devices should be able to have its drivers and apps listen to and interact with its own devices without worrying about interlopers.

Good for USB-IF.

</comment><comment><USER4> The USB-IF, Inc. Board of Directors is composed of the following companies and their designated representative Directors:

        * Hewlett-Packard Company - Alan Berkema
        * Intel Corporation - Jeff Ravencraft
        * LSI Corporation - Dave Thompson
        * Microsoft Corporation - Fred Bhesania
        * NEC Corporation - Steve Roux
        * ST-Ericsson - Geert Knapen

Microsoft has always been pro DRM. Intel has leaned pro DRM often. I don't know where HP, NEC, or Ericsson stand, but If the first two hold any sway, I'm not surprised by this ruling.

<comment><AUTHOR> This doesn't seem to me to be very much about DRM. Palm is making use of Apple's USB identifier in an unauthorized way.

Nobody is stopping Palm from syncing their Pre with iTunes. They should write their own sync app and be done with it.

</comment></comment><comment><USER5> Simple solution: Palm should make the USB ID field a text box in a preferences screen somewhere.

It would default to the correct "Palm" ID, but hey, if the user wants to change it...</comment>


Pycon 2008 Disappointment  - <AUTHOR> http://groups.google.com/group/comp.lang.python/browse_thread/thread/2b6cb0e7245347be#

<comment><USER2> I was at Pycon this week. While I'd like to see no highlighted sponsor talks in the lightning talks (I was bumped partially due to them eating up available time), I didn't feel like the rest of the con was particularly bad. The talks from White Oaks and Google were good keynotes and not at all marketingesque.

Will attend again next year. Some brilliant minds running around at that conference. Absolutely no press, which is odd given how many clever things are being discussed.

<comment><USER2> test

</comment></comment><comment><USER3> Seems to be the opposite of Startup School, which is not only free but so content rich.

</comment><comment><USER4> Well, I dont think they need the money - why then, why?

<comment><USER5> Aahz says later on in the thread that they did it to keep attendance cost down.

</comment></comment><comment><USER6> Oh dear.

<comment><USER7> My sentiments exactly.

As a Python outsider (Ruby won the coin flip, so I still haven't learned much Python) can I ask for a translation from the Python wizards in the audience? Is this a Zed-Shaw-style rant with 80% fewer swear words? i.e. "I'm annoyed because marketing departments have discovered my favorite tool and now my breakfast cereal is full of tchotchkes?" Or is this a symptom of an actual problem in the Python core community?

One of the annoying side effects of developing a reputation for success is that corporate IT wants very badly to talk to you. I'm watching the Drupal community go through this now, I've seen the Ruby folks trying to cope with Rails mania, and this looks like it might be the same thing. It's annoying, like a headache, but in the immortal words of PG, headaches can be a sign of good things -- for example, you might be recovering consciousness after a blow on the head.

In this case, we might be seeing a sign that Python is developing a popular reputation for success! And that's good... although it may mean that people need to start holding smaller, less formal meetings in odd corners if they want to actually discuss anything.

<comment><USER8> This is definitely not a symptom of problems in the Python community. Certain people will always be disappointed no matter what happens, and some of them can write well and make it seem like it's really a wide spread problem.

Personally I'm glad to see more companies become interested in Python and I'm looking forward to how PyCon evolves going forward. The thing to keep in mind is that PyCon is really a volunteer run conference. If you don't like something, volunteer to make it better. Don't like the talks this year? Join the selection committee for next year and help pick better talks.</comment></comment></comment>


Windows does not support "aux" as valid directory/file name - <AUTHOR> https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file <comment><AUTHOR> Today, one colleague of mine was claiming that he was not able to clone my repository. I'm on Linux, he's on Windows. In disbelief, I fire up my Win VM and try. Indeed, I get "cannot checkout to invalid path aux/foo/0001-bar.patch". At first I thought Windows cannot support 5-character extensions, but then I realized it just doesn't support "aux". Coincidentally, I also had a aux.py somewhere in the repo, which was also badly received. I meant to use aux for auxiliary stuff, and the name didn't sound too crazy at the beginning, but then it is for Windows after all. Just a tale for precautionary naming.

</comment><comment><USER2> AUX: is a device name in MSDOS/Windows. There are several others in the same situation. The names _can_ be used but you need to use sneaky, underhand methods. :)

[https://www.thewindowsclub.com/create-restricted-files- folde...](https://www.thewindowsclub.com/create-restricted-files-folders-con- aux-nul-click-windows)</comment>


Winamp creator releases REAPER v4 digital audio workstation software - <AUTHOR> http://www.ausgamers.com/forums/general/thread.php/3094896

<comment><USER2> official site - <http://reaper.fm/>

I've been using reaper for a couple of weeks now and cannot believe that anyone would want to go back to _insert $500+ big name daw_ after using it.

</comment><comment><USER3> Reaper vs Cubase thread:

[http://www.gearslutz.com/board/music- computers/171997-reaper...](http://www.gearslutz.com/board/music- computers/171997-reaper-vs-cubase.html)</comment>


SMS 4x More Expensive Than Data From Hubble - <AUTHOR> http://www.physorg.com/news129793047.html <comment><USER2> It doesn't just cost consumers either. If you're a developer who wants to implement SMS in an app, you're looking at probably $.05 per message, maybe shaving a bit off with a volume buy.

I had a fun app that I have largely given up on once I realized it was just too cost prohibitive to offer the service for free and allow SMS messaging.

(This was using Clickatell btw.)

<comment><USER3> Is this true? My server sends SMS' to cells without problems. I've been sending them to email addresses like firstname.lastname@example.com (for a verizon cell). Is it because my volume is low that I am allowed to do this for free, or because I am using the email address format?

<comment><USER2> Yeah, you can send them via email for free. There may or may not be other restrictions that I"m aware of.

Your method, however, requires the user to know the provider of the number. In the application I had made, users could send messages via SMS by just typing in the number.

(Also, at least for my own provider, AT&T, some crud ends up in the message, e.g the subject line of the email.)

<comment><USER3> Thanks. I hope there aren't restrictions but if there are, I'll find out the hard way in the next few months. Yeah, crud ends up in my Verizon messages to. I'm using PHP though and have been able to mess around with headers and such to send clean messages.

</comment></comment></comment></comment><comment><USER4> As a customer, I hate getting gouged by text messaging.

As an entrepreneur, it gives me hope that there are useful services which people are willing to pay for directly. The social/viral distribution of sms is impressive: it costs me to send a message to my friends, and I'm encouraging them to spend money with their provider in order to respond.

</comment><comment><USER5> I really don't see that "dollars per byte" is a sensible way to measure the price of transferring data.

If it makes you feel any better, think of the SMS fee it as a five pence fee for establishing the connection, and then a negligible per-byte cost which gets rounded down to zero cents. Happy now? Is five pence really all that unreasonable a price for sending a message?

Don't get me wrong: phone companies do all sorts of things which are annoying, overpriced and/or unethical, but I don't see this as one of them.

</comment><comment><USER6> this kind of gouging has to turn off consumers. I know when I heard a gallon of inkjet ink was $4,000 I immediately started looking for better solutions

<comment><USER7> By volume, inkjet ink is more expensive than vintage champagne. By volume, SMS is more expensive than hand delivered postcards. There's no excuse for such gouging.

<comment><USER8> By volume, 20oz bottled water is more expensive than gasoline. And will continue to be so until gas hits $7/gallon.

Smart industries charge what the market will bear.

<comment><USER9> I don't know if gasoline in 20oz containers would be any cheaper than water.

</comment></comment></comment></comment><comment><USER10> Talk about comparing apples to oranges. I could send a few terabytes (or 100 32GB SD cards) from one location to another for about $20 and compare the costs of sending data on the Internet unfavorably to it. Like this, however, such a comparison would make no sense.

<comment><USER11> OK, let's talk about how sending data via SMS is astronomically more expensive than sending data over a standard broadband Internet connection, a more terrestrial comparison.

<comment><USER5> Why not talk about how, for most short messages, sending an SMS is cheaper than making a phone call to transmit the same information?

The real question is: who says that the cost of transmitting information should be linear with the amount of data? If you want to transmit a hundred bytes then SMS is a good way to do it. If you want to transmit five gigs, then some other way would be better.

<comment><USER11> Because that's how things work in a lot of other services?

For instance, if you sign up for shared hosting and go over your alloted bandwidth, they may charge you $0.50 a gigabyte or so. That is linear and it seems reasonable.

What would happen if you could stream high-quality video from mobile phones? With large data transfer capabilities would come interesting new possibilities for markets, companjies, and customers.

</comment></comment></comment></comment><comment><USER11> Talk to someone in the mobile industry and they'll brush this off as "not being afraid to charge for value", or at least that's how someone like Russell Beattie describes it.

<comment><USER12> Which "value" is he referring to? It seems more like they charge this much because consumers lack better options than to put up with it.

<comment><USER11> People find rationalizations for doing unethical things.

I'm sure oil executives talk with each other about, literally, powering America.

<comment><USER13> What is wrong about powering America?</comment></comment></comment></comment>


Counting raindrops using mobile-phone towers - <AUTHOR> https://www.economist.com/news/science-and-technology/21729740-rain-affects-signal-strength-which-means-you-can-measure-it-counting-raindrops <comment><USER2> Back in 2002–2004 when DSL wasn't a commodity, a local ISP offered WLAN access. We lived on a ridge and had a clean line of sight – some 2.6 km – to one of the base stations so we set up a spare satellite dish with a peanut can feed and were happy customers thereafter.

In the dry winter months the we had some 22 dB of signal-to-noise ratio and during the summer months it fell to 15 ish dB. The link became unusable at around 11 decibels of SNR, which we hit during heavy rain and fog. Just looking at the link quality would tell you as much as peeking out of the window.

</comment><comment><USER3> Are they really counting raindrops though, or just estimating rainfall intensity?

I'm guessing the latter --- in which case, I'm not sure I'm a fan of the sensationalism....

Regardless, is there a good resource for the modeling done in this?

<comment><USER4> They are not

 _Rain affects signal strength, which means you can measure it_

 _Some newer networks are sufficiently sensitive that they can detect humidity and fog, both of which are predictors of imminent rain._

The idea is to use mobile towers as cheap weather stations/precipitation radars especially in developing countries.

</comment></comment><comment><USER5> Full article: [http://archive.is/1E59I](http://archive.is/1E59I)

</comment><comment><USER6> Mobile towers as radar for military use -

[http://www.telegraph.co.uk/news/uknews/1309952/Mobile- teleph...](http://www.telegraph.co.uk/news/uknews/1309952/Mobile-telephone- masts-can-detect-stealth-bombers.html)

<comment><USER7> An article long on patriotism, short on detail! The boffins at Roke Manor are presumably talking about passive radar:

[https://en.wikipedia.org/wiki/Passive_radar](https://en.wikipedia.org/wiki/Passive_radar)

Ah yes:

[https://www.electronicsweekly.com/news/archived/resources- ar...](https://www.electronicsweekly.com/news/archived/resources- archived/roke-manor-research-uses-mobile-phone-signals-to-make-cheap-2002-07/)

The most impressive passive radar idea i've heard is to use GPS signals as the illumination. There is really no escape from those.

</comment></comment><comment><USER8> Counting raindrops using umbrellas: [https://news.ycombinator.com/item?id=15383330](https://news.ycombinator.com/item?id=15383330)

</comment><comment><USER9> Really interesting.

Didn't get the paywall everyone else did.

Here's the raw text:

NO ONE knows exactly how many people died in a series of mudslides that happened in and near Freetown, the capital of Sierra Leone, on August 14th. The upper estimates are more than a thousand. The areas swept away had not been evacuated partly because no one knew how much rain had actually fallen beforehand, laments Modeste Kacou, a rainfall expert at Félix Houphouët-Boigny University in Abidjan, in nearby Ivory Coast. Rain gauges are sparse in Sierra Leone. Satellites detect rainfall in the tropics, but estimates for small areas are often inaccurate. Worse, these numbers are calculated hours after the fact. Many countries therefore use cloud-scanning ground radar to measure precipitation as it is happening, but Sierra Leone has no such radar.

Nor do many other poor countries. Ivory Coast has double the GDP per person of Sierra Leone, but like most of west Africa, it also lacks precipitation radar. Indeed, maintenance costs mean that the number of weather stations around the entire world is shrinking, making it harder to forecast flash floods and landslides even in some rich countries. It would be useful, therefore, if some other way of measuring rainfall—preferably a cheap one that employs existing, widespread equipment—could be devised. Fortunately, there is just such a method, and it involves mobile-phone networks.

The basic insight is straightforward enough: rain weakens electromagnetic signals. Many mobile-phone towers, especially in remote areas, use microwaves to communicate with other towers on the network. A dip in the strength of those microwaves could therefore reveal the presence of rain. The technique is not as accurate as rooftop rain gauges. But, as Dr Kacou points out, transmission towers are far more numerous, they report their data automatically and they cost meteorologists nothing. He runs the Ivory Coast operations of Rain Cell Africa, an effort paid for by the World Bank, the UN Foundation, a charity, and the Institute for Development Research, which is based in France, to map rainfall in parts of Africa using data donated by Orange, a big telecoms firm, and Telecel Faso of Burkina Faso, a small one. Had the system been running in Sierra Leone, he reckons evacuations could have been carried out in time.

Rich countries are interested, too. A pilot project in the Netherlands a few years ago produced promising results, but it has not yet been followed up. This month officials in Gothenburg, Sweden, began to study rainfall maps derived from data collected every ten seconds from 418 mobile-phone towers owned by a firm called Hi3G. The hope is this will provide more accurate estimates of rainwater about to slosh into the municipal waterworks, helping managers to limit flooding and sewage overflows. Until now, the city has relied on 13 rain gauges, backed up by radar sweeps of the sky that are neither sufficiently frequent nor sufficiently precise, says Jafet Andersson, a hydrologist behind the scheme at the Swedish Meteorological and Hydrological Institute. Satellite data on rain in northern latitudes are so poor the agency does not bother using them at all.

Though it is useful to know how much rain is falling right now, forecasting is even better. Telecoms data promise to make this easier as well. Some newer networks are sufficiently sensitive that they can detect humidity and fog, both of which are predictors of imminent rain. Newer generations of mobile- phone masts use shorter wavelengths in their transmissions, because these can carry more data. Serendipitously, that also permits tinier amounts of water to be detected, for moisture weakens short wavelengths more than long ones. Using data from about 5,000 towers operated by three telecoms firms in Israel, Pinhas Alpert of Tel Aviv University creates moisture maps that, he says, are far more precise than those drawn with data from the Israel Meteorological Service's humidity gauges, of which there are fewer than 70.

The right wavelength Moreover, because transmission towers are so common, predicting where rainclouds are being pushed by winds is easy and accurate, notes Dr Andersson. Several governments in Africa and South-East Asia have asked his team to set up rainfall-measurement networks for them. No deals have yet been signed, though, for there is a stumbling block: money.

For the time being, telecoms companies are happy to let forecasters use their data free of charge. As the value of such data becomes clearer, says Frédéric Cazenave of the Institute for Development Research, that is likely to change. Consider ClimaCell, a firm based in Boston, Massachusetts. In April ClimaCell began selling forecasts based on phone-tower data which are so precise, it claims, that its customers will be able to tell "if a plane, crane or game" will get soaked.

The firm's clients include three airlines, several sports leagues, a construction company, a drone operator and a hedge fund (which uses weather forecasts to make trades). It plans to offer its forecasts in India by the end of this year, and to expand into ten more countries in 2018. If ClimaCell pulls that off profitably, telecoms firms in both the rich and poor world are likely to start demanding a slice of the action.

</comment><comment><USER10> Possibly a great story, too bad it's behind a paywall.

</comment><comment><USER11> Paywall.</comment>


Peter Thiel – Understanding Roles in a Startup - <AUTHOR> Hi all, Everyone knows the story of Zuckerberg coding in his dorm, of the video game Steve Jobs sold as a teenager, Bill Gates creating Microsoft in the garage. These programming prodigies who started these lifechanging companies coding by themselves. In reading about Paypal and learning about Peter Thiel he doesn't seem to be an expert in code or on the technical side of the work. He did not go to school for CS, and I can't find where his expertise in the tech world lies. What is his defining skillset? What made him special to PayPal and eventually Palentir? I know my weaknesses and I want to provide value at a startup level but am struggling to find a space that needs to be filled.
Do you know what each Founders role was in the rise of Paypal?
What are essential roles that every startup needs to fill from the getgo? <comment><USER2> Money, legal, strategy, and dealmaking. Thiel was trained as a lawyer, then worked for Credit Suisse and started his own hedge fund.

If you read the Max Levchin interview in Founders At Work, the way PayPal started was that Max wanted to do crypto (back when it meant cryptography, not cryptocurrency) at Stanford, attended a lecture by Thiel, and Thiel said "Go do it. My hedge fund will invest in you." Then there were about 4 pivots, then the company Levchin & Thiel founded (Confinity) merged with its primary competitor, Elon Musk's X.com, in a deal brokered by Thiel. Elon Musk's primary contribution was supposedly trying to rewrite the software in Windows (the interview was with Levchin, it's likely somewhat biased - Thiel is more complimentary towards Musk and says he was a fearsome competitor). Then it found product/market fit amongst E-bay sellers, rode the hyper-growth wave, went public, and was eventually bought by E-bay.

<comment><AUTHOR> Thanks, can you link to the article/interview?

<comment><USER2> It's a book (of the dead-tree sort), not an online article:

[https://www.amazon.com/Founders-Work-Stories-Startups- Early-...](https://www.amazon.com/Founders-Work-Stories-Startups-Early- ebook/dp/B009IXMK4O)

Author is a co-founder of the site you're posting this on, BTW.

<comment><AUTHOR> Thanks, I appreciate it.

</comment></comment></comment></comment><comment><USER3> Steve Jobs was not a programmer. He was the marketing guy. Woz was the engineer.

</comment><comment><USER4> % 100 focus</comment>