Risky hack could double access to ventilators - <AUTHOR> https://www.vice.com/en_us/article/qjdm53/this-risky-hack-could-double-access-to-ventilators-as-coronavirus-peaks <comment><USER4> This is really neat. It seems a lot of the risk is how specific lung capacities and conditions interact with the ventilator and how much oxygen someone needs. My question to any MDs reading this: how often do you have to tweak ventilator volume for patients using one? What is the feedback loop? Blood oxygen levels?

<comment><USER5> (physician here) Vents can be quite tricky to get right; primarily because as disease progression continues on many things change. We are always trying to balance the deleterious effects of the intervention (in this case, the vent) with the goals of care.

What most people don't know is that vents cause a lot of injuries on their own. (See ARDS). Hypoxemic respiratory failure is serious stuff, and it's almost always not the only insult we're dealing with. So, it's about balance.

In the feedback loop is a lot of things. Certainly, oxygen saturation is a core measure, but we are also thinking about things like hypercapnia (and acidosis); overall perfusion status (blood circulation); infection management; etc.

Gas exchange is important, but there are a lot of things that have to go right for the lungs to take oxygen in, get it into the right transport, and get carbon dioxide back out. You can over-optimize for any of those at the expense of the other (see: hypercapnia).

In short, it's complex and there isn't a solid formula that will work for every patient. It's actually the subject of a lot of debate on details (some of it quite passionate in our Critical care / pulmonology community). This is why we call it PRACTICING medicine ;)

