Hacker News new | past | comments | ask | show | jobs | submit | retrovm's comments login

You know I think that cloudflare blog post is a great example of the engineering approach behind boringssl. It's optimized for actual workloads, where you decrypt or authenticate a short message and then move on to different activities, and engaging AVX512 doesn't actually pay off in reality. OpenSSL is optimized to produce the biggest number from `openssl speed` so of course in that light it makes perfect sense to enable AVX512. But if you're trying to use these libraries in realistic workloads you will begin to appreciate the boringssl approach.


No, it's just a lot smaller. A 12-foot-wide tunnel is, shockingly, much cheaper than a 21-foot-wide tunnel. It also has essentially zero capacity, much like a hyperloop. If you want to punch useless holes in the earth, Elon Musk is your man without a doubt.


According to an analysis I saw on youtube somewhere, they were able to find companies that dig similar sized tunnels (Boring Co. is just using off the shelf tunnel digging equipment.) They were running comparable if not a bit slower than similar projects that have been done many times before.


This is the most important factor - the amount of people such a tunnel can move is borderline insignificant, compared to a proper subway with a train.


San Diego actually passed an ordinance requiring scooters to geofence speed limits of 8MPH in many areas. See https://www.kpbs.org/news/2019/jul/01/dockless-scooter-regul...

It's a great idea and they should absolutely expand this regulation to cars.


Not sure why you were downvoted, the geofencing was necessary because of the beach boardwalks which lead to at least one death: https://www.kpbs.org/news/2019/jun/24/man-dies-san-diego-boa...

Also - last week Lime announced they were pulling out of SD: https://www.kpbs.org/news/2020/jan/09/no-more-lime-scooters-...


I think 15mph makes a lot more sense having ridden at 8mph.. the Scooter is barely stable at that speed, but yeah limiting cars to a speed that's more like 2-3x that rather than 5x would make the slow speed much more safe.


Many of the areas that were governed to 8mph were very popular boardwalks, after many people were injured and an older guy was hit and died. The convention center is more nuanced, because lots of it is heavy traffic street. But there is no reason a scooter needs to go even 8mph on the boardwalk, imo. Often times people are on them in groups bombing by you, and if you're trying to just go on a walk and enjoy the beach with kids or dogs its kind of lame.

If it's being used to commute, you can go literally 60 feet inland and go as fast as you want.


