Toronto Is in a Housing Bubble - <AUTHOR> http://www.greaterfool.ca/2017/03/04/its-official-its-a-bubble/ <comment><USER2> I live in Vancouver - which has become one of the most unaffordable cities in the world[1] and am from Toronto.

Watching Toronto's market explode is like watching a horror movie that I saw take place in Vancouver over the last two years. The politicians, press, and real estate industry are spinning the same stories their counterparts in Vancouver did without providing an even plausible explanation for the rocket ship growth.

The key issue with Vancouver's market is that prices have become decoupled from local incomes. The same thing is happening in Toronto.

In Vancouver, the main driver of decoupled home prices is foreign investment dollars, mainly from China. I suspect the same is true in Toronto because prices there started exploding after Vancouver instituted a 15% tax on foreign buyers in August 2016.

If you're interested in understanding the key drivers of the Vancouver real estate market, this paper by a SFU professor summarizes the data, provides a sensible solution, and convincingly refutes the tropes that are often provided as reasoning for the market's explosion:

[http://www.sfu.ca/content/dam/sfu/mpp/pdfs/Vancouver's%20Hou...](http://www.sfu.ca/content/dam/sfu/mpp/pdfs/Vancouver's%20Housing%20Affordability%20Crisis%20Report%202016%20Final%20Version.pdf)

1 - where unaffordable is defined as the ratio of median home price to median income.

<comment><USER3> I don't know how to write this without sounding entitled, so here it goes anyway: I own a house in Toronto (purchased May 2016), I do not believe it's affordable for your average Canadian, but I do think it's still within reach for skilled people who are willing to make sacrifices to make it possible.

Single data point as an example: Last month a friend, who between he and his partner make approx. $200k (before tax) combined household income, bought a semi-detached property on the east end (west of the DVP, south of Dundas). "$200k you say, that is a lot!", right, it isn't insignificant, but it's also just two skilled people who make $100k in a major city. There are a significant volume of $100k jobs out there (so if they lose them, I suspect they will find another fairly soon). It's just not as impossible to do as people say, but most of us are not willing to pack a lunch every day, stop drinking lattes make it possible.

When hunting for a house in Toronto there were 3 things that really bugged me that would be great to have addressed before we freak out over the possibility of foreign money:

1) "Second round of offers". It's a trick relators play. Basically they get all the offers together and then come back and say "uh, they're all super close, we're looking to get an outlier". Of course some people come back with bigger offers...and the highest is accepted, or the highest offer from the previous round is accepted.

2) Poorly done home-owner renovations. People doing shitty renovations and then later selling the place (often these are flips). Uneducated buyers see these 'improvements' as positive things when most of the work will be to be re-done due to the job not being done properly. It just keeps Home Depot humming and inflates the cost of the house by the cost of materials + repairs down the road. It's compounded by the fact all offers [in practice] need to be unconditional or they won't get considered. So no inspection, the buyer doesn't get the chance to really find out until later. Sellers often include inspections, but these are always terrible sources of info.

3) Illegal housing; So many listings say "Potential basement suite", and people do the math expecting to get $800-1500 / month extra income from it. They say "potential" in the listing because it's nearly impossible to create an actual legal basement apartment in your house in Toronto [and they know it], but people are willing to risk it or simply unaware of the exposure this places on them. Legal basement apartments need fire rated rooms, to include a parking spot (which is super hard to do in Toronto!), have a separate HVAC system and much much more. 99% of basement apartments do not comply, but due to either people not knowing, or not caring, they rent them out to increase their housing budget. Banks are partly to blame here, they enable this by increasing the lending amount accordingly based on an assumption that the second unit will be rented 10/12 months per year.

I think the thing we're truly seeing here is what access to cheap capital produces in established major (aka historically low risk) cities. Interest rates are sub 3% with no signs of increasing, people make decent money and are willing to sign up for 30 year commitments. There is risk, but when you look at the key factors, it's pretty low give the likely outcome over that time horizon. This isn't a small suburb hours away from a major city [i.e. Hamilton Ontario - where prices are going up despite the fact lots of the residents commute hours to Toronto every day] where one company going broke will send everyone into the poor house, it's a major city with a very good history of having available skilled work.

I'm personally more worried about robots taking skilled jobs than I am the possible housing market crashing. Those things will probably be related events, and housing will be one of the many industries not ready for that shift.

Finally, having said all this, a well timed quote from a conversation i had on Friday "If i lose half the value in my house, i won't be upset or surprised...I went into it assuming things might not go my way". Not everyone has that luxury or time horizon to not mind waiting around like I do, but I'd encourage more people to not see a house as an investment but more as a cost (as you would rent) and use that emotional response you get to help you justify your next decision in the house buying process.

<comment><USER4> I think you nailed it.

1\. On top of that, there is also the fact that 100K new ppl move into the GTA every year. A good chunk of the wants to live in DT Toronto, further reducing the small supply;

2\. Toronto produces 30% of Canada's economic output;

3\. By many metrics, Toronto is extremely underpriced for the job and quality of life you get compared to other countries' largest cities;

4\. Toronto is the 3rd largest North American city;

5\. It's possible part of the prices are just tracking the USD as the CAD dropped ;and

6\. The truth is, the majority of the Canadian population won't know/accept that in this single city people make 5-10x the income they make, hence "bubble" being thrown around as the obvious answer.

<comment><USER5> Toronto has been the economic and immigration centre of Canada for 20 years. Why has there suddenly been an inflection point in the rate of price growth in the last 2-3 years? [1] What about Toronto's economic fundamentals (i.e. the capacity of Torontonians to pay for housing) has changed in that period?

Don't get me wrong, there are definitely organic factors that contribute to the price growth in Toronto. But those cannot account for >15% year-over-year growth.

