HNHacker News
TopNewBestAskShowJobs

brandur

3,383 karma · joined August 30, 2011

APIs + engineering @ River. Ex-Snowflake. Ex-Stripe. Ex-Heroku.

Twitter: https://twitter.com/brandur

GitHub: https://github.com/brandur

Website: https://brandur.org

Email: brandur@brandur.org

submissionscomments
brandur··on The Idempotency-Key HTTP header field
A nice feature of keeping the idempotency key separate from the payload is that a service like Stripe can build tools to help users with idempotency even if the user has no idea what an idempotency key is.

For example, take a look at stripe-go's implementation, which automatically tags a request with a key if the user didn't specify one:

https://github.com/stripe/stripe-go/blob/67034d2205c0240ade9...

This works for all mutating requests, and is useful because the built-in retry system will automatically reuse the same key that was generated. Users can get the benefits of idempotency without really having to understand very well what's going on under the hood.

I suppose you could still do that by munging each request body, but IMO it's a nice feature to make sure that requests are the same as what the user specified. Also note that in practice the implementations are probably not that wildly different under the hood — despite being in a header, Stripe's idempotency is still being handled by the same application stack which processes the payment (i.e. not a middle box or load balancer).

brandur··on The Idempotency-Key HTTP header field
Your parent is correct. Think of a simplified example of posting a $1 charge to a customer.

    POST /v1/charges `{amount: 100, currency: usd, customer: 123}`
You might do that, and then later charge them another $1:

    POST /v1/charges `{amount: 100, currency: usd, customer: 123}`
The request payload would be identical, so the API can't use just that to distinguish requests. Adding an `Idempotency-Key` lets you tell the server that these are purposely two independent charges.

> this RFC requires that the server know how to distinguish two requests with different payloads but the same idempotency-key value (and return a 422 response in that case).

This is an error checking facility to make sure that the idempotency keys are being used correctly. Sending a different request with the same idempotency key is non-sensical, so the server tells its client about the problem.

brandur··on The Idempotency-Key HTTP header field
> So the idempotency key protects against faults on the network between the client and stripe's idempotency layer, but not against stripe-internal faults between the idempotency layer and the application. Is that the case?

Yes, in practice this is the case — the idempotency key insertion could succeed and then subsequent queries fail. Practically though, it doesn't happen very often — if a request gets as far as the idempotency layer successfully, the rest of it tends to work too.

Where it doesn't, Stripe pays a lot of attention to 500s, especially where those pertain to charges, and a lot of time and energy is spent cleaning up state that might have resulted in an invalid transaction.

> Why is the idempotency not achieved by using an idempotent database transaction or atomic operation?

The most honest answer is that Stripe wasn't built on a data store where transactions are supported, so it wasn't even a possibility until quite recently, and by then the system was already well established in its current form.

Beyond that though, once your requests are making their own requests to modify state in foreign systems (which is happening at Stripe in the form of banks, partners, internal systems, etc.), a single transaction isn't enough to keep things entirely in order anymore because it can't roll back that remote state. It is still possible to build a very robust system that is transaction-based, but it becomes a much more complex problem than a simple `BEGIN`/`COMMIT`.

brandur··on Steve Jobs in Kyoto
Totally irrelevant, but a related fact in this vein: I recently learned "尻" via WaniKani (a popular SRS system to help learn kanji), and the mnemonic they used to help you remember the reading of this kanji/vocabulary (お尻) is now inspired on Apple's Siri:

https://www.wanikani.com/kanji/%E5%B0%BB

> Now that you have nine flags inside your butt, you have to get them out. But, you don't know how to. So you ask Siri (しり — shi-ri), "how do I get nine flags out of my butt?"

(Note: The kanji is composed of the radicals "nine" and "flag", which is how they get to "nine flags".)