Maybe I was just in an unfortunate spot, but much of my journey from my hotel to the convention center was limited to the low speed. Would require multi-block detours to get to full speed. I agree the boardwalk makes sense at 8mph (or anywhere that there's mixed pedestrian traffic), but whatever that main road is had the restricted speeds too which felt too onerous with the much higher speed traffic along side.


E-scooters instantly dominated the market share of shared micromobility when they debuted in the USA in 2018. https://usa.streetsblog.org/wp-content/uploads/sites/5/2019/...


I have a suspicion that our industry harbors an above-average number of bicyclists.


I agree. I was just joking. I've been enjoying biking more the past year especially. There's some really great bikes these days.


You need a special license for mopeds in many jurisdictions, they weigh 100+ pounds, double what an e-bike weighs, and because of the fuel system you can't really just carry it up the stairs and leave it in your kitchen at night.


Dang, they are known are liquor cycles where I am from... on account of people with DUI charges being able to use them still.

Agreed on the second point.


Helmets are for sports. Ebikes have a ~50% market share in Belgium where approximately nobody wears a helmet ever. It's really not an issue.


Helmets are for any activity that has an impact risk to your head which includes cycling not just sports.

I live in Austria where few cyclists wear helmets yet my girlfriend who works in the local hospital sees patients coming in with serious head injuries on a daily basis from biking accidents that could have easily been prevented by wearing a helmet. Since then we both wear our helmets religiously.

You don't even have to get hit by a car. An unfortunate collision with a texting pedestrian, some dog on a leash jumping in front of you or another cyclist could be enough to smack your melon on the asphalt.

Just because you hear Europeans aren't wearing helmets doesn't mean it's the model to follow. I see wearing a helmet the same as wearing a seatbelt. Sure I never needed it since I never had an accident and it feels slightly uncomfortable but I know it could save my life.

It's up to you how much you value your head.

I highly doubt ebikes have a 50% share in Belgium. Do you have any references on that claim? Last year I visited Belgium's 4 major cities and almost every cyclist I saw was on some old half broken bicycle.


I think the biggest reason people don't see a bicycle helmet as necessary is from personal experience. I grew up on the 70's, long before kids helmets were in vogue. And I had several bicycle accidents.

Once I hit a curb, went over the handlebars, and skinned up my hands/knees and my wrists hurt pretty bad for a week or so after. Another time I wiped out at the bottom of a hill, tore a huge gash in the side of my knee. Then there was the time I chipped a tooth on a curb when trying to ride no-handed.

In all the falls I experienced, none of them involved a head injury that a helmet would have prevented (the chipped tooth incident could have been prevented by wearing a mouth guard, or by not being stupid). So based on that, it feels like helmets are useless.

Of course, in reality there is a huge difference between a kid riding a bicycle at single-digit MPH on neighborhood streets and back-woods trails, vs. going 15 - 20 MPH on roads or paved trails. At those speeds, it would probably be impossible for me to break my fall using just hands and feet, not to mention the possibility of getting distracted hand running into a street sign or tree branch. Logically I'm aware of all this, but still I have trouble with maintaining proper helmet discipline.


Your anecdotes of falling without hitting your head aren't very relevant. And if you had such an accident, you might not be capable of posting here.



Does this logic extend to showering, pedestrians, and automobile passengers and drivers? All suffer as many or more head injuries per year than cyclists.


They may have more head injuries than cyclists(citation?) but unlike cyclists you're not at risk of being run over by a car after a fall in your shower and also you're probably not showering at 25km/h when you fall so the potential damage is much lower.


here: https://bmcemergmed.biomedcentral.com/articles/10.1186/s1287...

analysis: https://www.treehugger.com/bikes/why-dont-americans-wear-hel...

A head injury that results from speed or post-strike collisions is still recorded as a "cyclist head injury" so I don't think your points change the numbers.


Granted more suffer from shower injuries but how severe are the shower injuries vs biking?


That's an excellent question. Another is, how many more injuries (head- and non-head-related) are caused by the increased recklessness that drivers engage in around helmeted cyclists? https://www.forbes.com/sites/carltonreid/2018/11/14/motorist...

Please note, I'm not trying to argue against helmets. The point is that arguments over helmets deflect the conversation away from the people sailing around recklessly in two ton metal boxes. Every time there’s a collision involving a cyclist, the question is "was he wearing a helmet?", not, "was the driver paying attention?"

The safest places to bicycle are in the nations where there's the lowest rates of cyclists wearing helmets. This is a car problem, not a bicycle problem.


Austrians use bicycles a lot more rigorously, but there is still a resistance to 'being told to wear a helmet' .. alas, it only takes one fall to demonstrate convincing evidence for why one should always, always, always wear a helmet.


Does anyone have head injury statistics? I know falls are a major cause of preventable death in the US, but I don’t even know how those break down between someone on a bike vs an old person falling over.


It's not just about death, it's also about brain damage. A broken bone is NBD compared to a TBI with often permanent damage.

You can lock helmets with bikes if you want. I used to lock my helmet with my u-lock on my bike, so if they cut off the helmet, then it isn't a very useful helmet. I now bring it with me in my bag mostly for hygenic reasons although.


Personally I would avoid locking a helmet up like that.

Expanded foam helmets are fragile by design. They are design to be disposable with even small knocks. So even accidentally banging them against your frame, dlock or solid post is a bad idea even if you can’t visibly see any damage.

You’re recommended to replace them at regular intervals also due to sweat damage.


That isn't much of a solution in practice. No helmet manufacturer puts best after dates, other than in fine print nobody reads and practically nobody replaces helmets unless they see visible damage.


Yep totally true.

Then again 3cm of expanded polystyrene foam vs a metal box with a engine in it... probably like a surfer forgetting to replace their “anti-shark bite” medallion anyway.


Another alternative: https://hovding.se/

Very popular here in Sweden. A little easier to stuff in your bag.


I hate that HN is a place where the ignorant simply flaunt their ignorance instead of trying to inform themselves.

"According to the Velofollies survey as well as other sources last year’s [2018] e-bike sales stood at slightly over a quarter million units; some 251,500 to be more precise. This accounts for a big 14.3 percent growth compared to the total of the year before. It makes electric bicycles by far the biggest category of the Belgian market with a market share that stands at close to 50 percent."

https://www.bike-eu.com/sales-trends/nieuws/2019/07/market-r...


According to your source that's 50% share of new bike sales in 2018, not market share of all bikes in Belgium. Not the same thing.


[flagged]


To add context to your downvotes, it is clear that the author you cite used "market share" in an unusual way (possibly due to a language barrier), since there are certainly more than ~503,000 bicycles in the whole country of Belgium.


[flagged]


What would help your case (with regards to downvotes, and for your words to have greater impact) is to convey additional information instead of just repeating the same thing. For example, you could state that "Market share reflects sales of an item over a fiscal period -- which is different from installed base, which reflects the percentage of units that are in current usage". You can even include a pointer to a reference, such as https://en.wikipedia.org/wiki/Installed_Base.

This way, even if you are technically correct, you can better convey knowledge when it appears that communication isn't occurring.


[flagged]


Please stop.


Cultural differences in traffic management. In the US, bicycle infrastructure is sparse outside of dense urban cores (and even then, it can be spotty). That leaves many cyclists sharing roads with higher speed auto traffic.

Also, the style of bicycle is often different. Hybrid and town bikes are far less common the US than Europe. I suspect that an easy-step over, big tire, upright town bicycle is easier (and this safer) to use.


You don’t need cars in order for a helmet to be important.

An acquaintance of mine was killed running into a slightly raised piece of ground that he didn’t see... wasn’t wearing a helmet and was thrown over his handlebars. Doctors say he would have walked away if he had been wearing a helmet.


Absolutely. But, there's a risk analysis - if there's good bike infrastructure, and I'm riding townie bike (slow and can put feet down vs a road racing bike), the risk is much lower.

There's also evidence that requiring helmets reduces cycling among the general population. Partially because it's an extra thing to buy/maintain, but it also creates more work for commuters - they have to redo their hair at the office.

Residents of Amsterdam don't seem to wear helmets at all, except for high-speed training rides/racing. And they seem to do ok like that.


A few things though.

1)Most cities suck at biking infrastructure, including Europe if you exclude the poster childs like Amsterdam or Copenhagen.