[1] [http://www.torontohomes-for- sale.com/4a_custpage_2578.html](http://www.torontohomes-for- sale.com/4a_custpage_2578.html)

<comment><USER3> I think point 5 is likely important to recognize. The CAD to USD ratio has dropped dramatically (Currently 1 USD = 1.33 CAD). If you picked the exchange from 5 years ago you see it was 1 USD = 1 CAD, if you do 10 years it was 1 USD = 1.07 CAD.

I'd argue that at least 20% of the price increase we're dealing with today is related to inflation.

<comment><USER6> Then how come there isn't a 20% increase in cities like Québec, Montréal, Calgary or Winnipeg?

<comment><USER3> Have you visited those cities? I don't find it surprising at all.

Quebec / Montreal: historical politics pushed investment to toronto when separation was on the table and pushed by certain political groups (again bumping toronto prices and not helping those areas at all!)

Winnipeg / Calgary: isolation from other large cities, colder climate, less immigration friendly.

<comment><USER7> >Winnipeg / Calgary: isolation from other large cities, colder climate, less immigration friendly.

Isn't Manitoba one of the easiest provinces to immigrate to?

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I just bought a house in Toronto last June. In Etobicoke, quite literally on the outskirts of what you can still call Toronto before entering the suburb of Mississauga.

We got extremely lucky with our home purchase. We had an amazing agent that we've known for years, and we had only started looking in February. By April, we had our home purchased, with a June closing. We had one offer fall through, which in hindsight, thank God that it did. This was our first home purchase (and property).

We managed to snag our house for $5k under listing, after offering $10k under listing. We managed to avoid a bidding war, as no other offers came in. When we found this home, we moved quickly, making an offer that night, and giving them 24 hours to respond (we extended it to 48 for goodwill). This was a home that was renovated from top-to-bottom, and as an engineer, I'm happy to say was done properly.

With that context, now you know why I say we got extremely lucky. We worked hard to make our own luck, but I can't control the opportunities presented to us.

Anyway, we've watched many of our new neighbours sell their homes for 6-7% higher than what we paid. One of our neighbours has an open house going on _right now_ and there are dozens of families coming in cars to check it out. It's listed $20k higher than what we paid for our home, and it's likely to go for $50k above that. We've seen the pictures, and it does not compare to the quality of our home.

So yeah, we might be in a bubble, but people are trying to buy. Speculators and investors may be the ones driving up the prices, but I think there really is just that much demand. People want to live here, and they'll find a way to pay for it.

Personally, I'm not too bothered by it since I didn't buy it as an investment. Sure, I do care about my home value, I want to make some money when I sell in 10 years to move to another home. But that's my unfair advantage compared to everyone else: I can live in my home as long as necessary to wait until the market recovers if this bubble were to pop.

<comment><USER9> "Speculators and investors may be the ones driving up the prices, but I think there really is just that much demand. "

Only 5% of buyers need to be speculative. They drive the 'price anchoring' for the rest - including the banks who 'deem the property to have x value'.

That's how bubbles work - a small number of 'price insensitive buyers' create poorly anchored prices which drive everyone else into the mania.

Those 'buyers' are there only because the banks are happy to give them loans using the asset as backing.

You don't need to be bothered by it as long as you are willing to sit on it for 10+ years and can afford to make the payments.

</comment></comment><comment><USER10> Is there any city that is actually managing to provide enough housing inventory these days? SF, London, NY, Vancouver, Toronto etc - all seem to have low inventories.

Is it simply that there is a multiyear lag before inventory starts coming on stream, or is there some fundamental reason why these larger cities can't provide enough housing?

<comment><USER11> Zoning laws and building heights restrictions and other regulations are to blame. Basically, it's hard to provide enough inventory when doing so in a way that would help (build more buildings and higher ones that can receive more people) is illegal. Why do such regulations exist? Several reasons:

* nepotism, current owners want to keep the inventory low so the price of their property and demand remain high

* nepotism, because owners are afraid tall building will make their city less appealing and lower the price of their property.

* silly zoning laws, because many believe central planning is actually a good thing despite the ridiculous amount of evidence that it doesn't work.

* simple inertia, bad laws and regulations are created all the time but almost never repealed.

I'm probably missing a few other reasons I'm sure others will point them out.

Also something worth saying, owners love to say that adding taller buildings and more buildings and people would kill the spirit of the city. But preventing new buildings has a effect of super high prices that makes it impossible to live in the city, in the end only billionaires can buy homes as investment and don't even live there while the few other building are rented to a few lucky high salary people which creates tension with the rest of the population. So you get a city full of empty houses, super rich people, high salary folks and regular people who are getting kicked out. Real people start living outside the city and its spirit is gone anyway.

<comment><USER12> Some zoning rules could be beneficial. For instance, if cities started mandating 15% of new apartments had to be rentals, or 40% have to be 3 bedrooms, etc. Right now, much of the new housing stock coming online isn't really useful for anyone but single wealthy individuals or speculative investors. And so, without zoning restrictions, we are ending up with cities full of $400,000 empty 1-bedroom condos.

<comment><USER13> > if cities started mandating 15% of new apartments had to be rentals

Why is it so desirable for your landlord to be a business instead of a private individual who bought a condo? What problem does this solve?

> 40% have to be 3 bedrooms

What is this supposed to do? Yuppy roommates are still going to outbid working-class mom and dad every time. See San Francisco.

<comment><USER12> >What problem does this solve?

It prevents them from being bought by speculative investors and taken off the market. An alternative solution to the same problem is an empty-home tax, which is being rolled out in Vancouver.

> What is this supposed to do?

Its pretty obvious isn't it? It increases the supply of viable housing options for families.

I'm not trying to say this is the silver bullet - Its just some ideas.

My honest opinion is that Canadian housing should only be able to be owned by Canadian citizens, but that ship sailed long ago.

</comment></comment></comment></comment></comment><comment><USER14> I own a semi-attached house in Toronto that I purchased last May with my fiancee. I have a few critiques of this article related to the context it places Toronto's housing market, and some of the souped-up language used.

Why compare the Toronto housing bubble with that in Japan or the US? You don't have to look further than Toronto for a direct comparison; [housing prices in Toronto decreased by 40%]([http://www.torontocondobubble.com/2013/02/toronto- housing-bu...](http://www.torontocondobubble.com/2013/02/toronto-housing- bubble-in-1980s.html)) between 1989 and 1997.

Second, a bully offer is not an "aggressively high" offer by definition. A bully offer is simply an offer that is submitted before an agreed upon offer date. He offers no evidence to his argument that houses are going for 6-figures above the asking price.

Last, ideally these statistics would have been given in context. Don't pull two historical housing bubbles and then compare their growth to Toronto's. Rather, pull all fast growth housing markets and compare their behaviour to Toronto's. In other words, how often is this growth _not_ a bubble?

I'm 32 years old and consider myself very fortunate to be able to own in Toronto. This will allow my family to live in the city I love. Many of my friends are facing the choice where if they wait and growth continues they'll may be priced out permanently, but if they buy into the market they may be sitting on a bubble. There was tons of bubble talk when we bought, but we were more worried about being priced out.

<comment><USER15> > He offers no evidence to his argument that houses are going for 6-figures > above the asking price.

This definitely is happening, but it's cherry-picked data. I live in what's considered a desirable area for chinese people (warden and steeles), and the latest sales around my area have mostly been for 6 figures over asking, with some being as high as 200k over asking. But around Unionville (a posh neighbourhood a few mins north), sales have actually been under asking (although, to be fair, the asking prices there are typically >1.5M)

Email me if you want a data source.

</comment></comment><comment><USER16> Yes, Toronto is probably in a house bubble. Is it in a housing bubble, though? If doing more with less is the goal here (as opposed to less inflation on houses in Toronto) why are people missing the relative affordability of condos and apartments? A large flat structure with lots of mostly unused land (by percent utilization) is horribly inefficient.

A condo costs less to live closer to the interesting things like work and culture and the higher density means the bottleneck resource (land) is utilized much more efficiently. I know there are cultural reasons not to, but to me living in houses is not something we would necessarily ever choose if we started today with a blank slate.

I think a world more along the lines of 80-90% green space with a sprinkling of 100+ storey condos in variable sizes and trim levels would be more livable. I struggle to see why one would want a backyard let alone feel entitled to one.

I think the relative price of land to median income will increase as population does (pretty easy to assert) and that we should instead just build very high density buildings surrounded by green space instead of engaging in zero sum competition for an unused backyard.

We talk so much about AI making web services better as a form of progress but how much of the middle class budget goes to web services? Sure it could make life better in the future but housing density could make life significantly better now.

</comment><comment><USER17> sigh..take bubble predictions with salt (people are really bad at predicting this stuff) [http://greyenlightenment.com/crying-wolf-holding-the- pundits...](http://greyenlightenment.com/crying-wolf-holding-the-pundits-and- media-accountable-for-being-wrong-about-snapchat-and-web-2-0/)

You also have to take into account for the fact the Canadian dollar has fallen 25% to the Greenback since 2013

<comment><USER18> I've downvoted your comment because the article is referring to a very specific localized housing bubble in Toronto due (potentially) to the behavior of foreign investors.

This is not an article about startup or the US stock-market bubble.

Addressing your actual comment by paraphrasing Burton Malkiel: "The market can invest irrationally for a surprisingly long period of time."

<comment><USER19> Everyone always uses that quotation to make unfalsifiable claims. Either the prediction is true or the market is irrational.

</comment></comment></comment><comment><USER20> Someone would be dismissed if they said Manhattan, London, Paris, and Rome are in a bubble. It's just accepted that only the rich can buy there.

Toronto's housing situation is called a "bubble" because it's transitioning to a similar, global city status, and a lot of people are having a hard time facing that owning a house there is not meant for them.

I live in High Park. In a one bedroom apartment. I see for sale signs everywhere plastered with 'sold above asking!' labels.

The cold reality in Toronto is that it's just supply and demand. There are a handful of houses, and a handful of people with the resources to buy them and live in this beautiful place.

For the rest, take the GO train.

<comment><USER5> The difference between Toronto and the oft-cited "global cities" of New York, London, Paris, etc. is that all of those cities have a proportionate number of extremely high-earning or high-wealth individuals to support their astronomical housing costs. Manhattan is expensive, but if you work for Goldman or Google you can still afford it. And you can see that this is true because New York, London and Paris all easily support a huge number of businesses catering to the everyday needs of high-wealth individuals. High-end restaurants, luxury car dealerships, tailors - whatever luxury stuff you can imagine, you will easily find it in London or New York.

That is not the case in Toronto. The issue is not that prices are going up, but that they are going up exponentially in a way that doesn't relate at all to the growth of the local economy. Toronto is a city where an expensive restaurant is one that charges more than $40 for an entree. You will not find $100 cocktails or $500 tasting menus a la Hong Kong or New York in Toronto, because there would be nobody to buy them. You can still get a haircut for under $20 and see people in $300 off-the-rack suits in the Financial District, because the people there earn $70,000 or $80,000 not $800,000 or $8,000,000 as in NYC/London.

Supply and demand are both issues, there is a lot of the latter and too little of the former. But to say that Toronto has transformed into one of the richest cities on Earth simply isn't true in any regard except its housing market. And that is precisely the problem - it has the housing market of London with the salaries of Cleveland.

<comment><USER21> >> in the Financial District, because the people there earn $70,000 or $80,000 not $800,000 or $8,000,000 as in NYC/London.

Uh, that is way, way off. A person making 70-80K/year in Toronto Financial district is like... junior analyst, junior software developer or so. That person is not going to make 10X or 100X as much in NYC or London.

<comment><USER5> My point is that the 10x and 100x jobs simply don't exist in any significant quantity in Toronto, and that's why it's not reasonable to say Toronto's housing market should mirror Manhattan's.

<comment><USER21> Sure.

But then, Google "Most expensive homes in NYC" (result: $72M-$120M) vs ""Most expensive homes in Toronto" (result $14.8M-$27.5M)

I guess it is clear that most expensive homes in Toronto are not even close to most expensive homes in NYC.

<comment><USER22> I think the median would be more relevant, since it seems that's what is shifting upward in Toronto.

<comment><USER21> OK, can you provide a comparison of median prices growth Toronto vs NYC?

But make sure you also index that with median salary growth TO vs NYC. And also, you need to take into account CAD vs USD over the time period.

So... not easy.

</comment></comment></comment></comment></comment></comment></comment><comment><USER23> The rocket ship rise of real estate in the GTA and indeed the entire Golden Horseshoe has certainly been bizarre to witness. I live in Hamilton and commute into the GTA for work. We bought our modest 3 bedroom townhome here in 2015. About four months ago our neighbour (who had a basically identical home) sold their unit for 100k higher than we paid. This week, a comparable home was listed for about 180k higher than we paid. So, in under 2 years, the current market value of our house would have seem to appreciated by almost 200k. This is a solid hour commute (by car) from the Toronto core.

So yeah, I'm not too sure whether to be extremely happy or extremely worried..

<comment><USER24> It's difficult for me to judge the significance of that because you report the $ increase instead of %, without a base value.

<comment><USER25> This article: [http://www.cbc.ca/news/canada/toronto/toronto-real-estate- fe...](http://www.cbc.ca/news/canada/toronto/toronto-real-estate- february-1.4008215)

Claims a 35.4% year over year increase. So that's a hot market.

</comment></comment></comment><comment><USER26> The toronto bubble has begun spilling outwards to much of southern ontario as toronto homeowners cash out and move to the smaller cities. Here in Kitchener- Waterloo about 1.5 hrs from toronto house prices leapt 20-30% in the last year, primarily though all cash deals far above asking or assessed value. People flush with toronto cash are over the moon about spending so little on a house (even though it's still an insane figure divorced from reality). And they don't care what shape it's in since they since have more than enough cash leftover to gut the house and redo it.

Foreign money being injected into the process isn't helping, but I think the real problem in Toronto is unbelievably low interest rates and easy access to mortgages. Families are being approved for loans of such absurd proportions that everyone who has entered the real estate market in the last 10 years is house poor. Even small interest rate increases will make payments unaffordable and the whole teetering mess will come down.

Governments have exactly zero incentive to do anything about it, since greater property values means more revenue without the mess of a tax increase. The Ontario land transfer tax isn't high enough to stop anyone from speculating, but it's plenty to cash in on the situation.

<comment><USER25>
        but I think the real problem in Toronto is unbelievably low interest rates and easy access to mortgages.

This really is key. There was no 2008 housing collapse in Canada, but the larger economics pushed interest rates down hard towards zero.

Think of it as housing prices rising to capture most of the cheap money available on loan. If we see a significant and quick increase in prime rates it could see a real bloodbath develop.

</comment></comment><comment><USER27> Seems like a bubble when Asians are buying Canadian properties instead of just buying petroleum or cars etc.

</comment><comment><USER28> So is Lisbon

</comment><comment><USER29> > With stocks hitting new all-time highs almost every day, global bond yields > at or near zero, and Canadian home prices at nose-bleed levels, it seems > like everything these days is in a bubble.

A photo-sharing app with a market capitalization of 34.69 billion. Yes, it's a bubble.

<comment><USER18> I've downvoted your comment because the article is referring to a very specific localized housing bubble in Toronto due (potentially) to the behavior of foreign investors.

This is _not_ an article about startup or the US stock-market bubble.

<comment><USER30> The fact that there are bubbles in numerous places isn't irrelevant though.

<comment><USER31> Actually it is irrelevant. I can find bubbles in Africa and 10 other countries across the world. Screaming "bubbles" in 100 random places, doesn't mean your current place is a bubble. Unless you can justify how those other bubbles are related to the housing situation in the original article, we can't assume they are relevant simply because "there are a lot of bubbles elsewhere".

The 2 issues might be relevant to each other, they might not. But you can't assume there is a relationship between the 2 issues.

<comment><USER30> 10+ years of excessive quantitative easing and negative interest rates by multiple governments around the world might have _a little_ to do with it.

Do you think $1 trillion++ of new debt per year affects nothing?

<comment><USER31> Hey man, nothing personal. Not saying there aren't negative things going on in the world. Heck, it's probably true what you said, the 2 might be related somehow. But without pointing out why, I can't just assume the 2 are related, right?

<comment><USER30> Your first sentence wasn't speculative, hence my reply. :)

<comment><USER31> My bad

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER32> Of course it is. The central bank has inflated.</comment>


Disney and its propaganda against open source in a teen comedy - <AUTHOR> http://abataasis.blogspot.com/2012/08/disney-and-its-propaganda-against-open.html

<comment><USER2> And to think it ruined an otherwise brilliant teen comedy. Next week it'll probably tackle VI vs. Emacs, explaining that Microsoft Word is a superior text editor to both. Maybe the season finale will cover how Bing is a better Internet Decision Engine than Google. Oh, think of the cliffhangers when patent litigation is covered!

</comment><comment><USER3> To people missing the point: it plants the seed of distrust in kids' minds. This is not an innocent mistake which has no consequences. This is not a "goof." This isn't a character writing a virtual IP tracer in self-computing Visual Basix. This is a character saying "never trust open source."

</comment><comment><USER4> meh.

This is almost certainly an instance of "a GUI interface using Visual Basic to track an IP Address" (IOW, a vast simplification written or edited by someone who doesn't really understand the field) rather than a planned attack on open source.

<comment><USER5> I always thought "a GUI interface using Visual Basic" was paid product placement.

<comment><USER4> Yeah Microsoft is dying to get Visual Basic's name in front of all those mainstream primetime television viewers so that when they reach for a programming language to implement criminal tracking software, they'll reach for VB.

Sounds legit.

</comment></comment></comment><comment><USER6> I was not aware that Disney's children shows had become authorities on software.

</comment><comment><USER7> "Don't attribute to malice what can be explained by stupidity"</comment>


A Mathematician's Apology (1940) [pdf] - <AUTHOR> https://www.math.ualberta.ca/mss/misc/A%20Mathematician%27s%20Apology.pdf <comment><USER2> He's incredibly ageist and cynical about man's abilities to do great things. Definitely a curmudgeon, but mixed in with some good quotes and advice.

I particularly thought this was cute:

"It is one of the first duties of a professor, for example, in any subject, to exaggerate a little both the importance of his subject and his own importance in it. A man who is always asking 'Is what I do worth while?' and 'Am I the right person to do it?' will always be ineffective himself and a discouragement to others. He must shut his eyes a little and think a little more of his subject and himself than they deserve."

<comment><USER3> I like Hardy, but I dislike his ageism here too.

Erdős is a good counterexample to his argument. Even Euler. Many famous mathematicians have produced good work late in their lives.

<comment><USER4> Erdos isn't a counter-example to anything. I mean I agree with you. Old people can do math. Look at Yitang Zheng. But Erdos is the exception to every rule ever.

<comment><USER5> Yitang Zhang, not Zheng.

<comment><USER4> Oh darn it. I originally spelled it Yiteng Zheng..I caught one typo. thanks

</comment></comment></comment></comment></comment><comment><USER6> This was Aaron Swartz's inspiration for, "A Non-Programmer's Apology", where he battles with and ultimately justifies his own decision to favour teaching and campaigning over programming, despite being a talented programmer: [http://www.aaronsw.com/weblog/nonapology](http://www.aaronsw.com/weblog/nonapology)

"I am saved, I think, because it appears that Hardy's logic to some extent parallels mine. Why is it important for the man who "can bat unusually well" to become "a professional cricketer"? It is, presumably, because those who can bat unusually well are in short supply and so the few who are gifted with that talent should do us all the favor of making use of it. If those whose "judgment of the markets is quick and sound" become cricketers, while the good batters become stockbrokers, we will end up with mediocre cricketers and mediocre stockbrokers. Better for all of us if the reverse is the case.

But this, of course, is awfully similar to the logic I myself employed. It is important for me to spend my life explaining what I'd learned because people who had learned it are in short supply — much shorter supply, in fact (or so it appears), than people who can bat well."

</comment><comment><USER7> Despite saying,

 _" I have never done anything 'useful'. No discovery of mine has made, or is likely to make, directly or indirectly, for good or ill, the least difference to the amenity of the world."_

He contributed a lot of practical findings in math. The Hardy-Weinberg principle[0] comes to mind...

[0][https://en.wikipedia.org/wiki/Hardy%E2%80%93Weinberg_princip...](https://en.wikipedia.org/wiki/Hardy%E2%80%93Weinberg_principle)

<comment><USER8> It's almost frightening to me that the Hardy of the Hardy-Weinberg equilibrium could be writing this. It's part of a healthy understanding of genetics at all!

<comment><USER9> I very much doubt that Hardy regarded that as a "discovery". From a pure- mathematical point of view it's completely trivial.

(I do not say that to diminish its importance, which is an entirely separate matter. And something can be mathematically trivial but still an important discovery -- the cleverness may e.g. reside in noticing that it's a thing that might be true at all. Be all that as it may, I can't imagine Hardy, given his general dismissive attitude to applications of mathematics, seeing it as a discovery rather than a triviality that happened to be useful to biologists.)

<comment><USER10> Yes, that is true. He really did not care about it. The paper he wrote is Mendelian Proportions in a Mixed Population ([http://science.sciencemag.org/content/28/706/49.full.pdf+htm...](http://science.sciencemag.org/content/28/706/49.full.pdf+html)). It is brief, barely a page in length, and he introduces the HW equation with the preamble "A little mathematics of the multiplication table type is enough to that in the next generation the numbers will be [equation]".

As an added bonus, he cites Karl Pearson

</comment></comment></comment></comment><comment><USER11> The greatness of Hardy is that some unknown person from across the world (Ramanujan) wrote him barely legible letters, and he read them, believed in the writer, and helped expose him to the world.

I was once in a position where lots of people wrote me letters seeking to tell me about their talents. All the letters went unread to my dustbin. True and sad.

</comment><comment><USER12> Anyone who enjoyed reading that (especially the bit about mathematical reality) absolutely must read Anathem by Neal Stephenson. The proof is rather enumerative, which I will leave as an exercise ;)

As for discussion. Is not the quote "We live either by rule of thumb or on other people's professional knowledge." the most antithetical to hacker culture you've ever heard?!?

</comment><comment><USER13> I did not care much for Hardys opinion about how innocent pure math was. Since it was later proved wrong by nukes. But the novella was a real glimpse into the austere life of a curmudgeon and some of the oxford culture. In addition to the culture of the elite as well, which unsurprisingly respect science and math much more than proles.

<comment><USER14> Well, it's not math that kills, it's people... I mean, I don't think it is fair to blame scientists, engineers, workers, etc. - let alone the tools that they use - for the way the product of their work is used.

Also, to be fair, the elementary analysis book which Hardy wrote under the title A Course of Pure Mathematics by today's standards would hardly qualify as a book on 'pure math' anyway.

<comment><USER15> >I mean, I don't think it is fair to blame scientists, engineers, workers, etc. - let alone the tools that they use

I think it should be fair. It's no secret what these precision guided bombs are being used for, so why should the nerds that continue to work on them be free of culpability?

<comment><USER16> The invention of the nuclear bomb has led to the most peaceful period in human history. So to whatever extent the scientists and engineers who had some part in creating those bombs are culpable, they should be considered heroes.

<comment><USER17> No, it didn't. Democide in the 20th century, the death toll of which far outstripped the death toll from conventional warfare, reached its peak after the use of nuclear weapons against civilians in Japan. The notion that the post-nuclear era has been "peaceful" either absolutely or relatively is completely, ridiculously false.

</comment></comment></comment></comment></comment><comment><USER18> Is the apology for posting something that should have been HTML as a PDF?

<comment><USER19> Why Hypertext Markup Language rather than Portable Document Format? Because you like ads?

<comment><USER20> PDF is meant for paper. HTML is meant for screens.

<comment><USER21> Learn LaTeX and then come back here. Or better yet, learn LaTeX, write some documents, wait 10 years, then come back after revisiting those documents.

I think I first started learning LaTeX in 2007 or 2008. I began writing HTML around 1995. IMO, anything resembling a "document" that you expect to be useful longer than a year or two should be written in LaTeX, or at least something based directly on TeX. Alternatively, just use plain text. Anything else just doesn't have a comparable shelf-life.

Whether it was intended to render to screen or print is totally irrelevant. If anything, stay away from screen-oriented formats because there hasn't been a standard "screen" format like, ever, with the possible exception of TTY geometries.

And output format isn't even the half of the relevant qualities to worry about when it comes to shelf-life. TeX is basically written in Pascal. TeX is a standard as well as its own future-proof implementation, permitting pixel- perfect reproduction across decades. I expect direct ports of TeX to Web Assembly not long after the standard sees adoption.

Of course, TeX is not the same thing as PDF; not even remotely. But TeX is oriented toward the world of hard copies, and I hardly see that as a fault. But even if so, it's de minimis in the grand scheme of things.</comment></comment></comment></comment>


Ghost is shit. Node.js is shit - <AUTHOR> https://4kk.me/welcome-to-ghost/ <comment><USER2> And of all the time you'll be spending on driving over the usb and other methods you have mentioned, the ghost will stay online, with people working on it, using it.

I haven't used much of Ghost. But this is sad that people say that a _some tech_ is Sh*t, just because it didn't work out for them.

</comment><comment><USER3> Wow, very rich from a self styled PHP evangelist.</comment>


Ask HN: What are some tutorials to learn modern web dev 'correctly' - <AUTHOR>

Before I get blasted and told to 'just google it,' I am not just looking for syntax guides, or even tutorials for specific web frameworks like rails or cakePHP. I have already done that, and there are a wealth of tools out there that are very helpful. However I think it would be useful to see what types of framework independent concepts or design decisions are generally accepted as the way things are done. Discuss. <comment><USER2> What type of web development do you plan to do. Many people are moving away from Rails and PHP for web app development and moving towards JS toolkits and HTML5. With Require.js, Backbone.js and jQuery being some of the big ones (Though I personally prefer to use Backbone.js and Dojo). Then they set up REST services using something like Rails, PHP or Node.js. This is widely considered the future of modern web apps and how they will be built. Now for more website focused site, you still see a lot of the server side frameworks, but personally if I am building out a more traditional site, I prefer to use a CMS like Wordpress and if I am building out an ecommerce site I prefer Magento. Each of these have their "correct" or "best" practices. So it really comes down to what you want to do, but if web apps are where you want to go, you should really consider investing your time in the JavaScript toolkits and frameworks.</comment>


Scientists warn of sperm count crisis - <AUTHOR> http://richarddawkins.net/news_articles/2012/12/5/scientists-warn-of-sperm-count-crisis <comment><USER2> There was an article in The Economist about this as well[0], which points out something that most other sources I've seen seemed to have skipped over:

"...much of the effect could be caused by changes in how sperm quality is measured.. the World Health Organisation's manual on the subject has been revised four times since it was first published in 1980..."

"...a continuing investigation of Danish conscripts, is notable for having been established with a consistent method of measurement from the start. Its data show no changes over the years. And Dr Rolland and Dr le Moal admit that, despite the apparent drop in sperm counts they found, there was no increase in the number of infertile men during the period of their study."

I haven't actually dived into this new study to see if the authors accounted for these factors. Even if they did, it seems odd that the one study which has maintained the same method of measurement is the one that shows no changes.

[0] [http://www.economist.com/news/science-and- technology/2156787...](http://www.economist.com/news/science-and- technology/21567879-yet-another-study-suggests-sperm-numbers-are-falling-rich- countries-countdown)

<comment><USER3> Those revisions have actually enabled the problem to stay hidden longer; they've reduced the sperm count threshold at which men are considered "normal". You may be referring to technical issues, such as distinguishing live from dead sperm, or measuring motility---but WHO numbers don't reflect that.

</comment></comment><comment><USER4> Blogspam.

OP at [http://www.independent.co.uk/news/science/scientists-warn- of...](http://www.independent.co.uk/news/science/scientists-warn-of-sperm- count-crisis-8382449.html)

</comment><comment><USER5> Original article: [http://www.independent.co.uk/news/science/scientists-warn- of...](http://www.independent.co.uk/news/science/scientists-warn-of-sperm- count-crisis-8382449.html)

</comment><comment><USER6> Children of Men here we come!

<http://www.imdb.com/title/tt0206634/>

<comment><USER7> That was one of the most profound movies I ever watched, I also highly recommend it. It is moving, beautiful, and makes you rethink everything we take for granted.

<comment><USER8> And the single take scenes were brilliant.

</comment></comment></comment><comment><USER9> Male energy is in crisis. In the modern world boys aren't allowed to be boys to make sure they will become men grown tame. Boys are grown by women—and these days also men who have adopted the women's way of growing kids. We think that male energy is aggressive and offensive, and it must be suppressed and tainted, while simultaneously we have lost our icons of what real manhood entails. We don't have rites of manhood like indigenous people had: the boys were cut off their mothers and their mothers let go of the boys, they started living with men, and the rites eventually transformed a boy into a man. THis doesn't happen anymore. And if you, instead, grow a boy to a man the woman way, what you get is not a man but an overly feminine male who is at loss with his manhood and who has two balls that are barely working.

<comment><USER10> My two kickass adult sons would find this paragraph laughable.

\-- Their Mom

Though, in all fairness, I am kind of a ballbusting bitch and did not raise my sons "normally". My ex was career military, so I could afford to be a ballbusting bitch since my anachronistic family of origin and the federal government both had my back. But I imagine that a) you wouldn't be up for a meaty discussion of that sort and b) hn is probably not the place to have it.

<comment><USER11> The parent thread was probably trolling, or not aware of some details about these rituals of passage (<http://en.wikipedia.org/wiki/Sambia_people>)

Gender role development is a touchy but very important subject (although i m not sure it's related to sperm count). Related: [http://www.theatlantic.com/sexes/archive/2012/12/you-can- giv...](http://www.theatlantic.com/sexes/archive/2012/12/you-can-give-a-boy-a- doll-but-you-cant-make-him-play-with-it/265977/)

<comment><USER10> I have been called a troll (or treated like one). I am not. For that and other reasons, I am very reluctant to hang that on this person. HN is an actively hostile environment for some topics. Regardless, most people do not want to have a real serious discussion about a touchy topic like this, under any circumstance. That is the only piece I really take issue with. As someone who believes in a lot of things that would not be respected here, I would happily defend the OP's right to free speech and to have a different mental model. The problem I have is that they are highly unlikely to be willing to engage in serious discussion, therefore they probably should have not bothered to post it here.

<comment><USER9> Comments like yours are exactly why I posted the original article. It's really nice to hear from someone at HN who sees beyond the controversy caused by a totally different mental model, as you put it. I'm surprised I wasn't downmodded more aggressively.

I wouldn't have answered to this thread unless you had written these two comments of yours: HN certainly isn't the place for serious discussion about such topics and while I don't necessarily like it that way, that's just the way it is. But I sometimes keep fishing for different responses.

Now, anything related to gender, sex, gender roles, and the masculine and feminine parts of a person's psyche and spirit seems to be a touchy subject: add in a few feminist and antifeminist preconceptions—or just any politically correct one—to the mix and what you have is the mother of all can of worms.

It's virtually impossible to discuss those in a large group unless there's a predefined consensus that limits what can be said. All we probably _can agree with together_ is that there's a difference between the masculine and feminine, but there are indefinite ways of how that could unfold into a discussion. Yet it's a very fundamental dynamic of life that you're bound to deal with one way or another, regardless of if you're a man or a woman.

Further, there are so many angles into this gender topic that it's hard if not impossible to establish a definitive model of how to present my thoughts on such a topic myself. And that doesn't fly well at HN: generally people who are thinking more aloud than asserting their final conclusions don't fare well on internet forums.

So, a fruitful conversation of the subject is probably only possible with at most two people who trust each other enough so that they're able to just reflect the other person's thoughts instead of trying to argue them out.

I know there are tens of thousands of different people on HN and most do have beliefs and attitudes that don't fit in the canned scientific-consensus impression most people present on HN.

There is a wealth of intelligent people here and I sometimes wonder what they think of things that can't be said here.

<comment><USER10> One problem with your original remark is that it is openly hostile to women while simultaneously failing to conform to the "scientific" model popular here. You managed to alienate pretty much everyone in one stroke.

If you posit a male-female dynamic, they must be complementary. If male energy is in crisis, so is female. The one requires the other to balance. I was a homemaker for many years. That is a dying role in modern America. But it is the logical and practical complement to the traditional masculine role of going out and conquering the world. It is routinely disrespected by the modern world. You decry what is being done to male energy while actively participating in the modern trend of pissing on the traditional maternal role.

It is no wonder you perceive a crisis. You are shooting yourself in the foot on this one.

Best of luck with sorting out whatever is on your mind.

<comment><USER9> It's not hostile to women unless you choose to interpret it in that light. I simply brought up that subjecting boys to feminine nursing for too long tends to make it more difficult for them to find the man within themselves later. I could have said the same about girls grown in a very male environment and managed to be hostile to men too :)

And of course I decry what has happened to male energy in such a short comment. I wrote about male energy because I didn't want to _start_ by writing pages and pages on a subject like this. (See, still trying to keep it short.)

By the way, you are aware that traditional patriarchy is a dying scheme in the modern world as well and that traditional paternal role has been pissed on for a long time, too, aren't you? It all started in the 50's/60's and female energy _is_ in crisis too, like you said!

For example, in the contemporary world, women in the worklife wear a highly masculine attitude because the current way of doing business is regrettably masculine only. Women in office jobs even dress like men. Now, when a woman comes home after work it will take a while until she can be in touch with her feminine side again. If she has a so-called modern husband who has already picked up the kids from school, looked after them while making dinner for everyone (these are traditional, parallel, stereotypical feminine activities) then she might have a hard time a) finding her feminine side to get in touch with her feelings and b) finding the masculine side in her husband so that she can relax in the trust the masculine provides for her, and just talk her feeling out to get rid of her working day stress.

<comment><USER10> I am a woman and I am sympathetic, but it sounded hostile to me. You are now dismissing that and blaming me instead of simply trying to clarify when I am the only person here taking you at all seriously. And given that I am having my head handed to me elsewhere on hn, I am not in a good frame of mind to bend over backwards to give you a receptive audience. If you would like to try again, I would be happy to give you a do-over. But, no, I am not going to make a serious attempt to engage this reply.

Again, best of luck with whatever is on your mind.

<comment><USER9> Well, thanks for telling me what bothered you. I think I was just surprised to see the question of hostility being brought up at all. Certainly my words can be read in as many ways as there are readers, thus in my head that question was sort of off-topic so I think I didn't pay attention to how important it was to you and possibly others.

I am not actively or passively hostile to women, at least to any such extent that I can recognize myself or that can be recognized by my friends, so the whole matter simply hasn't been on my radar at all.

<comment><USER10> HN can be pretty mysogynistic. (I have ben told other women have left because they find it unpalatable and I know that a lot of women downplay or hide their gender on HN because it is seen as a problem.) So, the environment here tends to bias perception. If you want support, you will need to make extra effort to avoid even an appearance of attacking the roles of women while talking about your concerns about the roles of men. Women are widely regarded to be second class citizens, something you no doubt know. The language you are using is more likely to be acceptable to women or other more "feminine"/not "hard science" types. It will not go over well with most members here. Not being careful of how your remarks will be perceived by the minority that might take you seriously practically guarantees you will not be anything but attacked.

I know from firsthand experience. You can check my remarks for how I am going down in flames elsewhere on HN today. Unfortunately, many years of history have painted me into a corner that, in practice, I don't know the way out of dven though in theory I know the general principles which should work.

I hope you find a path forward in discussing gender issues with people, whether here or elsewhere. I have long found such topics fascinating. But, yes, they are super touchy topics.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> There is a real good german/french documentary on this subject named 'Men in danger':

"A program which looks at some of the factors which may explain why sperm production in males has dropped 50% in 50 years, and explores an important question currently facing scientists; could chemical molecules in our environment be affecting our ability to reproduce? Aside from the huge drop in the amount of sperm production over the last five decades, scientists have also recorded a dramatic rise in the number of testicular cancers and a disturbing increase in the number of congenital malformations in male reproductive organs - two trends echoed in wildlife studies. This suggests the cause is environmental and not genetic. For Niels Skakkebaek, Danish doctor and researcher, the male reproductive and infertility problems we are currently facing are 'as important as global warming.' (From France, in English) (Science) M CC WS"

Here is at least an english trailer: <http://www.youtube.com/watch?v=hQfduzOmctI>

And a review: [http://healthhighway.blogspot.de/2008/03/men-in-danger- sbs-d...](http://healthhighway.blogspot.de/2008/03/men-in-danger-sbs- documentary.html)

Germans: <http://www.youtube.com/watch?v=nFBbbItpdc8>

</comment><comment><USER13> What? This is being described as a "crisis"? It's the best news I've heard all year. We should celebrate!

The world's population is completely out of control, all estimates of future environmental catastrophe turn out to be overly optimistic, we're drifting into a state of perpetual war because of population pressures, and someone laments a decline in sperm count without the slightest grasp of how funny that is?

Read and weep, children:

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

<comment><USER14> Drifting into a state of perpetual war? Isn't the current period the most peaceful in known history?

<comment><USER13> > Drifting into a state of perpetual war? Isn't the current period the most > peaceful in known history?

Let's look at the evidence:

[http://en.wikipedia.org/wiki/List_of_ongoing_military_confli...](http://en.wikipedia.org/wiki/List_of_ongoing_military_conflicts)

The only reason we aren't aware of the number of military conflicts taking place is because they aren't on the evening news.

And yes, by any objective measure, this is a more warlike time than any in prior history, simply because there are more people available and willing to fight.

<comment><USER14> That's not actually evidence related to the assertion at hand. For that, you'd need a historical comparison, which that list does not provide.

You may be right about absolute numbers, but absolute numbers are pointless here. From what I've seen before, in terms of the _relative_ number of people killed in war compared to the overall population, this is the most peaceful time known. If 2x as many people get killed in wars, but there are 4x as many people alive, that world is _more_ peaceful, not less.

<comment><USER15> I don't entirely agree that "absolute numbers are pointless here". If you look at the amount of human suffering, your world is 2x worse.

<comment><USER14> By that reasoning, a world where there are only a thousand people, divided into two tribes constantly engaged in horrific war, is vastly better.

<comment><USER16> I think that is where we are headed.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> Great movie about this.

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

Seriously though what is the problem, we have large complex societies and fertility drops dramatically. There's a natural limit and Malthusian ethics of genocide and eugenics are unnecessary. Good news all around.

<comment><USER18> Malthusianism has been debunked since before any of us were born. Humans are on average wealth producing.

</comment></comment><comment><USER19> I would be interested in learning whether this issue is universal for all men, or specific to men of certain demographics. Anyone have any insight?

</comment><comment><USER20> The study was preformed on sperm banks in France. This means the results probably generalize to all developed/industrialized nations. What would be nice would be some studies to look for this effect in other societies. It would certainly help dial in on root causes.</comment>


What's your most controversial programming opinion? - <AUTHOR> http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion <comment><USER2> Here's mine: to a first approximation, code quality is unimportant. Rapid iteration is what matters.

I've seen lots of failed projects with smart, super-conscientious developers, who wouldn't write a method without a test. And others with programmers that frequently copied code, used globals for side effects, basically did everything they tell you not to do, but they produced programs that people loved using.

The difference was rapid iteration with real customers. This flushed out important bugs, even with code that was written in a way that was prone to be buggy. But more importantly, the developers quickly understood the product in a more global sense -- what was relevant to users and what wasn't. I suspect rapid iteration can turn even mediocre developers into stars.

It's important to recognize that good practices are about tradeoffs. The truly good developer is not the one that never copies code; it's the one that knows when it is the more fruitful course of action. So in a way, you need to be brilliant to get away with being sloppy.

</comment><comment><USER3> in my opinion, writing unit tests is overrated.

i think some developers put too much stock in unit testing and it gives them (and their managers, customers, and co-workers) a false sense of security. they end up wasting time and not really preventing as many bugs as they think it will. application logic changes and they have to write twice as much code to change the application and all of the tests that depended on that logic.

writing a regression test for a complicated routine or library is one thing, but writing a test for every method of a class just for the warm fuzzy of their test framework telling them they have 100% coverage is silly.

<comment><USER4> Unit tests may be overrated, but _writing_ them certainly isn't.

I've seen so many programmers start writing so much better code after adding the criterium "it has to be testable".

BTW, the killer bugs are usually not in the "complicated routine". They are more often in the simple things programmers like to think they can do so perfectly that they don't need to write tests for it. I have found many a bug in the most simple one line functions I never bothered to test.

</comment></comment><comment><USER5> The top items don't seem to be very controversial, but instead seem to be "things that good programmers think are true, and bad ones don't."

Here's mine: if you haven't gone through a respectable 4 year CS program, odds are I'm not going to want to hire you since your brain isn't wired to think about algorithms and data structures instead of code and servers.

<comment><USER6> Surely there's a more direct way to determine how someone's brain is wired? Have a conversation with them about some algorithm or data structure. A four- year CS program is definitely not the only way to learn that sort of thing.

<comment><USER5> I guess the point here is that I won't even bother bringing in/phone screening candidates without the CS degree. (Sans those who have referrals.)

</comment></comment></comment><comment><USER7> I rather like these two:

<http://www.stlport.org/resources/StepanovUSA.html>

        I find OOP technically unsound. ...
        I find OOP philosophically unsound. ...
        I find OOP methodologically wrong. ...

<http://www.infoq.com/presentations/The-DCI-Architecture> (at around 39:30)

        You cannot do object-oriented programming in Java.

What the first calls OOP, the second calls "class-oriented programming". What the second calls proper OOP, I think is more along the lines of what the first advocates.

<comment><USER8> It seems like what he is arguing for (a methodology that starts with algorithms and generalizes an interface) is what type classes (at least in Haskell) offer.

</comment></comment><comment><USER8> So can we assume that the most highly-voted are actual the least controversial? This is kind of interesting.

<comment><USER9> You could say the same for the comments right here.

It's not often you see comment sections with that dynamic. One is prompted to respond with something that will essentially relegate them to the bottom of the page.

You may choose to support a two-point comment using an upvote, perhaps only to see it voted back down a minute later. Controversy in plain sight?

</comment></comment><comment><USER10> A: I have no interest in JavaScript and am fed up hearing about it.

I assume that's increasingly controversial :)

<comment><USER11> Just a few years ago Javascript had a horrible reputation. It's funny how the more people learn Javascript, the more it is considered as a great language. I guess it's some form of Stockholm syndrome.

<comment><USER12> Or, alternatively, the more people who learn Javascript learn it's actually really good.

<comment><USER11> I think it's a bit of both, but to claim Javascript is an _amazing_ language is very hard to swallow given all its design flaws, acknowledged by Javascript's creator himself.

</comment></comment></comment></comment><comment><USER13> Debuggers are a limited tool, and developers should seriously consider not using them. In particular debuggers make it easy to miss the forest for the trees, you solve trivial bugs faster but don't notice the underlying design flaws.

Read <http://www.perlmonks.org/index.pl?node_id=48495> for more detail and a back and forth argument on it.

</comment><comment><USER14> Some people made me realise lately that this is actually controversial: If your function is over half screen long and it's not gui initialisation, you're doing it wrong.

Also: One line code comments in front of a block of code should actually be converted into function calls that execute the described functionality. (comment is made redundant)

</comment><comment><USER15> I am often intrigued by people debating what language should be the first language other dev's learn.

It seems as if people argue for the language they picked up first / have most experience in.

I believe the correct answer is not a direct answer, but something along the lines of "it doesn't matter, so long as you learn several, well".

<comment><USER16> I often recommend Python because it enables you to do a lot, quickly, and is easy to read.

I learned C first, stopped studying C when I tried to make a GUI for win32. ~2 pages of code for an empty window. ~5 lines in Python.

So, the ideal first language is whatever is easy to understand and fast to accomplish something. Instant gratification, in other words.

<comment><USER11> IMHO, the real debate lies in "just in time learning" vs "just in case learning".[1]

Should one learn the fundamentals first (assembly/C) or the practical first (python)? The answer will depend from person to person. I personally took the practical first approach.

[1] [http://www.johndcook.com/blog/2010/03/03/just-in-case- versus...](http://www.johndcook.com/blog/2010/03/03/just-in-case-versus-just- in-time/)

</comment></comment></comment><comment><USER17> 1\. PHPs popularity is caused by the fact that it is very often the best tool for the job, not by some fluke or accident of history or position.

</comment><comment><USER18> The most important difference between languages is the difference between their communities.

</comment><comment><USER19> It's 2010 and we're still running a lot of native code with no OS-enforced sanity checks on pointer arithmetic or types or capability tokens. "Crash" and "boot" are "virus" are phenomena the general public have become familiar with. Someday we're going to look back on all this as grotesquely stupid, even negligent.

(But I can't see a path from here to there. Especially one that involves getting paid to write an OS worth using.)

<comment><USER20> You might find Microsoft Research's Singularity project of interest:

<http://en.wikipedia.org/wiki/Singularity_(operating_system)>

<http://research.microsoft.com/en-us/projects/singularity/>

See also: <http://en.wikipedia.org/wiki/Midori_(operating_system)> .

<comment><USER14> Or if you're worried about the licensing of Singularity, Singh and others, check out MOSA (<http://www.mosa-project.org/>) which tried to bring back SharpOS and EnsembleOS together (both inactive now unless something changed lately), or jNode (or many others I missed probably). They should be all in a runnable state (even if very limited).

There's been a lot of this stuff happening around. There are many paths - which unfortunately cannot include many of the existing native (unsafe) solutions.

</comment></comment></comment><comment><USER21> Open source projects are devaluing software developer wages in the industry.

Many companies aren't going to need educated software engineers anymore because more and more software apps and code are given out for free. They will still need developers to make custom changes, but at less pay and less education (think mechanic instead of engineer). It will make it that much easer to outsource your job to India.

I have already seen this happening.

</comment><comment><USER11> Pro-tip: scroll down to the bottom for opinions that are actually controversial.

</comment><comment><USER22> Editing one big file is easier than editing many small files. Hence, have a tool to break your "one big file" into small "section" files if needed but stick with one big file as long as your editor can stand the size.

This is so "controversial" that some nice fellow here on HN both called it "crazy" and up voted it because of that.

My current "one big file" is 16555 lines of code long (javascript/nodejs). GVim handles it perfectly.

</comment><comment><USER23> That almost no one really knows what they're doing.

<comment><USER23> To expand on this, I'm not saying that I think alot of programmers are idiots. (I realize now it could be taken that way)

What I mean is that as an industry, we're in the stone ages. What we're doing will be looked back upon the same way that look back at bloodletting that was practiced by doctors a few hundred years ago.

Just when I think I'm beginning to get a grip on things, a whole new layer opens up, and I start over as a beginner again. I've heard anecdotal evidence that programmers who have been around 30 or 40 years still experience this.

</comment></comment><comment><USER24> I wrote a blog post awhile back that was really controversial. It was about code ownership. People were split down the middle on hating code ownership or loving it. I think some people even took it to mean actual owning of the code.

I was coming from kind of a dictator view where I accept patches rather than blindingly letting people commit changes to projects i'm responsible for.

</comment><comment><USER25> Mine is very simple and very contentious:

It is completely unprofessional to implement a solution you've been asked for, if that solution is bad practice.

That is to say, if you're asked to make a hack that will cause pain and misery, has a security risk attached, won't be performant or other clear, obvious risks, it is unprofessional to not object and in some cases, refuse.

</comment><comment><USER26> Mine is I don't believe single-entry single-exit should be law. It tends to clutter your code with extra braces.

<comment><USER6> How is this controversial? Anybody who's had to sanity-check function arguments (e.g. null pointer checking) knows that having multiple exits from a function is sometimes the Right Thing.

<comment><USER26> I was told in school that SESE was the proper way to do things. I've met other people who agreed with that. You and I are of a differing opinion. Seems at least somewhat controversial to me.

</comment></comment></comment><comment><USER11> Here's a really controversial one:

There's too much fragmentation among programming languages. For instance, I think Ruby, Python, Perl and PHP all solve the same set of problems. One must win for the greater good. The benefits of unifying the developer community outweigh the benefits of diversity. There I said it :)

</comment><comment><USER27> Avoiding geeks who have too many opinions

<comment><USER23> Funny, I always like it when people have strong opinions.

Maybe that's not the same thing as "too many" opinions; like when people have opinions on something they have no experience with.

I've always preferred it when people have strong, but weakly held opinions. [1]

[1] [http://bobsutton.typepad.com/my_weblog/2006/07/strong_opinio...](http://bobsutton.typepad.com/my_weblog/2006/07/strong_opinions.html)

</comment></comment><comment><USER28> GOTOs are not harmful.

They're just the BASIC equivalent of jumps in assembler. GOSUBS are just calls. If they're really so bad, why are their assembler equivalents used in almost every program in every architecture?

</comment><comment><USER29> Copy and paste (with slight modifications) is unavoidable in certain situations with lots of boilerplate overhead.

</comment><comment><USER11> Funny how most of those controversial opinions would be pretty much non controversial on HN.

<comment><USER30> If they're getting that many upvotes they're probably not that controversial.

</comment></comment><comment><USER31> I like C++, STL, and parts of Boost. Surprisingly, this is controversial these days. :)</comment>


Ask HN: PDF reader with sessions - <AUTHOR> Hi, Does anyone know a PDF reader which supports multiple sessions, or lists of files, or even folders ala Atom.
None of the big name pdf readers support having different sessions (I am not just looking for remembering last open documents)
I have tried this one (http://www.stdutility.com/), exactly the functionality I want but it seems to crash a lot. <comment><USER2> To edit, or just read? Some browsers (e.g. Opera) display PDFs natively; you can open multiple documents as tabs or windows.</comment>


Ask HN: Search engine submission? - <AUTHOR>

I'd like to know how the HN community submits their sites to search engines and gets them indexed? Besides DMOZ.org are there others which people would recommend? <comment><USER2> Search engines have changed. Although my 2004 response might be something like goto www.google.com/addurl and submit, in 2013 you need to up your game. Focus on getting a link to your site from other high authority sites. Look at guest blogging with a link to your site. Better yet, create some awesome content that gets picked up by HN or some other popular news sites. Sharing is caring :)

Good Luck</comment>


At 22 years old, Postgres might just be the most advanced database yet - <AUTHOR> https://arcentry.com/blog/postgres-might-just-be-the-most-advanced-database-ever/# <comment><USER2> I'm a big fan of Postgres and it is basically the only DB I use but the title is naive and the post is low content. SQL Server, Oracle, and DB2 are crown jewels products and each have substantial and difficult to implement niche or extreme scale features or other sweet spots that no open source databases come close to after two decades, and they weren't sitting still during that time either.

<comment><USER3> One thing Postgres definitely doesn't do, and I wish it did, is embedded. This is usually the place that people use SQLite, for example, apps that are clients, but still need to do substantial work on the client side.

The problem is, SQLite does have a few limitations that it doesn't make obvious: some of the more complex SQL syntax that Postgres supports are missing, but more importantly, it can only ever do one write _or_ read to the database predictably. (Don't believe me? Try this: [https://gist.github.com/mrnugget/0eda3b2b53a70fa4a894](https://gist.github.com/mrnugget/0eda3b2b53a70fa4a894))

I know that SQLite supports concurrent writes and reads technically, but it predictably leads to 'database is locked' issues. In practice you have to use it in a fashion that it only ever does one thing, read, or write. No multiple writes. No single write and multiple readers, no single write and single reader. Just read — or write. (Edit: WAL doesn't help with this either.)

Or you're in a world of hurt. I'd love to be able to move to Postgres just to get away from that.

<comment><USER4> > some of the more complex SQL syntax that Postgres supports are missing, but > more importantly, it can only ever do one write or read to the database > predictably

I don't know...it's recently added upsert compatible with Postgres syntax as well as support for window functions.

Additionally, sqlite has a sophisticated json extension.

> it can only ever do one write or read to the database predictably

WAL mode addresses this, allowing an arbitrary number of readers with a writer.

For concurrent applications just use a dedicated write thread and enqueue writes...your example is contrived. Connection management, transaction scope management, etc, can all work in your favor. Writes occur in a few milliseconds, meaning you only need to hold the exclusive lock very briefly in most situations.

More information here: [http://charlesleifer.com/blog/going-fast-with-sqlite- and-pyt...](http://charlesleifer.com/blog/going-fast-with-sqlite-and-python/)

<comment><USER3> The gist I linked is extremely basic, just insert and read, really, and it does use WAL by default. It'll still end up with database lock, and from there it's all shallow waters — reverting from a crashed database lock is not trivial and can cause data loss if handled improperly.

Not all writes are couple milliseconds. I regularly have transactions that take 15< seconds, and it's not because the data size that's being input is large, it's just that the SQL is recursive and complex enough to warrant recursion (storing graph data).

</comment></comment></comment></comment><comment><USER5> I've recently used T-SQL / MSSQL and was surprised how starkly it differs from your typical "foss sql" (be it postgres, sqlite or mysql).

One really obvious example is how [] are used for qualifying names, or how there is no LIMIT clause (instead you use SELECT TOP(n), but you still use an OFFSET n ROWS clause after the ORDER BY clause for an OFFSET; there is also OFFSET n ROWS FETCH NEXT m ROWS ONLY). Another example are curious limits to programmability, e.g. TEXT can't be used for procedure parameters. There also seem to be small limits on BLOBs. No NATURAL JOIN (which I mostly use for ad- hoc queries).

It is also very different deployment wise (as are all Microsoft products). You don't have a client library or anything like that, but a system-wide database driver instead. Applications use a driver interface and could (most don't) support other database versions or even databases. You can't "just" throw a MS SQL install on a machine, it needs to be properly installed system-wide and register all its components or it won't work properly etc. — so spinning an instance up for testing really isn't nearly as easy as with postgres.

<comment><USER6> I cringe every time I have to use SQL Server.

1) Weird gaps in ANSI compatibility (no concatenation with ||, no current_date, top n instead of limit/offset, etc.)

2) Just yesterday a client's SQL Server started selecting deadlock victims to be killed, so the DBA's workaround was to throw (nolock) hints on every table and read dirty data. It happens when concurrent queries update records in a different sequence, but the same application on Postgres never deadlocks.

3) The query planner seems amazingly naive for such a mature product. Hard to understand how a query with three where-clause constraints can execute in 20 ms, but adding a fourth constraint makes it run 240000 ms, but I see this kind of insanity every day.

<comment><USER7> _It happens when concurrent queries update records in a different sequence, but the same application on Postgres never deadlocks._

SQL Server has like 4 different isolation levels + MVCC, you just pick the one you need. Postgres just does MVCC so it sounds like you should just switch SQL Server to that mode. A poor workman blames his tools. Unless that tool is MongoDB.

<comment><USER6> _> just switch SQL Server to MVCC_

In the real world of mediocre DBAs and databases managed by application vendors, it's never that easy, is it?

Postgres _just works_ with default settings while SQL Server chokes on the same transactions with the same volumes.

SQL Server is _legendary_ [0] for deadlocks even when the workload is mostly reads and rarely writes. You just don't see this with Oracle, Postgres or MySQL with default settings.

Not sure why I'd pay for the privilege of extra headaches.

[0] It was a problem in 2008, still not resolved [https://blog.codinghorror.com/deadlocked/](https://blog.codinghorror.com/deadlocked/)

<comment><USER8> Yes the defaults are more pessimistic but why is such a problem to change the locking level?

SQL Server has one of the most advanced query optimizers. Are you running on an old version or using out of date statistics?

</comment></comment></comment></comment></comment><comment><USER9> I've dived into the postgres code recently and it was incredible. Lisp legacy is all over the place, it's literally lisp in C, though unlike many "Langname- styled C" codebases it looks really clean and organic.

I'm still confused how people prefer oracle [1] other postgres.

[1] [https://news.ycombinator.com/item?id=18442941](https://news.ycombinator.com/item?id=18442941)

<comment><USER10> Postgres has led the world in trash-talking other databases for 22 years.

I used to call it CrashGreSlow back when Mysql was maintained. Postgres had a manifesto which trash-talked Oracle but it was not a reliable product at that time. Maybe the people who said it was fast were running it on ram disks with fsync turned off or something.

After mysql got bought by Sun and put on ice, postgres caught up with the hype and now it is pretty reliable. That wasn't always the case.

<comment><USER11> Seriously though this is true especially from their users.

It is never just PostgreSQL is a great database. It's always that MySQL, Oracle, MongoDB and the hundreds of NoSQL databases are all unusable junk with no unique benefits.

<comment><USER10> Oracle is OK if you can afford it and afford a nice battery backed storage array that (truthfully) fsyncs quickly.

MongoDB is crap.

I think the people who use Arangodb don't talk about it because they see it as a competitive advantage.

Right now I am working on an abstraction layer for document databases and using couchdb side by side with Arangodb. I guess I'll have to write a N1QL parser to go with my AQL parser.

The database I have the most fun with is SQLite. It is single-user, which means you can't log in with the SQL monitor when your program is running, but if you can accept that it's just great.

</comment></comment></comment></comment><comment><USER12> Thanks to these engines and extensions, Postgres has become that rare tool for me where I have to ask "why use ___ instead of Postgres?"

If they got their clustering story to be as easy as MongoDB's was 5 years ago (From what I read, Citus does this well), it's yet another excuse to stick with it.

<comment><USER13> Are you running at a scale where a single master DB isn't sufficient?

Because nowadays you can get servers with about 192GB of RAM and 32 CPU cores.

Clustering seems like one of those "what if"[0] scenarios where maybe if you were operating at roflcopter scale you might need it but for 99.9999999999999% of cases, a single master DB is more than enough -- at least with a well designed SQL db like Postgres.

[0]: [https://nickjanetakis.com/blog/optimize-your-programming- dec...](https://nickjanetakis.com/blog/optimize-your-programming-decisions- for-the-95-percent-not-the-5-percent)

<comment><USER14> A single master db isn't sufficient for any production app; you should have no single points of failure and that includes having at a minimum 2 db's. Clustering isn't a what if scenario, it's a must have for any serious business, single points of failure are not acceptable.

<comment><USER8> 100% uptime is impossible and the vast majority of companies do not need anywhere near the 99.99% they claim is necessary, nor can they actually pay for it.

A 30-second outage to switch to a replica is perfectly fine for production.

<comment><USER14> If you have a replica, you have two db's already as I've suggested. And no one said anything about uptime; the point was single point of failure, not uptime. When I said single master, I just meant a single db as opposed to a master/slave setup.

<comment><USER15> The GP said single master, not single database.

<comment><USER14> I am the GP, I think I know what I meant better than you, which is why I clarified that in the comment you just replied to.

</comment></comment></comment></comment></comment></comment></comment><comment><USER16> While indeed advanced I find it's focus on reliably and ACID are more useful than triggers or extensions. Triggers increase write load and extensions aren't available on all hosting services. Replication, interchangable storage, and standard SQL/PL support are getting better, but still lag competitors like MySQL.

<comment><USER17> I've a love and hate relationship with triggers, but I just need to say triggers don't have that much overhead if done correctly. 99% of businesses don't have a scaling concern, and triggers will do them well if they use it to capture mandatory rules instead of trying to implement it at the application layer. It's a pain when misused. The key thing is to reason about your user permission/roles correctly so that you don't end up with cascading failures when adding new triggers.

</comment></comment><comment><USER18> I'd like to see support for computed/derived columns with options to be materialized or non-materialized.

I guess that's coming in version 12 after a few google searches.

</comment><comment><USER19> Started using PG recently at a new job but can't really see any benefit over MySQL. What am I missing?

<comment><USER7> If you lose the root password, you can fix it in Postgres without taking the database down.

<comment><USER20> There are several ways to update the root password in MySQL with zero down- time, either by manipulating the user table, using replication, or using other accounts (ie. most people grant excessive privileges to role accounts.)

[https://www.percona.com/blog/2014/12/10/reset-mysql-root- pas...](https://www.percona.com/blog/2014/12/10/reset-mysql-root-password- without-restarting-mysql-no-downtime/)

</comment></comment></comment><comment><USER21> The title should include "free" before database, and it's generally true.

But the article doesn't really delve into anything advanced at all. Triggers? Please.

</comment><comment><USER22> A fun article about PostgreSQL and fsync():

"PostgreSQL's fsync() surprise"

[https://lwn.net/Articles/752063/](https://lwn.net/Articles/752063/)

</comment><comment><USER23> Anyone else getting a bad certificate when visiting in Firefox?

<comment><USER24> Check your clock and date. If it's off by a lot you'll get weird cert errors.

</comment></comment><comment><USER25> The article doesn't have anything I didn't know about or new but yet another reminder of how postgres is, IMO, the best piece of sw ever created is nice.

</comment><comment><USER26> I started using Postgresql a long time ago when I tried to do a sub query in MySQL and it didn't support sub queries. Haven't looked back since.

<comment><USER27> I do not know if this is still the case but the Json support was non existent in mssql 4 years ago and in postgresql is absolutely phenomenal.

</comment></comment><comment><USER28> One word: Exadata..

</comment><comment><USER29> Postgres doesn't come close to the enterprise-level features AND support as that of Oracle or SQL Server.

<comment><USER30> What features of Oracle or SQL Server would you say it is lacking?

Regarding support, there's plenty of fantastic companies providing support and consulting services for PostgreSQL and having used plenty of commercial databases I know of know no other database that has as vibrant a community providing amazing _free_ support as well.

<comment><USER31> SQL Server has a column-oriented index type. Oracle has a thing that lets you query based on what the data was at a particular (recent) timestamp. They both have lots of useful features like that.

However from my experience with Oracle and from what I've heard about their source code, its fundamentals are just disgusting. Decades of haphazardly piled-up features and fixes means that if you're the lucky customer to find a new bug, good luck understanding what the heck is going on by yourself.

I'd like to think MSSQL is in a bit better shape, but they have lots of the same incentives so who knows.

<comment><USER32> Oracle is like America. Its not all the same. The database itself is now one of the most rock solid pieces of software ever built. Other products - yeah, less so.

<comment><USER33> I think this is perhaps referencing a recent HN comment about the code quality of Oracle DB: [https://news.ycombinator.com/item?id=18442941](https://news.ycombinator.com/item?id=18442941)

<comment><USER32> Ha, that's pretty interesting. Not too sure how much credit to give it though based on this:

> It takes 6 months to a year (sometimes two years!) to develop a single small > feature (say something like adding a new mode of authentication like support > for AD authentication).

There's no way in the world I would have imagined that adding AD authentication to any database would be a "single small feature".</comment></comment></comment></comment></comment></comment>


ASK HN:i know the pdf spec and the swf spec what can i do with it? - <AUTHOR>

Hi
as part of my job i learned the Pdf spec and also the swf spec i can create them with low level tools i created . what useful product i can build with this knowledge ?
free and open source . that will help people <comment><USER2> Build a pdf reader that can replace background/text colours. It would be incredibly useful for many people (including myself) who find black-text-on- white-background unpleasant to read.

The only reader I know that does this is Acrobat Reader, but it's such a huge program for just this little task.

<comment><USER3> Foxit Reader allows background/text color replacement.

<comment><USER2> Good point, but I use a mac, and I think foxit doesn't exist on the mac.

<comment><USER3> my apologies for that to you, sir.

</comment></comment></comment></comment><comment><USER4> You could build (probably yet another) pdf/swf fuzzer to check for bugs in the implementation of the rendering engine.

<comment><AUTHOR> well i meant something fun for the common people</comment></comment>


Strange gamma-ray heartbeat puzzles scientists - <AUTHOR> https://www.eurekalert.org/pub_releases/2020-08/ded-sgh081420.php <comment><AUTHOR> TL;DR: A black hole accretion disks' emissions _appear_ to synchronously evoke gamma ray pulses from a gas cloud 100 light years away.

The current (inconclusive) idea is, quoting: "Energetically, the outflow from the disc could be as powerful as that of the jets and is believed to precess in solidarity with the rest of the system." (Torres)</comment>


Show HN: Uncap – Map Caps Lock key to any key or any key to any key - <AUTHOR> https://github.com/susam/uncap <comment><AUTHOR> I've added a Features ([https://github.com/susam/uncap#features](https://github.com/susam/uncap#features)) section to the README file of the project that describes why I wrote this tool when several methods to map keys on Windows system already exist. Quoting it below.

"The following list briefly describes some of the features of Uncap.

1\. Map Caps Lock key to Escape key on a new Windows system with almost no effort. Just download and double-click. This is the primary reason why Uncap was written. This tool was written for users of vi editor who like to map their Caps Lock key to Escape key for convenience.

2\. Map any key to any key, multiple keys to other keys, or disable keys using command line arguments. No additional file or script is required.

3\. Enable, disable or modify key mappings without having to reboot the Windows system.

4\. Disable key mappings easily by stopping Uncap.

5\. It is a single-file executable. It is very lightweight. The executable is only about 60 KB in size. It occupies about 1 MB or less of memory, and negligible CPU while running.

There are several other methods and tools available on Windows to map one key to another. But none of them seem to have all five features enumerated above. For example, editing Scancode Map registry value requires the Windows system to be rebooted after every change. On the other hand, AutoHotKey requires an additional script file to be written. Therefore, Uncap was written to support all five features described above."</comment>