To Encourage Biking, Cities Lose the Helmets - <AUTHOR> http://www.nytimes.com/2012/09/30/sunday-review/to-encourage-biking-cities-forget-about-helmets.html?_r=1 <comment><USER3> This article is great but it does itself a pretty big disservice by pretty much ignoring a lot of why many of the European cities which have successful programs are successful. Namely they have made significant investment into infrastructure to make bicycling safer, many times prioritizing bike traffic over auto traffic.

I ride quite a bit, live in Berkeley which has numerous "Bicycle Boulevards [1]" and I'm pretty comfortable riding sans helmet. I happily rented a bike in Amsterdam and never even considered using a helmet. Riding my bike to work in SF (or to the articles point NYC)? You're damn straight I'm wearing a helmet.

[1] Bicycle Boulevards are streets (open to bikes and cars) that tend to run parallel to primary traffic arteries that tend to have fewer Stop Signs and every 3 or 4 blocks auto traffic isn't allowed through (usually big planters in the middle of the street) so it keeps the auto traffic down.

<comment><USER4> Why do people insist on pretending all of Europe is full of bike lanes? In most inner cities there often isn't room for bike lanes, or the lane is just a line on the asphalt.

I bike to work every day in Amsterdam, not a single bike lane on my route, I have to share the road with cars, trams, buses, trucks and scooters. The only traffic that actually poses a regular challenge because of their erratic movements and tendency to step into the road without looking are American tourists on foot...

Bike lines are convenient, but no more than that, and just as much of a red herring as helmets when it comes to safety. Safety in urban traffic is a people problem.

<comment><USER5> > The only traffic that actually poses a regular challenge because of their > erratic movements and tendency to step into the road without looking are > American tourists on foot...

Was that really necessary? The racial stereotype detracts from your your argument, and frankly, one erratic pedestrian looks the same as another to a fast moving cyclist, much as one erratic cyclist looks the same as another to a driver.

<comment><USER6> Maybe it's a stereotype and it definitely doesn't apply to everyone but I've never seen so much confusion as on american roads. I'm from Italy and we're routinely made fun of for the mess that is our traffic, the reality though is that in Italy it is way more predictable and correct, blinkers are always used for example, than in SF where I've lived for the past 5 years. Italy has very few miles of bicycle lanes and yet most people don't use an helmet.

As I ride around town on a bike, there are all sorts of people that either just don't look when crossing, or look at the sky when moving sideways on a lane, or simply cross lanes reserved for bikes with the idea that pedestrians always have precedence.

Many cyclists are also guilty of the same types of sins by stopping in the middle of the street without so much as moving on the side or they are simply not capable of riding a bike in a city or they just perform U turns without looking at oncoming traffic. A friend of mine unfortunately died on a bike here in SF, was it because she wasn't wearing an helmet? Nope, it was because she turned left without looking and a food truck ran over her. She was the first and only fatality for bike accident last year.

When I passed my Driving License test here in SF the examiner told me that it's usually the americans that gave her the most troubles while europeans tended to always pass at the first try.

So maybe it's a stereotype but it seems to me that the american government went out of their way to try to protect pedestrians and defend cyclists with the result that they now walk around without their brain sparing the necessary few cycles to keep themselves safe on the street.

EDIT: A funny thing that I've seen happening only here are cars that go through half of a cross-road and when they see you coming they just stop in the middle occupying the whole lane and forcing you to try to stop in a short space. If they went through instead of stopping there would have been no issues. This happens to me so often that I can't help laughing at it every time I see it.

<comment><USER7> I've been to Florence for 6 months and traffic there is much more chaotic that what I'm used to at home (Poland). But it's also much safer. People rarely use turn signals (except buses and taxis) but that just makes everybody really observe what the other drivers are doing. Generally divers seem to really pay attention more to what's around them and adjust their behavior.

Another amazing things are bicycles and scooters navigating through narrow streets filled with pedestrians apparently totally safely and without being cursed at.

</comment></comment></comment></comment></comment><comment><USER8> There is no evidence that segregated cycle facilities improve cyclist safety. The majority of serious bicycle accidents are right-of-way disputes, occurring at junctions. It is just as likely that segregated facilities could increase the number of accidents, by making the movements of cyclists less predictable to motorists when they merge onto general roads. It is known that sidewalk cyclists are significantly more vulnerable than cyclists who use the roadway, possibly because their movements are more difficult for motorists to predict.

The evidence for the efficacy of cycle helmets is extremely poor. There are a great many people with strong opinions on helmets, but we simply do not have the evidence and it is likely that they are a relatively unimportant factor. While we know that helmets moderately reduce head injuries, we do not have good evidence that they improve rider safety overall. We do have some evidence of risk compensation, with both drivers and riders taking more risks when helmets are used, based on the belief that the helmet provides safety. Head injuries are an important class of injury, particularly in the most severe incidents, but they represent only a minority of the serious injuries suffered by cyclists.

The best available evidence shows that one factor completely overwhelms all others - the number of cyclists on the road. Most Americans believe that the numbers of cyclists will increase when action is taken to improve safety, but in fact the inverse is true. An increase in the number of cyclists invariably leads to a decrease in the number of accidents per km. That is the key message and everything else is just noise. Meaningful improvements in cycle safety are wholly reliant on increasing the number of cyclists and normalising cycling. Motorists cannot be blamed for struggling to predict the movements of a type of vehicle which they encounter rarely and do not understand.

<comment><USER9> When one ton of metal hits you naked at 50kph (the legal speed limit in traffic areas of cities here in France) the acceleration alone can tear or damage your aorta with impressive odds (IIRC about 50% chance). A helmet is an extremely marginal protection.

On a pure energy analysis, I'd rather have cyclists navigate with pedestrians than with cars. The latter result in a basically non-elastic collision transmitting most of the kinetic energy (1T@30~50kph) to the human body (75kg@5~20kph) while the former is much, much more even.

I don't know the state of streets in the U.S but his is especially true in old european cities, where streets are often narrow and there's simply not enough room for both cyclists and cars on the road, especially when cycling is thought of after the fact.

<comment><USER10> Energy Analysis is pointless in this situation.

Mixing cyclists and pedestrians is _extremely_ dangerous in locations where pedestrians aren't used to cyclists, because pedestrians have a tendency to change directions very quickly.

<comment><USER11> Having a bell on your cycle helps a lot with this - just give it a ring a few times before overtaking people on a combined cycle/foot path and they will generally (although not always) try and do the sensible thing.

In my own experience I was somewhat surprised to find that using a bell actually works a lot better than saying "Excuse me please".

Also, some pedestrians will do intentionally stupid things when encountering a cyclist on a cycle path, but fortunately them seem pretty rare and far less common than cyclists who do stupid things.

<comment><USER12> I am generally a pedestrian, and in my experience when I am running on a paved path and cyclists go around me, they sometimes say "on your left" which works pretty well, but bells are great.

edit: doh!

<comment><USER13> > I am generally a pedestrian, and in my experience when I am running on a > paved path and cyclists go around me, they sometimes say "on your left" > which works pretty well, but bells are great.

As a cyclist, I don't feel like it works very well. About 50% of the time the pedestrian startles and dodges when they hear you say it. In about 50% of those cases, the direction they dodge is to the left. And this is on the bike path where pedestrians are presumably accustomed to and expecting bicycle traffic.

I still do it for the sake of courtesy (and the hope that it will eventually become a common and well-understood practice), but I don't rely on it and give pedestrians as wide a berth as possible as well.

</comment></comment></comment></comment></comment></comment><comment><USER14> To Encourage Biking, Cities should do two things, and two things only:

\- Bike lanes. Physically separated bike lanes. This is not rocket science. Trains have rails, airplanes have a nice bit of tarmac and bikes should have a space tailored to their specific needs as well. Typically in the Netherlands, bikes are banned from roads that are 50km/h and up. And they don't need to battle it out with fast traffic, for there are bike lanes. And the limited space in this country means that something truly has to give when adding them.

This how the dutch design an intersection. Note the absence of the ridiculous ASL boxes, and most important, no crossing of lanes. <http://www.youtube.com/watch?v=FlApbxLz6pA>

\- Traffic laws that protect the weaker participant in traffic. Again, case in point, the Netherlands where in a (civil) dispute after a bike-car accident the burden of proof lies with the car. Not to mention the dreaded article 5 that broadly states that endangering traffic is a felony.

This helmet discussion imho is just a way to deviate from arguably more costly and difficult choices when it comes to embracing the bicycle. And while we are are at it. I am convinced that making helmets, 4 point harnesses and leathers mandatory in cars for all occupants would save lives as well.

What perhaps surprises me the most in the car-bike entanglement is the seemingly bad engineering. Cities like Londen, Geneva, all (claim) to cater for bikes, have rental programs, paint the odd lane, but their intersections tell a different story. In the information age, it just baffles me.

<comment><USER15> I assume this doesn't allow cars to make a right turn during a red light. That, and the long path for cyclists to make a left turn are probably what would make a lot of people in the US resist this design.

(I think it looks like a good idea, however.)

<comment><USER16> We could try the box-style left turns that are deployed in Asia (s well as a few places in the US).

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

<comment><USER17> Like a hook turn? <http://en.wikipedia.org/wiki/Hook_turn>

<comment><USER16> Yep, that's one and the same. Thanks! I think those are the best solution for intersections with semaphore lights. Stop signs might require something else.