2)It's not wearing a helmet that reduces cycling throughout the population it's the lack of infrastructure. Helmet necessity is a direct effect of that not the cause.

3)You can't make helmets a requirement, it's up to you if you can live(pun not intended) with the consequences of an accident without a helmet or not.


Australia actually did require helmets for all cyclists. And cycling rates went down.


Bummer, but at the same time it's hard to argue with a measure designed to save lives. If seatbelts wouldn't have been compulsory for decades I think people would have a hard time accepting them as mandatory.


Helmets are a lot less convenient than seatbelts. They have to be stored somewhere, locked to your bike hopefully, and people will still screw with them just because they can. Then you have to put it on your head and somehow get it to be comfortable and not mess up your hair before you arrive at work. None of this is really bad for American biking culture: biking is a serious affair with its own work out clothes with a probable shower if they are going to work anyways. It isn't like Amsterdam where you just kick off in your suit and arrive at work.


> it's hard to argue with a measure designed to save lives.

No, it's easy to argue because cars inarguably cause way more deaths than bikes. So when people switch to cars from bikes, it's indirectly killing more people. Any measure that prevents bike use leads to more deaths.


The article I read (this was a few years ago) wondered if the reduction in cycling (due to helmet laws created on safety grounds) actually ended up with the opposite effect. Fewer people outside cycling, more people in cars creating smog and getting fat. They didn't provide any data, just posed the question. I can certainly envision circumstances where that would be true, but you'd have to already have a very safe cycling culture (Amsterdam), I'd think.


I don't really care for government safety rules like these in general. And I totally get that biking is relatively safe in places were it's deeply ingrained to the culture like Amsterdam. I still cringe at least a little bit though with pics like this. (from Amsterdam)

https://flic.kr/p/WRp6js


I cringe when I see obese American (and often British) children in a huge car being driven to school etc, and all of us breathing their fumes.

There's potentially more damage from that, to society.


By that logic, shouldn't all cyclists wear a DOT rated motorcycle helmet? I'm pretty sure those flimsy bicycle helmets most people wear aren't rated for vehicular strikes.


Probably? And leathers too. But, pedaling in August heat in a closed helmet and heavy armored suit isn't easy.

Mostly, I'm suggesting better bicycle infrastructure is one reason people may be less likely to wear helmets in Europe vs the US. And not making any claims about how safe a helmet in the US actually is or is not.