<comment><USER6> What do you think are the risks of cross contamination in this setup (let's say, just for 2 people sharing one unit)? She mentions how, in a situation where you'd have to use this, they'd have the same infection. What if they have different secondary infections or different types of pneumonia?

The example of the Vegas disaster is different because they were all gunshot victims; they were healthy, but wounded. I hope we would never need to see if these would be effective.

<comment><USER7> MD here. There is an inhalation and exhalation tube for each patient; the exhalation tubes would be in continuity using the described configuration. However, at least for part of the transmission route, viral particles would have to move against flow. So there is likely some cross-contamination.

All that being said in the situation where this is deployed I think it would be a risk most providers would take.

</comment></comment></comment></comment><comment><USER8> Interesting. This has been done before (after LV shooting) but has conventionally been considered as an intervention suitable for treating mass trauma. That's because people who are otherwise in good health are easier to ventilate than people with stiff, non-compliant lungs caused by inflammatory viral ARDS.

Ventilating people with ARDS is hard. You have to use low, carefully considered tidal volumes and essentially allow the patient to be hypercapnic (CO2 higher than ideal), sometimes quite severely. You're doing a delicate dance between ventilating in a way the lungs can take and maintaining blood gases compatible with life.

<comment><USER9> As you say, we have many patients already in our ICUs who need ventilation, but aren't /difficult/ to ventilate.

Perhaps they could get the split ventilators and the COVID-19 patients could get their own?

<comment><USER10> Yes, but the demand projected for ventilators seems to exceed the entire existing supply, and obviously dwarf the uses for all other conditions combined.

</comment></comment></comment><comment><USER11> Have governments made orders (legal or purchase) for manufacture of ventilators by large scale companies?

Presumably ventilators are a relatively niche product - what's in them that the World's industrial complexes can't ramp up production of within a couple of weeks?

I imagine it's the pumps that's the limiting factor? Given humanity already has the working tested, established designs.

Can't governments requisition the design, turn the original factories in to test only, or construct and test, centres. Instruct the mega-corps, publicly, which parts they are to make and by when ...

In the West we throw away tens-of-thousands of highly engineered products every day; surely we can step up now?

<comment><USER12> I keep seeing people asking "Why can't we just quickly spin up technology X?" where this is here ventilators, otherwise vaccines, etc...

without much awareness of how much specialization goes into almost _every_ aspect of _every_ job. Hell, even fast-food workers-- a skilled grill operator at McDonalds -- take time to train up.

No, we cannot quickly undo the 20 years of systematic dismantling of our core infrastructure. We are in for a very rude wake-up call.

And then, once we are awake, and are dealing with our new realization on the complexity of our economy, where every part depends on every other part functioning, and trying to get this restarted with a significant number of the parts NOT working...

Then we realize that the economy is embedded in an even bigger system called "life on earth" which we have degraded and destroyed on a much larger scale than our economy.

If you think the weakness in our society which the virus uncovers are a big deal, you simply lack the full picture.

<comment><USER11> I see creation of a vaccine very differently to production of one of a range of existing ventilators.

There are many companies using things like 6D CNC machines with high accuracy that can essentially spit out a part for which there's a definition (and we can 3D scan parts to micrometer accuracy with laser scanners); many electronics companies can make "any" circuit to some extent (I'm guessing ventilators use generic components, some circuits might be generic - <USER2> valve controllers, whatever, certainly display controllers I'd expect to be generic). Parts like keys, cases, outside the gas flow/control path are probably injection moulds that factories could pop out a million of within a week (once the dies are duplicated).

A skilled grill worker takes a while to train, but any grill worker given McDo's recipe could make you a functioning BigMac in an hour. I'm not asking for a new product to be designed (one effort - opensourceventilator.ie - <USER3> doing exactly that, making a modified BVM system).

Still looks like production could produce output in weeks rather than months.

<comment><USER13> The problem isn't production.

It's mass automated production. Once you take the human out of the picture to get a machine to do the work you've now involved a programmer, CNC operator, roboticist. and an industrial engineer at a minimum just to get the rough task doable.

We could probably have a fully human operated production line up and going relatively quickly, but getting the machines all cut over and integrated so as to do it themselves is _hard_.

Look, thought experiment. You ever watch that show, "How It's Made"? They literally make entertainment out of watching the end result of the final outcome of integrating all of these stages of the fabrication process.

But if you have ever watched it, did it not strike you as interesting that they never seem to do an episode with regards to the production of the very industrial equipment automating the fabrication process?

They can't/won't because it is bloody hard, error prone, and freaking expensive. Once you've got it, you're gold, but it is by no means a short route getting there.

</comment></comment></comment></comment><comment><USER14> Is negative pressure ventilation any use in treating Covid-19? Iron lungs are easier to build than positive pressure ventilators. I imagine many HN readers could build something like a Both respirator[0] in their garage over a weekend. Using negative pressure ventilation might be a better option than trying to attach multiple patients to a positive pressure ventilator.

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

<comment><USER15> No, in the case of ARDS, you need positive pressure (especially "back pressure" during exhalation) in order to keep the alveoli open.

[https://en.m.wikipedia.org/wiki/Positive_end- expiratory_pres...](https://en.m.wikipedia.org/wiki/Positive_end- expiratory_pressure)

<comment><USER9> We are talking about negative pressure mechanical ventilation. Positive end expiratory pressure is just one way of splinting open alveoli. Maintaining recruitment and V/Q matching in ARDS can be achieved in multiple ways, including negative pressure mechanical ventilation.

<comment><USER15> Interesting, I'd be curious to know more. My understanding of NPV is that it's primarily useful in cases when the lungs are generally "functional" and some other issue is preventing adequate ventilation.

</comment></comment></comment></comment><comment><USER9> There are lots of problems with this, but I think it is possibly a better move than some of the home-built ventilators you see floating around.

I'm biased though: I've designed a 3D printed improvement on this idea that potentially allows you to ventilate multiple patients with different pressures: [https://www.prusaprinters.org/prints/25808-3d-printed- circui...](https://www.prusaprinters.org/prints/25808-3d-printed-circuit- splitter-and-flow-restriction-d)

<comment><USER7> Fellow MD trying to help with engineered solutions.

Perhaps check this out as well; someone used a common valve from a hardware store to titrate pressures up and down: [https://www.youtube.com/watch?v=eSVbwWANqRI&feature=youtu.be](https://www.youtube.com/watch?v=eSVbwWANqRI&feature=youtu.be).

I've been thinking about how we might increase ventilation to one part of the circuit if the pCO2 drops too badly--any thoughts there?

<comment><USER9> Thank you for pointing this out! I'm trying work out how to get in touch with this guy, unfortunately he has turned off all comments.

I'm not sure I understand your question: do you mean if the one patient is getting hyperventilated? My suggestion is to set the pressure settings to ventilate the poorly compliant compliant lung, then use the flow restrictor to compensate on the more compliant lung.

</comment></comment></comment><comment><USER16> I thought I remembered reading somewhere recently that 2:1 is already in use in some cases (maybe in Italy?), but I can't find a source.

Is there increased risk of ventilator failure with this approach? That seems like it could be an additional terrible factor to weigh, because parts have become so scarce.

<comment><USER17> The 2:1 setup was used to save lives after a mass shootings in Las Vegas a few years ago. They paired patiets of similar size, put them on the same ventilator and double the flow rate.

It was mentioned in a blog post by an ER physician linked from hn back then.

<comment><USER18> The article for the interested. It's a tough but good read.

[https://epmonthly.com/article/not-heroes-wear-capes-one- las-...](https://epmonthly.com/article/not-heroes-wear-capes-one-las-vegas-ed- saved-hundreds-lives-worst-mass-shooting-u-s-history/)

</comment></comment></comment><comment><USER19> I encourage anyone wanting to help to try and finds ways of manufacturing the essentials of PPE that we need to limit spread, as that will have a much bigger impact. Every hospital and clinic in my area is running out of masks (both N95 and surgical), gowns, plastic goggles and starting to get into issues with disinfectants. Having double ventilator use is a nightmare scenario for various reasons. There are much better proactive things you can make and donate, but please reach out to your local clinic or hospital and ask first if they have guidelines or material information on what they need before assuming.

<comment><USER20> It would be good if they found a way to decontaminate the masks so they could be reused a finite number of times, instead of treated as totally disposable. As far as what I've read, there are many things that can kill the virus: hydrogen peroxide, alcohol, uv sanitizing lights, heat, time... Seems like you could come up with a cheap and simple routine that would be 99+% effective, at least for coronavirus specifically. Sure this isn't optimal, but a lot of things aren't optimal these days.

<comment><USER21> That's been my question as well. Why doesn't spraying N95 masks with isopropyl alcohol work?

1\. Spray mask with alcohol.

2\. Place in the sun or under UV light.

3\. Wait as many hours/days as possible before reuse.

Seems better than re-using a highly contaminated mask day after day. I'm not an expert so I could easily be wrong though.

<comment><USER22> All of those break down the mask fibers or screw up the electrostatic qualities used to grab particles. There have been studies on it, but there's not really an ideal way that doesn't damage the filtering capacity over time.

<comment><USER20> From what I understand the virus breaks down with time at room temperature anyway, so you could possibly just get away with tossing them in a box for 10 days (or whatever time gets you 99+% virus breakdown). That would have minimal negative effect on the filter material and elastic straps.

<comment><USER23> Alternatively you could bake some masks, high enough temperature will kill the virus. Or sanitize it with chlorine gas.

</comment></comment></comment></comment></comment></comment><comment><USER24> People keep talking about ventilators. The only study I've seen w.r.t. ventilator success for COVID-19 treatment showed something like 3% survival for those mechanically ventilated.

Do we have more data showing they even move the needle?

<comment><USER7> This isn't right--almost all with beds in the ICU right now are mechanically ventilated; >50% will survive.

<comment><USER25> Wuhan study of COVID showed 31/32 died: [https://www.thelancet.com/journals/lancet/article/PIIS0140-6...](https://www.thelancet.com/journals/lancet/article/PIIS0140-6736\(20\)30566-3/fulltext)

non-COVID mortality is typically a coin-toss: [https://www.google.com/search?q=mortality+rate+ventilators](https://www.google.com/search?q=mortality+rate+ventilators)

<comment><USER24> The lancet article is what I've seen.

I think early on, it was assumed ARDS was the worst outcome; your lungs stopped functioning and ventilation would tide you over.

But the more we dig in, there are multiple systems failing and ARDS is just one of many destructive processes going on.

This is one of the really important data points to work out. If almost everyone ventilated will die... it makes no sense for hospitals to extensively treat this way. Give people palliative care. It directs resources away from other, more productive efforts... for example ... running clinical trails on potential treatments to PREVENT ARDS/sepsis.

</comment></comment></comment></comment><comment><USER26> This will become standard in about a month I bet

<comment><USER4> I hope not, but if this can save a few extra lives that would probably be better than any hack I ever pulled off.

</comment></comment><comment><USER27> There is quite some discussion of it here

[https://emcrit.org/pulmcrit/split- ventilators/](https://emcrit.org/pulmcrit/split-ventilators/)

It has certain disadvantages (like not being able to trigger a breath on yiur own)

<comment><USER28> The video's here, in Italy, show the ventilators used with a bag over the patient's head to create a bubble of positive pressure (and quarantine off their head).

So presumably in a scenario like this it's less of a problem about 'triggering own breath'.

[https://news.sky.com/story/coronavirus-they-call-it-the- apoc...](https://news.sky.com/story/coronavirus-they-call-it-the-apocalypse- inside-italys-hardest-hit-hospital-11960597)

</comment></comment><comment><USER29> This sounds like a real-life kind of trolley problem ( [https://en.wikipedia.org/wiki/Trolley_problem](https://en.wikipedia.org/wiki/Trolley_problem) ).

</comment><comment><USER30> Makes me wonder if there's now a black market and/or hoarding for CPAP and BiPAP machines. Not really a substitute for a ventilator, but better than nothing if the hospital has nothing for you.

<comment><USER23> You do need oxygen though, moistened and well tuned percentage to pressure.

Would require a modification to the mask or hose for most of these machines. (One way valve from O2 source at least.)

</comment></comment><comment><USER31> The virus doubles in less than a week, so this hack (which is being used extensively in Italy from my understanding) can only by you so much time to stop its spread with mitigation measures.

<comment><USER32> Depends on whether you flatten out the growth rate. It won't/can't keep growing like that when everyone is sheltering in place.

<comment><USER33> Seems likely. Italy is currently seeing a 13% increase per day while the US is now very close to a 50% increase per day. There are news reports showing beaches and bars in the US are still fully packed. It probably relates the US culture of disregarding expert advice and doing the opposite to "own the scientists"

<comment><USER34> People stop very fast when people they know start to get sick and die.

<comment><USER35> When that happens, it's too late. Between the incubation period and the time to death it's about three weeks. At a 20% increase per day that means that even if you stop going out at that moment deaths will be multiplied by 46. If the rate is 30%, the multiplier is 247.

<comment><USER36> Not quite that bad.

Current measured growth rates are closer to 15% per day (5 day doubling time). And people's behavior changes not when people die, but when people get sick. Which happens (depending on your sensitivity) only 1-2 weeks after exposure.

But the basic principle still applies. We are trying to buy as much time as we can to ramp up emergency provisions. And are trying to avoid overwhelming emergency rooms. By the time people's behavior modifies through direct experience, it is too late.

Making this concrete I live in Orange County, CA. Population, 3.3 million. Hospital beds, 6600 (source [https://www.hasc.org/orange- county](https://www.hasc.org/orange-county)). I don't know how many ICU beds, but [https://www.accjournal.org/journal/view.php?number=630](https://www.accjournal.org/journal/view.php?number=630) suggests it likely is about 6% of the total. So about 400ish.

Now walk that backwards. 400 people in ICU beds probably means 4000 people with symptoms means less than 0.1% of the population with COVID. Except that it is worse than that. We have those beds for normal stuff that goes wrong. They aren't actually empty now.

Long story short, we start piling up excess dead bodies due to lack of capacity long before most of us personally know anyone who actually shows symptoms.

<comment><USER37> > _Current measured growth rates_ are closer to 15% per day (5 day doubling > time)

Citation needed. In the US, via Wikipedia:

[https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_t...](https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_the_United_States)

       2020-03-17  5656 infected  96 dead
       2020-03-19 11980 infected 172 dead

That's doubling time of 2 days, not 5. When was it 5 days the last time? If that 2 days continues, in two weeks: 1.5 million infected, 22000 dead. Also, the data across the world show only: the typical doubling time once it really starts going is 3 days, never 5, at least without the beneficial contribution of lockdowns:

Italy dead:

       2020-03-16 1809
       2020-03-19 3405

It's 3 days doubling time there, and they started to quarantine municipalities since February 22, and locked down the whole country on March 10.

[https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_I...](https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_Italy)

Netherlands dead:

       2020-03-16  24
       2020-03-19  76

Doubling time faster than 3 days there. Not much of measures.

[https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_t...](https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_the_Netherlands)

So "the risky hack" this article is about buys one not more than 3 days under the circumstances.

Speed of deaths is a good indicator because the number of those who die and those who need an intensive care unit are very close.

A lot of countries aren't able to test as much as it would be needed, so the number of "verified cases" which have less serious symptoms tends to be lower than the actual numbers. But those who die and could have been exposed to the virus and have matching symptoms are more consistently tested.

Main point: the US data can't be considered in vacuum, we know much more than US was able to test due to their botched procedures. But across the world, it's nowhere 5 days, as soon as the number of dead is more than a single digit.

<comment><USER36> Epidemiological estimates and projections seem to be based on the 5 day estimate. See [https://www.hpnonline.com/infection-prevention/screening- sur...](https://www.hpnonline.com/infection-prevention/screening- surveillance/article/21130206/covid19-predicted-to-infect-81-of-us-population- cause-22-million-deaths-in-us) for an example. I am honestly not sure of all the lines of evidence leading to that estimate, but I've seen it used a number of times.

Measuring what is going on by confirmed cases measures ramping out of testing more than the actual growth of the virus. Death figures are likely to be more accurate. But note that we expect it to take 3 weeks before quarantines show up in fatality figures. (A week for exposed to get sick, 2 more weeks before they die.) Therefore Italy shouldn't yet see the benefits of quarantines.

<comment><USER37> What you cite is from: [https://www.imperial.ac.uk/media/imperial- college/medicine/s...](https://www.imperial.ac.uk/media/imperial- college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-NPI- modelling-16-03-2020.pdf)

topic of which isn't the evaluation of the recorded growth across the world, but to show that lax measures are problematic even using the slower growth rates.

They specifically write just:

"Infection was _assumed_ to be seeded in each country at an exponentially growing rate (with a doubling time of 5 days) from early January 2020, with the rate of seeding being calibrated to give local epidemics which reproduced the observed cumulative number of deaths in GB or the US seen by 14th March 2020."

That's what they use in their model to demonstrate the point.

They never claim it's accurate or quote any sources for that number, because they just use that very "optimistic" value for the demonstration purposes: to show that even with that number, it's not reasonable not to implement serious measures. That's how mathematical proofs are constructed: you construct the lowest bound which doesn't have to be accurate, just to be obviously lower than the actual numbers, and show that even then some assumption doesn't hold.

I'm claiming here that that is not a "current _measured_ rate."

> But note that we expect it to take 3 weeks before quarantines show up in > fatality figures.

That's why I've stated about Italy: "they started to quarantine municipalities since February 22." It's not that they let it waiting for "herd immunity" like UK or NL. It was less than 4 weeks ago.

        2020-02-22     2 dead
        2020-03-19  3405 dead

with 3 days doubling time they would have today 2048 dead. It doesn't appear to be possible to be slower than 3 days. With 5 days doubling time they would have now just 128 dead, with 4 days doubling time 256 dead. It's that easy to calculate.

That's the Italian "current measured rate" for a month now.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER38> They kept giving reasons why this might not work...

      * not tested in humans
      * cross infection potential
      * different sized people mess it up

... but I see no reason why any of these things would stop me from using this in the real world. If things are bad enough that we need to do this, then we should be able to find relatively similar sized people. Cross contamination is not a concern when someone is dying here and now and likely has the same disease as the guy next to him who is also dying. Priority 1 is save them. Make their next of kin sign a waver or something, but save them. Lastly, who cares if it hasn't been "tested"? It was used in the real world, in a real life and death scenario, and it worked. I'd absolutely take my chances with it given that the failed option is to pull people off and set it back to single person mode. At least try.

Lastly, I would imagine that some common pressure regulation values could be used to compensate for different sized people.

<comment><USER39> It's not exactly "different sized people mess it up". It's not just different lung capacities, but different lung _compliance_ \-- which also changes over the course of disease.

Most simple pressure regulators will not fare well in the environment, either, because of the bidirectional flow, etc.

The "Y" hack definitely has use, but finding matches and keeping patients matched definitely means we will only be able to use it sparingly.

<comment><USER9> The flow direction issue is partly addressed by the unidirectional valves in many ventilators/anaesthesia machines. The bigger issue is staffing expertise, I fear.

<comment><USER40> True. Unfortunately, there may be a wide amount of practical experience shortly.

</comment></comment></comment></comment><comment><USER41> This is another article seems to be written by someone who has deep knowledge about this topic.

[https://emcrit.org/pulmcrit/split- ventilators/](https://emcrit.org/pulmcrit/split-ventilators/)

Continuous mandatory ventilation (CMV) is required, however it is necessary to accept permissive hypercapnia.

</comment><comment><USER42> If some untested and unapproved method like this is used and something goes wrong, I would image that being a huge liability problem.

Good on them for trying to save human lives, but our legal system does not always reward the ethical behavior.

<comment><USER43> I would hope that our legal systems account for the context in which these actions occur. It feels like a larger version of the Good Samaritan Act. They might do harm but they're doing nothing else but trying to save lives. This isn't carelessness or greed driving this behaviour.

Our laws are not a suicide pact and sometimes they must be broken.

</comment></comment><comment><USER44> It was my understanding ventilators also do CO2/O2 analysis to understand how to work on the fly, how would that work in this case?

<comment><USER6> I would assume those numbers would be meaningless. This is a hack, so the main goal would be to simply keep as many people alive as possible.

</comment></comment><comment><USER27> I've seen it discussed by intensivists on Twitter in January, that they've used it during 2009 pandemic

<comment><USER45> Here's a tweet saying they're already doing it now: [https://twitter.com/PeterAttiaMD/status/1240293938684018688](https://twitter.com/PeterAttiaMD/status/1240293938684018688)

<comment><USER46> That's terrifyingly soon

</comment></comment></comment><comment><USER47> I hope the legal framework does not lead to people like her getting sued over their attempts to help

</comment><comment><USER48> i dont know if im stoked or depressed that "risky hack" manifested in my mind after reading the title, as it has in irl

</comment><comment><USER49> if it comes to it, you can probably do three to a ventilator according to some people in the industry i have spoken with

<comment><USER50> Despite the title, the article talks about hooking _four_ patients up to one ventilator.

</comment></comment><comment><USER51> Middle-out! How could I have not seen this...

</comment><comment><USER52> There are some odd quotes and grammatical mistakes in this article. For example: "You wouldn't want to put a patient with severe bronchospasm [sudden contractions of bronchial muscles in the lungs] with a patient that does not have bronchospasm because that would." Likewise, one of the cited authors' names, Babcock, is misspelled in the piece as Babcok.

I'm not qualified to assess whether this risk is worth it but I am surprised that Vice's editing is so shoddy. It certainly doesn't engender faith in the veracity/accuracy of their reporting.

<comment><USER53> It looks like they have since fixed the errors you mentioned, yet they still misspell the author's name as "Babock."

<comment><USER54> guess they prioritize shipping and just debug in production!

</comment></comment></comment><comment><USER55> Terrible choice of words for the headline. Adding two negative-persuasion terms (risky hack) to bias the reader. What we need right now is encouragement of innovation in all sectors, not some inflammatory headline scaring people. Vice is not helping our combined effort.

</comment><comment><USER56> "Risky hack" is not something I want to apply during a sanitary emergency

<comment><USER57> it's all about tradeoffs

of course you don't want to

but in italy, fatalities increased because there aren't enough ventilators.

US is days away from that point

so if it's a matter of no ventilator or a dirty ventilator, most people will take the dirty vent.

after all: the sanitary crisis is for Coronavirus, and you already have it.

<comment><USER56> I was wondering about he infamous Liston's most famous case

[https://en.wikipedia.org/wiki/Robert_Liston#Liston's_most_fa...](https://en.wikipedia.org/wiki/Robert_Liston#Liston's_most_famous_cases)

</comment></comment></comment><comment><USER58> Cross infection?

F! This solution might be worse than the disease.

<comment><USER59> More than one person needs the only ventilator. Could you explain how they are worse of sharing a ventilator than being dead?

<comment><USER60> There is a material risk that you are more likely to lose both than just one. I'm sure that having patients share a ventilator increases the risk of death over each having their own. How big that increase is determines whether or not the strategy is valuable.

</comment></comment></comment><comment><USER61> This is ridiculous!

Hacks are ok with web and app deployments where you are able to patch and fix to your heart's content and the damage is not life threatening.

I have worked with the medical industry, the amount of formal validation and verification that goes through on software is insane compared to what we have in the "move fast and break things" world.

Even if it is "temporary" and "desperate" I would stay away from this mentality as much as humanly possible.

<comment><USER62> This is completely the wrong attitude.

Different circumstances with different levels of risk, require the ability to adapt.

Nobody is suggesting 'sharing ventilators' would be normal practice because in normal circumstances we want to make sure that equipment is 99.999% reliable.

But as you imply, this requires extensive testing and regulation. Within these regulations are also significant safety margins that can be exploited if conditions change. If we can multiply the usage and maintain 99.99% reliability, then this is probably a risk worth taking.

Also - if you've worked in the medical industry, you know how vastly overpriced and bureaucratized everything is.

The situation of 'not enough ventilators' is literally happening right in front of us, and it is causing death.

The risk tolerance for utilizing the gear in such a manner is such that it may very well be possible to create better outcomes.

The individuals involved are medical practitioners who are well versed in the equipment, procedures, and inherent moral dilemmas, they're not fools.

This is exactly the kind of procedural innovation required in times of crises - hopefully, a few doctors and especially the Engineers from the manufacturer can be involved. The people who built the gear may be able to give a much better articulation of the actual risks involved, and they may even be able to mitigate, for example 'the risk will be power consumption' or 'the risk will be this specific valve which could wear and break' thereby implying the 'new operational procedure' would involve daily checking of said valve etc..

The world is facing crises we absolutely must be adaptive while trying to quantify risk and outcomes.

<comment><USER13> >Also - if you've worked in the medical industry, you know how vastly overpriced and bureaucratized everything is.

Quality guy here,though not in medical devices... Yet. Still trying to get up to speed on all the regulations; but I know enough to be able to vouch for _some_ of the bureaucracy around the industry.

The risks in medicine being what they are, when launching into any novel space, there is simply no substitute for A) data and B) audit trail.

Your data varies from lot numbers of source material from suppliers (contamination happens), batch numbers of parts (and revision numbers of the process involved in making that batch) from manufacturers, to serial numbers matched up to individual patients in order to be able to implement some form of high-level statistical process control, and rapid intervention when things go wrong in order to figure out why, what you can do about it, and who else may be at risk. No one wants to be the one told "whoops, someone goofed, and that thing we put you on is trying to kill you," anymore than anyone in the chain from treatment inception, to installation wants to hear that they missed something, and even worse, get caught not knowing what to do about it.

That means paperwork, signalling mechanisms, and procedures involved with marshalling whatever response is to follow, which is not at all a trivial process to orchestrate, and while all of us wish there wasn't so much bullshit, there are plenty of examples where "falling asleep on the job" has led to catastrophic outcomes.

I can't necessarily say I that justifies the overriding though. The markups are ridiculous, but without access to the books, I can't really discount it either.</comment></comment></comment>


Masked Identifier adds non-incrementing IDs to ActiveRecord objects - <AUTHOR> http://github.com/matthodan/masked-identifier

<comment><USER2> I like the options to control the size of the 'IDs' and the charset used.

I wrote something like this a few years ago called 'acts_as_hashed' that as you might guess, uses a hash function to come up with a unique non-sequential identifier. <https://github.com/briandoll/acts_as_hashed>

</comment><comment><USER3> Enumerable ids are an unfortunate weakness in the Rails + MySQL stack. This is good. I'd also like an easy way to use UUIDs instead of incrementing integer primary keys.</comment>


Quixe: A VM for Interactive Fiction Written in JavaScript - <AUTHOR> http://www.eblong.com/zarf/glulx/quixe/ <comment><USER2> Great news. We already had parchment.js - but with this you can use images in your interactive fiction. One day I made a website in parchment, it's a more narrative way of engaging the audience, I thought it would be nice to use pictures (low bandwidth black and white Filter Lite dithering). Javascript kills SEO though (I could use something like PhantomJS to simulate all pages into static html).

</comment><comment><USER3> This comes from Zarf, someone who deeply cares about IF and the way it is told and experienced.

</comment><comment><USER4> There's another JS IF VM similar to Quixe with a different IO layer. Quixe uses the Glk IO layer while Glulx-Typescript (github) decouples the IO by providing a pipeline of NVPs to the web app. Also it's written Typescript. It is a Glulx engine, but as I said, it only delivers data to the web app. All the UI/UX has to be created by the author.

I'm still (slowly) working on a proof of concept story and have an author- partner to help out. The long-term goal is to have JS tools to template an IF story, use Inform 7 to write it, and have the tools rebuild automatically, and the author would have a browser showing the results as they work.

I blog about it and other things at: [http://plover.net/~dave/blog](http://plover.net/~dave/blog).

</comment><comment><USER5> Does it handle the old Z-machine formats?

<comment><USER2> No but if you have the source you can recompile the zcode sources to glulx. But you could run z-machine with parchment (which supports zcode without images) [http://iplayif.com/](http://iplayif.com/) Parchment doesn't support the rare z6 images when I asked in 2009 [https://groups.google.com/forum/#!topic/parchment/RsLytfu5JI...](https://groups.google.com/forum/#!topic/parchment/RsLytfu5JII)</comment></comment>


Profile: Yammer CEO David Sacks - latimes.com - <AUTHOR> http://www.latimes.com/business/la-fi-himi-sacks-20120701,0,2654631.story# <comment><USER2> Interesting perspective:

 _Sacks, who lives in San Francisco, says he doesn't have any hobbies. "I feel like hobbies are for people who don't like their jobs," he said._</comment>


What do hackers think of PHP? - <AUTHOR>

Just interested to know, what do people in this forum think about PHP as a backend language for a website? <comment><USER2> I maintain a site that receives over half a million pageviews per day, not including API requests of XML feeds. This site runs on 3 medium range commodity web servers and 2 database servers, and there's plenty of capacity left.

Don't let the scaling police and architecture astronauts fool you: with the right architecture in place (i.e. a framework like Cake or Zend) and a smart scaling strategy (opcode caching, object caching, page caching, etc), PHP is a great choice for web applications.

Sure PHP has a low barrier to entry, which can lead to poor coding practices, but that shouldn't be a reason for people to express an absolute hate for it. Rather, it's important to stress continual education regardless of which programming language you choose.

<comment><USER3> Sure, it scales. But it isn't a very good language. (The word "blub" comes to mind.)

Here are features I like to have (in no particular order):

      * lexically-scoped variables (and closures)
      * lambdas
      * continuations
      * macros
      * an object system with a MOP (PHP and Java fail miserably here)
      * powerful regex engine (can be added via libraries, so not too critical)
      * extensive module library
      * flexibility (I want to write code my way, not the way someone else thinks I should write it; bye bye, Python.)

Things that are nice to have:

      * multiple dispatch OO
      * partial evaluation
      * laziness

PHP has none of these features. That's why I don't use it and don't recommend it. And oh yeah... PHP is a templating system too. I would rather get that as a library, not a core feature. (But I won't count that against them.)

So what language does have all these features? None :)

But, Lisp and Perl are good compromises. CL does everything except continuations and having a decent module library; Perl does everything except have pretty syntax and macros. Sadly neither of those languages has (by default) the "optional features", which is a shame. I ranted about this on my blog:

<http://blog.jrock.us/articles/Syntax%20and%20features.pod>

Anyway, PHP is junk in terms of a programming language. It's fine if you don't know how to program, don't know what abstraction is, and don't like using libraries.

<comment><USER4> Your list of features has nothing to do with getting things done. They are almost completely academic.

<comment><USER5> True of maybe half of those features...but the other half? Well, if you don't know enough to miss them, I don't have any way to argue with you--there's no common language in which we can converse about them.

But, I feel uncomfortable every time something I write takes two or three times the lines of code because of what the language lacks. First class functions or lambdas, closures, and a good library fall into this category...and PHP fails on all of them (there are many PHP libraries, but most are buggy and rather scary, and the standard library has ad hoc'ery written all over it...I like for the standard library to at least be a little bit planned out rather than crammed in via 3000 or so functions in the same name space).

But PHP is a perfectly valid language for many classes of problem. Just be careful not to use it for the classes of problems for which it is extremely poorly suited.

<comment><USER6> >Well, if you don't know enough to miss them, I don't have any way to argue with you--there's no common language in which we can converse about them.

While I agree with your actual premise ; this statement is pretty bad form. It is the logical equivalent of a Christian saying that in order for me to critique his faith, I must become a Christian.

Replying, "you wouldn't know; you're an imperative programmer" is moot; maybe he is an imperative programmer - but he could also be correct. There is no connection between the two. Deductive logic has never been allowed in the scientific method, which is, ultimately, the barometer of truth.

I'm aware that Graham is the originator of this somewhat popular meme, but it's a wrong popular meme. The nature of ignorance of certain desirable features can only explain why people don't immediately demand them; it doesn't prove their usefulness.

<comment><USER5> "Replying, "you wouldn't know; you're an imperative programmer" is moot"

That's obviously not what I said. My reply was, "If you believe all of the features listed above are useless in a real world development situation, I'm not capable of convincing you otherwise, as we're going to be speaking very different languages". I think there is a difference, though I can see how it comes off as arrogant. It wasn't really intended that way--I'm not a great programmer, and never claimed to be. But I know what makes me (as an adventurous, but not necessarily brilliant, hacker) more productive is good tools. And first class functions, closures, and a great set of libraries (like that found in Perl, Python, and to a lesser degree Ruby), are the tools save me lots of time. When I develop in PHP, and I do so pretty frequently, I miss all of those features constantly and my code is longer, less readable, and harder to maintain.

My point was if you haven't worked with a language that has those features you wouldn't be aware of how much time, and how many lines of code, they can save you. I'm not a smug lisp weenie pushing the blub paradigm (though there is definitely something to the argument) or implying that imperative developers are the scum of the earth. I'm a pragmatic sort of fellow...if it works, use it. But if something works better, why not use it instead?

That said, one of the places where PHP is a perfectly valid language is web applications. Some of the largest applications in the world run on PHP-- Facebook, many Yahoo sites, etc. But they also have lots of languages doing the non-frontend work, because PHP is really horrible at a lot of backend tasks. Data and systems management, for example, where Perl and Python, or Java (depending on scale and performance requirements and existence of libraries), would be a better choice.

<comment><USER6> Sorry, I didn't mean to characterise you wrongly, I only rephrased the actual quote because it fitted better with the deconstruction. I actually do think it's a reasonable representation of what you said (or, more pointedly, the concept in general).

Good reply, looks like I made a mistake about part of your opinion, but I can't agree with you about not being the value of these features being difficult to explain. I always just explain situations where closures/anonymous functions work well (while I'm not much of a web programmer, I can think of a couple of examples). I agree, there is something to the blub concept. There certainly is a spectrum of languages.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> PHP is without a doubt the worst structured language I've ever coded in. Probably the crappiest language after VBscript.

But I use it for anything web-based because it gives me guaranteed results, anytime, anywhere, on whatever scale on whatever budget. I just wouldn't use it for sites with complex business logic, but let's face it, most websites, even the big ones, are hardly rocket-science in that respect.

What I love most is the dynamic of the PHP community. For instance, when RoR arrived on the scene, the response wasn't to dis RoR or run scared, but more like "that's so cool, let's see if we can bring PHP to that level". And there is more sharing of knowledge and experience (and code) going on inside the PHP-community then any other developer community I know.

More then any development platform I know, PHP is alive and constantly developing, but still as easy to deploy and easy to learn as ever.

<comment><USER8> The only thing that's really good about PHP is the easy deployment. You just upload your files to your server and it works. The language is very crappy, so this easy deployment only outweighs the extra development effort up to a point. I'd recommend against it for sites that take more than two days of work. With services like Heroku, deployment with Rails may have become as easy as deployment with PHP.

<comment><USER9> Actually, since mod_rails (Phusion Passenger) was released, that's a solved problem for RoR.

</comment></comment></comment><comment><USER10> Ruby and Python seem to be the current preferred languages.

I've used PHP for a while -- a few years -- and haven't developed a particular loathing for it. That's saying something, since I'm disgusted by most of the tools I'm forced to use.

It's certainly capable enough and isn't hard to use. It's also more ubiquitous, and therefore arguably more portable, than Ruby or Python, although dealing with differences between PHP versions is a pretty royal pain.

Pretty much any reasonably skilled programmer can do a job in PHP without too much trouble. You'll get more cred for using Python or Ruby though.

<comment><USER11> Also, Python and Ruby developers earn a bit more.

Here are the average salaries for permanent jobs over the last 3 months according to <http://itjobwatch.co.uk>:

Python: £45,282

Django: £42,326

RoR: £41,204

Ruby: £39,897

PHP: £33,004

<comment><USER12> There are also a lot fewer Python, Ruby and Django jobs than PHP jobs there so you would expect to see more low/entry level PHP jobs in there pulling the average down.

<comment><USER11> You're absolutely correct. They have a maximum and minimum averages, but I don't know how they work them out, so I'm not going to post them.

Number of salaries quoted for the past 3 months: PHP: 5283

RoR: 454

Django: 46

Thanks for pointing that out.

</comment></comment></comment></comment><comment><USER13> PHP is a brilliant language for small to medium-small sites.

Since most medium-small sites have an irrepressible tendency to grow into medium and even large sites, I'd stay away from PHP for anything other than a quick and simple site.

Ruby and Python are much more sustainable in the medium term and even the long term, and just as quick to throw applications together. Sure, they won't last forever, and eventually you may have to rewrite critical bits in another language, but in the meantime it works to release something quickly and keep improving it for a few years.

Daniel

<comment><USER14> Are you speaking in terms of traffic? Several very large sites run on PHP (Facebook comes to mind) while few run on Ruby (I think Twitter tops the list).

<comment><USER15> _I think Twitter tops the list_

<http://rails100.pbwiki.com/>

</comment></comment></comment><comment><USER16> It's strange that nobody has mentioned that Yahoo! uses PHP to power a lot of their software, and it obviously scales very well if you know what you're doing.

They also remarked that they are looking into using Symfony framework in their software.

<comment><USER17> I wouldn't consider Yahoo the pinacle of software engineering, or a hotbed for inovation. For a company of their size, they are not releasing any groundbreaking features, or anything too advanced, and they are obviously trailing google by a big margin.

Facebook and Digg are two other notable mention of php usage. Both are handling very high traffic loads ok (not spectacular), and I know that facebook is using a lot of C/C++ and some Java on the backend. The main reason that they are php is b/c it was the better choice for the founders, to do something quick at the time (2004-2005).

Ruby on Rails was not even out, and Python didn't have great and simple frameworks with simple learning curve.

So, at the time the two sensible choices were Java or. Php. A great question would be: If facebook or digg had to redo everything from the beginning, would have still chosen php?

<comment><USER18> Y! handles more traffic than Facebook and Digg combined and it uses primarily PHP.

Why compare Y!'s stock performance to their underlying technology? Makes no sense.

</comment></comment></comment><comment><USER19> PHP gives you more slack than any other language. . .

which is just enough rope to hang yourself with.

To be honest, part of it will depend on your style and part of it will depend on your discipline.

I'm a fan of Python. PHP is not my style. I like one way of doing things. I like namespaces. I don't like all the extra syntax that I feel is useless ({};$).

But that's just me personally. Many people hate python for those reasons - it's constraining.

Objectively, PHP allows you to do what you want easily. The only problem is that taking those shortcuts can come back to bite you later. If you appropriately use include(), make sure to template out design, and avoid some of those oh-so-irresistible hacky things, you'll be fine. Digg has done well with PHP.

The problem is that it's hard to know exactly where you're screwing up sometimes. For example, in python, every name used in a python source was defined either in that file or in one of the imports. That makes it trivial to figure out why that "I can't find that name" error is occurring. With PHP, that name could be meant to be included 10 files back. They simply all carry over.

So, is PHP bad? I personally think it is, but I'm a little conservative an authoritarian when it comes to programming rather than PHP's more loose style. Can PHP's style help you? Yes.

</comment><comment><USER20> PHP is the VBScript of the open source world. It's available on almost every web host, and it seems to be what beginners learn first. While I'm sure it's possible to write things in a safe and mantainable way, most code examples you see will be from beginners and will have problems with the OWASP top 10. You can't look to the built in libraries for inspiration beacuse they're usually poorly designed. Just because there have been success stories in a language (cold fusion and myspace, php and facebook) doesn't mean it's right for you. It took me one website and only 1000 lines of code to decide against PHP. If you've used it longer and like it, it's probably fine.

<comment><USER21> Code samples: <http://www.aspvphp.com/>

</comment></comment><comment><USER22> I currently do a lot of work in PHP, and although it isn't my favorite language to work with (braindead built-in library, for one), it's hard to argue with the results we get.

For the good of your soul, use a framework. We currently like Zend Framework, but I've heard good things about CakePHP and Symfony. If you stick with the framework and follow a sane MVC strategy you'll fix most of the problems you'll have using PHP as an HTML templating language.

<comment><USER23> I would recommend Zend Framework. I have had issues with Code Igniter. All the workarounds and unexpected stuff frustrated me - I think not only me but other users as well - that is why I think there is a fork: <http://kohanaphp.org> ... By the looks of it, I would recommend Kohana instead of Code Igniter. Either way, I am not so sure about the future of CI. That is why I choose Zend Framework.

<comment><USER24> The proper link to the KohanaPHP project is: <http://kohanaphp.com>. I've been using Kohana for the past few months and it is major improvement over other PHP MVC frameworks. It utilizes the OOP functionality in PHP5 to make structured PHP web development much easier and elegant. If you are looking for a new PHP framework, you should definitely consider Kohana. You could even integrate with Zend Framework classes if needed.

</comment></comment></comment><comment><USER25> We do a lot of work in PHP, but wouldn't even consider it if it wasn't for clean MVC frameworks like Code Igniter.

To be honest, it doesn't feel much like PHP on the average bit of coding. It feels like a "real" language most of the time because of the framework. They have one of the best user guides I've ever run into (click Table of Contents at top): <http://codeigniter.com/user_guide/>

<comment><USER26> I can second this. We use PHP along with a modern framework and love it. Deployment is easy and PHP is so widespread that you can count on a script existing to handle almost any little problem you face.

Granted there are times that its inconsistent library and lack of language features can become annoying. If we're discussing languages alone, PHP is certainly lacking.

With projects like mod_rails on the horizon and programmers trending away from PHP hopefully we soon won't need to choose between a solid language and super- simple deployment process.

</comment></comment><comment><USER27> i believe that every language has its perks, and PHP has quite a few. as far as back-ends go, there are a few types -xml/json webservices -low memory application servers(blogs, shopping sites, etc..) -high memory application servers(data mining, indexing, processing, game servers)

i think php is a great low memory solution, when you get into higher memory loads for the app to process, you do not want to reload everything back in to ram for each request. php is single threaded per request, and as such you don't have access to sockets, or other event based activities on the server side.

i agree with the statement in general, that you should go with what you know to be the most efficient language for the task.

</comment><comment><USER28> Having dealt with a lot of really awful PHP in my programming career (including some of my earlier stuff), it tends to unfairly taint my view of the language.

It's not terrible, but I've found that the clunky syntax for slightly more advanced stuff (e.g. anonymous blocks) really discourages some labor-saving and repetition-avoiding coding practices that a language like Ruby encourages.

It's a really good fit for small-scale sites with well-defined requirements. But it requires some well-thought-out conventions to scale well, the sort of stuff you can't come up with unless you've done it wrong a couple of times yourself. Unless you borrow someone else's work by using one of the frameworks out there.

</comment><comment><USER29> PHP is the lazy man language. Sure, its messy and has bad convention. It gives you bad habits unless you use a framework...

But then of course we should all take a step back and realize that Facebook is built on PHP, haha.

</comment><comment><USER30> Go for the framework that lets you develop quicker. The truth is that there's no framework on earth that has solved the 'scaling' problem for you. Anyone who says '<framework x> doesn't scale' in all probability has never scaled anything.

Scaling isn't even a real, real problem you need to worry about until you're a top 1000 site at minimum, or > 10MM page views a day. At numbers past that, no framework is going to magically solve your database partitioning problems.

</comment><comment><USER31> PHP simply requires discipline, which unfortunately many people in the PHP world lack due to its initial target audience. Provided you find real hackers and not just designer-turned-coder types, PHP is totally workable.

Mind you, when you're getting into the more functional side of Ruby or Python, PHP starts to show its limits as a language. But it's still fast to code in and to do so well if you know what you're doing.

</comment><comment><USER32> <http://us3.php.net/manual/en/ref.array.php>

PHP's standard library is not object oriented

75 array functions

47 of them start with array_

28 do not

Out of the 28 that do not, you have such greats as: usort, sort, rsort, asort, arsort, krsort, uksort, uasort

Nuf said.

</comment><comment><USER33> PHP is my preference for web development. However, you can do anything with any language. The part that has the most influence on how easy or hard it is usually the framework, not the language.

On that note, I am tired of articles comparing PHP to Rails. It's like comparing a Honda to the metal used to build another car.

</comment><comment><USER34> i've been using it for all of my websites for about 6 years. It's robust enough to do just about anything. it's just close enough to see C to be familiar and just different enough to slightly irk you. I'm getting to ready to roll out my first Ruby site though.

</comment><comment><USER35> I used PHP heavily for a few years (~70% PHP, 20% perl, 10% Java), and enjoyed it for awhile. However, it seems like it is impossible to create clean and well-divided code in PHP. This weighed on me heavily, as I had two 10,000 line projects that I was the sole maintainer for. Even if you managed to create well-structured code, it was always very... ugly (too many unnecessary symbols $, ->, etc). It wasn't much fun to work in every day.

I'm using Ruby now and I would never go back.

Here's my rough order of language preference for server-side languages that I have experience in: Ruby > Python > C# > PHP > Perl > Visual Basic > Java > C

</comment><comment><USER36> It's a fine backend language for a small to medium sized website, but you need to be aware that at a certain size (in terms of complexity of the application you are building) you'll often find yourself fighting against the language. That's not to say you can't build large applications in PHP, just that you need a great deal of discipline to do so. You'll either need to adopt one of the MVC frameworks (Symfony for example) or roll your own. A lot of the features in the framework you chose will be workarounds for limitations in PHP itself (such as its lack of decent namespacing and poorly designed database access primitives).

<comment><USER37> Yeah, it's perfect for your little side projects that will never grow or have lots of traffic. You know, like Facebook.

<comment><USER36> Quoting myself: "That's not to say you can't build large applications in PHP, just that you need a great deal of discipline to do so."

</comment></comment></comment><comment><USER38> I'm not sure if this is a troll question. Elaborate on why you are asking. You are asking: "what do you think of pudding" instead of "hey, I'm having a dinner party and can't decide between apple pie and pudding, help me!"

<comment><AUTHOR> Well, we have used PHP extensively until now. We have gotten more disciplined in designing code, compartmentalizing it into classes, documenting the code etc.

However, I recently read an article on YC about how many startups go through a phase debating about which language an application should be built on. We did not give this much thought as we saw a few prominent websites like facebook use PHP and we thought PHP seemed to be a pretty scalable language. Plus, with support for OOP (as of PHP 5), PHP seemed to be a pretty good choice.

I am interested in evaluating if we made the right decision

</comment></comment><comment><USER39> I build absolutely everything on the top of PHP and the WACT framework. The latter ensures that my code stays maintainable and well-organized. It also emphasizes the use of design patterns. I'd never switch to anything else when it comes to web development and I'd have left the industry if there was no WACT. That's why I became one of its core contributors.

</comment><comment><USER40> I use PHP for basic stuff where I don't care much about performance or anyone else maintaining it. It's installed on pretty much every web host and it's easy enough to whip stuff up in. I haven't done a big web site in a long time, but I can't imagine using anything other than Python for it.

</comment><comment><USER41> I have a lot of respect for PHP, for having made web programming accessible to people who otherwise would have struggled with something like Java.

However, I never want to use it again myself. I'm tired of digging through horrible code written by people without a clue.

</comment><comment><USER23> Bottom line is: PHP can get the job done (cheap and fast) and scales pretty well. I have been using Zend Framework for almost a year now - with the release of 1.5, I recommend it above anything else (other PHP MVC Framework).

</comment><comment><AUTHOR> Thats interesting. What is it about Phyton that makes it attractive?

<comment><USER36> It's a significantly better programming language; I don't think you'll be able to find anyone who knows both PHP and Python and will disagree with that statement. PHP is a very simple language with built-in features for web application development. Python is an advanced, multi-paradigm general purpose language that has evolved over more than a decade.

Here are a few Python language features that I seriously miss when I'm working in PHP:

\- Modules and namespaces! This is the feature that initially drove me away from PHP.

\- List comprehensions (let you construct a new list based on an old list in a one-liner)

\- Built in iterator support (easy "for item in collection" support for many different types of collection)

\- First class functions and closures (so you can treat your functions as data)

Those are just four off the top of my head. If you haven't looked at Python before (but already know how to program) I suggest taking a look at <http://diveintopython.org/> which is a free online book.

<comment><USER39> Not to take a stand, just FYI: PHP5 has built-in iterator support now and PHP 5.3 includes namespace support as well (TBR this month).

<comment><USER42> But, PHP5's iterator is broken. The only way you can use it is in a foreach loop. In Python, iterators can be used with any iterative construct.

Namespace support in PHP never really bothered me, but I've occasionally run into problems with name clashes with built in functions. It'll be welcomed anyway for sure.

</comment></comment></comment></comment><comment><USER43> If it's the right tool for the job then use it.

Our app is nearly entirely client side, with a little server side PHP glue. Something like Rails would be overkill.

</comment><comment><USER44> I'll admit, I'm a rookie. I've spent a few months now learning and writing PHP...is my effort in vain? Should I ditch PHP and dive into Ruby with a Rails framework?

<comment><USER45> I don't think your effort's in vain. If you like it, keep at it. When you feel confident in your knowledge on the language, you can then choose to move on and experiment with other things. Same for any language, really.

Myself, I'm just now getting started into Ruby on Rails. I finally figured out a project to get me interested in learning the Rails part of it. I just need to get cracking.

</comment></comment><comment><USER46> Requries programmers with good security background.

</comment><comment><USER47> From what I have heard: If you can stand PHP - you can make it work.

I just do not like to code in the language.

</comment><comment><USER48> amrithk, what type of website are you thinking of building ? Your question gives me as little clue as, "what language should I use to write software???

</comment><comment><AUTHOR> Its been informative learning about your experiences. What do you mean by frameworks? Something like a backend scripting language, a templating tool (like Smarty or PHPTal), etc?

<comment><USER23> I think he means MVC (Model-View-Controller) Frameworks. These things are so hot nowadays... If your site is structured well, then you wouldn't have to use templating engines like Smarty (god these things are so annoying)...

</comment></comment><comment><USER49> I prefer Perl

</comment><comment><USER50> A hack, but not in a good way?

/me ducks</comment>


Why should hacker news redirect to https url? - <AUTHOR>

http request to news.ycombinator.com redirects secure URL, I can't imagine reason behind it.. is it to avoid some one hijacking browser requests on client side?<p>> GET / HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/22.214.171.124 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 > Host: news.ycombinator.com > Accept: <i>/</i> > < HTTP/1.1 301 Moved Permanently < Server: nginx < Date: Fri, 19 Apr 2013 07:13:39 GMT < Content-Type: text/html < Content-Length: 178 < Connection: keep-alive < Location: https://news.ycombinator.com/ <comment><USER2> It's probably easier than differentiating between logged in and not-logged in, when it is understandably desirable to secure logged in traffic (which had been lacking for some time).

Curl can handle the redirect automatically (as well as HTTPS). Try something like:

curl -L <http://news.ycombinator.com>

or just point it to HTTPS directly.</comment>


A gift to HNers working on a startup - Giving back to the community - <AUTHOR> http://codesketch.com/2010/05/giving-back-to-the-hn-community/

<comment><USER2> I like this as brilliant guerrilla marketing for CodeSketch. I had honestly never heard of it before this offer. Brilliant move for CodeSketch to effectively advertise free on HN (Compete.com says ~250,000 unique monthly visitors) in order to build new loyalty for CodeSketch (Compete.com says ~10,000 unique monthly visitors).

I'd love a follow-up report in a couple months, in the style of Bingo Card Creator.

<comment><USER3> Yes - and it's the perfect match of a just-big-enough blog, and a community that supports these kinds of gestures. Either way, it's a good gesture, nobody gets hurt, and we get exposed to a cool blog like CodeSketch.

<comment><AUTHOR> Quick update: 13 companies already submitted Apps for review. Some absolutely stunning work is sitting in my inbox right now, and I can't wait to dig in deeper.

Thanks for the kind words and I'll be sure to keep HN updated!

</comment></comment></comment><comment><AUTHOR> The "Too long, didn't read" version: Thanks for sharing your experiences while you build your startup. We want to help you by allowing you to advertise your startup on our site for free for the rest of the summer (end of August).

<comment><USER4> I'm not so sure you want people who are too lazy to read your four-paragraph post to advertise.

<comment><USER5> Maybe, but it's useful for the 95% of us for whom this doesn't apply (because we don't have a startup). I don't have time to read every story on HN, so I'll often check the comments first to determine whether it's worth reading the article. His post told me everything I needed to know about the article without me having to read the details that don't apply to me.

(But yes, in this case it only saved me a whopping 30 seconds because it was only 4 paragraphs)

</comment></comment></comment><comment><AUTHOR> Quick update: I've been contacted by 24 Companies in the last 6 hours and I've been impressed with the quality of services. HNers are working on some really cool projects! I'm working on personally getting back with each company, so don't feel bad if I haven't gotten to yours yet (I will by tomorrow at the latest).

Thanks for the encouraging responses, and keep up the great work HNers!

</comment><comment><USER6> Great idea. Great marketing. I'll withdraw because I have no personal need that is great, others need it more right now.

</comment><comment><USER7> Wish more blogs do this.

</comment><comment><USER8> Great Idea, great offer, I'll send my pitch email. do you have any limitations ?(something like the first 20, only x peoples, since you have 2 to 3 adspaces to offer or it just needs to be interesting for your audience?).

</comment><comment><USER9> This is a great idea. If I was only finished with my project. Couple months off.

</comment><comment><AUTHOR> Everyone has been contacted. I will have the 3 selected by the end of the week. Thanks for all of your submissions (around 35)! Lots of really quality services!

</comment><comment><USER10> This is great! Thanks for the offer.

</comment><comment><USER11> This seems like a nice gesture to be sure. The cynic in me can't help but wondering whether you're going to get more traffic from this offer than the selected startups will get from the free advertising. Does codesketch.com have traffic?

<comment><AUTHOR> Yes, codesketch has traffic (not massive, but respectable). It's relatively new (launched in December), and has been averaging 10,000+ hits a week. More importantly, we've found a strong niche that loves technology and design. Based on analytics, our readers are tech savvy and have some cash. I know already that some of the startup submissions will be a perfect fit.

This is just a sincere thank you to the community for helping me grow.

<comment><USER12> 10k hits, really? I'm getting only a little less than that per day on a very small time personal blog... traffic profile and engagement are, of course, more important than raw numbers however.

I'm sure your next months hits will be higher!

</comment></comment></comment><comment><USER13> Just saying thanks, every little bit counts.

</comment><comment><USER14> Thanks for this! I already sent my pitch.</comment>


Show HN: Jukesy - a music video player - <AUTHOR> http://jukesy.com/

<comment><AUTHOR> Hi HN.

I was hoping I could get some feedback on this project I've been working on. It's a music player that plays YouTube videos while allowing search through Last.fm (for better data). Right now it uses node and backbone.js.

It has a few basic features. Primarily, you can make playlists. You can also put the player into 'discovery' mode to listen to music similar to whatever you're already listening to. Search is relatively robust for a site of its kind (in my opinion).

I plan on adding a few more features including genre-based radio, scrobbling, favorites, a mobile app, and "channels" for social listening.

Source code is available too, if you want to check it out. It's written purely in javascript. <https://github.com/adrianbravo/jukesy></comment>


Show HN: Coaching platform for League of Legends - <AUTHOR> http://www.gamerunners.gg/

<comment><USER2> It looks interesting but there are a few things missing in my opinion:

-No way to see how active, actual the coaches are. There is no chance to offer lessons around certain times or make this easier.

-high barrier for student because they have to fill an empty message with no pointers or basic information form coach accounts could use a little bit better organized

-standardized coaching and student profile other than just one big about section

\- offer some form of auto match to make it easier to get coaches.

\- Something I would like would be some kind of open lesson system. A coach could open a session and every student would see a list of lessons at the moment and is able to join them.

Good start though.

</comment><comment><USER3> Note that vote rigging doesn't work.</comment>


Deliveroo was the poster child for venture capitalism. Not looking so good now - <AUTHOR> https://www.theguardian.com/commentisfree/2020/may/02/deliveroo-venture-capitalism-food-delivery-business-model <comment><USER2> I have used Deliveroo quite a lot recently to order from convenience stores because there was a free delivery offer.

Otherwise I no longer order anything through them because it has become too expensive: for most places the delivery fee is about £4 for me now and Deliveroo charges a 50p service fee on top of that.

For food I order from my local pizza places. They are not on Deliveroo and delivery is free as it has always been.

Now, I suspect that people in general are not confident about how the food is prepared and handled at the time being. My wife bans me from ordering food for this very reason...</comment>


This Word, "Scaling" - <AUTHOR> http://glyph.twistedmatrix.com/2008/06/this-word-scaling.html

<comment><USER2> _Your web framework - what you use to fill up your memcache._

This is too classic not to be quoted for tl;dr visitors.

</comment><comment><USER3> This is a terrific treatise on the problem of scaling, and the Divmod strategy, which I recommend to anyone looking for a clear picture in mind. It will help you make scalable systems where ever you are.

For me, Mantissa was more than an intellectual curiosity. I built my site on top of it. Though I'm now migrating to App Engine for other, pragmatic reasons (hosted environment, ease of deployment, Google's CDN, not having to do system maintenance, integration with Google's auth system, integration with Google services, BigTable, great prices, PR), Mantissa is a terrific place to get started to learn about the basics of scalability.

Once Divmod is able to get the rough spots ironed out, Mantissa could be a major competitor to App Engine. What they could provide in a hosted environment includes things Google has either ruled not to do, or haven't done yet (such as COMET).

</comment><comment><USER4> Wow I'm sorry, but that was a pretty bad article, it seemed like the author knew little about the subject?

First of all, it said rails doesn't scale. This is so inaccurate on so many levels. Mainly because everything scales. Obviously for some situations languages like C will deal tons better - like google search. And some languages will be able to support more connections per server (again, C and even Ruby without the rails framework on top). But at the end of the day - Ruby on Rails will scale like any other language/framework, just sort out the database side to shard/slave and your away.

Oh and it compared Ruby on Rails to the Google App Engine. Two totally different things.

Just doesn't seem like a well thought out article to me?

<comment><USER5> Early on, the author says: "If you write an application with Rails, you probably have to write a whole bunch of new code, or at least change around all of your old code, in order to get it to run on multiple computers." This is absolutely true. Rails "scales" by forcing programmers to do a whole lot of extra work (yes, sharding and secondary databases and lots of other things) which isn't particularly natural in the framework.

As a programmer, I'm not particularly thrilled to have to set up and maintain a memcached cluster and then write code to make sure my object reads pass through the caching layer. It's more work. It's more fragile. It probably forced me to revisit and modify working code.

The author wants to build a framework where scalable code is the default and natural way to write applications. Seems pretty well-thought out. He touches on many of the common pain points.</comment></comment>


Ask HN: what influence your purchase? - <AUTHOR>

I had a discussion with my co-workers on influence of purchase. IMO, even we think we are rational, we are not. some of us, even very rational hackers, do lots of research before we make a purchase, but large part of it are influenced by other people. That's why branding is so important, apple is doing so well. It is because we care what other people think.<p>I know I am stating the obvious, but do you think we have underestimated the peer pressures? I don't have a question, but I want to hear what other hackers thinks how much you are influenced by peers and others. <comment><USER2> Honestly, it's hard to say. I don't think I'm driven much by obvious and immediate peer influence, since I can't remember the last time I bought anything... mp3 player, car, clothes, etc. based on any influence from a close friend. I have pretty specific tastes in each of those things, and I tend to buy what I want based on my own criteria.

Now how much my tastes - in general - where shaped by the influence of others in an indirect sense, is hard to say. For example, the last portable music player I bought was chosen specifically because it was the biggest device the local Best Buy had in stock that supports Ogg Vorbis. I favor patent unencumbered formats like Ogg, and am trying to get away from using mp3s in general. So, how much did my friends, colleagues, etc. influence my stance as a free software, open standards, open source, etc. ideologue? I have no idea.

Same for my last car... I bought a Mazda RX-8 because I like fast, sporty little cars; not because any of my friends have RX-8's (ok, one friend has one, but I didn't know it when I bought mine.) But who's to say why I like fast, black, sports cars? I look at it more as a matter of accretion, over the course of decades, and the influence of many sources... not something I can pin on any specific (small) set of immediate influencers.

Clothes? Hmmm.. I don't dress like anybody I know, since I like to wear waist- coats and cravats with jeans. It's an eclectic taste I glommed together from bits & pieces of various influences.... being a Doctor Who fan, liking the Steampunk genre, Victorian era fiction, etc.

Now is any of that _purely_ rational? Hell no. There's definitely a peer influence, "glommed together from bits over time" aesthetic. But there is (sometimes) a rational aspect mixed in. Like choosing a certain music player because of it's format support and storage capacity, or choosing Mazda because they have a good quality reputation, etc.

I guess that was a lot of words to say "I don't know," but that's kinda it. It's hard to isolate the different factors that go into these decisions.

<comment><AUTHOR> Ya, I agree. I am like you a lot, but I know I am influenced by others. Like after I pick my choice I am comfortable with, but seeing not a lot of people making the same choice may make me think again.

What I am thinking is, do ppl really admit that they are affected by others?

</comment></comment><comment><USER3> Coming from a psychology background myself, I would say yes, we definitely underestimate how external factors affect our decision-makings. Peer pressure is one obvious influence, but I would personally say the biggest influences come from factors we're not even aware of. Some I can think of at the top of my head are the way we're influenced by:

\- our fear of loss \- our first impressions (which usually influence all subsequent decisions/habits) \- our sense of ownership of an idea/opinion/product \- our self-fulfilling expectations (something you expect to be great will usually be great) \- and so much more we're usually not aware of

For more on the topic, a very readable and engaging book on behavioral- economic influences is Predictably Irrational. At his blog, he shares some of the book's interesting ideas and findings about different factors: <http://danariely.com/the-books/>

<comment><USER4> Mental resource depletion is another factor. Those who had their attention manipulated were more prone to buy and pay higher prices: [http://econpapers.repec.org/article/ucpjconrs/v_3a33_3ay_3a2...](http://econpapers.repec.org/article/ucpjconrs/v_3a33_3ay_3a2007_3ai_3a4_3ap_3a537-547.htm)

Peers influence is strongest in adolescence

</comment></comment><comment><USER5> Agree that peers being something is powerful -- not so much for peer pressure (although that's important for some), but more for the sense that if 10 of your friends bought something, it must not be a total disaster. Peer protection.

That is the really far out view of a world where you have redlaser/blippy/amazon all tied together with a social network. "10 of your friends bought Red 5 Lime Flavored gum" etc on the low end, or "10 of your friends get their car serviced here" on the higher risk end.

<comment><AUTHOR> An analogy I am thinking is, if someone or lots of people tells me that an iphone clone in china has outdone the iphone. what would I do, even from my experience it is the other way around.

</comment></comment><comment><USER6> If it looks like it was from the future, I _must_ have it.</comment>


Crack in Internet's foundation of trust allows HTTPS session hijacking - <AUTHOR> http://arstechnica.com/security/2012/09/crime-hijacks-https-sessions/

<comment><USER2> So for this to work, an attacker needs to be a Man In The Middle, and get the attacked client to execute some malicious Javascript, which in turn crafts requests to a target site which uses TLS and SPDY. The MITM intercepts and compares the encrypted and compressed payload for recurring patterns that result when using DEFLATE. By playing with the crafted requests, he can e.g. guess cookie values that were added by the browser to the request (as many XSS attacks work) by comparing the lengths of the encrypted payloads.

See [http://security.blogoverflow.com/2012/09/how-can-you- protect...](http://security.blogoverflow.com/2012/09/how-can-you-protect- yourself-from-crime-beasts-successor/) for technical details.

This seems to be a very basic attack, wondering why this attack vector wasn't publicly known much earlier...

<comment><USER3> > This seems to be a very basic attack, wondering why this attack vector > wasn't publicly known much earlier...

in hindsight everything looks very basic. If this was so simple, why didn't _you_ come up with it?

<comment><USER4> Maybe "basic" isn't the word I would use, but I thought the same thing. This is one of those vulnerabilities that is completely obvious... in retrospect.

</comment></comment></comment><comment> hendrik-xdest Ah, so that's why Google removed TLS compression with Chrome as discussed here: <http://news.ycombinator.com/item?id=4510829>

</comment><comment><USER5> 1\. User disables Javascript

2\. User's browser cannot automatically request resources (e.g. via img src tag). Either user prefers to download images manually (e.g. as text-based browser allow) or because he has fine-grained control over his name lookups (e.g. a managed HOSTS file or authoritative nameserver on localhost). User request the resources he wants specifically (how many would deliberately choose to download an ad?). He does not leave download choices to browser authors and web developers.

3\. User's browser does not advertise compression support. User does not allow web pages to issue HTTP requests e.g. via Javacript. User downloads JSON directly and parses it to obtain the desired resource URL's.

4\. User has no desire to compress HTTP headers. User is not interested in SPDY.

What if someone has automated this sort of common sense approach so that it's so simple your grandmother would find it easy to use?

Would this make security consultants, browser authors and web developers upset?

</comment><comment><USER6> Could this be worked around with some added random-length non-redundant data so that the 3rd party can draw no conclusions from the varying responses?

Of course this works as long as the additional deceit doesn't defeat the advantages of compression and even then it still feels like security through obscurity.

<comment><USER7> This is not an effective workaround. Without your suggestion, the length of encrypted packages is f(x), where x is the chosen plaintext, and f(x) happens to be smaller if x correctly guesses one character of the secret.

With your suggestion, the length of encrypted packages is f(x) + E, where E is a random variable (noise) _that does not depend on x_.

Because of that, an attacker simply has to repeat the attack sufficiently many times to gather statistics on package lengths until there is one value of x for which packages are clearly shorter on average than for the rest. This is very similar to the type of sampling you would do in a timing attack.

So your suggestion does make the attack slightly more complicated, but qualitatively, the system remains broken.

<comment><USER8> How about padding to a multiple of X bytes?

<comment><USER9> The attacker controls at least part of the body such that he can select the length of the message. If the attacker pads his guess such that the total message length is N _X+1, then for a successful guess the message length is N_ X and for a non successful one (N+1) * X. You would need too give the message a random length independent of the body to make this attack unfeasibly.

</comment></comment></comment></comment><comment><USER10> I don't see how this attack would work on SPDY, unless you could add arbitrary headers to the request. CRIME works because the entire request is compressed together, whereas in SPDY the header block is compressed separately.

<comment><USER11> The URL can be attacker-controlled

</comment></comment><comment><USER12> I never liked SPDY to begin with. It always seemed to be gratuitously promoting a "new" protocol when many of the speed gains can be had from simply paying better attention to existing protocols, e.g. using pipelining for multiple resources from the same domain. A lot of the "slowness" of the web comes from ignorance and laziness, not lack of capable protocols. It was disturbing how much mindshare SPDY seemed to be getting just based on hype.

And TLS always seemed like a replacement for SSL, when what's really needed are _alternatives_ to the SSL model, not a GNU clone that proclaims it can do the same or better.

This is just my opinion. I apologise if it offends anyone.

Fortunately there are alternatives. You just have to look beyond the hype.

<comment><USER13> You're confusing SSL and TLS with OpenSSL and gnutls. TLS is basically a revised version of SSL developed by the same groups and through the same processes as SSL. The GNU project subsequently created gnutls, which is an implementation of both SSL and TLS just like OpenSSL is - the only reason it's named after TLS and the older libraries are named after SSL is because the older ones predate TLS.

<comment><USER12> s/clone/revised version/

</comment></comment></comment><comment><USER14> What I hate about this vuln is there's no practical fix for many web servers because there was never an option to disable the TLS compression. They're rushing to backport those options now. The good thing is it seems the top three browsers don't even use TLS compression [anymore].</comment>


ClojureCL – GPU computing in Clojure - <AUTHOR> http://clojurecl.uncomplicate.org/articles/guides.html <comment><AUTHOR> There are links for the port of the examples from the book OpenCL in Action in the test folder. [http://www.amazon.com/OpenCL-Action-Accelerate-Graphics- Comp...](http://www.amazon.com/OpenCL-Action-Accelerate-Graphics- Computations/dp/1617290173)</comment>