</comment></comment></comment></comment></comment><comment><USER18> Traumatic brain injury is real, completely life debilitating and can happen at very slow speeds. Many parts of your brain are protected only by soft tissue. Brains do not grow back like a broken arm/leg. Imagine permanently losing 100 IQ points by not paying attention for the wrong five seconds. Cyclists are extremely vulnerable on streets shared by cars. Think slow moving ~<180lb two wheeled bean bags vs. 1500+lb high speed steel boxes. It's pretty irresponsible and absurd for the NYT to print articles like this. I suppose we shouldn't use seatbelts or car bumpers either based on mean effects? Helmet safety is totally cheap (basic, OK helmets are $20-30) and easy to use. Although I would certainly like to make everyone "healthy" and build a cycling utopia, the fitness argument this article makes is completely absurd. Obese, unhealthy people casually cycling for ten or fifteen minutes across a city are unlikely to receive any significantly health benefit (reach aerobic thresholds) and are the the most likely to experience falls and collisions since they are inexperienced.

<comment><USER19> Will you seriously argue that cycling to and from work 5x2x10 or 5x2x15 minutes has no health benefits? That's more _added_ time moving than many sedentary people get at all. Reaching aerobic thresholds for over 20 minutes is only one mechanism of how moving helps your body. Should I forget about taking the stairs unless I work in a skyscraper? Should I ditch walking?

</comment></comment><comment><USER20> Until there is a distinct change in driver attitudes, riding without a helmet in most of the US is just nuts. Sure, there are places like Portland with dedicated bike lanes and an overall emphasis on pro-bike culture, but it is a rare spot.

In the bay area, there is a very large biking community -- road, mountain, around town, etc. The problem is, the infrastructure isn't there for bikes compared to Amsterdam. We have "bike lanes" that any vehicle can enter within, say, about 150' to make a turn onto another street. Vehicles don't look for bikes. The bike ways in Amsterdam, certain parts of Munich, and other towns are often separate from the roads. When not, people expect them and are courteous to them much more than here.

<comment><USER21> the fact is that a helmet is not enough to guarantee your safety - if cycling without one is "nuts", cycling with one is too.

<comment><USER22> This really hits it. A helmet isn't some all protective force field. If a truck is going to run you over, a helmet isn't going to save you.

I think helmets are associated with bikes, because before we used bikes to commute, which involves simply riding about town, we used bikes to rip through the woods inches away from trees and sharp rocks, or jumped them off of mounds of dirt, or flung road bikes down mountain roads at 50per. (at least those three seem to sum up my first 23 years of existence) I live in DC, got old, but still NEVER commute with a helmet, and feel perfectly safe all the time. In fact, tons more safe than when I try to get a training ride in. (for which I wear a helmet)

<comment><USER23> _This really hits it. A helmet isn't some all protective force field. If a truck is going to run you over, a helmet isn't going to save you._