Yes and there’s an analogy here between car commuters and car racers. We don’t expect “normal” car drivers to wear helmets. But professional racers absolutely wear helmets. Even in the case of commuters, a helmet could save your life in an accident. For any drivers who thinks bike commuters need helmets, I would encourage you to also get car helmets for you and your loved ones: https://www.amazon.com/RaceQuip-253116-X-Large-Helmet-SA-201...


This is a terrible argument it is not a one to one comparison.

If you are shunted in the rear on the way to work in your car you might have a inconvenient morning and an insurance claim. If the same thing happens on your bike you could quite literally die from a head injury.

I skated for a long time and didn't wear a helmet because of comfort/looks. I've become a bit more wise since and won't share the road with cars without my helmet when I'm cycling


If you get “shunted” from behind by an SUV, 3cm of expanded polystyrene foam is going to make FA difference to the outcome.

Bike helmets are designed for low speed crashes NOT involving vehicles.

Now I still wear one myself but I don’t fool myself that doing so brings me any protection from someone driving an SUV who thinks they’ll be late getting to a 24 supermarket if don’t just squeeze by me.

It’s like putting an oven glove on an egg and hitting it with a hammer.


Just incase anyone wonders why I wear a helmet when I think they’re as useless as “anti-volcano spray”, it’s because they make my head a more aerodynamic shape.

A quick look a Strava’s stats will show you that even weak club cyclists like me, living somewhere pretty flattish, can already cruise about at over 20mph pretty easily.

Pedal assist ebikes just expand that ability to a wider number of people.

Just look at the number of people who regularly crash in amateur crit races.

We generally survive non-vehicle related crashes at these speeds pretty well and people on ebikes will too.


In my personal experience the top dangers on a bike come from the side. These are the things that happen to me at least once a week:

- Driver mergers in to me too soon

- Passenger or driver opens door in to my path

- Driver making turn cuts me off and I have to swerve or brake suddenly

- Driver does a right-hand hook across bike lane to make a right turn.

In almost all these cases I’m going to be crushed by a moving vehicle. A helmet won’t save me.

As for being rear ended... I’ve personally never felt like I had a “rear end” close call on a bike.


Ironically these are the same dangers bike poses to pedestrians

And with the boom of food delivery,mostly done by bike, the situation got a lot worse

Just two hours ago a guy working for glovo merged on the sidewalk while I was trying to cross on the zebra walks and almost hit me.

He was using one hand, wasn't looking, with the other hand was speaking at the phone and didn't stop at the red light

No need to specify they are not allowed on sidewalks, but who's gonna fine them?

It happens constantly, but bikers usually think that cars are to blame, when cars usually let me cross when the light is green, they usually stop at the red light and they usually don't ride on the sidewalk

Give people bikes that can go at 30km/h and you have the recipe for a disaster

We already have regular and e-mopeds but at least they are heavy regulated and need a mandatory insurance (at least in Italy)


I regularly call out bikes who don’t give the right of way to pedestrians in the crosswalk.

That said, unless someone is already frail being hit by a bike is nothing like being hit by a car. I’ve had two red-light running bicyclists crash in to me (once while biking, once while skateboarding). I’ve also been in three separate cars that got rear-ended (none of those times was I driving). The level of pain is an order of magnitude different.


> being hit by a bike is nothing like being hit by a car

You're completely right!

Cars are engineered to reduce the damages of a direct impact.

Bikes are not.

https://en.wikipedia.org/wiki/Pedestrian_safety_through_vehi...

Studies agree that the damages are mostly caused by speed

https://www.ncbi.nlm.nih.gov/pubmed/24435732

E-bikes can go at very high speeds (30km/h is more than enough to be deadly) and can do it effortlessly, which means the even bikers that aren't expert can go at such high speeds, increasing the risk of hurting someone else or themselves.

Add to that the fact that a car can break or avoid obstacles in a much more efficient way than a bike could ever do (think about heavy breaking with a bike at 25 km/h under heavy rain on the pavet and then think about it on a car).

I'm not a supporter of cars, I've been car free for a few years now, but I don't think bikes are less dangerous for pedestrians.

There are simply less of them around.

> The level of pain is an order of magnitude different

The maximum level of pain I suffered was because of my bad teeth

I was in a very bad car accident (a tire detached from my car while driving on the highway and I lost control), the pain was a joke compared to that.

Pain is not a strong indicator of dangerous physical damage.