(Note: WaniKani's mnemonics are very often somewhat non-sensical slightly entertaining stories in the same style as this one. Very normal.)

brandur··on 3,000 eggs abandoned after drone scares birds in California
I'm going to hazard a guess as to why the downvotes are happening: There's a silent majority out there who are not happy with the way dog owners behave, which is very often badly. Most of the time they have no real power to do anything about it, but it's occasionally visible in places like this with karma systems.

In my experience, most dog owners are like the user who started this thread. They do what they want, having their dog constantly off leash in areas where it's clearly not allowed, and then rationalize it to themselves with something like "well my dog's well behaved and would never hurt a fly!" It's incredibly inconsiderate to both the environment (dogs are constantly chasing and damaging wildlife, a lot of poop gets left behind as the owner is walking off in front and doesn't notice) and other people (many people don't like dogs, dogs are dangerous for bicyclists and small kids, and some people have smaller dogs who they don't want strange dogs interacting with), and indeed the badly behaved dog owner will see signs of this on a daily basis, but chooses to consciously ignore all of them by pretending none of it's happening.

Dog culture around the Bay Area where I am has reached peak absurd. With more dogs in SF now than kids, people treat their dogs like they would human children. Off leash dogs in on leash or even no dog areas is the norm. At least a few times a week I'll see an off leash dog to something bad to a person or another dog, and the owner pretend-chastise them with a, "ooohhhhh Fido, silly dog, don't do that" (but in a sweet tone so the dog is not actually being chastised) followed by a "he doesn't normally do that". You know of course that Fido does normally do that on a consistent basis, and the owner is pretending Fido doesn't because they really don't care.

It's frustrating to me, and probably frustrating to other people on here too. There's no real enforcement anywhere, so the only thing we can do is ask dog owners to put their animals back on leash, which will be ignored. It's like fighting entropy at this point, and if you're anything like me, you sort of wish nebulously that people would just be better.

brandur··on Commenting vs. Making
Can't +1 this enough. Stated another way, I always think back to this slide [1] from one of Holman's old decks ("Drive-by opinions are less valuable").

For whatever reason, this is a very common phenomena in tech, and there's a positive reason explanation for it and a negative one. The positive one is that people really are engaged and enthusiastic and want to help make the product better. That's great, and far better than the alternative.

The negative one is the same as the classic mid-level manager who arranges an unnecessary meeting with shaky pretext that everyone knows is just so that they can have their ideas heard for 60 minutes. It makes them look engaged and increases their visibility in the corporate hierarchy. Now, while that was a literal meeting back in the 90s, but 2020s version of it is littering smart-sounding comments all over as many key Google Docs as you can, all of which have your picture next to them, and which you know others will see.

Too many ideas aren't necessarily a problem, but it can add a lot of overhead to a project, and the end result is often only incrementally better. I've worked on smaller projects where it took us 2x to 3x longer to ship by addressing tiny feedback from a large number of people, and the final product was like 5% better. That't not to say that no feedback is valuable, as a lot of it clearly was, but there's a happy compromise somewhere between taking too little and taking too much.

In the end, the article author's advice rings very true:

> “So, what are we going to do about it?”

(With the emphasis on "we".)

Give ideas/feedback, but make sure you're willing to engage with the work.

---

[1] https://speakerdeck.com/holman/how-github-no-longer-works?sl...

brandur··on Ruby 3, Concurrency and the Ecosystem
Excellent points in the article about "top" (booting off top-level workers in Ractors) versus "bottom" (parallelization at the edges of the code where not as much state needs to be shared) cases, with the top likely to take more time to widely manifest as more Ruby code becomes Ractor friendly.

I know Ractors are still quite new, but I'm curious to see how much luck people will have in migrating existing parallel code over to them.

Relying on a lot of shared state is going be the major blocker. Just on a token reading of the docs [1], it looks like you should be able to share quite a lot of state still as long as you're able to freeze it all into immutability. You could then use message passing around the edges where immutability is a non-starter.

But this is probably easier said than done.

---

[1] https://docs.ruby-lang.org/en/3.0.0/Ractor.html

brandur··on How We Saved Dot Org
We don't need to guess on this one. One of ISOC members who helped seal this greasy deal wrote a whole thinkpiece last year justifying it:

http://www.circleid.com/posts/20191127_why_i_voted_to_sell_o...

The short version is that guaranteed annual recurring revenue is great, but a billion dollars all at once is a lot of money, and could be used for all kinds of things.

Not in the article: because it would be Ethos who'd later raise prices on .org (had the plan gone through), the ISOC would have some deniability of not having been the direct infractor. It'd be a win/win: Ethos would still profit despite the high price tag, and ISOC would get a huge windfall while keeping its hands only a little grimy (not dirty, but not clean).

And if the piece's reasoning seemed sound to you, I'd call attention in particular to these sentences:

> Ethos has said that their plan is to "live within the spirit of historic practice," that is, to manage prices roughly as PIR would have under the stewardship of the Internet Society. If they impose the maximum 10% price increase plan for ten years, the price will be around $26 per year — still quite affordable.

Compare them to what the EFF wrote, and you'll see that notably absent from Richard's article is how the 10% increase cap is only active for the first eight years (not even 10 as stated). After that, Ethos was free to raise prices as much as they liked. Somehow, Richard mistakenly forgot to include this rather important detail.

brandur··on How We Saved Dot Org
Another great win for the EFF. We shouldn't forget how much time and effort fighting this kind of thing takes, and we are very lucky to have an organization who's willing to put in the legwork from which all of us are huge beneficiaries. (Edit: just donated.)

I guess it was implied by the article, but wasn't perfectly clear to me: does this mean that .org just stays with its current holders, ISOC? (Internet Society)

As much as ICANN and Ethos Capital acted maliciously in this whole debacle, it's very possible that the most malicious actor of all was ISOC. In 2002 they were granted the management of a public good (the .org registry), with the idea that they'd administrate it responsibly and fairly. In return, they were well compensated as they managed .org registrations over all these years, which is more or less a license to print money.

However, it's obvious with this attempted sales that ISOC never considered themselves to be a higher-minded steward doing anything for the greater good. To them, .org was an asset to be pumped and dumped at the first, best offer that came along. They were well aware that Ethos had plans to turn .org into a major profit center with a captive audience of all existing .org holders, to the detriment of tens of thousands of non-profits (and many others) worldwide, and enthusiastically agreed to the plan anyway. It was money in their pocket, and the money was good.

What would it take for the ICANN to claw back the .org registry and grant it to a more ethical caretaker? (CCOR for example [1].) It seems to me that "easy come, easy go" is a perfect ethos for this situation, and the ISOC shouldn't be allowed to take another dime from .org.

---

[1] https://www.ccor.org/

brandur··on FDA authorizes rapid, at-home coronavirus test
For anyone else wondering about the benefits/downsides of the various tests (why do one that takes multiple days when you can do that takes 15 minutes?), the FDA has a pretty good page on this subject:

https://www.fda.gov/consumers/consumer-updates/coronavirus-d...

The tests that swab your nose or throat and take multiple days are called "molecular" tests and are considered highly accurate. They use controlled heating and cooling cycles to convert the virus' RNA to DNA, which can be detected by specialized lab technique after binding probes to it.

Tests like this 15 min one are called "antigen" tests and are still accurate/helpful, but are known to produce more false negatives and false positives compared to molecular.

brandur··on Feature Casualties of Large Databases
To be fair, I'm more referring to installations where it's been necessary to scale up beyond a single node. Things like referential integrity and transactions get harder for sure, but they're not unsolved — as noted in the article, we have prior art now in the form of products like Citus, Spanner, and CockroachDB.

But that said, even though Oracle et all do support these features even for large installs (on a single node), a lot of the RDMS niceties tend to be thrown out anyway. DBAs get afraid that non-trivial `SELECT` operations won't be able to use an index and cause production havoc, adding fields as `NOT NULL` gets hard to do, and even the simple act of raising an index can get expensive/scary.

This is a big part of what this piece is about: even where these features are still possible, there's a bad tendency not to use them. Why is that, and how do we fix it?

brandur··on Feature Casualties of Large Databases
(Author here.) I think you're confusing a couple different major classes of languages — declarative versus procedural. I said specifically "most expressive ever for querying and manipulating data", and I'd stand by that.

The nice part about SQL compared to the languages you've cited is that you just need to specify the "what" and not the "how". I tell it what data to fetch, where I want it from, how I wanted it grouped/sorted (etc.), and the engine figures out the best (and probably a very efficient) way to do that. This is different from a procedural language like Python or Rust where it'd be on me to also define every implementation detail — get data from here, join by doing this and with that algorithm, sort what comes out, ...

This gives SQL a number of very nice properties:

* It's very fast and succinct to write.

* Even very complex queries are likely to be executed as optimally as they can be (because database engines tend to be very good at this).

* It's so high-level that it can actually get more performant over time. See for example Postgres 12, which eliminated an optimization fence for CTEs (common table expressions) [1], which means that a lot of queries got faster automatically, without the user having to do _anything_.

I love a lot the languages you listed, but SQL is a different animal, and amazing in a way that's quite unique.

---

[1] https://info.crunchydata.com/blog/with-queries-present-futur...

brandur··on Why Italians don't drink a cappuccino after 11am [video]
I'm not sure that's quite fair to what the video is saying.

For one, he didn't say anything about coffee, but rather cappuccino (and other milk-based espresso drinks) specifically. A quick google seems to show that this holds up — I found a number of other easy sources that say the same thing.

They also mentioned wide variation in lactose tolerance, including between the north and south of Italy. You'd probably want to make sure that Albania is expected to have a similar lactose intolerance as Italy's population. Even within Europe the variance is very high — head a country or two north and you suddenly get up to _huge_ population-level tolerance levels of 75-80%+ in Scandinavia.

You mentioned butter/cheese and the video covers that specifically, saying that especially hard cheeses only have a tiny fraction of the lactose content that milk does (~5%, but varying by the type of cheese). So there's no reason for cheese to be treated with the same level of care.

Who knows, but I found the video to be as convincing as any other rationale for the taboo.

brandur··on The new pricing model for Travis CI
That's fascinating – I always wondered how exactly Travis was running their Mac OS builds.

Based on MacStadium's public pricing, which is $150/month for the base model of the latest Mac Mini, this cannot be cheap for Travis, especially given they offered (past tense) Mac OS builds for free.

Not surprised to see them start charging more, but it's coming at exactly the wrong time given that GitHub (with Actions) is now offering a product that's a fair bit better, and it's still free.

brandur··on Remote work is reshaping San Francisco, as tech workers flee and rents fall
It's also worth calling out that when people make claims about lowest in the nation, they're almost certainly calculating that based off average price paid across all homes in the state.

Thanks to Prop 13, many homeowners do pay quite tiny property taxes. But this turns out to be extremely nefarious because along with removing a fair tax base and liquidity from the market, it also means that the disproportionate burden for paying California property tax is placed on new home buyers, who are often younger people/young families.

New entrants are often paying incredible levels of property tax (as it's a percentage of the already highly inflated prices), and because they're disproportionately more likely to be working, they're also the ones paying state and federal tax, along with the miscellaneous municipal taxes which can also be quite high in cities like San Francisco.

Meanwhile, legacy owners make off like bandits. I looked up the property I rent in once, owned by a large real estate holder that's decades old, and it was assessed at a few hundred thousand — for a 5 unit building in central SF. I don't know what the actual value would be, but it'd be closer to a ballpark of $3 to $6M. A differential of ~20x, and this isn't uncommon.

It's this framework that gets you to "lowest in the nation". I tend to think about it as _both_ the highest and the lowest in the nation, largely determined based on when your family moved here.

brandur··on Remote work is reshaping San Francisco, as tech workers flee and rents fall
Your parent's comment is out of date, but what you said isn't a fair representation either.

The 1.5% tax they're talking was the 1.5% payroll tax that SF had in place until 2012 [1]. Payroll tax isn't quite the same as an income tax because the onus isn't on the employee to figure it out like state and federal, but it still did cost most businesses in SF an extra 1.5% on every employee's salary to be there.

Prop E shifted most of this to a gross receipts tax instead (although there's still a 0.38% payroll expense tax in place [2]). Again, the numbers your parent is talking about are out of date, but the spirit of it is right in that it does just fundamentally cost a company quite a bit more to have an employee in SF.

---

[1] https://sftreasurer.org/business/taxes-fees/gross-receipts-t...

[2] https://sftreasurer.org/business/taxes-fees/payroll-expense-...

brandur··on Jepsen: PostgreSQL 12.3
Personally, this kind of thing actually gives me _more_ confidence in Postgres rather than less. The core team's responsiveness to this bug report was incredibly impressive.

Around June 4th, the article's author comes in with a bug report that basically says "I hammered Postgres with a whole bunch of artificial load and made something happen" [1].

By the 8th, a preliminary patch is ready for review [2]. That includes all the time to get the author's testing bootstrap up and running, reproduce, diagnose the bug (which, lest us forget, is the part of all of this that is actually hard), and assemble a fix. It's worth noting that it's no one's job per se on the Postgres project of fix this kind of thing — the hope is that someone will take interest, step up, and find a solution — and as unlikely as that sounds to work in most environments, amazingly, it usually does for Postgres.

Of note to the hacker types here, Peter Geoghegan was able to track the bug down through the use of rr [4] [5], which allowed an entire problematic run to be captured, and then stepped through forwards _and_ backwards (the latter being the key for not having to run the simulation over and over again) until the problematic code was identified and a fix could be developed.

---

[1] https://www.postgresql.org/message-id/CAH2-Wzm9kNAK0cbzGAvDt...

[2] https://www.postgresql.org/message-id/CAH2-Wzk%2BFHVJvSS9VPP...

[3] https://www.postgresql.org/message-id/CAH2-WznTb6-0fjW4WPzNQ...

[4] https://en.wikipedia.org/wiki/Rr_(debugging)

[5] https://www.postgresql.org/message-id/CAH2-WznTb6-0fjW4WPzNQ...

brandur··on New inline assembly syntax available in Rust nightly
Also worth noting that the old syntax was renamed from `asm!` to `llvm_asm!`. It'll still disappear at some point, but existing users of the former on nightly have a very easy way of fixing their build in the meantime.
brandur··on Cooperative Corporation of Dot-Org Registrants
Yep, it's not totally clear yet from their website.

My personal hypothesis is that given an alternative recipient for the .org registry that's better in every respect except for the amount of money they're able to pour into the pockets of ICANN / Internet Society (ISOC), it'll be more difficult for these parties to pretend that the .org sale is about anything except graft.

As we've see from previously, morally flexible members of these organizations (e.g. Richard Barnes [1]) have claimed that the sale of .org to Ethos is really in the interest of the public good! As details continue to come to light, these arguments are going to get continually more difficult to make.

I'm not sure it's realistic the CCOR succeeds in gaining control of .org (although fingers crossed, it sounds like they'd be a far better than owner than ISOC or Ethos), but worst case, they'll force some additional transparency into the process.

---

[1] http://www.circleid.com/posts/20191127_why_i_voted_to_sell_o...

brandur··on List of Twitter mute words for your timeline
This has improved quite a bit on recent versions of the official mobile clients. If you go to your lists, you can "pin" a list, which has the effect of making it an alternate timeline from the app's home screen.

It's a little subtle, but on home you'll now have "Home" and your list's name at the top of the screen, with the active one getting a blue underline. Swipe left or right to select one or the other.

brandur··on Apple may have to abandon Lightning connector cable
Does anyone know if there's any merit to Apple's claim that USB-C isn't compatible with the iPhone's slim dimensions? (From the article: "Apple insisted that its slimmer devices would be unable to fit the then-new USB-C technology ...")

Just looking at the tech specs for the iPhone 11 (lightning) [1] versus iPad Pro (USB-C) [2], the former is actually thicker at 8.3 mm compared to 5.9 mm, and yet the iPad Pro can have USB-C.

Especially given that it's so prevalent in their other hardware, it almost seems like stubbornness at this point that Apple doesn't want to switch, but admittedly that doesn't pass the test of Hanlon's razor. It seems like there must be a better explanation out there somewhere for why they've desperately clung to lightning for so long (backward cable compatibility within the iPhone ecosystem? inertia in circuit/case design?).

---

[1] https://www.apple.com/iphone-11/specs/

[2] https://www.apple.com/ipad-pro/specs/

brandur··on Ruby 2.7
It's likely to be most useful for anyone using a Unicorn-style process forking model in Ruby.

You call `GC.compact` in the parent right before forking off your child processes and because the memory in the children are copy-on-write (COW), it lets them share memory with their parent far longer than they normally would be able to.

Any change in a page (i.e. an object allocated or deallocated) causes it to be copied to a child process, and because previously pages were a mix of objects of all kinds of longevity and slots which may be empty or used, children tended to copy their parent's entire memory space very quickly. Running a GC and compact before forks improves the likelihood that shared pages are mostly full of still-in-use, longer-lived objects, and gives the COW strategy a fighting chance.

brandur··on The Cycle from ‘Zen and the Art of Motorcycle Maintenance’ Comes to Smithsonian
For what it's worth, you're not the only one with that reaction. I got onto the book after it was recommended to me as a good way to get an introduction to philosophy.

Not only was it not, but the philosophical content it did have didn't seem particularly interesting — the long deliberations on quality felt like inconsequential hair-splitting that was unlikely to any revelations of value. Afterwards, I read the Wikipedia analysis on its philosophical themes [1] and felt that it's far too charitable in attributing significant insights to Pirsig compared to the literal contents of the book.

My guess is that the novel structure of weaving together a motorcycle trip with inner monologue and personal history combined with a dash of intellectualism was very compelling to a lot of people, and that's why it's taken such an outsized position in popular literature.

(I'd love to be proven wrong on this though, so by all means tell me what I missed.)

---

[1] https://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_...

brandur··on Fast and flexible observability with canonical log lines
On the order of many dozens of fields and it's a pretty good mix of all of those.

Lots of low cardinality fields, lots of counters and numbers (e.g. request duration), and quite a few high cardinality fields too. e.g. IDs, IPs.

brandur··on Fast and flexible observability with canonical log lines
I wouldn't put too emphasis on the plain text — we started logging back when carrying everything via JSON would've been going against the grain. These days it might've gone the other way (I'm not sure).

One point that I'd try to convey is that the canonical line technique works for any kind of structured format. We use logfmt in all our examples, but JSON would work just as well.

brandur··on Fast and flexible observability with canonical log lines
(I'm the author, and) Yeah, whatever you might call them, canonical lines are an "obvious" enough idea that I'd expect a lot of shops to have arrived at them independently. Besides yourself, I've heard from a number of people where that's been the case.

That said, it's also a surprisingly non-obvious idea in many respects — a lot of people are used to just traditional trace-style logging and never come up with a construct like them, so we felt they were worth calling out as something that might be worth doing.

brandur··on Fast and flexible observability with canonical log lines
Yes, exactly — normalization is really useful for reasons of quality and correctness, but generally not so important for data like logs that's rotating through the system on a pretty constant basis.

And addressing the parent's point on databases: they don't look like an RDMS, but you can kind of think of log management/querying systems like Splunk et al. to be like a specialized database with specific properties:

- Flexible indexing: Logs change frequently which makes keys come and go, so it's convenient not to not have to be constantly building new indexes to make them searchable.

- Optimized for recent data: Newer logs tend to be accessed relatively frequently and older logs much more rarely (if ever), so it's generally a good idea for these systems will rotate data through different tiers of storage as they age — the new on fast machines with fast disks, the old on slower machines with large disks, and the very old probably just in S3 or something.

- High volume: Any of the traditional relational databases would have a lot of trouble with the volume of data that we put through Splunk. (That said, its problem domain is more constrained — it scales horizontally much more easily because it doesn't have have to concern itself with things like consensus around write consistency.)

brandur··on Respawn will deal with Apex Legends cheaters by making them fight each other
It seems like three-factor is a mistake in the article, but what you suggest is very close to the three factors that will be involved in SCA (Strong Customer Authentication), an upcoming European regulatory requirement to reduce fraud in payments:

https://stripe.com/guides/strong-customer-authentication#wha...

(Although only two of the three will be required.)

brandur··on Paris Will Create the City's Largest Gardens Around the Eiffel Tower
I'm continually impressed by the efforts of Parisian politicians to improve their cityscape. (Aside from this, see their removal of motor traffic along the Seine [1] and tightening restrictions on polluting cars [2].) It speaks very well to their fiscal management too that they're able to fund the project through ticket sales, and don't need to levy any new taxes or bonds.

Being a North American resident, it really makes me wonder what it would take to build political will for these types of projects on this side of the ocean. In San Francisco, closing even one part of one street to auto traffic is something that seems to be impossible — even for projects that _should_ be relatively uncontentious like closing some of the highways through Golden Gate Park, making the most pedestrian heavy parts of famous streets like Haight, Castro, or Lombard pedestrian-only, or taking private cars off Market Street. And quite sadly, SF is considered to be a walking-friendly city relative to others on the continent.

It's nice that someone is acting as a guiding light for the rest of the world, especially when it's a city of Paris' fame/importance.

---

[1] https://www.citylab.com/solutions/2016/09/paris-seine-car-pe...

[2] https://www.citylab.com/transportation/2016/05/paris-is-bann...

brandur··on City residents live with mental illness at higher rates than general population
I really think there's something to this. I've been living in a dense urban area that does a poor job of traffic control (San Francisco), and of all the "city problems" that I find tearing most at my mental well-being is the poor urban design.

After a while you realize that there's no such thing as a stress-free, liberating walk. Traffic is so all-pervasive that everywhere you go, you're constantly negotiating your way around vehicular traffic, most of which believes that yielding to pedestrians is a distant second concern to getting around as quickly as possible at any cost. Every cross-walk you use you have to watch yourself for drivers turning left and right who aren't paying attention. Every four-way stop you have to look around and make sure that drivers are actually going to stop for you. Blocks are short, so this is all you're doing all the time.

The sheer volume of infrastructure that's built for cars means there's not much left over. The only places to get that that sense of liberation back besides distant parks or suburbs well outside the municipal core. Any parks of non-trivial size in the city are filled to the brim with roads, many of which actually act as throughfare shortcuts for standard traffic most of the time (e.g. JFK in Golden Gate Park), so you're facing all the car problems as any other street.

After a while it's hard not to be constantly on edge looking out for the next person who's about to do something dangerous to you, which is quite stressful and almost certainly has negative long-term mental effects. It really doesn't have to be the case though — contrast the car-first streets of San Francisco and other American cities to the pedestrian plazas and legitimately car-free urban parks of some cities and Europe, and it's a world of difference. We could be doing so much better.

← PreviousPage 3 of 11Next →