Actually: [http://www.active.com/cycling/Articles/Bike_helmet_crushed__...](http://www.active.com/cycling/Articles/Bike_helmet_crushed__but_head_fine.htm)

But, in general your point is correct. There are some dramatic examples where a bike helmet saved someones life, but statically it is unlikely.

<comment><USER24> Must be a luck-signularity around where I live. I know several people saved by bike helmets, from small crashes of 2 bikes or bike vs immovable object. One happened last Saturday on an asphalt bike trail with no obstruction - <USER2> young man just went down and landed on his head. Busted his helmet all to hell. Got up and got back on his bike.

Lots of statistics thrown around here, and my anecdotes are not statistics, but they are a heck of a lot closer to actionable information that hot air. As for me, I don't regard a helmet as making bicycling seem dangerous, any more than wearing a raincoat makes walking outside seem dangerous. Its just part of my equipment, like the water bottle.

</comment></comment></comment></comment></comment><comment><USER25> Cycling is extremely appealing if you separate roads for cars from roads for bikes. Boulder is a city that gets this right. As a cyclist in Boulder, you can get almost anywhere in town with minimal riding on a normal street. The network of bike/pedestrian paths is so well integrated into the city.

I loved biking everywhere in Boulder. In Austin or New York I would rather walk and take public transit. NYC and the Connecticut shoreline are keeping me enthralled for now but I will move back to Boulder for the bike paths (and the general paradise vibe) at some point.

Nostalgia is taking hold now. Warm memories of a satisfied ride with a Flat Iron mountain backdrop. In my backpack was just a modest check, but it was a check for the sale of my first venture, and we were happy, and living in Boulder and the future was ours for the taking...

<comment><USER26> As a still somewhat new Boulder resident, I agree with this. I lived here for a year as a freshman and only saw the city by bus. I came back recently owning a car, and saw more of the town, but it was a bit difficult to get around in all the traffic.

Then I got a bike, and the valley opened up to me. I practically had to relearn my way around using the extensive network of bike lanes and bike paths, but I feel a lot more freedom of movement. I was worried about safety at first, but now I am more comfortable riding than driving.

I know I'm spoiled by this city though. The ride from South Boulder to the shopping district can take you along a gorgeous paved path following a stream under a canopy of trees between suburb neighborhoods. I never feel a need for a helmet.

Downtown boulder has a bike sharing program, but I don't know how much use it gets since practically the whole town rides.

</comment></comment><comment><USER27> relevant study from the UK: <http://www.cyclehelmets.org/1231.html>

"HEAT suggests that a law making helmets compulsory for cyclists may result in an overall increase in 253 premature deaths – 265 extra deaths from reduced cycling less 12 deaths saved among the reduced pool of cyclists receiving fatal head injuries."

"The overall cost of a law would be between £ 304 million and £ 415 million per year. In addition, there would be a one-off cost to the remaining cyclists of £ 180 million to equip them with helmets"

</comment><comment><USER28> So many people have turned this into a 'are helmets safe or not'.

That's really arguing the wrong point - of course helmets improve survivability of a bicycle accident.

The point here is, for bike-sharing programs, should helmet use become mandatory?

The answer should be : no.

Ultimately few people are going to climb on a bike and think it is safe riding without a helmet. They will know that they are doing a dangerous thing.

The idea with bike-share programs is to get people using shared bikes to move around a city instead of either public transport or private cars. If carrying your own helmet (or using a publicly shared-helmet) is a requirement, fewer people are going to use the bike-sharing.

This is a simple argument about the increased use of bike sharing programs against the increased number of people with head injuries from that bike sharing program. I don't know what those numbers are, but it would mean higher head injuries but also higher bicycle use. The number of head injuries can only be measured by the set of people who chose to ride the bike without a helmet, who had an accident and hit their head. Some people (regular users, for example) would choose to still use helmets when riding bike sharing, so it's not like removing the law will mean nobody wears a helmet anymore. At the margin there will be more injuries, but also more bike-miles ridden. It's up to people to make a decision which is more desirable.

It might sound like a tough decision, but really, this type of decision is everywhere. Speed limits are set with the balance of people who will be injured or killed in more serious accidents, balanced with the ability for more people to get to their destination more quickly.

</comment><comment><USER29> This article is asinine.

Not once does the "journalist" mention the absurd price of NYC's program (up to $77 for 4 hours) vs. the $2 she pays in Paris.

Further, let's not forget the safer bike lanes or areas in European cities. Getting hit while riding in NYC is not an 'if', it's a 'when.' The number of cycling deaths here are absurd. I'd hate to see the figures if we actively discouraged helmet use.

The NYT should be embarrassed they ran this piece.

<comment><USER30> That's a very deceptive description of the pricing. In particular, you can't take a 4 hour ride in Paris for $2 either. A quick glance at the pricing suggests the NY system is about 2-3 times more expensive (presumably because it isn't as heavily subsidized).

<comment><USER31> You can take a 4 hour ride in Paris for 2$. One day ticket is 1,70 €, first 30 minutes are free, you have to pay if your trip is more than 30 minutes or you can just take another bike for free, that will reset the countdown. Not really handy but most trips are < 30 minutes. By the way the annual fee for unlimited 30 minutes rides is only 29 € Source : velib user here.

<comment><USER30> But that's how the NYC system is too. You get some low rate for the day and as many 30 minute rides as you want. dbreunig was quoting some ridiculously high number for a 4 hour NYC ride that only applies if you keep the same bike out the whole time.

</comment></comment></comment></comment><comment><USER32> As a keen cyclist (I'm building <http://www.cyclinganalytics.com/>), I wish we didn't have mandatory helmet laws, but there are a lot of points on both sides of the argument worth pondering.

* Making helmets mandatory makes cycling look dangerous. What other things do you wear a helmet while doing? Between this, ruining peoples' hair, not looking as chic, and the inconvenience of it, helmets discourage people from cycling.

* Although it is possible to get seriously injured on a bicycle, the research that I've seen suggests that the health benefits of cycling outweigh the risk of injury considerably (even when not wearing helmets), so, from a public health point of view, it makes sense to encourage cycling, and even cycling without wearing a helmet.

* Therefore, it seems that helmets directly save lives (in crashes, although, for my own anecdotal evidence, they haven't helped me in any of the crashes I've had), but they cost lives indirectly by discouraging people from cycling in the first place. This makes it harder to sell.

* Laws are not about making things as safe as humanly possible. It would save more lives to have people in cars wearing helmets, but we don't do that (yes, I know more people travel by car). For that matter, it's legal to drive cars that would be considered death-traps by modern safety standards. Even if helmet laws did save lives, that doesn't automatically mean they should become laws.

* The drivers in different countries have different attitudes towards cyclists. In Australia (and probably America), we have a strong driving culture, and a very "us vs. them" view of the whole thing. Earlier this year, Shane Warne (one of the most famous Australian sportsmen of the last decade) had an altercation with a cyclist on a busy Melbourne road which led him to comment on Twitter about how cyclists should pay registration and show license plates. Views like that are very common amongst the general public, and often stem from the view that "bikes are okay for a gentle Sunday ride with the family to the park, but they shouldn't be used as serious transportation devices". Compare that with the attitude of the average driver in many European countries (from what I've heard), and you might be able to make a case that we aren't ready for scrapping mandatory helmet laws, because cycling really is more dangerous.

<comment><USER10> <http://www.cyclinganalytics.com/> looks interesting.

FYI .tcx files exported from Garmin Connect seem to fail (.fit files are ok).

<comment><USER32> Thanks. I just fixed the TCX parsing issue.

</comment></comment></comment><comment><USER33> One thing to remember is that Copenhagen had many bikers before it had many bike lanes. Bike lanes on the main traffic arteries of Copenhagen is pretty much a thing of the last 10-15 years or so. Before that bikers in central Copenhagen rode their bikes on the streets (with a few exceptions).

Now, many of the suburbs of Copenhagen were designed with biking in mind and have had extensive networks of bike lanes for the last 30-40 years. Of course, people moving from there and into Copenhagen took their biking habits with them.

Copenhagen has other incentives that makes biking the choice: Huge taxes on cars (first a 25 percent VAT, then 105 percent fee for the first roughly 14,000 dollars of the value of the car (incl. the VAT), then 180 percent on the exceeding value of the car), huge taxes on gasoline (the gasoline tax alone is around 3.5 dollars per gallon, then there is the 25 percent VAT, bringing the total price per gallon up around 8 dollars). Further, in many parts of Copenhagen the daily fee for parking exceeds 20 dollars.

Also, Copenhagen is relatively dense, compared to many American cities, and many families living in the suburbs have at least one parent working locally (typically in public sector jobs such as teaching, day care, elderly care, the local municipality etc.). Biking is only a realistic means of transportation if distances are small. It may work for New York City one day, but probably not for Houston or LA...

</comment><comment><USER34> As a kid in the 1970s, I rode my bike everywhere, never wore a helmet (nobody did), and here I am today. Of course helmets can help avoid head injury, not riding bikes probably helps even more. I mean where do you draw the line on the fear vs. the actual chance of something happening.

On the subject of community shared bicycles, our town tried that about 10 years ago, all the bicycles were stolen within the first month (or maybe it was the first week) and it basically died at that point.

<comment><USER35> Survivor bias, perhaps? All those kids that died in the 70's from no helmets, falling out of pickups and going through the windshield of cars[1] aren't really here to say "I didn't make it."

I think we in the US tend to make things more scary than they really are in our efforts to protect ourselves from everything. However, I think the worst argument we can make is "I survived, so it is OK." There are good arguments that can be made for not wearing helmets, like how valuable it is to just get off your butt.

1\. I am one of those kids (well, not the dead part). I managed to make it between the dash board and the solid metal mirror of a Volkswagon beetle from the back seat when I was four years old. A slightly different set of conditions would have had my skull turned inside out.

</comment></comment><comment><USER36> Absolutely... Just visit Amsterdam, Copenhagen, or Paris and see all the cyclists... What a joy. Instead of helmets the US cities should try to implement cycling lanes for a change.

<comment><USER37> The difference is of course that in those European cities, cyclists are part of the expected traffic and are catered for with bike lanes etc.

Being originally from The Netherlands, I always used to ride my bike, literally everywhere. I've been living in Sydney/Australia for the past 7 years and the bike riding culture seems very similar to that of the US. Loads of sporty mountain bikes and everyone forced to wear helmets. It's not so much the gear that is the issue of course but the fact that e.g. a city like Sydney (and I guess the same thing counts for many cities in the US) doesn't cater to cyclists at all. No bike lanes (maybe a handful) and in general very dangerous. Not to mention the steep bloody hills in this place!

</comment></comment><comment><USER38> Folks in the US need to start demanding bike lanes from their elected officials. They're super cheap to build and so it's more of an issue of simply having the political will to remove a lane of traffic from exclusive car use.

Such political bravery can pay off. Vancouver BC's Gregor Robertson (and his councillor slate) has been elected twice with strong mandates in large part because of his commitment to bike lanes.

<comment><USER39> There's actually some organized opposition to bike lanes in the US, from some of the more conspiracy theory oriented members of the Tea Party and the Libertarians. They think bike lanes are part of the UN's "Agenda 21", which they see as a nefarious plot to take away our sovereignty.

Bike lanes, for example, according to these people encourage people to bike more, which encourages higher density cities (as people want to be within bike range of work). Having us packed tighter into cities will make it easier for the UN troops to round is up and take away our guns and then our property.

These people tend to be politically active, and have turned up in enough numbers at some city councils where bike lanes were being considered to shout down those in favor or bike lanes, and scare the politicians into thinking bike lanes are actually controversial among the general electorate.

The Republican Party is encouraging this stuff. They made opposition to Agenda 21 an official part of their party platform. They didn't mention any particular things, like bike lanes, put simply mentioning Agenda 21 is going to encourage the conspiracy nuts.

Plenty of amusing but frightening on this in Goole, if you are curious. Here's a good start: [http://www.theatlanticwire.com/politics/2012/06/inside- agend...](http://www.theatlanticwire.com/politics/2012/06/inside- agenda-21-international-tyranny-bike-lanes/53844/)

<comment><USER40> To be fair, what you've just proposed is also a conspiracy theory.

<comment><USER39> How so?

</comment></comment></comment></comment><comment><USER41> Related TED talk "Why We Shouldn't Bike with a Helmet": <http://www.youtube.com/watch?v=07o-TASvIxY>

<comment><USER42> It is a TEDx talk.

</comment></comment><comment><USER43> This article is rampant with dishonest usage of statistics and anecdotes:

 _"Statistically, if we wear helmets for cycling, maybe we should wear helmets when we climb ladders or get into a bath, because there are lots more injuries during those activities."_

Ok, but how about the severity of the injuries? This is like saying that most car collisions in the US happen in parking lots. Also, there are lots more injuries per instance, or absolute numbers?

 _"The European Cyclists' Federation says that bicyclists in its domain have the same risk of serious injury as pedestrians per mile traveled."_

Of course, but bicyclists travel many more miles. That's the point of riding a bicycle. It would be more fair to compare against people who ride buses.

 _"Nobody wears helmets, and bicycling is regarded as a completely normal, safe activity. You never hear that 'helmet saved my life' thing."_

Of course not. If you don't wear a helmet and you have a fatal accident in which a helmet could have saved your life, you're dead. The dead don't speak.

EDIT: who downvoted my comment and why? I'm just stating obvious flaws in the article. Answer instead of downvoting, please.

<comment><USER44> So you've rallied against the articles points from a logical point of view.

But do you have any evidence that helmet use decreases (severity of) injury?

From the evidence I've seen, requiring helmets lowers cycle usage, which in turn lowers the number (total, not per capita) of injuries, which politicians see as a 'win'.

<comment><USER45> Well, for one thing. My dad would be dead if it wasn't for his bike helmet. That's good enough for me to wear one. It's anecdotal, but it's very personal, so I'm probably not going to change my mind.

What's cool is the helmet company wanted his helmet back so they could study it.

</comment></comment></comment><comment><USER46> _A two-year-old bike-sharing program in Melbourne, Australia — where helmet use in mandatory — has only about 150 rides a day, despite the fact that Melbourne is flat, with broad roads and a temperate climate. On the other hand, helmet-lax Dublin — cold, cobbled and hilly — has more than 5,000 daily rides in its young bike-sharing scheme._

As for the Melbourne part of that sentence: the city is spread out vastly over 8,694 km² (acc. to Wikipedia). Some of my co-workers ride their bikes to work, but unless you happen to live in a close-by suburb, you cannot really get anywhere by bike. Besides, Melbourne really is a car city, and made to be one, with 8-lane highways cutting through its geography. There are a few bike lanes, but parking is permitted on them, so in practice they don't exist.

But from all that you cannot deduce that Melburnians are fat and lazy people at the risk of a heart disease. In fact, like most Australians, people here love sport. Hardly ever seen so many joggers ever before. And yet there's rumour that people South of the Yarra river, that divides the city from East to West, run while people North of it ride bikes.

I guess they don't participate in the bike sharing program because if you ride a bike on a regular basis, you own one.

</comment><comment><USER47> There is an association in France that is lobbying against helmets for bike commuters (and advocating them for competitive cyclist) and they have collected a pretty large amount of data on the issue:

<http://www.fubicy.org/spip.php?article191>

it turns out that head injuries are not very common when riding at slow speed. An helmet would actually be more useful for a pedestrian.

</comment><comment><USER48> I've ridden bike thousands of times. And I've never worn, owned, or even touched a helmet. Like nobody else my age ever does in my country. It started to become a trend to let children wear a helmet here since the last 5 years or so though, and of course those coureurs with their flashy bicycle clothing have been doing it forever already...

</comment><comment><USER49> What's so wrong with helmets?

<comment><USER50> I think we can solve this with a bulleted list:

      * Scare people off from using bikes
      * Uncomfortable
      * Supply excuse to not make biking safer
      * Expensive
      * Don't actually make you any safer

<comment><USER49> The first point just begs the question. The third one is questionable at best. The last two are just incorrect.

I think the "no helmet" thing is just a weird bit of biker culture that's going to eventually die out, much like smoker culture is dying out in the US.

<comment><USER51> > I think the "no helmet" thing is just a weird bit of biker culture that's > going to eventually die out, much like smoker culture is dying out in the > US.

Is this a US-only claim, or do you reckon people in Amsterdam and Copenhagen will see your light and start wearing helmets?

</comment></comment></comment></comment><comment><USER52> It's apparently not very clear whether bike helmets increase or decrease biker safety: [http://www.overcomingbias.com/2010/09/bike-helmet- doubts.htm...](http://www.overcomingbias.com/2010/09/bike-helmet-doubts.html)

<comment><USER53> every of these articles manipulate the data to make you believe a simple fact "helmet or no helmet is the same".

Just use common sense instead (yeah I know it's so freaking hard). If you're going to ride on a safe road, bike path, etc, like many people do, helmet or no helmet makes an insignificant difference.

If you're going to ride in traffic, in SF, NYC or Paris, that is where you want to wear one. If you're going to go down hill in the forest at extremely high speeds (ie: you're doing competition), you're going to wear a helmet. Heck those guy don't need to be told, they know the risk if they don't.

That's all there is.

<comment><USER54> _"Heck those guy don't need to be told, they know the risk if they don't."_

If only: [http://en.wikipedia.org/wiki/Bicycle_helmet#Required_helmet_...](http://en.wikipedia.org/wiki/Bicycle_helmet#Required_helmet_use_in_cycling_sport). I think culture in the peloton has changed a bit, though.

<comment><USER53> Hum right, I was thinking of the mountain bike kind of descent, not the road riders. Although since the helmet helps with drag, I guess most wear it there now.

</comment></comment></comment></comment><comment><USER55> As someone who commutes to work via bike 2-3 times a week, the thing I would appreciate the most would be if highways had walled-off bike lanes. The reason I say this is because surface streets having bike lanes is not enough. The thing with highways is that they are able to run diagonally to the surface streets, which often times reduces distances drastically. With bike lanes though, often times I feel like I'm _zig-zagging_ to get from point A to point B, which feels terribly inefficient.

</comment><comment><USER56> As a daily Vélib' user from day one, I'll add some insights a one-time user may have missed:

* It's often the fastest way to get to another point less than ~5km away.

* You quickly notice how most of the traffic regulation is only designed for cars.

* You have a much better visibility of the traffic (with a correctly adjusted saddle) than a car driver.

* Maneuverability and standing start acceleration (the first seconds) are also way above the average car, so if you're used to it, you'll easily make your way in the congested traffic.

* It's common practice to run red lights or stop signs (hence the first point). There's some debate about allowing the "turn right" but we're still waiting. Still, we're not crazy but you quickly notice it makes no sense at all to stop & start a 20kg bike every 100 meters at a pedestrian crossing with obviously no pedestrians waiting or at road junction with no incoming traffic.

* Most bike lanes are overrun by clueless pedestrians.

* European cities like Paris predate cars and are more dense with smaller streets which feel much safer than higway-like american streets.

Crossing the place de l'étoile ain't for every vélib user - <http://youtu.be/lay8aZlsbB0> \- but it's funny to do it.

</comment><comment><USER53> So i had one single bike accident in my life so far.

Happened to be in a urban area. Happened that a car cut the way and i hit it, and the ground with the head. I have a permanent scar (its not so bad) on the side of my face.

Without helmet it'd have something much worse (yeah i broke other body parts, the hit was rather violent - i can avoid a car going at regular speed, but if i'm going fast _and_ the car is speeding, sometimes it's though luck). So you know what? As long as I'm not going down at 60mph in the forest I don't care if I've a helmet or not. Ground is soft, and I'm probably not gonna fall. The chance to hurt my head is low, and the skull is strong.

Now in a urban area, 60mph isn't unheard of. Specially from cars, even if you're at "only" 20mph on the bike. Thats _exactly_ where a helmet is a good idea.

For sure I'm ok with people choosing to wear a helmet or not (as long as if a biker gets hurt by it's own fault, the car driver doesn't have to pay for it, which I fear ain't the case in the US). But I don't think that's a very good idea in a urban environment.

You'd need bike-only lanes that are fully respected, proper visibility, etc. That's not the case in Paris (velib) and that's not the case in the US. In both cities bikers also pass at red light, in both cities non-bicycles use the bicycle lane (in Paris scooters take it all day long to avoid traffic, at high speed). In some other EU countries, or some other French cities it's (much) better than in Paris, though, safety-wise.

Also in the EU (Minus Paris and probably a few other big cities), cars will not attempt to kill bikes if there's no bike lane, and bikes will generally respect the road signs. Makes a world of a difference.

<comment><USER57> This would be much more compelling if you could bring some statistics into the argument rather than tell a personal story and then, basically, guess.

<comment><USER53> Statistic of how many head injuries you get if your head is smashed against a car door or the ground at high speed?

I suggest you make the experiment, because, I can only guess it hurts every time, and uhm, that's not backed by any statistic.

\--

I'm not allowed to reply because this has been down-voted, so i'll reply here:

the study you linked is a net result of people NOT riding bicycles because they don't want to ride if they have to wear a helmet. Thus they die "faster" from lack of exercising. That's twisted crap, IMO. It doesn't mean not wearing a helmet is safer. It means: NOT DOING EXERCISE IS UNHEALTHY. That's a very different thing. Note that everyone else "against helmets" in the HN threads linked to similar stats (!)

As I wrote, I'm all for people being allowed to wear one, or not wear one. But at the end of the day, it's safer to wear one in many environments such as SF/NYC/Paris (yes, Paris too It's not like Amsterdam, at all.).

But since you like stats, here are stats, that helmets protected 85% of helmet-wearing riders, as this study does not compare to "people who wouldn't ride because the think a helmet is ugly":

[http://www.nejm.org/doi/full/10.1056/NEJM198905253202101?HIT...](http://www.nejm.org/doi/full/10.1056/NEJM198905253202101?HITS=20&hits=20&FIRSTINDEX=0&searchid=1004370623714_124372&stored_search=&tdate=10%2F31%2F1990&author1=Thompson&journalcode=nejm&RESULTFORMAT=&fdate=1%2F1%2F1988&sortspec=PUBDATE_SORTDATE+desc+Score+desc&titleabstract=Bicycle&maxtoshow=)

<comment><USER57> I'm incredibly disappointed with the quality of conversation in this thread. I expected a nice conversation about risks versus benefits. Instead, I see a bunch of people arguing with anecdotes and insults, and turning on anyone who makes even the slightest attempt to look at the situation rationally.

<comment><USER53> Given how many messages you sent with the same tone as when you replied to me, I am not surprised you feel that way.

I did give you the link you asked for and full explanation, but instead of discussing those, you're deriving the discussion with complains, which IMO, aren't valid. I'm guessing, and I might be wrong, but I'm guessing, it's partially because you do not accept my point of view as even possible.

I don't see any insult in my messages, by the way. Oh and since I've been upvoted back, I can actually reply now. Yay.

</comment></comment></comment></comment></comment><comment><USER58> I recently moved to Tulsa, OK. I bought a condo on Riverside Drive because the area, atmosphere, people, places, etc. all reminded me of being in Palo Alto to a degree.

Every day, since I got here, I have been biking to work. However, I would still get things like groceries and little trinkets with my car.

Go to last Friday/Saturday (sometime during the night or early morning). I went outside, to get in my car, to go visit my friends about 75 miles away in another city (Stillwater, OK).

My car was gone.

I immediately called the police and my insurance provider (I have full coverage). The insurance company gave me a rental and is processing my claim right now. I have not used the rental car yet. It's still at the rental company. They said to call whenever I'm ready to pick it up. I ended up biking to get my groceries and instead of drudging it like I thought. I enjoy it and look forward to 30-60 minutes I nonchalantly bike down Riverside Drive on the bike path to the store and back every day. I wonder what Winters will be like now? I'll replace the car if and when insurance finishes with my claim.

For the Midwest, the area of Tulsa that I live in it is extremely bike friendly. Relatively anyway.

Edit: Grammar, clarity.

</comment><comment><USER59> My experience of the bike-hire scheme in Brisbane (Australia) is that helmet laws are _a_ problem, but not _the_ problem. The legal requirement to wear a helmet is a bit tiresome, and the communal helmets they supply to get around it are a figleaf at best, but helmet law or no, riding a bicycle in Brisbane is harder than it has to be.

The problem, as others have pointed out, is road design and driver attitudes. Going any significant distance involves either riding (legally) on footpaths, or riding in traffic. There's a nice bicycle path along the river, plus some pictures of bikes in doorzones. That's about it for central Brisbane. It's not _that_ hilly but it's definitely not flat. I don't mind riding in traffic, but I say that as a bike racer (albeit an old, fat bike racer) who used to be a courier. Driver attitudes, well, 95% of them are fine, maybe more. There's a small minority who are deranged and vicious and it's socially acceptable to behave that way in a car. It's all do-able, but it needs some unintuitive techniques (ride in the _middle_ of the road in some situations, for example) and, ideally, a bit of fitness. I don't know as I'd recommend it to neophytes.

That helmet laws are the problem is an appealing conclusion, because it's a quick fix: repeal the helmet law. Changing infrastructure OTOH is hard and changing attitudes in harder still. I'd like it to be as simple as repealing a law, especially one where the benefits are so unclear. I just don't think it is.

In terms of the popularity of the bike hire scheme, I can only say that there are a couple of dozen hire bikes out the front of my workplace at the start of the day and it's down to a couple by day's end. I'm not aware of the official figures, but my highly subjective impression is that they're getting used more than when it started. A less convoluted signup process probably has something to do with it, plus the fact that it's a pleasant time of year to cycle.

</comment><comment><USER7> I think when assessing personal risks people often don't realize that they have to 1/1000 or higher risk of dying next year of whatever.

Yes. Making yourself a bit safer is good if it doesn't bother you much but you should realize that life is just slow decay in hazardous environment and you have to balance your risks with what you want to do during your life and with your convenience.

As for helmets. Drivers tend to pass closer to bikers that wear helmets (UK study) and unsurprisingly bikers that wear helmets have more accidents. Success stories that tell "helmet saved my life after being hit by a car" are often failure stories because of your helmet you and the guy that hit you felt confident enough to share same space.

I never wore a bike helmet although if I owned one I'd probably wear it as additional safeguard. Even if I did I would relay mostly on sharing space with pedestrians not cars wherever possible.

</comment><comment><USER60> Helmets are important for inexperienced cyclists and mountain biking, because you have a high risk of falling. But riding around town is a low risk activity and a helmet is unnecessary. We need to learn to distinguish between these scenarios instead of lumping all cyclists into one group.

</comment><comment><USER61> My experiences growing up in the USA contradict the author's sentiment that helmet-wearing is taken as a given and that there's social stigma against going helmetless. As a kid, my parents had me wear a helmet, but once I was comfortable riding, the helmet was never an issue. The only people I knew that wore helmets were those who regularly commuted on their bikes (and thus rode on busier and faster roads). This was in my small hometown (12k people) in Missouri, but the experience continued in my larger college town (100k people). A lot of students biked to, from, and around campus, not to mention riding downtown for the nightlife. Again, helmets were the exception, not the rule.

</comment><comment><USER62> I ride 100 miles a week or so for fitness. Always wear a helmut. I recently moved to a new town. It has a college nearby (US) and was immediately struck by how many 20 somethings weren't wearing helmuts. It irritated me at first. Then I realized something else. Just how many people were riding period. And how free and happy they look riding around with the wind in their hair.

I've really come around over two years and now don't wear one when I ride recreationally. I'm sure it's riskier than not but nearly all physical activity is riskier than sitting on a couch - in the short run.

</comment><comment><USER63> The target audience may be slightly different. In London, the people I see wearing helmets while cycling tend to be that particular young male demographic, whereas people partaking in the bicycle sharing program tend to be commuters. As such, the speed at which both travel, and the roads that they take, tend to be completely different. If you're doing a high-speed bicycle- only commute into Central London then I'd say wear a helmet, but if you're doing a short-distance trip on a shared bike, there's really no need since you'll be travelling slower anyway.

</comment><comment><USER64> Helmets aren't as cut-and-dried as even this article makes out: Studies have shown that wearing a helmet increases your chance of having an accident in the first place:

[http://psychcentral.com/news/archives/2006-09/uob- wah091106....](http://psychcentral.com/news/archives/2006-09/uob- wah091106.html)

So you may improve your chances of not getting injured, but you also increase your chances of an accident in the first place.

It's nice to think it's as simple as "X is safer than Y" but matters are rarely that cut & dried..

</comment><comment><USER65> In California, I would never ride a bike or ski without a helmet. The roads and slopes are now too crowded with people not paying attention to their surroundings.

Somehow, the skiing (and boarding) industry has made helmets a fashion statement. Almost everyone wears one.

The cycling industry just needs to make wearing a helmet cool.

</comment><comment><USER66> A friend of mine died a couple years ago from a bicycle accident with a car. He suffered a head injury and was not wearing a helmet. There is no logical argument that would ever make me support riding without a helmet, despite how much fun it is.

</comment><comment><USER67> while, I totally agree with jdietrich's fact based approach to the discussion, I have ton's of personal experience in the area. Helmets were optional for me growing up, though I often deferred to wear one riding on city streets, racing mountain/XC, riding downhill in Vail and the Olympic Mountains, and riding biketrials extensively. Separately, but also connected had many years of interstate motorcycle riding experience.

I commute by bicycle to work in NYC daily. I feel safer riding here than any other city I have ridden in, because the traffic knows how to deal with bicyclists. (This backs jdietrich's claim that 'more cyclist on the road' == 'safer riding conditions for cyclists in traffic'.) Personally, bicycle dedicated lanes and separate bike lanes, increase my already overwhelming comfort riding in this city, because they eliminate a major variable that is out of my control, being hit from behind.

I have been in dozens of really bad crashes on trails, closed courses and even streets, and only hit my head once. It is my experience that while a helmet won't save you from a car going 50mph, you stand a better chance of surviving when your head makes a 'light tap' on the pavement below you. That one time I hit my head is when I realized the human skull moving at _any_ speed is the equivalent of cantaloupe; soft and rip, waiting to be cracked open to reveal it's juicy insides. From that point forth, I unconditionally wear a helmet. There is no question bicyclist wearing helmets in particular types of collisions will fair better than their helmet-less counter part. Also I have done some really crazy stupid stuff on a bike, but I am not more inclined to do so with a helmet on versus off. In fact, I usually forget I have it on at all. I should add, no amount of safety gear will save you if you or someone else who makes contact with you does something really stupid.

<http://www.helmets.org/stats.htm>

Also, there is also no question motorcyclists fair better with a helmet.

TL;DR I don't ride more boldly with a helmet on. Helmets are a safer way to ride, and cities with lots of bicyclist are better at dealing with cyclist in traffic.

</comment><comment><USER68> I, for one, would like at least the possibility to get a helmet when short- renting a Velib in Paris, even if I would probably not wear it.

Oh and using headphones on bike should be forbidden (if it's already the case, people do not seem to know or care).

</comment><comment><USER69> I am a physician, and was surprised by the NY Times article. Here is a review of older literature you might find helpful:

<http://www.ncbi.nlm.nih.gov/pubmed?term=10796827>

</comment><comment><USER70> What would make sense is making helmets mandatory for road bikes, cyclocross bikes, mountain bikes and touring bikes. All other bikes aren't really designed for speed or unsafe maneuvers and therefore shouldn't require helmets.

<comment><USER71> This all the way.

</comment></comment><comment><USER72> good points raised in there, instead of promoting the use of helmets city officials should establish more lanes for cyclists. and just on a side note, taking the bike to work everyday is arguably the best workout available.

</comment><comment><USER73> Nice to see some data-driven policy making!

</comment><comment><USER74> I have a strong opinion on this issue: I see mandatory helmet laws as an example of democratic discrimination. Helmet legislation is driven and either directly or tacitly supported/ignored by non-cyclist politicians and voters, with little if any polling of cyclist preferences. While mandatory helmet laws are widely disliked by cyclists, their minority position makes resistance difficult. And your average car-driving helmet-law-supporting/ignoring citizen is dismissive of the right to autonomy of cyclists. As a counterexample, there are many things that could be done to improve the safety of cars - helmets, four-point harnesses, backwards-facing seats, engine speed-limiters, alcohol- sensing engine locks, and of course (possible soon) a mandatory full switch to self-driving cars. However, any attempts to introduce such sensible measures will be shot down immediately by a ferocious counter-reaction. The basic logic is that car drivers will not accept intrusive safety measures simply because a) they do not feel or wish to be made to feel unsafe (regardless of statistics) and b) they do not wish to compromise their "feeling of driving." But car drivers are perfectly happy dictating to cyclists that they have no choice in accepting an intrusive safety measure which compromises their "feeling of riding" - anyone who has tried it knows that biking is not biking without the feeling of wind blowing through your hair. It sounds trivial but it makes a massive difference - the typical reaction of car drivers to this point is to snort and say "yeah right" - the hypocrisy is revealed if you make any suggestions about implementing the previous safety measures.

This democratic bullying seems to go hand in hand with a more nasty attitude of drivers to cyclists in general. In my town in New Zealand, if I ride without a helmet for even a short distance I can expect to be verbally abused by car-driving members of the public. In particular, young men will shout random abuse at me - that's not all that bad, the worst is older baby boomer generation men, who will actually slow down beside me and, bristling with anger, yell at me asking where my helmet is. These reactions confuse me. I do not roam around on my bike looking for drivers not wearing seatbelts and try and ride up to them and hammer their windows and yell abuse. Even if this was possible, I wouldn't have any interest in doing so. If you want to wear a seatbelt or not is up to you. You can do so with full knowledge of the risks of a police fine or injury in an accident if you wish. Similarly, why should drivers feel upset and compelled to accost me if I choose not to wear a helmet? I do so in the full knowledge of the risk of a police fine and an injury in an accident. That is my business, so why do they feel the need to confront me? And why do my personal choices seem to make them so angry?

The answer is simple. Our road culture is aggressive, impatient and me vs. them. I am sure the drivers in my town are by no means the worst in the world, but still, there is an atmosphere of confrontation that permeates driving here. People are in a hurry to get where they are going, and everyone else on the roads is an enemy. Unsurprisingly men are the worst offenders. And cyclists are the easiest targets: fragile, wobbly, slow, unable to protect themselves, uninsulated from abuse, unable to outmaneuever or escape an angry car-driver, above all out of place, they become a focal point, the easy targets, for all the aggression of an aggressive road culture. The helmet law is in my mind just a manifestation of this power-imbalance and a focus for the tension it generates. It does not surprise me that most helmet laws seem to have arisen as urbanisation and car use and speeds intensified, i.e. as the dominance of a break-neck pace car culture became cemented. Instead of trying to soften road culture and build cities which work for all different modes of transport, we have a helmet law and some glass and gravel-strewn cycleways wedged between parked cars and roaring traffic flows. How anyone would feel comfortable and happy cycling in this environment is anyone's guess, but what is for sure is that the helmet law at best accomplishes little to nothing and at worst is a dangerous red herring, distracting energy and attention from addressing much harder and more critical problems of culture and infrastructure.

I have nothing against helmets as safety devices and I think they should be worn. However I think making it a law, and making adult cyclists who wish to ride bare-headed the free subject of assault from members of the public (not to mention the police) accomplishes nothing more than aggravating a combative cyclists vs car-driver culture.</comment>


Postgres tips for Rails developers - <AUTHOR> https://www.citusdata.com/blog/2017/04/28/postgres-tips-for-rails/ <comment><USER2> Surprised the list doesn't mention PGHero ([https://github.com/ankane/pghero](https://github.com/ankane/pghero)). It's been really useful at our company to find slow queries and identify missing indices.

<comment><USER3> Whoa. This seems very nice. I'm on my phone now and can fully check it, this works directly with PostgreSQL, right? It doesn't matter if the application layer is Rails or Django or whatever, correct?

<comment><USER4> Correct. Works directly off pg stats. It's one of the first items on the deployment checklist for every product or service in the company.

<comment><USER5> > It doesn't matter if the application layer is Rails or Django or whatever, > correct?

>> Correct. Works directly off pg stats

Huh - PgHero is a rails app isn't it?

<comment><USER6> There are two applications in scope: The application whose database is being monitored, and the application displaying the dashboard.

</comment></comment></comment></comment></comment><comment><USER7> I wonder why some of these tips, like a statement timeout, aren't the default behavior of Rails. Some things can't be, like pg-bouncer, which makes sense. But why not have pg_stat_statements running on PG? Or have log_lock_waits in each statement?

<comment><USER8> The appropriate setting for a statement timeout could really depend on the application. 5 seconds is probably sane for 90% of applications, but the other 5% may have a legitimate need for longer running statements.

<comment><USER9> But isn't that the idea behind Rails? Opinionated defaults with a config to change the setting somewhere?

<comment><USER8> Yes, but at some point you can't just go around installing all the possible extensions/gems/whatever that you think are "good". The default gemfile would be 300 lines long with "developer happiness" gems such as `oink`, `bullet`, etc etc etc.

Most of the things that Rails is "opinionated" about are _far_ more arbitrary than this, like whether the database primary key should be "id", "postId", "posts_id", or "pid".

<comment><USER10> > Most of the things that Rails is "opinionated" about are far more arbitrary > than this

To my eye, at least, it isn't a matter of being arbitrary, but rather not having an answer.

PK names don't matter to the machine, so long as everything agrees and modulo illegal values. Humans get massively opinionated, but the machine doesn't care.

Compare with: How long should a query take to run? No, I'm not going to tell you what kind of query, or the size of the dataset, or the hardware at the bottom of the stack, or what the app is actually doing.

It is like asking what specific clothes an arbitrary person should wear.

</comment></comment></comment></comment></comment><comment><USER8> A feature somewhat similar to `marginalia` is probably going to merged into Rails very soon: [https://github.com/rails/rails/pull/26815](https://github.com/rails/rails/pull/26815)

<comment><AUTHOR> Yes, very excited for this! It should replace much of the need for marginalia, really nice to see more of these key things needed to get visibility come into Rails.

<comment><USER11> If that may interest someone and to do some self promotion too :-)

I have built a product (rails app monitoring service) that shows the file:line for each SQL request: [https://rorvswild.com](https://rorvswild.com)</comment></comment></comment>


What's it like as a Senior Engineer? - <AUTHOR> https://www.zainrizvi.io/blog/whats-it-like-as-a-senior-engineer/ <comment><USER2> I enjoyed this piece. One thing I'd add is handling failure. Whether it's a business process breaking down or a server crashing, eventually every engineer will face failure conditions. How to handle these varies greatly by the situation but the most important factor is the takeaway. Being able to identify and fix patterns that can lead to failure is important, but learning from mistakes and picking your team back up is the most important lesson, because eventually everyone falls. These lessons can only be learned through experience and are a large part of what makes a "senior" engineer.

</comment><comment><USER3> This all rings true to me. I summarize senior engineer responsibilities as "think holistically" \- cost of development, cost of maintenance, path to adoption, upfront investment required before you can determine if you'll succeed/fail, etc all need to be factored in. In many respects, it's the art of solving the _right_ problems (and then solving them well).

If you're curious, my own toolbox (Senior Staff SWE at Google):

* Understand your problem space in all dimensions, including prior art internally and externally, failed attempts in the space, tradeoffs and constraints. _Takes a year or two at minimum with heavy research and detective work, so start with a small seed area and grow, and figure out whose opinions to lean on in the meantime._

* Inventory your teams and their projects. Get a feel for the problem each is solving, whether you believe it's possible, and the staffing needed for that. Look for:

\---* Succeeding teams. Observe from a distance.

\---* Under-valued teams. Help them articulate true value to leadership. _If they disappeared, what would the cost be? Including externalized costs elsewhere in the company._

\---* Under-staffed teams (usually also under-valued). Teach them to deprecate features and cut problem scope to reach a sustainable subset - the worst thing is growing tech-debt with no path out. _If leadership doesn 't like the cuts, they can help prioritize differently, or invest. But do not allow them to request the impossible or unsustainable._

\---* Under-executing teams. Remain skeptical you fully understand the problem (is it harder than you think?), and look closely for education gaps you can solve in-place with mentoring. But it may ultimately be a staffing problem - e.g. wrong lead for the job - or a team culture problem, and those must be addressed too.

\---* Over-staffed teams, or teams solving unimportant problems. Flag it to management - generally either their scope will be grown, or engineers can be pulled off to work on higher-impact projects.

* Do the math. Understand costs and opportunities (what areas are overly expensive), growth rates, usage metrics, reliability. Develop a gut-feel you can use to sanity-check what you see and are told.

* Look ahead - keyword "unsustainable". Where are costs growing too quick? Scaling approaching unsupportable limits? Toil growing linearly with usage? Users taking features in an unexpected direction? Architectures breaking down? Work with teams to have a plan, and escalate the risks upwards for visibility.

* Predict the future. Based on all this, what problems _should_ be solved but aren't? What leverage points do you have to change the model, and solve a different problem more successfully? Pitch, sketch, and prototype to sell the importance or opportunity.

* Roll up your sleeves - "architecture astronaut" is a pejorative for a reason. Dive in to your struggling projects and work alongside the team, providing an extra pair of hands and educating through demonstration. Get involved in outages and their resolution. Build tools and dashboards. Take responsibility for success in at-risk areas and do whatever is required, whether that's writing code, doing analysis, PMing, or simply making yourself available.

* Be a diplomat. Recognize that all success is a team effort, and your path to impact is through and alongside others.

<comment><USER4> Thanks for the detailed write up, I love hearing from folks with more experience than me.

How do you study failed attempts in a space? The survivorship bias can make those hard to find. Do you focus on failed attempts within your company for those cases?</comment></comment>


Realtime Lyft Surge Prices - <AUTHOR> http://lyft.konscript.net

<comment><USER2> Would also be great if it refreshes automatically. Over time I am sure you can also create an algorithm to predict the fluctuations in surge pricing. For example, you can get my address and then tell me how likely is it for surge pricing to die down based on historical data and predictions.

<comment><AUTHOR> That's a good idea. It will take a bit longer, than I had anticipated to analyze and predict the data but I'll get around to it :)

</comment></comment><comment><USER3> This is great, thanks! Have you thought about being able to enter your address and show current and nearby surge prices? If there is no surge pricing two blocks west of me, that'd be great to know.

</comment><comment><USER4> Cool project. Would it be difficult to expand to NYC or other cities?

<comment><AUTHOR> No, actually not. I just started out with San Francisco, but I'll gladly add some more cities. Which are the biggest "Lyft-cities", do you think?

</comment></comment><comment><USER5> Works as described. Good job!</comment>


Free Justin Carter t-shirts raising money to bail out teen accused of threats - <AUTHOR> http://karatees.bigcartel.com/product/free-justin-carter

<comment><AUTHOR> More info here: [http://www.keyetv.com/news/features/top- stories/stories/sell...](http://www.keyetv.com/news/features/top- stories/stories/selling-tshirts-free-justin-carter-9649.shtml?wap=0)</comment>


Ask HN: What editor/environment to use for Front-End Dev - <AUTHOR> I'm a very experienced (10+ years) vim user (doing ML engineering, data engineering, back-end dev, etc), but have never dipped my toes into serious front-end development before.  Any suggestions and suggested plugins (e.g. like live loading a page being edited)?  Oh yeah, preferably for Debian(/Ubuntu). <comment><USER2> I have two comments to make before detailing my workflow:

* You already have experience with one of the greatest programing-oriented text editors so why don't you just keep using it?

* An environment is what you get after you have solved your problems, satisfied your needs, optimized your workflows. Not something you start with.

Now, I've been doing (web front-end) development since the late nineties and only switched to Vim from TextMate 8 years ago. I run Vim in a terminal emulator with only a few plugins. Half of them are mine, essentially snippets of code I extracted from my config for others to use.

For moving around a project I generally avoid file-based navigation in favor of the built-in "symbol-based navigation" features: :help include-search, :help tags, and :help ctags. For ctags, I let my task runner take care of the indexing.

For linting I use the built-in :help 'makeprg', :help 'errorformat', and :help quickfix.

For livereload I currently use Webpack Dev Server on every front-end project at work. This happens outside of Vim, as it should.

For manual completion (I _hate_ autocompletion) I just use the built-in :help ins-completion with custom mappings.

I use snippet expansion a lot via the Snipmate plugin (there are others).

No Tmux. No Git integration. No fancy statusline. No line numbers. No unnecessary plugin. Nothing more than a soothing and familiar dark grey rectangle.

</comment><comment><USER3> I use sublime text, it is lightweight, it has many plugins, it is fast and works great on Ubuntu 16.04.

</comment><comment><USER4> VS Code!</comment>


Pigeon transfers data faster than S. African ISP - <AUTHOR> http://www.usatoday.com/tech/news/2009-09-09-pigeon-faster_N.htm

<comment><USER2> <http://searchyc.com/pigeon?sort=by_date>

shows various comments already scattered through these HN items:

<http://news.ycombinator.com/item?id=816329>

<http://news.ycombinator.com/item?id=815840>

<http://news.ycombinator.com/item?id=815593>

<http://news.ycombinator.com/item?id=815501>

<http://news.ycombinator.com/item?id=814443>

<http://news.ycombinator.com/item?id=813313></comment>


Intel to Launch Core I9-9900KS Next Month: 5 GHz on All Cores - <AUTHOR> https://www.anandtech.com/show/14837/intel-core-i99900ks-5-ghz-on-all-cores-launches-next-month <comment><USER2> Does anybody else have a serious case of Deja-vu?

It feels like we're living in 2005 again. AMD has technical leadership, and Intel is bragging about clock rates.

<comment> dis-sys back in 2005, Intel had Core 2 Due and Core 2 Quad already in its pipeline. I don't think Intel has anything comparable in its pipeline now.

<comment><USER3> I always saw Intel naming their product "Core" as a cynical ploy to confuse terminology by associating their product with multi-core computers. It is as if an automaker decided to brand their new motor with the name "Engine".

<comment><USER4> Ha, I totally remember that confusion— my first laptop was the first gen white MacBook, with a Core Duo processor. But not a Core 2, or a Core 2 Duo, just a Core Duo. The other ones came along later.

</comment></comment></comment></comment><comment><USER5> Whatever.

This is yet another pure marketing move to get their name on YouTube videos.

Almost nobody ( in their right mind ) would pay top dollar to have that mini nuclear reactor.

<comment><USER6> > Almost nobody ( in their right mind ) would pay top dollar to have that mini > nuclear reactor.

Give it a few years after die-shrinks and efficiency improvements. A 5Ghz clock means a lot for solving problems that aren't parallelizable.

<comment><USER7> TSMC has already shrunken their die to 7nm. Intel can't keep up anymore. AMD wins this generation.

<comment><USER8> Intel still beats on IPC. Their nodes are better-performing at the same process size, so they can be a little larger and still perform like a smaller AMD. That said, AMD is doing significantly better.

<comment><USER9> AMD is winning on IPC. Zen2 soundly passed up Intel on IPC.

Intel's higher clocks are its only remaining strength through which it can overcome the lower IPC just barely.

<comment><USER8> Hmm, my information is old. Thanks for the update. I was aware AMD had been better value for money for quite some time, but didn't know they had lost even IPC... big trouble for them. Makes me almost wonder if intel was purposely holding back 10nm until it really needed it. AMD beats on IPC, intel suddenly fixes their garbage?

<comment><USER9> > Makes me almost wonder if intel was purposely holding back 10nm until it > really needed it.

Why would they do that? Intel didn't need to knock it out of the park, but they'd make more money doing yet another incremental improvement on 10nm just to get all the upgrade money. And to add in those laptop improvement features (wifi 6, integrated thunderbolt 3).

I'd understand them holding back large IPC improvements just to trickle it out, but holding back 10nm entirely doesn't make sense. Especially since it'd let them do even higher core count Xeon chips which make stupid huge profit.

> AMD beats on IPC, intel suddenly fixes their garbage?

Except AMD has beaten Intel on IPC and yet Intel has still not been able to fix their garbage. So much so they're doing yet another 14nm line of laptop SKUs (Comet Lake)

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> >In a bid to maintain an intrigue, Intel did not disclose TDP of its new product.

They basically released all the details but TDP. Very likely this sucker is a steaming hot mess. Wonder what the stock cooler is like, or if it's even possible to sustain these clock speeds on their stock cooler.

<comment><USER11> Intel has stopped delivering stock coolers with K-series CPUs for a while now. There is technically a sort of reference cooler but you'd have to buy that separately and nobody does that. Every single person in the market for a CPU like that was planning to use a "custom" cooling solution anyway. (Although custom in this case could just mean to put a big air cooler or AIO on it.)

Tbh the TDP doesn't really matter. It's a binned 9900K. We already know how those perform. It's literally just doing what siliconlottery does and getting some publicity for it.

</comment></comment><comment><USER12> Great. Does it still come with an integrated hardware backdoor you cannot disable ?

<comment><USER13> Tin foil hat on? Edited: typo

<comment><USER14> Is it tinfoil hat worthy when Intel has such a poor track record?

<comment><USER15> Any feature that sabotages the computer after 30 mins once disabled is not a feature. Intel me is a backdoor.

</comment></comment></comment></comment><comment><USER16> Just don't look under the stage for the chiller

<comment><USER17> The snark in the thread is just out of control, guys. This is supposed to be a technical forum.

In fact the part in question is shown at 8 cores, 5 GHz turbo, with a 95W TDP (at $488), which shows somewhat better power efficiency than the equivalent Ryzen 7 3800X (8/4.5GHz/105W/$399).

Now, that price differential may or may not be worth the moderate performance and power advantages to you, or you might be more enthused by the bigger Ryzen 9 and Threadripper parts instead which compete in different segments. But this certainly isn't an uncompetetive part from Intel.

<comment><USER18> Intel TDPs are the base clock, not the boost clock. AMDs are the boost clock.

A 9900K might specify a 95W TDP, but at 5GHz it will actually use almost 170W.

See [https://www.anandtech.com/show/13400/intel-9th-gen- core-i9-9...](https://www.anandtech.com/show/13400/intel-9th-gen- core-i9-9900k-i7-9700k-i5-9600k-review/21)

<comment><USER17> Cite for the AMD convention of TDP at a consistent boost? That's genuinely the first I've heard of it, and I'm almost certain that's wrong. TDPs have always been considered to be sustained values, which is exactly what "boost" is not.

<comment><USER19> The boost clocks generally are sustained values, at least if you have the cooling and power provision to make them so. Most good motherboards for Intel CPUs place no cap on boost duration although one is supported by the chipset. All of the benchmarks of high-end Intel parts like this are done with uncapped boost duration too. Yes, that does make Intel's TDP figures for this 5 GHz all-core boost part effectively meaningless.

AMD's current TDP figures are based the maximum thermal output in what they consider to be real-world applications with boost clocks enabled: [https://www.techspot.com/article/1652-things-amd-needs-to- fi...](https://www.techspot.com/article/1652-things-amd-needs-to-fix/) (Their TDP used to be maximum thermal output full stop and the real-world figure used to be called ACP, but they changed it because comparing their TDP with Intel's made their CPUs look really hot.) They also have an actual guaranteed maximum which is higher than, but tied to, their quoted TDP figure. So whilst it's not actual TDP anymore it's still a lot more meaningful than Intel's numbers.

</comment></comment></comment></comment></comment><comment><USER20> For all of 3 seconds, after which the CPU catches fire unless you have an industrial chiller or clocks down to 2GHz to cool off.

<comment><USER21> To be fair, it's 5GHz turbo frequency - not an expert but isn't the entire point of the turbo mode to run in short bursts when necessary? Seems like for occasional 100% usage short workloads like compiling code it'd be great to go up to 5GHz even just for a few seconds and shave maybe a second or two off a 10s build. That's my understanding of what this could be useful for anyway.

<comment><USER20> Intel has been moving to advertising the turbo clock more prominently than the actual clock you get in typical use. Especially 10nm seems to be plagued.

Compared to a previous generation, it might boost higher for a few seconds but then clocks lower so your build takes the same time or even longer.

On the flipside, AMD's advertised frequency is the frequency that it'll have during typical use with a cooler rated for the advertised TDP. The boost clock is what it can boost on that cooler for some time, if you cooler is better you might get more.

</comment></comment></comment><comment><USER22> News is welcomed by humans and software alike. But a bit more so by humans, since they enjoy a nice round number.

</comment><comment><USER23> This marketing feels a lot like the days of the Pentium 4 and the NetBurst architecture.

</comment><comment> dis-sys nothing exciting here - Intel is still pushing 8 cores as its flagship consumer chip when AMD is releasing its 16 cores 3950x this month.

this is a very good reminder that for over a decade Intel tried everything possible to convince people to stay on quad cores so it can maintain unfairly high profit margin on its high core count Xeon processors.

<comment><USER24> Even if you hate AMD you have to be very thankful they are putting the screws to Intel. We need competition to drive innovation.

And I'm just sitting here waiting for the 3950X announcement so I can upgrade. Which, by the way, will drop right into my 2+ year old motherboard. Meanwhile, in Intel land, there's a new socket every 6 months.

</comment></comment><comment><USER25> Somewhat related: I'm looking to buy a new under-desk DL 4 GPU DL box. An AMD CPU seems like the obvious choice at this point. I can't find a motherboard that fits in a desktop case and has 4 GPU slots though. Does this exist for AMD?

<comment><USER26> You are going to need to look at a Threadripper CPU for this, the Ryzen lineup doesn't have enough PCIe lanes to support 4 GPUs. If you look for Threadripper CPUs you will certainly find EATX boards with 4 PCIe slots.

</comment></comment><comment><USER27> This is such a yawn inducing product. I'm not too sure this will interest the gaming segment much. Server farms will all be looking at the 4X return for purchasing EPYC over Intel and the power savings are icing on the cake.</comment>


Drawing Labyrinth with Wave Form Collapse and Async Generators - <AUTHOR> https://beta.observablehq.com/@forresto/labyrinth <comment><AUTHOR> This is my first time building something up in a literate interactive doc like this. It's a really compelling platform!</comment>


What's wrong with JavaScript - <AUTHOR> http://rdallasgray.github.io/blog/2013/06/09/whats-wrong-with-javascript/ <comment><USER2> I'd rather have a fixed JS (no BS coercion, actual hashes, method_missing, better binding rules, local vars by default, "use scrict" checks for everything, int64 arithmetic, and a non manual ad-hoc way to create prototype chains) as the next version, instead of the "backwards compatible" pile-on that the upcoming version is.

Such a JS would enable them to reuse large parts (or the entirety) of the current interpreters/JITs, just as well as the next ECMAScript, but would also fix most BS and enable further performance improvements.

That is, what I propose, would be a slightly incompatible release, say: "JavascriptFixed".

As for backwards-compatibility, this would be played out in two ways. Transpilers (like Coffescript) could convert "JavascriptFixed" to Javascript, and people could use the script tag to denote the presence of "JavascriptFixed".

Given vendor support, the familiar syntax, and the performance improvements, it could take over JS in 4-5 years. No we'll have decade or more until the whole mess that's the next version becomes popular, and we'll still have the whole JS mess, just swept under the carpet.

<comment><USER3> I politely submit that what you actually want is Python, Ruby, or Lua in the browser.

<comment><USER4> Haven't we had python in the browser for a while now with pythonwebkit, pywebkitgtk, and the other webkit-native-DOM python bindings?

<comment><USER5> Do those work if you want cross-browser compatibility for users who don't have certain plugins?

I'm thinking technologies like Skulpt or Pyjamas, that let you use Python in JS, are better. It's been a while since I investigated this situation, does anyone know of other players?

</comment></comment></comment></comment><comment><USER6> "What's wrong with JavaScript" and just a single block of JavaScript was found in that post. The rest, CoffeeScript.

</comment><comment><USER7> I agree with click event (and others) are real pain. But absence of _missing is more personal preference. Major problem of javascript it the time that it takes to implement new features into the language that can sometimes converge to infinity.

Also I would be grateful if articles about javascript would feature javascript instead of CoffeeScript.

</comment><comment><USER8> Dart fixes all of JavaScript's "WAT" quirks. There is proper lexical scoping, a lexically scoped `this`, no type coercion, no monkey-patching, and so forth. It also has a "method_missing" thing called "noSuchMethod".

But most importantly: It scales.

Structure is declared and not imperatively constructed. Your tools can tell what's going on without actually running the code.

</comment><comment><USER9> This post is not javascript, it is coffeescript. Stop confusing the two.

<comment><USER10> From Coffeescript's website: The golden rule of CoffeeScript is: "It's just JavaScript". There was nothing at all coffeescript specific about his examples, other than the syntax. The issues he pointed out were javascript issues discussed using coffeescript syntax.

<comment><USER11> He could have, and should have, used JavaScript for those examples. Otherwise it's needlessly confusing. Not every JavaScript developer knows CoffeeScript. What possible benefit could there be in using CoffeeScript instead of JavaScript in an article about JavaScript?

<comment><USER12> Also, I feel like the misunderstandings he posted are somewhat from the perspective of Ruby developers who learned CoffeeScript and not JavaScript. Which I do fall under, but I guess I quickly picked up the quirks in the language which CoffeeScript does make nicer. I guess things like `this` are a problem regardless of how you spell it but I think someone who learned JavaScript properly would learn about the scope rules directly rather than just assuming "it works like Ruby" and then being angry when it doesn't.

<comment><USER11> Ah, that explains a lot. It certainly explains why the complaints didn't resonate with me. I know JavaScript very well, and there are things I don't like about it, but these weren't them. Or if they were, I've gotten used to them.

I think I did miss the point with my previous comment. Maybe I was confused by the title: The article isn't "What's wrong with JavaScript", but as you said it's much more about things that will confuse Rubyists who arrive at JavaScript by way of CoffeeScript.

For an article on that topic, it does make sense to have CoffeeScript examples. But it would be much better - and so easy - to include the matching JavaScript for each of the CoffeeScript files. Not only would it help JavaScript programmers understand the article, but it would show how CoffeeScript attempts to work around these issues.

Even better would be to add matching examples of similar Ruby code. Code examples in all three languages would make for an interesting article: the Ruby way, the CoffeeScript way that makes JavaScript a bit more like Ruby, and the JavaScript way.

</comment></comment></comment></comment></comment><comment><USER13> > the scoping is wacky (and the var trap is a disaster);

Read [http://bonsaiden.github.io/JavaScript- Garden/#function.scope...](http://bonsaiden.github.io/JavaScript- Garden/#function.scopes), be enlightened

<comment><USER14> Knowing what's going on doesn't change that it's all still unnecessarily very broken.

</comment></comment><comment><USER15> And yet nobody seems to be interested in Dart.

<comment><USER16> Dart VM will never be in IE , Firefox or Safari. What's the point of Dart ? to compile down to javascript? if i had to work with an alternative to JS i would chose haxe instead of Dart , since it is compatible with some parts of javascript and one can use the DOM api directly. Dart is great in theory but has little future.

<comment><USER8> > _Dart VM will never be in IE , Firefox or Safari._

Same deal with CoffeeScript or TypeScript. But that shouldn't stop anyone since you can just compile to JavaScript. Minifying Dart and compiling Dart to JavaScript is almost the same thing. In both cases it's a single line which calls the compiler. If you already doing one of those things, adding the other one to your build script won't hurt one bit.

You can also use the Dart executable like Node. You can use it to write command line applications or web servers.

You can also embed the VM into other applications. Like V8, the VM itself is just a library.

There will be also a Dart VM for ARM CPUs a bit later this year.

> _i would chose haxe instead of Dart , since it is compatible with some parts > of javascript and one can use the DOM api directly_

You can also interact with JS stuff if you use Dart. DOM stuff is done via 'dart:html', which provides a very idiomatic API. For example, all list-like things are actual Lists, which is very convenient. It's similar to jQuery, I'd say.

> _Dart is great in theory but has little future._

It's great in practice, too. If you don't care about IE8, that is.

Also, Google is committed to Dart. They are also already using it for a bunch of new projects.

</comment></comment></comment><comment><USER17> Most of Javascript feels like a kludge and my keyboard's 'T','H','I','S' keys need to be replaced every week or two. I always ponder, what if instead of JavaScript we had Java?

<comment><USER7> I just checked my small project, and it has 111 this. and about 300 lines with plentiful whitespace. This made me think how much better would it be if it used just single dot for referencing this. Like _.property_

<comment><USER18> I don't know if you've toyed around with CoffeeScript before, but that's something it adds in (you can use the Ruby-esque '@property' instead of 'this.property')

<comment><USER7> I had, but I abandoned it for reasons I cannot recall right now. Maybe because I like to go bare metal every time possible. But maybe I should give it a try...

<comment><USER18> I'd definitely recommend giving it another try. I'm generally very skeptical about adding another layer of abstraction into my toolchain, but I've found the benefits far outweigh the cost. Syntactic sugar like '@' aside, I've found that working in CoffeeScript enables me to write code that's far clearer and more expressive than when I'm working in vanilla JS.

</comment></comment></comment></comment></comment><comment><USER19> The biggest weakness is missing - it is not statically typed.

<comment><USER2> Nobody considers this a weakness. For reasonably small values of "nobody".

</comment></comment><comment><USER20> Oops, I think the author meant to have _copy[key] = val_ for the last line of this example:

      copyObject: (inputObject) ->
        copy = []
        for key, val of inputObject
          copy.key = val

As written, it uselessly sets a bunch of values to the _key_ property in turn.

The point stands though.

</comment><comment><USER21> Rename to "what's wrong with coffeescript" and this blog post might approach accuracy.

</comment><comment><USER22> ">thing: -> > @_thing ?= new Thing

..is … irritating."

So... having one sigil to distinguish a class variable isn't irritating, but another for a variable accessed by an accessor method is. Got it.

> It's tempting to presume that this is a 'feature' of prototypal inheritance

Why would this be tempting? As the author points out, there are prototype- based languages that avoid it, and you could remove prototypes from JavaScript and still encounter the issue.

> we're not writing Java. We're in a highly dynamic language. We want nice > things. Or, we could create setters and getters using the new ES5 syntax – > but that's not available everywhere (pre-IE9, for instance), and, I would > argue, is too unwieldy to apply as a rule.

You want an easy way to create accessors? OK:

      function prop(name,gNs) {
        function undef(v) { return typeof v == 'undefined'; }

        var _name = '_' + name, get = gNs && gNs.get, set = gNs && gNs.set;

        if(get && set) return function (x) {
          return undef(x) ?  get.call(this,this[_name]) : (this[_name] = set.call(this,x), this);
        }

        if(get && !set) return function (x) {
          return undef(x) ?  get.call(this,this[_name]) : (this[_name] = x, this);
        }

        if(!get && set) return function (x) {
          return undef(x) ?  this[_name] : (this[_name] = set.call(this,x), this);
        }

        return function (x) {
          return undef(x) ?  this[_name] : (this[_name] = x, this);
        }
      }

You're welcome. Use it like so:

      obj = {
         thing: prop('thing')
      }

when you want your accessors to do something other than getting/setting:

      obj = {
         thing: prop('thing', {
            get: function () { return foobarled(this._thing); },
            set: function (x) { this._thing = unfoobarled(x); }
         })
      }

> What we're really saying is 'everything is a hashtable'. Is that a good > thing?

I'm more sympathetic to this criticism. There's times when the fact that everything can have arbitrary properties is convenient, but it does place some burden on the developer to pay attention.

Then again, I think that's a general charge to which any highly dynamic language is going to have to answer on some point or another. And if you're prone to typing `[]` when you mean `{}` (understandable if you've come from a language where they have different meanings), it's possible you should do the more conspicuous thing and use `new Array` and `new Object` instead.

> Nothing is an object

No. What the author is really talking about that by default, there aren't "methods" with class-bound scope. Just functions whose `this` scope is dynamic but does live by some pretty understandable rules.

> _missing

Missing method's sometimes convenient, and there are occasions when I miss it in JS too, but it's much rarer than I once would have thought. Use cases in languages where functions are less often let out on their own tend to get taken care of differently in languages where they do.

> I've yet to hear anyone convincingly argue that JavaScript's version of OOP > offers anything in addition to or distinction from more traditional > versions;

"convincingly"

Convincing who?

<comment><USER2> > _So... having one sigil to distinguish a class variable isn 't irritating, > but another for a variable accessed by an accessor method is. Got it._

I'm not sure you did (get it).

One is part of the language's syntax. The other is an ad-hoc convention you have to remember and check for.

> _You 're welcome. Use it like so: obj = { thing: prop('thing') } when you > want your accessors_

My eyes. The goggles, they do nothing!

>(I've yet to hear anyone convincingly argue that JavaScript's version of OOP offers anything in addition to or distinction from more traditional versions; "convincingly" Convincing who?*

The author. Isn't it obvious? Also me. So make us two.

And presumably ALL the other people that write frameworks and workarounds to get traditional OOP style in Javascript.</comment></comment>