For example internal bleeding is usually painless.


And yet how many people die from being hit by bikes? It's barely even an issue. Even in European cities where you can step on the wrong side of a sidewalk and instantly get smashed into. It's an imaginary problem.

>Add to that the fact that a car can break or avoid obstacles in a much more efficient way than a bike could ever do

That's obviously false. Just consider the stuff that BMX bikes can do in terms of maneuvering. Or even normal bikes. Try driving on a car through a busy pedestrian street. On a bike it's a piece of cake, and you won't have to stop even once.


> And yet how many people die from being hit by bikes? It's barely even an issue

First of all, it's all in the news, I'm not making things up

https://nypost.com/2019/08/31/nyc-bicyclists-are-killing-ped...

Or you can look at this, specifically the chapters "Cyclist Deaths and Impairment", "Cyclist Helmets Statistics" and "Staying Safe while Cycling"

https://bayareabicyclelaw.com/safety-laws/bike-stats/

and we don't have enough data (AKA it's not been collected until few years ago) to say that "it's barely even an issue"

Secondly, bikers most of all kill themselves.

"One in five people injured on Australian roads and paths is a cyclist, according to a new Australian Institute of Health and Welfare report"

https://www.aihw.gov.au/reports/injury/pedal-cyclist-injury-...

Is it because of the road conditions, the presence of cars or other vehicles?

Or is it because cyclists underestimate the risks?

According to the same study, motorcyclists only account for 2.7% of the hospitalizations.

They share the road with cars as well, they go faster than bikes on the same roads.

What could be different?

Could it be that the safety measures engineered in motorbikes and the safety measures motorbikers take to protect themselves are actually useful to reduce physical damages?

Even Netherlands has a big problem with bikers dying more than ever because of underestimating risks.

https://www.iamexpat.nl/lifestyle/lifestyle-news/death-toll-...

> That's obviously false. Just consider the stuff that BMX bikes can do in terms of maneuvering

An expert biker on a BMX you mean!

If I give a BMX to my mother, 71 years old, she couldn't even ride it.

It's like saying "now look what this rally pilot can do on terrain with their fine tuned 4wd monster car"


If you stop a moment and think carefully, you'll realize that normal car drivers should wear helmets, and passengers too.

It's just that piloting multi-ton metal vehicles at bone-shattering velocities has been normalized. It's always been insane and deadly, but there was an actual concerted effort to normalize it and that worked. I'm not even joking. "Speed demons" were replaced by "Jay walkers" and people have been getting maimed and killed ever since.

"The Real Reason Jaywalking Is A Crime" (Adam Ruins Everything) https://www.youtube.com/watch?v=vxopfjXkArM


> If you stop a moment and think carefully, you'll realize that normal car drivers should wear helmets, and passengers too.

If you stop a moment and think carefully, they already do!

it's called airbag and it's been a required safety feature for more than a decade now...


Good point. :-)


Helmets in cars aren't without issue, though. They restrict your vision and situational awareness via hearing. I was a rally driver for about 10 years, and the MSA (UK Motorsport body) banned drivers on road sections from wearing helmets - both because it was a PR nightmare, but also because of the issues with vision (in full face helmets) and hearing (although I appreciate many people have loud music on in cars, or wear headphones, etc).

Also, you really -want- to have a helmet on in a race car - you'll typically have an unpadded roll cage right by your head, and the FIA-approved padding for roll cages is designed to work well with helmets, not with heads. I used to dread long road sections on rallies as I knew that an accident would be a real mess if there was any contact with the cage. There's more room in a road car, and there's padding / airbags etc to cushion you from impact on hard structures.


As a dutchman who spend some time working and commuting in the SF bay area: Commuting on a bike without a bright yellow helmet and a combination of flashing lights that rival an emergency vehicle is basically suicidal behavior.


Sure with a 250w ebike and no cars go nuts.

I have a 1500w motor and share a road with semi trucks


And that's why it's disingenuous to frame cycling safety as a binary that's contingent on whether or not a particular cyclist is wearing a helmet. The risk equation for you is vastly different from someone who hops on their cruiser bike to go 10 blocks on a protected bike trail to the grocery store.

Once you factor in all the variables, the helmet is only a small part of the equation, and probably not going to do you much good should you find yourself under the wheels of a semi-truck. Yet having that piece of styrofoam strapped to your head has given you the (possibly misplaced) confidence to go fast with semi-trucks.


