Amazon CloudFront now supports HTTP/2 - <AUTHOR> https://aws.amazon.com/about-aws/whats-new/2016/09/amazon-cloudfront-now-supports-http2/ <comment><USER2> Oh man, i've been waiting for a long time for this. I'm super excited. Now if only it supported server push using the link header...

</comment><comment><USER3> Now if only AWS supported ipv6...

<comment><USER4> I'm sure they have a team hard at work on it but it would be nice if they at least confirmed it was getting closer. Maybe an estimate of "more than a month but less than a year" etc.

Their costs have to be crazy to keep purchasing IPv4 addresses so I'm sure they'd like it too.

<comment><USER5> IIRC, they purchased a huge block of 16 million IPv4 addresses quite some time ago and are still pulling from that, so they aren't investing any new money into IPv4.

Also, I don't see them being that stressed about it, they now have the t2.nano now which are ~$5/m and still come with a free IPv4 address.

</comment></comment></comment><comment><USER6> Now if only they fixed the forwarding of HSTS Headers over S3: [https://forums.aws.amazon.com/thread.jspa?threadID=162252](https://forums.aws.amazon.com/thread.jspa?threadID=162252)

<comment><USER5> They don't even support CORS correctly [1]. I use Google Storage+AWS CloudFront for my static assets because S3 is so thoroughly broken.

[1] [https://forums.aws.amazon.com/thread.jspa?messageID=715806](https://forums.aws.amazon.com/thread.jspa?messageID=715806)

<comment><USER7> You may have missed this but Google Cloud CDN can now sit in front of GCS: [https://cloud.google.com/compute/docs/load- balancing/http/us...](https://cloud.google.com/compute/docs/load- balancing/http/using-http-lb-with-cloud-storage)

Feel free to ping me with your project id if you need to be whitelisted for the Alpha.

Disclosure: I work on Cloud at Google, so I'm trying to win your business.

<comment><USER8> Does it support ssl for custom domains? AWS has a "certificate manager" service that integrates nicely(i.e provides free certificates, automatic renewall etc) with their CDN.

</comment></comment></comment></comment><comment><USER9> That's one wait over. Next wait: CloudFormation support for this option.

<comment><USER10> So annoying that every new feature they release will take weeks before it's available on CloudFormation. :/

<comment><USER11> I feel this pain. Used to be longer than 2 weeks...

</comment></comment></comment><comment><USER12> Awesome. This will surely drive the creation of more HTTPS/2, QUIC, and SPDY dissection tools: [https://www.defcon.org/html/defcon-24/dc-24-village- talks.ht...](https://www.defcon.org/html/defcon-24/dc-24-village-talks.html) (grep for HTTP/2)

</comment><comment><USER13> I assume someone from AWS is on here: Do we need to invalidate all of our assets after changing to http2?

<comment><USER14> I just enabled it and received an HTTP/2.0 response without invalidating.

</comment></comment><comment><USER15> Does anyone know why Amazon doesn't enable gzip compression on Elastic Beanstalk servers by default or give you an easy option instead of having to use the .elasticbeanstalk configuration files to do it?

</comment><comment><USER16> Now if Amazon could support SSL at a price point somewhere between SNI (free) and dedicated IP ($600/mo), there could be some serious competition between CloudFlare and CloudFront. Say what you will about CloudFlare MITM'ing everybody, but their SAN SSL on the Pro plan ($20/mo) is a brilliant hack. I would gladly pay double that for an equivalent Amazon service, but unfortunately Amazon seems a bit slow when it comes to SSL/TLS. They didn't even support SNI until recently.

<comment><USER17> >They didn't even support SNI until recently.

[https://aws.amazon.com/about-aws/whats- new/2014/03/05/amazon...](https://aws.amazon.com/about-aws/whats- new/2014/03/05/amazon-cloudront-announces-sni-custom-ssl/)

Two and a half years

<comment><USER18> Though ELB SNI is nowhere to be seen :(

</comment></comment></comment><comment><USER19> This is awesome for AWS users. Hopefully this will push Rackspace to enable HTTP/2 on their CDN service.

</comment><comment><USER20> Nice, but ELB needs HTTP/2 badly as well!

<comment><USER9> ELBv2(Application Load Balancer) supports HTTP/2.

<comment><USER20> Yeah, but you need to migrate from ELB to ALB (scripts and existing resources) instead of turning a switch on like with CloudFront.

<comment><USER11> Is that a difficult migration? Admittedly our stack is tens of servers, not tens of thousands, but at first glance it looked like I could achieve migration via a simple update to a cloudformation script.

<comment><USER21> I just spent the last week migrating our dozen micro-services over. It wasn't too bad, and resulted in less complication as you can now have one internal and one external lb rather than one per service (and less security groups, DNS records, etc.).

The only real difference is that you now have to configure routing and target groups.

</comment></comment></comment></comment></comment><comment><USER22> But still no WebSocket support?

<comment><USER23> Why would you deliver static content over websockets? CDNs are for http based delivery of static files.

If you want websockets you should be using EC2 [https://aws.amazon.com/blogs/aws/new-aws-application-load- ba...](https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/)

The EC2 ELB supports websockets and HTTP/2.

<comment><USER22> Yes, obviously you don't serve static content over websockets.

The point is that CloudFront can be used as the front end to your web site, with, depending on path, requests going to origins that are S3 buckets, ELB or EC2. Until recently, ELB didn't support websockets either. It does appears though that a new ELB was launched last month that does support it, so that allows for a solution.</comment></comment></comment>


Ask HN: Is it financial suicide for me to start a business during this pandemic? - <AUTHOR> I need advice. I have a 10K emergency fund and nothing to my name besides that. I live with my parents, both of which recently got laid off and are using their emergency fund to pay for bills such as food and rent. I've been wanting to make a biz for myself (web dev and programming for other biz small and big; I'll know how to market and sell my services with the books I've read). I'd be the only employee in my company and my total costs would be roughly $600~ to start the business. Been wanting to start it since Jan but some things came up that impacted my life. Now with this pandemic of an illness, I'm scared and also feel I shouldn't take any money from my emergency fund. Am I insane for wanting to do this? Should I take the plunge and do it before this illness gets worse or should I completely forget it and save my money? The pandemic has me worried but supporting my family so their emergency doesn't run out also has me worried <comment><USER2> Don't do it. Things are going to get worst, before they get better. Your potential customers are seeing their current customers canceling orders, canceling projects, etc. As you said both your parents were recently laid off... And under this climate it's going to be at least 6 months before they find a new job.

Being an adult means having the capability to delay what we desire... In order to fulfill our responsibilities.

</comment><comment><USER3> Does that $600 make a large difference in your budget?

Realistically, a one man operation shouldn't be too affected by this pandemic, depending on the market you are going for. Obviously industries such as hospitality are getting hit a lot harder than others.

Outside of you personally getting sick and causing it to halt development, I don't think it should be much of a concern.

<comment><AUTHOR> I've always had a scarcity mindset due to my past growing up so I believe that is why I think $600 is a lot of money. I've always worked for others (unpaid internships, uni work, etc) and never did anything really entrepreneurial. Not out of lack of skills but fear and thoughts of having a job is more safe than making the money. I'm asking folks at HN because everyone here is a lot more considerably wiser than I am. I've never been put in this position and my parents being laid off is something I nor they could've ever seen coming.

Thank you for your response, means a lot

<comment><USER3> I completely get that! I grew up in a large low income family, so I completely get that mindset of having a job above all else.

What would your plans be if you weren't to strike out on this business? Another option is to always moonlight your startup while working somewhere else. That gives you a bit more of a cushion if your business idea doesn't turn out.

It may seem like everyone is wiser than you, but that isn't true! Often times you will have a better understanding than you think :)

</comment></comment></comment><comment><USER4> > Should I take the plunge and do it before this illness gets worse

It seems to be getting worse every hour. The companies you want to sell your services to may currently be in panic mode and, if so, the last thing they'd want to do is spend money on new projects. I'd sit tight and wait for the pandemic to abate.

</comment><comment><USER5> Not suicide perhaps but you should take care to evaluate the likelihood of getting paying customers in the current environment if things turn out as bad as they seem to be shaping up to become. I expect both consumers and businesses to be curtailing spending sharply for quite some time.

</comment><comment><USER6> The 6 month outlook for a new business is pretty poor. The 5 year outlook is probably not much worse than at any other time.</comment>


Quantum Theory from Five Reasonable Axioms (2001) - <AUTHOR> http://arxiv.org/abs/quant-ph/0101012 <comment><USER2> > Axiom 5 (which requires that there exist continuous reversible > transformations between pure states) rules out classical probability theory. > If Axiom 5 (or even just the word "continuous" from Axiom 5) is dropped then > we obtain classical probability theory instead.

I actually recently read this paper and wondered the following question: what experiment supports the need for axiom 5, distinguishing quantum mechanics from classical probability theory? This came up because I always hear about "2-norm preserving unitary operators" as the only reasonable theory for quantum computing, which is of course different from classical probability. Is it just Occam's razor that to achieve the same results in experiments one would need to impose some large number of new states to a particle?

Most of my understanding comes from a light reading of Nielsen-Chuang and Aaronson's stuff. (A minor tangent: a theorem from computer science informs me that complex numbers aren't needed if you're willing to get a "good enough approximation" and polynomial blowup, but this paper argues complex numbers _are_ necessary, even for finite/countable state spaces; I want to read the paper a bit closer to figure out where this discrepancy is).

This culminated in the following physics stackexchange question, which was probably not worded in the best way for the physics community[1]. I still don't really understand any of the answers. Maybe someone on HN can elucidate it for me :)

[1]: [http://physics.stackexchange.com/questions/205742/what- exper...](http://physics.stackexchange.com/questions/205742/what-experiment- supports-the-axiom-that-quantum-operations-are-reversible)

<comment><AUTHOR> Time-reversal is a confusing topic, both because it involves innately complex issues, and because scientists are not always consistent about the terminology they use. This article does a good job untying the Gordian knot:

Jacobs, Tim, and Christian Maes. "Reversibility and irreversibility within the quantum formalism." arXiv preprint quant-ph/0508041 (2005). [http://arxiv.org/pdf/quant-ph/0508041v1.pdf](http://arxiv.org/pdf/quant- ph/0508041v1.pdf)

</comment></comment><comment><AUTHOR> If the paper is a little dry but you are interested in the concept of axiomatically deriving quantum theory, try this wonderful written lesson from Scott Aaronson: [http://www.scottaaronson.com/democritus/lec9.html](http://www.scottaaronson.com/democritus/lec9.html)

The lecture is part of his course, "Quantum Computing Since Democritus," which features some of the clearest prose you will find anywhere on topics like complexity theory and P vs. NP.

</comment><comment><USER3> I remember when this came out I found it less than satisfying. Quantum mechanics is a theory of physics, and those axioms are not physical. Rovelli's earlier ideas are mathematically equivalent, far more physical and come closer to answering some real questions. [http://fr.arxiv.org/abs/quant- ph/9609002](http://fr.arxiv.org/abs/quant-ph/9609002)

<comment><USER4> "the theory describes only the information that systems have about each other"...it's almost tempting to see it as the universe's solution to a distributed systems problem.</comment></comment>


Supermensch: What does the superhero craze say about our own times? - <AUTHOR> https://aeon.co/essays/why-superheroes-are-the-shape-of-tech-things-to-come <comment><USER2> Way too complicated an explanation. I don't think it has to do with technology at all.

I think the reason superheroes are all the rage is that they present usually simple, uncontroversial content that appeals to the broadest collection of cultures, ages, and educational/socioeconomic backgrounds - so they maximize their audience and thus the money they make. It's simplistic and you don't have to think too deeply about it. It doesn't challenge your notions of society or speak truth to power. It's just about good guys fighting bad guys

<comment><USER3> I don't think this is true. Moral ambiguity, anti-government, anti-wealthy people themes have been pretty prevalent in the movies of late. They're not especially deep or insightful, but the term comic-book evil seems unsuited to modern superhero movie villains. They're undoubtedly "better" than what I grew up with at least.

Large portions of fiction have generally always focused on people who were superior to others, at least in terms of cleverness, but often physical ability as well. Odysseus comes to mind. Extraordinary people are simply more interesting than ordinary ones, especially if your primary goal is to entertain.

I think the reason comic book superheroes in particular are popular is simply that they're easy to make and market than something that is less well known and less established; and from a business perspective, there's synergy in making lots of movies from the same universe because people like it when movies come from the same universe.

<comment><USER4> Two of the most popular superheroes of today are Iron Man and Batman. They are literally just rich dudes in rich dude toys. They are the heroes of the story.

Professor Xavier is wealthy af. And he doesn't go around helping just anyone. His altruism is hecka parochial.

About the only common element is that the government generally sucks at doing anything. The only thing the government doesn't suck at is having at least one plucky SEAL/Ranger/Marine team out there that's fighting against the odds.

<comment><USER3> Iron Man and Batman are some of the most intelligent humans in their universes. Iron Man per the latest marvel films, invented self-regenerating nanobot armor and time travel. Batman kinda varies in how superhuman his intelligence is depicted and I haven't bothered to see the last few so can't comment.

Writing this now I see your point was not that they aren't extraordinary, but rather the opposite of anti-wealth. I don't disagree, but I'm not claiming that every movie covers the same ideas either. However, the villains of Spiderman 2, for instance, are a bunch of Iron Man's lower level former employees who specifically call out how they got the short end of the capitalist stick, and how unfair it is that he got the spoils of everything, and how easy it was for him to dispose of them. The villains of Spiderman 1 are just some construction guys who got shafted by the collateral damage of the heroes and are trying to make a living wage. Yes; I do recognize the irony in that both of these working class groups are villains, but they're not meant to be portrayed as "Evil" for the most part. Again, not especially deep, but not "I'M GOING TO DESTROY THE SUN BECAUSE THATS WHAT VILLAINS DO!".

The captain america movies, seem particularly keen on the idea that the american government / law does not define the american ethos.

<comment><USER4> Maybe they're just returning to the roots of the word villain from Old French for a villager/peasant.

</comment></comment></comment></comment></comment><comment><USER5> Superhero stories were always compelling, then CGI got good enough to make them into movies. I don't think it's chance that they got popular shortly after you got really good visuals of someone getting punched through an office building. I find that explanation a lot more simple and convincing than the one in the article.

<comment><USER6> Superhero stories were put on the screen long before CGI.

The Batman series from 60s come to mind or the Superman movies from the 70s (and there Superman III is IMHO the most enjoyable with a Richard Pryor that pulls of a really cool hack).

<comment><USER5> I should have said CGI got good enough to make them into really popular movies. Or more specifically, that they were able to recreate the same images that you have in comic books in live action movies. The superhero movies of the 60s and 70s didn't pull that off.

</comment></comment></comment><comment><USER7> Another possibility is that superhero movies are expensive and complicated to make. Tools for making video entertainment have empowered a much larger number of people with the ability to create content. While many fan films and amateur productions are still poor in quality, others now match or exceed what Hollywood put out just decades ago for a fraction of the cost. Instead of trying to compete with these low cost productions, moving into mega blockbusters where the small guys can't follow keeps Hollywood's product unique.

</comment><comment><USER8> Joseph Campbell's work The Hero with a Thousand Faces dives deep into the mythology of heros across many groups:

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

We've been doing this for thousands of years. Movie fiction is just one facet of how humans are compelled to hero worship at all scales of communities whether political, fictional, sports, or careers.

<comment><USER9> I was going to mention the hypocrisy of media and how conflicting narratives on hero worship are compounding mental health problems for younger generations, but you summed it up pretty well.

With the glut of false/fabricated idols, the entertainment industry seems to be playing catch-up on niche hero's to suit every demographic.

</comment></comment><comment><USER10> Superheros weren't invented in the 20th century. We just used to call them differently. They used to be gods or their offspring.

<comment><USER11> Do you pray for Wonder Woman?

<comment><USER10> Did the Greek pray to Herakles?

<comment><USER6> Yes. Some did. [https://en.wikipedia.org/wiki/Heracles#Cult](https://en.wikipedia.org/wiki/Heracles#Cult)

Although if instead of the verb "pray" you use the verb "worship", the distinction between ancient heroes/half gods and modern day super heros becomes much smaller.

<comment><USER12> >Although if instead of the verb "pray" you use the verb "worship", the distinction between ancient heroes/half gods and modern day super heros becomes much smaller.

It doesn't. No one is actually _worshipping_ modern superheroes. No one believes superheroes actually exist, or ever existed, and can intercede on their behalf they way they might angels or other deities.

<comment><USER6> > It doesn't. No one is actually worshipping modern superheroes. No one > believes superheroes actually exist, or ever existed, and can intercede on > their behalf they way they might angels or other deities.

I'm not sure the latter was something that the ancient people thought possible. If somebody you worship actually exists or existed, is of little importance to the impact they have on the lives of humans.

Fans build shrines for their favorite characters, take them as rolemodels, draw strength from their stories, discuss them as if they were real persons.

Fictional characters often influence people much more than real people.

</comment></comment></comment></comment></comment></comment><comment><USER13> There's probably a less lofty, more mundane pop cultural answer for this: the generation that grew up on Saturday Morning superhero cartoons are now tastemakers, and the mainstreaming of nerd culture and fandom has incentivized studios towards making big budget live action versions of what used to be consigned only to cartoons on TV.

Also, while superhero movies are as old as Christopher Reeve's Superman films, or perhaps Republic serials, the mainstreaming of nerd culture and fandom has also created a public that's more open to elaborate world-building and lore in their summer blockbusters. So while superhero movies used to be more self- contained, now we have these sprawling multi-film sagas giving the studios an excuse to churn out multiple pictures a year.

</comment><comment><USER14> >Looking at it this way, the popularity of superhero culture among aficionados of new technological entrepreneurship seems obvious. It's a culture that celebrates individual agency at the expense of the collective.

Ah there you have it, superheroes are popular because they are anti- collective.

>But the superheroes also demonstrate what a peculiar kind of divinity this is – shorn of the spirituality that is supposed to define our relationship to the divine. The divine power that the technological future offers devotees is purely material. And the doors of that technological heaven will be opened only for the elect who have the material means to enter.

And we learn that superheroes are anti-spiritual, materialistic and only work for the elite 1%.

</comment><comment><USER15> Superheros are just angels or demi-gods with a more exciting story behind them. Miracle workers, they look like us to some extent but have superpowers. It's the same old story in a new dress.

</comment><comment><USER16> I feel like the popularity of superhero narratives isn't because people particularly love those stories; it's because they're easy to make them decent. The public just wants good, enjoyable stories. The creators figured out that superhero stories are pretty reproducibly effective, so they keep making them.

</comment><comment><USER17> > Übermenschen – machine-men, aerialists and space-bound conquistadors – > tantalised philosophers and beguiled fascists

Articles like this seem to take advantage of the misunderstanding of Nietzsche without directly endorsing it. The actual concept of "ubermensch" would have no place in this article.

The term was coined by Nietzsche and referred to a futuristic human who was raised without the influence of religion or superstition and without having interacted with anyone who has such influences. In his view these people would be liberated from what he saw as the oppression of Christianity (and other Abrahamic religions), which he felt encouraged people to accept meekness, suffering and poverty in exchange for a pleasant afterlife. He called Christians "preachers of death" and encouraged people to abandon complacency for a "will to power". It is an appeal to a superior type of person but it is intended to encourage rational cultural development. The term itself has nothing to do with technology or ethnicity.

By now everyone knows that his work was bastardized by the Nazis but many seem to prefer the controversy of the Nazis' version over what he actually wrote. He spoke out in defense of the Jewish people and even stopped doing business with and publicly rebuked a publisher who was an anti-Semite. We have gotten really good at remembering the hateful and forgetting the rational.

<comment><USER18> I don't think Nietzsche quite fits this context. "Will to power" without meekness, suffering, or poverty seems to fit a super _villain_ more than a superhero.

</comment></comment><comment><USER19> It wouldn't be it was/is a fad? In the 2000s there was literally a zombie movie coming out every week it seemed. In the UK there was load of movies about the UK "underworld" e.g. Football Hooligans, Drug Dealers, Gangstars and Illegal fights (Layer Cake, Snatch, Rock and Rolla, Green Street, Football factory, The Business and my favourite Sexy Beast).

There is generally a new film genre that does really well and people copy it chasing the money as people tend to want more initially until it is played out.

<comment><USER20> The title refers to it as a "craze." I don't think using the synonym "fad" adds anything. The question is "why this fad, now, rather than a different fad, now?"

<comment><USER19> What did zombie movies say about the 2000s? Nothing really.

Christopher Nolan's dark night trilogy proved that these films can make money and be critically acclaimed.

Also is it really a craze? Christopher Reeves Superman was pretty popular so was Spider-Man and the Hulk when I was a kid. There were loads of movies and tv shows in the 80s and 90s with super heroes. I actually can't remember a time when they weren't popular.

The only difference now is Marvel is raking in at the box office. Is anyone else actually making money? DC aren't.

</comment></comment></comment><comment><USER21> Individually we are small, powerless people (one in billions) being faced with insurmountable existential challenges (global warming, etc).

<comment><USER18> Not just large challenges. We are faced with a society so big that we feel that nothing we do can make any difference. We feel powerless. Hence the appeal of individuals powerful enough that they can, individually, make a difference.</comment></comment>


What to do with your dead apps? - <AUTHOR> So I built this web-app http://skunktime.com. I had a team for a while but they abandoned the project because their heart wasn't in it.
The app never had a real chance to test the market.
So my question is what do you do with your dead apps? Is there a place to sell them, or a place to get new co-founders who can breath new life into them? <comment><USER2> A couple of marketplaces, e.g. [https://flippa.com/](https://flippa.com/). Make sure that you have - ideally written - agreement to sell from any cofounders and maybe team members. The might later claim to own the rights of the domain or a logo or even code. Right now they might claim they don't care, that can change when money is involved.</comment>


How Has San Francisco Run Out of Money for Affordable Housing? - <AUTHOR> https://www.spur.org/news/2018-11-08/how-has-san-francisco-run-out-money-affordable-housing <comment><USER3> I was just in San Francisco for a couple days last week. I live in Brooklyn New York.

I'm here to tell you that I've figured out the problem you guys are having out there.

I think the reason you're having some issues is that you have a globally important city with an absolutely massive jobs base and huge skyscrapers full of people working, and the rest of the city is full of tiny wood framed 1-3 story houses that each have one car garages on the first floor.

So, maybe, like, let people build fucking apartment buildings.

Just an idea.

<comment><USER4> I was also just in San Francisco (also from Brooklyn!) and noticed this as well. Downtown SF has all the look and feel of a global city, think Manhattan or Tokyo. Once you get into the western half of the city it seems like a nice quaint European city half it's size. I definitely understand why rich land owners want to "preserve the character of the neighborhoods" but you can't have it both ways.

The most puzzling thing was that I did see a few new residential constructions going up and they were also of the 1-3 story variety.

<comment><USER5> The reason those buildings are 1-3 stories is that most of the city has a zoning limit restricting building to ~4 stories at most.

<comment><USER6> Prop 13 also allows people to sit on their land because they can still afford the property tax for ridiculously expensive houses. If Prop 13 did not exist, NIMBYs would not have the resources to keep stalling development.

<comment><USER7> Many of them would be selling out and moving to less expensive areas had Prop 5 passed, but the Democrat machine opposed it.

<comment><USER6> Why fix a regressive tax with an even more regressive subsidy? Prop 13 has had such far reaching negative impacts.

</comment></comment></comment></comment></comment></comment><comment><USER8> "Affordable housing" is just a coded way to avoid saying "subsidized housing". So it should be no surprise that they run out of money for it, there is near- unlimited demand for subsidized housing and can sink any dollar amount into it that you could budget.

SF needs to build more dense housing. A lot more. Granting subsidized housing to a tiny minority feels good and maybe is alright as a bandaid, but isn't ever going to solve the problem in the long run.

Build dense, everywhere you can. I sympathize with folks who worry about how it will change their neighbourhoods but not addressing the problems has produced even more negative change. Build build build.

<comment><USER9> _"Affordable housing" is just a coded way to avoid saying "subsidized housing"._

Not exactly.

"Subsidized housing" is when the renter or the landlord receive a payment from the government to supplement the rent paid by a renter.

"Affordable housing" is a broader umbrella and can also include legal requirements that the landlord set rent rates for a certain percentage of its units at a particular level (often expressed as xx% of the average wage within xx distance from the building).

Affordable housing can also include rent control, like the type in New York; and probably other methods I'm unfamiliar with.

<comment><USER10> But specifically in the article, when they talk about a building being "30% affordable", they're talking about subsidized lottery housing. I.e. housing that is below market rate (the developer takes the hit) and is assigned via San Francisco's affordable housing lotteries to a small fraction of the people whose income is low enough to qualify.

<comment><USER9> _the developer takes the hit_

I think it's a difference in philosophy.

Again, I can't speak about SFO, because my experience in this space is mostly Chicago.

Your assertion seems to be that the developers "take the hit" as if the development/building is an island unto itself. The city's view is that the development/building is part of a community and should contribute to the community and integrate with it.

That's why in Chicago it is very common for a new building to fix up the neighborhood it's in, as part of the privilege of locating in Chicago.

400 North Lake Shore, for example, is required to build out DuSable Park. Most other buildings have to replace all the traffic signals and crosswalks for three or four or five blocks around.

In addition, if the developer wants extra height, that can be purchased in exchange for contributions to the Neighborhood Opportunity Fund, or a fund to preserve historic buildings.

Again, it's a difference in philosophy. "Us vs them," versus becoming a contributing part of the neighborhood community.

<comment><USER11> > 400 North Lake Shore, for example, is required to build out DuSable Park. > Most other buildings have to replace all the traffic signals and crosswalks > for three or four or five blocks around.

A city should set its property and income taxes such that it can (a) maintain parks and (b) maintain intersections without requiring ransom from new developers. Because what happens to the parks and intersections when no new developers want to come? Also, "I just invented a one-off tax you'll need to pay" is some corrupt (or at least corruptible) government.

<comment><USER9> _maintain parks_

It's not a park to be maintained. It's a formerly radioactive wasteland.

 _" I just invented a one-off tax you'll need to pay"_

It's not a one-off tax. It's codified, and every developer gets to choose if it wants to make these payments or not. If the developer doesn't want to pay, then it is welcome to build within the zoning established a half century ago, and it won't even be subject to Plan Commission review. If the developer wants an extra 30 stories beyond the current zoning, then it can pay for that by contributing to the community that it is going to impact with increased traffic, infrastructure, and demand for services.

</comment></comment></comment></comment></comment></comment><comment><USER12> Crazy how of all the recommendations put forward in the article, none of them actually say what the article admits! That is, inclusionary zoning, or any other affordability mandate put on private developers, is a failure and cannot work. If you goal is to make lots of cheap subsidized housing, mandating developers to give away 30% of their profits will certainly cause a ton of other issues.

We see IZ popping up everywhere because politicians get to claim they are helping the most needy without raising taxes or really asking _anything_ from the normal citizen. In fact, we can see here that the side effects are numerous and quite scary.

And yet, SF tries and tries to magically create more cheap housing by telling developers they _must_ do xyz without any care or reason to the market realities.

<comment><USER13> Yes, they need to straight up just build more housing.

 _It doesn't matter if that housing is for high-income residents or low-income residents. Every housing unit built helps make a city more affordable._

[https://gizmodo.com/how-building-expensive-new-housing- actua...](https://gizmodo.com/how-building-expensive-new-housing-actually- helps-creat-1763423240)

<comment><USER14> _Yes, they need to straight up just build more housing._

Isn't it technically that they need to build massive housing that can get to the jobs in SF in a reasonable commute time? So either they need to figure out a way to get commuters into the city quickly (a mass transit solution) or they need to build a lot more housing where current single family housing is.

I guess if they want the look of the city to stay the same they really need a get-them-in-and-out plan that actually works.

<comment><USER15> People are willing to pay a premium to avoid commute times. Not to mention, commuting is bad for the environment and wastes people's time. There's demand for housing _in_ San Fransisco. Ignoring this demand and trying to placate it by building housing out of San Fransisco probably won't do much to dent housing prices. Even if it does, we'll still pay the price in increased traffic, pollution, and urban sprawl.

</comment></comment></comment></comment><comment><USER15> Because no amount of money overrides the pidgeonhole principle. If the city keeps refusing to expand the market rate housing pool, then rents (and by extension land prices) are going to keep rising. Mandating below market rate units or building public housing is putting a tiny band-aid on a larger discrepancy between supply and demand.

It seems to me (SF resident) that a lot of people have some idealized views of the city, and fear that increased density will mar that image. And thus, the tendency to try and use price controls to fight market demands.

</comment><comment><USER16> If you need an affordable car, you wouldn't look for a brand new car. You'd buy a used car. Even if the government was willing to subsidize your car, it would be much better to apply that subsidy to a used car.

The analogy isn't perfect, especially when land is a large fraction of the cost, but it sure seems like new construction is the most expensive possible housing. Why is San Francisco trying to use their limited budget to create "affordable" new construction?

<comment><USER17> If there isn't enough housing there's no way to make it affordable outside of the government buying the buildings and instituting rent control, which will never work given how much hate imminent domain gets and how inefficient the government is at managing literally anything.

<comment><USER16> Building more needs to be a part of the solution, but what if you built only market-rate housing and applied subsidies to existing housing?

</comment></comment></comment><comment><USER18> There is another solution: reduce demand.

If you have certain resources that are limited like parking/sewer/etc the city would say, you can't add that building.

In the case of S.F., the housing demand is driven by employees/new businesses. In much the same way zoning would keep you from adding a new building with no place to park, the city/county should limit new business creation when there is no place for the new employees to live.

</comment><comment><USER19> SF's housing market is heavily impacted by the 1 story building height limits in cities up and down the peninsula, plus in south bay.

<comment><USER7>
      the 1 story building height limits in cities up and down the peninsula

Which, of course, does not exist in _any_ of those cities, let alone all.

<comment><USER19> you know what, i meant to type _2_.

2 story building height limit.

I am shamed.

</comment></comment></comment><comment><USER20> Housing, like healthcare is one of the 3 pillars of a successful community.

The current "affordable housing" is the "subsidized housing" mantra that gets votes at the expense of taxpayers but does very little to solve the real issue: SUPPLY

For a successful community EVERYONE should be allowed to live happily regardless of their income. If I were to get used to paying $300/mo rent for an apartment that has a $3300/mo market rent, I would probably reconsider improving my situation - the classic case of good intentions keeping people down instead of pulling people up.

There is no easy way to improve these but a long road paved with hard and focused work.

They only kind of people willing to do that would be the actual owners of the house, so empower them. Remove and reduce power/authority from any other party that gets in their way to improving the community because of lobbying by external forces.

My suggestion is this: instead of messing around with cheap politics and vacuous social signalling, let's petition the government to let you and I build houses ourselves.

That's right - we build houses ourselves.

If that sounds crazy, maybe it is: It's just like starting a business. Requires dedication, planning and the most important glue - hard work. Literally sweat off every inch on your body.

Right now, it's REALLY hard to get good quality construction workers.

Like people who give a shit about the house they are building and even care to know if they are doing something wrong let alone going back and fixing the mess they left behind.

Learning construction takes time and finally there is no money you can pay someone to care about what they are building if they just don't care about what they are doing.

You and I building our own houses WOULD care.

Because it's in our interest to do so.

After having seen hundreds of garbage new construction where the water runs the wrong way of the drain in a bathroom, badly done framing, wiring, crooked doors and all that telltale sign of a developer trying to turnaround property as quickly as possible so that they can recoup their investment, I feel very sad when these glorified barns sell for millions of dollars because there is limited supply.

When the only two options for food are rotting potatoes grade 1 and rotting potatoes grade 2, rotting potatoes can sell for quite a lot of money.

That's SoCAL realty right now.

Very unfortunate.

I'm not saying we build everything up from the dirt and studs. I'm not saying this would even work for everyone. This would not make financial sense for the $300/hr software architect or lawyer. This would not make financial sense for the physically challenged who cant work with their hands and feet. This would not make any sense for those who think building a house is something very magical like maintaining a car or cleaning the furnace filter.

However, it would work wonders for those who are truly desperate for housing. Those who are willing to put in most of their spare time and effort into building a home for their family.

Let the government/developer do the really, really hard stuff - <USER2> foundation, the core plumbing, the sewer connections, the mainline electrical.

Maybe a studio minihouse next to a plot of land on a foundation where we can eat, sleep, commute to work from as we build the rest of the house.

Leave the rest to the owner of the house and property to build over time as time and money allows without requiring them taking out million dollars upfront in loans and hope it all works out in the end.

<comment><USER21> _Housing, like healthcare is one of the 3 pillars of a successful community._

What's the third? Transit?

<comment><USER20> Hello David! Thank you for not only reading my comment but taking the time to think on it

I consider the 3 pillars of a successful community to be : healthcare, education and infrastructure

So the answer to your question is education.

Perhaps naively I bundle transport, roads, internet, bulidings and the like into infrastructure.

What are your thoughts on this classification?</comment></comment></comment>


Stuck due to "knowing too much" - <AUTHOR> http://programmers.stackexchange.com/q/150549/17163 <comment><USER2> Some lessons in software engineering take a long, long time to sink in. (For me, at least):

\- Don't generalize too early, which seems to address the original question pretty directly.

\- Don't optimize too early.

\- Maintainable > Correct > Fast. Maintainable = comprehensible. If it isn't maintainable, you won't know if it's correct. If it isn't correct, there's no point in making it fast.

\- Minimize state. Deriving something from scratch every time it's needed leads to far fewer bugs, and the bugs there are probably far more obvious. Cache only when you need to for performance.

\- Simplify as much as you can. This is the hardest one, because it can take a very long time to figure out all the ways in which a design that you thought was simple, turns out not to be.

\- Simplify some more: The usual statement of the "simplify" rule is "as simple as possible, but no simpler". I don't think that's right. If you see a nice simplification at odds with requirements, push back on requirements.

<comment><USER3> I'm starting to see this more clearly as time passes. I've spent years developing the ability to "engineer" things and only now am I realizing that I've learned to "over-engineer" things. Writing software has taken on a life of its own that is actually counter to its purpose.

I don't think in terms of simplification though, I see it as "write what you need, when you need it." But I absolutely agree that you should avoid generalization aggressively and optimization should rarely be on the table. I also agree about minimizing state. Do it all "on the fly" unless there's known performance hit.

</comment></comment><comment><USER4> The moderation on programmers.stackexchange.com is completely overbearing. How can a question about analysis paralysis be closed for off-topic? If stackoverflow is for technical question/answer, what is the point the linked stackexchange if not for discussion of a common programmer problem like this? I see stuff like this closed all time time and it's really annoying.

<comment><USER5> This is a rambling discussion, which Stack Exchange is not really intended for. There are lots of good places to have rambling discussions. We focus on answerable questions with specific answers, not long-winded, open-ended conversation starters. There are plenty of other sites for long-winded, open- ended conversation starters, including Reddit and Hacker News.

After a decade or so of operating sites for programmers on the Internet, I've learned that, left by themselves, ALL programmer online sites will rapidly deteriorate into:

* I hate my job, woe is me ("I hate my job too!")

* I'm not productive any more, oh dear ("Oh my god you took the words right out of my mouth!")

* And some nonsense about H1B visas.

These kinds of conversations are endless because, I'm sad to say, they represent a common problem among programmers. Discussing it as a means of therapy is a wonderful thing, but DO IT SOMEWHERE ELSE, because Stack Exchange is 100% focused on questions with specific factual answers.

This hard and fast rule is actually WHY you love stack overflow so much. It's WHY the network works. It's WHY you click on the stackoverflow.com link in the Google results even if it's third. If we weren't strict about this stuff we wouldn't have such consistently high quality ANSWERS.

Just because "moderators" (actually, users) have deemed to close a question on Stack Exchange, doesn't mean it's a bad question, or that the person who asked it is bad. It just means that Stack Exchange is an edited, curated environment, not your livejournal. The very moderation that people complain about every time a popular question is closed is what has been making the site work so well.

<comment><USER6> If there's a meta.stackoverflow.com, have you considered some sort of socialization.stackoverflow.com? Then you can not only say "buzz off" but specifically give someone a place to buzz off to. It'd be one of those pragmatic concessions that keeps the idealism moving along and whatnot :)

<comment><USER7> That's what the chat rooms are for[1].

[1]: [http://blog.stackoverflow.com/2010/04/do-trilogy-sites- need-...](http://blog.stackoverflow.com/2010/04/do-trilogy-sites-need-a-third- place/)

I _really_ like the "third place" idea, but I don't think the chat rooms have been successful in realizing it. Unfortunately, people just don't use them very much--even the StackOverflow rooms rarely have anybody to talk to.

I think the fundamental problem is that discussion in other parts of the site is asynchronous, like email, while the chat rooms aren't. The comments and posts stick around and allow people to talk about something across a longer period of time, which also allows more people to join the discussion. On the other hand, chat happens immediately--it only works for the people who are there at the moment and only works while everybody is on.

There is, of course, nothing wrong with chat in general. I just don't think it's the best match for the SE format.

<comment><USER8> Speaking for myself, clicking on a "chat" link crosses a threshold for me from "I'm taking a break and checking stuff out" to "I'm goofing off." Maybe I'm kidding myself that my checking out SE threads isn't goofing off, but once I enter something called "chat" there's no way I can suspend my disbelief, so I don't do it.

<comment><USER9> Heh ;)

So, you're goofing off on chat, a discussion oriented medium, and not on Stack Exchange, a platform that's feverishly against discussions.

But on more than one occasion you've asked for Stack Exchange to change it's stance on discussion oriented questions and become more discussion friendly. Assuming that happens, how soon do you think it'll be before you dismiss Stack Exchange as goofing off?

<comment><USER8> It's all about plausible deniability....

Seriously, I don't think I would dismiss the whole of SE as goofing off if its scope boundaries were relaxed a bit.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> This is one of the most pernicious forms of procrastination, because it's hard for smart people to accept that perfectionism is a negative trait. The more self-worth you derive from your previous successful outcomes, the more susceptible your ego becomes to fear of future failures. Your amygdala is telling you that you are successful already, so don't shake the boat. Tread carefully and you'll always have an excuse for why things don't work out. You'll never have to admit you just couldn't do it.

The solution is to divorce your self-worth from outcomes. Instead, derive self-worth from the process. We can have complete control over our actions, but never complete control over our outcomes.

This is far easier said than done.

<comment><USER11> Arrogance is probably the trait that most limits our intelligence. I've seen many smart people do extremely stupid stuff just out of fear of admitting they are prone to mistakes and failure. Humbleness is hard to master, but it's very important for us to try and practice it as much as possible.

Potential of success = (Intelligence / arrogance) + luck

<comment><USER12> What you're saying really strikes true, though I feel arrogant people can also be extremely hard working which can put them in better stead compared to others. Also, humbleness with a tint of arrogance or self belief can be a good mix – as long as you get the mix right.

</comment></comment></comment><comment><USER13> This is a real thing for sure. The first 80% of a project is the fun/creative part. The last 20% is painful and usually where you make a product out of a project. Experienced developers know that starting a project means that ultimately you will have to do that 20% and they question whether it's worth the investment (before starting the fun part). New developers are usually blissfully ignorant and simply enjoy the first 80%. Some of them will take it beyond that... most will leave it as nothing more than an unfinished project.

The fondness of directing others is really just the enjoyment of not dealing with the minutia of developing a robust solution.

</comment><comment><USER14> Very sad that the moderators are closing such interesting questions, because they do not conform to their opinion of what should go on the site, even though the topic is obviously hugely popular and appealing to a lot of users.

<comment><USER15> It's particularly outrageous because the given reason is "off topic for software development". It's quite clear from that judgment that the moderators don't know much about the topic and therefore are not qualified to hold a position of moderator on a board devoted to software development topics.

</comment></comment><comment><USER16> I also found myself getting stuck and over-engineering. Now, I try to take a phased approach to development:

1\. Make it work.

2\. Make it good (visually or otherwise).

3\. Make it fast.

<comment><USER17> This good. But how do you handle it when designing a protocol and a data encoding ? You can't iterate.

<comment><USER18> All good design comes from iteration. You can certainly do with protocols and encodings. Look at the very first published swing at HTTP, for example:

[http://www.w3.org/History/19921103-hypertext/hypertext/WWW/P...](http://www.w3.org/History/19921103-hypertext/hypertext/WWW/Protocols/HTTP.html)

From today's modern perspective, it's laughable. And that was just the first public bit. Surely he iterated some on his own before putting that out.

</comment></comment></comment><comment><AUTHOR> I submitted it because it's exactly how I feel lately, and would like to know what others think about it. My current (personal/academic) project involves Node.js, (Iced)CoffeeScript, MongoDB (with Mangoose), PhantomJS, Mocha, Neo4j, Nutch, Solr, Hadoop and Mahout.

All of them are new technologies and are changing rapidly and daily, and I find new stuff every day that forces me to change my APIs and the way I do things, and it's getting frustrating... It's the price you pay by using cutting-edge technologies and I accept that, but I can't help thinking that maybe Java+MySQL was a better/easier choice!

<comment><USER19> I suffer from the same trouble on occasions. I primarily deal with the Microsoft ecosystem which is volatile and fragmented at the best of times.

I would kill to do something in good old java/mysql.

A lot of the new ideas and principles are a mess. Don't get too absorbed - just use what lets you get the job done quickly and efficiently. a lot of it is just noise.

I tend to find that a complete break from everything for a day helps. That and cider :)

<comment><USER20> Try postgreSQL next time, at least it's ACID compliant ;)

</comment></comment></comment><comment><USER21> Don't let "perfect" be the enemy of "good enough".

A flawed-but-functional system that ships is empirically better than a perfect system that never ships.

<comment><USER22> See: Linux vs GNU Hurd

</comment></comment><comment><USER18> My solution to this is a simple kanban board. Trello.com is a good on-line one, but when possible I'll make them out of index cards or post-it notes on the wall.

People think that a kanban board is a to-do list, but there's a subtle difference. The real heart of is limiting the number of work-in-progress items. That means that the backlog is less a to-do list and more a things-I- am-definitely-not-doing-now list.

For me, every time I have one of those "It would be nice" thoughts, I write it down on a card for the kanban, throw it in the backlog, and forget it until the next time I make a prioritization pass. Most of the cards end up in what I think of as "the pit of nice ideas", the bottom segment of the board that never moves up because more important things always come up.

For the curious, you can see a photo and a little more explanation here:

[http://www.quora.com/What-are-some-uncommon-ways-to-work- sma...](http://www.quora.com/What-are-some-uncommon-ways-to-work-smarter- instead-of-harder/answer/William-Pietri)

<comment><USER23> Bloody genius!, I'm going to steal some post-it notes from the cabinet right now!

<comment><USER18> Good luck! Feel free to contact me with questions.

My big starter tip is to make the work-in-progress column physically small. My current one limits the "working" and "on hold" columns to 3 items each. Whenever they fill up that's a sign that there's a problem in my process.

</comment></comment></comment><comment><USER24> A situation I have seen with well-educated novice developers, is that they think of "technical debt" as universally bad. That's not true. It's not even true for actual debt.

Debt is only bad if it's your own long-term debt. One can also use short-term debt as a powerful tool.

For example, it might be simpler for one to write an initial iteration of a program that's _badly factored._ Then, once you get the program running correctly, refactor it. It's much easier to know you're on the right path if your program runs correctly, and you have verification data-sets or unit tests.

EDIT: Changed one short to long.

</comment><comment><USER18> Modestly off topic: Can I say how much I have grown to hate StackOverflow and its cousins? Just like this article, half of my favorite threads on there are closed or have been deleted due to violating some sort of rule that is not unreasonable in theory but leads to obvious idiocy in practice.

A great example of people losing track of the forest because of all the damned trees in the way.

</comment><comment><USER25> this is easier said than done, but the key to avoiding analysis paralysis is to worry about building the right abstractions and only that. if the software is abstracted well -- ie it correctly represents the underlying problem at an adequate resolution -- then it becomes easy to say YAGNI in the short run with the confidence that refactoring or adding functionality will be straight forward later.

<comment><USER20> not really. because you can over analyze what the right abstractions can be. it's only a matter of how abstract you want it to be, believe me.

Analysis Paralysis is inevitable as long as you want to write the RIGHT thing.

As soon as you accept "good enough, we'll upgrade later if necessary", you start moving towards the right thing.

Anything that says perfect, adequate, right, correct, etc. is wrong and leads to the dark side.

</comment></comment><comment><USER26> It just struck me we need "slackexchange" where we can trade expertise on avoiding work.

<comment><USER9> Dude, we already have one: <http://workplace.stackexchange.com/> ;P

</comment></comment><comment><USER27> The ideal to strive for is what we call the "Goldielocks effect".

Not knowing too little. Not knowing too much. Knowing just enough to get the job done.

In computing there will always be multiple solutions, and tradeoffs. What you want to aim for is "The simplest solution possible."

In my experience, this is really hard for most developers. Maybe the smart thing to do is find someone who makes it look easy and trust their judgment. Again, my experience is that most developers are reluctant to do this.

The question is not how much someone knows, it's whether they know "enough" to get the job done. Goldielocks.

</comment><comment><USER28> Solution: Don't be purfect. Drop your fears. Enjoy yourself.</comment>


It's OK Not to Write Unit Tests - <AUTHOR> http://blogs.msdn.com/cashto/archive/2009/03/31/it-s-ok-not-to-write-unit-tests.aspx <comment><USER2> IMVU did not consistently write unit tests on day one. So why are we all rabid unit testing / test-driven development advocates now?

<http://www.startuplessonslearned.com/2008/11/five-whys.html>

Every time you ship a bug to customers, ask yourself "How will we prevent this bug from ever reaching customers again?" and "Why did we write this bug in the first place?"

Almost every time, unit or acceptance tests would have caught the bug initially or prevented the regression. That's not to say unit tests are the only solution.

Sometimes:

* you need better knowledge sharing between engineers

* you should spend more time refactoring your code

* your internal APIs are confusing and inherently cause bugs

Often a follow-up to a bug will involve changes to all of the above.

When you start an experimental project, don't focus on automated tests if you don't need to... I'm all for lazily pulling in the processes you need as you need them. :)

Whether you write unit tests or not is entirely context-sensitive. The author's points might make sense in some context, but they certainly don't apply to every team or even every engineer.

Maybe this guideline is helpful: "I just wrote a new component. What kind of test coverage do I need to allow a new engineer to refactor arbitrarily and still be convinced my code works?"

<comment><USER3> "How will we prevent this bug from ever reaching customers again?"

I think the cost of this is far higher than it's worth.

<comment><USER4> Are you a programmer presently? That works on a codebase that's at least in the tens of thousands of lines of code?

Tell me what software you write so that I know to never, ever use it.

<comment><USER3> lines of code is very dependent on the language. I have one rails app that's in the 5k range, excluding tests, and it's been running for over a year with no restarts and no need for bug fixes. I think that says something about the effectiveness of my process.

I question the design decisions of any code base with tens of thousands lines of code.

<comment><USER5> If your app has been running for over a year, you might want to look into this (before someone else does)... [http://groups.google.com/group/rubyonrails- security/msg/7f57...](http://groups.google.com/group/rubyonrails- security/msg/7f57cd7794e1d1b4?pli=1)

<comment><USER3> thanks for the pointer. the site wasn't affected by that.

</comment></comment></comment></comment></comment></comment><comment><USER6> _If you're a Java programmer and want to have a rude awakening, go download Jester. Jester is an automated mutation testing tool—it goes in and replaces " <=" with "<", "&&" with "||", "!" with whitespace. And then it re-runs the tests. And then you get to watch in horror as your tests still all pass, regardless of what the product code actually does._

I've always wanted to write a unit-test testing library which inverts all of the assertions to catch the false positives. This sounds like it's a lot more sadistic (and useful) though.

<comment><USER7> Would be interesting to automatically run something like this and find a way to assert that the tests _should_ fail. Almost an automated test of your tests.

<comment><USER8> Unless I'm misunderstanding something, that is what these type of tools do.

</comment></comment></comment><comment><USER9> I'm a relative newcomer to unit testing and man.. has it saved me a lot of time already.

Forgetting the gigantic advantages it gives you over mere _bugs_ , I'm just as impressed at how it helps you resolve higher level issues.

For example, recently I moved a project I was working on months ago from one machine to another. Tests had lots of failures, despite no changes. Turns out I had an unpatched library installed, a few libraries of the wrong version, a slightly different database version, stuff like that. My tests picked all that up and I could vendorize stuff or tighten up my dependencies. Without the tests, I'd have been scratching my head for ages figuring out "what" wasn't working.

<comment><USER10> >Without the tests, I'd have been scratching my head for ages figuring out "what" wasn't working.

The real question though is how all that time you spent writing the tests compares to the time you'd have spent troubleshooting.

<comment><USER11> Have you done much unit testing? Done right, writing unit tests often doesn't take any extra time at all.

<comment><USER5> I disagree. We spend a considerable amount of time writing our behavioural tests (we have around 1,700 for our large web app), but they have saved us countless times from having to track down bugs after deploying code.

There was an article published in the last few weeks which showed that teams who write tests spend 10-15% longer in the development process, but they also save 25-30% of the development process time by not having to fix regression defects. Unfortunately, I don't remember which site it was linked from or what the article's title was. If I can find it, I'll link it here.

</comment></comment></comment></comment><comment><USER12> I'm not sure what to take away from this post.

Unit tests just saved my bacon when I accidentally introduced a serious bug in refactoring some network-related code.

The bug wouldn't have shown up outside of production in some very specific cases, but it would have had a serious customer impact.

Unit tests catch these things for me all the time. Every 5 minutes I spend writing tests easily saves me 30+ minutes I'd spend debugging when some code 6 levels down from the apparent point of failure caused the issue.

<comment><USER3> I wonder why the apparent point of failure is so far removed from the actual point of failure. With my work that is rarely the case, and I wonder which of us is the anomaly.

Don't get me wrong, I write tests, but not nearly as many as a lot of people propose. I do a lot of social sites, so the context may be different, but it's not uncommon for a release to introduce a bug immediately comes to my attention when a user hits it. I can usually deploy a fix very fast, and I feel this is a more effective approach than maintaining a test set approaching comprehensive coverage. People usually fail to mention the time it takes to maintain such a test set over time, which is higher than the time it takes to write the initial test.

Note, I always thoroughly test high impact pieces of code. i.e. account creation, anything involving money or personal information, and data validation code. Having said that, the bulk of the code is controller and view code which isn't earth shattering if it breaks for 10 minutes.

<comment><USER2> I've noticed that code connectedness has a huge impact on the kind of test coverage needed. For example, if your website back-end is fairly stable and the API rarely changes, then you don't typically need 100% code coverage on each page. As you mentioned, if you fix a bug, it won't randomly break later...

On the other hand, with a bunch of connected objects and events that fire, causing other events... it's very possible for a change in one system to affect others. In this situation, I recommend a ton of unit tests _and_ acceptance tests. In addition, decouple the components in the system and stabilize your base APIs. This will allow you to write a new feature without affecting stability elsewhere.

<comment><USER13> I also noticed that (at least in the code I write) bugs are much more prevalent in "boring code" than in "smart code"; that is, if I got some elegant but rather advanced piece of code I had put a lot of thought into (like some smart math stuff or something similar), it almost always works right away without any bugs whatsoever, however, boring and tedious-to-write code (such as wiring up GUI, integration glue code etc) tends to have a lot more bugs in it.

Unfortunately, this first type of code is a lot easier to test automatically than the second type. Smart code usually has clean and simple interfaces, while writing tests for "boring code" is also boring and tedious, like writing a test for each textbox on a form etc.

<comment><USER2> Maybe there's a way to automate the boring code? Write a system that lets you build UI without manually specifying the behavior of every control, etc.

</comment></comment></comment></comment></comment><comment><USER11> Summary: another post saying that "unit tests aren't a panacea".

Which is true, of course. But that doesn't mean that unit testing isn't terribly useful.

<comment><USER14> Uh,

He actually makes some subsidiary points that are worthwhile and don't just fit mold. * A lot of tests people write aren't really unit tests * Unit tests aren't the armor that protects you from error during refactoring. * Unit test don't necessarily improve design, indeed they can have a bad effect on design.

So, there's more to the article than the summary - read the article, I think it has merit.

</comment></comment><comment><USER4> Being a huge testing advocatem I agree with this post ...for the most part (and it's easy enough to disagree with if you didn't read it all the way). There are just certain parts of code that are just more trouble than they're worth to test.

However, I'm surprised at just how small an amount of code that really is. In fact, it's _really_ difficult to say what those portions of code are unless you stick to TDD.

Another thing that I've noticed is that not only do functional languages lead to a more testable design, but testable code tends to be more functional in nature. So perhaps tests are design tools.

Plus, while unit tests really only catch a small number of bugs (I think studies have shown something like 25%), they're the fastest way of catching and preventing the bugs they prevent. Words can't describe how frustrated I get when I deploy to the test server and get an error because I mistyped a variable name in some obscure part of my code.

Some times I think programming in a dynamic language without unit tests is like screwing without a condom. Sure it feels good for a while, but eventually it will come back to bite you (no pun intended).

</comment><comment><USER15> re: pains of unit tests when refactoring --

i.e. my experience with poorly written unit tests

i took over a project once from a crazy person that had a ton of unit tests in it. about 50% of the tests were dumb, so i deleted those (seriously, things like instantiating an object and then testing that it wasn't null).

I tried to maintain the rest of the tests as I worked with the code, but what I found was that there were so many tests, and most of them were testing the most pointless trivial things, that keeping them around was taking more time than it was worth, so I axed those too. the remaining tests that actually tested stuff, were testing parts of the design that were done so ridiculously that they _needed_ unit tests. So I just got rid of all the tests and refactored the hell out of the code. I ran it through the debugger a few times and all was good. the end.

oh, then a few months later the company changed its business model and they didn't need that subsystem anymore. go figure.

</comment><comment><USER16> The book that changed my life:

[http://www.amazon.com/Clean-Code-Handbook-Software- Craftsman...](http://www.amazon.com/Clean-Code-Handbook-Software- Craftsmanship/dp/0132350882)

"Clean Code" by Robert Martin is one of the best programming books ever written, and it barely has any code in it. However, it is relevant for every programming language. He treats unit tests like mandatory rituals, though, and unfortunately, I have not progressed quite that far yet. Still, it is a must read and gives good insights into this topic.

<comment><USER17> "one of the best programming books ever written, and it barely has any code in it."

Sounds very fishy, but from Robert Martin, who thinks people who don't do TDD (not unit testing, TDD) are "unprofessional" and "stone age programmers", I wouldn't expect any less.

"He treats unit tests like mandatory rituals,"

cargo cult alert!

fwiw _my_ conclusion based on _my_ experience, unit tests are (by and large)a good idea. Test _Driven_ Development is dubious, especially the "TDD is a _design_ method" idea. Conflating the two notions isn't very useful but happens surprisingly often.

<comment><USER18> Even if you don't get into the TDD stuff he evangelizes, it's a pretty darn good read. It has some really thought-provoking things to think about in terms of how to write your code. I wouldn't dismiss it offhandedly.

</comment></comment></comment><comment><USER19> My mantra: "if you haven't tried it, it doesn't work" Unit test, dry run, big bang, but in the end no significant piece of code works the first time. Ok, once or twice in my life it has, and I still talk about that experience. But that just shows how necessary testing is most of the time.

</comment><comment><USER20> Unit tests have another advantage - they keep you coding and motivated without an upfront schedule. Sure, you should be motivated already. Why was it you were reading hacker news then?

<comment><USER21> I got tired of that argument before I even read it. If you're coding non-stop, without distractions, for the whole of your work day, teach us how to do it.

</comment></comment><comment><USER22> Wow, people are still writing more and more words on unit testing with absolutely no new ideas.

Nothing to see here. Move along.

<comment><USER23> Quite the contrary. This attitude in a MSDN blog, from a Microsoft employee explain a lot of problems their users have.

Way to go, Microsoft. Testing is for sissies! Real Men write correct code.

Now I can use Exchange and know why it sucks so bad.

<comment><USER4> "Testing is for sissies! Real Men write correct code."

I seriously laughed when I read this. I'm willing to sacrifice the extra couple of inches of programmer penis size by writing tests.

<comment><USER10> But the tests themselves _are_ code. Do you have tests that check the tests? And then tests that check the tests that check the tests?

At one point or another you just have to learn to live with bugs.

<comment><USER23> And even if all code is provably correct, there is always the chance of a random particle hitting a transistor in the chip and clearing a bit that should be 1.

<comment><USER10> Just like in math, even if the code is provably correct, there is always the possibility someone screwed up the proof.

In the end it always comes down to writing the least buggy software possible and then bug zapping.

Having debug tools is smart of course, but TDD goes a bit further than debug tools. When I write unit tests I don't think of them as unit tests I think of them as debugging probes.

<comment><USER23> Have you noticed that there is an uncanny number of downvotes in this whole topic?</comment></comment></comment></comment></comment></comment></comment>


What if a deadly influenza pandemic broke out today? (2018) - <AUTHOR> https://www.bbc.com/future/article/20181120-what-if-a-deadly-influenza-pandemic-broke-out-today <comment><AUTHOR> Hypothesized that cytokine storms would be a problem, as in 1918 pandemic, but also thought it would affect young adults worse.

Also interesting is that someone posted it to HN a year ago, but didn't get any traction.</comment>


My Dinner with Longevity Expert Dan Buettner (No Kale Required) - <AUTHOR> http://www.nytimes.com/2015/08/02/fashion/dinner-with-blue-zones-solution-dan-buettner.html <comment><AUTHOR> A pretty good overview blue zones: [https://en.wikipedia.org/wiki/Blue_Zone](https://en.wikipedia.org/wiki/Blue_Zone)</comment>


SnapTell: Instant Product Lookup From The iPhone. You Want This. - <AUTHOR> http://www.techcrunch.com/2008/11/19/snaptell-instant-product-lookup-from-the-iphone-you-want-this/ <comment><USER2> This is actually one of the coolest apps I've played with in a long time. Won't be surprised if it's the top ranked app by the end of the week.

</comment><comment><USER3> Tried three products and found none. Pack of Extra Winterfresh, Jawbone II, and Nestle Pure Life water.</comment>


Guy Discovers He Can Go Anywhere While Wearing a Hi-Vis Vest - <AUTHOR> http://designyoutrust.com/2016/12/guy-discovers-he-can-go-anywhere-while-wearing-a-hi-vis-vest/?utm_content=buffera3a8f&utm_medium=social&utm_source=app.net&utm_campaign=buffer <comment><USER2> Widely available at low cost from Amazon and elsewhere. [https://www.amazon.com/dp/B0030A85LS/ref=psdc_553620_t3_B002...](https://www.amazon.com/dp/B0030A85LS/ref=psdc_553620_t3_B002SXMMQ2)

</comment><comment><AUTHOR> A much better link is hidden in TFA

[https://www.vice.com/en_au/article/chalecos-reflectantes- ent...](https://www.vice.com/en_au/article/chalecos-reflectantes-entrar- gratis)</comment>


Introducing Rack: a web server interface and software package for R - <AUTHOR> http://jeffreyhorner.tumblr.com/post/4723187316/introducing-rack

<comment><USER2> From the article:

 _Rack is a web server interface and software package for R. It is very much like Ruby's Rack. In fact it is so much like Ruby's Rack that I decided to use the same name and basic class hierarchy. You could say I "borrowed heavliy" from Ruby's Rack, and you wouldn't be far from the truth. In fact, you could say "I stole their idea" and re-purposed it for R, and then you'd be telling the truth._

If you're going to totally copy a concept (which is fine, this is all OSS after all), at least derive a new name for it.

</comment><comment><USER3> Uh, picking a name that is already taken is usually frowned upon. How are people going to find R-Rack articles by searching Google, if the name is just Rack?

<comment><USER4> Not only is the name already taken, it's a similar project (web server interface).

</comment></comment><comment><USER5> Please change the name before it's too late.

\- a friendly request from Ruby community.</comment>


Multiprocessing.shared_memory – Shared memory for direct access across processes - <AUTHOR> https://docs.python.org/3.8/library/multiprocessing.shared_memory.html <comment><USER2> Great, the support is still basic, but it's a huge improvement over message passing when you need speed. 2 months ago a student asked me exactly that question: how to share data between processes, and when I told him that with the stdlib he had to manipulate mmap by hand ([https://blog.schmichael.com/2011/05/15/sharing-python- data-b...](https://blog.schmichael.com/2011/05/15/sharing-python-data-between- processes-using-mmap/)), he was not happy.

Now that asyncio is production ready (we really have had a decent doc and asyncio.run() for a short time), and this, the concurrency story in Python is starting to look decent.

Since the 3.6, things are really going nicely.

Maybe we'll see an async django-like framework emerging from now on instead of the myriad of async flask copycat and django-channels. This would open the gate to live settings, manipulating tasks queues in URL enpoints, having RPC/PUB-SUB baked in. After all, I don't need async to just have exactly the same features as a WSGI framework.

<comment><USER3> I like [http://trio.rtfd.org](http://trio.rtfd.org) way more than asyncio.

<comment><USER2> Me too, although the scheduling syntax is not to my taste. But trio is not in the stdlib, and is incompatible with most of the current ecosystem. There are talks to integrate it in the future, meanwhile there are compat layers, but it's still in infancy.

For now on, I just use asyncio with a lib to add nurseries to it.

<comment><USER3> I'm curious what you dont like about the syntax, and which parts of the ecosystem you're waiting on?

</comment></comment></comment></comment><comment><USER4> Now combine that with Apache Arrow and you can do some interesting things.

</comment><comment><USER5> This is great! As someone who codes lots and lots of multiprocessing + queue code I'd love better shared memory support

</comment><comment><USER6> This rules, but until 3.8 is out I've been using [http://semanchuk.com/philip/posix_ipc/](http://semanchuk.com/philip/posix_ipc/) which unfortunately doesn't work on Windows.

</comment><comment><USER7> Doesn't Apache Arrow solve this problem partially already?

</comment><comment><USER8> Both 3.7 and 3.8 have so many performance improvements. But still, what people like most about Python is code readability. Performance isn't as important as in the past, because of how hardware performance has scaled.

<comment><USER9> wait, hardware performance hasn't really progressed much in the last 10 year!

<comment><USER10> Not CPUwise. But they have increased the number of CPUs available and that's where python has problems because of the GIL. Fortunately the multiprocessing library seems like a good workaround to the GIL issue.

<comment><USER9> Agree, which means that python actually got worse!</comment></comment></comment></comment>


How the NSA snooped on encrypted Internet traffic for a decade - <AUTHOR> http://arstechnica.com/security/2016/08/cisco-firewall-exploit-shows-how-nsa-decrypted-vpn-traffic/ <comment><USER2> And this is the stuff the hackers _selectively_ released as a proof-of-work. The fact that NSA is silently letting these attack vectors release into the wild without -- as far as we know -- proactively working to plug the holes they knocked in the Internet's security is damning, in my opinion. God (and the hackers) only knows what tools are in the encrypted tarball -- though soon enough they'll be joined by a bad actor with a lot of liquidity to spend on a bushel of zero-days (or else the real payload is still being held by an APT who's using this release as a brushback pitch against the USG).</comment>


Senator Al Franken Facebook privacy settings - <AUTHOR> http://franken.senate.gov/press/?page=news_single&news_item=Facebook_Privacy_Instructions

<comment><USER2> They aren't going to stop until someone sues the $@%& out of them.

<comment><USER3> Remember News Feed? People freaked out, started screaming about suing, etc. Just watch: people will get more comfortable sharing their basic information, and you will too.

This privacy freakout is really amazing to me.

<comment><USER4> Remember Beacon?

The News Feed is shared with people you know, and only people you have added as Friends (or sometimes one step removed when somebody you know comments on a photo or something).

Beacon was about selling your information to advertisers and 3rd parties whom you had a very loose connection with. The example being the guy who bought his engagement ring and had it broadcast via facebook before he was even engaged.

With the news feed, you control the information which is posted (with the exception of being tagged in photos).

Now Facebook is sharing your information with 3rd parties whom you have NO connection with.

I don't use Docs, Yelp, or Pandora, but they were given access to all my information.

Remember, they were 'given' access before Facebook announced what was happening. Before we had the option to opt-out.

<comment><USER3> Beacon was great because it showed that Facebook isn't scared to take risks. They later admitted it was a bad idea.

I'd rather a company like Facebook err on the side of innovation.

<comment><USER5> Selling my information to third parties without permission or prior notification is neither innovative nor brave.

<comment><USER6> I suppose you could say it's 'brave', though, in the same way that trying to swindle someone and hoping they don't notice is brave.

<comment><USER7> That's not what "brave" means.

<comment><USER8> /pedant: it is, actually. Definition is "ready to face danger or pain". "Brave" is mostly used approvingly, but it's also completely proper in sentences like "He decided the app should be IE-only, which was a brave move but one he felt was justified by ..."

Similarly with "daring" -- you often hear of "daring robberies" and the like.

<comment><USER7> Ah, the joys of learning English from dictionary definitions instead of literary use.

<comment><USER9> Because dictionary definitions aren't based on literary use at all.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> Evidently he's given a lot of thought to the flow and control of personal information posted by users on the internet. It would be nice if websites followed the "opt in" rather than the "opt out" route when it comes to these things. It would be even nicer if some senator made this the defacto standard...

<comment><USER11> I don't have a problem with opt-out _when you sign up for a web service_. For example, on Twitter the default is for your stream to be open to the public but you can opt to lock your account so only approved users can follow you.

That leads to stronger network effects faster, and creates a more usable tool for everyone.

The problem I have with facebook (note: I don't have a facebook account) is that people signed up based on a particular set of terms but the company then changed those terms and switched a default opt-in to a default opt-out _after the fact_.

<comment><USER12> Yes, and this is the same sort of problem many people had with Buzz. Your contact list was private, and then -- wham! -- there it is (or parts of it) for the world to see. (And your profile à la Buzz started aggregating Google- related activity; even if aspects of it were not previously designated "private", hanging it all off of your profile sure made it more accessible.)

If you knew at the start that that would happen, it might have stopped you from giving them -- originally and mostly through Gmail -- your contacts list. (Or using other affected services.) But when you signed up, they were all about "privacy" -- particularly after their previous efforts to reassure people in the face of concerns over automated ad targeting in Gmail. (Which was its own event, but I guess people generally decided that, as long as its purely automated and doesn't affect anything more than ad presentation, they could live with it.)

Hmm... as a thought exercise, what if your Gmail content starts affecting not just ad presentation but your search results. Would you have a bit more concern, then?

What if your employer starts examining employees' "customized" search results (perhaps by hiring a third party that specialized in this) and making inferences?

I assume they can and some may well already log and analyze the ads returned on those searches. Now that ads are starting to "follow people" across searches and sessions -- at least at some sites -- what personal habits might you inadvertently be bringing with you to work, via third parties' tracking of and response to your web use?

<comment><USER13> Exactly. That might merely seem embarrassing, and one could say 'use incognito browsing' for obviously personal stuff. But what if you're interested in politics and your employer strongly supports a different party? Or you have health worries of your own or for your kids, and an employer doesn't want to see health premiums rise? Such concerns seem abstract until they begin affecting people's livelihoods, by which time it can be hard to undo the ill effects.

</comment></comment></comment></comment><comment><USER14> He should do a Stuart Smalley skit to get his point across.

 _I'm good enough, I'm smart enough, I have ten thousand friends, and doggone it, people like me!_

</comment><comment><USER15> I'm really on the fence here. On the one hand, its a business and they need to make money to remain viable. On the other, the way the bury the option to turn it off makes me think this could be a lot more transparent. If they feel like they need it to survive, i think they should look at a model where turning it on (opt in) gives you some advantage.

</comment><comment><USER16> I was wondering why Yalp (which I rarely visit) knew about my Facebook account.

</comment><comment><USER17> No, those links at the bottom aren't adsense. He's not _that_ web savvy!</comment>


Ruby Mixins & ActiveSupport::Concern - <AUTHOR> http://engineering.appfolio.com/2013/06/17/ruby-mixins-activesupportconcern/ <comment><USER2> "there's no need for a MyMod::InstanceMethods since methods on MyMod are already in the chain."

There are no need for InstanceMethods in the original module either. They are included when the module is included.

"So far ActiveSupport::Concern has taken away some of the boilerplate code used in the pattern: no need to define an included hook"

Yet he still use such a hook, even if it has become an instance method call instead of a class method call.

", no need to extend the target class with ClassMethods, no need to class_eval on the target class."

Sure, the extend call is automated away (at the cost of adding a line like "include ActiveSupport::Concern".

But there are also no reason to do class eval in this context - just call the method directly.

The deferred usage of self.included does seem a bit useful though, and that is where the article should have started as everything above that is a strawman.</comment>


Let it go: the Arctic will never be frozen again - <AUTHOR> http://grist.org/article/let-it-go-the-arctic-will-never-be-frozen-again/ <comment><USER2> That's a completely absurd claim. Satellite measurement of Arctic sea ice coverage for 2017 is currently tracking significantly higher than in 2016. [1] Also, in context of sea ice coverage reduction due to climate change -- when the Vikings colonized Greenland a thousand years ago they were able to easily navigate there because there was less sea ice _then_ than there has been in modern times.

[1] [http://ocean.dmi.dk/arctic/icecover.uk.php](http://ocean.dmi.dk/arctic/icecover.uk.php)</comment>


Show HN: Kissui.sticky – 2kb sticky position that works everywhere - <AUTHOR> http://sticky.kissui.io/ <comment><USER2> Definitely something that I will use!

<comment><AUTHOR> Glad to hear that.</comment></comment>