Ask HN: Good samples of take-home coding tests to give to candidates? - <AUTHOR> <comment><USER2> I recommend taking a problem you or someone on your team recently solved and distill out any internal-specific parts of the problem. Expect a candidate to take 3x the time it takes you to complete the assignment. If you want an assignment that should take them around 2 hours, give yourself 40 minutes to complete it. If you can't complete it in time, you need to cut the scope of the problem.

This works really well for in-person technical questions (live coding or design). I've vetted this over hundreds of candidates at this point.

It has been years since I've given a take-home assignment, but the same basic rules apply.

</comment><comment><USER3> At Papa, this is the take home assignment we used to scale our team.

[https://github.com/joinpapa/foobar- takehome](https://github.com/joinpapa/foobar-takehome)

You may think, "it's trivial" and you would be right. But believe it or not a ton of people couldn't complete it.

I think it's a good take home because it'll show you what the candidate values when writing code. It's also respectful of the candidates time.</comment>


MySQL query comments in Rails - <AUTHOR> http://37signals.com/svn/posts/3130-mini-tech-note-mysql-query-comments-in-rails

<comment><USER2> I've been doing this on high traffic PHP sites for years. It makes mytop very informative and easy to understand, and I even occasionally use them for cheapo memcache caching instructions (built into db layer) when it's not worth precaching or coming up with a more sophisticated scheme. Highly recommended.

One difference though: I prepend the comment instead of appending it.

</comment><comment><USER3> I dig this, a lot. Anyone know if there's a Django equivalent yet? If not, I know what I'll be doing with at least one evening this week...

<comment><USER4> Playfire has released something that will tack a comment onto all your queries for you: <https://github.com/playfire/django-append-url-to-sql/>

<comment><USER3> Brilliant. Thanks!

</comment></comment></comment><comment><USER5> A similar thing I've tried to get implemented at a number of previous jobs is to dump the session ID in a SQL comment when issuing a query. We've had the session ID in application logs forever, but no way of correlating DB activity with application activity; this would fix that and allow _a posteriori_ full- stack instrumentation.

<comment><USER6> if by session id you mean user session, that could completely compromise caching. mysql for instance, unless they fixed it, used to ignore query cache if the sql statement was different due to a different comment, e.g. a timestamp, an IP or a session id.

</comment></comment><comment><USER7> Note that adding comments to otherwise identical queries will typically cause the MySQL query cache to not realize they are the same. See: [http://www.mysqlperformanceblog.com/2008/03/20/mysql- query-c...](http://www.mysqlperformanceblog.com/2008/03/20/mysql-query-cache- whitespace-and-comments/)

Otherwise, neat idea, I like it.

<comment><AUTHOR> Most, if not all production mysql installations have this cache disabled anyways. (Based on my experience at Engine Yard for 3 years and other places the last 5 years.)

<comment><USER8> Why?

<comment><USER9> Also the MySQL query cache is not very granular, it gets cleared on every write to that table. Thus, we've seen in practice that with it enabled MySQL has poorer performance as its constantly being flushed. The overhead of maintaining it doesnt pay off.

Of course its a trade-off. If you have have substantially more reads than writes than it might be OK for your needs.

</comment></comment></comment></comment><comment><USER10> Does Rails not have an equivalent to the Django-Debug-Toolbar to easily debug stuff like this in development?

As for production, going with a fleshed-out service like NewRelic makes more sense to me. If I see slow queries start happening I'd want a broader report of what's going on in my system, not just a map of the query to a controller/action.

</comment><comment><USER11> That's pretty nice. It would also be nice for ActiveRecord migrations to let me add comments to the database and the schema file.

</comment><comment><USER12> Does anyone know if this exists for postgres?

<comment><USER13> Not yet! I'll gladly merge psql patches for this :)</comment></comment>


Filthy surgical instruments: a threat in America's operating rooms (2014) - <AUTHOR> https://publicintegrity.org/health/filthy-surgical-instruments-the-hidden-threat-in-americas-operating-rooms/ <comment><USER2> A few observations from the article from a surgeon's perspective . First of all, I agree with the article that sterilizing modern equipment is more difficult. Back when you just had steel equipment, you could just throw them in an autoclave and be sure that they were sterile (with the exception of prion diseases). As the article mentions, a lot of equipment can't take that kind of treatment and or has areas that are had to access such as long channels.

In additions, not all surgeries are created equal with respect to infection risk. Joint surgeries are some of the highest risk for infection. In fact, when doing open joint surgery, orthopedic surgeons will wear what looks like a space suit with helmet and air supply and work under a giant air suction device to keep the would from being contaminated. Add to that, that they were putting in foreign materials in the form of screws, and you have a recipe for disaster if there is the tiniest bit of contamination. As I have told my patients and medical students, a surgical infection is a life altering event. There is a good chance that you will never be the same after experiencing it.

I think this type of thing will be a bigger issue as we move forward. Surgical equipment is getting more intricate and more expensive. Everybody is pushing to cut costs. Having less equipment for a hospital is less capital costs, but more times that it needs to be properly cleaned, and every time you clean is an opportunity to screw up.

I think the ultimate answer might be taking the responsibility of sterilizing complex surgical equipment from the hospital to the manufacturer. Basically, the hospital would use the equipment once and send it back for reprocessing back to the manufacturer. For a lot of these surgeries, the manufacturer representatives are there at the hospital for surgeries requiring single use stuff likes screws, rods, artificial joints, etc so this would just add to the stuff they are bringing to the hospital anyway. It would be much easier for the FDA is o monitor and regulate a few reprocessing centers instead of every hospital. Simple equipment that you can just throw in an autoclave, can still be done by the hospital. Doing this would also force the manufacturers to think more about ease of cleaning since they would be the ones responsible directly for it.

Just my 2 cents.

<comment><USER3> > As I have told my patients and medical students, a surgical infection is a > life altering event. There is a good chance that you will never be the same > after experiencing it.

What is it that makes such an infection is so impactful? Is there physical damage that persists, psychological trauma due to the experience, or some other factor?

Edit: Read the comments prior to reading the article.

> When Harrison awoke from that surgery, he imagined his nightmare was over. > But in reality, it had just begun. Since then, what began as a simple > operation has turned into a lengthy struggle that left him for months at a > time dependent on hired nurses, unable to dress himself, take a shower, or > work, and afraid for his life.

<comment><USER4> 3 months in the ICU with an open abdomen (for example) is likely to cause all kinds of lifelong impact.

</comment></comment></comment><comment><USER5> It's unsettling to learn that a life-saving surgery can compromised by a tech who didn't spend a few extra minutes cleaning the tools properly.

I had read that surgeons were moving into using disposable instruments because of the possibility of prion contamination (prions can't be destroyed by an autoclave). But maybe that was only for neurosurgery?

<comment><USER6> _> It's unsettling to learn that a life-saving surgery can compromised by a tech who didn't spend a few extra minutes cleaning the tools properly._

Why are the devices so difficult to clean? Why are processes in sterile processing units so chaotic? Why aren't decontamination errors being picked up by quality control?

It's never the fault of the guy on $8.50 an hour. The buck stops with management; the buck always stops with management.

<comment><USER7> > Why are the devices so difficult to clean?

How would _you_ clean prions off surgical devices? This isn't a case of workers not bothering to use soap, you know.

<comment><USER8> prions are currently a problem for basically any equipment, but they are rare, and they are not this problem - this is an issue of basic sanitation of modern, intricate and difficult to sanitize devices causing bacterial infections.

</comment></comment></comment></comment><comment><USER9> I think it was a book called "The Hot Zone" that talked about ebola and similar diseases. It also said the village elders in rural Africa stopped the spread, not the well-educated, monied foreigners from more developed countries.

They barricaded the roads and only let locals come in.

They told their people "Don't go to the white man's hospital." because you would go to the hospital for a fixable problem, like a broken leg, and die of ebola contracted at the hospital.

They quarantined the sick. You couldn't leave your hut. They would leave food on your doorstep to provide care. If three days food accumulated, they burned the hut down without verifying if you were dead or alive.

Antibiotic resistant infections and the like are partly a product of our modern mentality that tech can fix anything. Often, it can't. Old fashioned procedures still have their uses and we don't rely upon them enough.

<comment><USER10> The solution for stopping infectious diseases is to let anyone who contracts one die? You're not completely wrong, but I'll take my odds with modern medicine.

<comment><USER9> That's a wildly uncharitable interpretation of both my comment and the active efforts of village elders to stop the spread of an extremely deadly infection that had no known effective treatment at the time.

</comment></comment></comment><comment><USER11> Note that the article is from 2012, with some level of update in 2014.

It would be interesting to see whether these findings led to any improvements, although there's a good chance that many of the same individual pieces of equipment are still in use. In also curious whether some of the changes in Medicare reimbursement rates for return visits made any difference since they were targeted specifically at unplanned returns and complications (Modifier 78, [https://www.emblemhealth.com/Providers/Claims- Corner/Coding/...](https://www.emblemhealth.com/Providers/Claims- Corner/Coding/Global-Surgery-Reimbursement-Policy-Concerning-an-Unplanned- Return-to-the-Operating-Room)).

<comment><USER12> Many shavers can be ran through a washer now which is great, but until they can be submerged in an ultrasonic cleaner these issues will remain. I'm a huge proponent for sterile handpieces and disposable inserts; doesn't really work in this case as the 'blade' for the shaver is disposable.

</comment></comment><comment><USER13> I imagine that routine use of antibiotics after surgery is covering up for a lot of this and is also contributing to antibiotic resistant bacteria showing up in hospitals with greater and greater frequency.

<comment><USER5> I don't think giving antibiotics after surgery as a rule is a modern invention.

<comment><USER14> Are you saying that after-surgery antibiotics can't be a cause of antibiotic resistance because we've been giving antibiotics for a long time? It takes on the order of decades for antibiotic resistance to be selected for enough that it becomes a problem. And the first antibiotic wasn't even discovered yet a hundred years ago.

<comment><USER5> Even if post-surgery antibiotics were the prime contributor to antibiotic resistance, arguing against the practice is disingenuous because there is no viable alternative.

</comment></comment></comment></comment><comment><USER15> This is an important article.

I read several years ago about manufacturers sterilizing medical tools with radiation before they left the factory. I could imagine that the setup for doing that is too complex and dangerous for a regular hospital to run, but could it be offered as an outside service? Tools that can't undergo autoclaving could be sent out for irradiation after every surgery.

But this is very much _not_ my area, so there are probably a hundred things wrong with my suggestion that I'm too uneducated to see.

<comment><USER16> Good point. Couldn't Gamma radiation kill what heat alone won't?

Edit: Did some research, Gamma radiation can't kill prions. That's one though SOAB.

</comment></comment><comment><USER17> On the question of sterilizing prion-contaminated surgical instruments:

[https://consteril.com/prion-sterilization- guide/](https://consteril.com/prion-sterilization-guide/)

<comment><USER18> I'm half-expecting any sterilization guide dealing with prions to be an empty page with huge "Dispose of and ensure it's never ever used again".

The article by Consolidated Sterilizer Systems does reference an Oxford Journal's opinion that there is _no_ method of prion decontamination or sterilization that has proven 100% effective.

Interesting fact: Consolidated Sterilizer Systems is in the business of selling autoclaves, and at the end of the article there's their lead collection form.

It'd be very unfortunate if future shows that financial interests of conventional sterilization equipment makers played a part in delaying the establishment of effective prion contamination management practices (which may or may not involve disposable instruments—being not an expert myself, I can only speculate).

</comment></comment><comment><USER19> Trust but verify. Without independent verification, this is exactly the type of result that is expected.

If the manufacturers are not out in the field inspecting the devices and how they operate, how will they improve their designs in beneficial ways?

If the government regulators are not doing spot inspections of the equipment, how do they know they haven't made a mistake in approving something, or that a hospital has not trained people properly, or whatever?

If you're a patient, faced with these failures on the part of the regulators, the hospitals, and the manufacturers, what do you do? The whole system has failed here.

</comment><comment><USER20> I'm surprised the patient went weeks without getting treatment for an obviously serious infection. When a friend had her knee replaced she received detailed instructions on recognising infections, including taking her own temperature twice a day, so it could be treated before it had any time to develop.

</comment><comment><USER21> Candida auris is so persistent autoclaving, hydrogen peroxide and bleach aren't effective... hospitals have had to resort to binning equipment and removing wall tiles. Imagine the hospitals / ORs that are are less fastidious, and in the US, hospitals aren't required to release statistics on preventable infections and deaths.

</comment><comment><USER22> There is software that handles that issue. I wrote some in 2002 that uses bar codes and tracking to see what instruments need cleaning. We invented a lot of the tech involved with it into a Windows 98 Javalin touch screen. I migrated the database from Excel to Access and SQL Server to speed things up. Other companies had similar products but not GUI at the time.

</comment><comment><USER23> Considering the amount of antibiotics used, doctors could probably use tools fished out a dumpster.

<comment><USER24> Antibiotics does nothing against viruses.

<comment><USER25> Or prions, or toxins (i.e botulinum)

</comment></comment></comment><comment><USER26> Makes sense that hospitals would do this in the United States. It's a cost problem. Simply put, hospitals do not have the financial resources to fully clean their tools.

Last year I was in the hospital for 1 day and it cost me $10,000. What a travesty. How can doctors ever properly wash surgical tools with that paltry amount of money? Doctors and hospitals deserve better.

<comment><USER27> Hospitals are extraordinary profit centers for their owners - vast amounts of money go through them. If they can't clean their surgical instruments, the situation is morally and, uh, literally, criminal. Whoever is ultimately responsible for such situations - managers, not underlings - should be in jail.

<comment><USER28> It is sarcasm

<comment><USER26> Nah man, I think he picked up on it.

<comment><USER27> I didn't, I was reading quickly but whatever. I'm on HN as a site where content rather than whether you get the jibe is important.

</comment></comment></comment></comment></comment><comment><USER29> When you want to race automobiles but you aren't an F1 driver there are leagues that will accommodate you. But not everyone is equally rich. How do you ensure that it's driving skill that determines the winner, rather than who is willing to spend more money on a better car? You make a rule that says there are no rules about how much a car can cost, but that anyone can buy the winner's car at the end of a race for $X.

I can't help but think that a similar law might not be helpful. Make doctors and hospital administrators randomly subjected to these devices in a mostly- not-invasive procedure where sterile water is flown over the devices and then onto a finger-prick.

In both cases making people have true skin-in-the-game is the solution to the problem.

<comment><USER30> That would have potentially serious _permanent_ and irreversible consequences. It's much different from losing $200k by having to sell your car at the end of the race. And there are various factors that affect the sterility of the instruments, some of which are out of the doctors' control.

It is not OK to give a doctor HIV just because the maintenance people didn't service the machine correctly, causing it to output clean-looking but infected instruments.

<comment><USER29> But it's OK to do that to a patient because "reasons"? Why are the doctors more important than the patients? The harm to patients is serious, permanent and irreversible too. Your argument doesn't seem to make sense to me.

<comment><USER10> The argument is that it's not okay to do in either case, I believe. There's a risk in either case, but the possible exposure to patients is necessary (they need a possibly life saving procedure), whereas the risk to doctors is not necessary (they don't need to be cut open). You'd have to prove that increasing the risk of doctor infection would lead to a lower rate of patient infection. That seems unlikely, just from the fact that the doctor himself could be a vector for infecting a patient. You're also endangering anyone else the doctor comes in contact with in their personal life.

<comment><USER29> > You'd have to prove that increasing the risk of doctor infection would lead > to a lower rate of patient infection.

The point isn't to infect doctors. The point is to make them (potentially) subject to the tools they're about to use as a way to ensure that they are sufficiently involved in designing and overseeing the systems that ultimately move the needle on patient outcomes.

When things are done sufficiently well these kinds of steps aren't necessary. We don't make the engineering team that designs a bridge walk/drive across it first because bridges have an exceedingly low failure rate and the failures that do happen aren't infant mortality (you designed it wrong) they're old (you maintained it wrong).</comment></comment></comment></comment></comment>


66 out of the 100 most cited papers are paywalled - <AUTHOR> https://www.authorea.com/users/8850/articles/125400/_show_article <comment><USER2> We need science to be as open source as technology.

<comment><AUTHOR> exactly!</comment></comment>


Aran Blocks: What you would get if Lego and IKEA had a baby - <AUTHOR> https://www.kickstarter.com/projects/aranblocks/aran-blocks-what-you-would-get-if-lego-and-ikea-ha <comment><USER2> As interesting as it looks, I would hate to have to dust or clean some of the contraptions made from these blocks…</comment>