Not to mention that it dehumanizes you in the eyes of drivers.


That's classified as an electric motorbike in the EU, if it's a legal, registered vehicle. You need the appropriate driving license and insurance to drive one.

Alternatively, if it's a modified bicycle, it's simply illegal on public roads.


The helmet isn't going to protect you from semis, unfortunately. Here in NYC most cyclist deaths are caused by being run over by larger vehicles, which can easily be fatal even at slow speeds regardless of whether you're wearing a helmet or not. No helmet is going to support the weight of a truck.

Now I do wear a bike helmet when biking for other reasons, but I give trucks wide leeway.


You're welcome to wear whatever you want while riding your illegal whatever-you-call-it. Don't scold the rest of us.


You seem very defensive in your position of advocating people be less safe on their bikes. Quite odd. Anyway, good day. "There is good evidence that bicycle helmets are effective in reducing head and facial injury in the event of a crash [...]" [0]

0. Ivers R. Systematic reviews of bicycle helmet research. Inj Prev. 2007;13(3):190. doi:10.1136/ip.2007.015966 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2598379/


The evidence in favor of wearing a helmet while in a car is just as strong, but nobody is up here advocating for that.

By the way, helmets on bicyclists tend to make car drivers behave like even bigger jackholes than usual. https://psyarxiv.com/nxw2k "... public health research might be best served by shifting focus to risk elimination rather than harm mitigation."


The argument could be just as strong, but since very few people wear helmets in cars (only Formula 1 etc.), I think it's unlikely "the evidence" is just as strong; however, by all means provide us a reference.


Are Belgians really doing 28 MPH on a regular basis?


I think ebikes are limited to 25km/h (15mph) across the EU. That's a speed a commuter might reach on a regular bike on flat terrain, the motor just helps making it effortless and terrain-independent. It's still advisable to wear a helmet since cars drive faster than that.


There are eBikes which can go up to 45km/h. For those wearing a helmet is mandatory. They also have number plates and you have to have a dedicated insurance.


In British English, that's called an (electric) moped.

EU vehicle category L1e, if you want to look up the exact word in your own language.


Not exactly. Electric assist should stop above 25km/h for the ebike to still be considered a bicycle (and be allowed on bike lanes, etc.); but it's not hard to go above that speed when going downhill for example, and not against the law (provided you still respect the speed limit for the road you're on).

I don't think there are specific speed limits for bike lanes, or bikes, anywhere in the EU (but of course I could be wrong).


I commute to work with my regular, non-e bicycle, sharing the road with cars. I wouldn't dream of not wearing a helmet, even at "just" 25 km/h, though for most of my commute I keep speeds above that (up to 50km/h).


Same here.

My 18 miles commute is 2 miles of sleepy suburban traffic and 16 miles on the SF Bay Trail (IOW: flat dirt track with no cars allowed.) Even if it were all dirt track, I'd still be wearing my helmet.


It's adorable that you think batteries and dual PSUs are something that makes a node more reliable, rather than less reliable.


What's the point of dual PSU if not reliability?


I'm not sure what the point is, actually. The variety of things that can go wrong with them is astonishing. For one thing, among many others, BMC cards will power-cap the max clock speed of CPUs when a machine is running on only one PSU, which can cause a degradation that's worse than if the machine had just halted. There are a zillion other edge cases like that.


"no real need to make your implementation more complicated than a single array"

That's our industry in a nutshell. Our computers, instead of becoming more capable over time, can barely keep pace with the increasing naivety of our programmers.


Yes, this is engineering in a nutshell: determining a course of action within a set of constraints that meets your objectives. Where constraints can be time, cost, physical limitations (processor speed, memory size, disk space), etc; and objectives can be functional (user can edit files), nonfunctional (user can edit large files in < X seconds, energy usage), personal learning, or any number of other requirements.

The GP offered a valid decision point to consider based upon what an engineer is solving for. I don’t think he said that an array was the solution he’d ship in a production text editor to millions of end-users.

Engineering is hardly naive. :)


Actually, that's exactly what I was saying --- plenty of existing text editors use the "stupid" single array, yet no one complains about their performance.

One example? Notepad.


Notepad is notepad because someone, god bless their soul, had the sense to put new features into a different app as Wordpad.

In some terrible, dark dimension, Notepad has a ribbon interface and supports PDFs.


Just because people tend not to edit large files in Notepad doesn't mean they'll complain about it when they do. Actual complaints are of course sparse because hardly anyone uses Notepad for anything serious if they can use an alternative. BUT when they do, oh they will complain.

I believe an older version of Notepad even had a (fairly low) limit on file size it would open.

I mean that's the reverse argument, computers have gigabytes of memory today, and are super fast, so you should be able to load a multi gigabyte text file and edit it, on a single line, with word wrapping.


In webdev, increasingly often, the expectation is that programmers not only to do the backend, but also the database management, the frontend (which used to be graphic design, css/html, and js, separately) and everything devops.

Outside of webdev, Unity springs to mind, as another great example of this: The stuff you can do as a single game developer is mind boggling, or at least used to be, until indie devs everywhere started boggling our minds on a daily basis and thus raising the standard of what consumers expect an indie game to be.

This is, of course, not possible because within 50 years humans evolved to be a lot better or smarter or faster than their predecessors. It is made possible through more flexible higher level tooling, that you don't have to understand the inner workings of to take advantage of, and more abundant computing resources, that in tandem, enable work that will be in the "good enough" territory for most use cases.

This is also not a choice that programmers as individuals or even a group make. It's a choice that the market makes.

There is nothing naive about it. Naive is assuming, it would be any other way.


In web dev I have observed the opposite trend: when I first started my career everyone was expected to be full stack and know how to deploy a thing. nowadays devs tend to be strictly front end or back end or dev ops, etc. Devs that can optimize a sql query, model a db schema and then write a well organized react or angular front end seem to be the exception not the rule.


> In webdev, increasingly often, the expectation is that programmers not only to do the backend, but also the database management, the frontend (which used to be graphic design, css/html, and js, separately) and everything devops.

What do you mean, increasingly often? This was the case 15 years ago already and I see only examples that it has gotten less, because of all the frameworks that exist.

Also it's exactly what I liked about webdev. When your existing talents for graphics design and explainer-of-technical-things shine in a tech context, that feels good. A lot of programmers have no feel for this, and a lot of designers write awful code. Which could have, but historically did NOT improve at all with higher level tooling, mainly because of this "good enough" attitude. Feel free to prove me otherwise, but what did happen: Thanks to things like Bootstrap, now programmers can avoid the worst design mistakes without having to learn design. Graphics Designers, however, well .. I don't know? Are there tools that allow them to write or generate code that doesn't suck? (Without programming skills, like the coders without design skills).

> This is also not a choice that programmers as individuals or even a group make. It's a choice that the market makes.

> There is nothing naive about it. Naive is assuming, it would be any other way.

I don't know ... Do you believe there no longer exist people that deliver quality over this entire skill set? Or that they somehow exist outside of the market?


People jump for complex and overly optimized solutions too quickly, IMHO. From a conceptual perspective, I enjoy these sort of challenges but that's where it ends.

For product demands where deadlines are constantly unrealistic, underfunded, underscoped and demands are ever changing, I'm a fan of providing the simplest conceptual solution to the task at hand and not focusing on developing complex abstractions and optimizations too early.

From my experience, that time is typically wasted until functionality is zeroed in and real money is available to pay for the work, as the early complex abstractions typically fail to meet pace with demands and the optimizations break when ever changing requirements.. change. That's just my experience, YMMV.


Are you suggesting that it’s bad to use the simple uncomplicated approach because it’s inefficient, or that it’s bad to add layers upon layers of complexity which end up bringing modern computers to their knees?

Personally I’m in the latter camp. There’s so many layers of abstraction nowadays which each in theory make programming better/safer/easier which in practice end up creating an incredibly inefficient mess.


Complexity != abstraction != leverage.

Today's software suffers from too many layers of complexity that are each pretty dumb and serve mostly bookkeeping. The result looks like an overinflated bureaucracy. In the example above, using a more efficient data structure for text representation will add at most one layer of abstraction (but there's a good chance you'd create that layer to hide the array anyway), but offer significant benefits in terms of performance, at a cost of little and well-isolated complexity.

This is the best kind of abstraction: complex, deep behavior hidden behind simple interface.


Same. I generally write in C without too many layers between my code and the CPU, and it is just incredible how fast modern CPUs are with naive code that doesn't even attempt to be optimal.

I wish others understood that, because the things I work on are losing performance (and a massive amount of developer time, which could be used for optimization or other useful work) to excess complexity, not too simplistic code.


Vim is 25 years old. Efficient text-handling data structures aren't newfangled gobbledygook.


And vi is even older. Plus ed...look at the release date.


Yet if you read the rest of the comment you would realize this specific use-case (editing text) was done fine with a single array buffer when computers had less than 1mb of memory to work with.

This is a perfect example of when it’s stupid to keep optimizing.


How does 1mb computer keep a 2mb textfile in an array in RAM?


Do you have text files you need to edit that are that big?

I've opened files that big in a text editor before, but it was definitely the wrong tool for the job.


pointers?


I wish that were our industry. Instead, we make things super complicated and make them slower at the same time.

Let's take the text editor example. Let's say we use it to edit a large document. Is Moby Dick large enough? It's around a megabyte of (pure) text. Let's figure out a persistence solution. How about "we save the entire text to disk"? So a megabyte to disk. My laptop's SSD does (large) writes at 2GB/s. So the ultra simple solution could save the entire text around 2000 times per second.

That's a lot faster than I can type.


Your laptop's SSD sure, 2GB/s - that 5400 rpm laptop hard disk that your user has is writing at a measly 1mb/s because the disk is also being accessed by 5 other programs.

Now the user is either queuing up a bunch of background saves leading to overload or is forced to wait 1s per keystroke.

Well done!

I guess the simple solution then is to tell the user to buy a $3000 laptop just so it's capable of running notepad.


Hmm...Mac laptops have been SSD-only for how many years?

Anyway, even laptop drives are well over 40-50 MB/s these days, and any disk scheduler worth its salt will schedule this kind of write (one contiguous chunk) near optimally, so still 40-50 writes/s.

And of course, you queue these writes asynchronously, dropping as needed, so if you actually manage to out-type your disk, all that happens is that your save-rate drops to every couple of characters. Big whoop.

Also remember that this is Moby Dick we're talking about. 700+ pages, so something that vastly exceeds the size of the kinds of documents people are likely to attempt with a Notepad class application.

Last not least, this is a thought experiment to demonstrate just how incredibly fast today's machines are, and that if something is slow, it is almost certainly because someone did something stupid, often in the name of "optimization" that turned into pessimization, because doing Doing the Simplest Thing that Could Possible Work™, i.e. brute-forcing would have been not only simpler but significantly faster.


Raise your hand if just running your web browser has pegged your top-end, multiprocessor, high-mem system in the last month. Both Firefox and Chrome have for me.


I think that's largely due to JavaScript and its ecosystem of abstraction-bloat that has been mentioned in another comment here, along with the trend of "appifying" what should really be static sites. A static page that contains even dozens of MB of content won't stress a browser as much as a "web app" containing only a few hundred KB of countless JavaScript frameworks glued together --- despite the latter presenting a fraction of the actual content.


I use to read the blog on virtualdub.org (video capture and processing) and enjoy his rants on bundled library bloat. Virtualdub was small in footprint and great to use. So do programmers become reliant on scaffolding too much, or is it a necessity as you learn?


Why not both? I mean, I wouldn't say that it's actually necessary, but scaffolding exists to hide away the incidental complexities of the problem being solved, revealing the problem for what it is. Demonstrations of recursion and pattern matching tend to use the same problems because they're such a good fit that there's a very close correspondence between the high-level explanation of how to solve the problem and the code itself.

At the same time we ought to be aware of that scaffolding and how it works (or could work), and how to build such abstractions ourselves. Not just because all abstractions leak[1][2] and potentially introduce bloat, but also because it means I don't have to pull in another dependency to save me a page (or three lines) of trivial code. Or maybe because the "standard" solution doesn't quite support your use case (I can't count the number of times that I've rewritten python's lru_cache[3] because of it not accepting lists and dicts).

[1] https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...

[2] https://www.joelonsoftware.com/2001/12/11/back-to-basics/

[3] https://docs.python.org/3/library/functools.html#functools.l...


POSIX threads can be individually named. They inherit the name of their creator if you don't set one.


They can be named in Windows as well, and this author has made pleas for developers to do so.


The caveat being the developers who are careful enough to name their threads and implement good debug hooks aren't the ones you get called on to fix their code.


As an aside, POSIX/Linux thread names have a limit of 16 bytes, which means 15 characters plus NULL. Speaking from experience, this can and will bite you when you need the names the most, if e.g. they are long, have just one or a handful of common prefixes and their creation is not entirely under your control.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: